aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/kyra_v2.h
diff options
context:
space:
mode:
authorJohannes Schickel2008-05-03 19:23:45 +0000
committerJohannes Schickel2008-05-03 19:23:45 +0000
commitd5545bd8c5589e8d919350b932eaed76b28e83e9 (patch)
tree8418c5c56c25d97202fb544660bf6cbf88123610 /engines/kyra/kyra_v2.h
parent043f92cb230f6afc83e5635cc1610c5d166e105f (diff)
downloadscummvm-rg350-d5545bd8c5589e8d919350b932eaed76b28e83e9.tar.gz
scummvm-rg350-d5545bd8c5589e8d919350b932eaed76b28e83e9.tar.bz2
scummvm-rg350-d5545bd8c5589e8d919350b932eaed76b28e83e9.zip
- Moved newShape/temporaryScript code to KyraEngine_v2.
- Renamed newShape/temporaryScript code to animationScript. svn-id: r31841
Diffstat (limited to 'engines/kyra/kyra_v2.h')
-rw-r--r--engines/kyra/kyra_v2.h67
1 files changed, 63 insertions, 4 deletions
diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h
index 6a426f3761..730366a435 100644
--- a/engines/kyra/kyra_v2.h
+++ b/engines/kyra/kyra_v2.h
@@ -40,12 +40,31 @@ class Screen_v2;
class KyraEngine_v2 : public KyraEngine {
friend class Debugger_v2;
public:
- KyraEngine_v2(OSystem *system, const GameFlags &flags);
+ struct EngineDesc {
+ // Generic shape related
+ const int itemShapeStart;
+
+ // Scene script
+ const int firstAnimSceneScript;
+
+ // Animation script specific
+ const int animScriptFrameAdd;
+ };
+
+ KyraEngine_v2(OSystem *system, const GameFlags &flags, const EngineDesc &desc);
~KyraEngine_v2();
virtual Screen_v2 *screen_v2() const = 0;
+
+ const EngineDesc &engineDesc() const { return _desc; }
protected:
+ EngineDesc _desc;
+
// run
+ bool _runFlag;
+ bool _showOutro;
+ int8 _deathHandler;
+
virtual void update() = 0;
virtual void updateWithText() = 0;
@@ -138,6 +157,8 @@ protected:
virtual int getScale(int x, int y) = 0;
+ const uint8 *_characterFrameTable;
+
// Scene
struct SceneDesc {
char filename1[10];
@@ -197,7 +218,36 @@ protected:
bool _specialSceneScriptRunFlag;
void updateSpecialSceneScripts();
- virtual int getFirstSpecialSceneScript() const = 0;
+
+ // Sequences
+ EMCData _animationScriptData;
+ EMCState _animationScriptState;
+ Common::Array<const Opcode*> _opcodesAnimation;
+
+ void runAnimationScript(const char *filename, int allowSkip, int resetChar, int newShapes, int shapeUnload);
+
+ int o2a_setAnimationShapes(EMCState *script);
+ int o2a_setResetFrame(EMCState *script);
+
+ char _animShapeFilename[14];
+
+ uint8 *_animShapeFiledata;
+ int _animShapeCount;
+ int _animShapeLastEntry;
+
+ int _animNewFrame;
+ int _animDelayTime;
+
+ int _animResetFrame;
+
+ int _animShapeWidth, _animShapeHeight;
+ int _animShapeXAdd, _animShapeYAdd;
+
+ bool _animNeedUpdate;
+
+ virtual int initAnimationShapes(uint8 *filedata) = 0;
+ void processAnimationScript(int allowSkip, int resetChar);
+ virtual void uninitAnimationShapes(int count, uint8 *filedata) = 0;
// Shapes
typedef Common::HashMap<int, uint8*> ShapeMap;
@@ -208,8 +258,6 @@ protected:
void addShapeToPool(uint8 *shpData, int index);
void remShapeFromPool(int idx);
- virtual int getItemShape(int item) const = 0;
-
int _characterShapeFile;
virtual void loadCharacterShapes(int shapes) = 0;
@@ -289,6 +337,17 @@ protected:
virtual int getCharacterWalkspeed() const = 0;
virtual void updateCharAnimFrame(int num, int *table) = 0;
+ // chat
+ int _vocHigh;
+
+ const char *_chatText;
+ int _chatObject;
+ uint32 _chatEndTime;
+ int _chatVocHigh, _chatVocLow;
+
+ EMCData _chatScriptData;
+ EMCState _chatScriptState;
+
// unknown
int _unk3, _unk4, _unk5;
bool _unkSceneScreenFlag1;