mirror of https://github.com/OpenRCT2/OpenRCT2.git
Create and use defines for the amount of surface and edge textures
This commit is contained in:
parent
d68bed10cd
commit
65806a55db
|
@ -212,7 +212,7 @@ static void window_land_mousedown(rct_widgetindex widgetIndex, rct_window*w, rct
|
||||||
sint32 defaultIndex = -1;
|
sint32 defaultIndex = -1;
|
||||||
switch (widgetIndex) {
|
switch (widgetIndex) {
|
||||||
case WIDX_FLOOR:
|
case WIDX_FLOOR:
|
||||||
for (i = 0; i < 14; i++) {
|
for (i = 0; i < TERRAIN_COUNT_REGULAR; i++) {
|
||||||
gDropdownItemsFormat[i] = -1;
|
gDropdownItemsFormat[i] = -1;
|
||||||
gDropdownItemsArgs[i] = SPR_FLOOR_TEXTURE_GRASS + FloorTextureOrder[i];
|
gDropdownItemsArgs[i] = SPR_FLOOR_TEXTURE_GRASS + FloorTextureOrder[i];
|
||||||
if (FloorTextureOrder[i] == _selectedFloorTexture)
|
if (FloorTextureOrder[i] == _selectedFloorTexture)
|
||||||
|
@ -223,14 +223,14 @@ static void window_land_mousedown(rct_widgetindex widgetIndex, rct_window*w, rct
|
||||||
widget->bottom - widget->top,
|
widget->bottom - widget->top,
|
||||||
w->colours[2],
|
w->colours[2],
|
||||||
0,
|
0,
|
||||||
14,
|
TERRAIN_COUNT_REGULAR,
|
||||||
47, 36,
|
47, 36,
|
||||||
gAppropriateImageDropdownItemsPerRow[14]
|
gAppropriateImageDropdownItemsPerRow[TERRAIN_COUNT_REGULAR]
|
||||||
);
|
);
|
||||||
gDropdownDefaultIndex = defaultIndex;
|
gDropdownDefaultIndex = defaultIndex;
|
||||||
break;
|
break;
|
||||||
case WIDX_WALL:
|
case WIDX_WALL:
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < TERRAIN_EDGE_COUNT; i++) {
|
||||||
gDropdownItemsFormat[i] = -1;
|
gDropdownItemsFormat[i] = -1;
|
||||||
gDropdownItemsArgs[i] = SPR_WALL_TEXTURE_ROCK + WallTextureOrder[i];
|
gDropdownItemsArgs[i] = SPR_WALL_TEXTURE_ROCK + WallTextureOrder[i];
|
||||||
if (WallTextureOrder[i] == _selectedWallTexture)
|
if (WallTextureOrder[i] == _selectedWallTexture)
|
||||||
|
@ -241,9 +241,9 @@ static void window_land_mousedown(rct_widgetindex widgetIndex, rct_window*w, rct
|
||||||
widget->bottom - widget->top,
|
widget->bottom - widget->top,
|
||||||
w->colours[2],
|
w->colours[2],
|
||||||
0,
|
0,
|
||||||
4,
|
TERRAIN_EDGE_COUNT,
|
||||||
47, 36,
|
47, 36,
|
||||||
gAppropriateImageDropdownItemsPerRow[4]
|
gAppropriateImageDropdownItemsPerRow[TERRAIN_EDGE_COUNT]
|
||||||
);
|
);
|
||||||
gDropdownDefaultIndex = defaultIndex;
|
gDropdownDefaultIndex = defaultIndex;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -695,7 +695,7 @@ static void window_mapgen_base_mousedown(rct_widgetindex widgetIndex, rct_window
|
||||||
window_invalidate(w);
|
window_invalidate(w);
|
||||||
break;
|
break;
|
||||||
case WIDX_FLOOR_TEXTURE:
|
case WIDX_FLOOR_TEXTURE:
|
||||||
for (i = 0; i < 14; i++) {
|
for (i = 0; i < TERRAIN_COUNT_REGULAR; i++) {
|
||||||
gDropdownItemsFormat[i] = -1;
|
gDropdownItemsFormat[i] = -1;
|
||||||
gDropdownItemsArgs[i] = SPR_FLOOR_TEXTURE_GRASS + FloorTextureOrder[i];
|
gDropdownItemsArgs[i] = SPR_FLOOR_TEXTURE_GRASS + FloorTextureOrder[i];
|
||||||
if (FloorTextureOrder[i] == _floorTexture)
|
if (FloorTextureOrder[i] == _floorTexture)
|
||||||
|
@ -706,14 +706,14 @@ static void window_mapgen_base_mousedown(rct_widgetindex widgetIndex, rct_window
|
||||||
widget->bottom - widget->top,
|
widget->bottom - widget->top,
|
||||||
w->colours[2],
|
w->colours[2],
|
||||||
0,
|
0,
|
||||||
14,
|
TERRAIN_COUNT_REGULAR,
|
||||||
47, 36,
|
47, 36,
|
||||||
gAppropriateImageDropdownItemsPerRow[14]
|
gAppropriateImageDropdownItemsPerRow[TERRAIN_COUNT_REGULAR]
|
||||||
);
|
);
|
||||||
gDropdownDefaultIndex = defaultIndex;
|
gDropdownDefaultIndex = defaultIndex;
|
||||||
break;
|
break;
|
||||||
case WIDX_WALL_TEXTURE:
|
case WIDX_WALL_TEXTURE:
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < TERRAIN_EDGE_COUNT; i++) {
|
||||||
gDropdownItemsFormat[i] = -1;
|
gDropdownItemsFormat[i] = -1;
|
||||||
gDropdownItemsArgs[i] = SPR_WALL_TEXTURE_ROCK + WallTextureOrder[i];
|
gDropdownItemsArgs[i] = SPR_WALL_TEXTURE_ROCK + WallTextureOrder[i];
|
||||||
if (WallTextureOrder[i] == _wallTexture)
|
if (WallTextureOrder[i] == _wallTexture)
|
||||||
|
@ -724,9 +724,9 @@ static void window_mapgen_base_mousedown(rct_widgetindex widgetIndex, rct_window
|
||||||
widget->bottom - widget->top,
|
widget->bottom - widget->top,
|
||||||
w->colours[2],
|
w->colours[2],
|
||||||
0,
|
0,
|
||||||
4,
|
TERRAIN_EDGE_COUNT,
|
||||||
47, 36,
|
47, 36,
|
||||||
gAppropriateImageDropdownItemsPerRow[4]
|
gAppropriateImageDropdownItemsPerRow[TERRAIN_EDGE_COUNT]
|
||||||
);
|
);
|
||||||
gDropdownDefaultIndex = defaultIndex;
|
gDropdownDefaultIndex = defaultIndex;
|
||||||
break;
|
break;
|
||||||
|
@ -1014,7 +1014,7 @@ static void window_mapgen_simplex_mousedown(rct_widgetindex widgetIndex, rct_win
|
||||||
window_invalidate(w);
|
window_invalidate(w);
|
||||||
break;
|
break;
|
||||||
case WIDX_SIMPLEX_FLOOR_TEXTURE:
|
case WIDX_SIMPLEX_FLOOR_TEXTURE:
|
||||||
for (i = 0; i < 14; i++) {
|
for (i = 0; i < TERRAIN_COUNT_REGULAR; i++) {
|
||||||
gDropdownItemsFormat[i] = -1;
|
gDropdownItemsFormat[i] = -1;
|
||||||
gDropdownItemsArgs[i] = SPR_FLOOR_TEXTURE_GRASS + FloorTextureOrder[i];
|
gDropdownItemsArgs[i] = SPR_FLOOR_TEXTURE_GRASS + FloorTextureOrder[i];
|
||||||
if (FloorTextureOrder[i] == _floorTexture)
|
if (FloorTextureOrder[i] == _floorTexture)
|
||||||
|
@ -1025,14 +1025,14 @@ static void window_mapgen_simplex_mousedown(rct_widgetindex widgetIndex, rct_win
|
||||||
widget->bottom - widget->top,
|
widget->bottom - widget->top,
|
||||||
w->colours[2],
|
w->colours[2],
|
||||||
0,
|
0,
|
||||||
14,
|
TERRAIN_COUNT_REGULAR,
|
||||||
47, 36,
|
47, 36,
|
||||||
gAppropriateImageDropdownItemsPerRow[14]
|
gAppropriateImageDropdownItemsPerRow[TERRAIN_COUNT_REGULAR]
|
||||||
);
|
);
|
||||||
gDropdownDefaultIndex = defaultIndex;
|
gDropdownDefaultIndex = defaultIndex;
|
||||||
break;
|
break;
|
||||||
case WIDX_SIMPLEX_WALL_TEXTURE:
|
case WIDX_SIMPLEX_WALL_TEXTURE:
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < TERRAIN_EDGE_COUNT; i++) {
|
||||||
gDropdownItemsFormat[i] = -1;
|
gDropdownItemsFormat[i] = -1;
|
||||||
gDropdownItemsArgs[i] = SPR_WALL_TEXTURE_ROCK + WallTextureOrder[i];
|
gDropdownItemsArgs[i] = SPR_WALL_TEXTURE_ROCK + WallTextureOrder[i];
|
||||||
if (WallTextureOrder[i] == _wallTexture)
|
if (WallTextureOrder[i] == _wallTexture)
|
||||||
|
@ -1043,9 +1043,9 @@ static void window_mapgen_simplex_mousedown(rct_widgetindex widgetIndex, rct_win
|
||||||
widget->bottom - widget->top,
|
widget->bottom - widget->top,
|
||||||
w->colours[2],
|
w->colours[2],
|
||||||
0,
|
0,
|
||||||
4,
|
TERRAIN_EDGE_COUNT,
|
||||||
47, 36,
|
47, 36,
|
||||||
gAppropriateImageDropdownItemsPerRow[4]
|
gAppropriateImageDropdownItemsPerRow[TERRAIN_EDGE_COUNT]
|
||||||
);
|
);
|
||||||
gDropdownDefaultIndex = defaultIndex;
|
gDropdownDefaultIndex = defaultIndex;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -174,7 +174,8 @@ enum {
|
||||||
TERRAIN_GRID_GREEN,
|
TERRAIN_GRID_GREEN,
|
||||||
TERRAIN_SAND_DARK,
|
TERRAIN_SAND_DARK,
|
||||||
TERRAIN_SAND_LIGHT,
|
TERRAIN_SAND_LIGHT,
|
||||||
TERRAIN_CHECKERBOARD_INVERTED,
|
TERRAIN_COUNT_REGULAR = 14, // The amount of surface types the user can actually select - what follows are technical types
|
||||||
|
TERRAIN_CHECKERBOARD_INVERTED = 14,
|
||||||
TERRAIN_UNDERGROUND_VIEW,
|
TERRAIN_UNDERGROUND_VIEW,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -182,7 +183,8 @@ enum {
|
||||||
TERRAIN_EDGE_ROCK,
|
TERRAIN_EDGE_ROCK,
|
||||||
TERRAIN_EDGE_WOOD_RED,
|
TERRAIN_EDGE_WOOD_RED,
|
||||||
TERRAIN_EDGE_WOOD_BLACK,
|
TERRAIN_EDGE_WOOD_BLACK,
|
||||||
TERRAIN_EDGE_ICE
|
TERRAIN_EDGE_ICE,
|
||||||
|
TERRAIN_EDGE_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
|
Loading…
Reference in New Issue