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,
95 type(type_), message(), color(textColorMark), slot(0), animation(0), timer(0), orientation(0), dst(),
96 scene(0), ons(0), lan(0), music(0), sound(0), object(0) {}
101 color = textColorMark;
115 inline bool empty()
const {
116 return type == kNone;
120 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",
121 (
int)type, message.c_str(), color, slot, animation, timer, dst.
x, dst.
y, orientation, scene, ons, lan, object, music, sound
134 bool render(
bool tickGame,
bool tickMark, uint32 messageDelta);
135 int getId()
const {
return _id; }
139 void moveTo(
const Common::Point &point, byte orientation = 0,
bool validate =
false);
143 void setOrientation(uint8 o) { orientation = o; }
145 byte peekFlagEvent(uint16 addr)
const;
146 SceneEvent::Type last_event_type()
const {
return !events.empty() ? events.back().type : SceneEvent::kNone; }
152 byte *getOns(
int id);
153 byte *getLans(
int id);
155 bool eventRunning()
const {
return !currentEvent.empty(); }
157 Walkbox *getWalkbox(byte
id) {
return &walkboxes[_id - 1][id]; }
158 Object *getObject(
int id,
int sceneId = 0);
161 void loadObjectData();
163 inline Animation *getActorAnimation() {
return &actorAnimation; }
164 inline const Common::String &getMessage()
const {
return message; }
165 void setPalette(
unsigned mul);
166 int lookupZoom(uint y)
const;
172 void playAnimation(byte idx, uint
id,
bool loop,
bool paused,
bool ignore);
173 void playActorAnimation(uint
id,
bool loop,
bool ignore);
175 byte palette[3 * 256];
176 void paletteEffect(byte step);
177 byte findFade()
const;
182 bool processEventQueue();
183 inline bool nextEvent() {
184 currentEvent.clear();
185 return processEventQueue();
197 Animation actorAnimation, animation[4], customAnimation[4];
198 Common::Rect actorAnimationPosition, animationPosition[4];
200 Actor teenagent, teenagentIdle;
218 byte messageFirstFrame;
219 byte messageLastFrame;
227 uint16 callback, callbackTimer;
236 Sound(byte i, byte d): id(i), delay(d) {}
241 struct DebugFeatures {
253 for (uint i = 0; i < kMax; ++i) {
Definition: objects.h:202
Definition: teenagent.h:83
Definition: surface_list.h:31
Definition: objects.h:158
Definition: animation.h:30
Definition: algorithm.h:29
int16 x
Definition: rect.h:46
int16 y
Definition: rect.h:47
void void void void void debugC(int level, uint32 debugChannels, MSVC_PRINTF const char *s,...) GCC_PRINTF(3