From 4473fcb275a2e72f45a1d6baa2fd308af3afb08a Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Thu, 15 Sep 2016 19:39:57 +0100 Subject: [PATCH] Integrate remaining address in entrance.c --- src/paint/map_element/entrance.c | 6 +----- src/world/footpath.c | 2 +- src/world/footpath.h | 1 + 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/paint/map_element/entrance.c b/src/paint/map_element/entrance.c index b4986ccd25..eda3d7144f 100644 --- a/src/paint/map_element/entrance.c +++ b/src/paint/map_element/entrance.c @@ -14,7 +14,6 @@ *****************************************************************************/ #pragma endregion -#include "../../addresses.h" #include "../../config.h" #include "../../game.h" #include "../../interface/viewport.h" @@ -252,11 +251,8 @@ void entrance_paint(uint8 direction, int height, rct_map_element* map_element){ if (gCurrentViewportFlags & VIEWPORT_FLAG_PATH_HEIGHTS && dpi->zoom_level == 0){ - uint32 ebx = - (map_element->properties.entrance.type << 4) | - (map_element->properties.entrance.index & 0xF); - if (RCT2_ADDRESS(0x0097B974, uint8)[ebx] & 0xF){ + if (entrance_get_directions(map_element) & 0xF){ int z = map_element->base_height * 8 + 3; uint32 image_id = 0x20101689 + get_height_marker_offset() + (z / 16); diff --git a/src/world/footpath.c b/src/world/footpath.c index 1418b4d767..80126a3ad3 100644 --- a/src/world/footpath.c +++ b/src/world/footpath.c @@ -82,7 +82,7 @@ static const uint8 connected_path_count[] = { 4, // 0b1111 }; -static int entrance_get_directions(rct_map_element *mapElement) +int entrance_get_directions(rct_map_element *mapElement) { uint8 entranceType = mapElement->properties.entrance.type; uint8 sequence = mapElement->properties.entrance.index & 0x0F; diff --git a/src/world/footpath.h b/src/world/footpath.h index 37fdb13c26..0ce54be54c 100644 --- a/src/world/footpath.h +++ b/src/world/footpath.h @@ -97,6 +97,7 @@ uint8 footpath_element_get_path_scenery_index(rct_map_element *mapElement); bool footpath_element_path_scenery_is_ghost(rct_map_element *mapElement); void footpath_scenery_set_is_ghost(rct_map_element *mapElement, bool isGhost); void footpath_remove_edges_at(int x, int y, rct_map_element *mapElement); +int entrance_get_directions(rct_map_element *mapElement); rct_footpath_entry *get_footpath_entry(int entryIndex);