Commit graph

6384 commits

Author SHA1 Message Date
Kp 110a28e137 Use 'class' for partial_range_t declaration
clang -Wmismatched-tags complains for:

struct X;
class X { ... };

Reported by btb: 68e2168377 (commitcomment-9814108)
2015-02-20 03:00:46 +00:00
Kp 9b48b43b16 Remove __attribute_warn_unused_result on gr_rle_decode
Per btb, callers currently ignore the result, causing warnings on OS X
clang, but not on gcc.  Remove __attribute_warn_unused_result for now.
2015-02-19 03:20:53 +00:00
Kp 49a7599ccf Precompute blob vertices
Per report from btb, OS X clang generates uninitialized stores when
initializing array elements from earlier array fields.
2015-02-19 03:20:52 +00:00
Kp 9f9517b5bf Fix empty body in missile viewing 2015-02-19 03:20:52 +00:00
Kp 5c476ddcc3 Fix distance calculation 2015-02-18 03:43:51 +00:00
Kp f900d4a5ee Remove RAIIdmem::operator pointer
Mac OS X defines uint_fast32_t to unsigned int, causing ambiguous
overloads between RAIIdmem::operator[](std::size_t) and
RAIIdmem::operator[](int).  Adding a disambiguating overload for OS X
breaks Windows.  Remove operator pointer and operator[].  Rely on the
inherited operator[] for indexing.  Require users to call ->get() to
convert to a simple pointer.

First btb ambiguity reported: https://github.com/dxx-rebirth/dxx-rebirth/pull/34
Second btb ambiguity reported: https://github.com/dxx-rebirth/dxx-rebirth/pull/43
2015-02-17 03:52:59 +00:00
Kp 011689f038 Move test for opening doors back down
Locked doors, including the exit door, were permanently impassable in
Descent 1 because the door has state WALL_DOOR_OPENING even after it has
flags WALL_DOOR_OPENED.

Fixes: fd01d4c673 ("Reorder wall_is_doorway to favor likely results")
Reported by: zicodxx @ https://github.com/dxx-rebirth/dxx-rebirth/issues/40
2015-02-15 17:24:55 +00:00
Kp 5a015b38e5 Add D1_MISSION_HOGSIZE2 to load_mission_d1 cases
Fixes: 33c118f999 ("Enable Int3 as d_debugbreak")
2015-02-15 17:24:55 +00:00
Kp 4ab72a4d9a Hide save/load game in non-coop multiplayer
Multiplayer non-coop cannot save, so offering the options is pointless.

Fixes: 7338bb2402 ("Extend in-game esc menu with options and saving")
Reported by: zicodxx @ https://github.com/dxx-rebirth/dxx-rebirth/issues/42
2015-02-15 17:24:54 +00:00
Kp 0f74a66063 Use uint_fast32_t for gr_box 2015-02-14 22:48:30 +00:00
Kp 2c63744fd3 Use array<> for jointlist 2015-02-14 22:48:30 +00:00
Kp 68e2168377 Use array<> for bitmap_index arrays 2015-02-14 22:48:30 +00:00
Kp 40b8bc1a06 Remove unused flag ammo
spit_powerup never sets ammo
2015-02-14 22:48:30 +00:00
Kp f17458d353 Explicitly delete valptridx inequality operators 2015-02-14 22:48:30 +00:00
Kp 93e01f71fd Remove unused Player_num from MULTI_DROP_FLAG 2015-02-14 22:48:29 +00:00
Kp e8c70cfe23 Use array<> for Smega_detonate_times 2015-02-14 22:48:29 +00:00
Kp 5212daa4ad Fix seismic duration sync 2015-02-14 22:48:29 +00:00
Kp 697c81e0c3 Factor out starting seismic sound 2015-02-14 22:48:29 +00:00
Kp 29236f8668 Use array<> for multi_player_textures 2015-02-14 22:48:29 +00:00
Kp bbb9a23697 Convert {GET,PUT}_INTEL_{SHORT,INT} to C++ casts 2015-02-14 22:48:29 +00:00
Kp 0b3bb6397e Make DXX_VERSION_*i be uint16_t 2015-02-14 22:48:29 +00:00
Kp 8ddab68448 Remove unused MULTI_DROP_WEAPON field player 2015-02-14 22:48:29 +00:00
Kp 7bf56a7d69 Add compile-time check on multi message sizes 2015-02-14 22:48:28 +00:00
Kp 32b9202e1f Watch missiles when available 2015-02-14 22:48:28 +00:00
Kp 004e1371d6 Split valid/nonvalid cases of do_cockpit_window_view 2015-02-14 22:48:28 +00:00
Kp 8a64ea3b0e Use array<> for Vertex_active 2015-02-14 22:48:28 +00:00
Kp d1f45f85b2 Wrap submodel angles 2015-02-14 22:48:28 +00:00
Kp 03576a28c2 Pass PHYSFSX_* file extensions as counted array 2015-02-14 22:48:28 +00:00
Kp 223f11bb70 Return count from insert_center_points 2015-02-14 22:48:28 +00:00
Kp c6bb4206e6 Use array<> for create_random_xlate 2015-02-14 22:48:28 +00:00
Kp 83ce8e4f21 Defer dividing phys_apply_rot vecmag 2015-02-14 22:48:28 +00:00
Kp 661e676688 Combine object_intersects_wall_d outputs
Drop unused face.
2015-02-14 22:48:27 +00:00
Kp 315f1ce815 Use array<> for Side_to_verts 2015-02-14 22:48:27 +00:00
Kp dc8b88eed4 Convert various loops to range_for 2015-02-14 22:48:27 +00:00
Kp 2088dcc0f3 Add compile-time check for trailing con_printf newline 2015-02-13 03:27:28 +00:00
Kp 7f2974ea69 Make default ports uint16_t
Fixes a clang warning formatting %hu with the result of
(condition ? short : int).
2015-02-08 17:43:29 +00:00
Kp 91cc111295 Provide SndDisableSdlMixer=true if !USE_SDLMIXER
Accept -nosdlmixer as a no-op in !USE_SDLMIXER builds.
2015-02-08 17:43:29 +00:00
Kp d0de0cf963 Use unique_ptr for SDL_RWops 2015-02-08 17:43:29 +00:00
Kp 19eb73c182 Remove casts for SDL events 2015-02-08 17:43:29 +00:00
Kp 44dea8cd49 Remove unused event initialised 2015-02-08 17:43:29 +00:00
Kp abb0d86696 Only close opened movies 2015-02-08 17:43:29 +00:00
Bradley Bell 2b4aba341d Properly scale and simplify arithmetic for briefing bitmap.
Constrain by screen height, by just using rescale_y for width and height.
Then use show_fullscr to fill the destination canvas.
2015-02-07 22:48:04 -08:00
Bradley Bell 33f0731d11 Remap briefing bitmap. 2015-02-07 22:47:18 -08:00
Kp a64bce8e26 Add workaround for clang crash compiling net_udp.cpp
Compiling net_udp.cpp with clang-3.4 crashes the compiler when parsing
a decltype that refers into the class currently being compiled.  Parsing
a decltype that refers to a parent class works.  Rearrange the decltype
usage to avoid referencing the current class.  This makes the code
harder to read and less flexible, but prevents clang from crashing.

Clang self trace:

1.      <eof> parser at end of file
2.      similar/main/net_udp.cpp:317:8: instantiating function definition 'operator()'
3.      similar/main/net_udp.cpp:317:8: LLVM IR generation of declaration '(anonymous namespace)::sockaddr_dispatch_t<(anonymous namespace)::dxx_recvfrom_t>::operator()'
4.      similar/main/net_udp.cpp:317:8: Mangling declaration '(anonymous namespace)::sockaddr_dispatch_t<(anonymous namespace)::dxx_recvfrom_t>::operator()'

[Update: also affects OS X clang v6, as reported by btb: https://github.com/dxx-rebirth/dxx-rebirth/pull/35#issuecomment-73350066]
2015-02-07 20:28:09 +00:00
Bradley Bell 3c0b5b0b31 include gr.h
needed for various 2d functions when building the software renderer
2015-02-06 21:59:27 -08:00
Kp be745137da Merge pull #35 into unification/master 2015-02-07 04:46:05 +00:00
Kp 699e5d341d Merge pull #34 into unification/master
Requested by btb: https://github.com/dxx-rebirth/dxx-rebirth/pull/34
2015-02-07 04:43:00 +00:00
Kp bc761ad6ef Use unique_ptr for m3u list storage 2015-02-07 04:37:37 +00:00
Bradley Bell 5a9b2497b1 remove #ifdef USE_UDP
even when compiling without USE_UDP, almost everything in this file is needed
2015-02-05 17:15:52 -08:00
Bradley Bell 625cba6fdf xcode setting for passing network opts to scons
also delete reference to old sconf.log
2015-02-05 17:02:17 -08:00