From 2361aaf601e4355986e607e525a75377bf754de8 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 21 Sep 2014 07:57:45 +0000 Subject: (svn r26869) -Add: support for an all black palette to prevent the need of having a black tile of all different slopes (ic111) --- src/newgrf.cpp | 1 + src/table/sprites.h | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/newgrf.cpp b/src/newgrf.cpp index b1b6f5ff1..88b3b25a4 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -5594,6 +5594,7 @@ static const Action5Type _action5_types[] = { /* 0x15 */ { A5BLOCK_ALLOW_OFFSET, SPR_OPENTTD_BASE, 1, OPENTTD_SPRITE_COUNT, "OpenTTD GUI graphics" }, /* 0x16 */ { A5BLOCK_ALLOW_OFFSET, SPR_AIRPORT_PREVIEW_BASE, 1, SPR_AIRPORT_PREVIEW_COUNT, "Airport preview graphics" }, /* 0x17 */ { A5BLOCK_ALLOW_OFFSET, SPR_RAILTYPE_TUNNEL_BASE, 1, RAILTYPE_TUNNEL_BASE_COUNT, "Railtype tunnel base" }, + /* 0x18 */ { A5BLOCK_ALLOW_OFFSET, SPR_PALETTE_BASE, 1, PALETTE_SPRITE_COUNT, "Palette" }, }; /* Action 0x05 */ diff --git a/src/table/sprites.h b/src/table/sprites.h index 5d42caccb..b5b3321b0 100644 --- a/src/table/sprites.h +++ b/src/table/sprites.h @@ -290,8 +290,12 @@ static const uint16 RAILTYPE_TUNNEL_BASE_COUNT = 16; static const SpriteID SPR_EMPTY_BOUNDING_BOX = SPR_RAILTYPE_TUNNEL_BASE + RAILTYPE_TUNNEL_BASE_COUNT; static const uint16 EMPTY_BOUNDING_BOX_SPRITE_COUNT = 1; +/* Black palette sprite, needed for painting (fictive) tiles outside map */ +static const SpriteID SPR_PALETTE_BASE = SPR_EMPTY_BOUNDING_BOX + EMPTY_BOUNDING_BOX_SPRITE_COUNT; +static const uint16 PALETTE_SPRITE_COUNT = 1; + /* From where can we start putting NewGRFs? */ -static const SpriteID SPR_NEWGRFS_BASE = SPR_EMPTY_BOUNDING_BOX + EMPTY_BOUNDING_BOX_SPRITE_COUNT; +static const SpriteID SPR_NEWGRFS_BASE = SPR_PALETTE_BASE + PALETTE_SPRITE_COUNT; /* Manager face sprites */ static const SpriteID SPR_GRADIENT = 874; // background gradient behind manager face @@ -1562,4 +1566,6 @@ static const PaletteID PALETTE_CRASH = 804; ///< Recolour sprite static const PaletteID PALETTE_CHURCH_RED = 1438; ///< Recolour sprite for reddish churches static const PaletteID PALETTE_CHURCH_CREAM = 1439; ///< Recolour sprite for white churches +static const PaletteID PALETTE_ALL_BLACK = SPR_PALETTE_BASE; ///< Exchange any color by black, needed for painting fictive tiles outside map + #endif /* SPRITES_H */ -- cgit v1.2.3-54-g00ecf