ScummVM API documentation
walker.h
1
2/* ScummVM - Graphic Adventure Engine
3 *
4 * ScummVM is the legal property of its developers, whose names
5 * are too numerous to list here. Please refer to the COPYRIGHT
6 * file distributed with this source distribution.
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22
23#ifndef M4_BURGER_WALKER_H
24#define M4_BURGER_WALKER_H
25
26#include "m4/adv_r/adv_walk.h"
27
28namespace M4 {
29namespace Burger {
30
31#define PARSER_ITEM_END "Th-th-th-that's all folks..."
32
34 const char *_word0;
35 const char *_word1;
36 int _trigger;
37 const int32 *_testVariable;
38 int _testValue;
39 int32 *_newVariable;
40 int _newValue;
41};
42
43#define WILBUR_MATCH_END { nullptr, nullptr, -1, nullptr, 0, nullptr, 0 }
44
45class Walker : public M4::Walker {
46private:
47 const char *_name = nullptr;
48 int _channel = 0;
49 int _room = 0;
50 int _vol = 0;
51 int32 _trigger = 0;
52 bool _animateLips = false;
53 int _wilburPoof = -1;
54
58 static void player_walker_callback(frac16 myMessage, machine *sender);
59
63 void speech_random(int count, int trigger, const char *name1,
64 const char *name2, const char *name3 = nullptr,
65 const char *name4 = nullptr, const char *name5 = nullptr,
66 const char *name6 = nullptr, const char *name7 = nullptr,
67 const char *name8 = nullptr, const char *name9 = nullptr);
68
69public:
70 ~Walker() override {}
71
72 void walk_load_walker_and_shadow_series() override;
73 machine *walk_initialize_walker() override;
74
75 void reset_walker_sprites();
76 static void unloadSprites();
77
78 void wilbur_speech(const char *name, int trigger = -1, int room = -1, byte flags = 0,
79 int vol = 255, int channel = 1);
80 void wilbur_say();
81 void wilburs_speech_finished();
82
89 bool wilbur_said(const char *list[][4]);
90
91 void wilbur_speech_random(const char *name1, const char *name2, int trigger = -1) {
92 speech_random(2, trigger, name1, name2);
93 }
94 void wilbur_speech_random(const char *name1, const char *name2,
95 const char *name3, int trigger = -1) {
96 speech_random(3, trigger, name1, name2, name3);
97 }
98 void wilbur_speech_random(const char *name1, const char *name2,
99 const char *name3, const char *name4, int trigger = -1) {
100 speech_random(4, trigger, name1, name2, name3, name4);
101 }
102 void wilbur_speech_random(const char *name1, const char *name2,
103 const char *name3, const char *name4, const char *name5, int trigger = -1) {
104 speech_random(5, trigger, name1, name2, name3, name4, name5);
105 }
106 void wilbur_speech_random(const char *name1, const char *name2,
107 const char *name3, const char *name4, const char *name5,
108 const char *name6, int trigger = -1) {
109 speech_random(6, trigger, name1, name2, name3, name4, name5, name6);
110 }
111 void wilbur_speech_random(const char *name1, const char *name2,
112 const char *name3, const char *name4, const char *name5,
113 const char *name6, const char *name7, int trigger = -1) {
114 speech_random(7, trigger, name1, name2, name3, name4, name5, name6, name7);
115 }
116
117 bool wilbur_parser(const char **list);
118
119 bool wilbur_match(const WilburMatch *list);
120
121 void wilbur_poof();
122 void wilbur_unpoof();
123};
124
125void enable_player();
126void disable_player();
127void wilbur_abduct(int trigger);
128void player_walk_to(int32 x, int32 y, int32 facing_x, int32 facing_y, int trigger = -1);
129void player_walk_to(int32 x, int32 y, int trigger = -1);
130void wilbur_speech(const char *name, int trigger = -1, int room = -1, byte flags = 0,
131 int vol = 255, int channel = 1);
132
133} // namespace Burger
134} // namespace M4
135
136#endif
Definition: walker.h:45
bool wilbur_said(const char *list[][4])
Definition: adv_walk.h:31
Definition: database.h:28
intptr frac16
Definition: m4_types.h:45
Definition: walker.h:33
Definition: ws_machine.h:156