Commit graph

3828 commits

Author SHA1 Message Date
Kp 188ef99536 Assert that newly allocated objects are type OBJ_NONE 2016-11-10 04:22:18 +00:00
zico 30f9233b36 Reverted 2e6aa0f081 and partially reverted 7064fcccba to still allow segnum and signature init for multiplayer games, keeping consistency during object sync. 2016-11-08 14:16:26 +01:00
zico 5f21bdd71f In net_udp_game_connect, moved test for dl->gameid above test for timer. In udp_tracker_process_game removed redundant location of IP/Port delimiter, added another byte for termination of sIP, added size checks for sIP and sPort before actully copying them and added failsafe check for reading TrackerGameID. 2016-11-08 13:18:51 +01:00
Kp 1cb04cb64b Merge branch derhass:patches/GLES_GL_extension_unification into master 2016-11-06 19:24:52 +00:00
Chris Taylor 143ed30fee Merging in unification/master, resolving conflict in similar/main/kmatrix.cpp 2016-11-06 14:20:18 +08:00
Kp 46b1ea8fd5 Give full Omega_charge when omega cannon is granted 2016-11-05 21:22:44 +00:00
Kp 5f6d60bb7c Fix menu.cpp build when max_joysticks=0
menu.cpp always needs SDL.h, but included it only as a side effect of
joy.h including SDL.h.  joy.h only includes SDL.h when max_joysticks!=0.

Reported-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/258>
2016-11-05 21:22:43 +00:00
derhass 551570d29b Unify OpenGL extension handling between OpenGL and OpenGL ES code paths.
Split ogl_get_verinfo() into ogl_tune_for_current() and
ogl_extensions_init(), and consolidate all the OpenGL extension handling
into ogl_extensions.cpp. Unify the code paths for texture anisotropy and
GPU synchronization for OpenGL and OpenGL ES.

Currently, our renderer only uses GLES 1.0, so no real world implementation
will support sync objects for such an old context, but the logic is valid,
and this way, the GLES specific code paths are reduced.

This patch also fixes an issue where the old ogl_get_verinfo() did modify
the texture filtering mode if no anisotropic filter was available. This
was some leftover from the time when the anisotropic filter was a just
a specific CGameConfig.TexFilt mode, and not a separate, orthogonal setting
CGameCfg.TexAnisotropy that it is now.
2016-11-03 21:59:11 +01:00
Kp a0cd8360bc Request v4-mapped v6 addresses instead of native v4 addresses 2016-11-02 03:58:25 +00:00
zico 730879d733 Updated handling of data sent by tracker. Added support for handling ACKs from tracker and Hole punching between game clients via tracker. Changed udp_dns_filladdr to not perform DNS lookup if requested which is used for broadcasts and IPs sent by tracker. Added text display on NETGAMES menu to indicating if a connection is in progress. Fixed issue allowing to select an invalid game on NETGAMES list. Upon cancelling a forming netgame, made sure tracke runregister packet is sent. Added function to verify tracker address to make sure incoming packets originate from expected trtacker address (and port). Slightly improved handling game data from tracker to be less prone to crash if receiving unexpected data. 2016-11-02 04:20:41 +01:00
zico 8bd3eaad4c Fixed misleading indentations. 2016-10-31 11:36:48 +01:00
zico 78ad83a134 Fixed compile-time errors when using use_udp=0. Still some warnings but it builds. 2016-10-31 11:21:59 +01:00
Chris Taylor 9511f65a90 Declare some local window_event_result vars later (clarity) 2016-10-31 14:58:34 +08:00
Chris Taylor 21e41b15a9 Use listbox_subfunction_t template for listbox_callback member (for convenience of possible future modification) 2016-10-31 14:35:29 +08:00
Kp 52667fae6c Merge branch derhass/patches/ogles-warning-cleanup
derhass reports that OpenGL ES builds warn for unused parameter
`texanis`.  This parameter controls a feature that is not available in
current Rebirth OpenGL ES builds.  Cast the parameter to void to silence
the warning.  Long term, the code ought to be changed to advise the user
when their platform lacks this feature.  In the short term, merge this
fix so that the build will succeed.

https://github.com/dxx-rebirth/dxx-rebirth/pull/256
2016-10-30 18:30:48 +00:00
Kp c73fd378c2 Merge branch derhass/patches/ogles-cast-cleanup
derhass reports that some OpenGL ES code was missed during the
conversion from old-style casts to C++ casts.  Merge the fixes for those
sites.

https://github.com/dxx-rebirth/dxx-rebirth/pull/255
2016-10-30 17:32:01 +00:00
zico 155e054f68 Merge branch 'unification/master' of github.com:dxx-rebirth/dxx-rebirth into unification/master 2016-10-30 03:18:39 +01:00
zico 3db9a8d999 Fixed ping display on HUD (no idea why it was multiplied by 44 - probably copy/paste mistake) 2016-10-30 03:18:15 +01:00
derhass b144badb11 fix old-style casts in the DXX_USE_OGLES code paths 2016-10-29 23:58:28 +00:00
derhass 1c756316cb fix a -Wunused-parameter warning in the DXX_USE_OGLES code path
The `texanis` parameter is not used in OpenGL ES, but in desktop GL.
2016-10-29 23:57:03 +00:00
Kp 8a2e15e20a Add message for when user disables full map cheat 2016-10-29 23:16:18 +00:00
Kp b75a2e4a68 Pass object &to obj_create_copy 2016-10-29 23:16:18 +00:00
Kp d8d7980a00 Simplify load_mine_data_compiled fuelcen iteration 2016-10-29 23:16:18 +00:00
Kp 5a69c09ec2 Move fuelcen_activate special assignment up
One caller uses fuelcen_activate when segp->special != station_type.
Every other caller passes the type that was already on the segment.
Move the assignment into the one caller that needs it, then remove the
argument.
2016-10-29 23:16:17 +00:00
Kp 65f9fd54f8 Use vcsegptr for build_object_lists 2016-10-29 23:16:17 +00:00
Kp e95db4c269 Fold move_away_from_player switch cases 2016-10-29 23:16:17 +00:00
Kp 33bba1fa61 Map boss-gated robots across players 2016-10-29 23:16:16 +00:00
Kp 2b9a86abe3 Factor out buddy hints about invulnerable boss 2016-10-29 23:16:16 +00:00
Kp 57196e8f9f Look up robot type in multi_send_boss_create_robot 2016-10-29 23:16:16 +00:00
Kp c45e441ecd Move map_objnum... into multi_send_boss_create_robot
Whenever a robot is sent to peers, it needs to be added to the local
mapping also.  Move the one use so far into multi_send_boss_create_robot
to simplify maintenance.
2016-10-29 23:16:16 +00:00
Kp c4cfe54010 Return literal object_none on object_none error path
gcc generates better code for:

	if (variable == magic_constant)
		return magic_constant;

than it does for:

	if (variable == magic_constant)
	    return variable;

even though the two have the same result.  Switch to the form which
generates slightly better code.
2016-10-29 23:16:15 +00:00
Kp 3081e69536 Pass grs_main_bitmap to gr_init_bitmap_alloc 2016-10-29 23:16:15 +00:00
Kp 19fd79d8ae Shrink cockpit_decode_alpha::cockpitbuf 2016-10-29 23:16:15 +00:00
Kp 499d0fbe6c Remove excess Players elements
This was present in the Descent 2 source release with no explanation and
no apparent purpose.  Its presence complicates various loops, so remove
it.
2016-10-29 23:16:14 +00:00
Chris Taylor 7ac820248c Use new event_process_all() for event loops that check for window_event_result::deleted (which is most of them) 2016-10-29 20:06:01 +08:00
Chris Taylor a62ca93498 Use a tracking variable for newmenu_do2 (and simpler) polling loop
Add 'track' method to dcx::window, which takes a bool and will set it to 'false' when the window closes. Use for newmenu_do2 and simpler newmenu_do's, since there's the possibility of another window without its own polling loop opening on top - meaning window_event_result::deleted would be returned for that window, not the one we're polling on.
2016-10-28 16:49:53 +08:00
Chris Taylor 54dbe586ee Check for window_event_result::deleted for do_briefing_screens polling loop
This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
2016-10-28 15:45:40 +08:00
Chris Taylor f1548e075e Check for window_event_result::deleted for show_title_screen polling loop
This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
2016-10-28 15:40:50 +08:00
Chris Taylor 49ce8dbb99 Check for window_event_result::deleted for gamebitmaps_viewer polling loop
This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
2016-10-28 15:30:58 +08:00
Chris Taylor 731777476f Check for window_event_result::deleted for polygon_models_viewer polling loop
This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
2016-10-28 15:29:14 +08:00
Chris Taylor b2513ab9a0 Check for window_event_result::deleted for kmatrix_view polling loop
This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
2016-10-28 15:27:45 +08:00
Chris Taylor 7f7047063a Check for window_event_result::deleted for credits polling loop
This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
2016-10-28 15:23:36 +08:00
Kp 4faca3012c Pass player_info to do_cloak_invul_secret_stuff 2016-10-28 03:39:42 +00:00
Kp adaa596672 Cache player object in DoEndLevelScoreGlitz 2016-10-28 03:39:42 +00:00
Kp d5d4517712 Pass player object to init_ammo_and_energy 2016-10-28 03:39:42 +00:00
Kp df8f93d63e Cache player object in FinalCheats 2016-10-28 03:39:41 +00:00
Kp c8dda073ca Pass player object to transfer_energy_to_shield 2016-10-28 03:39:41 +00:00
Kp 98839d1af6 Pass player position to automap_apply_input 2016-10-28 03:39:41 +00:00
Kp 65b649bc75 Pass player_info to ai_do_actual_firing_stuff 2016-10-28 03:39:41 +00:00
Kp ca8fa9c3b6 Pass player_info to ai_move_relative_to_player 2016-10-28 03:39:41 +00:00