Reorder edge textures

This commit is contained in:
Gymnasiast 2018-01-27 23:22:24 +01:00
parent a7c7dc68e3
commit 981b67a90f
4 changed files with 10 additions and 11 deletions

View File

@ -33,20 +33,18 @@ static uint16 toolSizeSpriteIndices[] =
SPR_LAND_TOOL_SIZE_7, SPR_LAND_TOOL_SIZE_7,
}; };
static char FloorTextureOrder[] = static uint32 FloorTextureOrder[] =
{ {
TERRAIN_SAND_DARK, TERRAIN_SAND_LIGHT, TERRAIN_DIRT, TERRAIN_GRASS_CLUMPS, TERRAIN_GRASS, TERRAIN_SAND_DARK, TERRAIN_SAND_LIGHT, TERRAIN_DIRT, TERRAIN_GRASS_CLUMPS, TERRAIN_GRASS,
TERRAIN_ROCK, TERRAIN_SAND, TERRAIN_MARTIAN, TERRAIN_CHECKERBOARD, TERRAIN_ICE, TERRAIN_ROCK, TERRAIN_SAND, TERRAIN_MARTIAN, TERRAIN_CHECKERBOARD, TERRAIN_ICE,
TERRAIN_GRID_RED, TERRAIN_GRID_YELLOW, TERRAIN_GRID_BLUE, TERRAIN_GRID_GREEN TERRAIN_GRID_RED, TERRAIN_GRID_YELLOW, TERRAIN_GRID_BLUE, TERRAIN_GRID_GREEN
}; };
static char WallTextureOrder[] = uint32 WallTextureOrder[] =
{ {
TERRAIN_EDGE_ROCK, TERRAIN_EDGE_WOOD_RED, TERRAIN_EDGE_WOOD_BLACK, TERRAIN_EDGE_ICE, TERRAIN_EDGE_ROCK, TERRAIN_EDGE_WOOD_RED, TERRAIN_EDGE_WOOD_BLACK, TERRAIN_EDGE_ICE, TERRAIN_EDGE_BRICK,
TERRAIN_EDGE_BRICK, TERRAIN_EDGE_IRON, TERRAIN_EDGE_GREY, TERRAIN_EDGE_YELLOW, TERRAIN_EDGE_RED, TERRAIN_EDGE_PURPLE, TERRAIN_EDGE_GREEN,
TERRAIN_EDGE_GREY, TERRAIN_EDGE_YELLOW, TERRAIN_EDGE_RED, TERRAIN_EDGE_PURPLE, TERRAIN_EDGE_GREEN, TERRAIN_EDGE_IRON, TERRAIN_EDGE_STONE_BROWN, TERRAIN_EDGE_STONE_GREY, TERRAIN_EDGE_SKYSCRAPER_A, TERRAIN_EDGE_SKYSCRAPER_B,
TERRAIN_EDGE_STONE_BROWN, TERRAIN_EDGE_STONE_GREY,
TERRAIN_EDGE_SKYSCRAPER_A, TERRAIN_EDGE_SKYSCRAPER_B,
0, 0 0, 0
}; };
@ -124,7 +122,7 @@ void land_tool_show_edge_style_dropdown(rct_window * w, rct_widget * widget, uin
for (uint8 i = 0; i < edgeCount; i++) { for (uint8 i = 0; i < edgeCount; i++) {
gDropdownItemsFormat[i] = DROPDOWN_FORMAT_LAND_PICKER; gDropdownItemsFormat[i] = DROPDOWN_FORMAT_LAND_PICKER;
gDropdownItemsArgs[i] = WallTexturePreviews[i]; gDropdownItemsArgs[i] = WallTexturePreviews[WallTextureOrder[i]];
if (WallTextureOrder[i] == currentEdgeType) if (WallTextureOrder[i] == currentEdgeType)
defaultIndex = i; defaultIndex = i;
} }

View File

@ -33,6 +33,7 @@ extern uint8 gLandToolTerrainEdge;
extern money32 gWaterToolRaiseCost; extern money32 gWaterToolRaiseCost;
extern money32 gWaterToolLowerCost; extern money32 gWaterToolLowerCost;
extern uint32 WallTextureOrder[];
extern uint32 WallTexturePreviews[]; extern uint32 WallTexturePreviews[];
uint32 land_tool_size_to_sprite_index(uint16 size); uint32 land_tool_size_to_sprite_index(uint16 size);

View File

@ -239,7 +239,7 @@ static void window_land_dropdown(rct_window *w, rct_widgetindex widgetIndex, sin
if (dropdownIndex == -1) if (dropdownIndex == -1)
dropdownIndex = gDropdownHighlightedIndex; dropdownIndex = gDropdownHighlightedIndex;
type = (dropdownIndex == -1) ?_selectedWallTexture : dropdownIndex; type = (dropdownIndex == -1) ?_selectedWallTexture : WallTextureOrder[dropdownIndex];
if (gLandToolTerrainEdge == type) { if (gLandToolTerrainEdge == type) {
gLandToolTerrainEdge = 255; gLandToolTerrainEdge = 255;

View File

@ -722,7 +722,7 @@ static void window_mapgen_base_dropdown(rct_window *w, rct_widgetindex widgetInd
if (dropdownIndex == -1) if (dropdownIndex == -1)
dropdownIndex = gDropdownHighlightedIndex; dropdownIndex = gDropdownHighlightedIndex;
type = (dropdownIndex == -1) ? _wallTexture : dropdownIndex; type = (dropdownIndex == -1) ? _wallTexture : WallTextureOrder[dropdownIndex];
if (gLandToolTerrainEdge == type) { if (gLandToolTerrainEdge == type) {
gLandToolTerrainEdge = 255; gLandToolTerrainEdge = 255;
@ -1016,7 +1016,7 @@ static void window_mapgen_simplex_dropdown(rct_window *w, rct_widgetindex widget
if (dropdownIndex == -1) if (dropdownIndex == -1)
dropdownIndex = gDropdownHighlightedIndex; dropdownIndex = gDropdownHighlightedIndex;
type = (dropdownIndex == -1) ? _wallTexture : dropdownIndex; type = (dropdownIndex == -1) ? _wallTexture : WallTextureOrder[dropdownIndex];
if (gLandToolTerrainEdge == type) { if (gLandToolTerrainEdge == type) {
gLandToolTerrainEdge = 255; gLandToolTerrainEdge = 255;