aboutsummaryrefslogtreecommitdiff
path: root/engines/prince/script.h
diff options
context:
space:
mode:
authorKamil Zbróg2013-12-13 07:05:37 +0000
committerKamil Zbróg2013-12-13 07:05:37 +0000
commiteecc6f3e8462440a26170b2a62941df5101f9c3d (patch)
treec21d98b6149101e4bba8c73d76345edb05adb17d /engines/prince/script.h
parent0a05365e1dc46a0ef6dbbac1d5c839aa56a6c0ea (diff)
downloadscummvm-rg350-eecc6f3e8462440a26170b2a62941df5101f9c3d.tar.gz
scummvm-rg350-eecc6f3e8462440a26170b2a62941df5101f9c3d.tar.bz2
scummvm-rg350-eecc6f3e8462440a26170b2a62941df5101f9c3d.zip
PRINCE: Room resource loading started
Diffstat (limited to 'engines/prince/script.h')
-rw-r--r--engines/prince/script.h37
1 files changed, 32 insertions, 5 deletions
diff --git a/engines/prince/script.h b/engines/prince/script.h
index 8f139950be..d51e01b559 100644
--- a/engines/prince/script.h
+++ b/engines/prince/script.h
@@ -25,8 +25,7 @@
#include "common/random.h"
#include "common/endian.h"
-
-#include "audio/mixer.h"
+#include "common/array.h"
#include "prince/flags.h"
@@ -45,6 +44,35 @@ namespace Detail {
template <> inline uint32 LittleEndianReader<uint32>(void *data) { return READ_LE_UINT32(data); }
}
+class Room {
+public:
+ Room();
+
+ bool loadFromStream(Common::SeekableReadStream &stream);
+
+private:
+
+ typedef void (Room::*LoadingStep)(Common::SeekableReadStream &stream);
+
+ void nextLoadStep(Common::SeekableReadStream &stream, LoadingStep step);
+
+ void loadMobs(Common::SeekableReadStream &stream);
+ void loadBackAnim(Common::SeekableReadStream &stream);
+ void loadObj(Common::SeekableReadStream &stream);
+ void loadNak(Common::SeekableReadStream &stream);
+ void loadItemUse(Common::SeekableReadStream &stream);
+ void loadItemGive(Common::SeekableReadStream &stream);
+ void loadWalkTo(Common::SeekableReadStream &stream);
+ void loadExamine(Common::SeekableReadStream &stream);
+ void loadPickup(Common::SeekableReadStream &stream);
+ void loadUse(Common::SeekableReadStream &stream);
+ void loadPushOpen(Common::SeekableReadStream &stream);
+ void loadPullClose(Common::SeekableReadStream &stream);
+ void loadTalk(Common::SeekableReadStream &stream);
+ void loadGive(Common::SeekableReadStream &stream);
+};
+
+
class Script {
public:
Script();
@@ -69,6 +97,7 @@ public:
private:
uint8 *_data;
uint32 _dataSize;
+ Common::Array<Room> _roomList;
};
class InterpreterFlags {
@@ -114,7 +143,7 @@ private:
static const uint32 _STACK_SIZE = 500;
uint32 _stack[_STACK_SIZE];
uint8 _stacktop;
- uint8 _savedStacktop;
+ //uint8 _savedStacktop;
uint32 _waitFlag;
const byte *_string;
@@ -124,8 +153,6 @@ private:
// Helper functions
uint32 step(uint32 opcodePC);
- void checkPC(uint32 address);
-
uint16 readScriptFlagValue();
Flags::Id readScriptFlagId();