summaryrefslogtreecommitdiff
path: root/tunnelbridge_cmd.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2005-07-24 15:56:31 +0000
committercelestar <celestar@openttd.org>2005-07-24 15:56:31 +0000
commit238e47cd42c009f2ab1359428788a65a26fafebb (patch)
treee02fce527cef08bc25354c995fecc8ddb0ab5318 /tunnelbridge_cmd.c
parenta227065ab75d6cb9f449f2282315adc933450b49 (diff)
downloadopenttd-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 'tunnelbridge_cmd.c')
-rw-r--r--tunnelbridge_cmd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c
index 38f659a6f..317a91132 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -40,10 +40,10 @@ const uint16 _bridge_speeds[MAX_BRIDGES] = {
};
const PalSpriteID _bridge_sprites[MAX_BRIDGES] = {
- 0x0A24, 0x31E8A26, 0x0A25, 0x3208A22,
- 0x0A22, 0x3218A22, 0x0A23, 0x31C8A23,
- 0x31E8A23, 0x0A27, 0x0A28, 0x3218A28,
- 0x3238A28,
+ 0x0A24, 0xA26 | PALETTE_TO_STRUCT_RED, 0x0A25, 0xA22 | PALETTE_TO_STRUCT_CONCRETE,
+ 0x0A22, 0xA22 | PALETTE_TO_STRUCT_YELLOW, 0x0A23, 0xA23 | PALETTE_TO_STRUCT_BROWN,
+ 0xA23 | PALETTE_TO_STRUCT_RED, 0x0A27, 0x0A28, 0xA28 | PALETTE_TO_STRUCT_YELLOW,
+ 0xA28 | PALETTE_TO_STRUCT_GREY,
};
const StringID _bridge_material[MAX_BRIDGES] = {
@@ -1135,10 +1135,10 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
// draw roof
if (ti->map5&1) {
x += 12;
- if (image&0x3FFF) AddSortableSpriteToDraw(image, x,y, 1, 16, 0x28, z);
+ if (image & SPRITE_MASK) AddSortableSpriteToDraw(image, x,y, 1, 16, 0x28, z);
} else {
y += 12;
- if (image&0x3FFF) AddSortableSpriteToDraw(image, x,y, 16, 1, 0x28, z);
+ if (image & SPRITE_MASK) AddSortableSpriteToDraw(image, x,y, 16, 1, 0x28, z);
}
if (ti->z + 5 == z ) {