minor cleanup / comments update

svn-id: r10908
This commit is contained in:
Gregory Montoir 2003-10-19 18:52:28 +00:00
parent 64aaaa0b25
commit e25bda32ec
5 changed files with 60 additions and 26 deletions

View File

@ -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 {

View File

@ -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,20 +1451,18 @@ 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 (f == tempFrames[j - 1]) {
frameNr = j + firstImage - 1;
}
if (pga->frame > 500) {
frameNr += 500;
if (pga->frame - 500 == tempFrames[j - 1]) {
frameNr = j + firstImage - 1 + 500;
}
}
else if (pga->frame == tempFrames[j - 1]) {
frameNr = j + firstImage - 1;
}
}
paf->frame = frameNr;

View File

@ -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;

View File

@ -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();

View File

@ -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) {