diff options
author | lukaslw | 2014-05-01 18:50:20 +0200 |
---|---|---|
committer | lukaslw | 2014-06-22 20:07:54 +0200 |
commit | acf9ac241eb1d23d435643f0d0ff2c04d78945d9 (patch) | |
tree | 2eb2f005e2697c61e11684b97536a639eb4a617d /engines/prince/script.h | |
parent | 05ef38f7d9f912f8613d56764aa93c85e3365bbc (diff) | |
download | scummvm-rg350-acf9ac241eb1d23d435643f0d0ff2c04d78945d9.tar.gz scummvm-rg350-acf9ac241eb1d23d435643f0d0ff2c04d78945d9.tar.bz2 scummvm-rg350-acf9ac241eb1d23d435643f0d0ff2c04d78945d9.zip |
PRINCE: Proper memory reading for lightX, lightY, shadowScale
Diffstat (limited to 'engines/prince/script.h')
-rw-r--r-- | engines/prince/script.h | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/engines/prince/script.h b/engines/prince/script.h index 4d3c822ad6..f21df1d717 100644 --- a/engines/prince/script.h +++ b/engines/prince/script.h @@ -42,7 +42,6 @@ namespace Detail { template <> inline uint8 LittleEndianReader<uint8>(void *data) { return *(uint8*)(data); } template <> inline uint16 LittleEndianReader<uint16>(void *data) { return READ_LE_UINT16(data); } template <> inline uint32 LittleEndianReader<uint32>(void *data) { return READ_LE_UINT32(data); } - template <> inline int8 LittleEndianReader<int8>(void *data) { return *(int8*)(data); } } class Room { @@ -79,6 +78,29 @@ public: Script(); ~Script(); + struct ScriptInfo { + int rooms; + int startGame; + int restoreGame; + int stdExamine; + int stdPickup; + int stdUse; + int stdOpen; + int stdClose; + int stdTalk; + int stdGive; + int usdCode; + int invObjExam; + int invObjUse; + int invObjUU; + int stdUseItem; + int lightSources; + int specRout; + int invObjGive; + int stdGiveItem; + int goTester; + }; + bool loadFromStream(Common::SeekableReadStream &stream); template <typename T> @@ -87,9 +109,8 @@ public: return Detail::LittleEndianReader<T>(&_data[address]); } - // Some magic numbers for now, data stored in header - uint32 getRoomTableOffset() { return read<uint32>(0); } - uint32 getStartGameOffset() { return read<uint32>(4); } + //uint32 getRoomTableOffset(); + uint32 getStartGameOffset(); int16 getLightX(int locationNr); int16 getLightY(int locationNr); int32 getShadowScale(int locationNr); @@ -102,6 +123,7 @@ private: uint8 *_data; uint32 _dataSize; Common::Array<Room> _roomList; + ScriptInfo _scriptInfo; }; class InterpreterFlags { |