ScummVM API documentation
sprite_list.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef IMMORTAL_SPRITE_LIST_H
23#define IMMORTAL_SPRITE_LIST_H
24
25namespace Immortal {
26
27// We need a few two-dimensional vectors, and writing them out in full each time is tedious
28template<class T> using CArray2D = Common::Array<Common::Array<T>>;
29
30struct Image {
31 uint16 _deltaX;
32 uint16 _deltaY;
33 uint16 _rectW;
34 uint16 _rectH;
35 Common::Array<uint16> _scanWidth;
36 Common::Array<uint16> _deltaPos;
37 CArray2D<byte> _bitmap;
38};
39
40struct DataSprite {
41 uint16 _cenX; // These are the base center positions
42 uint16 _cenY;
43 uint16 _numImages;
45};
46
47struct Sprite {
48 int _image; // Index of _dSprite._images[]
49 uint16 _x;
50 uint16 _y;
51 uint16 _on; // 1 = active
52 uint16 _priority;
53 DataSprite *_dSprite;
54};
55
56enum SpriteFrame {
57 // Null
58 kNoFrame,
59
60 // Chest frames
61 kChest0Frame = 0,
62 kOpenChestFrame,
63 kRingFrame,
64 kKnifeFrame,
65 kDeadGoblinFrame,
66
67 // Normal frames
68 kSwordFrame,
69 kKeyFrame,
70 kYesIconOff,
71 kYesIconOn,
72 kNoIconOff,
73 kNoIconOn,
74 kChoiceFrame,
75 kEraseChoseFrame,
76 kSwordBigFrame,
77 kVaseBigFrame,
78 kVaseFrame,
79 kBrokenFrame,
80 kKeyBigFrame,
81 kBagFrame,
82 kBagBigFrame,
83 kBookBigFrame,
84 kBookFrame,
85 kScrollFrame,
86 kScrollBigFrame,
87 kOkayFrame,
88 kAltarFrame,
89 kGoldBigFrame,
90 kMapBigFrame,
91 kSemblanceFrame,
92 kTrapDoorFrame,
93 kBonesFrame,
94 kSackBigFrame,
95 kSporesFrame,
96 kGemGlintFrame,
97 kStoneFrame,
98 kGreenStoneFrame,
99 kGemBigFrame,
100 kStoneBigFrame,
101 kPileFrame,
102 kNoteBigFrame,
103
104 // 45 - 48 are Merchant frames
105 kMerchantFrame,
106
107 // Remaining frames
108 kCoinBigFrame = 49,
109 kPileBigFrame,
110 kKingFrame,
111 kDeadKingFrame,
112 kBombBigFrame,
113 kRingBigFrame,
114 kKnifeBigFrame,
115 kCarpetBigFrame,
116 kAnaInHoleFrame,
117 kAnaNotInHoleFrame,
118 kInvisRingFrame
119};
120
121enum SpriteName {
122 // Moresprites 10
123 kCandle,
124 kWow,
125 kAnaVanish,
126 kSink,
127 kTrapdoor,
128 kWizPhant,
129 kVanish,
130 kShadow,
131 kSlime,
132 kSlimeDeath,
133
134 // Norlac 5
135 kBridge,
136 kVortex,
137 kBubble,
138 kNorlac,
139 kNolac2,
140
141 // Powwow 7
142 kPlanners,
143 kUgh,
144 kIsDevoured,
145 kIsBadCrawl,
146 kIsGoodCrawl,
147 kLeg,
148 kIsWebbed,
149
150 // Turrets 10
151 kSleep,
152 kShrink,
153 kLocksmith,
154 kAnaGlimpse,
155 kMadKing,
156 kTorch,
157 kPipe,
158 kProjectile,
159 kKnife,
160 kAnaHug,
161
162 // Worm 4
163 kWorm0,
164 kWorm1,
165 kSpike,
166 kIsSpiked,
167
168 // Iansprites 6
169 kMurder,
170 kWizCrawlUp,
171 kWizLight,
172 kWizBattle,
173 kDown,
174 kNorlacDown,
175
176 // Lastsprites 3
177 kWaterLadder,
178 kPulledDown,
179 kSpill,
180
181 // Doorsprites 10
182 kDoor,
183 kTele,
184 kBomb,
185 kTorched,
186 kLadderTop,
187 kSecret,
188 kLadderBottom,
189 kSlipped,
190 kGoblinSlipped,
191 kFlame,
192
193 // General 5
194 kArrow,
195 kSpark,
196 kObject,
197 kBigBurst,
198 kBeam,
199
200 // Mordamir 3
201 kLight,
202 kMord,
203 kDragMask,
204
205 // Dragon2 2
206 kDFlames,
207 kThroat,
208
209 // Dragon 1
210 kDragon,
211
212 // Rope 3
213 kChop,
214 kHead,
215 kNurse,
216
217 // Rescue 2
218 kRescue1,
219 kRescue2,
220
221 // Troll 9 (8 directions + ?)
222 kTroll0,
223 kTroll1,
224 kTroll2,
225 kTroll3,
226 kTroll4,
227 kTroll5,
228 kTroll6,
229 kTroll7,
230 kTroll8,
231
232 // Goblin 10 (8 directions + ?)
233 kGoblin0,
234 kGoblin1,
235 kGoblin2,
236 kGoblin3,
237 kGoblin4,
238 kGoblin5,
239 kGoblin6,
240 kGoblin7,
241 kGoblin8,
242 kGoblin9,
243
244 // Wizard A 8 (8 directions)
245 kWizard0,
246 kWizard1,
247 kWizard2,
248 kWizard3,
249 kWizard4,
250 kWizard5,
251 kWizard6,
252 kWizard7,
253
254 // Wizard B 3 (3 ?)
255 kWizard8,
256 kWizard9,
257 kWizard10,
258
259 // Ulindor 9 (8 directions + ?)
260 kUlindor0,
261 kUlindor1,
262 kUlindor2,
263 kUlindor3,
264 kUlindor4,
265 kUlindor5,
266 kUlindor6,
267 kUlindor7,
268 kUlindor8,
269
270 // Spider 10 (probably not directions)
271 kSpider0,
272 kSpider1,
273 kSpider2,
274 kSpider3,
275 kSpider4,
276 kSpider5,
277 kSpider6,
278 kSpider7,
279 kSpider8,
280 kSpider9,
281
282 // Drag 9 (probably not directions)
283 kDrag0,
284 kDrag1,
285 kDrag2,
286 kDrag3,
287 kDrag4,
288 kDrag5,
289 kDrag6,
290 kDrag7,
291 kDrag8,
292
293 // Font
294 kFont
295};
296
297} // namespace Immortal
298
299#endif
Definition: array.h:52
Definition: sprite_list.h:40
Definition: sprite_list.h:30
Definition: sprite_list.h:47