mirror of https://github.com/OpenRCT2/OpenRCT2.git
Add the RCT1 edge styles
This commit is contained in:
parent
c1c6413337
commit
037b236d8f
|
@ -4510,6 +4510,17 @@ STR_6200 :Reset date
|
|||
STR_6201 :{MONTH}
|
||||
STR_6202 :Enable virtual floor
|
||||
STR_6203 :{SMALLFONT}{BLACK}When enabled, a virtual floor will be rendered when holding Ctrl or Shift to ease vertical placement of elements.
|
||||
STR_6204 :Brick
|
||||
STR_6205 :Iron
|
||||
STR_6206 :Grey stucco
|
||||
STR_6207 :Yellow stucco
|
||||
STR_6208 :Red stucco
|
||||
STR_6209 :Purple stucco
|
||||
STR_6210 :Green stucco
|
||||
STR_6211 :Brown sandstone
|
||||
STR_6212 :Grey sandstone
|
||||
STR_6213 :Skyscraper A
|
||||
STR_6214 :Skyscraper B
|
||||
|
||||
#############
|
||||
# Scenarios #
|
||||
|
|
|
@ -97,7 +97,7 @@ void land_tool_show_edge_style_dropdown(rct_window * w, rct_widget * widget, uin
|
|||
{
|
||||
uint8 defaultIndex = 0;
|
||||
|
||||
for (uint8 i = 0; i < TERRAIN_EDGE_COUNT; i++) {
|
||||
for (uint8 i = 0; i < TERRAIN_EDGE_RCT2_COUNT; i++) {
|
||||
gDropdownItemsFormat[i] = DROPDOWN_FORMAT_LAND_PICKER;
|
||||
gDropdownItemsArgs[i] = SPR_WALL_TEXTURE_ROCK + WallTextureOrder[i];
|
||||
if (WallTextureOrder[i] == currentEdgeType)
|
||||
|
@ -109,9 +109,9 @@ void land_tool_show_edge_style_dropdown(rct_window * w, rct_widget * widget, uin
|
|||
widget->bottom - widget->top,
|
||||
w->colours[2],
|
||||
0,
|
||||
TERRAIN_EDGE_COUNT,
|
||||
TERRAIN_EDGE_RCT2_COUNT,
|
||||
47, 36,
|
||||
gAppropriateImageDropdownItemsPerRow[TERRAIN_EDGE_COUNT]
|
||||
gAppropriateImageDropdownItemsPerRow[TERRAIN_EDGE_RCT2_COUNT]
|
||||
);
|
||||
|
||||
gDropdownDefaultIndex = defaultIndex;
|
||||
|
|
|
@ -60,7 +60,17 @@ static constexpr const rct_string_id TerrainEdgeTypeStringIds[] = {
|
|||
STR_TILE_INSPECTOR_TERRAIN_EDGE_WOOD_RED,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_WOOD_BLACK,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_ICE,
|
||||
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_BRICK,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_IRON,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_GREY,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_YELLOW,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_RED,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_PURPLE,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_GREEN,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_STONE_BROWN,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_STONE_GREY,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_SKYSCRAPER_A,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_SKYSCRAPER_B,
|
||||
};
|
||||
|
||||
static constexpr const rct_string_id EntranceTypeStringIds[] = {
|
||||
|
|
|
@ -3858,6 +3858,18 @@ enum {
|
|||
STR_ENABLE_VIRTUAL_FLOOR = 6202,
|
||||
STR_ENABLE_VIRTUAL_FLOOR_TIP = 6203,
|
||||
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_BRICK = 6204,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_IRON = 6205,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_GREY = 6206,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_YELLOW = 6207,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_RED = 6208,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_PURPLE = 6209,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_GREEN = 6210,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_STONE_BROWN = 6211,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_STONE_GREY = 6212,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_SKYSCRAPER_A = 6213,
|
||||
STR_TILE_INSPECTOR_TERRAIN_EDGE_SKYSCRAPER_B = 6214,
|
||||
|
||||
// Have to include resource strings (from scenarios and objects) for the time being now that language is partially working
|
||||
STR_COUNT = 32768
|
||||
};
|
||||
|
|
|
@ -212,20 +212,42 @@ static constexpr const uint8 byte_97B5B0[] = {
|
|||
(base) + 72, \
|
||||
}
|
||||
|
||||
static constexpr const uint32 _terrainEdgeSpriteIds[][4] =
|
||||
static constexpr const uint32 _terrainEdgeSpriteIds[][TERRAIN_EDGE_COUNT] =
|
||||
{
|
||||
DEFINE_EDGE_SPRITES(SPR_EDGE_ROCK_BASE),
|
||||
DEFINE_EDGE_SPRITES(SPR_EDGE_WOOD_RED_BASE),
|
||||
DEFINE_EDGE_SPRITES(SPR_EDGE_WOOD_BLACK_BASE),
|
||||
DEFINE_EDGE_SPRITES(SPR_EDGE_ICE_BASE),
|
||||
DEFINE_EDGE_SPRITES(SPR_CSG_EDGE_BRICK_BASE),
|
||||
DEFINE_EDGE_SPRITES(SPR_CSG_EDGE_IRON_BASE),
|
||||
DEFINE_EDGE_SPRITES(SPR_CSG_EDGE_GREY_BASE),
|
||||
DEFINE_EDGE_SPRITES(SPR_CSG_EDGE_YELLOW_BASE),
|
||||
DEFINE_EDGE_SPRITES(SPR_CSG_EDGE_RED_BASE),
|
||||
DEFINE_EDGE_SPRITES(SPR_CSG_EDGE_PURPLE_BASE),
|
||||
DEFINE_EDGE_SPRITES(SPR_CSG_EDGE_GREEN_BASE),
|
||||
DEFINE_EDGE_SPRITES(SPR_CSG_EDGE_STONE_BROWN_BASE),
|
||||
DEFINE_EDGE_SPRITES(SPR_CSG_EDGE_STONE_GREY_BASE),
|
||||
DEFINE_EDGE_SPRITES(SPR_CSG_EDGE_SKYSCRAPER_A_BASE),
|
||||
DEFINE_EDGE_SPRITES(SPR_CSG_EDGE_SKYSCRAPER_B_BASE),
|
||||
};
|
||||
|
||||
static constexpr const uint32 _terrainEdgeTunnelSpriteIds[][16] =
|
||||
static constexpr const uint32 _terrainEdgeTunnelSpriteIds[][TERRAIN_EDGE_COUNT * 4] =
|
||||
{
|
||||
DEFINE_EDGE_TUNNEL_SPRITES(SPR_EDGE_ROCK_BASE),
|
||||
DEFINE_EDGE_TUNNEL_SPRITES(SPR_EDGE_WOOD_RED_BASE),
|
||||
DEFINE_EDGE_TUNNEL_SPRITES(SPR_EDGE_WOOD_BLACK_BASE),
|
||||
DEFINE_EDGE_TUNNEL_SPRITES(SPR_EDGE_ICE_BASE),
|
||||
DEFINE_EDGE_TUNNEL_SPRITES(SPR_CSG_EDGE_BRICK_BASE),
|
||||
DEFINE_EDGE_TUNNEL_SPRITES(SPR_CSG_EDGE_IRON_BASE),
|
||||
DEFINE_EDGE_TUNNEL_SPRITES(SPR_CSG_EDGE_GREY_BASE),
|
||||
DEFINE_EDGE_TUNNEL_SPRITES(SPR_CSG_EDGE_YELLOW_BASE),
|
||||
DEFINE_EDGE_TUNNEL_SPRITES(SPR_CSG_EDGE_RED_BASE),
|
||||
DEFINE_EDGE_TUNNEL_SPRITES(SPR_CSG_EDGE_PURPLE_BASE),
|
||||
DEFINE_EDGE_TUNNEL_SPRITES(SPR_CSG_EDGE_GREEN_BASE),
|
||||
DEFINE_EDGE_TUNNEL_SPRITES(SPR_CSG_EDGE_STONE_BROWN_BASE),
|
||||
DEFINE_EDGE_TUNNEL_SPRITES(SPR_CSG_EDGE_STONE_GREY_BASE),
|
||||
DEFINE_EDGE_TUNNEL_SPRITES(SPR_CSG_EDGE_SKYSCRAPER_A_BASE),
|
||||
DEFINE_EDGE_TUNNEL_SPRITES(SPR_CSG_EDGE_SKYSCRAPER_B_BASE),
|
||||
};
|
||||
|
||||
static constexpr const uint8 byte_97B740[] =
|
||||
|
@ -538,6 +560,9 @@ static void viewport_surface_smoothen_edge(paint_session * session, enum edge_t
|
|||
|
||||
static void viewport_surface_draw_tile_side_bottom(paint_session * session, enum edge_t edge, uint8 height, uint8 edgeStyle, struct tile_descriptor self, struct tile_descriptor neighbour, bool isWater)
|
||||
{
|
||||
if (!is_csg_loaded() && edgeStyle >= TERRAIN_EDGE_RCT2_COUNT)
|
||||
edgeStyle = TERRAIN_EDGE_ROCK;
|
||||
|
||||
registers regs{};
|
||||
|
||||
LocationXY8 offset = { 0, 0 };
|
||||
|
@ -610,6 +635,9 @@ static void viewport_surface_draw_tile_side_bottom(paint_session * session, enum
|
|||
return;
|
||||
}
|
||||
|
||||
if (!is_csg_loaded() && edgeStyle >= TERRAIN_EDGE_RCT2_COUNT)
|
||||
edgeStyle = TERRAIN_EDGE_ROCK;
|
||||
|
||||
uint32 base_image_id = _terrainEdgeSpriteIds[edgeStyle][0];
|
||||
if (gCurrentViewportFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE)
|
||||
{
|
||||
|
@ -740,6 +768,9 @@ static void viewport_surface_draw_water_side_bottom(paint_session * session, enu
|
|||
|
||||
static void viewport_surface_draw_tile_side_top(paint_session * session, enum edge_t edge, uint8 height, uint8 terrain, struct tile_descriptor self, struct tile_descriptor neighbour, bool isWater)
|
||||
{
|
||||
if (!is_csg_loaded() && terrain >= TERRAIN_EDGE_RCT2_COUNT)
|
||||
terrain = TERRAIN_EDGE_ROCK;
|
||||
|
||||
registers regs{};
|
||||
|
||||
LocationXY8 offset = { 0, 0 };
|
||||
|
|
|
@ -149,20 +149,20 @@ namespace RCT1
|
|||
static const uint8 map[] =
|
||||
{
|
||||
TERRAIN_EDGE_ROCK,
|
||||
TERRAIN_EDGE_ROCK, // Originally TERRAIN_EDGE_BRICK
|
||||
TERRAIN_EDGE_ROCK, // Originally TERRAIN_EDGE_IRON
|
||||
TERRAIN_EDGE_BRICK,
|
||||
TERRAIN_EDGE_IRON,
|
||||
TERRAIN_EDGE_WOOD_RED,
|
||||
TERRAIN_EDGE_ROCK, // Originally TERRAIN_EDGE_GREY
|
||||
TERRAIN_EDGE_ROCK, // Originally TERRAIN_EDGE_YELLOW
|
||||
TERRAIN_EDGE_GREY,
|
||||
TERRAIN_EDGE_YELLOW,
|
||||
TERRAIN_EDGE_WOOD_BLACK,
|
||||
TERRAIN_EDGE_ROCK, // Originally TERRAIN_EDGE_RED
|
||||
TERRAIN_EDGE_RED,
|
||||
TERRAIN_EDGE_ICE,
|
||||
TERRAIN_EDGE_ROCK, // Originally TERRAIN_EDGE_PURPLE
|
||||
TERRAIN_EDGE_ROCK, // Originally TERRAIN_EDGE_GREEN
|
||||
TERRAIN_EDGE_ROCK, // Originally TERRAIN_EDGE_STONE_BROWN
|
||||
TERRAIN_EDGE_ROCK, // Originally TERRAIN_EDGE_STONE_GREY
|
||||
TERRAIN_EDGE_ROCK, // Originally TERRAIN_EDGE_SKYSCRAPER_A
|
||||
TERRAIN_EDGE_ROCK, // Originally TERRAIN_EDGE_SKYSCRAPER_B
|
||||
TERRAIN_EDGE_PURPLE,
|
||||
TERRAIN_EDGE_GREEN,
|
||||
TERRAIN_EDGE_STONE_BROWN,
|
||||
TERRAIN_EDGE_STONE_GREY,
|
||||
TERRAIN_EDGE_SKYSCRAPER_A,
|
||||
TERRAIN_EDGE_SKYSCRAPER_B,
|
||||
TERRAIN_EDGE_ROCK // Unused
|
||||
};
|
||||
Guard::ArgumentInRange<size_t>(terrainEdge, 0, Util::CountOf(map), "Unsupported RCT1 terrain edge.");
|
||||
|
|
|
@ -196,6 +196,21 @@ enum {
|
|||
TERRAIN_EDGE_WOOD_RED,
|
||||
TERRAIN_EDGE_WOOD_BLACK,
|
||||
TERRAIN_EDGE_ICE,
|
||||
|
||||
TERRAIN_EDGE_RCT2_COUNT,
|
||||
|
||||
TERRAIN_EDGE_BRICK = TERRAIN_EDGE_RCT2_COUNT,
|
||||
TERRAIN_EDGE_IRON,
|
||||
TERRAIN_EDGE_GREY,
|
||||
TERRAIN_EDGE_YELLOW,
|
||||
TERRAIN_EDGE_RED,
|
||||
TERRAIN_EDGE_PURPLE,
|
||||
TERRAIN_EDGE_GREEN,
|
||||
TERRAIN_EDGE_STONE_BROWN,
|
||||
TERRAIN_EDGE_STONE_GREY,
|
||||
TERRAIN_EDGE_SKYSCRAPER_A,
|
||||
TERRAIN_EDGE_SKYSCRAPER_B,
|
||||
|
||||
TERRAIN_EDGE_COUNT
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue