ScummVM API documentation
room208.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_ROOM208_H
23#define MADS_PHANTOM_ROOM208_H
24
25#include "mads/phantom/phantom.h"
26
27namespace MADS {
28namespace Phantom {
29namespace Rooms {
30
31/* ---- Scratch (room-local variables) ---- */
32
33struct Scratch {
34 int16 sprite[15]; // Sprite series handles
35 int16 sequence[15]; // Sequence handles
36 int16 animation[4]; // Animation handles
37 int16 middle_direction; // 1 = increasing (toward whisper), 0 = decreasing (returning)
38 int16 top_left_frame; // Current frame for top left person
39 int16 top_right_frame; // Current frame for top right person
40 int16 middle_left_frame; // Current frame for middle left person
41 int16 middle_middle_frame; // Current frame for middle middle person
42 int16 middle_right_frame; // Current frame for middle right person
43 int16 bottom_left_frame; // Current frame for bottom left person
44 int16 bottom_middle_frame; // Current frame for bottom middle person
45 int16 bottom_right_frame; // Current frame for bottom right person
46 int16 prevent;
47 int16 prevent_2;
48};
49
50#define local (&scratch)
51#define ss local->sprite
52#define seq local->sequence
53#define aa local->animation
54
55/* ---- Sprite series indices ---- */
56
57#define fx_top_left 0 /* rm208x0 */
58#define fx_top_right 1 /* rm208x1 */
59#define fx_middle_left 2 /* rm208x2 */
60#define fx_middle_middle 3 /* rm208x3 */
61#define fx_middle_right 4 /* rm208x4 */
62#define fx_bottom_left 5 /* rm208x5 */
63#define fx_bottom_middle 6 /* rm208x6 */
64#define fx_bottom_right 7 /* rm208x7 */
65
66/* ---- Trigger constants ---- */
67
68#define ROOM_208_MOVE_TOP_LEFT 60
69#define ROOM_208_MOVE_TOP_RIGHT 62
70#define ROOM_208_MOVE_MIDDLE_LEFT 64
71#define ROOM_208_MOVE_MIDDLE_MIDDLE 66
72#define ROOM_208_MOVE_MIDDLE_RIGHT 68
73#define ROOM_208_MOVE_BOTTOM_LEFT 70
74#define ROOM_208_MOVE_BOTTOM_MIDDLE 72
75#define ROOM_208_MOVE_BOTTOM_RIGHT 74
76
77#define ROOM_208_DONE_PHANTOM 80
78
79/* ---- Delay constant ---- */
80
81#define QUICKLY 10 /* very short delay in game ticks */
82
83/* ---- Entry points ---- */
84
85void room_208_preload();
86void room_208_init();
87void room_208_daemon();
88/* no pre_parser or parser — both NULL in preload */
89
90} // namespace Rooms
91} // namespace Phantom
92} // namespace MADS
93
94#endif