ScummVM API documentation
room109.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_ROOM109_H
23#define MADS_PHANTOM_ROOM109_H
24
25#include "mads/phantom/rooms/section1.h"
26#include "mads/phantom/global.h"
27
28namespace MADS {
29namespace Phantom {
30namespace Rooms {
31
32#define local (&scratch)
33#define ss local->sprite
34#define seq local->sequence
35#define aa local->animation
36
37struct 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 int16 on_floor; /* Which floor are we on? 3=top, 1=bottom */
43 int16 anim_0_running;
44 int16 anim_1_running;
45 int16 anim_2_running;
46 int16 anim_3_running;
47
48};
49
50
51/* ========================= Sprite Series ========================= */
52
53#define fx_top_door 0 /* rm109x0 */
54#define fx_middle_door 1 /* rm109x2 */
55#define fx_top_flame 2 /* rm109x1 */
56#define fx_middle_flame 3 /* rm109x3 */
57#define fx_bottom_flame 4 /* rm109x4 */
58#define fx_top_lester 5 /* rm109z0 */
59#define fx_middle_lester 6 /* rm109z1 */
60#define fx_bottom_lester 7 /* rm109z2 */
61#define fx_take_6 8 /* rdr_6 */
62
63
64/* ========================= Triggers ============================== */
65
66#define ROOM_109_TOP_DOOR_CLOSES 60
67#define ROOM_109_MIDDLE_DOOR_CLOSES 65
68#define ROOM_109_CHANGE_LANTERN_FLAME 70
69#define ROOM_109_DOOR_OPENS 75
70
71
72/* ========================= Player positions ====================== */
73
74#define PLAYER_X_FROM_106 31
75#define PLAYER_Y_FROM_106 459
76
77#define PLAYER_X_FROM_111 4
78#define PLAYER_Y_FROM_111 136
79
80#define PLAYER_X_FROM_110 3
81#define PLAYER_Y_FROM_110 292
82
83#define WALK_TO_X_FROM_111 32
84#define WALK_TO_Y_FROM_111 138
85
86#define WALK_TO_X_FROM_110 31
87#define WALK_TO_Y_FROM_110 295
88
89
90/* ========================= Camera floors ========================= */
91
92#define TOP_FLOOR 0 /* for camera_jump_to */
93#define MIDDLE_FLOOR 156 /* for camera_jump_to */
94#define BOTTOM_FLOOR 312 /* for camera_jump_to */
95
96
97/* ========================= Door approach positions =============== */
98
99#define WALK_TO_X_OPEN_TOP_DOOR 2
100#define WALK_TO_Y_OPEN_TOP_DOOR 131
101
102#define WALK_TO_X_OPEN_MIDDLE_DOOR 2
103#define WALK_TO_Y_OPEN_MIDDLE_DOOR 281
104
105
106/* ========================= Climb / descend positions ============= */
107
108#define END_CLIMB_BOTTOM_FLOOR_X 264
109#define END_CLIMB_BOTTOM_FLOOR_Y 295
110
111#define START_CLIMB_BOTTOM_X 58
112#define START_CLIMB_BOTTOM_Y 452
113
114#define END_CLIMB_MIDDLE_FLOOR_X 261
115#define END_CLIMB_MIDDLE_FLOOR_Y 137
116
117#define START_CLIMB_MIDDLE_X 58
118#define START_CLIMB_MIDDLE_Y 295
119
120#define START_DOWN_MIDDLE_X 269
121#define START_DOWN_MIDDLE_Y 292
122
123#define END_DOWN_MIDDLE_FLOOR_X 61
124#define END_DOWN_MIDDLE_FLOOR_Y 450
125
126#define START_DOWN_TOP_X 269
127#define START_DOWN_TOP_Y 138
128
129#define END_DOWN_TOP_FLOOR_X 59
130#define END_DOWN_TOP_FLOOR_Y 296
131
132
133extern void room_109_init();
134extern void room_109_daemon();
135extern void room_109_pre_parser();
136extern void room_109_parser();
137extern void room_109_preload();
138
139} // namespace Rooms
140} // namespace Phantom
141} // namespace MADS
142
143#endif