LoadLevelTemplate_LoadAndInit();
}
-static void LoadLevelTemplateFromNetwork(struct LevelFileInfo *lfi_network_template)
+static void LoadNetworkLevelTemplate(struct NetworkLevelInfo *network_level)
{
- copyLevelFileInfo(lfi_network_template, &level_template.file_info);
+ copyLevelFileInfo(&network_level->tmpl_info, &level_template.file_info);
LoadLevelTemplate_LoadAndInit();
}
-static void LoadLevel_LoadAndInit(struct LevelFileInfo *lfi_network_template)
+static void LoadLevel_LoadAndInit(struct NetworkLevelInfo *network_level)
{
LoadLevelFromFileInfo(&level, &level.file_info, FALSE);
if (level.use_custom_template)
{
- if (lfi_network_template != NULL)
- LoadLevelTemplateFromNetwork(lfi_network_template);
+ if (network_level != NULL)
+ LoadNetworkLevelTemplate(network_level);
else
LoadLevelTemplate(-1);
}
LoadLevelFromFileInfo(&level, &level.file_info, TRUE);
}
-void LoadLevelFromNetwork(struct LevelFileInfo *lfi_network_level,
- struct LevelFileInfo *lfi_network_template)
+void LoadNetworkLevel(struct NetworkLevelInfo *network_level)
{
- copyLevelFileInfo(lfi_network_level, &level.file_info);
+ SetLevelSetInfo(network_level->leveldir_identifier,
+ network_level->file_info.nr);
- LoadLevel_LoadAndInit(lfi_network_template);
+ copyLevelFileInfo(&network_level->file_info, &level.file_info);
+
+ LoadLevel_LoadAndInit(network_level);
}
static int SaveLevel_VERS(FILE *file, struct LevelInfo *level)
void LoadLevel(int);
void LoadLevelTemplate(int);
void LoadLevelInfoOnly(int);
-void LoadLevelFromNetwork(struct LevelFileInfo *, struct LevelFileInfo *);
+void LoadNetworkLevel(struct NetworkLevelInfo *);
void SaveLevel(int);
void SaveLevelTemplate();
void SaveNativeLevel(struct LevelInfo *);
boolean use_action_after_change_bug;
};
+struct NetworkLevelInfo
+{
+ char *leveldir_identifier; /* network levelset identifier */
+
+ struct LevelFileInfo file_info; /* file info for level file */
+ struct LevelFileInfo tmpl_info; /* file info for level template */
+
+ boolean use_network_level_files; /* use levels from network server */
+ boolean use_custom_template; /* use CEs from level template */
+};
+
struct GlobalInfo
{
char *autoplay_leveldir;
NULL
};
-struct NetworkLevelFileInfo
-{
- char *leveldir_identifier;
- struct LevelFileInfo file_info;
- struct LevelFileInfo tmpl_info;
- boolean use_network_level_files;
- boolean use_custom_template;
-};
-
/* server stuff */
static TCPsocket sfd; /* TCP server socket */
static boolean stop_network_client = FALSE;
static char stop_network_client_message[MAX_OUTPUT_LINESIZE + 1];
-static struct NetworkLevelFileInfo network_level;
+static struct NetworkLevelInfo network_level;
static void DrawNetworkTextExt(char *message, int font_nr, boolean initialize)
{
level_nr = new_level_nr;
}
- SetLevelSetInfo(new_leveldir_identifier, new_level_nr);
-
/* needed if level set of network game changed graphics, sounds or music */
ReloadCustomArtwork(0);
TapeErase();
if (network_level.use_network_level_files)
- LoadLevelFromNetwork(&network_level.file_info,
- &network_level.tmpl_info);
+ LoadNetworkLevel(&network_level);
else
LoadLevel(level_nr);