diff options
author | David Eriksson | 2003-10-14 12:37:07 +0000 |
---|---|---|
committer | David Eriksson | 2003-10-14 12:37:07 +0000 |
commit | a1dfb5863e5c4e34902c8fe469aa0eab176f363b (patch) | |
tree | 8ca950b49a66775c99dbed306f57927a331f3205 /queen | |
parent | c009516dfd9eca4db72255f9710d885db06586af (diff) | |
download | scummvm-rg350-a1dfb5863e5c4e34902c8fe469aa0eab176f363b.tar.gz scummvm-rg350-a1dfb5863e5c4e34902c8fe469aa0eab176f363b.tar.bz2 scummvm-rg350-a1dfb5863e5c4e34902c8fe469aa0eab176f363b.zip |
Working nicely with personMove disabled!
svn-id: r10798
Diffstat (limited to 'queen')
-rw-r--r-- | queen/cutaway.cpp | 33 | ||||
-rw-r--r-- | queen/cutaway.h | 3 |
2 files changed, 29 insertions, 7 deletions
diff --git a/queen/cutaway.cpp b/queen/cutaway.cpp index d7f8552682..bd319c9b73 100644 --- a/queen/cutaway.cpp +++ b/queen/cutaway.cpp @@ -97,9 +97,8 @@ void Cutaway::load(const char *filename) { strcpy(_basename, filename); _basename[strlen(_basename)-4] = '\0'; - int COMPANEL = READ_BE_UINT16(ptr); + _comPanel = READ_BE_UINT16(ptr); ptr += 2; - debug(0, "COMPANEL = %i", COMPANEL); _cutawayObjectCount = READ_BE_UINT16(ptr); ptr += 2; @@ -334,6 +333,10 @@ void Cutaway::restorePersonData() { void Cutaway::changeRooms(CutawayObject &object) { // Lines 1291-1385 in cutaway.c + debug(0, "Changing from room %i to room %i", + _temporaryRoom, + object.room); + restorePersonData(); _personDataCount = 0; @@ -352,7 +355,7 @@ void Cutaway::changeRooms(CutawayObject &object) { _personData[_personDataCount].image = objectData->image; _personDataCount++; - // Now, check to see if(we need to keep the person on + // Now, check to see if we need to keep the person on bool on = false; for (int j = 0; j < object.personCount; j++) { if (object.person[j] == i) { @@ -361,6 +364,11 @@ void Cutaway::changeRooms(CutawayObject &object) { } } + debug(0, "Person '%s' (%i) is %s", + _logic->objectName(objectData->name), + objectData->name, + on ? "on" : "off"); + if (on) { // It is needed, so ensure it's ON objectData->name = abs(objectData->name); @@ -401,7 +409,7 @@ void Cutaway::changeRooms(CutawayObject &object) { mode = RDM_FADE_JOE_XY; } - _logic->roomDisplay(_logic->roomName(_logic->currentRoom()), mode, 0, 0 /*COMPANEL*/, true); + _logic->roomDisplay(_logic->roomName(_logic->currentRoom()), mode, 0, _comPanel, true); // XXX CI=FRAMES; @@ -448,7 +456,9 @@ Cutaway::ObjectType Cutaway::getObjectType(CutawayObject &object) { ObjectData *objectData = _logic->objectData(object.objectNumber); objectData->name = abs(objectData->name); } + // XXX REDISP_OBJECT(OBJECT); + debug(0, "REDISP_OBJECT needed for object %i", object.objectNumber); // Skip doing any anim stuff objectType = OBJECT_TYPE_NO_ANIMATION; @@ -629,22 +639,29 @@ void Cutaway::handlePersonRecord( Person p; _logic->personSetData( object.objectNumber - _logic->roomData(object.room), - "", false, &p); + "", true, &p); + + debug(0, "Moving person '%s' (%i) = actor '%s' to (%i,%i)", + _logic->objectName(object.objectNumber), + object.objectNumber, + p.name, object.moveToX, object.moveToY); strcpy(name, p.name); if (object.moveToX || object.moveToY) { BobSlot *bob = _graphics->bob(p.actor->bobNum); - // XXX bob->scale = SF; + bob->scale = 100; // XXX SF; bob->x = object.moveToX; bob->y = object.moveToY; } +#if 0 _walk->personMove( &p, object.moveToX, object.moveToY, _logic->numFrames() + 1, // XXX CI+1 _logic->objectData(object.objectNumber)->image ); +#endif } if (_quit) @@ -897,7 +914,7 @@ void Cutaway::goToFinalRoom() { _logic->joeY(joeX); _logic->currentRoom(joeRoom); _logic->oldRoom(_initialRoom); - _logic->roomDisplay(_logic->roomName(_logic->currentRoom()), RDM_FADE_JOE_XY, 0, 0 /*COMPANEL*/, true); + _logic->roomDisplay(_logic->roomName(_logic->currentRoom()), RDM_FADE_JOE_XY, 0, _comPanel, true); } if (_quit) { @@ -988,12 +1005,14 @@ void Cutaway::updateGameState() { if (fromObject > 0) objectCopy(fromObject, objectIndex); // XXX REDISP_OBJECT(objectIndex); + debug(0, "REDISP_OBJECT needed for object %i", objectIndex); } else if (objectIndex < 0) { // Hide the object objectIndex = -objectIndex; ObjectData *objectData = _logic->objectData(objectIndex); objectData->name = -abs(objectData->name); // XXX REDISP_OBJECT(objectIndex); + debug(0, "REDISP_OBJECT needed for object %i", objectIndex); } if (areaIndex > 0) { diff --git a/queen/cutaway.h b/queen/cutaway.h index 8fc373fd25..8a4f81ee2e 100644 --- a/queen/cutaway.h +++ b/queen/cutaway.h @@ -137,6 +137,9 @@ class Cutaway { //! Raw .cut file data (without 20 byte header) byte *_fileData; + //! COMPANEL + int16 _comPanel; + //! Game state data inside of _fileDat byte *_gameStatePtr; |