projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-19981005-1
[rocksndiamonds.git]
/
src
/
init.c
diff --git
a/src/init.c
b/src/init.c
index d466c7e5a215b132c128eaf448bb10478d08626f..0a0c7580c460bd184622b944a91fb6e14d09b052 100644
(file)
--- a/
src/init.c
+++ b/
src/init.c
@@
-44,11
+44,11
@@
struct IconFileInfo
static int sound_process_id = 0;
static int sound_process_id = 0;
-static void InitServer(void);
static void InitLevelAndPlayerInfo(void);
static void InitLevelAndPlayerInfo(void);
+static void InitNetworkServer(void);
static void InitDisplay(void);
static void InitSound(void);
static void InitDisplay(void);
static void InitSound(void);
-static void InitSound
Process
(void);
+static void InitSound
Server
(void);
static void InitWindow(int, char **);
static void InitGfx(void);
static void LoadGfx(int, struct PictureFileInfo *);
static void InitWindow(int, char **);
static void InitGfx(void);
static void LoadGfx(int, struct PictureFileInfo *);
@@
-57,11
+57,10
@@
static void InitElementProperties(void);
void OpenAll(int argc, char *argv[])
{
InitLevelAndPlayerInfo();
void OpenAll(int argc, char *argv[])
{
InitLevelAndPlayerInfo();
- InitServer();
InitCounter();
InitSound();
InitCounter();
InitSound();
- InitSound
Process
();
+ InitSound
Server
();
InitJoystick();
InitRND(NEW_RANDOMIZE);
InitJoystick();
InitRND(NEW_RANDOMIZE);
@@
-78,6
+77,8
@@
void OpenAll(int argc, char *argv[])
InitElementProperties();
DrawMainMenu();
InitElementProperties();
DrawMainMenu();
+
+ InitNetworkServer();
}
void InitLevelAndPlayerInfo()
}
void InitLevelAndPlayerInfo()
@@
-91,18
+92,25
@@
void InitLevelAndPlayerInfo()
LoadPlayerInfo(PLAYER_LEVEL); /* level specific info */
}
LoadPlayerInfo(PLAYER_LEVEL); /* level specific info */
}
-void InitServer()
+void Init
Network
Server()
{
{
- standalone = FALSE + TRUE;
+ int nr_wanted;
+
+ standalone = FALSE;
if (standalone)
return;
if (standalone)
return;
+ nr_wanted = Request("Choose player", REQ_PLAYER | REQ_STAY_CLOSED);
+
if (!ConnectToServer(server_host, server_port))
Error(ERR_EXIT, "cannot connect to multiplayer server");
if (!ConnectToServer(server_host, server_port))
Error(ERR_EXIT, "cannot connect to multiplayer server");
- SendNicknameToServer(local_player->alias_name);
- SendProtocolVersionToServer();
+ SendToServer_Nickname(local_player->alias_name);
+ SendToServer_ProtocolVersion();
+
+ if (nr_wanted)
+ SendToServer_NrWanted(nr_wanted);
}
void InitSound()
}
void InitSound()
@@
-153,7
+161,7
@@
void InitSound()
}
}
}
}
-void InitSound
Process
()
+void InitSound
Server
()
{
if (sound_status==SOUND_OFF)
return;
{
if (sound_status==SOUND_OFF)
return;