re-enabled storing selection from "last played level set" menu
[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 LoadLevelFromFilename(struct LevelInfo *, char *);
39 void LoadLevel(int);
40 void LoadLevelTemplate(int);
41 void LoadLevelInfoOnly(int);
42 void LoadNetworkLevel(struct NetworkLevelInfo *);
43 void SaveLevel(int);
44 void SaveLevelTemplate(void);
45 void SaveNativeLevel(struct LevelInfo *);
46 void DumpLevel(struct LevelInfo *);
47 boolean SaveLevelChecked(int);
48
49 void CopyNativeLevel_RND_to_Native(struct LevelInfo *);
50 void CopyNativeLevel_Native_to_RND(struct LevelInfo *);
51
52 void LoadTapeFromFilename(char *);
53 void LoadTape(int);
54 void LoadSolutionTape(int);
55 void SaveTapeToFilename(char *);
56 void SaveTape(int);
57 void DumpTape(struct TapeInfo *);
58 boolean SaveTapeChecked(int);
59 boolean SaveTapeChecked_LevelSolved(int);
60
61 void LoadScore(int);
62 void SaveScore(int);
63
64 void LoadUserNames(void);
65
66 void LoadSetupFromFilename(char *);
67 void LoadSetup(void);
68 void SaveSetup(void);
69
70 void LoadSetup_AutoSetup(void);
71 void SaveSetup_AutoSetup(void);
72
73 void LoadSetup_EditorCascade(void);
74 void SaveSetup_EditorCascade(void);
75
76 void SaveSetup_AddGameControllerMapping(char *);
77
78 void setHideSetupEntry(void *);
79 void removeHideSetupEntry(void *);
80 boolean hideSetupEntry(void *);
81
82 void LoadCustomElementDescriptions(void);
83 void InitMenuDesignSettings_Static(void);
84 void LoadMenuDesignSettings(void);
85 void LoadMenuDesignSettings_AfterGraphics(void);
86 void LoadUserDefinedEditorElementList(int **, int *);
87 void LoadMusicInfo(void);
88 void LoadHelpAnimInfo(void);
89 void LoadHelpTextInfo(void);
90
91 void ConvertLevels(void);
92 void CreateLevelSketchImages(void);
93 void CreateCustomElementImages(char *);
94
95 void FreeGlobalAnimEventInfo(void);
96 int GetGlobalAnimEventValue(int, int);
97 int GetGlobalAnimEventValueCount(int);
98
99 int get_parameter_value(char *, char *, int);
100
101 #endif  // FILES_H