Commit graph

6918 commits

Author SHA1 Message Date
Kp babfa9d8e7 Construct d_event_mousebutton 2015-05-28 03:08:39 +00:00
Kp a8431a1933 Fix noreturn test with LTO 2015-05-28 03:08:38 +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 73300a285d Merge "change u_int*_t to C99 standard uint*_t"
Requested-by: btb <https://github.com/dxx-rebirth/dxx-rebirth/pull/67>
Acked-by: Matt1360 <https://github.com/dxx-rebirth/dxx-rebirth/pull/67#issuecomment-104806115>
2015-05-23 17:36:29 +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 41c58ec70e Remove zlib.h from physfs test
The test does not use zlib functions directly.
2015-05-23 04:13:29 +00: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 7243e76c80 Fix gcc-4.6 decoder8 build
Fixes: 8a28f7e1c2 ("Use array<> for movie decoder")
2015-05-22 03:33:20 +00:00
Kp 2f00efdcc6 Fix gcc-4.6 weapon build
gcc-4.6 chokes on `static constexpr type value{};`, but accepts
`static constexpr auto value = type{};`

Fixes: 9d213b5282 ("Wrap player_has_weapon return type")
2015-05-22 03:33:20 +00:00
Kp ef1abd87e8 Fix gcc-4.6 digi build
gcc-4.6 chokes on `static constexpr type value{};`, but accepts
`static constexpr auto value = type{};`

Fixes: ae8b99ae7d ("Use RAIIdigi_sound for briefing printing_channel")
2015-05-22 03:33:20 +00:00
Kp 63cea8bb23 Fix gcc-4.6 ui build
gcc-4.6 chokes on `static constexpr type value{};`, but accepts
`static constexpr auto value = type{};`

Fixes: 95e3ac1e5b ("Use integral_constant for UI kind")
2015-05-22 03:33:19 +00:00
Kp 0fc7b1898c Fix gcc-4.6 serial build
gcc-4.6 chokes on `static constexpr type value{};`, but accepts
`static constexpr auto value = type{};`

Fixes: 9595aec2fb ("Use integral_constant for endian constants")
2015-05-22 03:33:19 +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
Bradley Bell bdacd2f7d7 change u_int*_t to C99 standard uint*_t 2015-05-18 17:12:53 -07: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 3caea6d618 Enable -Wvla 2015-05-17 00:59:26 +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