diff options
Diffstat (limited to 'engines/kyra/kyra_v3.h')
-rw-r--r-- | engines/kyra/kyra_v3.h | 121 |
1 files changed, 120 insertions, 1 deletions
diff --git a/engines/kyra/kyra_v3.h b/engines/kyra/kyra_v3.h index f9b5ea22b3..75c43bca7a 100644 --- a/engines/kyra/kyra_v3.h +++ b/engines/kyra/kyra_v3.h @@ -28,6 +28,7 @@ #include "kyra/kyra.h" #include "kyra/screen_v3.h" +#include "kyra/script.h" #include "common/hashmap.h" namespace Kyra { @@ -36,6 +37,7 @@ class SoundDigital; class Screen_v3; class MainMenu; class WSAMovieV2; +class TextDisplayer_v3; class KyraEngine_v3 : public KyraEngine { public: @@ -56,10 +58,15 @@ private: void preinit(); void startup(); + void update(); + void runStartupScript(int script, int unk1); void setupOpcodeTable(); + bool _runFlag; + bool _unkInputFlag; + Screen_v3 *_screen; SoundDigital *_soundDigital; @@ -68,6 +75,7 @@ private: void playMenuAudioFile(); int _musicSoundChannel; + int _fadeOutMusicChannel; const char *_menuAudioFile; static const char *_soundList[]; @@ -79,6 +87,7 @@ private: void stopMusicTrack(); int musicUpdate(int forceRestart); + void fadeOutMusic(int ticks); void snd_playVoiceFile(int) {} @@ -86,7 +95,7 @@ private: void initMainMenu(); void uninitMainMenu(); - Movie *_menuAnim; + WSAMovieV2 *_menuAnim; MainMenu *_menu; // game speed @@ -122,6 +131,7 @@ private: int16 xPos3, yPos3; int16 width, height; int16 width2, height2; + uint16 palette; AnimObj *nextObject; }; @@ -130,6 +140,26 @@ private: void clearAnimObjects(); + AnimObj *_animList; + bool _drawNoShapeFlag; + AnimObj *initAnimList(AnimObj *list, AnimObj *entry); + AnimObj *addToAnimListSorted(AnimObj *list, AnimObj *entry); + AnimObj *deleteAnimListEntry(AnimObj *list, AnimObj *entry); + + void animSetupPaletteEntry(AnimObj *anim); + + void restorePage3(); + + void drawAnimObjects(); + void drawSceneAnimObject(AnimObj *obj, int x, int y, int drawLayer); + void drawCharacterAnimObject(AnimObj *obj, int x, int y, int drawLayer); + + void refreshAnimObjects(int force); + void refreshAnimObjectsIfNeed(); + + bool _loadingState; + void updateCharacterAnim(int charId); + // interface uint8 *_interface; uint8 *_interfaceCommandLine; @@ -137,6 +167,14 @@ private: void loadInterfaceShapes(); void loadInterface(); + void showMessage(const char *string, uint8 c0, uint8 c1); + void restoreCommandLine(); + + int _commandLineY; + const char *_shownMessage; + bool _restoreCommandLine; + bool _inventoryState; + // translation stuff uint8 *_scoreFile; uint8 *_cCodeFile; @@ -144,6 +182,7 @@ private: uint8 *_itemFile; uint8 *_actorFile; uint32 _actorFileSize; + uint8 *_sceneStrings; // items uint8 *_itemBuffer1; @@ -151,11 +190,16 @@ private: void initItems(); + // -> hand item + int _itemInHand; + int _handItemSet; + // shapes typedef Common::HashMap<int, uint8*> ShapeMap; ShapeMap _gameShapes; void addShapeToPool(const uint8 *data, int realIndex, int shape); + uint8 *getShapePtr(int shape) const { return _gameShapes[shape]; } void initMouseShapes(); @@ -190,6 +234,9 @@ private: WSAMovieV2 *_sceneAnimMovie[16]; uint8 *_sceneShapes[20]; + void freeSceneShapes(); + void freeSceneAnims(); + // voice int _currentTalkFile; void openTalkFile(int file); @@ -204,6 +251,51 @@ private: SceneDesc *_sceneList; uint16 _sceneExit1, _sceneExit2, _sceneExit3, _sceneExit4; + int _sceneEnterX1, _sceneEnterY1; + int _sceneEnterX2, _sceneEnterY2; + int _sceneEnterX3, _sceneEnterY3; + int _sceneEnterX4, _sceneEnterY4; + int _specialExitCount; + uint16 _specialExitTable[25]; + + bool _noScriptEnter; + void enterNewScene(uint16 scene, int facing, int unk1, int unk2, int unk3); + void enterNewSceneUnk1(int facing, int unk1, int unk2); + void enterNewSceneUnk2(int unk1); + int _enterNewSceneLock; + + void unloadScene(); + + void loadScenePal(); + void loadSceneMsc(); + void initSceneScript(int unk1); + void initSceneAnims(int unk1); + void initSceneScreen(int unk1); + + bool _noStartupChat; + void runSceneScript4(int unk1); + void runSceneScript8(); + + int _sceneMinY, _sceneMaxY; + int _maskPageMinY, _maskPageMaxY; + + ScriptState _sceneScriptState; + ScriptData _sceneScriptData; + WSAMovieV2 *_wsaSlots[10]; + + bool _sceneSpecialScriptState[10]; + ScriptState _sceneSpecialScripts[10]; + uint32 _sceneSpecialScriptsTimer[10]; + + int8 _sceneDatPalette[45]; + int8 _sceneDatLayerTable[15]; + + int getDrawLayer(int x, int y); + + int getScale(int x, int y); + int _scaleTable[15]; + + bool _unkSceneScreenFlag1; // items struct Item { @@ -237,6 +329,27 @@ private: }; Character _mainCharacter; + int _mainCharX, _mainCharY; + int _charScale; + + void moveCharacter(int facing, int x, int y); + + void updateCharPosWithUpdate(); + void updateCharPos(uint8 *table, int force); + + uint32 _updateCharPosNextUpdate; + static const int8 _updateCharPosXTable[]; + static const int8 _updateCharPosYTable[]; + + void updateCharAnimFrame(int character, uint8 *table); + int8 _characterAnimTable[2]; + static const uint8 _characterFrameTable[]; + + bool _overwriteSceneFacing; + + void updateCharPal(int unk1); + int _lastCharPalLayer; + bool _charPalUpdate; // unk uint8 *_unkBuffer1040Bytes; @@ -245,6 +358,8 @@ private: uint8 *_gfxBackUpRect; uint8 *_paletteOverlay; + int _unk3, _unk4; + void loadCostPal(); void loadShadowShape(); void loadExtrasShapes(); @@ -261,6 +376,10 @@ private: int o3_getHiddenItemsEntry(ScriptState *script); int o3_dummy(ScriptState *script); + // misc + TextDisplayer_v3 *_text; + bool _wsaPlayingVQA; + // resource specific private: static const char *_languageExtension[]; |