mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
NANCY: Action record reading changes
Action records are no longer expected to return how much data they've read, which will be helpful with supporting different versions in the same class. Also added a much more helpful error message on a bad read.
This commit is contained in:
committed by
Eugene Sandulenko
parent
3910d87c82
commit
6eb5be2c51
@@ -111,7 +111,9 @@ bool ActionManager::addNewActionRecord(Common::SeekableReadStream &inputData) {
|
||||
newRecord->type = inputData.readByte(); // redundant
|
||||
newRecord->execType = (ActionRecord::ExecutionType)inputData.readByte();
|
||||
|
||||
uint16 localChunkSize = newRecord->readData(inputData);
|
||||
uint16 localChunkSize = inputData.pos();
|
||||
newRecord->readData(inputData);
|
||||
localChunkSize = inputData.pos() - localChunkSize;
|
||||
localChunkSize += 0x32;
|
||||
|
||||
// If the localChunkSize is less than the total data, there must be dependencies at the end of the chunk
|
||||
@@ -120,7 +122,7 @@ bool ActionManager::addNewActionRecord(Common::SeekableReadStream &inputData) {
|
||||
// Each dependency is 0x0C bytes long (in v1)
|
||||
uint numDependencies = depsDataSize / 0xC;
|
||||
if (depsDataSize % 0xC) {
|
||||
error("Invalid dependency data size!");
|
||||
error("Action record type %s has incorrect read size", newRecord->getRecordTypeName().c_str());;
|
||||
}
|
||||
|
||||
// Initialize the dependencies data
|
||||
|
||||
@@ -93,20 +93,14 @@ public:
|
||||
itemRequired(-1) {}
|
||||
virtual ~ActionRecord() {}
|
||||
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) =0;
|
||||
virtual void readData(Common::SeekableReadStream &stream) =0;
|
||||
virtual void execute() {}
|
||||
virtual void onPause(bool pause) {}
|
||||
|
||||
virtual CursorManager::CursorType getHoverCursor() const { return CursorManager::kHotspot; }
|
||||
virtual void handleInput(NancyInput &input) {}
|
||||
|
||||
protected:
|
||||
// TODO this is temporary until every record type is figured out
|
||||
uint16 readRaw(Common::SeekableReadStream &stream, uint16 bytes) {
|
||||
stream.skip(bytes);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
protected:
|
||||
void finishExecution() {
|
||||
switch (execType) {
|
||||
case kOneShot:
|
||||
|
||||
@@ -64,9 +64,9 @@ ActionRecord *ActionManager::createActionRecord(uint16 type) {
|
||||
case 0x28:
|
||||
return new PlayPrimaryVideoChan0(NancySceneState.getViewport());
|
||||
case 0x29:
|
||||
return new PlaySecondaryVideo('0', NancySceneState.getViewport());
|
||||
return new PlaySecondaryVideo(0, NancySceneState.getViewport());
|
||||
case 0x2A:
|
||||
return new PlaySecondaryVideo('1', NancySceneState.getViewport());
|
||||
return new PlaySecondaryVideo(1, NancySceneState.getViewport());
|
||||
case 0x2B:
|
||||
return new PlaySecondaryMovie(NancySceneState.getViewport());
|
||||
case 0x2C:
|
||||
|
||||
@@ -39,7 +39,7 @@ void LeverPuzzle::init() {
|
||||
NanEngine.resource->loadImage(imageName, image);
|
||||
}
|
||||
|
||||
uint16 LeverPuzzle::readData(Common::SeekableReadStream &stream) {
|
||||
void LeverPuzzle::readData(Common::SeekableReadStream &stream) {
|
||||
char buf[10];
|
||||
stream.read(buf, 10);
|
||||
imageName = buf;
|
||||
@@ -85,8 +85,6 @@ uint16 LeverPuzzle::readData(Common::SeekableReadStream &stream) {
|
||||
flagOnExit.label = stream.readSint16LE();
|
||||
flagOnExit.flag = (NancyFlag)stream.readByte();
|
||||
readRect(stream, exitHotspot);
|
||||
|
||||
return 0x192;
|
||||
}
|
||||
|
||||
void LeverPuzzle::execute() {
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
|
||||
virtual void init() override;
|
||||
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
virtual void handleInput(NancyInput &input) override;
|
||||
virtual void onPause(bool pause) override;
|
||||
|
||||
@@ -50,7 +50,7 @@ void OrderingPuzzle::init() {
|
||||
RenderObject::init();
|
||||
}
|
||||
|
||||
uint16 OrderingPuzzle::readData(Common::SeekableReadStream &stream) {
|
||||
void OrderingPuzzle::readData(Common::SeekableReadStream &stream) {
|
||||
char buf[10];
|
||||
|
||||
stream.read(buf, 10);
|
||||
@@ -97,8 +97,6 @@ uint16 OrderingPuzzle::readData(Common::SeekableReadStream &stream) {
|
||||
flagOnExit.label = stream.readSint16LE();
|
||||
flagOnExit.flag = (NancyFlag)stream.readByte();
|
||||
readRect(stream, exitHotspot);
|
||||
|
||||
return 0x26D;
|
||||
}
|
||||
|
||||
void OrderingPuzzle::execute() {
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
|
||||
virtual void init() override;
|
||||
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
virtual void handleInput(NancyInput &input) override;
|
||||
virtual void onPause(bool pause) override;
|
||||
|
||||
@@ -41,7 +41,7 @@ void PasswordPuzzle::init() {
|
||||
RenderObject::init();
|
||||
}
|
||||
|
||||
uint16 PasswordPuzzle::readData(Common::SeekableReadStream &stream) {
|
||||
void PasswordPuzzle::readData(Common::SeekableReadStream &stream) {
|
||||
fontID = stream.readUint16LE();
|
||||
cursorBlinkTime = stream.readUint16LE();
|
||||
readRect(stream, nameBounds);
|
||||
@@ -68,8 +68,6 @@ uint16 PasswordPuzzle::readData(Common::SeekableReadStream &stream) {
|
||||
flagOnExit.label = stream.readSint16LE();
|
||||
flagOnExit.flag = (NancyFlag)stream.readByte();
|
||||
readRect(stream, exitHotspot);
|
||||
|
||||
return 0xD7;
|
||||
}
|
||||
|
||||
void PasswordPuzzle::execute() {
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
|
||||
virtual void init() override;
|
||||
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
virtual void handleInput(NancyInput &input) override;
|
||||
virtual void onPause(bool pause) override;
|
||||
|
||||
@@ -151,8 +151,8 @@ void PlayPrimaryVideoChan0::onPause(bool pause) {
|
||||
}
|
||||
}
|
||||
|
||||
uint16 PlayPrimaryVideoChan0::readData(Common::SeekableReadStream &stream) {
|
||||
uint16 bytesRead = stream.pos();
|
||||
void PlayPrimaryVideoChan0::readData(Common::SeekableReadStream &stream) {
|
||||
uint16 beginOffset = stream.pos();
|
||||
|
||||
char name[10];
|
||||
stream.read(name, 10);
|
||||
@@ -177,7 +177,7 @@ uint16 PlayPrimaryVideoChan0::readData(Common::SeekableReadStream &stream) {
|
||||
doNotPop = (NancyFlag)stream.readByte();
|
||||
sceneChange.readData(stream);
|
||||
|
||||
stream.seek(bytesRead + 0x69C);
|
||||
stream.seek(beginOffset + 0x69C);
|
||||
|
||||
uint16 numResponses = stream.readUint16LE();
|
||||
if (numResponses > 0) {
|
||||
@@ -217,9 +217,6 @@ uint16 PlayPrimaryVideoChan0::readData(Common::SeekableReadStream &stream) {
|
||||
flagsStruct.flagToSet.flag.flag = (NancyFlag)stream.readByte();
|
||||
}
|
||||
}
|
||||
|
||||
bytesRead = stream.pos() - bytesRead;
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
void PlayPrimaryVideoChan0::execute() {
|
||||
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
virtual void updateGraphics() override;
|
||||
virtual void onPause(bool pause) override;
|
||||
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
// Functions for handling the built-in dialogue responses found in the executable
|
||||
|
||||
@@ -40,9 +40,8 @@
|
||||
namespace Nancy {
|
||||
namespace Action {
|
||||
|
||||
uint16 SceneChange::readData(Common::SeekableReadStream &stream) {
|
||||
void SceneChange::readData(Common::SeekableReadStream &stream) {
|
||||
sceneChange.readData(stream);
|
||||
return 8;
|
||||
}
|
||||
|
||||
void SceneChange::execute() {
|
||||
@@ -50,8 +49,8 @@ void SceneChange::execute() {
|
||||
isDone = true;
|
||||
}
|
||||
|
||||
uint16 HotMultiframeSceneChange::readData(Common::SeekableReadStream &stream) {
|
||||
uint16 ret = SceneChange::readData(stream);
|
||||
void HotMultiframeSceneChange::readData(Common::SeekableReadStream &stream) {
|
||||
SceneChange::readData(stream);
|
||||
uint16 numHotspots = stream.readUint16LE();
|
||||
|
||||
for (uint i = 0; i < numHotspots; ++i) {
|
||||
@@ -59,8 +58,6 @@ uint16 HotMultiframeSceneChange::readData(Common::SeekableReadStream &stream) {
|
||||
HotspotDescription &newDesc = hotspots[i];
|
||||
newDesc.readData(stream);
|
||||
}
|
||||
|
||||
return ret + (numHotspots * 0x12) + 2;
|
||||
}
|
||||
|
||||
void HotMultiframeSceneChange::execute() {
|
||||
@@ -84,10 +81,9 @@ void HotMultiframeSceneChange::execute() {
|
||||
}
|
||||
}
|
||||
|
||||
uint16 Hot1FrSceneChange::readData(Common::SeekableReadStream &stream) {
|
||||
void Hot1FrSceneChange::readData(Common::SeekableReadStream &stream) {
|
||||
SceneChange::readData(stream);
|
||||
hotspotDesc.readData(stream);
|
||||
return 0x1A;
|
||||
}
|
||||
|
||||
void Hot1FrSceneChange::execute() {
|
||||
@@ -109,26 +105,22 @@ void Hot1FrSceneChange::execute() {
|
||||
}
|
||||
}
|
||||
|
||||
uint16 HotMultiframeMultisceneChange::readData(Common::SeekableReadStream &stream) {
|
||||
void HotMultiframeMultisceneChange::readData(Common::SeekableReadStream &stream) {
|
||||
stream.seek(0x14, SEEK_CUR);
|
||||
uint size = stream.readUint16LE() * 0x12 + 0x16;
|
||||
stream.seek(-0x16, SEEK_CUR);
|
||||
|
||||
return readRaw(stream, size); // TODO
|
||||
uint size = stream.readUint16LE() * 0x12;
|
||||
stream.skip(size);
|
||||
}
|
||||
|
||||
uint16 StartFrameNextScene::readData(Common::SeekableReadStream &stream) {
|
||||
return readRaw(stream, 0x4); // TODO
|
||||
void StartFrameNextScene::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(4);
|
||||
}
|
||||
|
||||
uint16 StartStopPlayerScrolling::readData(Common::SeekableReadStream &stream) {
|
||||
type = stream.readByte();
|
||||
return 1;
|
||||
void StartStopPlayerScrolling::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(1);
|
||||
}
|
||||
|
||||
uint16 MapCall::readData(Common::SeekableReadStream &stream) {
|
||||
void MapCall::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void MapCall::execute() {
|
||||
@@ -137,9 +129,8 @@ void MapCall::execute() {
|
||||
finishExecution();
|
||||
}
|
||||
|
||||
uint16 MapCallHot1Fr::readData(Common::SeekableReadStream &stream) {
|
||||
hotspotDesc.readData(stream);
|
||||
return 0x12;
|
||||
void MapCallHot1Fr::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(0x12);
|
||||
}
|
||||
|
||||
void MapCallHot1Fr::execute() {
|
||||
@@ -159,14 +150,12 @@ void MapCallHot1Fr::execute() {
|
||||
}
|
||||
}
|
||||
|
||||
uint16 MapCallHotMultiframe::readData(Common::SeekableReadStream &stream) {
|
||||
void MapCallHotMultiframe::readData(Common::SeekableReadStream &stream) {
|
||||
uint16 numDescs = stream.readUint16LE();
|
||||
for (uint i = 0; i < numDescs; ++i) {
|
||||
hotspots.push_back(HotspotDescription());
|
||||
hotspots[i].readData(stream);
|
||||
}
|
||||
|
||||
return 2 + numDescs * 0x12;
|
||||
}
|
||||
|
||||
void MapCallHotMultiframe::execute() {
|
||||
@@ -189,61 +178,53 @@ void MapCallHotMultiframe::execute() {
|
||||
}
|
||||
}
|
||||
|
||||
uint16 MapLocationAccess::readData(Common::SeekableReadStream &stream) {
|
||||
return readRaw(stream, 0x4); // TODO
|
||||
void MapLocationAccess::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(4);
|
||||
}
|
||||
|
||||
uint16 MapSound::readData(Common::SeekableReadStream &stream) {
|
||||
return readRaw(stream, 0x10); // TODO
|
||||
void MapSound::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(0x10);
|
||||
}
|
||||
|
||||
uint16 MapAviOverride::readData(Common::SeekableReadStream &stream) {
|
||||
return readRaw(stream, 0x2); // TODO
|
||||
void MapAviOverride::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(2);
|
||||
}
|
||||
|
||||
uint16 MapAviOverrideOff::readData(Common::SeekableReadStream &stream) {
|
||||
overrideOffData = stream.readByte();
|
||||
return 1;
|
||||
void MapAviOverrideOff::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(1);
|
||||
}
|
||||
|
||||
uint16 TextBoxWrite::readData(Common::SeekableReadStream &stream) {
|
||||
void TextBoxWrite::readData(Common::SeekableReadStream &stream) {
|
||||
uint16 size = stream.readUint16LE();
|
||||
stream.seek(-2, SEEK_CUR);
|
||||
stream.skip(size);
|
||||
|
||||
if (size > 0x2710) {
|
||||
if (size > 10000) {
|
||||
error("Action Record atTextboxWrite has too many text box chars: %d", size);;
|
||||
}
|
||||
|
||||
return readRaw(stream, size+2); // TODO
|
||||
}
|
||||
|
||||
uint16 TextBoxClear::readData(Common::SeekableReadStream &stream) {
|
||||
clearData = stream.readByte();
|
||||
return 1;
|
||||
void TextBoxClear::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(1);
|
||||
}
|
||||
|
||||
uint16 BumpPlayerClock::readData(Common::SeekableReadStream &stream) {
|
||||
return readRaw(stream, 0x5); // TODO
|
||||
void BumpPlayerClock::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(5);
|
||||
}
|
||||
|
||||
uint16 SaveContinueGame::readData(Common::SeekableReadStream &stream) {
|
||||
saveContinueData = stream.readByte();
|
||||
return 1;
|
||||
void SaveContinueGame::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(1);
|
||||
}
|
||||
|
||||
uint16 TurnOffMainRendering::readData(Common::SeekableReadStream &stream) {
|
||||
turnOffData = stream.readByte();
|
||||
return 1;
|
||||
void TurnOffMainRendering::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(1);
|
||||
}
|
||||
|
||||
uint16 TurnOnMainRendering::readData(Common::SeekableReadStream &stream) {
|
||||
turnOnData = stream.readByte();
|
||||
return 1;
|
||||
void TurnOnMainRendering::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(1);
|
||||
}
|
||||
|
||||
uint16 ResetAndStartTimer::readData(Common::SeekableReadStream &stream) {
|
||||
void ResetAndStartTimer::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void ResetAndStartTimer::execute() {
|
||||
@@ -251,9 +232,8 @@ void ResetAndStartTimer::execute() {
|
||||
isDone = true;
|
||||
}
|
||||
|
||||
uint16 StopTimer::readData(Common::SeekableReadStream &stream) {
|
||||
void StopTimer::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void StopTimer::execute() {
|
||||
@@ -261,9 +241,8 @@ void StopTimer::execute() {
|
||||
isDone = true;
|
||||
}
|
||||
|
||||
uint16 EventFlags::readData(Common::SeekableReadStream &stream) {
|
||||
void EventFlags::readData(Common::SeekableReadStream &stream) {
|
||||
flags.readData(stream);
|
||||
return 0x28;
|
||||
}
|
||||
|
||||
void EventFlags::execute() {
|
||||
@@ -271,8 +250,8 @@ void EventFlags::execute() {
|
||||
isDone = true;
|
||||
}
|
||||
|
||||
uint16 EventFlagsMultiHS::readData(Common::SeekableReadStream &stream) {
|
||||
uint16 returnSize = EventFlags::readData(stream);
|
||||
void EventFlagsMultiHS::readData(Common::SeekableReadStream &stream) {
|
||||
EventFlags::readData(stream);
|
||||
uint16 numHotspots = stream.readUint16LE();
|
||||
|
||||
for (uint16 i = 0; i < numHotspots; ++i) {
|
||||
@@ -280,10 +259,6 @@ uint16 EventFlagsMultiHS::readData(Common::SeekableReadStream &stream) {
|
||||
HotspotDescription &newDesc = hotspots[i];
|
||||
newDesc.readData(stream);
|
||||
}
|
||||
|
||||
returnSize += numHotspots * 0x12 + 0x2;
|
||||
|
||||
return returnSize;
|
||||
}
|
||||
|
||||
void EventFlagsMultiHS::execute() {
|
||||
@@ -311,9 +286,8 @@ void EventFlagsMultiHS::execute() {
|
||||
}
|
||||
}
|
||||
|
||||
uint16 LoseGame::readData(Common::SeekableReadStream &stream) {
|
||||
void LoseGame::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void LoseGame::execute() {
|
||||
@@ -323,19 +297,16 @@ void LoseGame::execute() {
|
||||
isDone = true;
|
||||
}
|
||||
|
||||
uint16 PushScene::readData(Common::SeekableReadStream &stream) {
|
||||
pushData = stream.readByte();
|
||||
return 1;
|
||||
void PushScene::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(1);
|
||||
}
|
||||
|
||||
uint16 PopScene::readData(Common::SeekableReadStream &stream) {
|
||||
popData = stream.readByte();
|
||||
return 1;
|
||||
void PopScene::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(1);
|
||||
}
|
||||
|
||||
uint16 WinGame::readData(Common::SeekableReadStream &stream) {
|
||||
void WinGame::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void WinGame::execute() {
|
||||
@@ -347,9 +318,8 @@ void WinGame::execute() {
|
||||
isDone = true;
|
||||
}
|
||||
|
||||
uint16 AddInventoryNoHS::readData(Common::SeekableReadStream &stream) {
|
||||
void AddInventoryNoHS::readData(Common::SeekableReadStream &stream) {
|
||||
itemID = stream.readUint16LE();
|
||||
return 2;
|
||||
}
|
||||
|
||||
void AddInventoryNoHS::execute() {
|
||||
@@ -360,15 +330,14 @@ void AddInventoryNoHS::execute() {
|
||||
isDone = true;
|
||||
}
|
||||
|
||||
uint16 RemoveInventoryNoHS::readData(Common::SeekableReadStream &stream) {
|
||||
return readRaw(stream, 0x2); // TODO
|
||||
void RemoveInventoryNoHS::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(2);
|
||||
}
|
||||
|
||||
uint16 DifficultyLevel::readData(Common::SeekableReadStream &stream) {
|
||||
void DifficultyLevel::readData(Common::SeekableReadStream &stream) {
|
||||
difficulty = stream.readUint16LE();
|
||||
flag.label = stream.readSint16LE();
|
||||
flag.flag = (NancyFlag)stream.readUint16LE();
|
||||
return 6;
|
||||
}
|
||||
|
||||
void DifficultyLevel::execute() {
|
||||
@@ -385,7 +354,7 @@ void ShowInventoryItem::init() {
|
||||
RenderObject::init();
|
||||
}
|
||||
|
||||
uint16 ShowInventoryItem::readData(Common::SeekableReadStream &stream) {
|
||||
void ShowInventoryItem::readData(Common::SeekableReadStream &stream) {
|
||||
objectID = stream.readUint16LE();
|
||||
char name[10];
|
||||
stream.read(name, 10);
|
||||
@@ -397,8 +366,6 @@ uint16 ShowInventoryItem::readData(Common::SeekableReadStream &stream) {
|
||||
bitmaps.push_back(BitmapDescription());
|
||||
bitmaps[i].readData(stream);
|
||||
}
|
||||
|
||||
return 0xE + 0x22 * numFrames;
|
||||
}
|
||||
|
||||
void ShowInventoryItem::execute() {
|
||||
@@ -451,13 +418,12 @@ void ShowInventoryItem::onPause(bool pause) {
|
||||
}
|
||||
}
|
||||
|
||||
uint16 PlayDigiSoundAndDie::readData(Common::SeekableReadStream &stream) {
|
||||
void PlayDigiSoundAndDie::readData(Common::SeekableReadStream &stream) {
|
||||
sound.read(stream, SoundDescription::kDIGI);
|
||||
sceneChange.readData(stream);
|
||||
flagOnTrigger.label = stream.readSint16LE();
|
||||
flagOnTrigger.flag = (NancyFlag)stream.readByte();
|
||||
stream.skip(1);
|
||||
return 0x2B;
|
||||
stream.skip(2);
|
||||
}
|
||||
|
||||
void PlayDigiSoundAndDie::execute() {
|
||||
@@ -486,11 +452,11 @@ void PlayDigiSoundAndDie::execute() {
|
||||
}
|
||||
}
|
||||
|
||||
uint16 PlaySoundPanFrameAnchorAndDie::readData(Common::SeekableReadStream &stream) {
|
||||
return readRaw(stream, 0x20); // TODO
|
||||
void PlaySoundPanFrameAnchorAndDie::readData(Common::SeekableReadStream &stream) {
|
||||
stream.skip(0x20);
|
||||
}
|
||||
|
||||
uint16 PlaySoundMultiHS::readData(Common::SeekableReadStream &stream) {
|
||||
void PlaySoundMultiHS::readData(Common::SeekableReadStream &stream) {
|
||||
sound.read(stream, SoundDescription::kNormal);
|
||||
sceneChange.readData(stream);
|
||||
flag.label = stream.readSint16LE();
|
||||
@@ -503,8 +469,6 @@ uint16 PlaySoundMultiHS::readData(Common::SeekableReadStream &stream) {
|
||||
hotspots.back().frameID = stream.readUint16LE();
|
||||
readRect(stream, hotspots.back().coords);
|
||||
}
|
||||
|
||||
return 0x31 + numHotspots * 0x12;
|
||||
}
|
||||
|
||||
void PlaySoundMultiHS::execute() {
|
||||
@@ -536,10 +500,9 @@ void PlaySoundMultiHS::execute() {
|
||||
}
|
||||
}
|
||||
|
||||
uint16 HintSystem::readData(Common::SeekableReadStream &stream) {
|
||||
void HintSystem::readData(Common::SeekableReadStream &stream) {
|
||||
characterID = stream.readByte();
|
||||
genericSound.read(stream, SoundDescription::kNormal);
|
||||
return 0x23;
|
||||
}
|
||||
|
||||
void HintSystem::execute() {
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Action {
|
||||
|
||||
class SceneChange : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
SceneChangeDescription sceneChange;
|
||||
@@ -52,7 +52,7 @@ protected:
|
||||
|
||||
class HotMultiframeSceneChange : public SceneChange {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
Common::Array<HotspotDescription> hotspots;
|
||||
@@ -63,7 +63,7 @@ protected:
|
||||
|
||||
class Hot1FrSceneChange : public SceneChange {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
HotspotDescription hotspotDesc;
|
||||
@@ -81,7 +81,7 @@ protected:
|
||||
|
||||
class HotMultiframeMultisceneChange : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
protected:
|
||||
virtual Common::String getRecordTypeName() const override { return "HotMultiframeMultisceneChange"; }
|
||||
@@ -89,7 +89,7 @@ protected:
|
||||
|
||||
class StartFrameNextScene : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
protected:
|
||||
virtual Common::String getRecordTypeName() const override { return "StartFrameNextScene"; }
|
||||
@@ -97,7 +97,7 @@ protected:
|
||||
|
||||
class StartStopPlayerScrolling : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
// TODO add a Start and Stop subclass
|
||||
|
||||
byte type = 0;
|
||||
@@ -108,7 +108,7 @@ protected:
|
||||
|
||||
class MapCall : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
virtual CursorManager::CursorType getHoverCursor() const override { return CursorManager::kExitArrow; }
|
||||
@@ -119,7 +119,7 @@ protected:
|
||||
|
||||
class MapCallHot1Fr : public MapCall {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
HotspotDescription hotspotDesc;
|
||||
@@ -130,7 +130,7 @@ protected:
|
||||
|
||||
class MapCallHotMultiframe : public MapCall {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
Common::Array<HotspotDescription> hotspots;
|
||||
@@ -141,7 +141,7 @@ protected:
|
||||
|
||||
class MapLocationAccess : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
protected:
|
||||
virtual Common::String getRecordTypeName() const override { return "MapLocationAccess"; }
|
||||
@@ -149,7 +149,7 @@ protected:
|
||||
|
||||
class MapSound : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
protected:
|
||||
virtual Common::String getRecordTypeName() const override { return "MapSound"; }
|
||||
@@ -157,7 +157,7 @@ protected:
|
||||
|
||||
class MapAviOverride : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
protected:
|
||||
virtual Common::String getRecordTypeName() const override { return "MapAviOverride"; }
|
||||
@@ -165,9 +165,7 @@ protected:
|
||||
|
||||
class MapAviOverrideOff : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
byte overrideOffData = 0;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
protected:
|
||||
virtual Common::String getRecordTypeName() const override { return "MapAviOverrideOff"; }
|
||||
@@ -175,7 +173,7 @@ protected:
|
||||
|
||||
class TextBoxWrite : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
protected:
|
||||
virtual Common::String getRecordTypeName() const override { return "TextBoxWrite"; }
|
||||
@@ -183,9 +181,7 @@ protected:
|
||||
|
||||
class TextBoxClear : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
byte clearData = 0;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
protected:
|
||||
virtual Common::String getRecordTypeName() const override { return "TextBoxClear"; }
|
||||
@@ -193,7 +189,7 @@ protected:
|
||||
|
||||
class BumpPlayerClock : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
protected:
|
||||
virtual Common::String getRecordTypeName() const override { return "BumpPlayerClock"; }
|
||||
@@ -201,9 +197,7 @@ protected:
|
||||
|
||||
class SaveContinueGame : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
byte saveContinueData = 0;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
protected:
|
||||
virtual Common::String getRecordTypeName() const override { return "SaveContinueGame"; }
|
||||
@@ -211,9 +205,7 @@ protected:
|
||||
|
||||
class TurnOffMainRendering : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
byte turnOffData = 0;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
protected:
|
||||
virtual Common::String getRecordTypeName() const override { return "TurnOffMainRendering"; }
|
||||
@@ -221,9 +213,7 @@ protected:
|
||||
|
||||
class TurnOnMainRendering : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
byte turnOnData = 0;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
protected:
|
||||
virtual Common::String getRecordTypeName() const override { return "TurnOnMainRendering"; }
|
||||
@@ -231,7 +221,7 @@ protected:
|
||||
|
||||
class ResetAndStartTimer : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
protected:
|
||||
@@ -240,7 +230,7 @@ protected:
|
||||
|
||||
class StopTimer : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
protected:
|
||||
@@ -249,7 +239,7 @@ protected:
|
||||
|
||||
class EventFlags : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
MultiEventFlagDescription flags;
|
||||
@@ -260,7 +250,7 @@ protected:
|
||||
|
||||
class EventFlagsMultiHS : public EventFlags {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
Common::Array<HotspotDescription> hotspots;
|
||||
@@ -271,7 +261,7 @@ protected:
|
||||
|
||||
class LoseGame : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
protected:
|
||||
@@ -280,9 +270,7 @@ protected:
|
||||
|
||||
class PushScene : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
byte pushData = 0;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
protected:
|
||||
virtual Common::String getRecordTypeName() const override { return "PushScene"; }
|
||||
@@ -290,9 +278,7 @@ protected:
|
||||
|
||||
class PopScene : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
byte popData = 0;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
protected:
|
||||
virtual Common::String getRecordTypeName() const override { return "PopScene"; }
|
||||
@@ -300,7 +286,7 @@ protected:
|
||||
|
||||
class WinGame : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
protected:
|
||||
@@ -309,7 +295,7 @@ protected:
|
||||
|
||||
class AddInventoryNoHS : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
uint itemID;
|
||||
@@ -320,7 +306,7 @@ protected:
|
||||
|
||||
class RemoveInventoryNoHS : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
protected:
|
||||
virtual Common::String getRecordTypeName() const override { return "RemoveInventoryNoHS"; }
|
||||
@@ -328,7 +314,7 @@ protected:
|
||||
|
||||
class DifficultyLevel : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
uint16 difficulty = 0;
|
||||
@@ -340,7 +326,7 @@ protected:
|
||||
|
||||
class ShowInventoryItem : public ActionRecord, public RenderObject {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
ShowInventoryItem(RenderObject &redrawFrom) : RenderObject(redrawFrom) {}
|
||||
@@ -366,7 +352,7 @@ protected:
|
||||
|
||||
class PlayDigiSoundAndDie : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
// TODO subclass into Play and Stop (?)
|
||||
|
||||
@@ -380,7 +366,7 @@ protected:
|
||||
|
||||
class PlaySoundPanFrameAnchorAndDie : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
|
||||
protected:
|
||||
virtual Common::String getRecordTypeName() const override { return "PlaySoundPanFrameAnchorAndDie"; }
|
||||
@@ -388,7 +374,7 @@ protected:
|
||||
|
||||
class PlaySoundMultiHS : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
SoundDescription sound; // 0x0
|
||||
@@ -402,7 +388,7 @@ protected:
|
||||
|
||||
class HintSystem : public ActionRecord {
|
||||
public:
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
byte characterID; // 0x00
|
||||
|
||||
@@ -41,7 +41,7 @@ void RotatingLockPuzzle::init() {
|
||||
NanEngine.resource->loadImage(imageName, image);
|
||||
}
|
||||
|
||||
uint16 RotatingLockPuzzle::readData(Common::SeekableReadStream &stream) {
|
||||
void RotatingLockPuzzle::readData(Common::SeekableReadStream &stream) {
|
||||
char buf[10];
|
||||
stream.read(buf, 10);
|
||||
imageName = buf;
|
||||
@@ -98,8 +98,6 @@ uint16 RotatingLockPuzzle::readData(Common::SeekableReadStream &stream) {
|
||||
flagOnExit.label = stream.readSint16LE();
|
||||
flagOnExit.flag = (NancyFlag)stream.readByte();
|
||||
readRect(stream, exitHotspot);
|
||||
|
||||
return 0x2A4;
|
||||
}
|
||||
|
||||
void RotatingLockPuzzle::execute() {
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
|
||||
virtual void init() override;
|
||||
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
virtual void handleInput(NancyInput &input) override;
|
||||
virtual void onPause(bool pause) override;
|
||||
|
||||
@@ -37,7 +37,7 @@ PlaySecondaryMovie::~PlaySecondaryMovie() {
|
||||
}
|
||||
}
|
||||
|
||||
uint16 PlaySecondaryMovie::readData(Common::SeekableReadStream &stream) {
|
||||
void PlaySecondaryMovie::readData(Common::SeekableReadStream &stream) {
|
||||
char name[10];
|
||||
stream.read(name, 10);
|
||||
videoName = name;
|
||||
@@ -64,8 +64,6 @@ uint16 PlaySecondaryMovie::readData(Common::SeekableReadStream &stream) {
|
||||
videoDescs.push_back(SecondaryVideoDescription());
|
||||
videoDescs[i].readData(stream);
|
||||
}
|
||||
|
||||
return 0xD4 + numVideoDescs * 0x42; // TODO
|
||||
}
|
||||
|
||||
void PlaySecondaryMovie::init() {
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
virtual void updateGraphics() override;
|
||||
virtual void onPause(bool pause) override;
|
||||
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
Common::String videoName; // 0x00
|
||||
|
||||
@@ -140,7 +140,7 @@ void PlaySecondaryVideo::handleInput(NancyInput &input) {
|
||||
}
|
||||
}
|
||||
|
||||
uint16 PlaySecondaryVideo::readData(Common::SeekableReadStream &stream) {
|
||||
void PlaySecondaryVideo::readData(Common::SeekableReadStream &stream) {
|
||||
char buf[10];
|
||||
stream.read(buf, 10);
|
||||
filename = buf;
|
||||
@@ -159,8 +159,6 @@ uint16 PlaySecondaryVideo::readData(Common::SeekableReadStream &stream) {
|
||||
videoDescs.push_back(SecondaryVideoDescription());
|
||||
videoDescs[i].readData(stream);
|
||||
}
|
||||
|
||||
return 0x35 + (numVideoDescs * 0x42);
|
||||
}
|
||||
|
||||
void PlaySecondaryVideo::execute() {
|
||||
|
||||
@@ -41,7 +41,7 @@ class PlaySecondaryVideo : public ActionRecord, public RenderObject {
|
||||
public:
|
||||
enum HoverState { kNoHover, kHover, kEndHover };
|
||||
|
||||
PlaySecondaryVideo(char chan, RenderObject &redrawFrom) : RenderObject(redrawFrom), channel(chan) {}
|
||||
PlaySecondaryVideo(uint chan, RenderObject &redrawFrom) : RenderObject(redrawFrom), channel(chan) {}
|
||||
virtual ~PlaySecondaryVideo() { _decoder.close(); }
|
||||
|
||||
virtual void init() override;
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
virtual void onPause(bool pause) override;
|
||||
virtual void handleInput(NancyInput &input) override;
|
||||
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
|
||||
Common::String filename;
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
Common::Array<SecondaryVideoDescription> videoDescs; // 0x35
|
||||
|
||||
protected:
|
||||
virtual Common::String getRecordTypeName() const override { return Common::String("PlaySecondaryVideoChan" + channel); }
|
||||
virtual Common::String getRecordTypeName() const override { return Common::String::format("PlaySecondaryVideoChan%i", channel); }
|
||||
|
||||
virtual uint16 getZOrder() const override { return 8; }
|
||||
virtual BlitType getBlitType() const override { return kTrans; }
|
||||
@@ -77,7 +77,7 @@ protected:
|
||||
bool _isPlaying = false;
|
||||
bool _isHovered = false;
|
||||
|
||||
char channel;
|
||||
uint channel;
|
||||
};
|
||||
|
||||
} // End of namespace Action
|
||||
|
||||
@@ -44,7 +44,7 @@ void SliderPuzzle::init() {
|
||||
NanEngine.resource->loadImage(imageName, image);
|
||||
}
|
||||
|
||||
uint16 SliderPuzzle::readData(Common::SeekableReadStream &stream) {
|
||||
void SliderPuzzle::readData(Common::SeekableReadStream &stream) {
|
||||
char buf[10];
|
||||
stream.read(buf, 10);
|
||||
imageName = buf;
|
||||
@@ -101,8 +101,6 @@ uint16 SliderPuzzle::readData(Common::SeekableReadStream &stream) {
|
||||
flagOnExit.label = stream.readSint16LE();
|
||||
flagOnExit.flag = (NancyFlag)stream.readByte();
|
||||
readRect(stream, exitHotspot);
|
||||
|
||||
return 0x544;
|
||||
}
|
||||
|
||||
void SliderPuzzle::execute() {
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
|
||||
virtual void init() override;
|
||||
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
virtual void handleInput(NancyInput &input) override;
|
||||
virtual void onPause(bool pause) override;
|
||||
|
||||
@@ -42,7 +42,7 @@ void PlayStaticBitmapAnimation::init() {
|
||||
RenderObject::init();
|
||||
}
|
||||
|
||||
uint16 PlayStaticBitmapAnimation::readData(Common::SeekableReadStream &stream) {
|
||||
void PlayStaticBitmapAnimation::readData(Common::SeekableReadStream &stream) {
|
||||
char name[10];
|
||||
stream.read(name, 10);
|
||||
imageName = Common::String(name);
|
||||
@@ -57,6 +57,7 @@ uint16 PlayStaticBitmapAnimation::readData(Common::SeekableReadStream &stream) {
|
||||
loopLastFrame = stream.readUint16LE();
|
||||
frameTime = Common::Rational(1000, stream.readUint16LE()).toInt();
|
||||
zOrder = stream.readUint16LE();
|
||||
|
||||
if (isInterruptible) {
|
||||
interruptCondition.label = stream.readSint16LE();
|
||||
interruptCondition.flag = (NancyFlag)stream.readUint16LE();
|
||||
@@ -64,6 +65,7 @@ uint16 PlayStaticBitmapAnimation::readData(Common::SeekableReadStream &stream) {
|
||||
interruptCondition.label = -1;
|
||||
interruptCondition.flag = kFalse;
|
||||
}
|
||||
|
||||
sceneChange.readData(stream);
|
||||
triggerFlags.readData(stream);
|
||||
sound.read(stream, SoundDescription::kNormal);
|
||||
@@ -81,10 +83,6 @@ uint16 PlayStaticBitmapAnimation::readData(Common::SeekableReadStream &stream) {
|
||||
readRect(stream, rects.src);
|
||||
readRect(stream, rects.dest);
|
||||
}
|
||||
|
||||
uint baseSize = isInterruptible ? 0x76 : 0x72;
|
||||
|
||||
return baseSize + numViewportFrames * 0x22 + (loopLastFrame - firstFrame + 1) * 16;
|
||||
}
|
||||
|
||||
void PlayStaticBitmapAnimation::execute() {
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
|
||||
virtual void init() override;
|
||||
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
virtual void onPause(bool pause) override;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ void Telephone::init() {
|
||||
NancySceneState.setShouldClearTextbox(false);
|
||||
}
|
||||
|
||||
uint16 Telephone::readData(Common::SeekableReadStream &stream) {
|
||||
void Telephone::readData(Common::SeekableReadStream &stream) {
|
||||
char buf[10];
|
||||
stream.read(buf, 10);
|
||||
imageName = buf;
|
||||
@@ -112,8 +112,6 @@ uint16 Telephone::readData(Common::SeekableReadStream &stream) {
|
||||
call.flag.label = stream.readSint16LE();
|
||||
call.flag.flag = (NancyFlag)stream.readUint16LE();
|
||||
}
|
||||
|
||||
return numCalls * 0xEB + 0x48C;
|
||||
}
|
||||
|
||||
void Telephone::execute() {
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
|
||||
virtual void init() override;
|
||||
|
||||
virtual uint16 readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void readData(Common::SeekableReadStream &stream) override;
|
||||
virtual void execute() override;
|
||||
virtual void handleInput(NancyInput &input) override;
|
||||
|
||||
|
||||
@@ -49,13 +49,6 @@ void GraphicsManager::init() {
|
||||
_screen.create(640, 480, screenPixelFormat);
|
||||
_screen.setTransparentColor(getTransColor());
|
||||
|
||||
auto formats = NanEngine._system->getSupportedFormats();
|
||||
|
||||
for (auto f : formats) {
|
||||
debug(f.toString().c_str());
|
||||
|
||||
}
|
||||
|
||||
Common::SeekableReadStream *ob = NanEngine.getBootChunkStream("OB0");
|
||||
ob->seek(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user