mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
preliminary FIND_STATE implementation
svn-id: r10794
This commit is contained in:
parent
4e3129c64c
commit
138ee6887a
10
queen/defs.h
10
queen/defs.h
@ -89,6 +89,7 @@ enum {
|
||||
PANEL_AREA_INV_4 = 14
|
||||
};
|
||||
|
||||
|
||||
enum Language {
|
||||
ENGLISH = 'E',
|
||||
FRENCH = 'F',
|
||||
@ -96,6 +97,15 @@ enum Language {
|
||||
ITALIAN = 'I'
|
||||
};
|
||||
|
||||
|
||||
enum StateDirection {
|
||||
STATE_DIR_BACK = 0,
|
||||
STATE_DIR_RIGHT = 1,
|
||||
STATE_DIR_LEFT = 2,
|
||||
STATE_DIR_FRONT = 3
|
||||
};
|
||||
|
||||
|
||||
} // End of namespace Queen
|
||||
|
||||
#endif
|
||||
|
@ -1340,6 +1340,26 @@ void Logic::animErase(uint16 bobNum) {
|
||||
}
|
||||
|
||||
|
||||
StateDirection Logic::findStateDirection(uint16 state) {
|
||||
// see queen.c l.4016-4023
|
||||
StateDirection sd = STATE_DIR_BACK;
|
||||
switch ((state >> 2) & 3) {
|
||||
case 0:
|
||||
sd = STATE_DIR_BACK;
|
||||
break;
|
||||
case 1:
|
||||
sd = STATE_DIR_RIGHT;
|
||||
break;
|
||||
case 2:
|
||||
sd = STATE_DIR_LEFT;
|
||||
break;
|
||||
case 3:
|
||||
sd = STATE_DIR_FRONT;
|
||||
break;
|
||||
}
|
||||
return sd;
|
||||
}
|
||||
|
||||
|
||||
} // End of namespace Queen
|
||||
|
||||
|
@ -121,6 +121,8 @@ public:
|
||||
uint16 animCreate(uint16 curImage, const Person *person); // CREATE_ANIM
|
||||
void animErase(uint16 bobNum);
|
||||
|
||||
StateDirection findStateDirection(uint16 state); // == FIND_STATE(state, "DIR");
|
||||
|
||||
|
||||
protected:
|
||||
bool _textToggle;
|
||||
@ -137,7 +139,6 @@ protected:
|
||||
uint16 _numItems;
|
||||
uint16 _numGraphics;
|
||||
|
||||
uint16 _numObjectBoxes;
|
||||
uint16 _numWalkOffs;
|
||||
uint16 _numObjDesc;
|
||||
uint16 _numCmdList; //COM_LIST_MAX
|
||||
|
@ -411,8 +411,20 @@ ObjectData *Walk::joeSetupInRoom(bool autoPosition, uint16 scale) {
|
||||
// TODO: cutawayJoeFacing
|
||||
|
||||
// check to see which way Joe entered room
|
||||
// TODO: JoeFacing with _objectData[entryObj].state
|
||||
_logic->joeFacing(DIR_FRONT);
|
||||
switch (_logic->findStateDirection(pod->state)) {
|
||||
case STATE_DIR_FRONT:
|
||||
_logic->joeFacing(DIR_FRONT);
|
||||
break;
|
||||
case STATE_DIR_BACK:
|
||||
_logic->joeFacing(DIR_BACK);
|
||||
break;
|
||||
case STATE_DIR_LEFT:
|
||||
_logic->joeFacing(DIR_LEFT);
|
||||
break;
|
||||
case STATE_DIR_RIGHT:
|
||||
_logic->joeFacing(DIR_RIGHT);
|
||||
break;
|
||||
}
|
||||
|
||||
_joePrevFacing = _logic->joeFacing();
|
||||
BobSlot *pbs = _graphics->bob(0);
|
||||
|
Loading…
Reference in New Issue
Block a user