Add const and fix crash when returning to main menu.

This commit is contained in:
jarod42 2004-10-24 14:27:33 +00:00
parent 699dd2ff15
commit 9fd57de38e
4 changed files with 5 additions and 5 deletions

View file

@ -320,7 +320,7 @@ static void GameTypeManTeamVsMachine(void)
**
** @todo FIXME: use in this function InitModules / LoadModules!!!
*/
void CreateGame(char* filename, WorldMap* map)
void CreateGame(const char* filename, WorldMap* map)
{
int i;
int j;

View file

@ -393,7 +393,7 @@ extern void SetupEditor(void);
extern void ErrorMenu(char*);
/// Menu Loop
extern void MenuLoop(char* filename, struct _world_map_* map);
extern void MenuLoop(const char* filename, struct _world_map_* map);
/// Pre menu setup
extern void PreMenuSetup(void);

View file

@ -178,7 +178,7 @@ extern void ObjectivesCclRegister(void);
/// Save the objectives
extern void SaveObjectives(struct _CL_File_* file);
/// Create a game
extern void CreateGame(char* filename, struct _world_map_* map);
extern void CreateGame(const char* filename, struct _world_map_* map);
/// Init Setting to default values
extern void InitSettings(void);

View file

@ -647,7 +647,7 @@ void PreMenuSetup(void)
** @param filename map filename
** @param map map loaded
*/
void MenuLoop(char* filename, WorldMap* map)
void MenuLoop(const char* filename, WorldMap* map)
{
for (;;) {
//
@ -751,7 +751,7 @@ void MenuLoop(char* filename, WorldMap* map)
filename = NextChapter();
sprintf(CurrentMapPath, "%s/%s", StratagusLibPath, filename);
filename = CurrentMapPath;
// filename = CurrentMapPath;
DebugPrint("Next chapter %s\n" _C_ CurrentMapPath);
}
}