summaryrefslogtreecommitdiff
path: root/town_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-08-23 18:47:04 +0000
committertron <tron@openttd.org>2005-08-23 18:47:04 +0000
commitb45aeb5c365f62fd04d6843efecbe3dc521d8cbb (patch)
tree87cff4a5f0201aacd0256ce38375fbde200eef92 /town_cmd.c
parent9d9ee2fe5668e631fa36b181530285157badb7fa (diff)
downloadopenttd-b45aeb5c365f62fd04d6843efecbe3dc521d8cbb.tar.xz
(svn r2886) Rename the "owner" attribute to "m1", because when it stores an owner it is accessed by [GS]etOwner anyway and when it doesn't store an owner, but arbitrary data, accessing a field called "owner" is confusing.
Diffstat (limited to 'town_cmd.c')
-rw-r--r--town_cmd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/town_cmd.c b/town_cmd.c
index 6285b495b..c493fd2b6 100644
--- a/town_cmd.c
+++ b/town_cmd.c
@@ -78,7 +78,7 @@ typedef struct DrawTownTileStruct {
static void TownDrawHouseLift(TileInfo *ti)
{
- AddChildSpriteScreen(0x5A3, 0xE, 0x3C - (_m[ti->tile].owner&0x7F));
+ AddChildSpriteScreen(0x5A3, 0xE, 0x3C - (_m[ti->tile].m1 & 0x7F));
}
typedef void TownDrawTileProc(TileInfo *ti);
@@ -173,8 +173,8 @@ static void AnimateTile_Town(TileIndex tile)
return;
}
- if (!((old=_m[tile].owner)&0x80)) {
- _m[tile].owner |= 0x80;
+ if (!((old = _m[tile].m1) & 0x80)) {
+ _m[tile].m1 |= 0x80;
do {
i = (Random()&7) - 1;
@@ -183,14 +183,14 @@ static void AnimateTile_Town(TileIndex tile)
SB(_m[tile].m5, 0, 6, i);
}
- a = _m[tile].owner&0x7F;
+ a = _m[tile].m1 & 0x7F;
b = (_m[tile].m5&0x3F) * 6;
a += (a < b) ? 1 : -1;
- _m[tile].owner = (_m[tile].owner&0x80)|a;
+ _m[tile].m1 = (_m[tile].m1 & 0x80) | a;
if (a == b) {
+ _m[tile].m1 &= 0x7F;
_m[tile].m5 &= 0x40;
- _m[tile].owner &= 0x7F;
DeleteAnimatedTile(tile);
}