diff options
author | Gregory Montoir | 2004-01-11 14:11:36 +0000 |
---|---|---|
committer | Gregory Montoir | 2004-01-11 14:11:36 +0000 |
commit | 6dc8407297fc11301c8abe6c7e0801f046567449 (patch) | |
tree | 9ab212394c1443e14f8d6dcf4cffb1c18c136035 /queen/logic.cpp | |
parent | f2874733b0cee77307ef7abd59af9b5c4ac43c9f (diff) | |
download | scummvm-rg350-6dc8407297fc11301c8abe6c7e0801f046567449.tar.gz scummvm-rg350-6dc8407297fc11301c8abe6c7e0801f046567449.tar.bz2 scummvm-rg350-6dc8407297fc11301c8abe6c7e0801f046567449.zip |
cleanup
svn-id: r12318
Diffstat (limited to 'queen/logic.cpp')
-rw-r--r-- | queen/logic.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/queen/logic.cpp b/queen/logic.cpp index 84fb807bea..0a038f0a51 100644 --- a/queen/logic.cpp +++ b/queen/logic.cpp @@ -511,7 +511,7 @@ void Logic::setupRoom(const char *room, int comPanel, bool inCutaway) { for (uint16 i = 1; i <= _numFurniture; ++i) { if (_furnitureData[i].room == _currentRoom) { ++furnTot; - furn[furnTot] = _furnitureData[i].gameStateValue; + furn[furnTot] = _furnitureData[i].objNum; } } _vm->graphics()->setupNewRoom(room, _currentRoom, furn, furnTot); @@ -548,7 +548,7 @@ void Logic::displayRoom(uint16 room, RoomDisplayMode mode, uint16 scale, int com ActorData *Logic::findActor(uint16 noun, const char *name) { uint16 obj = currentRoomData() + noun; - int16 img = _objectData[obj].image; + int16 img = objectData(obj)->image; if (img != -3 && img != -4) { warning("Logic::findActor() - Object %d is not a person", obj); return NULL; @@ -573,10 +573,7 @@ ActorData *Logic::findActor(uint16 noun, const char *name) { } -bool Logic::initPerson(int16 noun, const char *actorName, bool loadBank, Person *pp) { - if (noun <= 0) { - warning("Logic::initPerson() - Invalid object number: %i", noun); - } +bool Logic::initPerson(uint16 noun, const char *actorName, bool loadBank, Person *pp) { ActorData *pad = findActor(noun, actorName); if (pad != NULL) { pp->actor = pad; @@ -634,15 +631,13 @@ void Logic::setupJoe() { ObjectData *Logic::setupJoeInRoom(bool autoPosition, uint16 scale) { debug(9, "Logic::setupJoeInRoom(%d, %d) joe.x=%d joe.y=%d", autoPosition, scale, _joe.x, _joe.y); - - uint16 oldx; - uint16 oldy; WalkOffData *pwo = NULL; ObjectData *pod = objectData(_entryObj); if (pod == NULL) { error("Logic::setupJoeInRoom() - No object data for obj %d", _entryObj); } + uint16 oldx, oldy; if (!autoPosition || joeX() != 0 || joeY() != 0) { oldx = joeX(); oldy = joeY(); |