ScummVM API documentation
room202.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_ROOM202_H
23 #define MADS_PHANTOM_ROOM202_H
24 
25 #include "mads/phantom/rooms/section2.h"
26 #include "mads/phantom/global.h"
27 
28 namespace MADS {
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[15]; /* Sprite series handles */
40  int16 sequence[15]; /* Sequence handles */
41  int16 animation[4]; /* Animation handles */
42 
43  int16 usher_action;
44  int16 usher_frame;
45  int16 usher_talk_count;
46 
47  int16 degas_action;
48  int16 degas_frame;
49 
50  int16 rich_frame;
51  int16 rich_action;
52  int16 rich_talk_count;
53 
54  int16 anim_0_running;
55  int16 anim_1_running;
56  int16 converse_counter;
57  int16 prevent;
58 
59  int16 chandelier_base[5];
60  int16 dyn_chandeliers[5];
61 
62  int16 gave;
63 
64 };
65 
66 
67 /* ========================= Sprite Series ========================= */
68 
69 #define fx_left_door 0 /* rm202x0 */
70 #define fx_take_9 1 /* rdr_9 */
71 #define fx_chandelier_0 2 /* rm202f0 */
72 #define fx_chandelier_1 3
73 #define fx_chandelier_2 4
74 #define fx_chandelier_3 5
75 #define fx_chandelier_4 6
76 
77 
78 /* ========================= Conversations ========================= */
79 
80 #define CONV_USHER_17 17
81 #define CONV_DEGAS_9 9
82 
83 /* Conv 17 — Usher action states */
84 #define CONV17_USHER_TALK 0
85 #define CONV17_USHER_POINT 1
86 #define CONV17_USHER_SHUT_UP 2
87 #define CONV17_USHER_HAVE_TICKET 3
88 #define CONV17_USHER_LEFT_UP 4
89 
90 /* Conv 9 — Degas action states */
91 #define CONV9_DEGAS_TALK 0
92 #define CONV9_DEGAS_BOW 1
93 #define CONV9_DEGAS_GIRL 2
94 #define CONV9_DEGAS_LEAVE 3
95 #define CONV9_DEGAS_SHUT_UP 4
96 
97 
98 /* ========================= Triggers ============================== */
99 
100 #define ROOM_202_DOOR_CLOSES 60
101 #define ROOM_202_USHER_TALK 70
102 #define ROOM_202_USHER_POINT 72
103 #define ROOM_202_ME_TALK 74
104 #define ROOM_202_END 76
105 #define ROOM_202_DOOR_OPENS 80
106 #define ROOM_202_TALK_TO_DEGAS 90
107 #define ROOM_202_DEGAS_TALK 93
108 #define ROOM_202_DEGAS_WALK 96
109 #define ROOM_202_DEGAS_DONE 100
110 
111 
112 /* ========================= Player positions ====================== */
113 
114 #define PLAYER_X_FROM_201 3
115 #define PLAYER_Y_FROM_201 141
116 
117 #define PLAYER_X_FROM_204 253
118 #define PLAYER_Y_FROM_204 117
119 
120 #define PLAYER_X_FROM_205 510
121 #define PLAYER_Y_FROM_205 117
122 
123 #define PLAYER_X_FROM_101 636
124 #define PLAYER_Y_FROM_101 143
125 
126 #define WALK_TO_X_FROM_201 40
127 #define WALK_TO_Y_FROM_201 141
128 
129 #define WALK_TO_X_FROM_203 132
130 #define WALK_TO_Y_FROM_203 134
131 
132 #define WALK_TO_X_FROM_204 255
133 #define WALK_TO_Y_FROM_204 133
134 
135 #define WALK_TO_X_FROM_205 512
136 #define WALK_TO_Y_FROM_205 133
137 
138 #define WALK_TO_X_FROM_101 598
139 #define WALK_TO_Y_FROM_101 143
140 
141 #define WALK_TO_X_BEHIND_LEFT_DOOR 134
142 #define WALK_TO_Y_BEHIND_LEFT_DOOR 112
143 
144 
145 /* ========================= Misc positions ======================== */
146 
147 #define FRONT_OF_LEFT_DOOR_X 126
148 #define FRONT_OF_LEFT_DOOR_Y 123
149 
150 #define USHER_X 569
151 #define USHER_Y 147
152 
153 #define DEGAS_X 400
154 #define DEGAS_Y 141
155 
156 #define DEGAS_AFTER_CONV_X 596
157 #define DEGAS_AFTER_CONV_Y 144
158 
159 #define RIGHT_HALF 320
160 
161 
162 /* ========================= Chandelier ============================ */
163 
164 #define NUM_CHANDELIERS 5
165 #define camera_ratio_1 1
166 #define camera_ratio_2 5
167 
168 
169 extern void set_chandelier_positions();
170 
171 extern void room_202_init();
172 extern void room_202_daemon();
173 extern void room_202_pre_parser();
174 extern void room_202_parser();
175 extern void room_202_preload();
176 
177 } // namespace Rooms
178 } // namespace Phantom
179 } // namespace MADS
180 
181 #endif
Definition: anim_timer.h:27