Skip to content

Commit

Permalink
PRINCE: Mob::AttrId - enum names update
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaslw committed Oct 6, 2014
1 parent 4ef22e3 commit 6d228fe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 22 deletions.
14 changes: 7 additions & 7 deletions engines/prince/mob.cpp
Expand Up @@ -75,13 +75,13 @@ bool Mob::loadFromStream(Common::SeekableReadStream &stream) {

void Mob::setData(AttrId dataId, uint16 value) {
switch (dataId) {
case ExamDir:
case kMobExamDir:
_examDirection = (Direction)value;
break;
case ExamX:
case kMobExamX:
_examPosition.x = value;
break;
case ExamY:
case kMobExamY:
_examPosition.y = value;
break;
default:
Expand All @@ -91,13 +91,13 @@ void Mob::setData(AttrId dataId, uint16 value) {

uint16 Mob::getData(AttrId dataId) {
switch (dataId) {
case Visible:
case kMobVisible:
return _visible;
case ExamDir:
case kMobExamDir:
return _examDirection;
case ExamX:
case kMobExamX:
return _examPosition.x;
case ExamY:
case kMobExamY:
return _examPosition.y;
default:
assert(false);
Expand Down
19 changes: 4 additions & 15 deletions engines/prince/mob.h
Expand Up @@ -41,21 +41,10 @@ class Mob {

// Used instead of offset in setData and getData
enum AttrId {
Visible = 0,
Type = 2,
X1 = 4,
Y1 = 6,
X2 = 8,
Y2 = 10,
Mask = 12,
ExamX = 14,
ExamY = 16,
ExamDir = 18,
UseX = 20,
UseY = 21,
UseDir = 22,
Name = 24,
ExamText = 28
kMobVisible = 0,
kMobExamX = 14,
kMobExamY = 16,
kMobExamDir = 18,
};

void setData(AttrId dataId, uint16 value);
Expand Down

0 comments on commit 6d228fe

Please sign in to comment.