Skip to content

Commit

Permalink
DM: Some renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke authored and Bendegúz Nagy committed Aug 26, 2016
1 parent 7a25591 commit ea33eb8
Show file tree
Hide file tree
Showing 6 changed files with 312 additions and 312 deletions.
6 changes: 3 additions & 3 deletions engines/dm/champion.h
Expand Up @@ -175,8 +175,8 @@ enum ChampionAction {


class Skill {
int TemporaryExperience;
long Experience;
int _temporaryExperience;
long _experience;
}; // @ SKILL

class Champion {
Expand Down Expand Up @@ -209,7 +209,7 @@ class Champion {
int16 _water;
uint16 _load;
int16 _shieldDefense;
byte Portrait[464]; // 32 x 29 pixel portrait
byte _portrait[464]; // 32 x 29 pixel portrait

Thing getSlot(ChampionSlot slot) { return _slots[slot]; }
void setSlot(ChampionSlot slot, Thing val) { _slots[slot] = val; }
Expand Down
22 changes: 11 additions & 11 deletions engines/dm/dm.h
Expand Up @@ -52,24 +52,24 @@ enum ThingType {
}; // @ C[00..15]_THING_TYPE_...

class Thing {
uint16 data;
uint16 _data;
public:
static const Thing thingNone;
static const Thing thingEndOfList;
static const Thing _thingNone;
static const Thing _thingEndOfList;

Thing() : data(0) {}
Thing() : _data(0) {}
Thing(uint16 d) { set(d); }

void set(uint16 d) {
data = d;
_data = d;
}

byte getCell() const { return data >> 14; }
ThingType getType() const { return (ThingType)((data >> 10) & 0xF); }
uint16 getIndex() const { return data & 0x1FF; }
uint16 toUint16() const { return data; } // I don't like 'em cast operators
bool operator==(const Thing &rhs) const { return data == rhs.data; }
bool operator!=(const Thing &rhs) const { return data != rhs.data; }
byte getCell() const { return _data >> 14; }
ThingType getType() const { return (ThingType)((_data >> 10) & 0xF); }
uint16 getIndex() const { return _data & 0x1FF; }
uint16 toUint16() const { return _data; } // I don't like 'em cast operators
bool operator==(const Thing &rhs) const { return _data == rhs._data; }
bool operator!=(const Thing &rhs) const { return _data != rhs._data; }
}; // @ THING


Expand Down

0 comments on commit ea33eb8

Please sign in to comment.