Commit graph

6614 commits

Author SHA1 Message Date
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
Bradley Bell 51de6c80b5 Don't play chattering over D1 briefing music. 2015-02-08 12:26:36 -08:00
Bradley Bell f535bff4f8 When emulating D1, put descent.hog at front of search list.
That way we get the D1 music when playing a D1 mission.
This also means we get D1 music in the menu, etc.
Therefore only keeps D1 assets loaded until non-D1 mission is selected.
2015-02-08 12:26:36 -08:00
Bradley Bell 28bd4c1650 Enable D1 boss behavior in d2x build.
So we get correct boss behavior when emulating D1, and 3rd party mn2s can include D1 bosses.
2015-02-08 12:26:36 -08: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
Bradley Bell e0b3f4f1b4 use <cstdlib> instead of <stdlib.h>
to use definitions in the std namespace
2015-02-05 16:54:15 -08:00
Bradley Bell 03d68f44c8 use size_t for indexing array
fixes ambiguous call to operator[]
2015-02-05 16:45:53 -08:00
Kp ddfa4aeecf Inline away fixmulaccum in vm_vec_mag2 2015-02-05 03:03:51 +00:00
Kp f27a79fe2c Combine FQ_GET_SEGLIST scan/add 2015-02-05 03:03:51 +00:00
Kp 078d9513e0 Pass end-of-list for ignore_obj_list 2015-02-05 03:03:51 +00:00
Kp b070c2a7b3 Skip find_plane_line_intersection numerator when den==0 2015-02-05 03:03:51 +00:00
Kp 4108c9f3c6 Short-circuit check_sphere_to_face
Previously, the code set itype=IT_POINT, then picked a closest point.
If the closest point was v0 or v1, itype stayed IT_POINT, otherwise it
became IT_EDGE.  If itype==IT_POINT, then the function returns
	(itype == IT_POINT) ? IT_NONE : itype;
	=>
	IT_NONE
for (dist <= rad).  Otherwise, it returns IT_NONE.  Short-circuit this
by returning IT_NONE without computing the distance.
2015-02-05 03:03:51 +00:00
Kp 536c9af35d Pass sincos_2_matrix arg by & 2015-02-05 03:03:51 +00:00
Kp 673a711461 Remove vm_angles_2_matrix return value 2015-02-05 03:03:51 +00:00
Kp 8d3f047427 Make udt_to_message __attribute__((unused))
Clang warns for unused static inline functions defined in a source file,
including those defined in a macro in a header, when the macro is
expanded in the source file.
2015-02-05 03:03:50 +00:00
Kp 2daaacaa26 Move robot_points onto stack 2015-02-05 03:03:50 +00:00
Kp 1c58627aa3 Remove unused cos from fix_fastsincos 2015-02-05 03:03:50 +00:00
Kp 4f11c2516f Add convenience methods fix_sin, fix_cos 2015-02-05 03:03:50 +00:00
Kp 7a4a6ed1d4 Return uvl from compute_uv_side_center 2015-02-05 03:03:50 +00:00
Kp 1dafd71427 Return uvl from rotate_uv_point
Returned l is now 0 instead of undefined.
2015-02-05 03:03:50 +00:00
Kp 799ebb61a0 Use range_for in texture.cpp 2015-02-05 03:03:50 +00:00
Kp c21536ebb3 Return array<> from create_2d_rotation_matrix 2015-02-05 03:03:50 +00:00
Kp 8f5e6df9a5 Use array<> for Side_to_verts 2015-02-05 03:03:50 +00:00
Kp ddd81962b7 Reduce duplication in find_next_item_* 2015-02-05 03:03:49 +00:00
Kp 2ef26b3a41 Remove unnecessary multiplication in pause time 2015-02-05 03:03:49 +00:00
Kp 600f1417ff Reorder gr_ubox0 stores to eliminate multiplication 2015-02-05 03:03:49 +00:00
Kp 4c8f3a47b5 Convert frequently used casts to C++ casts 2015-02-05 03:03:49 +00:00
Kp 99a4a0ed62 Capture range_for by-value temporaries as const
Modifying a by-value temporary does not affect the underlying container,
so modifying it is almost always a bug.  Require use of a by-reference
capture when modification is desired.

sed -i -e 's/range_for\s*(\s*\(const\s\+\)\?auto\s\+\([[:alpha:]_]\)/range_for (const auto \2/g'
2015-02-05 03:03:49 +00:00
Kp 3045f0fbe0 Use MSG_DONTWAIT when available 2015-02-05 03:03:48 +00:00