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
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
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
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
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
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
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
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
673a711461
Remove vm_angles_2_matrix return value
2015-02-05 03:03:51 +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
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
Kp
ae0a00a893
Return timer_query() from timer_update()
...
Most timer_update sites immediately query the timer, so return it to
save them the call.
2015-02-05 03:03:48 +00:00
Kp
ffc59c8172
Move timer_update static variables to bss
2015-02-05 03:03:48 +00:00
Kp
ffa1efc468
Rework net_udp_process_pong
...
Fix order of parameter validation. Remove useless test on constant i.
Handle out of range delta.
2015-02-05 03:03:48 +00:00
Kp
147fa18fdf
Use std::sort in multi_sort_kill_list
2015-02-03 00:37:08 +00:00
Kp
b8d4d6d245
Move strings to end of info
2015-02-03 00:37:08 +00:00
Kp
d38dd0aeef
Simplify assign_uvs_to_side error paths
2015-02-03 00:37:07 +00:00
Kp
c256af92af
Fix off-by-one ntstring copying
2015-02-01 23:50:02 +00:00
Kp
156e59a094
Unify Windows/non-Windows socket creation
2015-02-01 23:50:02 +00:00
Kp
6c857b038d
Undefine Station,RobotCenters,Vertices,Segments,Objects at level load
2015-02-01 23:07:18 +00:00
Kp
faa2493e74
Validate UDP host port
2015-02-01 23:07:18 +00:00
Kp
36cd5404d4
Avoid spamming flag changes on headlight cycling
2015-01-29 04:27:37 +00:00
Kp
1985f7f295
Pass rle_swap_0_255 arg by &
2015-01-29 04:27:37 +00:00
Kp
27aeb6764d
Pass rle_remap arg by &
2015-01-29 04:27:37 +00:00
Kp
912253ab00
Pass gr_bitmap_rle_compress arg by &
2015-01-29 04:27:37 +00:00
Kp
93589368c9
Move PHYSFSX_putc to the one file that uses it
2015-01-29 04:27:36 +00:00
Kp
035c99029e
Use ntstring for hudmsg
2015-01-29 04:27:36 +00:00
Kp
d4117871a1
Use range_for for intro movies
2015-01-29 04:27:36 +00:00
Kp
0868df1637
Use explicit swap for get_verts_for_normal
2015-01-29 04:27:36 +00:00
Kp
cd76870ecc
Return find_hitpoint_uv u,v by value
2015-01-29 04:27:36 +00:00
Kp
46252fae4d
Optimize compute_average_rgb
...
Reduce variable reloads. Reduce memory footprint. Add support for
memory poison detection.
2015-01-29 04:27:36 +00:00
Kp
f4517dc0bd
Reduce inclusion of segment.h
2015-01-29 04:27:36 +00:00
Kp
e30df66462
Remove gauges.h #include "piggy.h"
2015-01-29 04:27:35 +00:00
Kp
f31e9f76e0
Remove textures.h #include "piggy.h"
2015-01-29 04:27:35 +00:00
Kp
cd1d3f52fb
Remove string copying in info_display_segsize
2015-01-29 04:27:35 +00:00
Kp
b031e449de
Make equal_space a preprocessor constant
2015-01-29 04:27:35 +00:00
Kp
c2aa2c2e4b
Rename space to space_tab
...
Name space is too simple and causes conflicts elsewhere.
2015-01-29 04:27:35 +00:00
Kp
2f8a1ffeb7
Fix size truncation in mem_malloc
2015-01-29 04:27:35 +00:00
Kp
71ec47b32e
Refactor ui_pad_activate
2015-01-29 04:27:35 +00:00
Kp
7b0442e238
Fix crash on start of demo playback
...
PHYSFSX_openReadBuffered returns an RAIIPHYSFS_File, but infile was a
PHYSFS_file. This caused the file to close instantly, leaving infile
dangling.
2015-01-29 00:56:21 +00:00
Kp
0ecea9717f
Fix crash on end of demo recording
2015-01-29 00:52:35 +00:00
Kp
3ee97b1dcd
Fix crash on start of demo recording
...
PHYSFSX_openWriteBuffered returns an RAIIPHYSFS_File, but outfile was a
PHYSFS_file. This caused the file to close instantly, leaving outfile
dangling.
2015-01-29 00:45:18 +00:00
Kp
aa2431dc7d
Use range_for in load_bitmap_replacements
2015-01-28 03:42:53 +00:00
Kp
ff4a0ccd70
Fix RAIIdmem array usage
...
Some RAIIdmem instances managed a T[], but were declared to manage a T.
2015-01-28 03:42:53 +00:00
Kp
d2f0bdc867
Exit cleanly on bad command line arguments
2015-01-28 03:42:53 +00:00
Kp
cd14d2163b
Optimize obj_get_signature
2015-01-28 03:42:52 +00:00
Kp
4a2c9325bb
Fix various uninitialized accesses
2015-01-28 03:42:52 +00:00
Kp
0ea95e87e7
Pass array<> to create_bfs_list
2015-01-28 03:42:52 +00:00
Kp
bb60f64001
Undefine object instances at construction
2015-01-28 03:42:52 +00:00
Kp
fa73ca8a17
Pass gr_remap_bitmap_good arg by &
2015-01-25 05:32:45 +00:00
Kp
d8f699320b
Pass iff_parse_bitmap arg by &
2015-01-25 05:32:45 +00:00
Kp
86158f605a
Pass convert_rgb15 arg by &
2015-01-25 05:32:44 +00:00
Kp
fd7d4fc1be
Pass copy_iff_to_grs arg by &
2015-01-25 05:32:44 +00:00
Kp
31450e4843
Pass iff_read_bitmap arg by &
2015-01-25 05:32:44 +00:00
Kp
922a7b7dc9
Pass grs_main_bitmap to iff_read_animbrush
2015-01-25 05:32:44 +00:00
Kp
2798ce8631
Use RAIIdmem for iff_bitmap_header
2015-01-25 05:32:44 +00:00
Kp
34761b66b3
Disable unused IFF code
2015-01-25 05:32:44 +00:00
Kp
3ca442cb33
Use arg_port_number for -udp_hostport
2015-01-25 05:32:44 +00:00
Kp
9597147283
Centralize argument port number conversion
2015-01-24 19:16:35 +00:00
Kp
6bc48b7876
Add option -no-tracker to suppress tracker for one run
2015-01-24 19:16:35 +00:00
Kp
4b2b4e0ef9
Add missed format of UDP_MyPort
...
Fixes: 9ccc5400fb
("Refactor UDP_MyPort handling")
2015-01-24 19:16:34 +00:00
Kp
cf8ca9a3e1
Pack newmenu,listbox
2015-01-24 19:16:34 +00:00
Kp
9794cfddc9
Move some local structs into anonymous namespaces
2015-01-24 19:16:34 +00:00
Kp
40fd988a0f
Hide local classes in anonymous namespaces
2015-01-23 03:55:06 +00:00
Kp
fd309ee728
Fix size truncation in mem_malloc
2015-01-23 03:55:05 +00:00
Kp
18a64e4281
Use RAII for PHYSFS_enumerateFiles result
2015-01-23 03:55:05 +00:00
Kp
3817394b79
Simplify demo_menu_handler
2015-01-23 03:55:05 +00:00
Kp
e8a80d32cb
Refactor PHYSFSX_findFiles
2015-01-23 03:55:05 +00:00
Kp
977f1cfeb2
Use RAII for jukebox list
2015-01-23 03:55:05 +00:00
Kp
9c58fd23f4
Use RAIIdmem for jukebox_songs list_buf
2015-01-23 03:55:05 +00:00
Kp
dd3d284e03
Make jukebox_songs::max_songs static const
2015-01-23 03:55:05 +00:00
Kp
06303f9406
Fix buffer overread parsing blank m3u file
2015-01-23 03:55:05 +00:00
Kp
966f51906c
Use destructor for jukebox_songs
2015-01-23 03:55:05 +00:00
Kp
a6884e77db
Unpack robot_info
2015-01-23 03:55:04 +00:00
Kp
d3e657222e
Use RAIIdmem for height_array
2015-01-23 03:55:04 +00:00
zico
48f9390bbe
Merge branch 'unification/master' of github.com:dxx-rebirth/dxx-rebirth into unification/master
2015-01-22 13:58:18 +01:00
Kp
492d6fd996
Remove draw_tmap from OGL build
...
It is only used as a placeholder. Replace it with a number.
Compile out various non-OGL functions when building for OGL.
2015-01-22 03:34:20 +00:00
Kp
9ebcb6e9b1
Use range_for in gamesave.cpp
2015-01-22 03:34:20 +00:00
Kp
5c1056efab
Refactor smart mine handling
2015-01-22 03:34:20 +00:00
Kp
c8b5fe5552
Pass find_vector_intersection arg by &
2015-01-20 02:46:42 +00:00
Kp
bf3bb0b144
Pass uint_fast32_t nverts for texture drawers
2015-01-20 02:46:42 +00:00
Kp
49bf64c9b6
Use range_for in pcx_encode_line
2015-01-20 02:46:42 +00:00
Kp
e9761bed40
Optimize object_nearby_aux
2015-01-20 02:46:42 +00:00
Kp
6f15e46512
Use separate type for general purpose sockaddr
2015-01-18 01:58:34 +00:00
Kp
4f6b5dff04
Fix memory corruption resolving IPv6 address without IPv6 support
2015-01-18 01:58:34 +00:00
Kp
74bcaa3c55
Abstract net_udp_send_game_info sockaddr dispatch
2015-01-18 01:58:34 +00:00
Kp
be59631c5f
Abstract net_udp_request_game_info sockaddr dispatch
2015-01-18 01:58:33 +00:00
Kp
c4ed01ff5c
Skip useless comparisons preparing netgame info
2015-01-18 01:58:33 +00:00
Kp
84e3a03451
Remove unused parameters
2015-01-18 01:58:33 +00:00
Kp
3b8c9e8724
Abstract recvfrom sockaddr dispatch
2015-01-18 01:58:33 +00:00
Kp
c8022a1001
Abstract socket array/sockaddr dispatch
2015-01-18 01:58:33 +00:00
Kp
370434855a
Reorder dxx_recvfrom args
2015-01-18 01:58:33 +00:00
Kp
40d1068fb4
Reorder dxx_sendto args
2015-01-18 01:58:33 +00:00
Kp
37afbb1f7e
Pack ntstrings in transit
2015-01-18 01:58:32 +00:00
Kp
c6664a45a6
Add newmenu_do helper for array<newmenu_item, N>
2015-01-18 01:58:32 +00:00
Kp
69bb51a850
Use new[]/delete[] for help items
2015-01-18 01:58:32 +00:00
Kp
b348238726
Move newdemo help to macros
2015-01-18 01:58:32 +00:00
Kp
3eab839740
Move netgame help to macros
2015-01-18 01:58:32 +00:00
Kp
8e5b3da063
Simplify free_help
2015-01-18 01:58:32 +00:00
Kp
478fa84d67
Move F1 help to macros
2015-01-18 01:58:32 +00:00
Kp
6e0464a58c
Pass nm_set_item_slider arg by &
2015-01-18 01:58:32 +00:00
Kp
54ab069bb8
Pass nm_set_item_number arg by &
2015-01-18 01:58:32 +00:00
Kp
426fb16654
Pass nm_set_item_radio arg by &
2015-01-18 01:58:31 +00:00
Kp
fa10e51999
Add helper nm_item_text
2015-01-18 01:58:31 +00:00
Kp
4705c3f2d8
Pass nm_set_item_checkbox arg by &
2015-01-18 01:58:31 +00:00
Kp
f8163957ef
Add helper nm_item_input
2015-01-18 01:58:31 +00:00
Kp
67e503b9b7
Add helper nm_item_menu
2015-01-18 01:58:31 +00:00
Kp
88c740b3a5
Record briefing without modification
2015-01-18 01:58:31 +00:00
Kp
43abfdf431
Split set_briefing_filename
2015-01-18 01:58:31 +00:00
Kp
e9e69a1a1a
Use ntstring copy_if in set_briefing_filename
2015-01-18 01:58:30 +00:00
Kp
249534c669
Short circuit net_udp_process_monitor_vector
2015-01-18 01:58:30 +00:00
Kp
a9e9217eea
Move piggy_find_bitmap temp onto stack
2015-01-17 18:31:43 +00:00
Kp
bca8889695
Simplify Primary_ammo_max
2015-01-17 18:31:42 +00:00
Kp
b3050a8aa1
Fix adding string to empty string_array_t
2015-01-17 18:31:42 +00:00
Kp
63353ae4ad
Factor out net_udp_create_monitor_vector bitmap array
2015-01-17 18:31:42 +00:00
Kp
5eb0c0cdf9
Record state_callback choice directly
2015-01-17 18:31:42 +00:00