added support for BD game engine to Makefile for Android
[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 boolean isLevelsetFilename_BD(char *);
33 char *getDefaultLevelFilename(int);
34 char *getLocalLevelTemplateFilename(void);
35 char *getGlobalLevelTemplateFilename(void);
36
37 int getMappedElement(int);
38
39 void LoadLevelFromFilename(struct LevelInfo *, char *);
40 void LoadLevel(int);
41 void LoadLevelTemplate(int);
42 void LoadLevelInfoOnly(int);
43 void LoadNetworkLevel(struct NetworkLevelInfo *);
44 void SaveLevel(int);
45 void SaveLevelTemplate(void);
46 void SaveNativeLevel(struct LevelInfo *);
47 void DumpLevel(struct LevelInfo *);
48 void DumpLevels(void);
49 void DumpLevelsetFromFilename_BD(char *);
50 void DumpLevelset(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 LoadScoreTape(char *, int);
60 void LoadScoreCacheTape(char *, int);
61 void SaveTapeToFilename(char *);
62 void SaveTape(int);
63 void SaveScoreTape(int);
64 void DumpTape(struct TapeInfo *);
65 void DumpTapes(void);
66 boolean SaveTapeChecked(int);
67 boolean SaveTapeChecked_LevelSolved(int);
68
69 void LoadScore(int);
70 void SaveScore(int);
71
72 void LoadServerScore(int, boolean);
73 void SaveServerScore(int, boolean);
74 void SaveServerScoreFromFile(int, boolean, char *);
75
76 void LoadLocalAndServerScore(int, boolean);
77
78 void PrepareScoreTapesForUpload(char *);
79
80 void LoadUserNames(void);
81
82 void LoadSetupFromFilename(char *);
83 void LoadSetup_Default(void);
84 void SaveSetup_Default(void);
85
86 void LoadSetup_AutoSetup(void);
87 void SaveSetup_AutoSetup(void);
88
89 void LoadSetup_ServerSetup(void);
90 void SaveSetup_ServerSetup(void);
91
92 void LoadSetup_EditorCascade(void);
93 void SaveSetup_EditorCascade(void);
94
95 void LoadSetup(void);
96 void SaveSetup(void);
97
98 void SaveSetup_AddGameControllerMapping(char *);
99
100 void setHideSetupEntry(void *);
101 void removeHideSetupEntry(void *);
102 boolean hideSetupEntry(void *);
103
104 void LoadCustomElementDescriptions(void);
105 void InitMenuDesignSettings_FromHash(SetupFileHash *, boolean);
106 void InitMenuDesignSettings_Static(void);
107 void LoadMenuDesignSettings(void);
108 void LoadMenuDesignSettings_AfterGraphics(void);
109 void InitSoundSettings_FromHash(SetupFileHash *, boolean);
110 void InitSoundSettings_Static(void);
111 void LoadSoundSettings(void);
112 void LoadUserDefinedEditorElementList(int **, int *);
113 void LoadMusicInfo(void);
114 void LoadHelpAnimInfo(void);
115 void LoadHelpTextInfo(void);
116
117 void ConvertLevels(void);
118 void CreateLevelSketchImages(void);
119 void CreateCollectElementImages(void);
120 void CreateCustomElementImages(char *);
121
122 void FreeGlobalAnimEventInfo(void);
123 int GetGlobalAnimEventValue(int, int);
124 int GetGlobalAnimEventValueCount(int);
125
126 int get_parameter_value(char *, char *, int);
127
128 #endif  // FILES_H