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