diff options
author | celestar <celestar@openttd.org> | 2005-07-24 15:56:31 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2005-07-24 15:56:31 +0000 |
commit | 238e47cd42c009f2ab1359428788a65a26fafebb (patch) | |
tree | e02fce527cef08bc25354c995fecc8ddb0ab5318 /industry_cmd.c | |
parent | a227065ab75d6cb9f449f2282315adc933450b49 (diff) | |
download | openttd-238e47cd42c009f2ab1359428788a65a26fafebb.tar.xz |
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
by enums. There remains work in gfx.c to move the "transparency" and
"recolor" bits around to make space for more sprites. However, 2800
additional sprites can now be loaded. There also remains cleanup and
Doxygen work on many of the header files.
Diffstat (limited to 'industry_cmd.c')
-rw-r--r-- | industry_cmd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/industry_cmd.c b/industry_cmd.c index 4d2629ba0..94e829ad6 100644 --- a/industry_cmd.c +++ b/industry_cmd.c @@ -348,13 +348,13 @@ static void DrawTile_Industry(TileInfo *ti) /* Pointer to industry */ ind = GetIndustry(_m[ti->tile].m2); - ormod = (ind->color_map+0x307)<<16; + ormod = (ind->color_map+0x307) << PALETTE_SPRITE_START; /* Retrieve pointer to the draw industry tile struct */ dits = &_industry_draw_tile_data[(ti->map5<<2) | (_m[ti->tile].owner&3)]; image = dits->sprite_1; - if (image&0x8000 && (image & 0xFFFF0000) == 0) + if (image & PALETTE_MODIFIER_COLOR && (image & PALETTE_SPRITE_MASK) == 0) image |= ormod; z = ti->z; @@ -371,7 +371,7 @@ static void DrawTile_Industry(TileInfo *ti) /* Add industry on top of the ground? */ if ((image = dits->sprite_2) != 0) { - if (image&0x8000 && (image & 0xFFFF0000) == 0) + if (image & PALETTE_MODIFIER_COLOR && (image & PALETTE_SPRITE_MASK) == 0) image |= ormod; if (_display_opt & DO_TRANS_BUILDINGS) |