1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 19:43:06 +01:00

Clean up some residual usages of old config (#3484)

This commit is contained in:
Michael Steenbeek
2016-05-03 23:36:29 +02:00
committed by Ted John
parent 13701660c9
commit 142c54852d
9 changed files with 32 additions and 32 deletions

View File

@@ -1054,7 +1054,7 @@ void viewport_surface_paint_setup(uint8 direction, uint16 height, rct_map_elemen
dx += 3;
int image_id = (SPR_HEIGHT_MARKER_BASE + dx / 16) | 0x20780000;
image_id += RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, uint16);
image_id += get_height_marker_offset();
image_id -= RCT2_GLOBAL(0x01359208, uint16);
sub_98196C(image_id, 16, 16, 1, 1, 0, height, get_current_rotation());
@@ -1312,7 +1312,7 @@ void viewport_surface_paint_setup(uint8 direction, uint16 height, rct_map_elemen
&& has_surface
&& !(gCurrentViewportFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE)
&& !(gCurrentViewportFlags & VIEWPORT_FLAG_HIDE_BASE)
&& !(RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) & CONFIG_FLAG_DISABLE_SMOOTH_LANDSCAPE)) {
&& gConfigGeneral.landscape_smoothing) {
viewport_surface_smoothen_edge(EDGE_TOPLEFT, tileDescriptors[0], tileDescriptors[3]);
viewport_surface_smoothen_edge(EDGE_TOPRIGHT, tileDescriptors[0], tileDescriptors[4]);
viewport_surface_smoothen_edge(EDGE_BOTTOMLEFT, tileDescriptors[0], tileDescriptors[1]);

View File

@@ -1813,7 +1813,7 @@ void viewport_track_paint_setup(uint8 direction, int height, rct_map_element *ma
if (RCT2_ADDRESS(0x00999694, uint32)[trackType] & (1 << trackSequence)) {
uint16 ax = RideData5[ride->type].z_offset;
uint32 ebx = 0x20381689 + (height + 8) / 16;
ebx += RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, uint16);
ebx += get_height_marker_offset();
ebx -= RCT2_GLOBAL(0x01359208, uint16);
sub_98197C(ebx, 16, 16, 1, 1, 0, height + ax + 3, 1000, 1000, 2047, get_current_rotation());
}
@@ -1909,7 +1909,7 @@ void viewport_entrance_paint_setup(uint8 direction, int height, rct_map_element*
int z = map_element->base_height * 8 + 3;
uint32 image_id =
z / 16 +
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS,sint16) +
get_height_marker_offset() +
0x20101689;
image_id -= RCT2_GLOBAL(0x01359208, sint16);
@@ -3505,3 +3505,17 @@ uint8 get_current_rotation()
#endif // DEBUG_LEVEL_1
return rotation_masked;
}
sint16 get_height_marker_offset()
{
// Height labels in units
if (gConfigGeneral.show_height_as_units)
return 0;
// Height labels in feet
if (gConfigGeneral.measurement_format == MEASUREMENT_FORMAT_IMPERIAL)
return 1 * 256;
// Height labels in metres
return 2 * 256;
}

View File

@@ -193,5 +193,6 @@ void screen_get_map_xy_side(sint16 screenX, sint16 screenY, sint16 *mapX, sint16
void screen_get_map_xy_side_with_z(sint16 screenX, sint16 screenY, sint16 z, sint16 *mapX, sint16 *mapY, uint8 *side);
uint8 get_current_rotation();
sint16 get_height_marker_offset();
#endif