Commit graph

87 commits

Author SHA1 Message Date
Kp f3562a1a38 Rename include/error.h to include/dxxerror.h
Avoid conflict with generic system header.
2012-07-07 18:35:06 +00:00
Kp 3edbfa2c90 Normalize comments and whitespace to match D2X 2013-02-25 02:00:02 +00:00
zicodxx b5b72b3ae3 Converted gr_printf to gr_string where needed - patch by Kp 2013-01-03 17:23:09 +01:00
zicodxx bebc52031e Avoid some unnecessary strlen's 2012-09-03 00:43:52 +02:00
zicodxx fc421b290a use size of output buffer for snprintf; on the way changed rebirth-specific song file to dxx-r.sng to respect hog 8+3 file convention 2012-06-01 12:46:00 +02:00
zicodxx 55aae15997 Made inline functions static 2012-05-14 17:13:24 +02:00
zicodxx e23535ffe8 little reorganization for draw_hud(): draw multiplayer names first, reticle last to prevent anything being drawn over by floating names and reticle not messed by anything else 2012-04-24 11:55:12 +02:00
zicodxx d30fb514b1 Removed usage of 'oldmaxnet' variable when switching between coop and other game modes which would not be correctly set when coop mode is loaded from a netgame profile; Removed 'MaxNumNetPlayers' variable as already replaced by Netgame.max_numplayers 2012-04-18 11:28:21 +02:00
zicodxx 897a6aaf6b Further Multiplayer cleanup: moved gobal variable resets from multi_new_game() to proper function calls; added pnum variable to init_player_stats_game() and init_player_stats_new_ship() so these can be set for each player when starting match; added multi_new_level() calls when setting up game as well when trying to join game; cleaned multi_reset_stuff() from variable resetting that happen in general game code; when being dumped from game, made sure no packets are sent during messagebox dispaly; replaced MAX_NUM_NET_PLAYERS by MAX_PLAYERS as it's the same definition 2012-04-15 15:32:46 +02:00
zicodxx d39d58a585 record shields if player is invulnerable to get proper shield display in demo playback if player respawns with invulnerability on 2012-04-07 16:13:10 +02:00
zicodxx fb775b35c3 Fixed set but unused variables 2011-09-27 01:31:17 +02:00
zicodxx ca4d5b4263 When using PC Shareware pigfile do not show key icons in CM_FULL_SCREEN since pigfile does not have these icons 2011-05-05 01:07:08 +02:00
zicodxx f2fb5c462a Host can now decide (again) if players are allowed to display enemy names on HUD 2011-05-05 00:16:35 +02:00
zicodxx 2657a6dca9 Due to controls rewrite was not possible anymore to send multiplayer messages while being dead - added specific exception to allow this; Rewrote show_HUD_names to only show names, indicators or typing string for enemy players when they are not cloaked 2011-04-16 01:12:02 +02:00
zicodxx 5c4a3850cd Little fix for typing-indicator in multiplayer - was showing comma even if no player name was displayed; Removed team_vector from UDP lite_info structure - it's not needed; Increased UDP_NETGAMES_PAGES to actually show 3000 possible games 2011-04-12 00:45:06 +02:00
zicodxx c63f3f7682 Improved syntax for Multi messages/commands: Commands starting with '/' and those accepting arguments as well as Player/Team messages require space after ':' ; Added indicator on HUD to show if a player is typing a message to prevent accidential kills 2011-04-11 17:47:12 +02:00
zicodxx 6140595491 Fixed text-related annoyances: *Show reticle names* now named *Show player names on HUD*; Fixed positions of strings TXT_CLOAKED and TXT_CRUISE in CM_FULL_SCREEN; Fixed typo in tracker timeout screen; Fixed scaling of tab_stop in briefings (again); Removed some little D2 code for briefings as it broke some briefing screens 2011-04-10 03:12:02 +02:00
zicodxx fe2dd897f7 Added cv_fade_level to canvas structure to replace Gr_scanline_darkening_level; Added cv_blend_func to canvas structure to set blending; Introduced gr_settransblend to set cv_fade_level and cv_blend_func; Added function to set normal blending, additive alpha blending and additive color blending; Moved Special transparency effects from g3_draw_bitmap to render_object to set individual transparency and/or blending for each object outside of OpenGL-specific code; Added special blending for fuelcenter and force field effects as well; Removed unused LASER_HACK code; Renamed OglAlphaEffects variable of PalyerCfg to AlphaEffects as I plan to implement this kind of effects for Software renderer, too 2011-02-23 17:46:36 +01:00
zicodxx c1e4e9c3d7 Moved all these unsorted global cheat variables to a handy structure; Simplified reading of the cheats without trying to make it complicated so no one finds them (everyone can get the source); Removed one or two cheats which carry more garbage than they are worth; Added replacement for the bittersweet cheat; Made FPS Counter an option of Graphics menu 2011-02-14 22:27:02 +01:00
zicodxx 53c9fa987f Added secondary weapon indicators to new reticle types; Fixed disks being drawn as circles - whoops 2011-02-10 20:53:19 +01:00
zicodxx be7713c1ae Fixed broken FlightSim indicator on Automap; Fixed Assert for using mouse buttons in kconfig (which can react to UP and DOWN states); Added scrolling support for menus flagged tiny_mode and all_text 2011-02-10 14:09:05 +01:00
zicodxx 13faad1855 Added timer_update() to stop/start/reset_time() functions so resumed last_timer_value will be precise; Added new FPS counter which actually does count the frames rendered per second and is less irritating; Added timer_dleay2 call to console to not stress CPU too much; Imporoved placement for show_time(), multi messages 2011-01-22 13:30:12 +01:00
zicodxx 20cf4c5228 Fix for showing bounty target in kill list - was not actually checking if player_num == Bounty_target; When Bounty_target player leaves game host must select a new target so the game can proceed; Made Bounty sound play a bit louder 2011-01-19 12:21:59 +01:00
zicodxx 493f1cff34 Introducing new BOUNTY Multiplayer game mode by Matt -1360- Vandermeulen <matt1360@gmail.com>; Fit show_HUD_names code to be more similar to D2X - names display still client-decided tho 2011-01-19 02:19:15 +01:00
zicodxx 4e5e3fa604 Added Descent2 Multiplayer features: Kill goals, Allowed play time; Bright players, Invulnerable when reappearing 2011-01-14 17:56:14 +01:00
zicodxx 31d17380ec Added different reticle types with RGBA and size settings; Apply RGBA and size to FlightSim Indicator; Added Brightness Slider to Graphics options menu; Added OpenGL usage for gr_disk 2011-01-10 16:12:00 +01:00
zicodxx f0d75e5689 Draw FlightSim Reticle on Automap display, too 2011-01-06 14:56:12 +01:00
zicodxx 6d665fbb10 Introduced FlightSim control scheme for mouse which adds delta values to absolute position to behave like a Joystick; Added Deadzone slider for FlightSim as well as an optional Reticle display to show the positional data on screen; Removed old Mouselook hack in favor of this new feature 2011-01-04 11:43:30 +01:00
zicodxx 8c75bd0957 Added feature to disable D2-style Prox. Bomb Gauge; Moved NoRedundancy and MultiMessages toggles from GameArg to PlayerCfg to be set via Misc Options 2011-01-03 02:01:09 +01:00
zicodxx 4b265301a0 Made GameTime to GameTime64 using fix64; Changed all structures saving GameTime64 for internal timer purposes to store fix64 and added converting functions to save such times in fix; For Savegames/Demos always reset GameTime64 to 0 while saving and putting all timer values to safe limits, Multiplayer objects are sent in similar fashion 2010-12-22 01:17:49 +01:00
zicodxx 2cb3bac259 Cleaned the variables used for newdemo code; Instead of giving both old and new values to special recording functions, added new variables to demo code serving this purpose and also checking for redundant record calls which only would waste bytes; Removed duplicated-object-id-hack which did not work as expected and caused jittering on playback; In that process, found a bug where Num_open_doors might nor be set correctly - cleaned that up a little and got also rid of one aweful goto; Made sure cloaked walls are recorded FPS-independent but rather fade-value-dependent 2010-07-15 05:40:25 +00:00
zicodxx 9933bb81ce Added expandable classes for HUD messages (like D1X but slacked) to better handle Multi messages or redundant messages; Rewrote HUD code completely; Changes -playermessages to -multimessages since this is more appropriate; Removed remnants of -mprofile 2010-07-13 06:35:25 +00:00
zicodxx e4a0c20f76 Introducing gr_bitblt_find_transparent_area to dynamically detect boundaries of sub cancas used for CM_REAR_VIEW; On the way also allowing to create weapon box sub bitmaps from uncompressed cockpit bitmaps 2010-06-18 07:31:06 +00:00
zicodxx 8a3aeb01e8 Fixing regression from rev1038 which broke showing laser level or quadness in cockpit and statusbar 2010-06-17 09:46:45 +00:00
kreatordxx c4f86ebfc8 Call game_flush_inputs for all windows' EVENT_WINDOW_ACTIVATED, so clicking on a pilot doesn't bring up the multiplayer screen for example 2010-02-25 08:00:15 +00:00
zicodxx 19c82e97e3 The little light bulb showing homing warning in Cockpit was broken and I replaced it; Rewritten code to show weapon text in Cockpit and Statusbar slightly; Instead of using hardcoded weapon strings, use from descent.txb and fixed too long spreadfire string properly 2010-02-19 00:24:32 +00:00
zicodxx 51c28cc8a6 Made PlayerCfg.CockpitMode an array to hold two values: 0 to store the actual cockpit, 1 to also store Letterbox, Rear, etc. Greatly helps to switch and restore views - especially in Demo playback which now properly selects modes 2010-01-28 00:04:29 +00:00
zicodxx 8c2a404085 Rewrote code for showing Cloak-effect on Cockpit and Statusbar, because it became bugged with changed order of function calls do_cloaked_stuff() and render_gauges(); Fixed cockpit switches for Guided missile when Player is in Rear-View - the original code never considered that 2010-01-24 17:38:13 +00:00
zicodxx 37b4803493 Squishing string-related bugs in Bomb display and Weapon reordering 2009-12-01 14:50:09 +00:00
zicodxx 127af323e0 Reintroduced Newdemo_game_mode to prevent demo playback from entering code parts it should not and fixing a bug with Multiplayer demos along the way, introduced in rev. 953 2009-11-30 14:59:37 +00:00
zicodxx dbf4d55839 Abstracting networking protocols - Step 4: Implemented new UDP layer with Client/Server communication, Packet Loss Prevention and strict Version checking. Netgames list will follow later. 2009-11-24 09:48:53 +00:00
zicodxx 0fc0fff7f1 Abstracting networking protocols - Step 1: Renaming network-related files; Removing net_ipx.h (former network.h) includes from as much files as possible to make isolation of IPX-related functions easier in Step 2; Version defines Cleanup - needed later for good Version-Checking 2009-03-04 21:04:43 +00:00
zicodxx abf43c66f8 Small positional correction for homing-warning bitmap 2009-02-23 10:21:25 +00:00
zicodxx 80debdb4d5 Made our Cockpit-Transparency decoding function a bit safer for current and possibly new code flow 2009-02-23 10:15:23 +00:00
zicodxx aee0198f2e Using a clean flow for closing game data at the end of main() instead of using atexit; Now only use atexit for SDL stuff, error, mem, console (and editor which we do later); Small Cleanup 2008-11-14 16:56:40 +00:00
zicodxx 15d25cc54a Always keep aspect scaling (lowest scalar of width and height) for fonts, lines, dots, spheres, reticle and non-Cockpit-/Statusbar-related HUD-elements; Moved the Cockpit alpha decoding to gauges.c and created a seperate bitmap for the alpha fields and create subbitmaps from this one - more memory but this way we do not modify the cockpit bitmap itself 2008-11-09 14:31:30 +00:00
zicodxx 92cec5ced3 Removed hack for Cockpit-window transparencies and added function to decode and add alpha to the bitmap directly (now works in non-OGL as well); Using sub-bitmaps for Cockpit-windows and menu backgrounds; Cleaned old bkg stuff from menu GUI 2008-10-28 13:28:10 +00:00
zicodxx 26502298d9 Generally increasing Menu rendering from 20 to 50 FPS; Allowed Fullscreen toggle in Pause menu and correctly releasing mouse; Fixed broken Death sequence timer; Fixed incorrect data offset for UDP player relay; Fixed crash in Multiplayer summary; Reworked player loading a little bit, making sure kconfig controls are all set; Some small Status bar correction; Implemented real Pause/Reume for Jukebox via SDL_mixer 2008-06-04 19:30:43 +00:00
zicodxx 24d1cf52f6 Added structure for values saved in PLR/PLX files; Added most common command-line options to options menu 2008-04-13 00:28:36 +00:00
zicodxx a172315d4a Implemented Console-style game logging system to print graphics, to stdout and gamelog.txt; Added structure to keep values for descent.cfg; Added aspect and Texture Filtering to descent.cfg; Removed mono code - printing important stuff over console; Removed some obsolete or very common defines; Code cleanup and small fixes 2008-04-06 20:23:28 +00:00