Commit graph

97 commits

Author SHA1 Message Date
kreatordxx 3f90a9cb41 Make response to EVENT_WINDOW_CLOSE conform to 'handling' system - returning 1 means abort closing 2010-01-28 03:27:49 +00:00
zicodxx 3d9791ca69 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
kreatordxx 3a116769be Remove all uses of LeaveGame jmpbuf to allow more changing of main loop 2010-01-27 04:30:31 +00:00
kreatordxx 62a9214bc3 Fix major issues with last commit - tidy up window callbacks to dodge EVENT_WINDOW_ACTIVATED where it's unnecessary or erroneous to respond to, fix compiling error 2010-01-20 11:04:09 +00:00
kreatordxx c50b954c00 Add EVENT_WINDOW_ACTIVATED, change EVENT_DRAW to EVENT_WINDOW_DRAW and EVENT_CLOSE to EVENT_WINDOW_CLOSE 2010-01-20 05:10:32 +00:00
kreatordxx c6cbb6b9f8 Make pause box a window 2010-01-09 09:19:26 +00:00
kreatordxx b6452e75b7 Change newmenu and listbox callback systems, adding use of d_event, for greater flexibility 2010-01-07 14:49:07 +00:00
kreatordxx b835361586 Make newmenus into windows, allowing redrawing of automap and game to take place outside of newmenu.c; remove redundant keyd_repeat 2009-12-26 01:08:57 +00:00
kreatordxx dcc375c5dd Make sure the Game_wind only gets freed once when escaping demo playback 2009-12-14 13:27:05 +00:00
kreatordxx 55f2419a09 Make sure the Game_wind always gets freed when exiting the game screen, fixing flashing automap and framerate reduction after playing demos 2009-12-12 11:34:32 +00:00
kreatordxx 8f9d869452 Make the automap into a 'window', make kconfig.c more similar between D1X and D2X 2009-12-02 13:49:54 +00:00
zicodxx 01972042d6 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 febe5d124d 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
kreatordxx ceb4ff38fc Make the game screen into a \'window\', handling events through event_process 2009-08-10 10:47:17 +00:00
kreatordxx dd8f679724 Make game.c more similar between D1X and D2X, making related changes to other files (\!) 2009-07-01 11:35:33 +00:00
kreatordxx bf512bb9ec Remove redundant conf.h directives 2009-04-30 13:01:31 +00:00
zicodxx b3bf4813df Abstracting networking protocols - Step 2: Introducing new structure to hold protocol-dependend and -independend information about Netgame and it's Players; Further isolation of the IPX code and renaming the netdrv_* code to ipxdrv_* as this is now actually IPX-only; Next up: Renaming network_* functions to net_ipx_*, writing wrappers for protocol dependend functions in multi.c, Implementing protocol selection and Cleanup 2009-03-20 12:10:38 +00:00
zicodxx 8da36f8873 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
kreatordxx b537639fac Associate the jukebox with Redbook Audio via new 'extmusic' layer - separating from MIDI and making it handle ALL music (not just game music) 2009-03-03 12:55:27 +00:00
zicodxx 8e7fe53610 Defined some default cockpit modes in Demo mode so we do not get invalid values when demo starts in non-default-view mode (as new HUD modes are only triggered at beginning and end of event); Removed Newdemo_flying_guided global; Init seismic disturbances in demo mode just to make sure tey are switched off when coming from game mode; Made initialisation for Missile_viewer signature saving global so we can reset it for each new level and make sure we get a correct missile view; Fixed regression in Ai_last_missile_camera 2009-02-02 08:49:58 +00:00
zicodxx 7b48d47be4 Removed some old code to smooth FrameTime we don't need anymore 2009-01-24 22:44:57 +00:00
zicodxx 4bf841f3c9 Seperated help screens for game, netgame and demo; Also show them in Controls menu; Small Menu UI fix for ScrollOffset when calling menus in a scrolled area of a menu 2008-12-13 12:58:57 +00:00
kreatordxx 777f76aedf Get Mac command keys working, MACINTOSH code cleanup, update Xcode project 2008-12-07 12:26:43 +00:00
zicodxx 1de53497b2 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 51c322d3aa Cleanup: Renderstats; Made PRShot a non-OpenGL-related feature and added to Misc Options; Added command for SDL_ASYNCBLIT to command-line args 2008-10-28 17:04:35 +00:00
zicodxx 820961c99a 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 6dc900f51d Giving credits function ability to use custom creditfile (again); Made laser-offset for laser exclusive so Prox mines won't go tru doors; Preventing cycling tru cockpit modes while dead, but allowing to load a state; Implemented D2X' lighting code to D1X (faster, better, sexier - weeee); Try to hop over some errors regarding walls/doors in levels instead of using -1 indexes for arrays; Made the briefing text ptr a bit more failsafe in case the file is corrupt/non-standard; Made scores use the menu screen even in GAME OVER; Fixed bug in neighbour fields of Weapon Keys table; Added the Weapon Keys stuff to TABLE_CREATION; Fixed bug where D2X did not recall applied resolution in the resolutions menu; Simpler check to create DEMO_DIR; Seperated X/Y sensitivity for mouse and joystick; Flush controls when Automap toggles so keypress won't deactivate it again; Made FrameCount in Demos aligned to the Dropframe condition; Added KEy to ttoggle playback text off; Gracefully exit demo code if demo is corrupt; Removed that new percent counter because many old demos seem to have corrupted last frames; Closing endlevel data file if IFF error so the mission still can be freed; Fixed Cruising for keyboard which was not aligned to FPS correctly; Used mouse delta scaling in kconfig.c instead of mouse.c to not screw up when delta is requested in non-ingame situations - it actually belongs to the controls IMHO; Now support up to 8 joysticks; Changed some leftover malloc's to d_malloc and free to d_free 2008-10-16 17:27:02 +00:00
zicodxx 8637e3ff01 Update object segment after object position interpolation. This is always done in DEBUG, but not in RELEASE, where further movement would break at segment check 2008-10-01 11:53:27 +00:00
zicodxx 43348dfa12 Added new function to calculate common timesteps; Increased MAXIMUM_FPS to 200 for release and 1000 for debug; Used fixed sim_time for do_physics_sim and Interpolating to ensure collisions stay accurate at high FPS; New code and faster code for dot products by The_Lion; Disabled Nice-FPS and common Frame-Loop if VSync is active; More accurate delta timer for mouse (consider overhead); Added SDL_(Un)LockAudio for old SDL Audio interface; General support for up to 16 mouse buttons; Code cleanup; Made some AI movement and Player shaking FPS-independent 2008-09-30 00:18:39 +00:00
zicodxx f108f30ffd Added new function to calculate common timesteps; Increased MAXIMUM_FPS to 200 for release and 1000 for debug; Used fixed sim_time for do_physics_sim and Interpolating to ensure collisions stay accurate at high FPS; New code and faster code for dot products by The_Lion; Disabled Nice-FPS and common Frame-Loop if VSync is active; More accurate delta timer for mouse (consider overhead); Added SDL_(Un)LockAudio for old SDL Audio interface; General support for up to 16 mouse buttons; Code cleanup; Made some AI movement and Player shaking FPS-independent 2008-09-30 00:07:07 +00:00
kreatordxx 558b2399a3 tidy up music keys, ALT-SHIFT-F9 ejects audio CDs 2008-06-15 08:50:05 +00:00
zicodxx c61b18b576 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 3d1e2ed850 Using Windows code to play HMP files on Windows build; Fixed Jukebox keys in help screen; Allow -noredundancy in Singleplayer; Fixed processing of Console keys if Console is not active; Added Multiplayer hints to README; Made INI wrapping safer and more accurate 2008-06-01 12:53:03 +00:00
zicodxx 6f5d6fd2e2 Reworked keys for song changing a bit; Added Song control keys to help menu 2008-05-18 13:20:06 +00:00
zicodxx d457f9430d Reworked timer_delay2() and calc_frame_time() to be more accurate and CPU-friendly; -nicefps replayced by -nonicefps to disable sleeping for calc_frame_time; Implemented VSync via SDL; Fixed compilation issues; Code cleanup 2008-04-21 18:39:49 +00:00
zicodxx 3a52d03d21 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 44bbb66101 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
zicodxx d2365d65f0 Simplification of palette code; Properly screen clearing in SDL-only build when palette changes; Removed obsolete functions like gr_update (replaced by gr_flip), gr_palette_fade_in/out, gr_palette_clear; Added functionality to render Automap while menu display as well; Improved blocking of some controls code while Automap active; Fixed some compiler warnings 2008-03-20 23:23:46 +00:00
zicodxx 6479a897b2 Fixed some memory issues; Fixed some HUD element alignment; Only send NetDrv packets if NetDrvInstalled is true; Fixed demo glitches; Actually using Game_mode in demos to make Newdemo_game_mode hacking obsolete 2008-03-08 22:37:09 +00:00
zicodxx f3d8d50a94 Reworked fonts routines - makes easier to expand and scale correctly; Reworked menus with better border scaling, improved rendering and cleanups; Improved font priniting ingame, better alignment; Reworked Netgame list; Real Doublebuffering in SDL-mode; Removed old and unused sources 2008-02-24 14:41:27 +00:00
zicodxx df7a1ca071 Introduced timer_delay2 as replacement for timer_delay to sleep according to given FPS rate considering calc time between frames 2007-11-21 12:46:09 +00:00
zicodxx a5e460e66e Correctly saving Reverse Stereo setting; Added Demo playback help keys; aligned Demo recording to 20 frames per second to save lots of hard drive space 2007-11-06 20:33:22 +00:00
zicodxx 453cf2d609 Fixed problems with GameTime wraparound - delay sounds, cloak, invulnerability, ping; Added debug key to Reset GameTime for testing; Removed -gl_vidmem; Cheat-code cleanup; Some HUD message redundancy 2007-10-28 20:14:25 +00:00
zicodxx 567af2ae9a Reworked Pause-screen 2007-10-14 16:25:55 +00:00
zicodxx 81760cfc9e Increased Rear_view_leave_time to 0x4000 2007-10-12 14:25:58 +00:00
zicodxx 13631bd2c6 Improvements for Cockpit mode save; Fixed -pilot switch 2007-10-08 10:40:21 +00:00
zicodxx facee57d1f Not rendering additional transparency cockpit display anymore to ensure compability with custom cockpits; Improved overlay functions for cockpit elements 2007-10-05 23:47:16 +00:00
md2211 a0b4cac982 * Removed executable flag on most files
* Reverted value of SOUND_MAX_VOLUME
2007-09-21 19:06:05 +00:00
zicodxx 7ab0e53e2d Code Re-formatting; Preventing Redundancy in Restricted-game joining; Dumping refused player back to Join-menu; Expanded Game-help screen 2007-09-13 10:05:36 +00:00
zicodxx 2960bd519c Moved 'if' for HiresGFX to apply after gr_set_mode call; Fixed problems with HiresGFX=0 in Pilot selection and Briefings; Fixed define for CREDITS_FILE so cfexist checks for txb-, not tex-file 2007-09-01 14:02:49 +00:00