Commit graph

113 commits

Author SHA1 Message Date
kreatordxx 493b07e3da Get rid of a heap of uses of Function_mode, quit properly (freeing all windows and asking for confirmation for game) when clicking close box 2010-04-04 01:31:48 +00:00
kreatordxx 0c8c99fd13 Make newmenu_do3 and newmenu_dotiny return as soon as the newmenu is created, which will allow the main menu (and others) to persist 2010-04-03 07:24:50 +00:00
kreatordxx dae5968170 Add a default event handler for screenshots, entering debugger, Redbook repeating etc 2010-04-02 05:01:08 +00:00
kreatordxx 00450cfc32 Make game respond to EVENT_KEY_COMMAND for key commands, allowing default key handler (later) 2010-03-31 09:18:28 +00:00
kreatordxx e57602f117 Finally fix bug where if you start a single player game then a multiplayer game, time is stopped. Always start time if it's stopped and the game window is activated 2010-03-27 04:30:59 +00:00
kreatordxx 3ed3dd8adf Fix bug - make sure time isn't stopped for multiplayer when aborting, so starting a second game doesn't result in a frozen game 2010-03-20 13:53:08 +00:00
kreatordxx 7b478e9853 Make all listboxes fall back to main event loop for flexibility 2010-03-18 07:02:38 +00:00
kreatordxx 1f479a756c 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
kreatordxx d1254c8222 Put fast save back, using Alt-F1 instead of F6 2010-02-25 03:08:10 +00:00
zicodxx 7e83a3532e Add to help how to send a message to a specific player in Multiplayer; Removed NoBombs command as this is covered by the weapons selection in Multiplayer game creation 2010-02-23 15:22:28 +00:00
kreatordxx afa0d75fb6 Create the main event loop and use it for the game and main menu 2010-02-07 04:34:21 +00:00
kreatordxx 9d7bce257c Put the full_palette_save and palette_restore calls in the game handler for tidiness; remove leftover redundant digi_resume_digi_sounds calls 2010-02-05 02:31:36 +00:00
kreatordxx 98d5b76928 Put LeaveGame longjmp back, but in response to new EVENT_WINDOW_CLOSED, fixing demo issues; fix compiler error in last commit 2010-02-02 07:52:03 +00:00
kreatordxx eb92f445ca Add EVENT_WINDOW_DEACTIVATED; move many game_flush_inputs, start_time and stop_time calls to game_handler as well as digi_pause_digi_sounds and digi_resume_digi_sounds 2010-02-02 03:38:29 +00:00
kreatordxx ff04fd682e Fix crashing when doing menus in multiplayer, don't let player move when in automap 2010-01-31 07:45:26 +00:00
kreatordxx f83741d89f For multiplayer, close menus from game_handler by doing frame processing in response to EVENT_WINDOW_DRAW, replacing multi_menu_poll system with single multi_menu_check call 2010-01-29 03:36:44 +00:00
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