Commit graph

2166 commits

Author SHA1 Message Date
Kp 72a01bf56c Add indirection for player color lookup 2015-03-09 03:33:07 +00:00
Kp 0f9aa2e94e Refactor multi_do_message 2015-03-09 03:33:07 +00:00
Kp cbe6661cee Fix effecting/affecting 2015-03-09 03:33:07 +00:00
Kp ddd9d71633 Reset object size when bashed to shield
Drakona noted in Retro that objects retain their original size when
converted to shields.  Fixed in Retro as "Objects turned into shields
were sometimes the wrong size."

Reported-by: Drakona <catherine.e.darrow@gmail.com>
2015-03-09 03:33:07 +00:00
Kp dcb2fc6524 Factor out UDP broadcast lookup 2015-03-07 17:20:41 +00:00
Kp a84a05c701 Move graphics menu to macro 2015-03-07 17:20:41 +00:00
Kp d39d765208 Move sandbox menu to macro 2015-03-07 17:20:41 +00:00
Kp 1762470b3a Move options menu to macro 2015-03-07 17:20:40 +00:00
Kp 7349a90cc8 Remove unused multi_send_message_dialog 2015-03-03 04:36:16 +00:00
Kp cb83156132 Fix -O0 build
btb reports that clang fails to link
<77ec36b9c3 (commitcomment-9992820)>.
When building at -O0, static member glow_num has its address referenced
because the compiler does not inline non-static method
glow_num_stub::operator=.  Add a definition of this symbol.

Fixes: 77ec36b9c3 ("Convert g3_draw_morphing_model to class")
2015-03-03 04:36:16 +00:00
Kp 5dace576ae Defer checking citem in state_callback 2015-02-28 22:34:07 +00:00
Kp 81eae187e5 Pass selection for EVENT_NEWMENU_CHANGED 2015-02-28 22:34:07 +00:00
Kp cc508be34c Pass selection for EVENT_NEWMENU_SELECTED 2015-02-28 22:34:07 +00:00
Kp 0684444765 Fix Windows build
Fixes: 07869d9dba ("Add automatic demo recording")
2015-02-28 22:34:07 +00:00
Kp 14530d43ea Guard g3d_interp_outline by defined(EDITOR) 2015-02-28 22:34:07 +00:00
Kp 2397bc9a02 Cache &Polygon_models[N_polygon_models] 2015-02-28 22:34:07 +00:00
Kp 86800b1515 Simplify op_sortnorm 2015-02-28 22:34:06 +00:00
Kp 68be3baeca Track highest_texture_num locally 2015-02-28 22:34:06 +00:00
Kp 87516a5b1b Always update glow_num
If !glow_values, the update will be ignored later.
2015-02-28 22:34:06 +00:00
Kp 1833ea6bfa Factor out polymodel init_sub switch 2015-02-28 22:34:06 +00:00
Kp c0a8f598c2 Factor out polymodel morph switch 2015-02-28 22:34:06 +00:00
Kp c0eb4391ba Factor out polymodel draw switch 2015-02-28 22:34:06 +00:00
Kp 655dc60850 Factor out polymodel color switch 2015-02-28 22:34:06 +00:00
Kp aafe252c6d Factor out polymodel chunk switch 2015-02-28 22:34:06 +00:00
Kp 2085fcca34 Factor out record size 2015-02-28 22:34:06 +00:00
Kp e19237c105 Factor out polymodel swap switch 2015-02-28 22:34:06 +00:00
Kp 1a0f409648 Convert init_model_sub to class 2015-02-28 22:34:05 +00:00
Kp 77ec36b9c3 Convert g3_draw_morphing_model to class 2015-02-28 22:34:05 +00:00
Kp c080f65e81 Convert g3_draw_polygon_model to class 2015-02-28 22:34:05 +00:00
Kp 0ec4a876c5 Convert g3_poly_get_color to class 2015-02-28 22:34:05 +00:00
Kp a07ae16d93 Convert get_chunks to class 2015-02-28 22:34:05 +00:00
Kp 8338cc7640 Convert swap_polygon_model_data to class 2015-02-28 22:34:05 +00:00
Kp 07869d9dba Add automatic demo recording
Various users want automatic demo recording.  Add new command line options:
	-auto-record-demo	start recording on level entry
	-record-demo-format	set demo name automatically

For -record-demo-format, specify a template containing any mix of strftime
insertions, variable insertions, and literal text.  As a special case, specify
"." to use the builtin template "%Y%m%d.%H%M%S-$p-$m".  Most users should use
".".  Supported variables:
	$p	name of pilot recording the demo
	$m	name of msn/mn2 file played

Suggested by jeffersoncarpenter in https://github.com/dxx-rebirth/dxx-rebirth/pull/33, but implemented by vLKp.
2015-02-28 19:36:02 +00:00
Kp 335780758b Remove unused DXX_*_INPUT argument MAX_TEXT_LEN 2015-02-28 19:36:02 +00:00
Kp ec1ab45f4d Remove bogus KEY_BACKSP trap
Numbers accept KEY_BACKSP to mean value-=10.
2015-02-28 19:36:01 +00:00
Kp 3dfac8350e Use array<> for robot_info 2015-02-28 19:36:01 +00:00
Kp a9a330bf3f Use array<> for expl_wall_list
Fixes: 125d9257be ("Use special type names for segment/object numbers")
2015-02-28 19:36:01 +00:00
Kp b940ca0510 Use array<> for bogus_data 2015-02-28 19:36:01 +00:00
Kp 8ad180c0a2 Use array<> for Reactors 2015-02-28 19:36:01 +00:00
Kp 1580a274f2 Use array<> for net_udp buffers 2015-02-28 19:36:01 +00:00
Kp e440bc1b17 Move init_exploding_walls to level load 2015-02-28 19:36:01 +00:00
Kp a65533d477 Remove unused delta_light dummy 2015-02-28 19:36:01 +00:00
Kp 0ad02ad975 Remove unused piggy_game_bitmap_name 2015-02-28 19:36:01 +00:00
Kp 4871b17c8f Pass array<> to remap_side_uvs 2015-02-27 03:30:33 +00:00
Kp c3b09da175 Simplify assign_light_to_side 2015-02-27 03:30:33 +00:00
Kp 291fc95fb1 Refactor and optimize assign_uvs_to_side
Use ?: to pick Stretch_scale_* value.
Mark bogosity as unlikely.
Cache vector subtraction.
Defer constructing rotation matrix.
Move uvl assignment into reusable lambda.

This also fixes clang build.  btb reports that clang chokes on:
	extern T t;
	extern const T ct;
	[]() {
		if (a)
			return ct;
		return t;
	}
with
    error: return type 'vms_matrix' must match previous return type 'const vms_matrix' when lambda expression has unspecified explicit return type

Compiler failure report: d38dd0aeef (commitcomment-9909178)
2015-02-27 03:30:33 +00:00
Kp 69fa0ee00c Centralize swap_polygon_model_data op update 2015-02-25 04:19:12 +00:00
zico 390d1746a5 Fixed conditions so positional data are not sent before the level is loaded. 2015-02-22 18:04:37 +01:00
zico 31d1ec7be4 Merge branch 'unification/master' of github.com:dxx-rebirth/dxx-rebirth into unification/master 2015-02-22 17:31:17 +01:00
zico 600d9b8685 Removed conditions for Endlevel_sequence in Multiplayer as it is not set - except for multi data where it was rather governed by NETSTAT_ENDLEVEL 2015-02-22 17:31:06 +01:00
Kp a232bbe488 Reorder objnum_remote_to_local owner check 2015-02-22 01:29:43 +00:00
Kp 31df9268bf Use C++ casts for interpreter casts 2015-02-22 01:29:43 +00:00
Kp 2fa2e17a82 Make chunk.old_base const 2015-02-22 01:29:43 +00:00
Kp 5ddab4818d Make rotate_point_list src const 2015-02-22 01:29:43 +00:00
Kp f29f5cc9b3 Fix WORDS_NEED_ALIGNMENT breaks 2015-02-22 01:29:43 +00:00
Kp 8e4493a534 Fix WORDS_BIGENDIAN breaks 2015-02-22 01:29:43 +00:00
zico afd70564e5 Gave client address as player_address for all UPID_SYNC packets so clients can properly discover their player number when (re)joining running games. Defined 0xcc as MULTI_PNUM_UNDEF for purpose of uninitialized Multiplayer client slots. 2015-02-22 01:41:02 +01:00
zico eef3dc03a7 Due to flexible size of game/lite info packets only check for maximum size of these packets 2015-02-21 18:21:34 +01:00
Kp f2fb31a120 Merge 'D1 emulation issues' into unification/master
Requested by btb: https://github.com/dxx-rebirth/dxx-rebirth/pull/38
2015-02-20 03:00:46 +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 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 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
Kp f7815810e8 Use RAIIPHYSFS_File to manage PHYSFS_File
Fixes a few leaks on error paths.
2015-01-17 18:31:42 +00:00
Kp 68d705a85a Use bool conversion to test PHYSFS_File pointer 2015-01-17 18:31:42 +00:00
Kp 5b48c184af Swap order of Mac sound tests
Simplify the code by removing a now-redundant array test.
2015-01-17 18:31:41 +00:00
Kp eb09eb4396 Refactor newmenu reordering 2015-01-17 18:31:41 +00:00
Kp 28a31a223f Centralize window_close calls 2015-01-17 18:31:41 +00:00
Kp 9a3796d9d1 Pass window_get_next arg by & 2015-01-17 18:31:41 +00:00
Kp 4984f46ef4 Pass window_set_visible arg by & 2015-01-17 18:31:41 +00:00
Kp e7c632b741 Pass window_is_modal arg by & 2015-01-17 18:31:40 +00:00
Kp ee50d45e72 Pass window_send_event arg by & 2015-01-17 18:31:40 +00:00
Kp f2797ddf1e Pass gr_init_canvas arg by & 2015-01-17 18:31:40 +00:00
Kp fccb6814f8 Pass gr_create_sub_canvas arg by & 2015-01-17 18:31:40 +00:00
Kp c731558a94 Pass gr_init_sub_canvas arg by & 2015-01-17 18:31:40 +00:00
Kp c2b7990550 Pass window_get_canvas arg by & 2015-01-17 18:31:40 +00:00
Kp fcc4f7dba5 Use unique_ptr for briefing_screen
Add workaround for briefing use of global Briefing_screens.
2015-01-17 18:31:40 +00:00
Kp a961b2c534 Reorder compare_children operations
Fold find_joining_side_norms into compare_children, then reorder to
defer unnecessary work.
2015-01-17 18:31:39 +00:00
Kp 80eda337cd Continue out of dead render segments sooner 2015-01-17 04:31:17 +00:00
Kp 229603b184 Rotate segment vertices once, not per side 2015-01-17 04:31:17 +00:00
Kp 2d0e8259ef Remove unnecessary multi-pass child sort 2015-01-17 04:31:17 +00:00
Kp c993c5d039 Fix truncation of D1 level names 2015-01-15 04:30:04 +00:00
Kp 8b48f5900c Centralize buddy search 2015-01-15 04:30:03 +00:00
Kp ab326e9c8b Reduce writes trimming endlevel input 2015-01-15 04:30:03 +00:00
Kp d443e28147 Reuse mle_path as Mission_path 2015-01-15 04:30:03 +00:00
Kp b175c944ef Simplify mle_path 2015-01-14 02:26:20 +00:00
Kp ea3c789f64 Fix Windows build break due to strchr losing const
Mingw32 headers and Apple libc++ both strip const from strchr.  Store
the result into a const char* to restore const to the pointer.
2015-01-14 02:26:20 +00:00
Kp 24bdbfb933 Move mle path carefully 2015-01-13 04:19:42 +00:00