projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-19981026-1
[rocksndiamonds.git]
/
src
/
init.c
diff --git
a/src/init.c
b/src/init.c
index 211e66e36260200fe2630aacad99a78de6dbf913..b048083108d3fbe97c6f653798aed31f1c84094c 100644
(file)
--- a/
src/init.c
+++ b/
src/init.c
@@
-134,15
+134,19
@@
void InitLevelAndPlayerInfo()
Error(ERR_EXIT, NULL);
Error(ERR_EXIT, NULL);
-
- LoadSetup();
-
+ LoadSetup(); /* global setup info */
+ LoadLevelSetup(); /* info about last played level */
+#if 0
LoadPlayerInfo(PLAYER_SETUP); /* global setup info */
LoadPlayerInfo(PLAYER_LEVEL); /* level specific info */
LoadPlayerInfo(PLAYER_SETUP); /* global setup info */
LoadPlayerInfo(PLAYER_LEVEL); /* level specific info */
+#endif
+
+#if 0
/* after LoadPlayerInfo(), because it overwrites 'local_player' */
/* after LoadPlayerInfo(), because it overwrites 'local_player' */
+#endif
for (i=0; i<MAX_PLAYERS; i++)
{
stored_player[i].connected = FALSE;
for (i=0; i<MAX_PLAYERS; i++)
{
stored_player[i].connected = FALSE;
@@
-181,14
+185,14
@@
void InitSound()
#ifndef MSDOS
if (access(sound_device_name,W_OK)<0)
{
#ifndef MSDOS
if (access(sound_device_name,W_OK)<0)
{
- Error(ERR_
RETU
RN, "cannot access sound device - no sounds");
+ Error(ERR_
WA
RN, "cannot access sound device - no sounds");
sound_status = SOUND_OFF;
return;
}
if ((sound_device = open(sound_device_name,O_WRONLY))<0)
{
sound_status = SOUND_OFF;
return;
}
if ((sound_device = open(sound_device_name,O_WRONLY))<0)
{
- Error(ERR_
RETU
RN, "cannot open sound device - no sounds");
+ Error(ERR_
WA
RN, "cannot open sound device - no sounds");
sound_status = SOUND_OFF;
return;
}
sound_status = SOUND_OFF;
return;
}
@@
-198,11
+202,19
@@
void InitSound()
#ifdef VOXWARE
sound_loops_allowed = TRUE;
#ifdef VOXWARE
sound_loops_allowed = TRUE;
+
+ /*
setup.sound_loops_on = TRUE;
setup.sound_loops_on = TRUE;
+ */
+
#endif
#else
sound_loops_allowed = TRUE;
#endif
#else
sound_loops_allowed = TRUE;
+
+ /*
setup.sound_loops_on = TRUE;
setup.sound_loops_on = TRUE;
+ */
+
#endif
for(i=0; i<NUM_SOUNDS; i++)
#endif
for(i=0; i<NUM_SOUNDS; i++)
@@
-227,14
+239,14
@@
void InitSoundServer()
#ifndef MSDOS
if (pipe(sound_pipe)<0)
{
#ifndef MSDOS
if (pipe(sound_pipe)<0)
{
- Error(ERR_
RETU
RN, "cannot create pipe - no sounds");
+ Error(ERR_
WA
RN, "cannot create pipe - no sounds");
sound_status = SOUND_OFF;
return;
}
if ((sound_process_id = fork()) < 0)
{
sound_status = SOUND_OFF;
return;
}
if ((sound_process_id = fork()) < 0)
{
- Error(ERR_
RETU
RN, "cannot create sound server process - no sounds");
+ Error(ERR_
WA
RN, "cannot create sound server process - no sounds");
sound_status = SOUND_OFF;
return;
}
sound_status = SOUND_OFF;
return;
}
@@
-263,7
+275,7
@@
void InitJoystick()
#ifndef MSDOS
if (access(joystick_device_name[joystick_nr], R_OK) < 0)
{
#ifndef MSDOS
if (access(joystick_device_name[joystick_nr], R_OK) < 0)
{
- Error(ERR_
RETU
RN, "cannot access joystick device '%s'",
+ Error(ERR_
WA
RN, "cannot access joystick device '%s'",
joystick_device_name[joystick_nr]);
joystick_status = JOYSTICK_OFF;
return;
joystick_device_name[joystick_nr]);
joystick_status = JOYSTICK_OFF;
return;
@@
-272,7
+284,7
@@
void InitJoystick()
if ((joystick_device =
open(joystick_device_name[joystick_nr], O_RDONLY)) < 0)
{
if ((joystick_device =
open(joystick_device_name[joystick_nr], O_RDONLY)) < 0)
{
- Error(ERR_
RETU
RN, "cannot open joystick device '%s'",
+ Error(ERR_
WA
RN, "cannot open joystick device '%s'",
joystick_device_name[joystick_nr]);
joystick_status = JOYSTICK_OFF;
return;
joystick_device_name[joystick_nr]);
joystick_status = JOYSTICK_OFF;
return;