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;
|
||||
switch (widgetIndex) {
|
||||
case WIDX_FLOOR:
|
||||
for (i = 0; i < 14; i++) {
|
||||
for (i = 0; i < TERRAIN_COUNT_REGULAR; i++) {
|
||||
gDropdownItemsFormat[i] = -1;
|
||||
gDropdownItemsArgs[i] = SPR_FLOOR_TEXTURE_GRASS + FloorTextureOrder[i];
|
||||
if (FloorTextureOrder[i] == _selectedFloorTexture)
|
||||
|
@ -223,14 +223,14 @@ static void window_land_mousedown(rct_widgetindex widgetIndex, rct_window*w, rct
|
|||
widget->bottom - widget->top,
|
||||
w->colours[2],
|
||||
0,
|
||||
14,
|
||||
TERRAIN_COUNT_REGULAR,
|
||||
47, 36,
|
||||
gAppropriateImageDropdownItemsPerRow[14]
|
||||
gAppropriateImageDropdownItemsPerRow[TERRAIN_COUNT_REGULAR]
|
||||
);
|
||||
gDropdownDefaultIndex = defaultIndex;
|
||||
break;
|
||||
case WIDX_WALL:
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (i = 0; i < TERRAIN_EDGE_COUNT; i++) {
|
||||
gDropdownItemsFormat[i] = -1;
|
||||
gDropdownItemsArgs[i] = SPR_WALL_TEXTURE_ROCK + WallTextureOrder[i];
|
||||
if (WallTextureOrder[i] == _selectedWallTexture)
|
||||
|
@ -241,9 +241,9 @@ static void window_land_mousedown(rct_widgetindex widgetIndex, rct_window*w, rct
|
|||
widget->bottom - widget->top,
|
||||
w->colours[2],
|
||||
0,
|
||||
4,
|
||||
TERRAIN_EDGE_COUNT,
|
||||
47, 36,
|
||||
gAppropriateImageDropdownItemsPerRow[4]
|
||||
gAppropriateImageDropdownItemsPerRow[TERRAIN_EDGE_COUNT]
|
||||
);
|
||||
gDropdownDefaultIndex = defaultIndex;
|
||||
break;
|
||||
|
|
|
@ -695,7 +695,7 @@ static void window_mapgen_base_mousedown(rct_widgetindex widgetIndex, rct_window
|
|||
window_invalidate(w);
|
||||
break;
|
||||
case WIDX_FLOOR_TEXTURE:
|
||||
for (i = 0; i < 14; i++) {
|
||||
for (i = 0; i < TERRAIN_COUNT_REGULAR; i++) {
|
||||
gDropdownItemsFormat[i] = -1;
|
||||
gDropdownItemsArgs[i] = SPR_FLOOR_TEXTURE_GRASS + FloorTextureOrder[i];
|
||||
if (FloorTextureOrder[i] == _floorTexture)
|
||||
|
@ -706,14 +706,14 @@ static void window_mapgen_base_mousedown(rct_widgetindex widgetIndex, rct_window
|
|||
widget->bottom - widget->top,
|
||||
w->colours[2],
|
||||
0,
|
||||
14,
|
||||
TERRAIN_COUNT_REGULAR,
|
||||
47, 36,
|
||||
gAppropriateImageDropdownItemsPerRow[14]
|
||||
gAppropriateImageDropdownItemsPerRow[TERRAIN_COUNT_REGULAR]
|
||||
);
|
||||
gDropdownDefaultIndex = defaultIndex;
|
||||
break;
|
||||
case WIDX_WALL_TEXTURE:
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (i = 0; i < TERRAIN_EDGE_COUNT; i++) {
|
||||
gDropdownItemsFormat[i] = -1;
|
||||
gDropdownItemsArgs[i] = SPR_WALL_TEXTURE_ROCK + WallTextureOrder[i];
|
||||
if (WallTextureOrder[i] == _wallTexture)
|
||||
|
@ -724,9 +724,9 @@ static void window_mapgen_base_mousedown(rct_widgetindex widgetIndex, rct_window
|
|||
widget->bottom - widget->top,
|
||||
w->colours[2],
|
||||
0,
|
||||
4,
|
||||
TERRAIN_EDGE_COUNT,
|
||||
47, 36,
|
||||
gAppropriateImageDropdownItemsPerRow[4]
|
||||
gAppropriateImageDropdownItemsPerRow[TERRAIN_EDGE_COUNT]
|
||||
);
|
||||
gDropdownDefaultIndex = defaultIndex;
|
||||
break;
|
||||
|
@ -1014,7 +1014,7 @@ static void window_mapgen_simplex_mousedown(rct_widgetindex widgetIndex, rct_win
|
|||
window_invalidate(w);
|
||||
break;
|
||||
case WIDX_SIMPLEX_FLOOR_TEXTURE:
|
||||
for (i = 0; i < 14; i++) {
|
||||
for (i = 0; i < TERRAIN_COUNT_REGULAR; i++) {
|
||||
gDropdownItemsFormat[i] = -1;
|
||||
gDropdownItemsArgs[i] = SPR_FLOOR_TEXTURE_GRASS + FloorTextureOrder[i];
|
||||
if (FloorTextureOrder[i] == _floorTexture)
|
||||
|
@ -1025,14 +1025,14 @@ static void window_mapgen_simplex_mousedown(rct_widgetindex widgetIndex, rct_win
|
|||
widget->bottom - widget->top,
|
||||
w->colours[2],
|
||||
0,
|
||||
14,
|
||||
TERRAIN_COUNT_REGULAR,
|
||||
47, 36,
|
||||
gAppropriateImageDropdownItemsPerRow[14]
|
||||
gAppropriateImageDropdownItemsPerRow[TERRAIN_COUNT_REGULAR]
|
||||
);
|
||||
gDropdownDefaultIndex = defaultIndex;
|
||||
break;
|
||||
case WIDX_SIMPLEX_WALL_TEXTURE:
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (i = 0; i < TERRAIN_EDGE_COUNT; i++) {
|
||||
gDropdownItemsFormat[i] = -1;
|
||||
gDropdownItemsArgs[i] = SPR_WALL_TEXTURE_ROCK + WallTextureOrder[i];
|
||||
if (WallTextureOrder[i] == _wallTexture)
|
||||
|
@ -1043,9 +1043,9 @@ static void window_mapgen_simplex_mousedown(rct_widgetindex widgetIndex, rct_win
|
|||
widget->bottom - widget->top,
|
||||
w->colours[2],
|
||||
0,
|
||||
4,
|
||||
TERRAIN_EDGE_COUNT,
|
||||
47, 36,
|
||||
gAppropriateImageDropdownItemsPerRow[4]
|
||||
gAppropriateImageDropdownItemsPerRow[TERRAIN_EDGE_COUNT]
|
||||
);
|
||||
gDropdownDefaultIndex = defaultIndex;
|
||||
break;
|
||||
|
|
|
@ -174,7 +174,8 @@ enum {
|
|||
TERRAIN_GRID_GREEN,
|
||||
TERRAIN_SAND_DARK,
|
||||
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,
|
||||
};
|
||||
|
||||
|
@ -182,7 +183,8 @@ enum {
|
|||
TERRAIN_EDGE_ROCK,
|
||||
TERRAIN_EDGE_WOOD_RED,
|
||||
TERRAIN_EDGE_WOOD_BLACK,
|
||||
TERRAIN_EDGE_ICE
|
||||
TERRAIN_EDGE_ICE,
|
||||
TERRAIN_EDGE_COUNT
|
||||
};
|
||||
|
||||
enum {
|
||||
|
|
Loading…
Reference in New Issue