diff options
author | Matthew Stewart | 2018-07-26 00:18:32 -0400 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-09 08:37:30 +0200 |
commit | 919db23841c24475257182f6daddea59cefb408a (patch) | |
tree | 45e91c38d8953fe874ebe91627ae7d4190745b98 /engines/startrek/startrek.h | |
parent | b1fa6126cc0429aaa378550f28d234e06d35a3aa (diff) | |
download | scummvm-rg350-919db23841c24475257182f6daddea59cefb408a.tar.gz scummvm-rg350-919db23841c24475257182f6daddea59cefb408a.tar.bz2 scummvm-rg350-919db23841c24475257182f6daddea59cefb408a.zip |
STARTREK: Implement "BAN" files.
These are background animations in various rooms, purely visual.
Diffstat (limited to 'engines/startrek/startrek.h')
-rw-r--r-- | engines/startrek/startrek.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/engines/startrek/startrek.h b/engines/startrek/startrek.h index 6e17375791..6f98db2b64 100644 --- a/engines/startrek/startrek.h +++ b/engines/startrek/startrek.h @@ -109,6 +109,8 @@ const int MAX_TEXTBOX_LINES = 12; const int MAX_BUFFERED_WALK_ACTIONS = 32; +const int MAX_BAN_FILES = 16; + enum StarTrekGameType { GType_ST25 = 1, @@ -123,7 +125,8 @@ enum kDebugLevels { kDebugSound = 1 << 0, kDebugGraphics = 1 << 1, kDebugSavegame = 1 << 2, - kDebugSpace = 2 << 3 + kDebugSpace = 1 << 3, + kDebugGeneral = 1 << 4 }; enum GameMode { @@ -342,12 +345,22 @@ public: * Set an actor's animation, position, and scale. */ int loadActorAnim(int actorIndex, const Common::String &animName, int16 x, int16 y, Fixed8 scale); + void loadBanFile(const Common::String &name); /** * Tries to make an actor walk to a position. * Returns true if successful in initiating the walk. */ bool actorWalkToPosition(int actorIndex, const Common::String &animFile, int16 srcX, int16 srcY, int16 destX, int16 destY); void updateActorAnimations(); + + /** + * ".BAN" files relate to drawing background animations, ie. flashing computer lights. + * "renderBanBelowSprites()" does the work of drawing it, while + * "renderBanAboveSprites()" redraws sprites above them if necessary. + */ + void renderBanBelowSprites(); + void renderBan(byte *pixelDest, SharedPtr<FileStream> file); + void renderBanAboveSprites(); void removeActorFromScreen(int actorIndex); void actorFunc1(); void drawActorToScreen(Actor *actor, const Common::String &animName, int16 x, int16 y, Fixed8 scale, bool addSprite); @@ -664,8 +677,10 @@ public: Actor *const _mccoyActor; Actor *const _redshirtActor; - SharedPtr<FileStream> _actorBanFiles[NUM_ACTORS / 2]; - uint16 _actorBanVar2[NUM_ACTORS / 2]; // TODO: initialize? + // ".BAN" files provide extra miscellaneous animations in the room, ie. flashing + // pixels on computer consoles, or fireflies in front of the screen. + SharedPtr<FileStream> _banFiles[MAX_BAN_FILES]; + uint16 _banFileOffsets[MAX_BAN_FILES]; Sprite _inventoryIconSprite; Sprite _itemIconSprite; |