ScummVM API documentation
room502.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 MADS_PHANTOM_ROOM502_H
23 #define MADS_PHANTOM_ROOM502_H
24 
25 #include "mads/madsv2/core/general.h"
26 #include "mads/madsv2/core/anim.h"
27 
28 namespace MADS {
29 namespace MADSV2 {
30 namespace Phantom {
31 namespace Rooms {
32 
33 #define local (&scratch)
34 #define ss local->sprite
35 #define seq local->sequence
36 #define aa local->animation
37 
38 #define num_cycle_stages 9 /* 9 stages of color cycling */
39 
40 struct Scratch { /* Room local variables */
41 
42  byte puzzle_picture[16]; /* one of 4 */
43  byte puzzle_sprite[16]; /* which sprite in ss */
44 
45  byte fire_1_on; /* T if fire 1 is shooting from floor */
46  byte fire_2_on;
47  byte fire_3_on;
48  byte fire_4_on;
49  int8 panel_pushed; /* will hold panel #0-15 where mouse clicked */
50  byte turning_panel; /* T if Raoul is moving (jumping, etc) */
51  byte yippie; /* T if puzzle is solved */
52  byte message_stage; /* # is next message to display (1 to 3) */
53  byte room_getting_hotter; /* Set if room getting hot */
54  byte interim_y;
55 
56  int16 interim_x; /* will hold interim coordinates for panel_pushed */
57 
58  int16 sprite[17]; /* Sprite series handles */
59  int16 sequence[17]; /* Sequence handles */
60  int16 animation[1]; /* Animation handles */
61 
62  int16 puzzle_sequence[16]; /* sequence handles for stamps */
63 
64  CycleList cycle_list[num_cycle_stages]; /* Cycling lists */
65  RGBcolor *cycle_color[num_cycle_stages]; /* Cycling colors */
66 
67  byte *cycle_pointer; /* Master cycle pointer */
68  int16 cycle_bookkeep; /* Cycling bookkeeping */
69  int16 cycle_stage; /* Set desired value (0-6) */
70 
71  uint32 hot_clock; /* Last kernel clock */
72  uint32 hot_timer; /* Timer count */
73  uint32 death_timer; /* when this reaches LENGTH_OF_LIFE, die */
74 
75 };
76 
77 
78 /* ========================= Sprite Series =================== */
79 
80 #define fx_fire_1 0 /* rm502x2 */
81 #define fx_fire_2 1 /* rm502x3 */
82 #define fx_fire_3 2 /* rm502x4 */
83 #define fx_fire_4 3 /* rm502x5 */
84 #define fx_death 4 /* rm502a2 */
85 #define fx_door 5 /* rm502x0 */
86 #define fx_trap_door 6 /* rm502x1 */
87 #define fx_rope_thrower 7 /* rm502a1 */
88 #define fx_rope_climber 8 /* rm502a3 */
89 #define fx_rope 9 /* rm502x6 */
90 #define fx_pusher 10 /* rm502a0 */
91 
92 #define fx_row_1 11 /* rm502j0 */
93 #define fx_row_2 12 /* rm502k0 */
94 #define fx_row_3 13 /* rm502l0 */
95 #define fx_row_4 14 /* rm502m0 */
96 #define fx_panel 15
97 #define fx_interim 16 /* rm502h0 */
98 
99 /* ========================= Triggers ======================== */
100 
101 #define ROOM_502_FIRE_BURST_1 60
102 #define ROOM_502_FIRE_BURST_2 63
103 #define ROOM_502_FIRE_BURST_3 66
104 #define ROOM_502_FIRE_BURST_4 69
105 #define ROOM_502_DEATH 71
106 #define ROOM_502_ENTER 77
107 #define ROOM_502_TRAP_DOOR_OPEN 80
108 #define ROOM_502_THROW_UP 82
109 
110 #define ROOM_502_ROW_1 90
111 #define ROOM_502_ROW_2 95
112 #define ROOM_502_ROW_3 100
113 #define ROOM_502_ROW_4 105
114 #define ROOM_502_ANIMATE_PANELS 110
115 
116 
117 /* ========================= Other Macros ==================== */
118 
119 #define PLAYER_X_FROM_501 43
120 #define PLAYER_Y_FROM_501 154
121 
122 #define WALK_TO_X_FROM_501 87
123 #define WALK_TO_Y_FROM_501 153
124 
125 #define CYCLE_SWITCH_TICKS 300 /* How fast room gets hot */
126 #define LENGTH_OF_LIFE 7200 /* (2 minutes ) */
127 
128 #define DEATH_X 160
129 #define DEATH_Y 148
130 
131 #define COLUMN_1_X 107
132 #define COLUMN_2_X 127
133 #define COLUMN_3_X 147
134 #define COLUMN_4_X 167
135 #define COLUMN_Y 148
136 
137 #define TRAP_DOOR_X 211
138 #define TRAP_DOOR_Y 149
139 
140 #define TRAP_DOOR_HS_X 225
141 #define TRAP_DOOR_HS_Y 28
142 
143 #define THROW_UP_X 200
144 #define THROW_UP_Y 149
145 
146 #define FIFTEEN_SECONDS 900
147 #define SIXTY_SECONDS 3600
148 #define NINETY_SECONDS 5400
149 
150 } // namespace Rooms
151 } // namespace Phantom
152 } // namespace MADSV2
153 } // namespace MADS
154 
155 #endif
Definition: mps_installer.h:31