32 #include "common/stream.h" 33 #include "common/array.h" 34 #include "common/func.h" 35 #include "graphics/surface.h" 37 #include "toon/script.h" 67 int32 _paletteEntries;
73 void drawFontFrame(
Graphics::Surface &surface, int32 frame, int16 x, int16 y, byte *colorMap);
74 void drawFrameOnPicture(int32 frame, int16 x, int16 y);
78 void applyPalette(int32 offset, int32 srcOffset, int32 numEntries);
80 int16 getFrameWidth(int32 frame);
81 int16 getFrameHeight(int32 frame);
82 int16 getWidth()
const;
83 int16 getHeight()
const;
89 enum AnimationInstanceType {
90 kAnimationCharacter = 1,
98 void update(int32 timeIncrement);
100 void renderOnPicture();
101 void setAnimation(
Animation *animation,
bool setRange =
true);
102 void playAnimation();
103 void setAnimationRange(int32 rangeStart, int32 rangeEnd);
104 void setFps(int32 fps);
105 void setLooping(
bool enable);
106 void stopAnimation();
107 void setFrame(int32 position);
108 void forceFrame(int32 position);
109 void setPosition(int16 x, int16 y, int32 z,
bool relative =
false);
110 Animation *getAnimation()
const {
return _animation; }
111 void setScale(int32
scale,
bool align =
false);
112 void setVisible(
bool visible);
113 bool getVisible()
const {
return _visible; }
114 void setUseMask(
bool useMask);
115 void moveRelative(int16 dx, int16 dy, int32 dz);
116 void getRect(int16 *x1, int16 *y1, int16 *x2, int16 *y2)
const;
117 int16 getX()
const {
return _x; }
118 int16 getY()
const {
return _y; }
119 int32 getZ()
const {
return _z; }
123 int32 getFrame()
const {
return _currentFrame; }
128 void setId(int32
id) { _id = id; }
129 int32 getId()
const {
return _id; }
131 void setX(int16 x,
bool relative =
false);
132 void setY(int16 y,
bool relative =
false);
133 void setZ(int32 z,
bool relative =
false);
134 void setLayerZ(int32 layer);
135 int32 getLayerZ()
const;
137 AnimationInstanceType getType()
const {
return _type; }
153 AnimationInstanceType _type;
171 void removeAllInstances(AnimationInstanceType type);
173 void update(int32 timeIncrement);
199 bool _frozenForConversation;
Graphics::Surface * scale(const Graphics::Surface &srcImage, int xSize, int ySize)