projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20021123-1-src
[rocksndiamonds.git]
/
src
/
libgame
/
system.c
diff --git
a/src/libgame/system.c
b/src/libgame/system.c
index 0499199253932189b2aea2da1fcf49f3e651c1bf..3603dbe83c86563741766c702e1dab37bfc0124a 100644
(file)
--- a/
src/libgame/system.c
+++ b/
src/libgame/system.c
@@
-1,7
+1,7
@@
/***********************************************************
* Artsoft Retro-Game Library *
*----------------------------------------------------------*
/***********************************************************
* Artsoft Retro-Game Library *
*----------------------------------------------------------*
-* (c) 1994-200
1
Artsoft Entertainment *
+* (c) 1994-200
2
Artsoft Entertainment *
* Holger Schemel *
* Detmolder Strasse 189 *
* 33604 Bielefeld *
* Holger Schemel *
* Detmolder Strasse 189 *
* 33604 Bielefeld *
@@
-94,6
+94,9
@@
void InitPlatformDependantStuff(void)
#if !defined(PLATFORM_UNIX)
program.userdata_directory = "userdata";
#if !defined(PLATFORM_UNIX)
program.userdata_directory = "userdata";
+#endif
+
+#if defined(PLATFORM_MSDOS)
initErrorFile();
#endif
initErrorFile();
#endif
@@
-105,7
+108,7
@@
void InitPlatformDependantStuff(void)
void ClosePlatformDependantStuff(void)
{
void ClosePlatformDependantStuff(void)
{
-#if
!defined(PLATFORM_UNIX
)
+#if
defined(PLATFORM_MSDOS
)
dumpErrorFile();
#endif
}
dumpErrorFile();
#endif
}
@@
-718,7
+721,8
@@
void ReloadCustomImage(Bitmap *bitmap, char *basename)
if (bitmap->width != new_bitmap->width ||
bitmap->height != new_bitmap->height)
{
if (bitmap->width != new_bitmap->width ||
bitmap->height != new_bitmap->height)
{
- Error(ERR_WARN, "ReloadCustomImage: new image has wrong dimensions");
+ Error(ERR_WARN, "ReloadCustomImage: new image '%s' has wrong dimensions",
+ filename);
FreeBitmap(new_bitmap);
return;
}
FreeBitmap(new_bitmap);
return;
}
@@
-742,13
+746,14
@@
inline void OpenAudio(void)
audio.sound_enabled = FALSE;
audio.sound_deactivated = FALSE;
audio.sound_enabled = FALSE;
audio.sound_deactivated = FALSE;
- audio.
soundserver_pipe[0] = audio.soundserv
er_pipe[1] = 0;
- audio.
soundserv
er_pid = -1;
+ audio.
mixer_pipe[0] = audio.mix
er_pipe[1] = 0;
+ audio.
mix
er_pid = -1;
audio.device_name = NULL;
audio.device_name = NULL;
- audio.device_fd =
0
;
+ audio.device_fd =
-1
;
- audio.channels = 0;
+ audio.
num_
channels = 0;
audio.music_channel = 0;
audio.music_channel = 0;
+ audio.first_sound_channel = 0;
#if defined(TARGET_SDL)
SDLOpenAudio();
#if defined(TARGET_SDL)
SDLOpenAudio();
@@
-780,15
+785,6
@@
inline void SetAudioMode(boolean enabled)
audio.sound_enabled = enabled;
}
audio.sound_enabled = enabled;
}
-#if 0
-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;
-}
-#endif
-
/* ========================================================================= */
/* event functions */
/* ========================================================================= */
/* event functions */
@@
-830,7
+826,9
@@
inline Key GetEventKey(KeyEvent *event, boolean with_modifiers)
(int)SDL_GetModState());
#endif
(int)SDL_GetModState());
#endif
- if (with_modifiers && event->keysym.unicode != 0)
+ if (with_modifiers &&
+ event->keysym.unicode > 0x0000 &&
+ event->keysym.unicode < 0x2000)
return event->keysym.unicode;
else
return event->keysym.sym;
return event->keysym.unicode;
else
return event->keysym.sym;