aboutsummaryrefslogtreecommitdiff
path: root/engines/teenagent/scene.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/teenagent/scene.h')
-rw-r--r--engines/teenagent/scene.h74
1 files changed, 37 insertions, 37 deletions
diff --git a/engines/teenagent/scene.h b/engines/teenagent/scene.h
index 32e784bb60..14aefa0cca 100644
--- a/engines/teenagent/scene.h
+++ b/engines/teenagent/scene.h
@@ -27,8 +27,8 @@
#include "teenagent/objects.h"
#include "teenagent/surface.h"
#include "teenagent/surface_list.h"
+#include "teenagent/teenagent.h"
-#include "common/system.h"
#include "common/array.h"
#include "common/list.h"
@@ -39,7 +39,6 @@ struct Event;
namespace TeenAgent {
class TeenAgentEngine;
-class Dialog;
struct SceneEvent {
enum Type {
@@ -84,22 +83,22 @@ struct SceneEvent {
byte lan;
union {
byte music;
- byte first_frame;
+ byte firstFrame;
};
union {
byte sound;
- byte last_frame;
+ byte lastFrame;
};
byte object;
SceneEvent(Type type_) :
- type(type_), message(), color(0xd1), slot(0), animation(0), timer(0), orientation(0), dst(),
+ type(type_), message(), color(textColorMark), slot(0), animation(0), timer(0), orientation(0), dst(),
scene(0), ons(0), lan(0), music(0), sound(0), object(0) {}
void clear() {
type = kNone;
message.clear();
- color = 0xd1;
+ color = textColorMark;
slot = 0;
orientation = 0;
animation = 0;
@@ -118,7 +117,7 @@ struct SceneEvent {
}
void dump() const {
- debug(0, "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",
+ 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",
(int)type, message.c_str(), color, slot, animation, timer, dst.x, dst.y, orientation, scene, ons, lan, object, music, sound
);
}
@@ -126,13 +125,13 @@ struct SceneEvent {
class Scene {
public:
- Scene(TeenAgentEngine *engine, OSystem *system);
+ Scene(TeenAgentEngine *engine);
~Scene();
bool intro;
void init(int id, const Common::Point &pos);
- bool render(bool tick_game, bool tick_mark, uint32 message_delta);
+ bool render(bool tickGame, bool tickMark, uint32 messageDelta);
int getId() const { return _id; }
void warp(const Common::Point &point, byte orientation = 0);
@@ -140,7 +139,7 @@ public:
void moveTo(const Common::Point &point, byte orientation = 0, bool validate = false);
Common::Point getPosition() const { return position; }
- void displayMessage(const Common::String &str, byte color = 0xd1, const Common::Point &pos = Common::Point());
+ void displayMessage(const Common::String &str, byte color = textColorMark, const Common::Point &pos = Common::Point());
void setOrientation(uint8 o) { orientation = o; }
void push(const SceneEvent &event);
byte peekFlagEvent(uint16 addr) const;
@@ -153,15 +152,15 @@ public:
byte *getOns(int id);
byte *getLans(int id);
- bool eventRunning() const { return !current_event.empty(); }
+ bool eventRunning() const { return !currentEvent.empty(); }
Walkbox *getWalkbox(byte id) { return &walkboxes[_id - 1][id]; }
- Object *getObject(int id, int scene_id = 0);
+ Object *getObject(int id, int sceneId = 0);
Object *findObject(const Common::Point &point);
void loadObjectData();
Animation *getAnimation(byte slot);
- inline Animation *getActorAnimation() { return &actor_animation; }
+ inline Animation *getActorAnimation() { return &actorAnimation; }
inline const Common::String &getMessage() const { return message; }
void setPalette(unsigned mul);
int lookupZoom(uint y) const;
@@ -173,39 +172,38 @@ private:
void playAnimation(byte idx, uint id, bool loop, bool paused, bool ignore);
void playActorAnimation(uint id, bool loop, bool ignore);
- byte palette[768];
+ byte palette[3 * 256];
void paletteEffect(byte step);
byte findFade() const;
- static Common::Point messagePosition(const Common::String &str, Common::Point position);
- static uint messageDuration(const Common::String &str);
+ Common::Point messagePosition(const Common::String &str, Common::Point pos);
+ uint messageDuration(const Common::String &str);
bool processEventQueue();
inline bool nextEvent() {
- current_event.clear();
+ currentEvent.clear();
return processEventQueue();
}
void clearMessage();
- TeenAgentEngine *_engine;
- OSystem *_system;
+ TeenAgentEngine *_vm;
int _id;
Graphics::Surface background;
SurfaceList on;
- bool on_enabled;
+ bool onEnabled;
Surface *ons;
- uint32 ons_count;
- Animation actor_animation, animation[4], custom_animation[4];
- Common::Rect actor_animation_position, animation_position[4];
+ uint32 onsCount;
+ Animation actorAnimation, animation[4], customAnimation[4];
+ Common::Rect actorAnimationPosition, animationPosition[4];
- Actor teenagent, teenagent_idle;
+ Actor teenagent, teenagentIdle;
Common::Point position;
typedef Common::List<Common::Point> Path;
Path path;
uint8 orientation;
- bool actor_talking;
+ bool actorTalking;
bool findPath(Path &p, const Common::Point &src, const Common::Point &dst) const;
@@ -214,22 +212,24 @@ private:
Common::Array<Common::Array<FadeType> > fades;
Common::String message;
- Common::Point message_pos;
- byte message_color;
- uint message_timer;
- byte message_first_frame;
- byte message_last_frame;
- Animation *message_animation;
+ Common::Point messagePos;
+ byte messageColor;
+ uint messageTimer;
+ byte messageFirstFrame;
+ byte messageLastFrame;
+ Animation *messageAnimation;
typedef Common::List<SceneEvent> EventList;
EventList events;
- SceneEvent current_event;
- bool hide_actor;
+ SceneEvent currentEvent;
+ bool hideActor;
- uint16 callback, callback_timer;
+ uint16 callback, callbackTimer;
- int _fade_timer;
- uint _idle_timer;
+ int _fadeTimer;
+ byte _fadeOld;
+
+ uint _idleTimer;
struct Sound {
byte id, delay;
@@ -254,7 +254,7 @@ private:
feature[i] = true;
}
}
- } debug_features;
+ } debugFeatures;
};
} // End of namespace TeenAgent