mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-29 17:54:50 +01:00
Rename map_element to tile_element
This commit is contained in:
@@ -194,7 +194,7 @@ void screenshot_giant()
|
||||
sint32 centreY = (mapSize / 2) * 32 + 16;
|
||||
|
||||
sint32 x = 0, y = 0;
|
||||
sint32 z = map_element_height(centreX, centreY) & 0xFFFF;
|
||||
sint32 z = tile_element_height(centreX, centreY) & 0xFFFF;
|
||||
switch (rotation) {
|
||||
case 0:
|
||||
x = centreY - centreX;
|
||||
@@ -303,7 +303,7 @@ sint32 cmdline_for_gfxbench(const char **argv, sint32 argc)
|
||||
customY = (mapSize / 2) * 32 + 16;
|
||||
|
||||
sint32 x = 0, y = 0;
|
||||
sint32 z = map_element_height(customX, customY) & 0xFFFF;
|
||||
sint32 z = tile_element_height(customX, customY) & 0xFFFF;
|
||||
x = customY - customX;
|
||||
y = ((customX + customY) / 2) - z;
|
||||
|
||||
@@ -427,7 +427,7 @@ sint32 cmdline_for_screenshot(const char **argv, sint32 argc)
|
||||
customY = (mapSize / 2) * 32 + 16;
|
||||
|
||||
sint32 x = 0, y = 0;
|
||||
sint32 z = map_element_height(customX, customY) & 0xFFFF;
|
||||
sint32 z = tile_element_height(customX, customY) & 0xFFFF;
|
||||
switch (customRotation) {
|
||||
case 0:
|
||||
x = customY - customX;
|
||||
|
||||
@@ -818,7 +818,7 @@ static sint32 cc_get(const utf8 **argv, sint32 argc)
|
||||
rct_window *w = window_get_main();
|
||||
if (w != NULL) {
|
||||
sint32 interactionType;
|
||||
rct_map_element *mapElement;
|
||||
rct_tile_element *mapElement;
|
||||
LocationXY16 mapCoord = { 0 };
|
||||
get_map_coordinates_from_pos(w->viewport->view_width / 2, w->viewport->view_height / 2, VIEWPORT_INTERACTION_MASK_TERRAIN, &mapCoord.x, &mapCoord.y, &interactionType, &mapElement, NULL);
|
||||
mapCoord.x -= 16;
|
||||
@@ -1025,7 +1025,7 @@ static sint32 cc_set(const utf8 **argv, sint32 argc)
|
||||
if (w != NULL) {
|
||||
sint32 x = (sint16)(int_val[0] * 32 + 16);
|
||||
sint32 y = (sint16)(int_val[1] * 32 + 16);
|
||||
sint32 z = map_element_height(x, y);
|
||||
sint32 z = tile_element_height(x, y);
|
||||
window_set_location(w, x, y, z);
|
||||
viewport_update_position(w);
|
||||
console_execute_silent("get location");
|
||||
@@ -1250,17 +1250,17 @@ static sint32 cc_remove_unused_objects(const utf8 **argv, sint32 argc)
|
||||
|
||||
static sint32 cc_remove_park_fences(const utf8 **argv, sint32 argc)
|
||||
{
|
||||
map_element_iterator it;
|
||||
map_element_iterator_begin(&it);
|
||||
tile_element_iterator it;
|
||||
tile_element_iterator_begin(&it);
|
||||
do
|
||||
{
|
||||
if (map_element_get_type(it.element) == MAP_ELEMENT_TYPE_SURFACE)
|
||||
if (tile_element_get_type(it.element) == TILE_ELEMENT_TYPE_SURFACE)
|
||||
{
|
||||
// Remove all park fence flags
|
||||
it.element->properties.surface.ownership &= 0xF0;
|
||||
}
|
||||
}
|
||||
while (map_element_iterator_next(&it));
|
||||
while (tile_element_iterator_next(&it));
|
||||
|
||||
console_printf("Park fences have been removed.");
|
||||
return 0;
|
||||
@@ -1306,7 +1306,7 @@ static sint32 cc_show_limits(const utf8 ** argv, sint32 argc)
|
||||
}
|
||||
|
||||
console_printf("Sprites: %d/%d", spriteCount, MAX_SPRITES);
|
||||
console_printf("Map Elements: %d/%d", mapElementCount, MAX_MAP_ELEMENTS);
|
||||
console_printf("Map Elements: %d/%d", mapElementCount, MAX_TILE_ELEMENTS);
|
||||
console_printf("Banners: %d/%d", bannerCount, MAX_BANNERS);
|
||||
console_printf("Rides: %d/%d", rideCount, MAX_RIDES);
|
||||
console_printf("Staff: %d/%d", staffCount, STAFF_MAX_COUNT);
|
||||
|
||||
@@ -44,7 +44,7 @@ uint8 gShowConstuctionRightsRefCount;
|
||||
rct_viewport g_viewport_list[MAX_VIEWPORT_COUNT];
|
||||
rct_viewport *g_music_tracking_viewport;
|
||||
|
||||
static rct_map_element *_interaction_element = NULL;
|
||||
static rct_tile_element *_interaction_element = NULL;
|
||||
|
||||
sint16 gSavedViewX;
|
||||
sint16 gSavedViewY;
|
||||
@@ -229,7 +229,7 @@ void viewport_adjust_for_map_height(sint16* x, sint16* y, sint16 *z)
|
||||
LocationXY16 pos;
|
||||
for (sint32 i = 0; i < 6; i++) {
|
||||
pos = viewport_coord_to_map_coord(start_x, start_y, height);
|
||||
height = map_element_height((0xFFFF) & pos.x, (0xFFFF) & pos.y);
|
||||
height = tile_element_height((0xFFFF) & pos.x, (0xFFFF) & pos.y);
|
||||
|
||||
// HACK: This is to prevent the x and y values being set to values outside
|
||||
// of the map. This can happen when the height is larger than the map size.
|
||||
@@ -555,7 +555,7 @@ void viewport_update_position(rct_window *window)
|
||||
if (at_map_edge_x || at_map_edge_y) {
|
||||
// The &0xFFFF is to prevent the sign extension messing the
|
||||
// function up.
|
||||
sint32 zz = map_element_height(x & 0xFFFF, y & 0xFFFF);
|
||||
sint32 zz = tile_element_height(x & 0xFFFF, y & 0xFFFF);
|
||||
sint32 _2d_x, _2d_y;
|
||||
centre_2d_coordinates(x, y, zz, &_2d_x, &_2d_y, viewport);
|
||||
|
||||
@@ -605,7 +605,7 @@ void viewport_update_sprite_follow(rct_window *window)
|
||||
if (window->viewport_target_sprite != SPRITE_INDEX_NULL && window->viewport) {
|
||||
rct_sprite* sprite = get_sprite(window->viewport_target_sprite);
|
||||
|
||||
sint32 height = (map_element_height(0xFFFF & sprite->unknown.x, 0xFFFF & sprite->unknown.y) & 0xFFFF) - 16;
|
||||
sint32 height = (tile_element_height(0xFFFF & sprite->unknown.x, 0xFFFF & sprite->unknown.y) & 0xFFFF) - 16;
|
||||
sint32 underground = sprite->unknown.z < height;
|
||||
|
||||
viewport_set_underground_flag(underground, window, window->viewport);
|
||||
@@ -1347,14 +1347,14 @@ static void sub_68862C(rct_drawpixelinfo * dpi, paint_struct * ps)
|
||||
* mapElement: edx
|
||||
* viewport: edi
|
||||
*/
|
||||
void get_map_coordinates_from_pos(sint32 screenX, sint32 screenY, sint32 flags, sint16 *x, sint16 *y, sint32 *interactionType, rct_map_element **mapElement, rct_viewport **viewport)
|
||||
void get_map_coordinates_from_pos(sint32 screenX, sint32 screenY, sint32 flags, sint16 *x, sint16 *y, sint32 *interactionType, rct_tile_element **mapElement, rct_viewport **viewport)
|
||||
{
|
||||
rct_window* window = window_find_from_point(screenX, screenY);
|
||||
get_map_coordinates_from_pos_window(window, screenX, screenY, flags, x, y, interactionType, mapElement, viewport);
|
||||
}
|
||||
|
||||
void get_map_coordinates_from_pos_window(rct_window * window, sint32 screenX, sint32 screenY, sint32 flags, sint16 * x, sint16 * y,
|
||||
sint32 * interactionType, rct_map_element ** mapElement, rct_viewport ** viewport)
|
||||
sint32 * interactionType, rct_tile_element ** mapElement, rct_viewport ** viewport)
|
||||
{
|
||||
_unk9AC154 = flags & 0xFFFF;
|
||||
_interactionSpriteType = 0;
|
||||
@@ -1471,7 +1471,7 @@ static rct_viewport *viewport_find_from_point(sint32 screenX, sint32 screenY)
|
||||
* Out:
|
||||
* x: ax
|
||||
* y: bx
|
||||
* map_element: edx ?
|
||||
* tile_element: edx ?
|
||||
* viewport: edi
|
||||
*/
|
||||
void screen_get_map_xy(sint32 screenX, sint32 screenY, sint16 *x, sint16 *y, rct_viewport **viewport) {
|
||||
@@ -1488,7 +1488,7 @@ void screen_get_map_xy(sint32 screenX, sint32 screenY, sint16 *x, sint16 *y, rct
|
||||
LocationXY16 map_pos = { my_x + 16, my_y + 16 };
|
||||
|
||||
for (sint32 i = 0; i < 5; i++) {
|
||||
sint32 z = map_element_height(map_pos.x, map_pos.y);
|
||||
sint32 z = tile_element_height(map_pos.x, map_pos.y);
|
||||
map_pos = viewport_coord_to_map_coord(start_vp_pos.x, start_vp_pos.y, z);
|
||||
map_pos.x = clamp(my_x, map_pos.x, my_x + 31);
|
||||
map_pos.y = clamp(my_y, map_pos.y, my_y + 31);
|
||||
|
||||
@@ -80,7 +80,7 @@ typedef struct viewport_interaction_info {
|
||||
sint32 x;
|
||||
sint32 y;
|
||||
union {
|
||||
rct_map_element *mapElement;
|
||||
rct_tile_element *mapElement;
|
||||
rct_sprite *sprite;
|
||||
rct_peep *peep;
|
||||
rct_vehicle *vehicle;
|
||||
@@ -142,9 +142,9 @@ void show_construction_rights();
|
||||
void hide_construction_rights();
|
||||
void viewport_set_visibility(uint8 mode);
|
||||
|
||||
void get_map_coordinates_from_pos(sint32 screenX, sint32 screenY, sint32 flags, sint16 *x, sint16 *y, sint32 *interactionType, rct_map_element **mapElement, rct_viewport **viewport);
|
||||
void get_map_coordinates_from_pos(sint32 screenX, sint32 screenY, sint32 flags, sint16 *x, sint16 *y, sint32 *interactionType, rct_tile_element **mapElement, rct_viewport **viewport);
|
||||
void get_map_coordinates_from_pos_window(rct_window * window, sint32 screenX, sint32 screenY, sint32 flags, sint16 * x, sint16 * y,
|
||||
sint32 * interactionType, rct_map_element ** mapElement, rct_viewport ** viewport);
|
||||
sint32 * interactionType, rct_tile_element ** mapElement, rct_viewport ** viewport);
|
||||
|
||||
sint32 viewport_interaction_get_item_left(sint32 x, sint32 y, viewport_interaction_info *info);
|
||||
sint32 viewport_interaction_left_over(sint32 x, sint32 y);
|
||||
@@ -152,9 +152,9 @@ sint32 viewport_interaction_left_click(sint32 x, sint32 y);
|
||||
sint32 viewport_interaction_get_item_right(sint32 x, sint32 y, viewport_interaction_info *info);
|
||||
sint32 viewport_interaction_right_over(sint32 x, sint32 y);
|
||||
sint32 viewport_interaction_right_click(sint32 x, sint32 y);
|
||||
void sub_68A15E(sint32 screenX, sint32 screenY, sint16 *x, sint16 *y, sint32 *direction, rct_map_element **mapElement);
|
||||
void sub_68A15E(sint32 screenX, sint32 screenY, sint16 *x, sint16 *y, sint32 *direction, rct_tile_element **mapElement);
|
||||
|
||||
void viewport_interaction_remove_park_entrance(rct_map_element *mapElement, sint32 x, sint32 y);
|
||||
void viewport_interaction_remove_park_entrance(rct_tile_element *mapElement, sint32 x, sint32 y);
|
||||
|
||||
void sub_68B2B7(paint_session * session, sint32 x, sint32 y);
|
||||
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
#include "viewport.h"
|
||||
#include "../Context.h"
|
||||
|
||||
static void viewport_interaction_remove_scenery(rct_map_element *mapElement, sint32 x, sint32 y);
|
||||
static void viewport_interaction_remove_footpath(rct_map_element *mapElement, sint32 x, sint32 y);
|
||||
static void viewport_interaction_remove_footpath_item(rct_map_element *mapElement, sint32 x, sint32 y);
|
||||
static void viewport_interaction_remove_park_wall(rct_map_element *mapElement, sint32 x, sint32 y);
|
||||
static void viewport_interaction_remove_large_scenery(rct_map_element *mapElement, sint32 x, sint32 y);
|
||||
static void viewport_interaction_remove_scenery(rct_tile_element *mapElement, sint32 x, sint32 y);
|
||||
static void viewport_interaction_remove_footpath(rct_tile_element *mapElement, sint32 x, sint32 y);
|
||||
static void viewport_interaction_remove_footpath_item(rct_tile_element *mapElement, sint32 x, sint32 y);
|
||||
static void viewport_interaction_remove_park_wall(rct_tile_element *mapElement, sint32 x, sint32 y);
|
||||
static void viewport_interaction_remove_large_scenery(rct_tile_element *mapElement, sint32 x, sint32 y);
|
||||
static rct_peep *viewport_interaction_get_closest_peep(sint32 x, sint32 y, sint32 maxDistance);
|
||||
|
||||
/**
|
||||
@@ -46,7 +46,7 @@ static rct_peep *viewport_interaction_get_closest_peep(sint32 x, sint32 y, sint3
|
||||
*/
|
||||
sint32 viewport_interaction_get_item_left(sint32 x, sint32 y, viewport_interaction_info *info)
|
||||
{
|
||||
rct_map_element *mapElement;
|
||||
rct_tile_element *mapElement;
|
||||
rct_sprite *sprite;
|
||||
rct_vehicle *vehicle;
|
||||
|
||||
@@ -170,7 +170,7 @@ sint32 viewport_interaction_left_click(sint32 x, sint32 y)
|
||||
*/
|
||||
sint32 viewport_interaction_get_item_right(sint32 x, sint32 y, viewport_interaction_info *info)
|
||||
{
|
||||
rct_map_element *mapElement;
|
||||
rct_tile_element *mapElement;
|
||||
rct_scenery_entry *sceneryEntry;
|
||||
rct_banner *banner;
|
||||
Ride *ride;
|
||||
@@ -207,7 +207,7 @@ sint32 viewport_interaction_get_item_right(sint32 x, sint32 y, viewport_interact
|
||||
case VIEWPORT_INTERACTION_ITEM_RIDE:
|
||||
if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR)
|
||||
return info->type = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
if (map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_PATH)
|
||||
if (tile_element_get_type(mapElement) == TILE_ELEMENT_TYPE_PATH)
|
||||
return info->type = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
|
||||
ride = get_ride(mapElement->properties.track.ride_index);
|
||||
@@ -216,7 +216,7 @@ sint32 viewport_interaction_get_item_right(sint32 x, sint32 y, viewport_interact
|
||||
|
||||
set_map_tooltip_format_arg(0, rct_string_id, STR_MAP_TOOLTIP_STRINGID_CLICK_TO_MODIFY);
|
||||
|
||||
if (map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_ENTRANCE) {
|
||||
if (tile_element_get_type(mapElement) == TILE_ELEMENT_TYPE_ENTRANCE) {
|
||||
rct_string_id stringId;
|
||||
if (mapElement->properties.track.type == ENTRANCE_TYPE_RIDE_ENTRANCE) {
|
||||
if (ride->num_stations > 1) {
|
||||
@@ -254,7 +254,7 @@ sint32 viewport_interaction_get_item_right(sint32 x, sint32 y, viewport_interact
|
||||
set_map_tooltip_format_arg(6, uint32, ride->name_arguments);
|
||||
set_map_tooltip_format_arg(10, rct_string_id, RideComponentNames[RideNameConvention[ride->type].station].capitalised);
|
||||
|
||||
stationIndex = map_element_get_station(mapElement);
|
||||
stationIndex = tile_element_get_station(mapElement);
|
||||
for (i = stationIndex; i >= 0; i--)
|
||||
if (ride->station_starts[i].xy == RCT_XY8_UNDEFINED)
|
||||
stationIndex--;
|
||||
@@ -312,7 +312,7 @@ sint32 viewport_interaction_get_item_right(sint32 x, sint32 y, viewport_interact
|
||||
case VIEWPORT_INTERACTION_ITEM_FOOTPATH_ITEM:
|
||||
sceneryEntry = get_footpath_item_entry(footpath_element_get_path_scenery_index(mapElement));
|
||||
set_map_tooltip_format_arg(0, rct_string_id, STR_MAP_TOOLTIP_STRINGID_CLICK_TO_REMOVE);
|
||||
if (mapElement->flags & MAP_ELEMENT_FLAG_BROKEN) {
|
||||
if (mapElement->flags & TILE_ELEMENT_FLAG_BROKEN) {
|
||||
set_map_tooltip_format_arg(2, rct_string_id, STR_BROKEN);
|
||||
set_map_tooltip_format_arg(4, rct_string_id, sceneryEntry->name);
|
||||
} else {
|
||||
@@ -324,7 +324,7 @@ sint32 viewport_interaction_get_item_right(sint32 x, sint32 y, viewport_interact
|
||||
if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode)
|
||||
break;
|
||||
|
||||
if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_ENTRANCE)
|
||||
if (tile_element_get_type(mapElement) != TILE_ELEMENT_TYPE_ENTRANCE)
|
||||
break;
|
||||
|
||||
set_map_tooltip_format_arg(0, rct_string_id, STR_MAP_TOOLTIP_STRINGID_CLICK_TO_REMOVE);
|
||||
@@ -407,7 +407,7 @@ sint32 viewport_interaction_right_click(sint32 x, sint32 y)
|
||||
*
|
||||
* rct2: 0x006E08D2
|
||||
*/
|
||||
static void viewport_interaction_remove_scenery(rct_map_element *mapElement, sint32 x, sint32 y)
|
||||
static void viewport_interaction_remove_scenery(rct_tile_element *mapElement, sint32 x, sint32 y)
|
||||
{
|
||||
gGameCommandErrorTitle = STR_CANT_REMOVE_THIS;
|
||||
game_do_command(
|
||||
@@ -425,11 +425,11 @@ static void viewport_interaction_remove_scenery(rct_map_element *mapElement, sin
|
||||
*
|
||||
* rct2: 0x006A614A
|
||||
*/
|
||||
static void viewport_interaction_remove_footpath(rct_map_element *mapElement, sint32 x, sint32 y)
|
||||
static void viewport_interaction_remove_footpath(rct_tile_element *mapElement, sint32 x, sint32 y)
|
||||
{
|
||||
sint32 z;
|
||||
rct_window *w;
|
||||
rct_map_element *mapElement2;
|
||||
rct_tile_element *mapElement2;
|
||||
|
||||
z = mapElement->base_height;
|
||||
|
||||
@@ -439,19 +439,19 @@ static void viewport_interaction_remove_footpath(rct_map_element *mapElement, si
|
||||
|
||||
mapElement2 = map_get_first_element_at(x / 32, y / 32);
|
||||
do {
|
||||
if (map_element_get_type(mapElement2) == MAP_ELEMENT_TYPE_PATH && mapElement2->base_height == z) {
|
||||
if (tile_element_get_type(mapElement2) == TILE_ELEMENT_TYPE_PATH && mapElement2->base_height == z) {
|
||||
gGameCommandErrorTitle = STR_CANT_REMOVE_FOOTPATH_FROM_HERE;
|
||||
footpath_remove(x, y, z, 1);
|
||||
break;
|
||||
}
|
||||
} while (!map_element_is_last_for_tile(mapElement2++));
|
||||
} while (!tile_element_is_last_for_tile(mapElement2++));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006A61AB
|
||||
*/
|
||||
static void viewport_interaction_remove_footpath_item(rct_map_element *mapElement, sint32 x, sint32 y)
|
||||
static void viewport_interaction_remove_footpath_item(rct_tile_element *mapElement, sint32 x, sint32 y)
|
||||
{
|
||||
sint32 type;
|
||||
|
||||
@@ -475,9 +475,9 @@ static void viewport_interaction_remove_footpath_item(rct_map_element *mapElemen
|
||||
*
|
||||
* rct2: 0x00666C0E
|
||||
*/
|
||||
void viewport_interaction_remove_park_entrance(rct_map_element *mapElement, sint32 x, sint32 y)
|
||||
void viewport_interaction_remove_park_entrance(rct_tile_element *mapElement, sint32 x, sint32 y)
|
||||
{
|
||||
sint32 rotation = map_element_get_direction_with_offset(mapElement, 1);
|
||||
sint32 rotation = tile_element_get_direction_with_offset(mapElement, 1);
|
||||
switch (mapElement->properties.entrance.index & 0x0F) {
|
||||
case 1:
|
||||
x += TileDirectionDelta[rotation].x;
|
||||
@@ -496,7 +496,7 @@ void viewport_interaction_remove_park_entrance(rct_map_element *mapElement, sint
|
||||
*
|
||||
* rct2: 0x006E57A9
|
||||
*/
|
||||
static void viewport_interaction_remove_park_wall(rct_map_element *mapElement, sint32 x, sint32 y)
|
||||
static void viewport_interaction_remove_park_wall(rct_tile_element *mapElement, sint32 x, sint32 y)
|
||||
{
|
||||
rct_scenery_entry *sceneryEntry = get_wall_entry(mapElement->properties.wall.type);
|
||||
if (sceneryEntry->wall.scrolling_mode != 0xFF){
|
||||
@@ -507,7 +507,7 @@ static void viewport_interaction_remove_park_wall(rct_map_element *mapElement, s
|
||||
x,
|
||||
GAME_COMMAND_FLAG_APPLY,
|
||||
y,
|
||||
map_element_get_direction(mapElement) | (mapElement->base_height << 8),
|
||||
tile_element_get_direction(mapElement) | (mapElement->base_height << 8),
|
||||
GAME_COMMAND_REMOVE_WALL,
|
||||
0,
|
||||
0
|
||||
@@ -519,9 +519,9 @@ static void viewport_interaction_remove_park_wall(rct_map_element *mapElement, s
|
||||
*
|
||||
* rct2: 0x006B88DC
|
||||
*/
|
||||
static void viewport_interaction_remove_large_scenery(rct_map_element *mapElement, sint32 x, sint32 y)
|
||||
static void viewport_interaction_remove_large_scenery(rct_tile_element *mapElement, sint32 x, sint32 y)
|
||||
{
|
||||
rct_scenery_entry *sceneryEntry = get_large_scenery_entry(mapElement->properties.scenerymultiple.type & MAP_ELEMENT_LARGE_TYPE_MASK);
|
||||
rct_scenery_entry *sceneryEntry = get_large_scenery_entry(mapElement->properties.scenerymultiple.type & TILE_ELEMENT_LARGE_TYPE_MASK);
|
||||
|
||||
if (sceneryEntry->large_scenery.scrolling_mode != 0xFF){
|
||||
sint32 id = (mapElement->type & 0xC0) |
|
||||
@@ -532,7 +532,7 @@ static void viewport_interaction_remove_large_scenery(rct_map_element *mapElemen
|
||||
gGameCommandErrorTitle = STR_CANT_REMOVE_THIS;
|
||||
game_do_command(
|
||||
x,
|
||||
1 | (map_element_get_direction(mapElement) << 8),
|
||||
1 | (tile_element_get_direction(mapElement) << 8),
|
||||
y,
|
||||
mapElement->base_height | ((mapElement->properties.scenerymultiple.type >> 10) << 8),
|
||||
GAME_COMMAND_REMOVE_LARGE_SCENERY,
|
||||
@@ -586,11 +586,11 @@ static rct_peep *viewport_interaction_get_closest_peep(sint32 x, sint32 y, sint3
|
||||
*
|
||||
* rct2: 0x0068A15E
|
||||
*/
|
||||
void sub_68A15E(sint32 screenX, sint32 screenY, sint16 *x, sint16 *y, sint32 *direction, rct_map_element **mapElement)
|
||||
void sub_68A15E(sint32 screenX, sint32 screenY, sint16 *x, sint16 *y, sint32 *direction, rct_tile_element **mapElement)
|
||||
{
|
||||
sint16 my_x, my_y;
|
||||
sint32 interactionType;
|
||||
rct_map_element *myMapElement;
|
||||
rct_tile_element *myMapElement;
|
||||
rct_viewport *viewport;
|
||||
get_map_coordinates_from_pos(screenX, screenY, VIEWPORT_INTERACTION_MASK_TERRAIN & VIEWPORT_INTERACTION_MASK_WATER, &my_x, &my_y, &interactionType, &myMapElement, &viewport);
|
||||
|
||||
@@ -610,7 +610,7 @@ void sub_68A15E(sint32 screenX, sint32 screenY, sint16 *x, sint16 *y, sint32 *di
|
||||
for (sint32 i = 0; i < 5; i++) {
|
||||
sint16 z = originalZ;
|
||||
if (interactionType != VIEWPORT_INTERACTION_ITEM_WATER) {
|
||||
z = map_element_height(map_pos.x, map_pos.y);
|
||||
z = tile_element_height(map_pos.x, map_pos.y);
|
||||
}
|
||||
map_pos = viewport_coord_to_map_coord(start_vp_pos.x, start_vp_pos.y, z);
|
||||
map_pos.x = clamp(my_x, map_pos.x, my_x + 31);
|
||||
|
||||
@@ -1347,7 +1347,7 @@ void window_scroll_to_location(rct_window *w, sint32 x, sint32 y, sint32 z)
|
||||
|
||||
assert(w != NULL);
|
||||
if (w->viewport) {
|
||||
sint16 height = map_element_height(x, y);
|
||||
sint16 height = tile_element_height(x, y);
|
||||
if (z < height - 16) {
|
||||
if (!(w->viewport->flags & 1 << 0)) {
|
||||
w->viewport->flags |= 1 << 0;
|
||||
@@ -1445,7 +1445,7 @@ void window_rotate_camera(rct_window *w, sint32 direction)
|
||||
viewport_adjust_for_map_height(&x, &y, &z);
|
||||
}
|
||||
else {
|
||||
z = map_element_height(x, y);
|
||||
z = tile_element_height(x, y);
|
||||
}
|
||||
|
||||
gCurrentRotation = (get_current_rotation() + direction) & 3;
|
||||
@@ -1474,7 +1474,7 @@ void window_viewport_get_map_coords_by_cursor(rct_window *w, sint16 *map_x, sint
|
||||
get_map_coordinates_from_pos(mouse_x, mouse_y, VIEWPORT_INTERACTION_MASK_NONE, map_x, map_y, NULL, NULL, NULL);
|
||||
|
||||
// Get viewport coordinates centring around the tile.
|
||||
sint32 base_height = map_element_height(*map_x, *map_y);
|
||||
sint32 base_height = tile_element_height(*map_x, *map_y);
|
||||
sint32 dest_x, dest_y;
|
||||
centre_2d_coordinates(*map_x, *map_y, base_height, &dest_x, &dest_y, w->viewport);
|
||||
|
||||
@@ -1491,7 +1491,7 @@ void window_viewport_centre_tile_around_cursor(rct_window *w, sint16 map_x, sint
|
||||
{
|
||||
// Get viewport coordinates centring around the tile.
|
||||
sint32 dest_x, dest_y;
|
||||
sint32 base_height = map_element_height(map_x, map_y);
|
||||
sint32 base_height = tile_element_height(map_x, map_y);
|
||||
centre_2d_coordinates(map_x, map_y, base_height, &dest_x, &dest_y, w->viewport);
|
||||
|
||||
// Get mouse position to offset against.
|
||||
|
||||
@@ -719,7 +719,7 @@ void window_game_bottom_toolbar_invalidate_news_item();
|
||||
void window_track_list_open(ride_list_item item);
|
||||
rct_window *window_ride_main_open(sint32 rideIndex);
|
||||
rct_window *window_ride_open_station(sint32 rideIndex, sint32 stationIndex);
|
||||
rct_window *window_ride_open_track(rct_map_element *mapElement);
|
||||
rct_window *window_ride_open_track(rct_tile_element *mapElement);
|
||||
rct_window *window_ride_open_vehicle(rct_vehicle *vehicle);
|
||||
void window_ride_construct(rct_window *w);
|
||||
rct_window *window_ride_construction_open();
|
||||
|
||||
Reference in New Issue
Block a user