diff options
author | Ľubomír Remák | 2018-07-15 00:18:54 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-25 23:12:01 +0200 |
commit | febff83a4edc89e1dbc6f4c56f5531f0eb8f3287 (patch) | |
tree | 756129c1736a39aad5473d7873810a3a742911ae /engines/mutationofjb/gamedata.cpp | |
parent | d2e354b51f637dc2e9b251256b5a017cb41cfe59 (diff) | |
download | scummvm-rg350-febff83a4edc89e1dbc6f4c56f5531f0eb8f3287.tar.gz scummvm-rg350-febff83a4edc89e1dbc6f4c56f5531f0eb8f3287.tar.bz2 scummvm-rg350-febff83a4edc89e1dbc6f4c56f5531f0eb8f3287.zip |
MUTATIONOFJB: Draw objects (first frame only) and improve conversation support.
Diffstat (limited to 'engines/mutationofjb/gamedata.cpp')
-rw-r--r-- | engines/mutationofjb/gamedata.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/engines/mutationofjb/gamedata.cpp b/engines/mutationofjb/gamedata.cpp index 1ece44c740..6a9c166106 100644 --- a/engines/mutationofjb/gamedata.cpp +++ b/engines/mutationofjb/gamedata.cpp @@ -136,7 +136,11 @@ bool Scene::loadFromStream(Common::ReadStream &stream) { _palRotStart = stream.readByte(); _palRotEnd = stream.readByte(); _palRotPeriod = stream.readByte(); - stream.read(_unknown38A, 80); + _exhaustedChoiceNext = stream.readByte(); + + for (i = 0; i < 79; ++i) { + _exhaustedChoices[i]._encodedData = stream.readByte(); + } return true; } @@ -222,6 +226,22 @@ Bitmap *Scene::findBitmap(int16 x, int16 y, int *index) { return nullptr; } +void Scene::addExhaustedChoice(uint8 context, uint8 choiceIndex, uint8 choiceIndexList) { + _exhaustedChoices[_exhaustedChoiceNext - 1] = ExhaustedChoice(context, choiceIndex, choiceIndexList); + _exhaustedChoiceNext++; +} + +bool Scene::isChoiceExhausted(uint8 context, uint8 choiceIndex, uint8 choiceListIndex) const { + for (uint i = 0; i < _exhaustedChoiceNext - 1; ++i) { + const ExhaustedChoice &choice = _exhaustedChoices[i]; + if (choice.getContext() == context && choice.getChoiceIndex() == choiceIndex && choice.getChoiceListIndex() == choiceListIndex) { + return true; + } + } + + return false; +} + GameData::GameData() : _currentScene(0), |