1 /*
2 	This file is part of Warzone 2100.
3 	Copyright (C) 1999-2004  Eidos Interactive
4 	Copyright (C) 2005-2020  Warzone 2100 Project
5 
6 	Warzone 2100 is free software; you can redistribute it and/or modify
7 	it under the terms of the GNU General Public License as published by
8 	the Free Software Foundation; either version 2 of the License, or
9 	(at your option) any later version.
10 
11 	Warzone 2100 is distributed in the hope that it will be useful,
12 	but WITHOUT ANY WARRANTY; without even the implied warranty of
13 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 	GNU General Public License for more details.
15 
16 	You should have received a copy of the GNU General Public License
17 	along with Warzone 2100; if not, write to the Free Software
18 	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 /** @file
21  *  Interface to the initialisation routines.
22  */
23 
24 #ifndef __INCLUDED_SRC_INIT_H__
25 #define __INCLUDED_SRC_INIT_H__
26 
27 struct IMAGEFILE;
28 
29 // the size of the file loading buffer
30 // FIXME Totally inappropriate place for this.
31 #define FILE_LOAD_BUFFER_SIZE (1024*1024*4)
32 extern char fileLoadBuffer[];
33 
34 bool systemInitialise(float horizScaleFactor, float vertScaleFactor);
35 void systemShutdown();
36 bool frontendInitialise(const char *ResourceFile);
37 bool frontendShutdown();
38 bool stageOneInitialise();
39 bool stageOneShutDown();
40 bool stageTwoInitialise();
41 bool stageTwoShutDown();
42 bool stageThreeInitialise();
43 bool stageThreeShutDown();
44 
45 // Reset the game between campaigns
46 bool campaignReset();
47 // Reset the game when loading a save game
48 bool saveGameReset();
49 
50 struct wzSearchPath
51 {
52 	char path[PATH_MAX];
53 	unsigned int priority;
54 	wzSearchPath *higherPriority, * lowerPriority;
55 };
56 
57 enum searchPathMode { mod_clean, mod_campaign, mod_multiplay, mod_override };
58 
59 void registerSearchPath(const char path[], unsigned int priority);
60 bool rebuildSearchPath(searchPathMode mode, bool force, const char *current_map = NULL);
61 
62 bool buildMapList();
63 bool CheckForMod(char const *mapFile);
64 bool CheckForRandom(char const *mapFile, char const *mapDataFile0);
65 
66 bool loadLevFile(const char *filename, searchPathMode datadir, bool ignoreWrf, char const *realFileName);
67 
68 extern IMAGEFILE	*FrontImages;
69 
70 #endif // __INCLUDED_SRC_INIT_H__
71