mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
DM: Some renaming
This commit is contained in:
parent
cfebcea041
commit
0e0fb97632
@ -202,8 +202,8 @@ void ChampionMan::addCandidateChampionToParty(uint16 championPortraitIndex) {
|
||||
int16 mapY = _vm->_dungeonMan->_currMap._partyPosY;
|
||||
|
||||
uint16 championObjectsCell = returnOppositeDir((direction)(dunMan._currMap._partyDir));
|
||||
mapX += gDirIntoStepCountEast[dunMan._currMap._partyDir];
|
||||
mapY += gDirIntoStepCountNorth[dunMan._currMap._partyDir];
|
||||
mapX += _dirIntoStepCountEast[dunMan._currMap._partyDir];
|
||||
mapY += _dirIntoStepCountNorth[dunMan._currMap._partyDir];
|
||||
thing = dunMan.getSquareFirstThing(mapX, mapY);
|
||||
AL_0_slotIndex_Red = kChampionSlotBackpackLine_1_1;
|
||||
uint16 slotIndex_Green;
|
||||
|
@ -23,8 +23,8 @@
|
||||
|
||||
namespace DM {
|
||||
|
||||
int8 gDirIntoStepCountEast[4] = {0 /* North */, 1 /* East */, 0 /* West */, -1 /* South */}; // @ G0233_ai_Graphic559_DirectionToStepEastCount
|
||||
int8 gDirIntoStepCountNorth[4] = {-1 /* North */, 0 /* East */, 1 /* West */, 0 /* South */}; // @ G0234_ai_Graphic559_DirectionToStepNorthCount
|
||||
int8 _dirIntoStepCountEast[4] = {0 /* North */, 1 /* East */, 0 /* West */, -1 /* South */}; // @ G0233_ai_Graphic559_DirectionToStepEastCount
|
||||
int8 _dirIntoStepCountNorth[4] = {-1 /* North */, 0 /* East */, 1 /* West */, 0 /* South */}; // @ G0234_ai_Graphic559_DirectionToStepNorthCount
|
||||
|
||||
void turnDirRight(direction &dir) { dir = (direction)((dir + 1) & 3); }
|
||||
void turnDirLeft(direction &dir) { dir = (direction)((dir - 1) & 3); }
|
||||
|
@ -27,15 +27,14 @@ enum direction {
|
||||
};
|
||||
|
||||
// TODO: refactor direction into a class
|
||||
extern int8 gDirIntoStepCountEast[4];
|
||||
extern int8 gDirIntoStepCountNorth[4];
|
||||
extern int8 _dirIntoStepCountEast[4];
|
||||
extern int8 _dirIntoStepCountNorth[4];
|
||||
|
||||
void turnDirRight(direction &dir);
|
||||
void turnDirLeft(direction &dir);
|
||||
direction returnOppositeDir(direction dir);
|
||||
bool isOrientedWestEast(direction dir);
|
||||
|
||||
|
||||
enum ThingType {
|
||||
kPartyThingType = -1, // @ CM1_THING_TYPE_PARTY, special value
|
||||
kDoorThingType = 0,
|
||||
|
@ -391,11 +391,11 @@ int16 DM::indexToOrdinal(int16 val) { return val + 1; }
|
||||
|
||||
|
||||
void DungeonMan::mapCoordsAfterRelMovement(direction dir, int16 stepsForward, int16 stepsRight, int16 &posX, int16 &posY) {
|
||||
posX += gDirIntoStepCountEast[dir] * stepsForward;
|
||||
posY += gDirIntoStepCountNorth[dir] * stepsForward;
|
||||
posX += _dirIntoStepCountEast[dir] * stepsForward;
|
||||
posY += _dirIntoStepCountNorth[dir] * stepsForward;
|
||||
turnDirRight(dir);
|
||||
posX += gDirIntoStepCountEast[dir] * stepsRight;
|
||||
posY += gDirIntoStepCountNorth[dir] * stepsRight;
|
||||
posX += _dirIntoStepCountEast[dir] * stepsRight;
|
||||
posY += _dirIntoStepCountNorth[dir] * stepsRight;
|
||||
}
|
||||
|
||||
DungeonMan::DungeonMan(DMEngine *dmEngine) : _vm(dmEngine), _rawDunFileData(NULL), _maps(NULL), _rawMapData(NULL) {
|
||||
|
@ -176,19 +176,19 @@ enum TeleporterScope {
|
||||
|
||||
|
||||
class Teleporter {
|
||||
Thing nextThing;
|
||||
uint16 attributes;
|
||||
uint16 destMapIndex;
|
||||
Thing _nextThing;
|
||||
uint16 _attributes;
|
||||
uint16 _destMapIndex;
|
||||
public:
|
||||
Teleporter(uint16 *rawDat) : nextThing(rawDat[0]), attributes(rawDat[1]), destMapIndex(rawDat[2]) {}
|
||||
Thing getNextThing() { return nextThing; }
|
||||
bool makesSound() { return (attributes >> 15) & 1; }
|
||||
TeleporterScope getScope() { return (TeleporterScope)((attributes >> 13) & 1); }
|
||||
bool absRotation() { return (attributes >> 12) & 1; }
|
||||
direction getRotationDir() { return (direction)((attributes >> 10) & 1); }
|
||||
byte getDestY() { return (attributes >> 5) & 0xF; }
|
||||
byte getDestX() { return attributes & 0xF; }
|
||||
uint16 getDestMapIndex() { return destMapIndex >> 8; }
|
||||
Teleporter(uint16 *rawDat) : _nextThing(rawDat[0]), _attributes(rawDat[1]), _destMapIndex(rawDat[2]) {}
|
||||
Thing getNextThing() { return _nextThing; }
|
||||
bool makesSound() { return (_attributes >> 15) & 1; }
|
||||
TeleporterScope getScope() { return (TeleporterScope)((_attributes >> 13) & 1); }
|
||||
bool absRotation() { return (_attributes >> 12) & 1; }
|
||||
direction getRotationDir() { return (direction)((_attributes >> 10) & 1); }
|
||||
byte getDestY() { return (_attributes >> 5) & 0xF; }
|
||||
byte getDestX() { return _attributes & 0xF; }
|
||||
uint16 getDestMapIndex() { return _destMapIndex >> 8; }
|
||||
}; // @ TELEPORTER
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user