Commit graph

2320 commits

Author SHA1 Message Date
Kp c0eb67a9f1 Use vsegptr in network messages 2015-05-28 03:08:39 +00:00
Kp 850853326c Pass vsegptridx to gate_in_robot 2015-05-28 03:08:39 +00:00
Kp 1b0e3f4aa5 Pass vsegptr to multibot compute_segment_center 2015-05-28 03:08:39 +00:00
Kp ea2c2df250 Update open-coded tests for segment_none 2015-05-28 03:08:39 +00:00
Kp 4007b297ec Pass vcsegptr to aipath compute_segment_center 2015-05-28 03:08:39 +00:00
Kp 5cc38ea06c Pass vcsegptridx to digi_link_sound_to_pos 2015-05-28 03:08:39 +00:00
Kp 136e6acda9 Pass vcobjptr to object_types 2015-05-28 03:08:39 +00:00
Kp d586385bd1 Pass vcobjptr to object_ids 2015-05-28 03:08:39 +00:00
Kp babfa9d8e7 Construct d_event_mousebutton 2015-05-28 03:08:39 +00:00
Kp 692038f284 Cache modifier keys 2015-05-28 03:08:38 +00:00
Kp e98c679f06 Simplify key_flush 2015-05-28 03:08:38 +00:00
Kp a991ff0d82 Remove write-only key_data 2015-05-28 03:08:38 +00:00
Kp 34fb7bde90 Test for !=SDL_RELEASED, not ==SDL_PRESSED 2015-05-28 03:08:38 +00:00
Kp 25186ca984 Remove write-only keyd_last_released 2015-05-28 03:08:38 +00:00
Kp badad2ef33 Remove write-only keyd_last_pressed 2015-05-28 03:08:38 +00:00
Kp a66da49cb6 Factor out mouse z button 2015-05-28 03:08:38 +00:00
Kp 821fefe145 Cache locals in mouse_button_handler 2015-05-28 03:08:38 +00:00
Kp abfd8e4d83 Split mouse_toggle_cursor 2015-05-28 03:08:38 +00:00
Kp 83326e89e2 Factor out sending mouse clicks 2015-05-28 03:08:38 +00:00
zico 74b66a7f5a Fixed regression (with kp's help) in multi_do_player_deres which made conditional check for map_objnum_local_to_remote fail for the wrong reasons 2015-05-25 11:48:05 +02:00
Kp d29d52be7f Restore temporary rear view 2015-05-24 17:16:38 +00:00
Kp ec453dcb28 Merge "Clang fixes" from btb
clang whines about some innocuous constructs.  Preprocess them out to
silence it.

Requested-by: btb <https://github.com/dxx-rebirth/dxx-rebirth/pull/63>
2015-05-24 17:13:13 +00:00
Kp 7e3bec43a0 Allow object_none as killer in multi_compute_kill 2015-05-23 22:38:15 +00:00
Kp d2724ea90f Remove bogus backspace Int3
There is no reason to trap to debugger when backspace is pressed on a
window that ignores it.  Remove the bogus trap.

Reported-by: A Future Pilot <http://www.dxx-rebirth.com/frm/index.php/topic,2024.msg21713/topicseen.html#msg21713>
2015-05-23 17:25:56 +00:00
zico 1f6ae58f52 Added HANDS_OFF_PERIOD define for multibot to make sure code will not break if MAX_ROBOTS_CONTROLLED changes 2015-05-23 18:18:20 +02:00
Kp d5cf0fcd6f Store hoard goal_eclip locally 2015-05-23 04:13:29 +00:00
Kp e116e894b0 Fix invalid free when hoard data is missing
If hoard data is not initialized, hoard_resources_type::reset frees
GameBitmaps[0].data, which is bogus_data instead of nullptr or a valid
pointer.

Fixes: d422e8656a ("Simplify HoardEquipped")
2015-05-23 04:13:29 +00:00
Kp 02c6f2a9f3 Fix gcc-4.6 render range error
gcc-4.6 fails to synthesize a move constructor to initialize
reversed_render_range; later gcc accept this.

Switch to capturing the value by const auto &&, which works in both old
and new gcc.
2015-05-22 03:33:21 +00:00
Kp 6615aff8a4 Fix gcc-4.6 piggy build
gcc-4.6 warns about the transition to new for scope rules; later gcc
does not warn.

Replace the loops with range-based for.
2015-05-22 03:33:20 +00:00
Kp 3298802b3d Fix gcc-4.6 object build
gcc-4.6 chokes on implicitly converting vobjptridx_t to int/uint16_t;
later gcc accepts this.  Cast the vobjptridx_t directly to short to
force gcc-4.6 to find the correct conversion operator.
2015-05-22 03:33:20 +00:00
Kp 665a0de228 Fix gcc-4.6 multi build
gcc-4.6 chokes on implicitly converting objptridx_t to short; later gcc
accepts this.  Cast the objptridx_t directly to short to force gcc-4.6
to find the correct conversion operator.
2015-05-22 03:33:20 +00:00
Kp 76540314c1 Fix gcc-4.6 gamerend build
gcc-4.6 chokes on casting vobjptridx_t to long; later gcc accepts this.
Change the format string to short, then switch the conversion to
objnum_t, which has an exact match for the converting operator.
2015-05-22 03:33:20 +00:00
Kp 4cd329d2b4 Fix gcc-4.6 gamecntl build
gcc-4.6 chokes on constexpr operator int(); later gcc accepts this.
menu_fix_wrapper is never converted in constexpr context, so remove the
constexpr specifier.

Fixes: 12ad357b8d ("Move Wimp Menu to macro")
2015-05-22 03:33:20 +00:00
Kp ae604225c8 Fix gcc-4.6 interpreter build
gcc-4.6 chokes on `static constexpr type value{};`, but accepts
`static constexpr auto value = type{};`

Fixes: 77ec36b9c3 ("Convert g3_draw_morphing_model to class")
2015-05-22 03:33:19 +00:00
Kp d422e8656a Simplify HoardEquipped 2015-05-22 03:33:19 +00:00
Kp dc4a344ec8 Use destructor for hoard resources 2015-05-22 03:33:19 +00:00
Kp cc2a5e9790 Use gr_free_bitmap_data for Orb_icons 2015-05-22 03:33:19 +00:00
Kp bc886e5ade Skip sliding invisible textures 2015-05-17 20:37:59 +00:00
Kp c53b734abb Compute slide segments early
Store slide flag in segment to save one byte per segment.
2015-05-17 20:37:59 +00:00
Kp a7f9b34aff Refactor slide_textures 2015-05-17 20:37:59 +00:00
Kp 8e49c191ce Remove unused copy_side_except_vertex_ids 2015-05-17 20:37:59 +00:00
Kp 44625e2617 Remove unnecessary Mouse::button_state 2015-05-14 02:23:13 +00:00
Kp 265ad59e9c Remove set_default_handler
standard_handler is the only handler.  Use it directly.
2015-05-14 02:23:13 +00:00
Kp 7f403bc1af Optimize clearing player animation angles 2015-05-14 02:23:13 +00:00
Kp 577321d74b Remove obsolete con_close 2015-05-14 02:23:13 +00:00
Kp 5ffbb6dd05 Enable tail call in con_add_buffer_line 2015-05-14 02:23:13 +00:00
Kp e4d7d20bd2 Factor out console color lookup 2015-05-14 02:23:13 +00:00
Kp 8ddcf7b323 Simplify console open check 2015-05-14 02:23:13 +00:00
Kp fa591d585a Shorten event_toggle_focus 2015-05-14 02:23:13 +00:00
Kp 68d35d8e05 Move negation of mouse_toggle_cursor argument into callee 2015-05-14 02:23:13 +00:00