diff options
author | David Eriksson | 2003-10-02 06:38:58 +0000 |
---|---|---|
committer | David Eriksson | 2003-10-02 06:38:58 +0000 |
commit | 7df1576544f7314658770338049fd31d63163a66 (patch) | |
tree | 684f9c98f84028c96b13070b53746f9b09126de3 /queen | |
parent | f18847d7fb2972972c183569b953da4f4edc7f31 (diff) | |
download | scummvm-rg350-7df1576544f7314658770338049fd31d63163a66.tar.gz scummvm-rg350-7df1576544f7314658770338049fd31d63163a66.tar.bz2 scummvm-rg350-7df1576544f7314658770338049fd31d63163a66.zip |
Must be able to access some data here.
svn-id: r10531
Diffstat (limited to 'queen')
-rw-r--r-- | queen/logic.cpp | 20 | ||||
-rw-r--r-- | queen/logic.h | 8 |
2 files changed, 25 insertions, 3 deletions
diff --git a/queen/logic.cpp b/queen/logic.cpp index 574dd58a4b..1ff4cbee17 100644 --- a/queen/logic.cpp +++ b/queen/logic.cpp @@ -49,7 +49,7 @@ void QueenLogic::initialise() { //Object data - _objectData = new uint16[_numObjects + 1][8]; + _objectData = new int16[_numObjects + 1][8]; //clear first object for (uint16 j = 0; j < 8; j++) @@ -57,7 +57,7 @@ void QueenLogic::initialise() { for (i = 1; i < (_numObjects + 1); i++) for (uint16 j = 0; j < 8; j++) { - _objectData[i][j] = READ_BE_UINT16(ptr); + _objectData[i][j] = (int16)READ_BE_UINT16(ptr); ptr += 2; } @@ -139,3 +139,19 @@ uint16 QueenLogic::currentRoom() { return _currentRoom; } +void QueenLogic::currentRoom(uint16 room) { + _currentRoom = room; +} + +int16* QueenLogic::objectData(int index) { + return _objectData[index]; +} + +uint16 QueenLogic::roomData(int room) { + return _roomData[room]; +} + +uint16 QueenLogic::objMax(int room) { + return _objMax[room]; +} + diff --git a/queen/logic.h b/queen/logic.h index 31efc727ef..d8536da566 100644 --- a/queen/logic.h +++ b/queen/logic.h @@ -29,7 +29,13 @@ class QueenLogic { public: QueenLogic(QueenResource *resource); ~QueenLogic(); + uint16 currentRoom(); + void currentRoom(uint16 room); + + int16* objectData(int index); + uint16 roomData(int room); + uint16 objMax(int room); protected: uint8 *_jas; @@ -50,7 +56,7 @@ protected: uint16 (*_objectBox)[4]; uint16 (*_itemData)[5]; uint16 (*_graphicData)[5]; - uint16 (*_objectData)[8]; + int16 (*_objectData)[8]; uint16 (*_actorData)[12]; uint16 (*_area)[11][8]; |