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 void DumpLevelsetFromFilename_BD(char *);
50 void DumpLevelset(void);
51 boolean SaveLevelChecked(int);
53 void CopyNativeLevel_RND_to_Native(struct LevelInfo *);
54 void CopyNativeLevel_Native_to_RND(struct LevelInfo *);
56 void LoadTapeFromFilename(char *);
58 void LoadSolutionTape(int);
59 void LoadScoreTape(char *, int);
60 void LoadScoreCacheTape(char *, int);
61 void SaveTapeToFilename(char *);
63 void SaveScoreTape(int);
64 void DumpTape(struct TapeInfo *);
66 boolean SaveTapeChecked(int);
67 boolean SaveTapeChecked_LevelSolved(int);
72 void LoadServerScore(int, boolean);
73 void SaveServerScore(int, boolean);
74 void SaveServerScoreFromFile(int, boolean, char *);
76 void LoadLocalAndServerScore(int, boolean);
78 void PrepareScoreTapesForUpload(char *);
80 void LoadUserNames(void);
82 void LoadSetupFromFilename(char *);
83 void LoadSetup_Default(void);
84 void SaveSetup_Default(void);
86 void LoadSetup_AutoSetup(void);
87 void SaveSetup_AutoSetup(void);
89 void LoadSetup_ServerSetup(void);
90 void SaveSetup_ServerSetup(void);
92 void LoadSetup_EditorCascade(void);
93 void SaveSetup_EditorCascade(void);
98 void SaveSetup_AddGameControllerMapping(char *);
100 void setHideSetupEntry(void *);
101 void removeHideSetupEntry(void *);
102 boolean hideSetupEntry(void *);
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);
117 void ConvertLevels(void);
118 void CreateLevelSketchImages(void);
119 void CreateCollectElementImages(void);
120 void CreateCustomElementImages(char *);
122 void FreeGlobalAnimEventInfo(void);
123 int GetGlobalAnimEventValue(int, int);
124 int GetGlobalAnimEventValueCount(int);
126 int get_parameter_value(char *, char *, int);