diff options
author | Gregory Montoir | 2003-10-19 18:52:28 +0000 |
---|---|---|
committer | Gregory Montoir | 2003-10-19 18:52:28 +0000 |
commit | e25bda32ecb82a45acefaca5a31e1e6eba5e6dc5 (patch) | |
tree | 7a4744364bd3c90f168249f48b980d05c18075a5 /queen | |
parent | 64aaaa0b25bc29ef7d15edfe47c5734866e150bc (diff) | |
download | scummvm-rg350-e25bda32ecb82a45acefaca5a31e1e6eba5e6dc5.tar.gz scummvm-rg350-e25bda32ecb82a45acefaca5a31e1e6eba5e6dc5.tar.bz2 scummvm-rg350-e25bda32ecb82a45acefaca5a31e1e6eba5e6dc5.zip |
minor cleanup / comments update
svn-id: r10908
Diffstat (limited to 'queen')
-rw-r--r-- | queen/graphics.h | 8 | ||||
-rw-r--r-- | queen/logic.cpp | 17 | ||||
-rw-r--r-- | queen/logic.h | 17 | ||||
-rw-r--r-- | queen/queen.cpp | 4 | ||||
-rw-r--r-- | queen/structs.h | 38 |
5 files changed, 59 insertions, 25 deletions
diff --git a/queen/graphics.h b/queen/graphics.h index 5da3e39663..55205aa4cc 100644 --- a/queen/graphics.h +++ b/queen/graphics.h @@ -101,14 +101,6 @@ struct TextSlot { }; -//struct Dynalum { -// uint8 msk[50 * 160]; // mask -// int8 lum[8 * 3]; // rgb -// int8 oldColMask; -// Dynalum(): oldColMask(-1) {} -//}; - - class Display; class Graphics { diff --git a/queen/logic.cpp b/queen/logic.cpp index e5ae97b109..b4889a4bcc 100644 --- a/queen/logic.cpp +++ b/queen/logic.cpp @@ -855,7 +855,6 @@ void Logic::roomSetupFurniture() { void Logic::roomSetupObjects() { - warning("Logic::roomSetupObjects() not fully implemented"); uint16 i; // furniture frames are reserved in ::roomSetupFurniture(), we append objects @@ -997,7 +996,7 @@ void Logic::roomSetupObjects() { uint16 Logic::roomRefreshObject(uint16 obj) { - warning("Logic::roomRefreshObject() not fully implemented"); + uint16 curImage = _numFrames; ObjectData *pod = &_objectData[obj]; @@ -1452,21 +1451,19 @@ int16 Logic::animFindAll(const GraphicData *gd, uint16 firstImage, AnimFrame *pa _graphics->bankUnpack(ABS(tempFrames[i]), firstImage + i, 15); } if (paf != NULL) { - uint16 frameNr = 0; for (i = 1; i <= _numGraphicAnim; ++i) { const GraphicAnim *pga = &_graphicAnim[i]; if (pga->keyFrame == gd->firstFrame) { + uint16 frameNr = 0; for (j = 1; j <= gd->lastFrame; ++j) { - int16 f = pga->frame; - if (f > 500) { - f -= 500; + if (pga->frame > 500) { + if (pga->frame - 500 == tempFrames[j - 1]) { + frameNr = j + firstImage - 1 + 500; + } } - if (f == tempFrames[j - 1]) { + else if (pga->frame == tempFrames[j - 1]) { frameNr = j + firstImage - 1; } - if (pga->frame > 500) { - frameNr += 500; - } } paf->frame = frameNr; paf->speed = pga->speed; diff --git a/queen/logic.h b/queen/logic.h index e69b460177..3c684f77de 100644 --- a/queen/logic.h +++ b/queen/logic.h @@ -225,13 +225,22 @@ protected: int16 _gameState[GAME_STATE_COUNT]; - uint16 _numFurnitureAnimated; // FMAXA + //! Number of animated furniture in current room (FMAXA) + uint16 _numFurnitureAnimated; + + //! Number of static furniture in current room (FMAX) uint16 _numFurnitureStatic; // FMAX - uint16 _numFurnitureAnimatedLen; // FMAXLEN - uint16 _numFrames; // FRAMES + + //! Total number of frames for the animated furniture (FMAXLEN) + uint16 _numFurnitureAnimatedLen; + + //! Current number of frames unpacked (FRAMES) + uint16 _numFrames; + + //! Last frame number used for person animation uint16 _personFrames[4]; - //! contains the animation frames (max 30) to use for a bob (whose number must be < 17) + //! Describe an string based animation (30 frames maximum, bob number must be < 17) AnimFrame _newAnim[17][30]; Resource *_resource; diff --git a/queen/queen.cpp b/queen/queen.cpp index d67d394bf1..4f84d22cec 100644 --- a/queen/queen.cpp +++ b/queen/queen.cpp @@ -126,7 +126,7 @@ void QueenEngine::roomChanged() { // XXX R_MAP(); // XXX fadeout(0,223); } - else if (_logic->currentRoom() == 95 && _logic->gameState(117) == 0) { + else if (_logic->currentRoom() == 95 && _logic->gameState(VAR_INTRO_PLAYED) == 0) { char nextFilename[20]; _logic->roomDisplay(_logic->roomName(_logic->currentRoom()), RDM_FADE_NOJOE, 100, 2, true); @@ -157,7 +157,7 @@ void QueenEngine::roomChanged() { _logic->roomDisplay(_logic->roomName(_logic->currentRoom()), RDM_FADE_JOE, 100, 2, true); Cutaway::run("c70d.cut", nextFilename, _graphics, _logic, _resource); - _logic->gameState(117, 1); + _logic->gameState(VAR_INTRO_PLAYED, 1); // XXX setupItems(); // XXX inventory(); diff --git a/queen/structs.h b/queen/structs.h index 1c3d38605a..dd55bf6405 100644 --- a/queen/structs.h +++ b/queen/structs.h @@ -109,6 +109,26 @@ struct GraphicData { //! coordinates of object uint16 x, y; //! bank bobframes + /*! + <table> + <tr> + <td>lastFrame == 0</td> + <td>non-animated bob (one frame)</td> + </tr> + <tr> + <td>lastFrame < 0</td> + <td>rebound animation</td> + </tr> + <tr> + <td>firstFrame < 0</td> + <td>bobAnimString (animation is described by a string)</td> + </tr> + <tr> + <td>firstFrame > 0</td> + <td>bobAnimNormal (animation is a sequence of frames)</td> + </tr> + </table> + */ int16 firstFrame, lastFrame; //! moving speed of object uint16 speed; @@ -414,7 +434,23 @@ struct CmdGameState { struct FurnitureData { //! room in which the furniture are int16 room; - //! value to store in GAMESTATE + //! type of furniture (stored in GAMESTATE) + /*! + <table> + <tr> + <td>value</td> + <td>description</td> + </tr> + <tr> + <td>]0..5000]</td> + <td>static or animated</td> + </tr> + <tr> + <td>]5000..[</td> + <td>paste down</td> + </tr> + </table> + */ int16 gameStateValue; void readFrom(byte *&ptr) { |