diff options
Diffstat (limited to 'engines')
-rwxr-xr-x | engines/pegasus/ai/ai_area.cpp | 8 | ||||
-rwxr-xr-x | engines/pegasus/ai/ai_area.h | 8 | ||||
-rw-r--r-- | engines/pegasus/pegasus.cpp | 8 |
3 files changed, 22 insertions, 2 deletions
diff --git a/engines/pegasus/ai/ai_area.cpp b/engines/pegasus/ai/ai_area.cpp index 0b7e435043..8a135ed381 100755 --- a/engines/pegasus/ai/ai_area.cpp +++ b/engines/pegasus/ai/ai_area.cpp @@ -79,6 +79,14 @@ void AIArea::restoreAIState() { // TODO } +void AIArea::writeAIRules(Common::WriteStream *stream) { + _AIRules.writeAIRules(stream); +} + +void AIArea::readAIRules(Common::ReadStream *stream) { + _AIRules.readAIRules(stream); +} + void AIArea::initAIArea() { allocateSurface(Common::Rect(0, 0, 384, 96)); diff --git a/engines/pegasus/ai/ai_area.h b/engines/pegasus/ai/ai_area.h index 0338f2b96c..7387b4081b 100755 --- a/engines/pegasus/ai/ai_area.h +++ b/engines/pegasus/ai/ai_area.h @@ -31,6 +31,11 @@ #include "pegasus/timers.h" #include "pegasus/ai/ai_rule.h" +namespace Common { + class ReadStream; + class WriteStream; +} + /* The AI area is the area at the bottom of the screen. There are three areas within @@ -80,6 +85,9 @@ public: AIArea(InputHandler *); virtual ~AIArea(); + void writeAIRules(Common::WriteStream *stream); + void readAIRules(Common::ReadStream *stream); + void initAIArea(); void saveAIState(); diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp index 5996d97579..887a7ccc04 100644 --- a/engines/pegasus/pegasus.cpp +++ b/engines/pegasus/pegasus.cpp @@ -414,7 +414,9 @@ bool PegasusEngine::loadFromStream(Common::ReadStream *stream) { _shellNotification.setNotificationFlags(0, kNeedNewJumpFlag); performJump(GameState.getCurrentNeighborhood()); - // TODO: AI rules + // AI rules + if (g_AIArea) + g_AIArea->readAIRules(stream); startNeighborhood(); @@ -475,7 +477,9 @@ bool PegasusEngine::writeToStream(Common::WriteStream *stream, int saveType) { stream->writeUint16BE(g_interface->getCurrentBiochip()->getObjectID()); } - // TODO: AI rules + // AI rules + if (g_AIArea) + g_AIArea->writeAIRules(stream); return true; } |