projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20020424-2-src
[rocksndiamonds.git]
/
src
/
libgame
/
system.c
diff --git
a/src/libgame/system.c
b/src/libgame/system.c
index fd0815b38d81d4cf6998f68605b8728fc2465a3e..916d92f10f4b19f424de7d3f4c229dc9063701da 100644
(file)
--- a/
src/libgame/system.c
+++ b/
src/libgame/system.c
@@
-357,6
+357,16
@@
inline boolean DrawingDeactivated(int x, int y, int width, int height)
if ((gfx.draw_deactivation_mask & REDRAW_FIELD) &&
x < gfx.sx + gfx.sxsize)
return TRUE;
if ((gfx.draw_deactivation_mask & REDRAW_FIELD) &&
x < gfx.sx + gfx.sxsize)
return TRUE;
+ else if ((gfx.draw_deactivation_mask & REDRAW_DOORS) &&
+ x > gfx.dx)
+ {
+ if ((gfx.draw_deactivation_mask & REDRAW_DOOR_1) &&
+ y < gfx.dy + gfx.dysize)
+ return TRUE;
+ else if ((gfx.draw_deactivation_mask & REDRAW_DOOR_2) &&
+ y > gfx.vy)
+ return TRUE;
+ }
}
return FALSE;
}
return FALSE;
@@
-659,7
+669,8
@@
Bitmap *LoadImage(char *filename)
new_bitmap = X11LoadImage(filename);
#endif
new_bitmap = X11LoadImage(filename);
#endif
- new_bitmap->source_filename = getStringCopy(filename);
+ if (new_bitmap)
+ new_bitmap->source_filename = getStringCopy(filename);
return new_bitmap;
}
return new_bitmap;
}
@@
-727,17
+738,17
@@
inline void OpenAudio(void)
audio.sound_available = FALSE;
audio.music_available = FALSE;
audio.loops_available = FALSE;
audio.sound_available = FALSE;
audio.music_available = FALSE;
audio.loops_available = FALSE;
- audio.mods_available = FALSE;
+
audio.sound_enabled = FALSE;
audio.sound_enabled = FALSE;
+ audio.sound_deactivated = FALSE;
audio.soundserver_pipe[0] = audio.soundserver_pipe[1] = 0;
audio.soundserver_pipe[0] = audio.soundserver_pipe[1] = 0;
- audio.soundserver_pid =
0
;
+ audio.soundserver_pid =
-1
;
audio.device_name = NULL;
audio.device_fd = 0;
audio.channels = 0;
audio.music_channel = 0;
audio.device_name = NULL;
audio.device_fd = 0;
audio.channels = 0;
audio.music_channel = 0;
- audio.music_nr = 0;
#if defined(TARGET_SDL)
SDLOpenAudio();
#if defined(TARGET_SDL)
SDLOpenAudio();
@@
-769,6
+780,13
@@
inline void SetAudioMode(boolean enabled)
audio.sound_enabled = enabled;
}
audio.sound_enabled = enabled;
}
+inline void SetAudioReloadFunctions(void (*func_reload_sounds)(void),
+ void (*func_reload_music)(void))
+{
+ audio.func_reload_sounds = func_reload_sounds;
+ audio.func_reload_music = func_reload_music;
+}
+
/* ========================================================================= */
/* event functions */
/* ========================================================================= */
/* event functions */