Kp
2e2c17669c
Shorten timer_delay
2015-05-09 17:39:01 +00:00
Kp
b1992b5e59
Shorten timer_delay2
2015-05-09 17:39:01 +00:00
Kp
fc4b686d9d
Store PHYSFS_list element count in list when needed
2015-05-09 17:38:57 +00:00
Kp
c3925353fd
Use null_sentinel_iterator for PHYSFS_list_t
2015-04-26 20:15:51 +00:00
Kp
84c638ed64
Move PHYSFS_list_t to separate header
2015-04-19 04:18:49 +00:00
Kp
150e2d2686
Convert local arrays to array<>
2015-04-19 04:18:49 +00:00
Kp
0b20dea0ad
Remove unused jukebox functions
2015-03-28 17:18:02 +00:00
Kp
c645e5b477
Fix gcc-4.7 jukebox build
2015-03-28 01:16:10 +00:00
Kp
b4eaa591c8
Fix crash when all sound channels are in use
...
If digi_mixer_find_channel returns -1, do not use that result to index
channels[].
2015-03-22 22:48:47 +00:00
Kp
2b44a352ca
Remove redundant sc_mode
...
sc_mode is a packed copy of sc_w/sc_h. Switch to an accessor that uses
the copy.
2015-03-22 18:49:21 +00:00
Kp
fca381727c
Add wrappers for screen width/height
2015-03-22 18:49:21 +00:00
Kp
8daa014d53
Remove unused gr_check_mode
2015-03-22 18:49:21 +00:00
Kp
f098471e54
Make sdl_video_flags static
2015-03-22 18:49:21 +00:00
Kp
08c0c3768c
Remove unused gr_set_draw_buffer
2015-03-22 18:49:21 +00:00
Kp
7bf49fe551
Fix clang -Wmissing-braces warnings
2015-03-22 18:49:21 +00:00
derhass
b73407e791
Prevent digi_mixer_start_sound() from trying to play nonexisting sounds.
...
There is a an out-of-bounds access in digi_mixer_start_sound() when
soundnum is < 0. The bounds check I added here is already present in
digi_audio_start_sound().
This bug was triggered on the RPi d2x built when trying to show the
briefing screen because briefing_new_screen() tries to play
SOUND_BRIEFING_HUM, which digi_xlat_sound() translated to -1 in this
situation. The game finally crashed in mixdigi_convert_sound() because
GameSounds[-1] happened to contain some non-zero data (on my Linux desktop,
that memory seems to be always 0 by accident...). This was also the reason
why the pi version tried to allocate lots of memory before it crashed in
memcpy().
2015-03-21 23:45:42 +01:00
Kp
f900d4a5ee
Remove RAIIdmem::operator pointer
...
Mac OS X defines uint_fast32_t to unsigned int, causing ambiguous
overloads between RAIIdmem::operator[](std::size_t) and
RAIIdmem::operator[](int). Adding a disambiguating overload for OS X
breaks Windows. Remove operator pointer and operator[]. Rely on the
inherited operator[] for indexing. Require users to call ->get() to
convert to a simple pointer.
First btb ambiguity reported: https://github.com/dxx-rebirth/dxx-rebirth/pull/34
Second btb ambiguity reported: https://github.com/dxx-rebirth/dxx-rebirth/pull/43
2015-02-17 03:52:59 +00:00
Kp
03576a28c2
Pass PHYSFSX_* file extensions as counted array
2015-02-14 22:48:28 +00:00
Kp
91cc111295
Provide SndDisableSdlMixer=true if !USE_SDLMIXER
...
Accept -nosdlmixer as a no-op in !USE_SDLMIXER builds.
2015-02-08 17:43:29 +00:00
Kp
19eb73c182
Remove casts for SDL events
2015-02-08 17:43:29 +00:00
Kp
44dea8cd49
Remove unused event initialised
2015-02-08 17:43:29 +00:00
Kp
699e5d341d
Merge pull #34 into unification/master
...
Requested by btb: https://github.com/dxx-rebirth/dxx-rebirth/pull/34
2015-02-07 04:43:00 +00:00
Kp
bc761ad6ef
Use unique_ptr for m3u list storage
2015-02-07 04:37:37 +00:00
Bradley Bell
03d68f44c8
use size_t for indexing array
...
fixes ambiguous call to operator[]
2015-02-05 16:45:53 -08:00
Kp
ae0a00a893
Return timer_query() from timer_update()
...
Most timer_update sites immediately query the timer, so return it to
save them the call.
2015-02-05 03:03:48 +00:00
Kp
ffc59c8172
Move timer_update static variables to bss
2015-02-05 03:03:48 +00:00
Kp
ff4a0ccd70
Fix RAIIdmem array usage
...
Some RAIIdmem instances managed a T[], but were declared to manage a T.
2015-01-28 03:42:53 +00:00
Kp
9794cfddc9
Move some local structs into anonymous namespaces
2015-01-24 19:16:34 +00:00
Kp
18a64e4281
Use RAII for PHYSFS_enumerateFiles result
2015-01-23 03:55:05 +00:00
Kp
977f1cfeb2
Use RAII for jukebox list
2015-01-23 03:55:05 +00:00
Kp
9c58fd23f4
Use RAIIdmem for jukebox_songs list_buf
2015-01-23 03:55:05 +00:00
Kp
dd3d284e03
Make jukebox_songs::max_songs static const
2015-01-23 03:55:05 +00:00
Kp
06303f9406
Fix buffer overread parsing blank m3u file
2015-01-23 03:55:05 +00:00
Kp
966f51906c
Use destructor for jukebox_songs
2015-01-23 03:55:05 +00:00
Kp
84e3a03451
Remove unused parameters
2015-01-18 01:58:33 +00:00
Kp
9a3796d9d1
Pass window_get_next arg by &
2015-01-17 18:31:41 +00:00
Kp
e7c632b741
Pass window_is_modal arg by &
2015-01-17 18:31:40 +00:00
Kp
ee50d45e72
Pass window_send_event arg by &
2015-01-17 18:31:40 +00:00
Kp
f2797ddf1e
Pass gr_init_canvas arg by &
2015-01-17 18:31:40 +00:00
Kp
c2b7990550
Pass window_get_canvas arg by &
2015-01-17 18:31:40 +00:00
Kp
c7ae54c62a
Use ntstring for CMLevelMusicPath
2014-12-22 04:35:47 +00:00
Kp
80aa48efb4
Pass digi_*_start_sound soundobj as sound_object*
2014-12-14 05:22:59 +00:00
Kp
657e7da49e
Rework digi dispatch
...
Build function tables at compile time. If !SDLMIXER, compile out the
pointer indirections. If SDLMIXER && PIE, keep function pointers in
read-only memory.
2014-12-13 17:47:16 +00:00
Kp
1a204f61d8
Use range_for for SoundSlots
2014-12-11 02:36:01 +00:00
Kp
7b234da185
Make digi_max_channels const
2014-12-11 02:35:55 +00:00
Kp
307ad30433
Remove unused digi_*_is_sound_playing
2014-12-11 02:34:54 +00:00
Kp
53366488ac
Remove unused digi_set_volume
2014-12-11 02:34:38 +00:00
Kp
6d2b707c3e
Move debug-only digi functions into !RELEASE
2014-12-11 02:34:32 +00:00
Bradley Bell
5d6e6dc2e4
check for GM_MULTI before trying to do network jobs
2014-12-06 22:14:22 -08:00
Bradley Bell
3daa0f63b1
Add search SDL_mixer framework paths for headers instead of using <Framework/Header.h> notation
2014-12-03 15:14:18 -08:00