ScummVM API documentation
mickey.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 AGI_PREAGI_MICKEY_H
23 #define AGI_PREAGI_MICKEY_H
24 
25 namespace Agi {
26 
27 #define MSA_SAVEGAME_VERSION 2
28 
29 // strings
30 #define IDS_MSA_PATH_DAT "dat/%s"
31 #define IDS_MSA_PATH_OBJ "obj/%s.ooo"
32 #define IDS_MSA_PATH_PIC "%d.pic"
33 #define IDS_MSA_PATH_LOGO "logos.bcg"
34 
35 #define IDS_MSA_INVENTORY "MICKEY IS CARRYING THE FOLLOWING:"
36 #define IDS_MSA_CRYSTALS "%s CRYSTALS"
37 
38 const char IDS_MSA_CRYSTAL_NO[][3] = {
39  "NO", " 1", " 2", " 3", " 4", " 5", " 6", " 7", " 8", " 9"
40 };
41 const char IDS_MSA_TEMP_C[][5] = {
42  " 20 ", " 480", "-200", " 430", "-185", "-230", "-130", "-150", "-215"
43 };
44 const char IDS_MSA_TEMP_F[][5] = {
45  " 68 ", " 897", "-328", " 807", "-301", "-382", "-202", "-238", "-355"
46 };
47 const char IDS_MSA_PLANETS[][10] = {
48  "EARTH. ", "VENUS. ", "TRITON. ", "MERCURY.", "TITAN. ",
49  "PLUTO. ", "IO. ", "MARS. ", "OBERON. "
50 };
51 
52 const char IDS_MSA_ERRORS[][40] = {
53  "THAT CANNOT BE UNDERSTOOD",
54  "TRY GOING THERE INSTEAD",
55  "THAT CAN'T BE DONE",
56  "MICKEY WOULDN'T WANT TO DO THAT!",
57  "WHICH DIRECTION?",
58  "THAT DOESN'T MAKE SENSE!",
59  "MICKEY WOULDN'T WANT TO DO THAT!"
60 };
61 
62 // patch Mickey.exe offset 0x21E to value 0x01 to enable debug mode
63 
64 const char IDS_MSA_INSERT_DISK[][40] = {
65  "Please insert disk 1 and press any key", "Please insert disk 2 and press any key"
66 };
67 
68 // max values
69 
70 #define IDI_MSA_MAX_PLANET 9
71 #define IDI_MSA_MAX_DAT 10
72 #define IDI_MSA_MAX_PIC_ROOM 224
73 #define IDI_MSA_MAX_ROOM 160
74 
75 #define IDI_MSA_MAX_BUTTON 6
76 #define IDI_MSA_MAX_ITEM 11
77 
78 #define IDI_MSA_ANIM_DELAY 25
79 
80 #define IDI_MSA_LEN_STORY 1372
81 
82 // rows
83 
84 #define IDI_MSA_ROW_MENU_0 20
85 #define IDI_MSA_ROW_MENU_1 21
86 #define IDI_MSA_ROW_INV_TITLE 2
87 #define IDI_MSA_ROW_INV_CRYSTALS 4
88 #define IDI_MSA_ROW_INV_ITEMS 5
89 #define IDI_MSA_ROW_TEMPERATURE 21
90 #define IDI_MSA_ROW_PLANET 22
91 #define IDI_MSA_ROW_INSERT_DISK 23
92 
93 #define IDI_MSA_COL_INV_TITLE 4
94 #define IDI_MSA_COL_INV_ITEMS 15
95 #define IDI_MSA_COL_PLANET 28
96 #define IDI_MSA_COL_INSERT_DISK 1
97 
98 // screen
99 
100 #define IDI_MSA_PIC_WIDTH 140
101 #define IDI_MSA_PIC_HEIGHT 159
102 
103 // pictures
104 
105 #define IDI_MSA_PIC_EARTH_TIRE_SWING 1
106 #define IDI_MSA_PIC_EARTH_TIRE_SWING_1 200 // rope taken, swing on ground
107 #define IDI_MSA_PIC_EARTH_DOGHOUSE 2
108 #define IDI_MSA_PIC_EARTH_IN_DOGHOUSE 154
109 #define IDI_MSA_PIC_EARTH_TREE 3
110 #define IDI_MSA_PIC_EARTH_GARDEN 4
111 #define IDI_MSA_PIC_EARTH_FRONT_HOUSE 5
112 #define IDI_MSA_PIC_EARTH_HAMMOCK 6
113 #define IDI_MSA_PIC_EARTH_BUTTERFLY 7
114 #define IDI_MSA_PIC_EARTH_MAILBOX 8
115 #define IDI_MSA_PIC_EARTH_ROAD_0 9
116 #define IDI_MSA_PIC_EARTH_ROAD_1 10
117 #define IDI_MSA_PIC_EARTH_ROAD_2 11
118 #define IDI_MSA_PIC_EARTH_ROAD_3 12
119 #define IDI_MSA_PIC_EARTH_ROAD_4 13 // starting room
120 #define IDI_MSA_PIC_EARTH_ROAD_5 14
121 #define IDI_MSA_PIC_EARTH_ROAD_6 15
122 #define IDI_MSA_PIC_EARTH_ROAD_7 18
123 #define IDI_MSA_PIC_EARTH_UNDER_TREE 16
124 #define IDI_MSA_PIC_EARTH_UP_IN_TREE 155 // CRYSTAL
125 #define IDI_MSA_PIC_EARTH_SHIP 17
126 #define IDI_MSA_PIC_EARTH_LIVING_ROOM 19
127 #define IDI_MSA_PIC_EARTH_KITCHEN 20
128 #define IDI_MSA_PIC_EARTH_KITCHEN_1 159 // cupboard open
129 #define IDI_MSA_PIC_EARTH_GARAGE 21
130 #define IDI_MSA_PIC_EARTH_GARAGE_1 160 // cabinet open
131 #define IDI_MSA_PIC_EARTH_BEDROOM 22
132 #define IDI_MSA_PIC_EARTH_BEDROOM_1 161 // closet open
133 #define IDI_MSA_PIC_EARTH_BATHROOM 23 // WEIGH MICKEY
134 #define IDI_MSA_PIC_EARTH_SHIP_LEAVING 24
135 #define IDI_MSA_PIC_EARTH_MINNIE 25
136 
137 #define IDI_MSA_PIC_SHIP_AIRLOCK 25
138 #define IDI_MSA_PIC_SHIP_AIRLOCK_0 201 // door closed
139 #define IDI_MSA_PIC_SHIP_AIRLOCK_1 202 // door open
140 #define IDI_MSA_PIC_SHIP_AIRLOCK_2 203 // door closed, spacesuits on
141 #define IDI_MSA_PIC_SHIP_AIRLOCK_3 204 // door open, spacesuits on
142 #define IDI_MSA_PIC_SHIP_BEDROOM 29
143 #define IDI_MSA_PIC_SHIP_CONTROLS 26
144 #define IDI_MSA_PIC_SHIP_CORRIDOR 27
145 #define IDI_MSA_PIC_SHIP_KITCHEN 28
146 #define IDI_MSA_PIC_SHIP_KITCHEN_1 172 // cabinet open
147 
148 #define IDI_MSA_PIC_SHIP_VENUS 146
149 #define IDI_MSA_PIC_SHIP_NEPTUNE 147
150 #define IDI_MSA_PIC_SHIP_MERCURY 148
151 #define IDI_MSA_PIC_SHIP_SATURN 149
152 #define IDI_MSA_PIC_SHIP_PLUTO 150
153 #define IDI_MSA_PIC_SHIP_JUPITER 151
154 #define IDI_MSA_PIC_SHIP_MARS 152
155 #define IDI_MSA_PIC_SHIP_URANUS 153
156 
157 #define IDI_MSA_PIC_VENUS_0 30
158 #define IDI_MSA_PIC_VENUS_1 31
159 #define IDI_MSA_PIC_VENUS_2 32
160 #define IDI_MSA_PIC_VENUS_3 34
161 #define IDI_MSA_PIC_VENUS_4 36
162 #define IDI_MSA_PIC_VENUS_5 38
163 #define IDI_MSA_PIC_VENUS_CHASM 35
164 #define IDI_MSA_PIC_VENUS_CHASM_1 183 // rope lowered
165 #define IDI_MSA_PIC_VENUS_PROBE 39 // CRYSTAL, USE WRENCH
166 #define IDI_MSA_PIC_VENUS_PROBE_1 184 // hatch open
167 #define IDI_MSA_PIC_VENUS_SHIP 33
168 #define IDI_MSA_PIC_VENUS_WEIGH 37 // WEIGH MICKEY
169 
170 #define IDI_MSA_PIC_NEPTUNE_0 40
171 #define IDI_MSA_PIC_NEPTUNE_1 42
172 #define IDI_MSA_PIC_NEPTUNE_2 43
173 #define IDI_MSA_PIC_NEPTUNE_3 44
174 #define IDI_MSA_PIC_NEPTUNE_4 45
175 #define IDI_MSA_PIC_NEPTUNE_5 48
176 #define IDI_MSA_PIC_NEPTUNE_6 50
177 #define IDI_MSA_PIC_NEPTUNE_7 52
178 #define IDI_MSA_PIC_NEPTUNE_8 53
179 #define IDI_MSA_PIC_NEPTUNE_9 54
180 #define IDI_MSA_PIC_NEPTUNE_10 55
181 #define IDI_MSA_PIC_NEPTUNE_11 56
182 #define IDI_MSA_PIC_NEPTUNE_BABIES 61
183 #define IDI_MSA_PIC_NEPTUNE_CASTLE_0 46
184 #define IDI_MSA_PIC_NEPTUNE_CASTLE_1 51
185 #define IDI_MSA_PIC_NEPTUNE_CASTLE_2 57
186 #define IDI_MSA_PIC_NEPTUNE_CASTLE_3 58
187 #define IDI_MSA_PIC_NEPTUNE_CASTLE_4 59
188 #define IDI_MSA_PIC_NEPTUNE_CASTLE_5 60
189 #define IDI_MSA_PIC_NEPTUNE_CASTLE_6 66
190 #define IDI_MSA_PIC_NEPTUNE_CASTLE_7 67
191 #define IDI_MSA_PIC_NEPTUNE_CASTLE_8 68
192 #define IDI_MSA_PIC_NEPTUNE_EATING_AREA 62
193 #define IDI_MSA_PIC_NEPTUNE_ENTRANCE 47
194 #define IDI_MSA_PIC_NEPTUNE_ENTRANCE_1 185 // entrance open
195 #define IDI_MSA_PIC_NEPTUNE_ENTRYWAY 63
196 #define IDI_MSA_PIC_NEPTUNE_GUARD 69
197 #define IDI_MSA_PIC_NEPTUNE_LEADER 64 // CRYSTAL, GIVE SCARF
198 #define IDI_MSA_PIC_NEPTUNE_SHIP 49
199 #define IDI_MSA_PIC_NEPTUNE_SLEEP_AREA 65
200 #define IDI_MSA_PIC_NEPTUNE_WEIGH 41
201 
202 #define IDI_MSA_PIC_MERCURY_0 71
203 #define IDI_MSA_PIC_MERCURY_1 73
204 #define IDI_MSA_PIC_MERCURY_2 75
205 #define IDI_MSA_PIC_MERCURY_3 77
206 #define IDI_MSA_PIC_MERCURY_4 80
207 #define IDI_MSA_PIC_MERCURY_ALIEN_0 72 // CRYSTAL, GIVE SUNGLASSES
208 #define IDI_MSA_PIC_MERCURY_ALIEN_1 74
209 #define IDI_MSA_PIC_MERCURY_ALIEN_2 81
210 #define IDI_MSA_PIC_MERCURY_CAVE_0 70 // hidden feature, press '2' here
211 #define IDI_MSA_PIC_MERCURY_CAVE_1 78
212 #define IDI_MSA_PIC_MERCURY_CAVE_2 79
213 #define IDI_MSA_PIC_MERCURY_SHIP 76
214 #define IDI_MSA_PIC_MERCURY_WEIGH 82
215 
216 #define IDI_MSA_PIC_SATURN_0 84
217 #define IDI_MSA_PIC_SATURN_1 86
218 #define IDI_MSA_PIC_SATURN_2 90
219 #define IDI_MSA_PIC_SATURN_3 91
220 #define IDI_MSA_PIC_SATURN_ISLAND 89 // CRYSTAL
221 #define IDI_MSA_PIC_SATURN_LAKE_0 85 // USE MATTRESS
222 #define IDI_MSA_PIC_SATURN_LAKE_1 88 // USE MATTRESS
223 #define IDI_MSA_PIC_SATURN_LAKE_2 92 // USE MATTRESS
224 #define IDI_MSA_PIC_SATURN_SHIP 87
225 #define IDI_MSA_PIC_SATURN_WEIGH 83 // WEIGH MICKEY
226 
227 #define IDI_MSA_PIC_PLUTO_0 93
228 #define IDI_MSA_PIC_PLUTO_1 96
229 #define IDI_MSA_PIC_PLUTO_2 97
230 #define IDI_MSA_PIC_PLUTO_3 98
231 #define IDI_MSA_PIC_PLUTO_4 101
232 #define IDI_MSA_PIC_PLUTO_ALIENS 100 // CRYSTAL, GIVE BONE
233 #define IDI_MSA_PIC_PLUTO_CAVE_0 99
234 #define IDI_MSA_PIC_PLUTO_CAVE_1 103
235 #define IDI_MSA_PIC_PLUTO_CRATER 102
236 #define IDI_MSA_PIC_PLUTO_SHIP 95
237 #define IDI_MSA_PIC_PLUTO_WEIGH 94 // WEIGH MICKEY
238 
239 #define IDI_MSA_PIC_JUPITER_0 106
240 #define IDI_MSA_PIC_JUPITER_1 107
241 #define IDI_MSA_PIC_JUPITER_2 108
242 #define IDI_MSA_PIC_JUPITER_3 109
243 #define IDI_MSA_PIC_JUPITER_4 113
244 #define IDI_MSA_PIC_JUPITER_5 116
245 #define IDI_MSA_PIC_JUPITER_6 117
246 #define IDI_MSA_PIC_JUPITER_7 120
247 #define IDI_MSA_PIC_JUPITER_CRACK 114
248 #define IDI_MSA_PIC_JUPITER_LAVA 110 // CRYSTAL, THROW ROCK
249 #define IDI_MSA_PIC_JUPITER_ROCK_0 112 // GET ROCK
250 #define IDI_MSA_PIC_JUPITER_ROCK_1 119 // GET ROCK
251 #define IDI_MSA_PIC_JUPITER_SHIP 115
252 #define IDI_MSA_PIC_JUPITER_WEIGH 118 // WEIGH MICKEY
253 
254 #define IDI_MSA_PIC_MARS_0 121
255 #define IDI_MSA_PIC_MARS_1 124
256 #define IDI_MSA_PIC_MARS_2 125
257 #define IDI_MSA_PIC_MARS_3 126
258 #define IDI_MSA_PIC_MARS_4 127
259 #define IDI_MSA_PIC_MARS_5 128
260 #define IDI_MSA_PIC_MARS_6 130
261 #define IDI_MSA_PIC_MARS_SHIP 123
262 #define IDI_MSA_PIC_MARS_TUBE_0 129
263 #define IDI_MSA_PIC_MARS_TUBE_1 131
264 #define IDI_MSA_PIC_MARS_VOLCANO 132 // CRYSTAL, DIG PLUTO
265 #define IDI_MSA_PIC_MARS_WEIGH 122 // WEIGH MICKEY
266 
267 #define IDI_MSA_PIC_URANUS_0 133
268 #define IDI_MSA_PIC_URANUS_1 134
269 #define IDI_MSA_PIC_URANUS_2 135
270 #define IDI_MSA_PIC_URANUS_3 138
271 #define IDI_MSA_PIC_URANUS_4 139
272 #define IDI_MSA_PIC_URANUS_5 140
273 #define IDI_MSA_PIC_URANUS_6 142
274 #define IDI_MSA_PIC_URANUS_CHAMBER 145 // CRYSTAL, USE CROWBAR
275 #define IDI_MSA_PIC_URANUS_SHIP 137
276 #define IDI_MSA_PIC_URANUS_STEPS 144
277 #define IDI_MSA_PIC_URANUS_ENTRANCE 141 // ENTER TEMPLE
278 #define IDI_MSA_PIC_URANUS_TEMPLE 143 // USE CRYSTAL, ENTER DOOR
279 #define IDI_MSA_PIC_URANUS_TEMPLE_1 206 // crystal used
280 #define IDI_MSA_PIC_URANUS_TEMPLE_2 207 // door open
281 #define IDI_MSA_PIC_URANUS_WEIGH 136 // WEIGH MICKEY
282 
283 #define IDI_MSA_PIC_STAR_MAP 165
284 #define IDI_MSA_PIC_TITLE 240
285 
286 // objects
287 
288 enum ENUM_MSA_OBJECT {
289  IDI_MSA_OBJECT_NONE = -1,
290  IDI_MSA_OBJECT_ROCK_0,
291  IDI_MSA_OBJECT_WRENCH,
292  IDI_MSA_OBJECT_SCALE,
293  IDI_MSA_OBJECT_CROWBAR,
294  IDI_MSA_OBJECT_BONE,
295  IDI_MSA_OBJECT_SUNGLASSES,
296  IDI_MSA_OBJECT_DESK_STUFF,
297  IDI_MSA_OBJECT_MATTRESS,
298  IDI_MSA_OBJECT_SCARF,
299  IDI_MSA_OBJECT_FLASHLIGHT,
300  IDI_MSA_OBJECT_ROPE,
301  IDI_MSA_OBJECT_ROCK_1,
302  IDI_MSA_OBJECT_SCARF_C64,
303  IDI_MSA_OBJECT_ROCK_2,
304  IDI_MSA_OBJECT_ROCK_3,
305  IDI_MSA_OBJECT_W_EARTH,
306  IDI_MSA_OBJECT_W_VENUS,
307  IDI_MSA_OBJECT_W_TRITON,
308  IDI_MSA_OBJECT_W_MERCURY,
309  IDI_MSA_OBJECT_W_TITAN,
310  IDI_MSA_OBJECT_W_PLUTO,
311  IDI_MSA_OBJECT_W_IO,
312  IDI_MSA_OBJECT_W_MARS,
313  IDI_MSA_OBJECT_W_OBERON,
314  IDI_MSA_OBJECT_W_SPACE,
315  IDI_MSA_OBJECT_XL31,
316  IDI_MSA_OBJECT_XL31E,
317  IDI_MSA_OBJECT_XL32,
318  IDI_MSA_OBJECT_XL32E,
319  IDI_MSA_OBJECT_XL33,
320  IDI_MSA_OBJECT_XL33E,
321  IDI_MSA_OBJECT_CRYSTAL
322 };
323 
324 const char IDS_MSA_NAME_OBJ[][9] = {
325  "rok1", "wrench", "scale", "cbar", "bone", "glasses", "deskstuf", "raft",
326  "scarf", "flashlit", "rope", "rok1", "scarfc64", "rok2", "rock35", "earthw",
327  "venw", "trw", "merw", "titw", "plw", "iow", "mrw", "obw", "spw", "xl31",
328  "xl31e", "xl32", "xl32e", "xl33", "xl33e", "crys1"
329 };
330 
331 const int IDI_MSA_XTAL_ROOM_XY[IDI_MSA_MAX_PLANET][3] = {
332  // room x y
333  {IDI_MSA_PIC_EARTH_UP_IN_TREE, 14, 76},
334  {IDI_MSA_PIC_VENUS_PROBE, 74, 80},
335  {IDI_MSA_PIC_NEPTUNE_LEADER, 70, 27},
336  {IDI_MSA_PIC_MERCURY_ALIEN_0, 123, 64},
337  {IDI_MSA_PIC_SATURN_ISLAND, 110, 115},
338  {IDI_MSA_PIC_PLUTO_ALIENS, 60, 104},
339  {IDI_MSA_PIC_JUPITER_LAVA, 56, 54},
340  {IDI_MSA_PIC_MARS_VOLCANO, 107, 100},
341  {IDI_MSA_PIC_URANUS_CHAMBER, 90, 4}
342 };
343 
344 // planets
345 
346 enum ENUM_MSA_PLANET {
347  IDI_MSA_PLANET_EARTH = 0,
348  IDI_MSA_PLANET_VENUS,
349  IDI_MSA_PLANET_NEPTUNE,
350  IDI_MSA_PLANET_MERCURY,
351  IDI_MSA_PLANET_SATURN,
352  IDI_MSA_PLANET_PLUTO,
353  IDI_MSA_PLANET_JUPITER,
354  IDI_MSA_PLANET_MARS,
355  IDI_MSA_PLANET_URANUS,
356  IDI_MSA_PLANET_SPACESHIP
357 };
358 
359 const char IDS_MSA_NAME_DAT[][13] = {
360  "earth.dat", "venus.dat", "neptune.dat", "mercury.dat", "saturn.dat",
361  "pluto.dat", "jupiter.dat", "mars.dat", "uranus.dat", "spacship.dat"
362 };
363 
364 const char IDS_MSA_NAME_PLANET[][10] = {
365  "EARTH", "VENUS", "TRITON", "MERCURY", "TITAN",
366  "PLUTO", "IO", "MARS", "OBERON"
367 };
368 
369 const char IDS_MSA_NAME_PLANET_2[][10] = {
370  "EARTH", "VENUS", "NEPTUNE", "MERCURY", "SATURN",
371  "PLUTO", "JUPITER", "MARS", "URANUS"
372 };
373 
374 const char IDS_MSA_ADDR_PLANET[][7] = {
375  "OB", "B", "OOBBB", "O", "OOBB",
376  "OOOBBB", "OBB", "OOB", "OOOBB"
377 };
378 
379 const int IDI_MSA_HOME_PLANET[] = {
380  IDI_MSA_PIC_EARTH_SHIP, IDI_MSA_PIC_VENUS_SHIP, IDI_MSA_PIC_NEPTUNE_SHIP, IDI_MSA_PIC_MERCURY_SHIP,
381  IDI_MSA_PIC_SATURN_SHIP, IDI_MSA_PIC_PLUTO_SHIP, IDI_MSA_PIC_JUPITER_SHIP, IDI_MSA_PIC_MARS_SHIP,
382  IDI_MSA_PIC_URANUS_SHIP
383 };
384 
385 const int IDI_MSA_SHIP_PLANET[] = {
386  0, IDI_MSA_PIC_SHIP_VENUS, IDI_MSA_PIC_SHIP_NEPTUNE, IDI_MSA_PIC_SHIP_MERCURY, IDI_MSA_PIC_SHIP_SATURN,
387  IDI_MSA_PIC_SHIP_PLUTO, IDI_MSA_PIC_SHIP_JUPITER, IDI_MSA_PIC_SHIP_MARS, IDI_MSA_PIC_SHIP_URANUS
388 };
389 
390 // items
391 
392 enum ENUM_MSA_ITEM {
393  IDI_MSA_ITEM_FLASHLIGHT = 0,
394  IDI_MSA_ITEM_ROPE,
395  IDI_MSA_ITEM_BONE,
396  IDI_MSA_ITEM_LETTER,
397  IDI_MSA_ITEM_CROWBAR,
398  IDI_MSA_ITEM_WRENCH,
399  IDI_MSA_ITEM_MATTRESS,
400  IDI_MSA_ITEM_SCARF,
401  IDI_MSA_ITEM_SUNGLASSES,
402  IDI_MSA_ITEM_SCALE,
403  IDI_MSA_ITEM_ROCK
404 };
405 
406 const char IDS_MSA_NAME_ITEM[][15] = {
407  "A FLASHLIGHT", "A ROPE ", "A BONE ", "A LETTER", "A CROWBAR", "A WRENCH",
408  "A MATTRESS", "A SCARF", "SUNGLASSES", "A SCALE ", "A ROCK "
409 };
410 
411 // buttons
412 
413 #define IDI_MSA_BUTTON_ORANGE 0x4F // 'O'
414 #define IDI_MSA_BUTTON_BLUE 0x42 // 'B'
415 
416 // file structures
417 
419  uint8 x0;
420  uint8 szText[11];
421 };
422 
424  uint8 count;
425  MSA_TEXT_ENTRY entry[5];
426 };
427 
429  uint8 data[5];
430 };
431 
432 struct MSA_MENU {
433  MSA_TEXT_BLOCK row[2];
434  MSA_MSG_BLOCK cmd[5];
435  MSA_MSG_BLOCK arg[5];
436 };
437 
439  uint16 filelen;
440  uint16 ofsRoom[IDI_MSA_MAX_ROOM];
441  uint16 ofsDesc[IDI_MSA_MAX_ROOM];
442  uint16 ofsStr[IDI_MSA_MAX_ROOM];
443 };
444 
445 struct MSA_SND_NOTE {
446  uint16 counter; // freq = 1193180 / counter
447  uint8 length; // msec = length / 0.0182
448 };
449 
450 // file offset modifiers
451 
452 #define IDI_MSA_OFS_DAT 0x0002
453 #define IDI_MSA_OFS_EXE 0x35C0
454 
455 // actions
456 
457 #define IDI_MSA_ACTION_GOTO_ROOM 0x00
458 #define IDI_MSA_ACTION_SHOW_INT_STR 0x01
459 #define IDI_MSA_ACTION_UNUSED 0x02
460 #define IDI_MSA_ACTION_SHOW_DAT_STR 0x03
461 
462 #define IDI_MSA_ACTION_GET_ROPE 0x7F
463 #define IDI_MSA_ACTION_UNTIE_ROPE 0x80
464 #define IDI_MSA_ACTION_GET_BONE 0x81
465 #define IDI_MSA_ACTION_GET_XTAL_EARTH 0x82
466 #define IDI_MSA_ACTION_LOOK_DESK 0x83
467 #define IDI_MSA_ACTION_WRITE_LETTER 0x84
468 #define IDI_MSA_ACTION_MAIL_LETTER 0x85
469 #define IDI_MSA_ACTION_OPEN_CUPBOARD 0x86
470 #define IDI_MSA_ACTION_GET_FLASHLIGHT 0x87
471 #define IDI_MSA_ACTION_OPEN_CABINET 0x88
472 #define IDI_MSA_ACTION_GET_CROWBAR 0x89
473 #define IDI_MSA_ACTION_GET_WRENCH 0x8A
474 #define IDI_MSA_ACTION_OPEN_CLOSET 0x8B
475 #define IDI_MSA_ACTION_GET_MATTRESS 0x8C
476 #define IDI_MSA_ACTION_GET_SCARF 0x8D
477 #define IDI_MSA_ACTION_GET_SUNGLASSES 0x8E
478 #define IDI_MSA_ACTION_GET_SCALE 0x8F
479 #define IDI_MSA_ACTION_GOTO_SPACESHIP 0x90
480 
481 #define IDI_MSA_ACTION_DOWN_CHASM 0x91
482 #define IDI_MSA_ACTION_DOWN_ROPE 0x92
483 #define IDI_MSA_ACTION_USE_ROPE 0x93
484 #define IDI_MSA_ACTION_OPEN_HATCH 0x94
485 #define IDI_MSA_ACTION_USE_WRENCH 0x95
486 #define IDI_MSA_ACTION_GET_XTAL_VENUS 0x96
487 
488 #define IDI_MSA_ACTION_LOOK_CASTLE 0x97
489 #define IDI_MSA_ACTION_ENTER_OPENING 0x98
490 #define IDI_MSA_ACTION_USE_CROWBAR 0x99
491 #define IDI_MSA_ACTION_GET_XTAL_NEPTUNE 0x9A
492 #define IDI_MSA_ACTION_TALK_LEADER 0x9B
493 #define IDI_MSA_ACTION_GIVE_SCARF 0x9C
494 
495 #define IDI_MSA_ACTION_GET_XTAL_MERCURY 0x9D
496 #define IDI_MSA_ACTION_GIVE_SUNGLASSES 0x9E
497 #define IDI_MSA_ACTION_CROSS_LAKE 0x9F
498 #define IDI_MSA_ACTION_USE_MATTRESS 0xA0
499 #define IDI_MSA_ACTION_GET_XTAL_SATURN 0xA1
500 #define IDI_MSA_ACTION_LEAVE_ISLAND 0xA2
501 
502 #define IDI_MSA_ACTION_GET_XTAL_PLUTO 0xA3
503 #define IDI_MSA_ACTION_GIVE_BONE 0xA4
504 
505 #define IDI_MSA_ACTION_GET_ROCK_0 0xA5
506 #define IDI_MSA_ACTION_GET_ROCK_1 0xA6
507 #define IDI_MSA_ACTION_GET_XTAL_JUPITER 0xA7
508 #define IDI_MSA_ACTION_THROW_ROCK 0xA8
509 
510 #define IDI_MSA_ACTION_GO_TUBE 0xA9
511 #define IDI_MSA_ACTION_USE_FLASHLIGHT 0xAA
512 #define IDI_MSA_ACTION_PLUTO_DIG 0xAB
513 #define IDI_MSA_ACTION_GET_XTAL_MARS 0xAC
514 
515 #define IDI_MSA_ACTION_USE_CRYSTAL 0xAD
516 #define IDI_MSA_ACTION_OPEN_DOOR 0xAE
517 #define IDI_MSA_ACTION_ENTER_DOOR 0xAF
518 #define IDI_MSA_ACTION_GET_XTAL_URANUS 0xB0
519 #define IDI_MSA_ACTION_USE_CROWBAR_1 0xB1
520 
521 #define IDI_MSA_ACTION_GO_NORTH 0xB2
522 #define IDI_MSA_ACTION_GO_PLANET 0xB3
523 #define IDI_MSA_ACTION_PRESS_BUTTON 0xB4
524 #define IDI_MSA_ACTION_WEAR_SPACESUIT 0xB5
525 #define IDI_MSA_ACTION_READ_GAUGE 0xB6
526 #define IDI_MSA_ACTION_PRESS_ORANGE 0xB7
527 #define IDI_MSA_ACTION_PRESS_BLUE 0xB8
528 #define IDI_MSA_ACTION_FLIP_SWITCH 0xB9
529 #define IDI_MSA_ACTION_PUSH_THROTTLE 0xBA
530 #define IDI_MSA_ACTION_PULL_THROTTLE 0xBB
531 #define IDI_MSA_ACTION_LEAVE_ROOM 0xBC
532 #define IDI_MSA_ACTION_OPEN_CABINET_1 0xBD
533 #define IDI_MSA_ACTION_READ_MAP 0xBE
534 #define IDI_MSA_ACTION_GO_WEST 0xBF
535 
536 #define IDI_MSA_ACTION_PLANET_INFO 0xC0
537 #define IDI_MSA_ACTION_ENTER_TEMPLE 0xC1
538 #define IDI_MSA_ACTION_OPEN_MAILBOX 0xC2
539 #define IDI_MSA_ACTION_SAVE_GAME 0xC3
540 #define IDI_MSA_ACTION_LOOK_MICKEY 0xC4
541 
542 // sounds
543 
544 enum ENUM_MSA_SOUND {
545  IDI_MSA_SND_THEME,
546  IDI_MSA_SND_CRYSTAL,
547  IDI_MSA_SND_TAKE,
548  IDI_MSA_SND_GAME_OVER,
549  IDI_MSA_SND_PRESS_BLUE,
550  IDI_MSA_SND_PRESS_ORANGE,
551  IDI_MSA_SND_SHIP_LAND,
552  IDI_MSA_SND_XL30
553 };
554 
555 // message offsets within mickey.exe
556 
557 const int IDO_MSA_HIDDEN_MSG[] = {
558  0x8C44, 0x8C83, 0x8D23, 0x8D97, 0x8E2A
559 };
560 
561 const int IDO_MSA_GAME_OVER[] = {
562  0x7914, 0x7978, 0x7A17, 0x7A94, 0x7B04, 0x7B8F, 0x7BEB, 0x7C79
563 };
564 
565 const int IDO_MSA_SAVE_GAME[] = {
566  0x73FA, 0x7436, 0x746C, 0x74E9, 0x75F6, 0x766A, 0x758B
567  // do you have a formatted disk, insert disk, insert disk 2, save by number
568  // everything will be lost, previous game will be lost, game saved
569 };
570 
571 const int IDO_MSA_LOAD_GAME[] = {
572  0x76CE, 0x770B, 0x7777
573  // do you want to load game, insert game save disk, game restored
574 };
575 
576 const int IDO_MSA_AIR_SUPPLY[] = {
577  0x7D10, 0x7D31, 0x7D51, 0x7D9B
578  // be aware, low, dangerously low, out of air
579 };
580 
581 const int IDI_MSA_AIR_SUPPLY[] = { 30, 20, 10, 0 };
582 
583 // planet information
584 
585 const int IDO_MSA_PLANET_INFO[IDI_MSA_MAX_PLANET][4] = {
586  {0x6313, 0x63B2, 0x6449, 0}, // EARTH
587  {0x61EB, 0x6288, 0, 0}, // VENUS
588  {0x6B64, 0x6C06, 0x6CA3, 0}, // NEPTUNE
589  {0x609B, 0x612C, 0x61CA, 0}, // MERCURY
590  {0x6879, 0x6916, 0x6984, 0}, // SATURN
591  {0x6CCF, 0x6D72, 0x6E10, 0}, // PLUTO
592  {0x667C, 0x6714, 0x67B1, 0x684E}, // JUPITER
593  {0x6471, 0x650F, 0x65AD, 0x6651}, // MARS
594  {0x69C3, 0x6A62, 0x6B00, 0} // URANUS
595 };
596 
597 // next crystal piece hints
598 
599 const int IDO_MSA_NEXT_PIECE[IDI_MSA_MAX_PLANET][5] = {
600  {0, 0, 0, 0, 0}, // earth
601  {0x4DCC, 0x4E20, 0x4E64, 0x4E9E, 0x4F0B}, // venus
602  {0x5900, 0x599B, 0x5A07, 0x5A8E, 0x5B07}, // neptune
603  {0x4F57, 0x4FA3, 0x4FF1, 0x5056, 0x50BD}, // mercury
604  {0x5471, 0x54DF, 0x5548, 0x55C2, 0x562A}, // saturn
605  {0x5B78, 0x5BB6, 0x5C29, 0x5C76, 0x5CE1}, // pluto
606  {0x526B, 0x52DA, 0x5340, 0x53A1, 0x540C}, // jupiter
607  {0x50F6, 0x512C, 0x5170, 0x51D5, 0x5228}, // mars
608  {0x56AA, 0x571C, 0x579E, 0x5807, 0x5875} // uranus
609 };
610 
611 // message offsets
612 
613 #define IDO_MSA_COPYRIGHT 0x7801
614 #define IDO_MSA_INTRO 0x4679
615 #define IDO_MSA_GAME_STORY 0x6E9C
616 
617 #define IDO_MSA_PRESS_1_TO_9 0x7530
618 #define IDO_MSA_PRESS_YES_OR_NO 0x480D
619 #define IDO_MSA_TOO_MANY_BUTTONS_PRESSED 0x5DF7
620 
621 #define IDO_MSA_XL30_SPEAKING 0x4725
622 #define IDO_MSA_CRYSTAL_PIECE_FOUND 0x600C
623 
624 #define IDO_MSA_ROOM_TEXT_OFFSETS 0x8B01
625 #define IDO_MSA_ROOM_OBJECT_XY_OFFSETS 0x8EA8
626 #define IDO_MSA_ROOM_MENU_FIX 0x4a27
627 
628 // offsets to offset arrays
629 
630 #define IDOFS_MSA_MENU_PATCHES 0x5e7a
631 #define IDOFS_MSA_SOUND_DATA 0x9deb
632 
633 // game structure
634 
635 struct MSA_GAME {
636  uint8 iRoom;
637  uint8 iPlanet;
638  uint8 iDisk;
639 
640  uint8 nAir;
641  uint8 nButtons;
642  uint8 nRocks;
643 
644  uint8 nXtals;
645  uint8 iPlanetXtal[IDI_MSA_MAX_DAT];
646  uint16 iClue[IDI_MSA_MAX_PLANET];
647  char szAddr[IDI_MSA_MAX_BUTTON + 1];
648 
649  // Flags
650  bool fHasXtal;
651  bool fIntro;
652  bool fSuit;
653  bool fShipDoorOpen;
654  bool fFlying;
655  bool fStoryShown;
656  bool fPlanetsInitialized;
657  bool fTempleDoorOpen;
658  bool fAnimXL30;
659  bool fItem[IDI_MSA_MAX_ITEM];
660  bool fItemUsed[IDI_MSA_MAX_ITEM];
661 
662  int8 iItem[IDI_MSA_MAX_ITEM];
663  uint8 nItems;
664 
665  //uint8 fRmTxt[IDI_MSA_MAX_ROOM];
666  int8 iRmObj[IDI_MSA_MAX_ROOM];
667  uint8 iRmPic[IDI_MSA_MAX_ROOM];
668  uint16 oRmTxt[IDI_MSA_MAX_ROOM];
669 
670  uint8 iRmMenu[IDI_MSA_MAX_ROOM];
671  uint8 nRmMenu[IDI_MSA_MAX_ROOM];
672 
673  int8 nFrame;
674 };
675 
676 class PreAgiEngine;
677 
678 class MickeyEngine : public PreAgiEngine {
679 public:
680  MickeyEngine(OSystem *syst, const AGIGameDescription *gameDesc);
681  ~MickeyEngine() override;
682 
683  void init();
684  Common::Error go() override;
685 
686  void debugCurRoom();
687  void debugGotoRoom(int);
688  void drawPic(int);
689  void drawObj(ENUM_MSA_OBJECT, int, int);
690 
691 protected:
692  MSA_GAME _gameStateMickey;
693  bool _clickToMove;
694 
695  int getDat(int);
696  void readExe(int, uint8 *, long);
697  void getDatFileName(int, char *);
698  void readDatHdr(char *, MSA_DAT_HEADER *);
699  void readOfsData(int, int, uint8 *, long);
700  bool chooseY_N(int, bool);
701  int choose1to9(int);
702  void printStr(char *);
703  void printLine(const char *);
704  void printExeStr(int);
705  void printExeMsg(int);
706  void printDesc(int);
707  bool checkMenu();
708  void drawMenu(MSA_MENU &, int, int);
709  void getMouseMenuSelRow(MSA_MENU &, int *, int *, int, int, int);
710  bool getMenuSelRow(MSA_MENU &, int *, int *, int);
711  void getMenuSel(char *, int *, int *);
712  void centerMenu(MSA_MENU *);
713  void patchMenu(MSA_MENU *);
714  void printDatString(int);
715  void printDatMessage(int);
716  void playNote(MSA_SND_NOTE);
717  void playSound(ENUM_MSA_SOUND);
718  void drawRoomAnimation();
719  void drawRoom();
720  void drawLogo();
721  void animate();
722  void printRoomDesc();
723  bool loadGame();
724  void saveGame();
725  void showPlanetInfo();
726  void printStory();
727  int getPlanet();
728  void pressOB(int);
729  void insertDisk(int);
730  void gameOver();
731  void inventory();
732  void intro();
733  void getItem(ENUM_MSA_ITEM);
734  void getXtal(int);
735  bool parse(int, int);
736  void flipSwitch();
737  void waitAnyKey(bool anim = false);
738 
739  bool planetIsAlreadyAssigned(int planet) {
740  for (int j = 0; j < IDI_MSA_MAX_PLANET; j++) {
741  if (_gameStateMickey.iPlanetXtal[j] == planet)
742  return true;
743  }
744  return false;
745  }
746 
747  bool mickeyHasItem(int item) {
748  if (_gameStateMickey.fItem[item]) {
749  printDatMessage(90); // Mickey already has item
750  return true;
751  } else {
752  return false;
753  }
754  }
755 };
756 
757 } // End of namespace Agi
758 
759 #endif
Definition: mickey.h:678
Definition: error.h:84
Definition: mickey.h:428
Definition: mickey.h:432
Definition: mickey.h:438
Definition: preagi.h:53
Definition: mickey.h:445
Definition: mickey.h:418
Definition: mickey.h:423
Definition: mickey.h:635
Definition: system.h:161
Definition: detection.h:29
Definition: agi.h:63