Commit graph

28 commits

Author SHA1 Message Date
kreatordxx 1ff3f56c1c Add EVENT_MOUSE_BUTTON_DOWN and EVENT_MOUSE_BUTTON_UP, use for all windows except game and editor. Fixes crash on iMac G5 when pressing keys to progress through briefing 2010-03-24 07:26:52 +00:00
kreatordxx 05cc0f32af Make fullscreen movies into windows, maintain performance of robot briefing movies with necessary move of gr_flip 2010-03-17 09:44:19 +00:00
zicodxx 29f475c345 Cleaning up Joystick code and on the way supporting more axes and buttons; Also fixed bug with channel_mask byte causing trouble using some axes ingame; Added argument to set environment variable which disables sticky keys (for SDL >= 1.2.14) 2010-02-14 18:48:02 +00:00
kreatordxx 999a1b2949 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 9fd714a083 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 88d1b32914 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 b3b87fc62d Make pause box a window 2010-01-09 09:19:26 +00:00
kreatordxx b97e08dfdc Add EVENT_NEWMENU_SELECTED, allowing a newmenu/listbox selection to be handled in the callback. Demonstrate with "Select Song" menu 2010-01-08 01:55:12 +00:00
kreatordxx 6b4d952ebc Change newmenu and listbox callback systems, adding use of d_event, for greater flexibility 2010-01-07 14:49:07 +00:00
kreatordxx d450c3e6f4 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 7ebcf32e45 Make the automap into a 'window', make kconfig.c more similar between D1X and D2X 2009-12-02 13:49:54 +00:00
kreatordxx 45ba0ca307 Add new window system, not used yet 2009-05-21 12:16:39 +00:00
kreatordxx f149ace782 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
kreatordxx f257e48ddc Get Mac command keys working, MACINTOSH code cleanup, update Xcode project 2008-12-07 12:26:43 +00:00
zicodxx 076e466009 Yet another UNICODE overhaul - Using seperate buffer for UNICODE chars and only use it in key_ascii() while still using keysyms for the rest of the program so we do not screw up readings by key values altered by modifers - possibly still room to optimize 2008-11-17 23:38:43 +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 ab0524f95b Always use printable UNICODE characters for the key_handler and included routine to assign key symbols to UNICODE so we get an equivalent of a Key-Released state which we need for the Keyboard buffer; Removed the shifted_ascii_value field from key_props and stored all usable characters in seperate rows; Improves Text input and makes keyboard mapping independent from keyboard layout without breaking any compability 2008-10-31 16:57:36 +00:00
zicodxx 03e026756e 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 63d2c4a2cf 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
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 519e3dacb2 Some code improvements and small fixes 2008-05-08 18:29:52 +00:00
zicodxx 91e2934ca1 Return unicode characters in key_to_ascii for non-EN keyboard layouts; Fixed sound menu issue if not compiled with SDL_mixer; switched -ip_norelay to -ip_relay since it's not tested enough; Renamed jukebox_free() to jukebox_unload() to stay with naming-convention 2008-05-07 14:02:01 +00:00
zicodxx 039b8b551e Extended Jukebox capabilities for looping and continous playing and added jukebox_free() which allows calling jukebox_load() being able to load a new directory; Added Jukebox options to sound options menu; Removed loop hack for Windows MIDI playback; SDL_mixer implementation can now be used for Windows build as well 2008-05-01 21:40:34 +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
kreatordxx 6aa3819282 detect the number of songs actually available if no descent.sng file (max 22) 2008-03-23 08:42:24 +00:00
zicodxx 8eb5c965d2 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 fe98538b2b Cleanung up arch/ a little bit; Added mouse delta time interval for more more accurate reading at high FPS 2008-01-29 14:49:54 +00:00