Commit graph

148 commits

Author SHA1 Message Date
zicodxx 2f95d5933f Fixing issue introduced in rev1139: Game could of course not open music files which are not inside Searchpath or added to it - re-added playing over absolute path 2010-07-05 07:41:30 +00:00
zicodxx f2b31713b7 For playing music over SDL_mixer always use handle over PhysFS to save the path building mess; When building Jukebox path, only try to build full path if given path is actually a child of Searchpath 2010-06-27 14:30:12 +00:00
zicodxx 509e5be5a7 Added function to list valid resolutions and build resolutions menu dynamically with the resulting list 2010-06-24 09:29:11 +00:00
zicodxx 5cff370262 Fixing digi_win32_ functions I broke yesterday. THANKS ZIF\! 2010-06-15 18:27:10 +00:00
zicodxx 4678e1e815 Process -nomusic argument again 2010-06-14 17:55:25 +00:00
zicodxx 63966cab5c rev1112 contd: Killed juggling around with adding Jukebox paths - must always be removed correctly if Jukebox loading fails 2010-06-14 15:32:55 +00:00
zicodxx 36e20a419a Use strrchr instead of strchr for music filename extension in case there are dots in the filename 2010-06-14 10:43:30 +00:00
zicodxx 196a149c71 Small fix and improvement for Jukebox path detection 2010-06-14 10:33:36 +00:00
zicodxx f09a336184 Increased SDL_mixer music abilities to play non-hmp from HOGs, having Level-music path to play, options to specify non-level tracks and added various playing order methods; Abstracted SDL_mixer- and Redbook-interfaces; Simplified program flow through all music functions 2010-06-14 08:13:16 +00:00
kreatordxx 020a51fe09 Comment out redundant calls to event_poll, fixing rapid bomb dropping bug (and probably others) 2010-05-03 10:47:10 +00:00
kreatordxx 53fc092ebf Actually play endgame music when game is finished, play briefing music instead of hum if appropriate 2010-04-05 11:54:23 +00:00
kreatordxx 90e3796f97 Make menus for hosting a netgame stack, make quitting work with newmenu_do2 and simpler 2010-04-04 09:41:53 +00:00
kreatordxx 76b0fb35ef 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 3ba90f69e0 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 d749889c89 Add a default event handler for screenshots, entering debugger, Redbook repeating etc 2010-04-02 05:01:08 +00:00
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
kreatordxx e5496b9653 Change audio buffer size back to 1024 for Mac only - fixing crackly music 2010-03-09 03:08:00 +00:00
zicodxx e6d1b5c668 Changed default Audio-buffer size to 2048 bytes. Should prevent crackly playback on some systems 2010-03-03 21:27:48 +00:00
kreatordxx 1dbd60254c No more crashing if an invalid Jukebox path is entered - default to MIDI 2010-02-27 13:05:34 +00:00
kreatordxx 67c05798d3 Move call to callback outside of loop in key_handler, now deleting a second demo using CTRL-D actually works 2010-02-25 04:27:15 +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 970fd8c2d2 Don't send an EVENT_WINDOW_DEACTIVATED when closing a window if it wasn't the front window, now the game works properly after you're shown on the high scores 2010-02-08 06:08:55 +00:00
kreatordxx fa7ab97783 Send EVENT_WINDOW_DEACTIVATE before EVENT_WINDOW_ACTIVATE, ensuring cursor remains shown when appropriate 2010-02-05 14:05:57 +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 21d8d86d5b Send EVENT_KEY_COMMAND from key.c; add EVENT_NEWMENU_DRAW for state restore; place newmenu and listbox calls to callback so they can override ALL newmenu behaviour 2010-01-30 03:24:19 +00:00
zicodxx 2bcf54b77a Added real Doublebuffering to SDL-build; While on the way, making Bpp selection available for SDL-build, too 2010-01-29 21:53:17 +00:00
kreatordxx 9d4e69c7a9 Make response to EVENT_WINDOW_CLOSE conform to 'handling' system - returning 1 means abort closing 2010-01-28 03:27:49 +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 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
zicodxx fb08673f54 Removed timer_get_approx_seconds() and replaced with timer_get_fixed seconds since it was too inaccurate and created significant offset 2009-11-24 22:43:41 +00:00
kreatordxx 96d305e54c Only list resolutions that can actually be used, using new gr_check_mode 2009-11-17 14:27:39 +00:00
kreatordxx d7e33667bf Make the game screen into a \'window\', handling events through event_process 2009-08-10 10:47:17 +00:00
kreatordxx ab40bd7566 Add include directives for last commit (whoops) 2009-05-22 10:53:14 +00:00
kreatordxx 45ba0ca307 Add new window system, not used yet 2009-05-21 12:16:39 +00:00
kreatordxx db27b1723d Remove redundant conf.h directives 2009-04-30 13:01:31 +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
zicodxx e6c160ca85 Made MouseFilter selectable over Controls menu while defaulting to OFF - Saved in PLX 2009-01-17 11:02:59 +00:00
zicodxx c37285c217 Fixed typo in mouse delta reading cleaning not up Z-Axis; Giving automap a nicer Frameloop; Small cleanup 2009-01-15 20:55:35 +00:00
kiplingw 70fd9452f1 Added: Better support for non-free compiler... (patch from Damjan Cvetko <zobo@lana.krneki.org>) 2009-01-14 19:54:45 +00:00
kreatordxx 81de582264 Use a 2D array to allow playing of songs by track number in future 2009-01-13 12:39:03 +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 be02298290 Added other SDL_(Un)LockAudio statements to protect the audio_mixcallback function - making that hopefully stable on multicores; Resetting warn_func at quit_request so we do not accidently show any menu; Open gamelog.txt unbuffered 2008-11-15 20:49:54 +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 804ac4c683 Only read UNICODE values from 31 to 254 to make sure we do not read any non-printable characters and prefer the keysym that way; Added left and right Command Key for MAC Keyboards 2008-11-07 11:09:29 +00:00
zicodxx b2213b6f2e Make sure that if we use UNICODE, we always take non-control type chars and - as we only want lowercase letters - convert chars if shift is pressed 2008-11-01 02:49:29 +00:00