diff options
Diffstat (limited to 'apps/plugins/xrick/resources.h')
-rw-r--r-- | apps/plugins/xrick/resources.h | 165 |
1 files changed, 165 insertions, 0 deletions
diff --git a/apps/plugins/xrick/resources.h b/apps/plugins/xrick/resources.h new file mode 100644 index 0000000000..e919ed081a --- /dev/null +++ b/apps/plugins/xrick/resources.h | |||
@@ -0,0 +1,165 @@ | |||
1 | /* | ||
2 | * xrick/resources.h | ||
3 | * | ||
4 | * Copyright (C) 2008-2014 Pierluigi Vicinanza. All rights reserved. | ||
5 | * | ||
6 | * The use and distribution terms for this software are contained in the file | ||
7 | * named README, which can be found in the root of this distribution. By | ||
8 | * using this software in any fashion, you are agreeing to be bound by the | ||
9 | * terms of this license. | ||
10 | * | ||
11 | * You must not remove this notice, or any other, from this software. | ||
12 | */ | ||
13 | |||
14 | #ifndef _RESOURCES_H | ||
15 | #define _RESOURCES_H | ||
16 | |||
17 | #include "xrick/config.h" | ||
18 | #include "xrick/screens.h" | ||
19 | #include "xrick/system/basic_types.h" | ||
20 | |||
21 | /* | ||
22 | * All data is assumed to be Little Endian | ||
23 | */ | ||
24 | typedef struct | ||
25 | { | ||
26 | U8 magic[4]; | ||
27 | U8 version[2]; | ||
28 | U8 resourceId[2]; | ||
29 | } resource_header_t; | ||
30 | |||
31 | typedef struct | ||
32 | { | ||
33 | U8 w; | ||
34 | U8 h; | ||
35 | U8 spr[2]; | ||
36 | U8 sni[2]; | ||
37 | U8 trig_w; | ||
38 | U8 trig_h; | ||
39 | U8 snd; | ||
40 | } resource_entdata_t; | ||
41 | |||
42 | typedef struct | ||
43 | { | ||
44 | U8 x[2]; | ||
45 | U8 y[2]; | ||
46 | U8 row[2]; | ||
47 | U8 submap[2]; | ||
48 | U8 tuneId[2]; | ||
49 | } resource_map_t; | ||
50 | |||
51 | typedef struct | ||
52 | { | ||
53 | U8 page[2]; | ||
54 | U8 bnum[2]; | ||
55 | U8 connect[2]; | ||
56 | U8 mark[2]; | ||
57 | } resource_submap_t; | ||
58 | |||
59 | typedef struct { | ||
60 | U8 count[2]; | ||
61 | U8 dx[2]; | ||
62 | U8 dy[2]; | ||
63 | U8 base[2]; | ||
64 | } resource_imapsteps_t; | ||
65 | |||
66 | typedef struct { | ||
67 | U8 width[2]; | ||
68 | U8 height[2]; | ||
69 | U8 xPos[2]; | ||
70 | U8 yPos[2]; | ||
71 | } resource_pic_t; | ||
72 | |||
73 | typedef struct { | ||
74 | U8 score[4]; | ||
75 | U8 name[HISCORE_NAME_SIZE]; | ||
76 | } resource_hiscore_t; | ||
77 | |||
78 | #ifdef GFXPC | ||
79 | typedef struct { | ||
80 | U8 mask[2]; | ||
81 | U8 pict[2]; | ||
82 | } resource_spriteX_t; | ||
83 | #endif /* GFXPC */ | ||
84 | |||
85 | extern const U8 resource_magic[4]; | ||
86 | |||
87 | enum | ||
88 | { | ||
89 | DATA_VERSION = 3, | ||
90 | |||
91 | /* "bootstrap" file */ | ||
92 | Resource_FILELIST = 0, | ||
93 | |||
94 | /* graphics, misc, texts */ | ||
95 | Resource_PALETTE, | ||
96 | Resource_ENTDATA, | ||
97 | Resource_SPRSEQ, | ||
98 | Resource_MVSTEP, | ||
99 | Resource_MAPS, | ||
100 | Resource_SUBMAPS, | ||
101 | Resource_CONNECT, | ||
102 | Resource_BNUMS, | ||
103 | Resource_BLOCKS, | ||
104 | Resource_MARKS, | ||
105 | Resource_EFLGC, | ||
106 | Resource_IMAPSL, | ||
107 | Resource_IMAPSTEPS, | ||
108 | Resource_IMAPSOFS, | ||
109 | Resource_IMAPTEXT, | ||
110 | Resource_GAMEOVERTXT, | ||
111 | Resource_PAUSEDTXT, | ||
112 | Resource_SPRITESDATA, | ||
113 | Resource_TILESDATA, | ||
114 | Resource_HIGHSCORES, | ||
115 | Resource_IMGSPLASH, | ||
116 | Resource_PICHAF, /* ST version only */ | ||
117 | Resource_PICCONGRATS, /* ST version only */ | ||
118 | Resource_PICSPLASH, /* ST version only */ | ||
119 | Resource_IMAINHOFT, /* PC version only */ | ||
120 | Resource_IMAINRDT, /* PC version only */ | ||
121 | Resource_IMAINCDC, /* PC version only */ | ||
122 | Resource_SCREENCONGRATS, /* PC version only */ | ||
123 | |||
124 | /* sounds */ | ||
125 | Resource_SOUNDBOMBSHHT, | ||
126 | Resource_SOUNDBONUS, | ||
127 | Resource_SOUNDBOX, | ||
128 | Resource_SOUNDBULLET, | ||
129 | Resource_SOUNDCRAWL, | ||
130 | Resource_SOUNDDIE, | ||
131 | Resource_SOUNDENTITY0, | ||
132 | Resource_SOUNDENTITY1, | ||
133 | Resource_SOUNDENTITY2, | ||
134 | Resource_SOUNDENTITY3, | ||
135 | Resource_SOUNDENTITY4, | ||
136 | Resource_SOUNDENTITY5, | ||
137 | Resource_SOUNDENTITY6, | ||
138 | Resource_SOUNDENTITY7, | ||
139 | Resource_SOUNDENTITY8, | ||
140 | Resource_SOUNDEXPLODE, | ||
141 | Resource_SOUNDGAMEOVER, | ||
142 | Resource_SOUNDJUMP, | ||
143 | Resource_SOUNDPAD, | ||
144 | Resource_SOUNDSBONUS1, | ||
145 | Resource_SOUNDSBONUS2, | ||
146 | Resource_SOUNDSTICK, | ||
147 | Resource_SOUNDTUNE0, | ||
148 | Resource_SOUNDTUNE1, | ||
149 | Resource_SOUNDTUNE2, | ||
150 | Resource_SOUNDTUNE3, | ||
151 | Resource_SOUNDTUNE4, | ||
152 | Resource_SOUNDTUNE5, | ||
153 | Resource_SOUNDWALK, | ||
154 | |||
155 | Resource_MAX_COUNT, | ||
156 | }; | ||
157 | |||
158 | #define BOOTSTRAP_RESOURCE_NAME "filelist.dat" | ||
159 | |||
160 | bool resources_load(void); | ||
161 | void resources_unload(void); | ||
162 | |||
163 | #endif /* ndef _RESOURCES_H */ | ||
164 | |||
165 | /* eof */ | ||