summaryrefslogtreecommitdiff
path: root/src/landscape.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-01-14 19:57:49 +0000
committerpeter1138 <peter1138@openttd.org>2007-01-14 19:57:49 +0000
commit92d418b031d23cf42a4df09e12945cc4b737bce2 (patch)
treec62990da208a45b3bd1c7379a1835190458d5a49 /src/landscape.cpp
parent19d31c7417e4c8ad763c6674b7d1c6f9022e3703 (diff)
downloadopenttd-92d418b031d23cf42a4df09e12945cc4b737bce2.tar.xz
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
This lets us increase the sprite width from 14 to up to 29 bits, effectively nulling the old sprite limit. Table changes in next commit.
Diffstat (limited to 'src/landscape.cpp')
-rw-r--r--src/landscape.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/landscape.cpp b/src/landscape.cpp
index 2b8a2033b..171e1718b 100644
--- a/src/landscape.cpp
+++ b/src/landscape.cpp
@@ -212,7 +212,7 @@ static bool HasFoundationNE(TileIndex tile, Slope slope_here, uint z_here)
void DrawFoundation(TileInfo *ti, uint f)
{
- uint32 sprite_base = SPR_SLOPES_BASE - 15;
+ SpriteID sprite_base = SPR_SLOPES_BASE - 15;
Slope slope;
uint z;
@@ -221,26 +221,26 @@ void DrawFoundation(TileInfo *ti, uint f)
if (!HasFoundationNE(ti->tile, slope, z)) sprite_base += 44;
if (IsSteepSlope(ti->tileh)) {
- uint32 lower_base;
+ SpriteID lower_base;
// Lower part of foundation
lower_base = sprite_base;
if (lower_base == SPR_SLOPES_BASE - 15) lower_base = SPR_FOUNDATION_BASE;
AddSortableSpriteToDraw(
- lower_base + (ti->tileh & ~SLOPE_STEEP), ti->x, ti->y, 16, 16, 7, ti->z
+ lower_base + (ti->tileh & ~SLOPE_STEEP), PAL_NONE, ti->x, ti->y, 16, 16, 7, ti->z
);
ti->z += TILE_HEIGHT;
ti->tileh = _inclined_tileh[f - 15];
if (f < 15 + 8) {
// inclined
- AddSortableSpriteToDraw(sprite_base + f, ti->x, ti->y, 16, 16, 1, ti->z);
+ AddSortableSpriteToDraw(sprite_base + f, PAL_NONE, ti->x, ti->y, 16, 16, 1, ti->z);
OffsetGroundSprite(31, 9);
} else if (f >= 15 + 8 + 4) {
// three corners raised
- uint32 upper = sprite_base + 15 + (f - 15 - 8 - 4) * 2;
+ SpriteID upper = sprite_base + 15 + (f - 15 - 8 - 4) * 2;
- AddSortableSpriteToDraw(upper, ti->x, ti->y, 16, 16, 1, ti->z);
- AddChildSpriteScreen(upper + 1, 31, 9);
+ AddSortableSpriteToDraw(upper, PAL_NONE, ti->x, ti->y, 16, 16, 1, ti->z);
+ AddChildSpriteScreen(upper + 1, PAL_NONE, 31, 9);
OffsetGroundSprite(31, 9);
} else {
// one corner raised
@@ -252,13 +252,13 @@ void DrawFoundation(TileInfo *ti, uint f)
// Use the original slope sprites if NW and NE borders should be visible
if (sprite_base == SPR_SLOPES_BASE - 15) sprite_base = SPR_FOUNDATION_BASE;
- AddSortableSpriteToDraw(sprite_base + f, ti->x, ti->y, 16, 16, 7, ti->z);
+ AddSortableSpriteToDraw(sprite_base + f, PAL_NONE, ti->x, ti->y, 16, 16, 7, ti->z);
ti->z += TILE_HEIGHT;
ti->tileh = SLOPE_FLAT;
OffsetGroundSprite(31, 1);
} else {
// inclined foundation
- AddSortableSpriteToDraw(sprite_base + f, ti->x, ti->y, 16, 16, 1, ti->z);
+ AddSortableSpriteToDraw(sprite_base + f, PAL_NONE, ti->x, ti->y, 16, 16, 1, ti->z);
ti->tileh = _inclined_tileh[f - 15];
OffsetGroundSprite(31, 9);
}