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 char *getDefaultLevelFilename(int);
33 char *getLocalLevelTemplateFilename(void);
34 char *getGlobalLevelTemplateFilename(void);
36 int getMappedElement(int);
38 void ExecuteAsThread(SDL_ThreadFunction, char *, void *, char *);
39 char *getPasswordJSON(char *);
41 void LoadLevelFromFilename(struct LevelInfo *, char *);
43 void LoadLevelTemplate(int);
44 void LoadLevelInfoOnly(int);
45 void LoadNetworkLevel(struct NetworkLevelInfo *);
47 void SaveLevelTemplate(void);
48 void SaveNativeLevel(struct LevelInfo *);
49 void DumpLevel(struct LevelInfo *);
50 void DumpLevels(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 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);
72 void SaveServerScoreFromFile(int, char *);
74 void LoadLocalAndServerScore(int, boolean);
76 void LoadUserNames(void);
78 void LoadSetupFromFilename(char *);
82 void LoadSetup_AutoSetup(void);
83 void SaveSetup_AutoSetup(void);
85 void LoadSetup_EditorCascade(void);
86 void SaveSetup_EditorCascade(void);
88 void SaveSetup_AddGameControllerMapping(char *);
90 void setHideSetupEntry(void *);
91 void removeHideSetupEntry(void *);
92 boolean hideSetupEntry(void *);
94 void LoadCustomElementDescriptions(void);
95 void InitMenuDesignSettings_Static(void);
96 void LoadMenuDesignSettings(void);
97 void LoadMenuDesignSettings_AfterGraphics(void);
98 void LoadUserDefinedEditorElementList(int **, int *);
99 void LoadMusicInfo(void);
100 void LoadHelpAnimInfo(void);
101 void LoadHelpTextInfo(void);
103 void ConvertLevels(void);
104 void CreateLevelSketchImages(void);
105 void CreateCollectElementImages(void);
106 void CreateCustomElementImages(char *);
108 void FreeGlobalAnimEventInfo(void);
109 int GetGlobalAnimEventValue(int, int);
110 int GetGlobalAnimEventValueCount(int);
112 int get_parameter_value(char *, char *, int);