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 ExecuteAsThread(SDL_ThreadFunction, char *, void *, char *);
39 char *getPasswordJSON(char *);
40
41 void LoadLevelFromFilename(struct LevelInfo *, char *);
42 void LoadLevel(int);
43 void LoadLevelTemplate(int);
44 void LoadLevelInfoOnly(int);
45 void LoadNetworkLevel(struct NetworkLevelInfo *);
46 void SaveLevel(int);
47 void SaveLevelTemplate(void);
48 void SaveNativeLevel(struct LevelInfo *);
49 void DumpLevel(struct LevelInfo *);
50 void DumpLevels(void);
51 boolean SaveLevelChecked(int);
52
53 void CopyNativeLevel_RND_to_Native(struct LevelInfo *);
54 void CopyNativeLevel_Native_to_RND(struct LevelInfo *);
55
56 void LoadTapeFromFilename(char *);
57 void LoadTape(int);
58 void LoadSolutionTape(int);
59 void SaveTapeToFilename(char *);
60 void SaveTape(int);
61 void SaveScoreTape(int);
62 void DumpTape(struct TapeInfo *);
63 void DumpTapes(void);
64 boolean SaveTapeChecked(int);
65 boolean SaveTapeChecked_LevelSolved(int);
66
67 void LoadScore(int);
68 void SaveScore(int);
69
70 void LoadServerScore(int, boolean);
71 void SaveServerScore(int, boolean);
72 void SaveServerScoreFromFile(int, boolean, char *);
73
74 void LoadLocalAndServerScore(int, boolean);
75
76 void LoadUserNames(void);
77
78 void LoadSetupFromFilename(char *);
79 void LoadSetup_Default(void);
80 void SaveSetup_Default(void);
81
82 void LoadSetup_AutoSetup(void);
83 void SaveSetup_AutoSetup(void);
84
85 void LoadSetup_ServerSetup(void);
86 void SaveSetup_ServerSetup(void);
87
88 void LoadSetup_EditorCascade(void);
89 void SaveSetup_EditorCascade(void);
90
91 void LoadSetup(void);
92 void SaveSetup(void);
93
94 void SaveSetup_AddGameControllerMapping(char *);
95
96 void setHideSetupEntry(void *);
97 void removeHideSetupEntry(void *);
98 boolean hideSetupEntry(void *);
99
100 void LoadCustomElementDescriptions(void);
101 void InitMenuDesignSettings_Static(void);
102 void LoadMenuDesignSettings(void);
103 void LoadMenuDesignSettings_AfterGraphics(void);
104 void LoadUserDefinedEditorElementList(int **, int *);
105 void LoadMusicInfo(void);
106 void LoadHelpAnimInfo(void);
107 void LoadHelpTextInfo(void);
108
109 void ConvertLevels(void);
110 void CreateLevelSketchImages(void);
111 void CreateCollectElementImages(void);
112 void CreateCustomElementImages(char *);
113
114 void FreeGlobalAnimEventInfo(void);
115 int GetGlobalAnimEventValue(int, int);
116 int GetGlobalAnimEventValueCount(int);
117
118 int get_parameter_value(char *, char *, int);
119
120 #endif  // FILES_H