ScummVM API documentation
room504.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_ROOM504_H
23 #define MADS_PHANTOM_ROOM504_H
24 
25 #include "mads/madsv2/core/general.h"
26 
27 namespace MADS {
28 namespace MADSV2 {
29 namespace Phantom {
30 namespace Rooms {
31 
32 #define local (&scratch)
33 #define ss local->sprite
34 #define seq local->sequence
35 #define aa local->animation
36 
37 struct Scratch { /* Room local variables */
38 
39  int16 sprite[17]; /* Sprite series handles */
40  int16 sequence[17]; /* Sequence handles */
41  int16 animation[4]; /* Animation handles */
42 
43  int16 music_choice;
44  int16 input_count; /* counter for raoul taking sword */
45 
46  int16 anim_0_running;
47  int16 anim_1_running;
48  int16 anim_2_running;
49  int16 anim_3_running;
50  int16 anim_4_running;
51  int16 anim_5_running;
52  int16 music_is_playing;
53  int16 play_count;
54  int16 fire_breath;
55 
56  int16 listen_action; /* action Raoul is going to perform */
57  int16 listen_frame;
58 
59  int16 chair_action; /* action Raoul is going to perform while in chair */
60  int16 chair_frame;
61 
62  int16 play_action; /* action Raoul is going to perform at organ */
63  int16 play_frame;
64  int16 prevent;
65 
66  int16 phan_action; /* action fight scene is going to perform at organ */
67  int16 phan_frame;
68 
69  int16 chris_talk_count;
70 
71  int16 death_count;
72 
73 };
74 
75 
76 /* ========================= Sprite Series =================== */
77 
78 #define fx_trap_door 0 /* rm504x2 */
79 #define fx_left_door 1 /* rm504x1 */
80 #define fx_right_door 2 /* rm504x0 */
81 #define fx_ramhead 3 /* rm504x3 */
82 #define fx_fire_left 4 /* rm504x4 */
83 #define fx_fire_right 5 /* rm504x5 */
84 #define fx_test 6 /* rm504x5 */
85 #define fx_a_6 7
86 #define fx_a_7 8
87 #define fx_a_0 9
88 #define fx_a_3 10
89 #define fx_a_5 11
90 #define fx_a_8 12
91 #define fx_burn 13 /* rm504x7 */
92 #define fx_take_9 14 /* *rdr_9 */
93 #define fx_music 15 /* rm504x8 */
94 #define fx_phan 15 /* facephn */
95 
96 
97 /* 'test' is used many times to load a series so that I can
98  remap it. 'test' series are used in anims. */
99  /* fx'letters' are loaded in and dumped from memory later */
100 
101 
102  /* ========================= Triggers ======================== */
103 
104 #define ROOM_504_FROM_502 60
105 #define ROOM_504_SIT 64
106 #define ROOM_504_END_LISTEN 67
107 #define ROOM_504_END_CONV 70
108 #define ROOM_504_OPEN_RIGHT_DOOR 80
109 #define ROOM_504_NEXT_FIRE 90
110 #define ROOM_504_LISTEN 95
111 #define ROOM_504_DONE_PLAYING 100
112 #define ROOM_504_LOAD_NEW_PART 110
113 #define ROOM_504_COMPLETE_CONV 120 /* (after sword battle) */
114 #define ROOM_504_RUN_PART_3 130
115 #define ROOM_504_EXIT_INTO_506 136
116 #define ROOM_504_CHRIS_TALK 145
117 
118 
119 /* ========================= Other Macros ==================== */
120 
121 #define CONV_LISTEN 19
122 #define CONV_MUSIC 27
123 #define CONV_FIGHT 21
124 
125 #define CONV19_LISTEN 0
126 #define CONV19_OTHER 1
127 
128 #define PLAYER_X_FROM_502 147
129 #define PLAYER_Y_FROM_502 131
130 
131 #define PLAYER_X_FROM_506 0
132 #define PLAYER_Y_FROM_506 109
133 
134 #define WALK_TO_X_FROM_506 39
135 #define WALK_TO_Y_FROM_506 118
136 
137 #define PLAYER_X_FROM_505 317
138 #define PLAYER_Y_FROM_505 115
139 
140 #define WALK_TO_X_FROM_505 279
141 #define WALK_TO_Y_FROM_505 121
142 
143 #define RIGHT_DOOR_X 286
144 #define RIGHT_DOOR_Y 120
145 
146 #define BEHIND_RIGHT_DOOR_X 317
147 #define BEHIND_RIGHT_DOOR_Y 115
148 
149 #define LEFT_DOOR_X 33
150 #define LEFT_DOOR_Y 116
151 
152 #define CONV27_SELECT 0
153 #define CONV27_PLAY 1
154 
155 #define AFTER_PLAY_X 156
156 #define AFTER_PLAY_Y 114
157 
158 #define FIGHT_ENTER_ROOM 0
159 #define FIGHT_BEFORE_DODGE 1
160 #define FIGHT_CHOICE 2
161 #define FIGHT_DIE 3
162 #define FIGHT_SWORD 4
163 #define FIGHT_CHRIS_TO_DOOR 5
164 #define FIGHT_CHRIS_LEAVE 6
165 #define FIGHT_CHRIS_TALK 7
166 
167 #define AFTER_FIGHT_X 114
168 #define AFTER_FIGHT_Y 137
169 
170 #define WALK_TO_AFTER_FIGHT_X 130
171 #define WALK_TO_AFTER_FIGHT_Y 135
172 
173 #define DYNAMIC_CHR_WALK_TO_X 66
174 #define DYNAMIC_CHR_WALK_TO_Y 119
175 
176 #define EXIT_LEFT_DOOR_X 0
177 #define EXIT_LEFT_DOOR_Y 109
178 
179 #define CONV_MISC 26
180 
181 #define CHAIR_SIT 0
182 #define CHAIR_GET_UP 1
183 
184 } // namespace Rooms
185 } // namespace Phantom
186 } // namespace MADSV2
187 } // namespace MADS
188 
189 #endif
Definition: mps_installer.h:31