1 // ============================================================================
2 // Rocks'n'Diamonds - McDuffin Strikes Back!
3 // ----------------------------------------------------------------------------
4 // (c) 1995-2014 by Artsoft Entertainment
7 // https://www.artsoft.org/
8 // ----------------------------------------------------------------------------
10 // ============================================================================
18 #define LEVEL_PACKED_START 100
19 #define PACKED_LEVELS(x) (LEVEL_PACKED_START + x)
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)
24 #define IS_SINGLE_LEVEL_FILE(x) (x < LEVEL_PACKED_START)
25 #define IS_PACKED_LEVEL_FILE(x) (x > LEVEL_PACKED_START)
28 void setElementChangePages(struct ElementInfo *, int);
29 void setElementChangeInfoToDefaults(struct ElementChangeInfo *);
30 void copyElementInfo(struct ElementInfo *, struct ElementInfo *);
32 boolean isLevelsetFilename_BD(char *);
33 char *getDefaultLevelFilename(int);
34 char *getLocalLevelTemplateFilename(void);
35 char *getGlobalLevelTemplateFilename(void);
37 int getMappedElement(int);
39 void LoadLevelFromFilename(struct LevelInfo *, char *);
41 void LoadLevelTemplate(int);
42 void LoadLevelInfoOnly(int);
43 void LoadNetworkLevel(struct NetworkLevelInfo *);
45 void SaveLevelTemplate(void);
46 void SaveNativeLevel(struct LevelInfo *);
47 void DumpLevel(struct LevelInfo *);
48 void DumpLevels(void);
49 boolean SaveLevelChecked(int);
51 void CopyNativeLevel_RND_to_Native(struct LevelInfo *);
52 void CopyNativeLevel_Native_to_RND(struct LevelInfo *);
54 void LoadTapeFromFilename(char *);
56 void LoadSolutionTape(int);
57 void LoadScoreTape(char *, int);
58 void LoadScoreCacheTape(char *, int);
59 void SaveTapeToFilename(char *);
61 void SaveScoreTape(int);
62 void DumpTape(struct TapeInfo *);
64 boolean SaveTapeChecked(int);
65 boolean SaveTapeChecked_LevelSolved(int);
70 void LoadServerScore(int, boolean);
71 void SaveServerScore(int, boolean);
72 void SaveServerScoreFromFile(int, boolean, char *);
74 void LoadLocalAndServerScore(int, boolean);
76 void PrepareScoreTapesForUpload(char *);
78 void LoadUserNames(void);
80 void LoadSetupFromFilename(char *);
81 void LoadSetup_Default(void);
82 void SaveSetup_Default(void);
84 void LoadSetup_AutoSetup(void);
85 void SaveSetup_AutoSetup(void);
87 void LoadSetup_ServerSetup(void);
88 void SaveSetup_ServerSetup(void);
90 void LoadSetup_EditorCascade(void);
91 void SaveSetup_EditorCascade(void);
96 void SaveSetup_AddGameControllerMapping(char *);
98 void setHideSetupEntry(void *);
99 void removeHideSetupEntry(void *);
100 boolean hideSetupEntry(void *);
102 void LoadCustomElementDescriptions(void);
103 void InitMenuDesignSettings_FromHash(SetupFileHash *, boolean);
104 void InitMenuDesignSettings_Static(void);
105 void LoadMenuDesignSettings(void);
106 void LoadMenuDesignSettings_AfterGraphics(void);
107 void InitSoundSettings_FromHash(SetupFileHash *, boolean);
108 void InitSoundSettings_Static(void);
109 void LoadSoundSettings(void);
110 void LoadUserDefinedEditorElementList(int **, int *);
111 void LoadMusicInfo(void);
112 void LoadHelpAnimInfo(void);
113 void LoadHelpTextInfo(void);
115 void ConvertLevels(void);
116 void CreateLevelSketchImages(void);
117 void CreateCollectElementImages(void);
118 void CreateCustomElementImages(char *);
120 void FreeGlobalAnimEventInfo(void);
121 int GetGlobalAnimEventValue(int, int);
122 int GetGlobalAnimEventValueCount(int);
124 int get_parameter_value(char *, char *, int);