22 #ifndef TEENAGENT_SCENE_H 23 #define TEENAGENT_SCENE_H 25 #include "teenagent/surface.h" 26 #include "teenagent/actor.h" 27 #include "teenagent/objects.h" 28 #include "teenagent/surface.h" 29 #include "teenagent/surface_list.h" 30 #include "teenagent/teenagent.h" 32 #include "common/array.h" 33 #include "common/list.h" 41 class TeenAgentEngine;
60 kWaitLanAnimationFrame,
97 type(type_), message(), color(textColorMark), slot(0), animation(0), timer(0), orientation(0), dst(),
98 scene(0), ons(0), lan(0), music(0), sound(0), object(0) {}
104 color = textColorMark;
118 inline bool empty()
const {
119 return type == kNone;
123 debugC(0, kDebugScene,
"event[%d]: \"%s\"[%02x], slot: %d, animation: %u, timer: %u, dst: (%d, %d) [%u], scene: %u, ons: %u, lan: %u, object: %u, music: %u, sound: %u",
124 (
int)type, message.c_str(), color, slot, animation, timer, dst.
x, dst.
y, orientation, scene, ons, lan, object, music, sound
137 bool render(
bool tickGame,
bool tickMark, uint32 messageDelta);
138 int getId()
const {
return _id; }
142 void moveTo(
const Common::Point &point, byte orientation = 0,
bool validate =
false);
146 void setOrientation(uint8 o) { orientation = o; }
148 byte peekFlagEvent(uint16 addr)
const;
149 SceneEvent::Type last_event_type()
const {
return !events.empty() ? events.back().type : SceneEvent::kNone; }
155 byte *getOns(
int id);
156 byte *getLans(
int id);
158 bool eventRunning()
const {
return !currentEvent.empty(); }
160 Walkbox *getWalkbox(byte
id) {
return &walkboxes[_id - 1][id]; }
161 Object *getObject(
int id,
int sceneId = 0);
164 void loadObjectData();
166 inline Animation *getActorAnimation() {
return &actorAnimation; }
167 inline const Common::String &getMessage()
const {
return message; }
168 void setPalette(
unsigned mul);
169 int lookupZoom(uint y)
const;
175 void playAnimation(byte idx, uint
id,
bool loop,
bool paused,
bool ignore);
176 void playActorAnimation(uint
id,
bool loop,
bool ignore);
178 byte palette[3 * 256];
179 void paletteEffect(byte step);
180 byte findFade()
const;
185 bool processEventQueue();
186 inline bool nextEvent() {
187 currentEvent.clear();
188 return processEventQueue();
200 Animation actorAnimation, animation[4], customAnimation[4];
201 Common::Rect actorAnimationPosition, animationPosition[4];
203 Actor teenagent, teenagentIdle;
221 byte messageFirstFrame;
222 byte messageLastFrame;
232 uint16 callback, callbackTimer;
241 Sound(byte i, byte d): id(i), delay(d) {}
246 struct DebugFeatures {
258 for (uint i = 0; i < kMax; ++i) {
Definition: objects.h:211
Definition: teenagent.h:94
Definition: surface_list.h:31
Definition: objects.h:158
void void void void void debugC(int level, uint32 debugChannel, MSVC_PRINTF const char *s,...) GCC_PRINTF(3
Definition: animation.h:30
Definition: algorithm.h:29