added optional button to restart game (door, panel and touch variants)
[rocksndiamonds.git] / src / files.h
1 // ============================================================================
2 // Rocks'n'Diamonds - McDuffin Strikes Back!
3 // ----------------------------------------------------------------------------
4 // (c) 1995-2014 by Artsoft Entertainment
5 //                  Holger Schemel
6 //                  info@artsoft.org
7 //                  https://www.artsoft.org/
8 // ----------------------------------------------------------------------------
9 // files.h
10 // ============================================================================
11
12 #ifndef FILES_H
13 #define FILES_H
14
15 #include "main.h"
16
17
18 #define LEVEL_PACKED_START              100
19 #define PACKED_LEVELS(x)                (LEVEL_PACKED_START + x)
20
21 #define LEVEL_FILE_TYPE_RND_PACKED      PACKED_LEVELS(LEVEL_FILE_TYPE_RND)
22 #define LEVEL_FILE_TYPE_EM_PACKED       PACKED_LEVELS(LEVEL_FILE_TYPE_EM)
23
24 #define IS_SINGLE_LEVEL_FILE(x)         (x < LEVEL_PACKED_START)
25 #define IS_PACKED_LEVEL_FILE(x)         (x > LEVEL_PACKED_START)
26
27
28 void setElementChangePages(struct ElementInfo *, int);
29 void setElementChangeInfoToDefaults(struct ElementChangeInfo *);
30 void copyElementInfo(struct ElementInfo *, struct ElementInfo *);
31
32 char *getDefaultLevelFilename(int);
33 char *getLocalLevelTemplateFilename(void);
34 char *getGlobalLevelTemplateFilename(void);
35
36 int getMappedElement(int);
37
38 void LoadLevelFromFilename(struct LevelInfo *, char *);
39 void LoadLevel(int);
40 void LoadLevelTemplate(int);
41 void LoadLevelInfoOnly(int);
42 void LoadNetworkLevel(struct NetworkLevelInfo *);
43 void SaveLevel(int);
44 void SaveLevelTemplate(void);
45 void SaveNativeLevel(struct LevelInfo *);
46 void DumpLevel(struct LevelInfo *);
47 void DumpLevels(void);
48 boolean SaveLevelChecked(int);
49
50 void CopyNativeLevel_RND_to_Native(struct LevelInfo *);
51 void CopyNativeLevel_Native_to_RND(struct LevelInfo *);
52
53 void LoadTapeFromFilename(char *);
54 void LoadTape(int);
55 void LoadSolutionTape(int);
56 void LoadScoreTape(char *, int);
57 void LoadScoreCacheTape(char *, int);
58 void SaveTapeToFilename(char *);
59 void SaveTape(int);
60 void SaveScoreTape(int);
61 void DumpTape(struct TapeInfo *);
62 void DumpTapes(void);
63 boolean SaveTapeChecked(int);
64 boolean SaveTapeChecked_LevelSolved(int);
65
66 void LoadScore(int);
67 void SaveScore(int);
68
69 void LoadServerScore(int, boolean);
70 void SaveServerScore(int, boolean);
71 void SaveServerScoreFromFile(int, boolean, char *);
72
73 void LoadLocalAndServerScore(int, boolean);
74
75 void PrepareScoreTapesForUpload(char *);
76
77 void LoadUserNames(void);
78
79 void LoadSetupFromFilename(char *);
80 void LoadSetup_Default(void);
81 void SaveSetup_Default(void);
82
83 void LoadSetup_AutoSetup(void);
84 void SaveSetup_AutoSetup(void);
85
86 void LoadSetup_ServerSetup(void);
87 void SaveSetup_ServerSetup(void);
88
89 void LoadSetup_EditorCascade(void);
90 void SaveSetup_EditorCascade(void);
91
92 void LoadSetup(void);
93 void SaveSetup(void);
94
95 void SaveSetup_AddGameControllerMapping(char *);
96
97 void setHideSetupEntry(void *);
98 void removeHideSetupEntry(void *);
99 boolean hideSetupEntry(void *);
100
101 void LoadCustomElementDescriptions(void);
102 void InitMenuDesignSettings_FromHash(SetupFileHash *, boolean);
103 void InitMenuDesignSettings_Static(void);
104 void LoadMenuDesignSettings(void);
105 void LoadMenuDesignSettings_AfterGraphics(void);
106 void LoadUserDefinedEditorElementList(int **, int *);
107 void LoadMusicInfo(void);
108 void LoadHelpAnimInfo(void);
109 void LoadHelpTextInfo(void);
110
111 void ConvertLevels(void);
112 void CreateLevelSketchImages(void);
113 void CreateCollectElementImages(void);
114 void CreateCustomElementImages(char *);
115
116 void FreeGlobalAnimEventInfo(void);
117 int GetGlobalAnimEventValue(int, int);
118 int GetGlobalAnimEventValueCount(int);
119
120 int get_parameter_value(char *, char *, int);
121
122 #endif  // FILES_H