Commit graph

1830 commits

Author SHA1 Message Date
Kp aa4c5efbb9 Replace HAS_PRIMARY_FLAG(x) with HAS_x_FLAG 2015-04-19 04:18:50 +00:00
Kp 12673084a0 Remove obsolete player_has_primary_weapon D1 special case 2015-04-19 04:18:50 +00:00
Kp 9d213b5282 Wrap player_has_weapon return type 2015-04-19 04:18:50 +00:00
Kp f74f879145 Simplify do_weapon_select call 2015-04-19 04:18:50 +00:00
Kp 0a1d643442 Remove obsolete weapon_num check 2015-04-19 04:18:50 +00:00
Kp 84c638ed64 Move PHYSFS_list_t to separate header 2015-04-19 04:18:49 +00:00
Kp 29a57b0dc0 Remove unused net_udp parameters 2015-04-19 04:18:49 +00:00
Kp 150e2d2686 Convert local arrays to array<> 2015-04-19 04:18:49 +00:00
Kp 32b4b8f0bb Use enum class for level save/load 2015-04-19 04:18:49 +00:00
zico 17f5f67948 Fixed regression from 2645d41b5f - must use UDP_MDATA_STOR_QUEUE_SIZE for UDP_mdata_trace as it it a looping list 2015-04-18 22:15:52 +02:00
zico 03f9f11b6d Reworked net_udp_noloss_validate_mdata() to properly REsend MDATA ACK for packets that have been received before 2015-04-18 15:00:24 +02:00
Kp 8c106ea2e9 Avoid potential underflow when n_phys_segs==0 2015-04-11 04:01:29 +00:00
Kp e99a9236cf Avoid redundant vsegptridx calculation in object_move_one 2015-04-11 04:01:29 +00:00
zico 1fd7cb8929 Fusion cannon in Descent 1 was nerfed for Multiplayer after it was made stronger in 1.1 patch. This is fine but players expressed it being not desirable for Coop - which makes sense to me. This fix only applies the nerf to non-Coop games. 2015-04-08 15:05:03 +02:00
zico c60eb9c412 since the game keeps running during kmatrix, bail out of start_player_death_sequence if connect state != CONNECT_PLAYING to prevent incorrect suicide scoring 2015-04-08 14:37:33 +02:00
zico b512127328 fixed player ships not disappearing upon kill which was caused by removal of PKilledFlags and the improper undoing of hack to keep player exploding and respawning events in order 2015-04-08 14:23:55 +02:00
Kp 55fada5c14 Fix texture filtering menu
Reported-by: derhass <https://github.com/dxx-rebirth/dxx-rebirth/issues/59>
Fixes: a84a05c701 ("Move graphics menu to macro")
2015-04-07 01:55:57 +00:00
derhass 49e7cfe37e GLES: never declare the unused variable gl_draw_buffer
Move the declarition directly to the code part where it is used
(always in a #ifndef OGLES block).
2015-04-04 22:58:02 +02:00
Kp df9ce26dfb Fix WORDS_NEED_ALIGNMENT build
Integer promotion changed short+short into an int, but INTEL_SHORT only
takes short or unsigned short.  Add a cast to force the result back to
short.

Reported-by: derhass <https://github.com/dxx-rebirth/dxx-rebirth/issues/56>
2015-04-04 17:23:47 +00:00
Kp a9c81c5614 Move Weapon_is_energy to collide.cpp 2015-04-02 02:36:57 +00:00
Kp 1c7bae4fc4 Use local array<> for object_buffer 2015-04-02 02:36:57 +00:00
Kp 5ae5033fed Use enum for AIB constants 2015-04-02 02:36:57 +00:00
Kp 6b6eaef226 Include polyobj.h from robot.h
Swap the inclusion order since all robots are polyobjects, but not all
polyobjects are robots.
2015-04-02 02:36:57 +00:00
Kp 2f86499144 Remove do_cockpit_window_view unused parameters 2015-04-02 02:36:57 +00:00
Kp b0ec49f8e5 Remove unused file+line from get_seg_masks 2015-04-02 02:36:56 +00:00
Kp aa75a398d9 Move Wall_names to dumpmine.cpp 2015-04-02 02:36:56 +00:00
Kp ae8b99ae7d Use RAIIdigi_sound for briefing printing_channel 2015-04-02 02:36:55 +00:00
Kp b60c603e21 Avoid redundant PHYSFSX_exists checks 2015-04-02 02:36:55 +00:00
Kp 61ee6463aa Remove unused show_title_screen return value 2015-04-02 02:36:55 +00:00
Kp b36ce28382 Remove unnecessary strcpy in titles.cpp 2015-04-02 02:36:55 +00:00
Kp 6a4c7ed78e Inline away D1 secret_restore values 2015-04-02 02:36:53 +00:00
Kp b1d8114b7d Reduce sb_show_lives lookup of HIRESMODE 2015-04-02 02:36:53 +00:00
Kp 6e1a1873cc Fix D1 behavior/mode confusion 2015-04-02 02:36:53 +00:00
Kp 9157e5f970 Use enum class for player_awareness_type_t 2015-04-02 02:36:53 +00:00
Kp 2c0755b117 Factor out AI timesplice check 2015-04-02 02:36:52 +00:00
Kp 90fbebf8fd Convert most global arrays to array<> 2015-04-02 02:36:52 +00:00
Kp 66a70fd373 Prepare for global arrays to be array<> 2015-04-02 02:36:52 +00:00
Kp 6e96ff3e00 Fix ambiguous use of INTEL_SHORT/INTEL_INT 2015-04-02 02:36:52 +00:00
Kp d4351a9457 Fix gcc-4.6 for loop variable warning 2015-04-02 02:36:52 +00:00
Kp 66806e1f34 Enable -Wmissing-braces
clang includes it in -Wall, so add it for gcc
2015-04-02 02:36:52 +00:00
Kp f76b112304 Allow dropping laser powerups 2015-03-28 17:18:02 +00:00
Kp 598a5e42a2 Allow granting items at player spawn 2015-03-28 17:18:02 +00:00
Kp da3cb31a0e Refactor powerup allow code 2015-03-28 17:18:02 +00:00
Kp b32d1c76c9 Move powerup size reset into set_powerup_id 2015-03-28 17:18:02 +00:00
Kp ccc440df57 Optimize cloak/invuln cleanup 2015-03-28 17:18:02 +00:00
Kp 12ad357b8d Move Wimp Menu to macro 2015-03-28 17:18:02 +00:00
Kp 9fa052f5b1 Remove unused Multi_killed_yourself 2015-03-28 17:18:01 +00:00
Kp 7ecb605a58 Combine tracker message formatting 2015-03-28 17:18:01 +00:00
Kp 12b5d6c94e Stringize packets per second limits 2015-03-28 17:18:01 +00:00
Bradley Bell 0f88195dba use <cstdlib> instead of <stdlib.h>
to use definitions in the std namespace
2015-03-27 02:50:23 +00:00
Kp 75680578e1 Move CROSS_* into guard
Suggested-by: btb <c3efc342bc>
2015-03-26 02:42:26 +00:00
Kp 99e4fedcd3 Guard kernel_accepts_extra_sockaddr_bytes in defined(IPv6) 2015-03-26 02:42:26 +00:00
Christian 97fc714970 Merge pull request #53 from derhass/unification/syncgl
cleaned-up syncgl patch for unification
2015-03-24 12:37:55 +01:00
Kp 5d6e2c16c6 Fix kill accounting
Fixes: c4ae4e5379 ("Pass player number to multi functions")
2015-03-24 02:35:37 +00:00
Kp 0707664ae1 Use enum for kmatrix_view result 2015-03-24 02:07:42 +00:00
derhass daf6b7a29a add missing line break in -gl_syncwait help message 2015-03-23 20:18:27 +01:00
derhass 639b569496 Merge branch 'unification/master' into unification/syncgl_v2
Conflicts:
	similar/arch/ogl/gr.cpp
	similar/misc/args.cpp
2015-03-23 20:18:17 +01:00
zico 8d686ab23b implemented return value for kmatrix_view() so we can properly bail out of the game loop in AdvanceLevel() 2015-03-23 03:03:22 +01:00
zico 8292efe622 made code for level progression more similar between D1X and D2X 2015-03-23 02:43:31 +01:00
Kp 1e5acb5f6e Fix guided missile crash
Check type before checking signature.  Objects with type OBJ_NONE are
not guaranteed to have any particular signature.  Commit 91d31b1 removed
the statement which cleared the signature when the type changes to
OBJ_NONE.

Fixes: 91d31b1952 ("Wrap object signature in subtype")
2015-03-22 22:48:47 +00:00
Kp d63be36fb3 Fix bogus trap on remote_owner check
Some call sites pass a uint8_t to objnum_remote_to_local, which is
zero-extended up to an int.  The check for owner==-1 then fails, causing
the sanity check to trap to the debugger, even though the situation is
normal and harmless.  Switch the type to int8_t to ensure that the value
is not sign/zero-extended.
2015-03-22 22:48:47 +00:00
Kp 95eccebcb3 Fix parsing of MULTI_FIRE_TRACK/MULTI_FIRE_BOMB
Fixes: 04d84ae61d ("Pass shot orientation with each weapon packet")
2015-03-22 22:48:47 +00:00
Kp 677e48bc7e Warn when aspect ratio is ignored 2015-03-22 18:49:21 +00:00
Kp 627547371f Improve change_res error checking 2015-03-22 18:49:21 +00:00
Kp 2b44a352ca Remove redundant sc_mode
sc_mode is a packed copy of sc_w/sc_h.  Switch to an accessor that uses
the copy.
2015-03-22 18:49:21 +00:00
Kp fca381727c Add wrappers for screen width/height 2015-03-22 18:49:21 +00:00
Kp 945914f1d6 Enable -Wuninitialized, -Wempty-body, -Wignored-qualifiers, -Wunused 2015-03-22 18:49:21 +00:00
Kp 91d31b1952 Wrap object signature in subtype 2015-03-22 18:49:21 +00:00
Kp 565019f880 Remove unused movie_table_secret 2015-03-22 18:49:21 +00:00
Kp 90f99c8baa Use any_of to search system_keys 2015-03-22 18:49:21 +00:00
Kp ce1844bf93 Remove bogus test
Global arrays are never placed at NULL.
2015-03-22 18:49:21 +00:00
Kp ce028fc843 Move Object_type_names to dumpmine 2015-03-22 18:49:21 +00:00
Kp 2f99b894f0 Remove unused state_text 2015-03-22 18:49:21 +00:00
Kp 373becd588 Remove D2-unused mode_text 2015-03-22 18:49:21 +00:00
Kp 7840885473 Fix clang -Wparentheses-equality warnings 2015-03-22 18:49:21 +00:00
Kp 7bf49fe551 Fix clang -Wmissing-braces warnings 2015-03-22 18:49:21 +00:00
Kp 9ddea5f570 Reduce lifetime of Args 2015-03-22 18:49:20 +00:00
Kp 65ff319ebb Use ntstring for LastMission 2015-03-22 18:49:20 +00:00
Kp 8ffb2c7f45 Use newmenu_do2 for newmenu_doreorder 2015-03-22 18:49:20 +00:00
derhass 2cd73b6dfe Import the syncgl patch based on 0.58.1 into unification code base
I also changed the command line arguments a bit, gl_syncmethod and
gl_sycnwait are used now. Furthermore, I added the ew mode AUTO. This is
a conservative mode and the default for now: if GL_ARB_sync is available,
use the FENCE_SLEEP mode, otherwise, disable it completely.

Conflicts:
	include/args.h
	misc/args.c
	similar/arch/ogl/gr.cpp
2015-03-22 18:17:11 +01:00
Kp c5f6a115ec Add <stdexcept> for files that throw std::runtime_error 2015-03-22 04:16:49 +00:00
Kp 2458078987 Skip digi_sync_sounds loop if !Viewer
If a sound is used, it may dereference Viewer.  If Viewer is null, this
will crash.  In 630f11945e,
digi_sync_sounds changed to assume Viewer is valid.  This crashes during
early startup when not using the SDL_mixer backend, even though no
sounds are in use.

Reported-by: derhass <https://github.com/dxx-rebirth/dxx-rebirth/issues/45>
Fixes: 630f11945e ("Cache Viewer in digiobj")
2015-03-15 18:52:52 +00:00
Kp ac39b6cb40 Fix -Wunused-variable warning in sound_menuset for !USE_SDLMIXER
Only cache citem if USE_SDLMIXER.  It is unused if !USE_SDLMIXER.

Fixes: cc508be34c ("Pass selection for EVENT_NEWMENU_SELECTED")
2015-03-15 18:45:53 +00:00
Kp e1ff8afc88 Use ntstring for newmenu_item saved_text 2015-03-12 02:21:21 +00:00
Kp fd2cbdbb39 Use range_for in newmenu.cpp 2015-03-12 02:21:21 +00:00
Kp d1b60c2324 Pass uint_fast32_t for newmenu_* items 2015-03-12 02:21:21 +00:00
Kp 67d5bcdcef Factor out menu scroll stepping 2015-03-12 02:21:21 +00:00
Kp 45c4e09370 Cache menu->items[menu->citem] 2015-03-12 02:21:21 +00:00
Kp 65eb652895 Reduce writes in strip_end_whitespace 2015-03-12 02:21:20 +00:00
Kp 9b0a97f9d4 Flip sense of char_allowed 2015-03-12 02:21:20 +00:00
Kp 94d153e5cd Reorder ' '->'_' check 2015-03-12 02:21:20 +00:00
Kp 65810d5c77 Skip sqrt in check_vector_to_sphere_1 2015-03-12 02:21:20 +00:00
Kp 707b69220d Skip sqrt,square in check_vector_to_sphere_1 2015-03-12 02:21:20 +00:00
Kp f89262054f Skip sqrt in check_sphere_to_face 2015-03-12 02:21:20 +00:00
Kp 5f409c4948 Move quick checks up in check_sphere_to_face 2015-03-12 02:21:20 +00:00
Kp 337837ec15 Skip sqrt in special_check_line_to_face 2015-03-12 02:21:20 +00:00
Kp 76d383261c Return vm_distance_squared from check_vector_to_sphere_1 2015-03-12 02:21:20 +00:00
Kp 2c09f9fa90 Propagate special types for distance/magnitude 2015-03-12 02:21:19 +00:00
Kp c5bbaaaf87 Remove unused advance_sound 2015-03-11 02:19:15 +00:00
Kp 4840ddcd22 Support overriding build date/time
Help the reproducible build effort by letting the builder set a specific
date and time.
2015-03-11 02:19:15 +00:00
Kp b69a9438a7 Fix SDL graphics menu build failure
Fixes: a84a05c701 ("Move graphics menu to macro")
2015-03-11 02:19:15 +00:00
Kp b414758505 Add stub for player color remapping 2015-03-09 03:33:07 +00:00
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 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 2397bc9a02 Cache &Polygon_models[N_polygon_models] 2015-02-28 22:34:07 +00:00
Kp 68be3baeca Track highest_texture_num locally 2015-02-28 22:34:06 +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
Bradley Bell 1c2746ae45 Make constructor and overloads for cvar_t 2015-02-23 23:31:41 -08:00
Bradley Bell 44dace6a49 Make cvar names const 2015-02-23 23:31:40 -08:00
Bradley Bell 7eef141b7e friendlier detection of cvar collision 2015-02-23 23:31:40 -08:00
Bradley Bell eaf11884e2 simplify struct declaration 2015-02-23 23:31:40 -08:00
Bradley Bell 45d31b6d57 Replace cvar.archive with flags.
Add cheat flag.
2015-02-23 20:44:20 -08:00
Bradley Bell df3ce9953f Merge branch 'unification/master' into command-line 2015-02-22 19:25:04 -08:00
Bradley Bell 86cd85e22d use hash for cmd and alias list 2015-02-22 13:29:07 -08:00
Bradley Bell a838e08431 use hash for cvar list 2015-02-22 13:29:07 -08: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 2fa2e17a82 Make chunk.old_base const 2015-02-22 01:29:43 +00:00
Kp f29f5cc9b3 Fix WORDS_NEED_ALIGNMENT 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
Bradley Bell 90c74095ce Use array<> 2015-02-17 02:27:15 -08:00
Bradley Bell 03116c6799 Eliminate unnecessary casts.
Use static_cast.
2015-02-17 02:27:15 -08:00
Bradley Bell cb617a18f9 Use sizeof for bounds.
Fix incorrect bounds for some strncat calls.
2015-02-17 02:27:15 -08:00
Bradley Bell b49067fd43 don't mess around with void pointers 2015-02-17 02:27:15 -08:00
Bradley Bell 0191bf451f miscellaneous fixes 2015-02-17 02:27:15 -08: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
Bradley Bell 4a8ca90d52 remove extra newlines from con_printf 2015-02-16 13:34:22 -08:00
Bradley Bell b14f6031f5 simplify help system 2015-02-16 13:34:13 -08: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 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 bbb32d0175 added cmd and cvar modules from d2x 2015-02-10 23:35:44 -08:00
Bradley Bell 0db11cc139 add d2x command-line interface to console 2015-02-10 17:01:00 -08: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
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 e0b3f4f1b4 use <cstdlib> instead of <stdlib.h>
to use definitions in the std namespace
2015-02-05 16:54:15 -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 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 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 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 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 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 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 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