diff options
author | tron <tron@openttd.org> | 2005-11-14 08:09:57 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-11-14 08:09:57 +0000 |
commit | 833032adc09ce95c68d4a4b412221a0b3f88e670 (patch) | |
tree | 80b15078ff5a1c09815ccb23f4c9e7629774dae4 /town_cmd.c | |
parent | 357aba747578ecd3b8cc1a29bc740634211ada37 (diff) | |
download | openttd-833032adc09ce95c68d4a4b412221a0b3f88e670.tar.xz |
(svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT
Diffstat (limited to 'town_cmd.c')
-rw-r--r-- | town_cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/town_cmd.c b/town_cmd.c index e49cf4eb5..6de979765 100644 --- a/town_cmd.c +++ b/town_cmd.c @@ -97,7 +97,7 @@ static void DrawTile_Town(TileInfo *ti) { /* this "randomizes" on the (up to) 4 variants of a building */ byte gfx = _m[ti->tile].m4; - byte stage = _m[ti->tile].m3 >> 6; + byte stage = GB(_m[ti->tile].m3, 6, 2); uint variant; variant = ti->x >> 4; variant ^= ti->x >> 6; @@ -635,7 +635,7 @@ static void GrowTownInTile(TileIndex *tile_ptr, uint mask, int block, Town *t1) // Possibly extend the road in a direction. // Randomize a direction and if it has a road, bail out. - i = (int)Random() & 3; + i = GB(Random(), 0, 2); if (HASBIT(mask, i)) return; |