Commit graph

177 commits

Author SHA1 Message Date
Chris Taylor 3ef5dff1a6 Add CON_DEBUG level con_printf's for basic events (not EVENT_IDLE or EVENT_DRAW though) 2010-12-05 21:51:34 +08:00
zicodxx acac225493 Large improvement for _WIN32 native MIDI code by TURRICAN0: supprt for HMP track loop, seamless song looping, GS reset, pausing/resuming midi, volume control for each MIDI channel; Set GameArg.SndDisableSdlMixer automatically if compiled without SDL_mixer support; On _WIN32 play HMP natively again 2010-11-28 16:49:40 +01:00
Chris Taylor 4fa20a3d9f Add support for OS native error/warning boxes, only implemented for Mac for now 2010-11-28 20:08:29 +08:00
Chris Taylor dc85211d37 Make sure read_m3u won't read past the end of the buffer, causing a crash 2010-11-22 20:49:44 +08:00
zicodxx 1482048152 Created function PHYSFSX_isNewPath to check wether given path has already been added to Searchpath or not; Used PHYSFSX_isNewPath for menu browsing code instead it's own implementation; Using PHYSFSX_isNewPath for Jukebox directory, too to make sure Jukebox will not accidentially remove Game content depending on user selection; Also only keep Jukebox directory added until files are stored to prevent any other file present in this path can override or add anything to the game 2010-11-21 12:55:35 +01:00
Chris Taylor 53eef82836 Make sure read_m3u won't read past the end of the buffer, causing a crash 2010-11-13 13:11:25 +08:00
zicodxx ae22f8e037 Instead of writing converted MIDI to file, write to buffer so it can be played directly 2010-10-29 17:40:42 +02:00
Chris Taylor e57ffac570 Fix errors for Mac OS 9, Mac OS X 'd2x' target builds again 2010-10-16 18:57:50 +08:00
zicodxx 283172aff6 Added format arguments to all printf, sprintf and snprintf calls missing them to prevent warnings/errors with some distributions of gcc 2010-10-14 16:46:20 +02:00
Chris Taylor 846699a2e6 Fix errors for Mac OS 9, Mac OS X 'd2x' target builds again 2010-10-10 18:48:24 +08:00
kreatordxx ba7d0513c3 Add support for M3U playlists, tweak 'Jukebox playing' message so it shows the end of the path when truncating 2010-09-26 13:15:20 +00:00
zicodxx 5923bce64d When opening music file via filehandle, made sure buffer is freed after playing to prevent major memory leakage 2010-09-02 14:00:26 +00:00
kreatordxx 466f51e8f5 On Mac OS X - no longer have to copy SDL_mixer.h to SDL framework; frameworks can now be in /Library/Frameworks; fix for obscure compile error involving u_int32_t 2010-09-02 00:07:37 +00:00
kreatordxx 55871bba3e Add path browsing feature to make song file/directory selection easier 2010-08-27 14:09:19 +00:00
kreatordxx 39fd679cb9 Use more reliable Mix_LoadMUS for music in directory searchpaths, so WAVE's and MP3's are correctly loaded (probably others) 2010-08-22 13:27:47 +00:00
zicodxx 6c61d30ffa Added res-file to be linked in Windows build to show icon in Filemanager; converted icon file to be smaller 2010-08-21 17:08:53 +00:00
zicodxx 9a42f9ca8b Bind WM-Icon to application 2010-08-21 06:51:13 +00:00
zicodxx 47255f4e31 For each Music playback system defining own volume scaling definition which was wrong for SDL_mixer 2010-08-19 15:54:19 +00:00
kreatordxx afb0c08a1e Between event sending, exit event_process if front window is different, fixing netgame joining problem introduced with commit on 20100731 2010-08-06 06:49:45 +00:00
zicodxx e8c22880b9 If mouse_toggle_cursor is set to activate, do not toggle ursor visibility as mouse_update_cursor_and_grab might decide it should be hidden 2010-08-01 17:46:13 +00:00
zicodxx fd32ea98c4 Builtin music list now dynamically allocated and not limited to 30 songs; Instead of never loading new level when loading savestate ingame, only do this for Redbook and Custom Music playing order 'continously'; if no endlevel song is specified in Custom Music continue with level music 2010-08-01 17:42:38 +00:00
zicodxx c50081f72c Added event_flush to take place in game_flush_inputs which will clean SDL events which may be buffered while event_process was suspended; suspend Game_Wind while loading restoring save state while playing a level to properly flush controls and reset timer; when toggeling cursor, also directly modify the mouse to wanted behaviour instead of waiting for mouse_update_cursor_and_grab 2010-07-30 17:59:21 +00:00
zicodxx 100cbe51cb One more take on Mouse cursor friendliness: Merged mouse_toggle_cursor and mouse_toggle_grab; instead of trying to use SDL_GetAppState (which does not work as expected on Windows) to release mouse, use strict calls of mouse_toggle_cursor so we at least have a free mouse outside of Game_wind and Automap; decreased time to automatically hide cursor; added mouse_close to release mouse in case of emergency 2010-07-28 17:27:35 +00:00
zicodxx 9f5860a54a Moved digi_set_digi_volume call from config loading to designated audio subsystem init function so it will be correctly set after the sound system is auctionlly initialized 2010-07-27 20:42:54 +00:00
zicodxx 0e0b04c138 Fixing automatic mouse release function - still this does not seem to work in every case 2010-07-27 19:42:28 +00:00
zicodxx 3a67eed1a8 Overhauling showing/grabbing cursor and also taking care of case if program looses focus; store old_delta_x/y in mouse info structure 2010-07-26 18:10:21 +00:00
kreatordxx 88373bd89d Exit SDL_PollEvent early if window changes, to avoid menu problems when pressing keys fast; fix 'condition is always false' warning 2010-07-25 00:49:33 +00:00
zicodxx 27c1d4733a Merged all HMP-related code into hmp.c/h; Also introduced new HMP to MIDI conversion functions based on JJFFE which use former Win32-related HMP-code - fixes some bugs in MIDI conversion and cleaner 2010-07-18 20:28:15 +00:00
zicodxx c25dfdc7e7 For normal digital audio (11/22Khz) use buffer of 1024 for all platforms to prevent delay 2010-07-17 13:07:23 +00:00
zicodxx f2df60a12d Only use one single call of timer_get_fixed_seconds() for whole SDL event loop; Abstracted grabbing mouse and mouse cursor toogle to mouse functions instead of calling SDL functions inside of non-arch code; Automatically hide mouse cursor if it's not used for more than 3 seconds; Reworked placement of mouse grabbing toggle; Do not read any mouse input if -nomouse is given 2010-07-16 11:07:42 +00:00
zicodxx 0ce37b89bb 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 e5130c21b5 Also send event KEY_COMMAND if there's somethig in our Unicode buffer since not every Unicode key corresponds to a keysym on every layout 2010-07-08 10:55:20 +00:00
zicodxx d4eddd177f 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 bdcf86679b 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 5a8ff256ae Added function to list valid resolutions and build resolutions menu dynamically with the resulting list 2010-06-24 09:29:11 +00:00
zicodxx a01ae0f445 Fixing digi_win32_ functions I broke yesterday. THANKS ZIF\! 2010-06-15 18:27:10 +00:00
zicodxx 9877d658f3 Process -nomusic argument again 2010-06-14 17:55:25 +00:00
zicodxx 95e699130c 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 3a839c5b31 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 b39c297762 Small fix and improvement for Jukebox path detection 2010-06-14 10:33:36 +00:00
zicodxx cc12616895 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 f1fb7c4ac0 Comment out redundant calls to event_poll, fixing rapid bomb dropping bug (and probably others) 2010-05-03 10:47:10 +00:00
kreatordxx 66bad6378f 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 046ef88c77 Make menus for hosting a netgame stack, make quitting work with newmenu_do2 and simpler 2010-04-04 09:41:53 +00:00
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 037bbd8786 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 9e6815c51b 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 866fe8e387 Change audio buffer size back to 1024 for Mac only - fixing crackly music 2010-03-09 03:08:00 +00:00