NANCY: Add ActionRecord and Scene debug channels

Added debug channels for action records and scenes, and added proper output to their respective loading functions.
This commit is contained in:
fracturehill 2021-03-02 01:48:02 +02:00 committed by Eugene Sandulenko
parent 74b045bd52
commit 145d5fd735
17 changed files with 222 additions and 23 deletions

View file

@ -147,6 +147,80 @@ bool ActionManager::addNewActionRecord(Common::SeekableReadStream &inputData) {
} }
_records.push_back(newRecord); _records.push_back(newRecord);
debugC(1, kDebugActionRecord, "Loaded action record %i, type %s, typeID %i, description \"%s\", execType == %s",
_records.size() - 1,
newRecord->getRecordTypeName().c_str(),
newRecord->type,
newRecord->description.c_str(),
newRecord->execType == ActionRecord::kRepeating ? "kRepeating" : "kOneShot");
for (uint i = 0; i < newRecord->dependencies.size(); ++i) {
debugCN(1, kDebugActionRecord, "\tDependency %i: type ", i);
switch (newRecord->dependencies[i].type) {
case kNone :debugCN(1, kDebugActionRecord, "kNone"); break;
case kInventory :
debugCN(1, kDebugActionRecord, "kInventory, item ID %i %s",
newRecord->dependencies[i].label,
newRecord->dependencies[i].condition == kTrue ? "is in possession" : "is not in possession");
break;
case kEventFlag :
debugCN(1, kDebugActionRecord, "kEventFlag, flag ID %i == %s",
newRecord->dependencies[i].label,
newRecord->dependencies[i].condition == kTrue ? "true" : "false");
break;
case kLogicCondition :
debugCN(1, kDebugActionRecord, "kLogicCondition, logic condition ID %i == %s",
newRecord->dependencies[i].label,
newRecord->dependencies[i].condition == kTrue ? "true" : "false");
break;
case kTotalTime :
debugCN(1, kDebugActionRecord, "kTotalTime, %i hours, %i minutes, %i seconds, %i milliseconds",
newRecord->dependencies[i].hours,
newRecord->dependencies[i].minutes,
newRecord->dependencies[i].seconds,
newRecord->dependencies[i].milliseconds);
break;
case kSceneTime :
debugCN(1, kDebugActionRecord, "kSceneTime, %i hours, %i minutes, %i seconds, %i milliseconds",
newRecord->dependencies[i].hours,
newRecord->dependencies[i].minutes,
newRecord->dependencies[i].seconds,
newRecord->dependencies[i].milliseconds);
break;
case kPlayerTime :
debugCN(1, kDebugActionRecord, "kPlayerTime, %i days, %i hours, %i minutes, %i seconds",
newRecord->dependencies[i].hours,
newRecord->dependencies[i].minutes,
newRecord->dependencies[i].seconds,
newRecord->dependencies[i].milliseconds);
break;
case kSceneCount :
debugCN(1, kDebugActionRecord, "kSceneCount, scene ID %i, hit count %s %i",
newRecord->dependencies[i].hours,
newRecord->dependencies[i].milliseconds == 1 ? ">" : newRecord->dependencies[i].milliseconds == 2 ? "<" : "==",
newRecord->dependencies[i].seconds);
break;
case kResetOnNewDay : debugCN(1, kDebugActionRecord, "kResetOnNewDay"); break;
case kUseItem :
debugCN(1, kDebugActionRecord, "kUseItem, item ID %i %s",
newRecord->dependencies[i].label,
newRecord->dependencies[i].condition == kTrue ? "is held" : "is not held");
break;
case kTimeOfDay :
debugCN(1, kDebugActionRecord, "kTimeOfDay, %s",
newRecord->dependencies[i].label == 0 ? "day" : newRecord->dependencies[i].label == 1 ? "night" : "dusk/dawn");
break;
case kTimerNotDone : debugCN(1, kDebugActionRecord, "kTimerNotDone"); break;
case kTimerDone : debugCN(1, kDebugActionRecord, "kTimerDone"); break;
case kDifficultyLevel :
debugCN(1, kDebugActionRecord, "kDifficultyLevel, level %i", newRecord->dependencies[i].condition);
break;
default: debugCN(1, kDebugActionRecord, "unknown"); break;
}
debugC(1, kDebugActionRecord, ", orFlag == %s", newRecord->dependencies[i].orFlag == true ? "true" : "false");
}
return true; return true;
} }

View file

@ -128,6 +128,9 @@ protected:
} }
} }
// Used for debugging
virtual Common::String getRecordTypeName() const =0;
public: public:
Common::String description; // 0x00 Common::String description; // 0x00
byte type; // 0x30 byte type; // 0x30

View file

@ -63,9 +63,9 @@ ActionRecord *ActionManager::createActionRecord(uint16 type) {
case 0x28: case 0x28:
return new PlayPrimaryVideoChan0(_engine->scene->getViewport()); return new PlayPrimaryVideoChan0(_engine->scene->getViewport());
case 0x29: case 0x29:
return new PlaySecondaryVideo(_engine->scene->getViewport()); return new PlaySecondaryVideo('0', _engine->scene->getViewport());
case 0x2A: case 0x2A:
return new PlaySecondaryVideo(_engine->scene->getViewport()); return new PlaySecondaryVideo('1', _engine->scene->getViewport());
case 0x2B: case 0x2B:
return new PlaySecondaryMovie(_engine->scene->getViewport()); return new PlaySecondaryMovie(_engine->scene->getViewport());
case 0x2C: case 0x2C:

View file

@ -69,6 +69,8 @@ public:
SolveState solveState = kNotSolved; SolveState solveState = kNotSolved;
protected: protected:
virtual Common::String getRecordTypeName() const override { return "LeverPuzzle"; }
virtual uint16 getZOrder() const override { return 7; } virtual uint16 getZOrder() const override { return 7; }
virtual BlitType getBlitType() const override { return kTrans; } virtual BlitType getBlitType() const override { return kTrans; }
virtual bool isViewportRelative() const override { return true; } virtual bool isViewportRelative() const override { return true; }

View file

@ -70,6 +70,8 @@ public:
Time solveSoundPlayTime; Time solveSoundPlayTime;
protected: protected:
virtual Common::String getRecordTypeName() const override { return "OrderingPuzzle"; }
virtual uint16 getZOrder() const override { return 7; } virtual uint16 getZOrder() const override { return 7; }
virtual BlitType getBlitType() const override { return kTrans; } virtual BlitType getBlitType() const override { return kTrans; }
virtual bool isViewportRelative() const override { return true; } virtual bool isViewportRelative() const override { return true; }

View file

@ -76,6 +76,8 @@ public:
SolveState solveState; SolveState solveState;
protected: protected:
virtual Common::String getRecordTypeName() const override { return "PasswordPuzzle"; }
virtual uint16 getZOrder() const override { return 7; } virtual uint16 getZOrder() const override { return 7; }
virtual BlitType getBlitType() const override { return kTrans; } virtual BlitType getBlitType() const override { return kTrans; }
virtual bool isViewportRelative() const override { return true; } virtual bool isViewportRelative() const override { return true; }

View file

@ -114,6 +114,8 @@ public:
static PlayPrimaryVideoChan0 *activePrimaryVideo; static PlayPrimaryVideoChan0 *activePrimaryVideo;
protected: protected:
virtual Common::String getRecordTypeName() const override { return "PlayPrimaryVideoChan0"; }
virtual uint16 getZOrder() const override { return 8; } virtual uint16 getZOrder() const override { return 8; }
virtual BlitType getBlitType() const override { return kNoTrans; } virtual BlitType getBlitType() const override { return kNoTrans; }
virtual bool isViewportRelative() const override { return true; } virtual bool isViewportRelative() const override { return true; }

View file

@ -45,6 +45,9 @@ public:
virtual void execute(Nancy::NancyEngine *engine) override; virtual void execute(Nancy::NancyEngine *engine) override;
SceneChangeDescription sceneChange; SceneChangeDescription sceneChange;
protected:
virtual Common::String getRecordTypeName() const override { return "SceneChange"; }
}; };
class HotMultiframeSceneChange : public SceneChange { class HotMultiframeSceneChange : public SceneChange {
@ -53,6 +56,9 @@ public:
virtual void execute(Nancy::NancyEngine *engine) override; virtual void execute(Nancy::NancyEngine *engine) override;
Common::Array<HotspotDescription> hotspots; Common::Array<HotspotDescription> hotspots;
protected:
virtual Common::String getRecordTypeName() const override { return "HotMultiframeSceneChange"; }
}; };
class Hot1FrSceneChange : public SceneChange { class Hot1FrSceneChange : public SceneChange {
@ -61,20 +67,32 @@ public:
virtual void execute(Nancy::NancyEngine *engine) override; virtual void execute(Nancy::NancyEngine *engine) override;
HotspotDescription hotspotDesc; HotspotDescription hotspotDesc;
protected:
virtual Common::String getRecordTypeName() const override { return "Hot1FrSceneChange"; }
}; };
class Hot1FrExitSceneChange : public Hot1FrSceneChange { class Hot1FrExitSceneChange : public Hot1FrSceneChange {
virtual CursorManager::CursorType getHoverCursor() const override { return CursorManager::kExitArrow; } virtual CursorManager::CursorType getHoverCursor() const override { return CursorManager::kExitArrow; }
protected:
virtual Common::String getRecordTypeName() const override { return "Hot1FrExitSceneChange"; }
}; };
class HotMultiframeMultisceneChange : public ActionRecord { class HotMultiframeMultisceneChange : public ActionRecord {
public: public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
protected:
virtual Common::String getRecordTypeName() const override { return "HotMultiframeMultisceneChange"; }
}; };
class StartFrameNextScene : public ActionRecord { class StartFrameNextScene : public ActionRecord {
public: public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
protected:
virtual Common::String getRecordTypeName() const override { return "StartFrameNextScene"; }
}; };
class StartStopPlayerScrolling : public ActionRecord { class StartStopPlayerScrolling : public ActionRecord {
@ -83,6 +101,9 @@ public:
// TODO add a Start and Stop subclass // TODO add a Start and Stop subclass
byte type = 0; byte type = 0;
protected:
virtual Common::String getRecordTypeName() const override { return "StartStopPlayerScrolling"; }
}; };
class MapCall : public ActionRecord { class MapCall : public ActionRecord {
@ -91,6 +112,9 @@ public:
virtual void execute(Nancy::NancyEngine *engine) override; virtual void execute(Nancy::NancyEngine *engine) override;
virtual CursorManager::CursorType getHoverCursor() const override { return CursorManager::kExitArrow; } virtual CursorManager::CursorType getHoverCursor() const override { return CursorManager::kExitArrow; }
protected:
virtual Common::String getRecordTypeName() const override { return "MapCall"; }
}; };
class MapCallHot1Fr : public MapCall { class MapCallHot1Fr : public MapCall {
@ -99,6 +123,9 @@ public:
virtual void execute(Nancy::NancyEngine *engine) override; virtual void execute(Nancy::NancyEngine *engine) override;
HotspotDescription hotspotDesc; HotspotDescription hotspotDesc;
protected:
virtual Common::String getRecordTypeName() const override { return "MapCallHot1Fr"; }
}; };
class MapCallHotMultiframe : public MapCall { class MapCallHotMultiframe : public MapCall {
@ -107,21 +134,33 @@ public:
virtual void execute(Nancy::NancyEngine *engine) override; virtual void execute(Nancy::NancyEngine *engine) override;
Common::Array<HotspotDescription> hotspots; Common::Array<HotspotDescription> hotspots;
protected:
virtual Common::String getRecordTypeName() const override { return "MapCallHotMultiframe"; }
}; };
class MapLocationAccess : public ActionRecord { class MapLocationAccess : public ActionRecord {
public: public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
protected:
virtual Common::String getRecordTypeName() const override { return "MapLocationAccess"; }
}; };
class MapSound : public ActionRecord { class MapSound : public ActionRecord {
public: public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
protected:
virtual Common::String getRecordTypeName() const override { return "MapSound"; }
}; };
class MapAviOverride : public ActionRecord { class MapAviOverride : public ActionRecord {
public: public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
protected:
virtual Common::String getRecordTypeName() const override { return "MapAviOverride"; }
}; };
class MapAviOverrideOff : public ActionRecord { class MapAviOverrideOff : public ActionRecord {
@ -129,11 +168,17 @@ public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
byte overrideOffData = 0; byte overrideOffData = 0;
protected:
virtual Common::String getRecordTypeName() const override { return "MapAviOverrideOff"; }
}; };
class TextBoxWrite : public ActionRecord { class TextBoxWrite : public ActionRecord {
public: public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
protected:
virtual Common::String getRecordTypeName() const override { return "TextBoxWrite"; }
}; };
class TextBoxClear : public ActionRecord { class TextBoxClear : public ActionRecord {
@ -141,11 +186,17 @@ public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
byte clearData = 0; byte clearData = 0;
protected:
virtual Common::String getRecordTypeName() const override { return "TextBoxClear"; }
}; };
class BumpPlayerClock : public ActionRecord { class BumpPlayerClock : public ActionRecord {
public: public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
protected:
virtual Common::String getRecordTypeName() const override { return "BumpPlayerClock"; }
}; };
class SaveContinueGame : public ActionRecord { class SaveContinueGame : public ActionRecord {
@ -153,6 +204,9 @@ public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
byte saveContinueData = 0; byte saveContinueData = 0;
protected:
virtual Common::String getRecordTypeName() const override { return "SaveContinueGame"; }
}; };
class TurnOffMainRendering : public ActionRecord { class TurnOffMainRendering : public ActionRecord {
@ -160,6 +214,9 @@ public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
byte turnOffData = 0; byte turnOffData = 0;
protected:
virtual Common::String getRecordTypeName() const override { return "TurnOffMainRendering"; }
}; };
class TurnOnMainRendering : public ActionRecord { class TurnOnMainRendering : public ActionRecord {
@ -167,18 +224,27 @@ public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
byte turnOnData = 0; byte turnOnData = 0;
protected:
virtual Common::String getRecordTypeName() const override { return "TurnOnMainRendering"; }
}; };
class ResetAndStartTimer : public ActionRecord { class ResetAndStartTimer : public ActionRecord {
public: public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
virtual void execute(Nancy::NancyEngine *engine) override; virtual void execute(Nancy::NancyEngine *engine) override;
protected:
virtual Common::String getRecordTypeName() const override { return "ResetAndStartTimer"; }
}; };
class StopTimer : public ActionRecord { class StopTimer : public ActionRecord {
public: public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
virtual void execute(Nancy::NancyEngine *engine) override; virtual void execute(Nancy::NancyEngine *engine) override;
protected:
virtual Common::String getRecordTypeName() const override { return "StopTimer"; }
}; };
class EventFlags : public ActionRecord { class EventFlags : public ActionRecord {
@ -187,6 +253,9 @@ public:
virtual void execute(Nancy::NancyEngine *engine) override; virtual void execute(Nancy::NancyEngine *engine) override;
MultiEventFlagDescription flags; MultiEventFlagDescription flags;
protected:
virtual Common::String getRecordTypeName() const override { return "EventFlags"; }
}; };
class EventFlagsMultiHS : public EventFlags { class EventFlagsMultiHS : public EventFlags {
@ -195,6 +264,9 @@ public:
virtual void execute(Nancy::NancyEngine *engine) override; virtual void execute(Nancy::NancyEngine *engine) override;
Common::Array<HotspotDescription> hotspots; Common::Array<HotspotDescription> hotspots;
protected:
virtual Common::String getRecordTypeName() const override { return "EventFlagsMultiHS"; }
}; };
class LoseGame : public ActionRecord { class LoseGame : public ActionRecord {
@ -202,6 +274,9 @@ public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
byte loseData = 0; byte loseData = 0;
protected:
virtual Common::String getRecordTypeName() const override { return "LoseGame"; }
}; };
class PushScene : public ActionRecord { class PushScene : public ActionRecord {
@ -209,6 +284,9 @@ public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
byte pushData = 0; byte pushData = 0;
protected:
virtual Common::String getRecordTypeName() const override { return "PushScene"; }
}; };
class PopScene : public ActionRecord { class PopScene : public ActionRecord {
@ -216,6 +294,9 @@ public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
byte popData = 0; byte popData = 0;
protected:
virtual Common::String getRecordTypeName() const override { return "PopScene"; }
}; };
class WinGame : public ActionRecord { class WinGame : public ActionRecord {
@ -223,16 +304,25 @@ public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
byte winData = 0; byte winData = 0;
protected:
virtual Common::String getRecordTypeName() const override { return "WinGame"; }
}; };
class AddInventoryNoHS : public ActionRecord { class AddInventoryNoHS : public ActionRecord {
public: public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
protected:
virtual Common::String getRecordTypeName() const override { return "AddInventoryNoHS"; }
}; };
class RemoveInventoryNoHS : public ActionRecord { class RemoveInventoryNoHS : public ActionRecord {
public: public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
protected:
virtual Common::String getRecordTypeName() const override { return "RemoveInventoryNoHS"; }
}; };
class DifficultyLevel : public ActionRecord { class DifficultyLevel : public ActionRecord {
@ -242,6 +332,9 @@ public:
uint16 difficulty = 0; uint16 difficulty = 0;
EventFlagDescription flag; EventFlagDescription flag;
protected:
virtual Common::String getRecordTypeName() const override { return "DifficultyLevel"; }
}; };
class ShowInventoryItem : public ActionRecord, public RenderObject { class ShowInventoryItem : public ActionRecord, public RenderObject {
@ -262,6 +355,8 @@ public:
Graphics::ManagedSurface _fullSurface; Graphics::ManagedSurface _fullSurface;
protected: protected:
virtual Common::String getRecordTypeName() const override { return "ShowInventoryItem"; }
virtual uint16 getZOrder() const override { return 9; } virtual uint16 getZOrder() const override { return 9; }
virtual BlitType getBlitType() const override { return kNoTrans; } virtual BlitType getBlitType() const override { return kNoTrans; }
virtual bool isViewportRelative() const override { return true; } virtual bool isViewportRelative() const override { return true; }
@ -276,11 +371,17 @@ public:
SoundDescription sound; SoundDescription sound;
SceneChangeDescription sceneChange; SceneChangeDescription sceneChange;
EventFlagDescription flagOnTrigger; EventFlagDescription flagOnTrigger;
protected:
virtual Common::String getRecordTypeName() const override { return "PlayDigiSoundAndDie"; }
}; };
class PlaySoundPanFrameAnchorAndDie : public ActionRecord { class PlaySoundPanFrameAnchorAndDie : public ActionRecord {
public: public:
virtual uint16 readData(Common::SeekableReadStream &stream) override; virtual uint16 readData(Common::SeekableReadStream &stream) override;
protected:
virtual Common::String getRecordTypeName() const override { return "PlaySoundPanFrameAnchorAndDie"; }
}; };
class PlaySoundMultiHS : public ActionRecord { class PlaySoundMultiHS : public ActionRecord {
@ -292,6 +393,9 @@ public:
SceneChangeDescription sceneChange; // 0x22 SceneChangeDescription sceneChange; // 0x22
EventFlagDescription flag; // 0x2A EventFlagDescription flag; // 0x2A
Common::Array<HotspotDescription> hotspots; // 0x31 Common::Array<HotspotDescription> hotspots; // 0x31
protected:
virtual Common::String getRecordTypeName() const override { return "PlaySoundMultiHS"; }
}; };
class HintSystem : public ActionRecord { class HintSystem : public ActionRecord {
@ -309,6 +413,9 @@ public:
void selectHint(Nancy::NancyEngine *engine); void selectHint(Nancy::NancyEngine *engine);
void getHint(uint hint, uint difficulty); void getHint(uint hint, uint difficulty);
protected:
virtual Common::String getRecordTypeName() const override { return "HintSystem"; }
}; };
} // End of namespace Action } // End of namespace Action

View file

@ -71,6 +71,8 @@ public:
protected: protected:
virtual Common::String getRecordTypeName() const override { return "RotatingLockPuzzle"; }
virtual uint16 getZOrder() const override { return 7; } virtual uint16 getZOrder() const override { return 7; }
virtual BlitType getBlitType() const override { return kTrans; } virtual BlitType getBlitType() const override { return kTrans; }
virtual bool isViewportRelative() const override { return true; } virtual bool isViewportRelative() const override { return true; }

View file

@ -50,7 +50,7 @@ class PlaySecondaryVideo : public ActionRecord, public RenderObject {
public: public:
enum HoverState { kNoHover, kHover, kEndHover }; enum HoverState { kNoHover, kHover, kEndHover };
PlaySecondaryVideo(RenderObject &redrawFrom) : RenderObject(redrawFrom) {} PlaySecondaryVideo(char chan, RenderObject &redrawFrom) : RenderObject(redrawFrom), channel(chan) {}
virtual ~PlaySecondaryVideo() { _decoder.close(); } virtual ~PlaySecondaryVideo() { _decoder.close(); }
virtual void init() override; virtual void init() override;
@ -74,6 +74,8 @@ public:
Common::Array<SecondaryVideoDesc> videoDescs; // 0x35 Common::Array<SecondaryVideoDesc> videoDescs; // 0x35
protected: protected:
virtual Common::String getRecordTypeName() const override { return Common::String("PlaySecondaryVideoChan" + channel); }
virtual uint16 getZOrder() const override { return 8; } virtual uint16 getZOrder() const override { return 8; }
virtual BlitType getBlitType() const override { return kTrans; } virtual BlitType getBlitType() const override { return kTrans; }
virtual bool isViewportRelative() const override { return true; } virtual bool isViewportRelative() const override { return true; }
@ -83,6 +85,8 @@ protected:
int _currentViewportFrame = -1; int _currentViewportFrame = -1;
bool _isPlaying = false; bool _isPlaying = false;
bool _isHovered = false; bool _isHovered = false;
char channel;
}; };
class PlaySecondaryMovie : public ActionRecord, public RenderObject { class PlaySecondaryMovie : public ActionRecord, public RenderObject {
@ -113,6 +117,8 @@ public:
Common::Array<SecondaryVideoDesc> videoDescs; // 0xD4 Common::Array<SecondaryVideoDesc> videoDescs; // 0xD4
protected: protected:
virtual Common::String getRecordTypeName() const override { return "PlaySecondaryMovie"; }
virtual uint16 getZOrder() const override { return 8; } virtual uint16 getZOrder() const override { return 8; }
virtual BlitType getBlitType() const override { return kNoTrans; } virtual BlitType getBlitType() const override { return kNoTrans; }
virtual bool isViewportRelative() const override { return true; } virtual bool isViewportRelative() const override { return true; }

View file

@ -70,6 +70,8 @@ public:
static bool playerHasTriedPuzzle; static bool playerHasTriedPuzzle;
protected: protected:
virtual Common::String getRecordTypeName() const override { return "SliderPuzzle"; }
virtual uint16 getZOrder() const override { return 7; } virtual uint16 getZOrder() const override { return 7; }
virtual BlitType getBlitType() const override { return kTrans; } virtual BlitType getBlitType() const override { return kTrans; }
virtual bool isViewportRelative() const override { return true; } virtual bool isViewportRelative() const override { return true; }

View file

@ -77,6 +77,8 @@ public:
bool isInterruptible; bool isInterruptible;
protected: protected:
virtual Common::String getRecordTypeName() const override { return isInterruptible ? "PlayIntStaticBitmapAnimation" : "PlayStaticBitmapAnimation"; }
virtual uint16 getZOrder() const override { return zOrder; } virtual uint16 getZOrder() const override { return zOrder; }
virtual BlitType getBlitType() const override { return isTransparent == kTrue ? kTrans : kNoTrans; } virtual BlitType getBlitType() const override { return isTransparent == kTrue ? kTrans : kNoTrans; }
virtual bool isViewportRelative() const override { return true; } virtual bool isViewportRelative() const override { return true; }

View file

@ -88,6 +88,8 @@ public:
uint selected; uint selected;
protected: protected:
virtual Common::String getRecordTypeName() const override { return "Telephone"; }
virtual uint16 getZOrder() const override { return 7; } virtual uint16 getZOrder() const override { return 7; }
virtual BlitType getBlitType() const override { return kTrans; } virtual BlitType getBlitType() const override { return kTrans; }
virtual bool isViewportRelative() const override { return true; } virtual bool isViewportRelative() const override { return true; }

View file

@ -61,16 +61,9 @@ NancyEngine::NancyEngine(OSystem *syst, const NancyGameDescription *gd) :
{ {
_system = syst; _system = syst;
DebugMan.addDebugChannel(kDebugSchedule, "Schedule", "Script Schedule debug level");
DebugMan.addDebugChannel(kDebugEngine, "Engine", "Engine debug level"); DebugMan.addDebugChannel(kDebugEngine, "Engine", "Engine debug level");
DebugMan.addDebugChannel(kDebugDisplay, "Display", "Display debug level"); DebugMan.addDebugChannel(kDebugActionRecord, "ActionRecord", "Action Record debug level");
DebugMan.addDebugChannel(kDebugMouse, "Mouse", "Mouse debug level"); DebugMan.addDebugChannel(kDebugScene, "Scene", "Scene debug level");
DebugMan.addDebugChannel(kDebugParser, "Parser", "Parser debug level");
DebugMan.addDebugChannel(kDebugFile, "File", "File IO debug level");
DebugMan.addDebugChannel(kDebugRoute, "Route", "Route debug level");
DebugMan.addDebugChannel(kDebugInventory, "Inventory", "Inventory debug level");
DebugMan.addDebugChannel(kDebugObject, "Object", "Object debug level");
DebugMan.addDebugChannel(kDebugMusic, "Music", "Music debug level");
_console = new NancyConsole(this); _console = new NancyConsole(this);
_rnd = new Common::RandomSource("Nancy"); _rnd = new Common::RandomSource("Nancy");

View file

@ -49,16 +49,9 @@ namespace Nancy {
static const int kSavegameVersion = 1; static const int kSavegameVersion = 1;
enum NancyDebugChannels { enum NancyDebugChannels {
kDebugSchedule = 1 << 0, kDebugEngine = 1 << 0,
kDebugEngine = 1 << 1, kDebugActionRecord = 1 << 1,
kDebugDisplay = 1 << 2, kDebugScene = 1 << 2
kDebugMouse = 1 << 3,
kDebugParser = 1 << 4,
kDebugFile = 1 << 5,
kDebugRoute = 1 << 6,
kDebugInventory = 1 << 7,
kDebugObject = 1 << 8,
kDebugMusic = 1 << 9
}; };
struct NancyGameDescription; struct NancyGameDescription;

View file

@ -194,6 +194,13 @@ void Scene::load() {
readSceneSummary(*sceneSummaryChunk); readSceneSummary(*sceneSummaryChunk);
debugC(0, kDebugScene, "Loading new scene %i: description \"%s\", frame %i, vertical scroll %i, doNotStartSound == %s",
_sceneState.nextScene.sceneID,
_sceneState.summary.description.c_str(),
_sceneState.nextScene.frameID,
_sceneState.nextScene.verticalOffset,
_sceneState._doNotStartSound == true ? "true" : "false");
// Search for Action Records, maximum for a scene is 30 // Search for Action Records, maximum for a scene is 30
Common::SeekableReadStream *actionRecordChunk = nullptr; Common::SeekableReadStream *actionRecordChunk = nullptr;

View file

@ -189,7 +189,7 @@ protected:
}; };
struct Timers { struct Timers {
enum TimeOfDay { kDay, kNight, kDuskDawn }; enum TimeOfDay { kDay = 0, kNight = 1, kDuskDawn = 2 };
Time tickCount; Time tickCount;
Time pushedPlayTime; Time pushedPlayTime;