mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 05:23:04 +01:00
implement footpath remove and create, bugs exist
This commit is contained in:
@@ -875,9 +875,9 @@ static uint32 game_do_command_table[58] = {
|
||||
0x006E0E01,
|
||||
0x006E08F4,
|
||||
0x006E650F,
|
||||
0x006A61DE,
|
||||
0,
|
||||
0x006A68AE,
|
||||
0x006A67C0,
|
||||
0,
|
||||
0, // use new_game_command_table, original: 0x00663CCD, // 20
|
||||
0x006B53E9,
|
||||
0x00698D6C, // text input
|
||||
@@ -938,9 +938,9 @@ static GAME_COMMAND_POINTER* new_game_command_table[58] = {
|
||||
game_command_emptysub,
|
||||
game_command_emptysub,
|
||||
game_command_emptysub,
|
||||
game_command_place_footpath,
|
||||
game_command_emptysub,
|
||||
game_command_emptysub,
|
||||
game_command_emptysub,
|
||||
game_command_remove_footpath,
|
||||
game_command_change_surface_style, // 20
|
||||
game_command_emptysub,
|
||||
game_command_emptysub,
|
||||
|
||||
@@ -703,7 +703,7 @@ static void window_footpath_place_path_at_point(int x, int y)
|
||||
|
||||
// Try and place path
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, uint16) = STR_CANT_BUILD_FOOTPATH_HERE;
|
||||
cost = footpath_place(selectedType, x, y, z, presentType, (1 << 0));
|
||||
cost = footpath_place(selectedType, x, y, z, presentType, GAME_COMMAND_FLAG_APPLY);
|
||||
|
||||
if (cost == MONEY32_UNDEFINED) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PATH_ERROR_OCCURED, uint8) = 1;
|
||||
|
||||
@@ -20,9 +20,358 @@
|
||||
|
||||
#include "../addresses.h"
|
||||
#include "../game.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "footpath.h"
|
||||
#include "map.h"
|
||||
|
||||
enum {
|
||||
FOOTPATH_CONSTRUCTION_FLAG_ALLOW_DURING_PAUSED = 1 << 3
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006A65AD
|
||||
*/
|
||||
static void automatically_set_peep_spawn(int x, int y, int z)
|
||||
{
|
||||
rct2_peep_spawn *peepSpawn = (rct2_peep_spawn*)RCT2_ADDRESS_PEEP_SPAWNS;
|
||||
int direction = 0;
|
||||
if (x != 32) {
|
||||
direction++;
|
||||
if (y != RCT2_GLOBAL(0x001358830, uint16) - 32) {
|
||||
direction++;
|
||||
if (x != RCT2_GLOBAL(0x001358830, uint16) - 32) {
|
||||
direction++;
|
||||
if (y != 32)
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
peepSpawn->x = (RCT2_GLOBAL(0x00981D6C + (direction * 4), uint16) * 15) + 16;
|
||||
peepSpawn->y = (RCT2_GLOBAL(0x00981D6E + (direction * 4), uint16) * 15) + 16;
|
||||
peepSpawn->direction = direction;
|
||||
peepSpawn->z = z / 2;
|
||||
}
|
||||
|
||||
rct_map_element *map_get_footpath_element(int x, int y, int z)
|
||||
{
|
||||
rct_map_element *mapElement;
|
||||
|
||||
mapElement = TILE_MAP_ELEMENT_POINTER(y * 256 + x);
|
||||
do {
|
||||
if ((mapElement->type & MAP_ELEMENT_TYPE_MASK) == MAP_ELEMENT_TYPE_PATH && mapElement->base_height == z)
|
||||
return mapElement;
|
||||
} while (!((mapElement++)->flags & MAP_ELEMENT_FLAG_LAST_TILE));
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
rct_map_element *map_get_footpath_element_slope(int x, int y, int z, int slope)
|
||||
{
|
||||
rct_map_element *mapElement;
|
||||
|
||||
mapElement = TILE_MAP_ELEMENT_POINTER(y * 256 + x);
|
||||
do {
|
||||
if (
|
||||
(mapElement->type & MAP_ELEMENT_TYPE_MASK) == MAP_ELEMENT_TYPE_PATH &&
|
||||
mapElement->base_height == z &&
|
||||
(mapElement->properties.path.type & 7) == slope
|
||||
) {
|
||||
return mapElement;
|
||||
}
|
||||
} while (!((mapElement++)->flags & MAP_ELEMENT_FLAG_LAST_TILE));
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static money32 footpath_element_insert(int type, int x, int y, int z, int slope, int flags)
|
||||
{
|
||||
rct_map_element *mapElement;
|
||||
int bl, zHigh;
|
||||
|
||||
if (!sub_68B044())
|
||||
return MONEY32_UNDEFINED;
|
||||
|
||||
if ((flags & GAME_COMMAND_FLAG_APPLY) && !(flags & ((1 << 3) | (1 << 6))))
|
||||
RCT2_CALLPROC_X(0x00673883, x, 0, y, RCT2_GLOBAL(0x009DEA62, uint16), 0, 0, 0);
|
||||
|
||||
// loc_6A649D:
|
||||
RCT2_GLOBAL(0x00F3EFD9, money32) += MONEY(12, 00);
|
||||
|
||||
bl = 15;
|
||||
zHigh = z + 4;
|
||||
if (slope & 4) {
|
||||
bl = RCT2_ADDRESS(0x0098D7EC, uint8)[slope & 3];
|
||||
zHigh += 2;
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(0x00F3EF84, uint16) = x;
|
||||
RCT2_GLOBAL(0x00F3EF86, uint16) = y;
|
||||
|
||||
// Ugh, hack until 0x006A6733 is written
|
||||
RCT2_GLOBAL(0x00F3EF7C, uint32) = (uint32)(&flags - 8);
|
||||
|
||||
if (!map_can_construct_with_clear_at(x, y, z, zHigh, (void*)0x006A6733, bl))
|
||||
return MONEY32_UNDEFINED;
|
||||
|
||||
RCT2_GLOBAL(0x00F3EFA4, uint8) = RCT2_GLOBAL(0x00F1AD60, uint8);
|
||||
if (RCT2_GLOBAL(0x00F1AD60, uint8) & 4) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CANT_BUILD_THIS_UNDERWATER;
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
mapElement = map_get_surface_element_at((x / 32), (y / 32));
|
||||
|
||||
int supportHeight = z - mapElement->base_height;
|
||||
RCT2_GLOBAL(0x00F3EFD9, money32) += supportHeight < 0 ? MONEY(20, 00) : (supportHeight / 2) * MONEY(5, 00);
|
||||
|
||||
if (flags & GAME_COMMAND_FLAG_APPLY) {
|
||||
mapElement = map_element_insert(x / 32, y / 32, z, 0x0F);
|
||||
mapElement->type = MAP_ELEMENT_TYPE_PATH;
|
||||
mapElement->clearance_height = z + 4 + (slope & 4 ? 2 : 0);
|
||||
mapElement->properties.path.type = (type << 4) | (slope & 7);
|
||||
mapElement->type |= type >> 7;
|
||||
mapElement->properties.path.additions = RCT2_GLOBAL(0x00F3EF88, uint8);
|
||||
mapElement->properties.path.addition_status = 255;
|
||||
mapElement->flags &= ~MAP_ELEMENT_FLAG_BROKEN;
|
||||
if (flags & (1 << 6))
|
||||
mapElement->flags |= 1 << 4;
|
||||
|
||||
RCT2_GLOBAL(0x00F3EFF4, uint32) = 0x00F3EFF8;
|
||||
|
||||
if (!(flags & (1 << 7)))
|
||||
sub_6A6AA7(x, y, mapElement);
|
||||
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !(flags & (1 << 6)))
|
||||
automatically_set_peep_spawn(x, y, mapElement->base_height / 2);
|
||||
|
||||
if (!(mapElement->properties.path.type & 4) && !(flags & (1 << 6))) {
|
||||
int ttt = mapElement->properties.path.type;
|
||||
z = mapElement->base_height;
|
||||
RCT2_CALLPROC_X(0x006E5935, x, (ttt & 3) ^ 2, y, ((z + 6) << 8) | z, 0, 0, 0);
|
||||
RCT2_CALLPROC_X(0x006E5935, x, (ttt & 3), y, ((z + 6) << 8) | z, 0, 0, 0);
|
||||
mapElement = map_get_footpath_element(x / 32, y / 32, z);
|
||||
}
|
||||
|
||||
if (!(flags & (1 << 7)))
|
||||
RCT2_CALLPROC_X(0x006A6C66, x, flags, y, 0, (int)mapElement, 0, 0);
|
||||
|
||||
RCT2_CALLPROC_EBPSAFE(0x006A759F);
|
||||
map_invalidate_tile_full(x, y);
|
||||
}
|
||||
return RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY ? 0 : RCT2_GLOBAL(0x00F3EFD9, money32);
|
||||
}
|
||||
|
||||
static money32 footpath_element_update(int x, int y, rct_map_element *mapElement, int type, int flags)
|
||||
{
|
||||
if ((mapElement->properties.path.type >> 4) != (type & 0x0F) || (mapElement->type & 1) != (type >> 7)) {
|
||||
RCT2_GLOBAL(0x00F3EFD9, money32) += MONEY(6, 00);
|
||||
} else if (RCT2_GLOBAL(0x00F3EF88, uint16) != 0) {
|
||||
if (
|
||||
!(flags & (1 << 6)) &&
|
||||
(mapElement->properties.path.additions & 0x0F) == RCT2_GLOBAL(0x00F3EF88, uint16) &&
|
||||
!(mapElement->flags & MAP_ELEMENT_FLAG_BROKEN)
|
||||
) {
|
||||
if (flags & (1 << 4))
|
||||
return MONEY32_UNDEFINED;
|
||||
|
||||
return RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY ? 0 : RCT2_GLOBAL(0x00F3EFD9, money32);
|
||||
}
|
||||
|
||||
if (RCT2_GLOBAL(0x00F3EF88, uint16) != 0) {
|
||||
uint8 *unk = RCT2_ADDRESS(0x009ADA50, uint8*)[RCT2_GLOBAL(0x00F3EF88, uint16)];
|
||||
uint16 unk6 = RCT2_GLOBAL(unk + 6, uint16);
|
||||
|
||||
if ((unk6 & 0x80) && (mapElement->properties.path.type & 4)) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CANT_BUILD_THIS_ON_SLOPED_FOOTPATH;
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
if ((unk6 & 0x40) && (mapElement->type & 1)) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CANNOT_PLACE_THESE_ON_QUEUE_LINE_AREA;
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
if ((unk6 & 0x30) && (mapElement->properties.path.edges & 0x0F) == 0x0F) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_NONE;
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
if ((unk6 & 0x100) && !(mapElement->type & 1)) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CAN_ONLY_PLACE_THESE_ON_QUEUE_AREA;
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(0x00F3EFD9, money32) += RCT2_GLOBAL(unk + 10, money16);
|
||||
}
|
||||
|
||||
if (flags & (1 << 4))
|
||||
return MONEY32_UNDEFINED;
|
||||
|
||||
if (!(flags & (1 << 6))) {
|
||||
if (mapElement->properties.path.additions & 0x0F) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_NONE;
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
if (flags & GAME_COMMAND_FLAG_APPLY)
|
||||
mapElement->properties.path.additions |= 0x80;
|
||||
}
|
||||
|
||||
if (!(flags & GAME_COMMAND_FLAG_APPLY))
|
||||
return RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY ? 0 : RCT2_GLOBAL(0x00F3EFD9, money32);
|
||||
|
||||
if (
|
||||
(
|
||||
RCT2_GLOBAL(0x00F3EF88, uint16) != 0 &&
|
||||
!(flags & (1 << 6))
|
||||
) ||
|
||||
(
|
||||
RCT2_GLOBAL(0x00F3EF88, uint16) == 0 ||
|
||||
(mapElement->properties.path.additions & 0x80)
|
||||
)
|
||||
) {
|
||||
mapElement->properties.path.additions &= ~0x80;
|
||||
}
|
||||
|
||||
mapElement->properties.path.additions = (mapElement->properties.path.additions & 0xF0) | RCT2_GLOBAL(0x00F3EF88, uint8);
|
||||
mapElement->flags &= ~0x20;
|
||||
if (RCT2_GLOBAL(0x00F3EF88, uint16) != 0) {
|
||||
uint8 *unk = RCT2_ADDRESS(0x009ADA50, uint8*)[RCT2_GLOBAL(0x00F3EF88, uint16)];
|
||||
uint16 unk6 = RCT2_GLOBAL(unk + 6, uint16);
|
||||
if (unk6 & 1)
|
||||
mapElement->properties.path.addition_status = 255;
|
||||
}
|
||||
map_invalidate_tile_full(x, y);
|
||||
return RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY ? 0 : RCT2_GLOBAL(0x00F3EFD9, money32);
|
||||
}
|
||||
|
||||
if (flags & (1 << 4))
|
||||
return MONEY32_UNDEFINED;
|
||||
|
||||
if (flags & GAME_COMMAND_FLAG_APPLY) {
|
||||
RCT2_GLOBAL(0x00F3EFF4, uint32) = 0x00F3EFF8;
|
||||
|
||||
if (!(flags & (1 << 7)))
|
||||
sub_6A6AA7(x, y, mapElement);
|
||||
|
||||
mapElement->properties.path.type = (mapElement->properties.path.type & 0x0F) | (type << 4);
|
||||
mapElement->type = (mapElement->type & 0xFE) | (type >> 7);
|
||||
mapElement->properties.path.additions = (mapElement->properties.path.additions & 0xF0) | RCT2_GLOBAL(0x00F3EF88, uint8);
|
||||
mapElement->flags &= ~MAP_ELEMENT_FLAG_BROKEN;
|
||||
}
|
||||
|
||||
return RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY ? 0 : RCT2_GLOBAL(0x00F3EFD9, money32);
|
||||
}
|
||||
|
||||
static money32 footpath_place_real(int type, int x, int y, int z, int slope, int flags)
|
||||
{
|
||||
rct_map_element *mapElement;
|
||||
|
||||
RCT2_GLOBAL(0x0141F56C, uint8) = 12;
|
||||
RCT2_GLOBAL(0x009DEA5E, uint16) = x + 16;
|
||||
RCT2_GLOBAL(0x009DEA60, uint16) = y + 16;
|
||||
RCT2_GLOBAL(0x009DEA62, uint16) = z * 8;
|
||||
|
||||
if (!(flags & FOOTPATH_CONSTRUCTION_FLAG_ALLOW_DURING_PAUSED) && RCT2_GLOBAL(0x009DEA6E, uint8) != 0) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CONSTRUCTION_NOT_POSSIBLE_WHILE_GAME_IS_PAUSED;
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
if (flags & GAME_COMMAND_FLAG_APPLY)
|
||||
RCT2_CALLPROC_X(0x0069A48B, x, 0, y, z * 8, 0, 0, 0);
|
||||
|
||||
RCT2_GLOBAL(0x00F3EFD9, money32) = 0;
|
||||
RCT2_GLOBAL(0x00F3EFA4, uint8) = 0;
|
||||
RCT2_GLOBAL(0x00F3EF88, uint16) = 0; // di
|
||||
|
||||
if (x >= RCT2_GLOBAL(0x01358830, uint16) || y >= RCT2_GLOBAL(0x01358830, uint16)) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_OFF_EDGE_OF_MAP;
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !map_is_location_owned(x, y, z * 8))
|
||||
return MONEY32_UNDEFINED;
|
||||
|
||||
if (slope & 8) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_LAND_SLOPE_UNSUITABLE;
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
if (z < 2) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_TOO_LOW;
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
if (z > 248) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_TOO_HIGH;
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
mapElement = map_get_footpath_element_slope((x / 32), (y / 32), z, slope);
|
||||
if (mapElement == NULL)
|
||||
return footpath_element_insert(type, x, y, z, slope, flags);
|
||||
else
|
||||
return footpath_element_update(x, y, mapElement, type, flags);
|
||||
}
|
||||
|
||||
money32 footpath_remove_real(int x, int y, int z, int flags)
|
||||
{
|
||||
rct_map_element *mapElement;
|
||||
|
||||
RCT2_GLOBAL(0x0141F56C, uint8) = 12;
|
||||
RCT2_GLOBAL(0x009DEA5E, uint16) = x + 16;
|
||||
RCT2_GLOBAL(0x009DEA60, uint16) = y + 16;
|
||||
RCT2_GLOBAL(0x009DEA62, uint16) = z * 8;
|
||||
|
||||
if (!(flags & FOOTPATH_CONSTRUCTION_FLAG_ALLOW_DURING_PAUSED) && RCT2_GLOBAL(0x009DEA6E, uint8) != 0) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_CONSTRUCTION_NOT_POSSIBLE_WHILE_GAME_IS_PAUSED;
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
||||
if (flags & (1 << 0)) {
|
||||
RCT2_CALLPROC_X(0x0069A48B, x, 0, y, z * 8, 0, 0, 0);
|
||||
RCT2_CALLPROC_X(0x00673883, x, 0, y, z * 8, 0, 0, 0);
|
||||
}
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !map_is_location_owned(x, y, z * 8))
|
||||
return MONEY32_UNDEFINED;
|
||||
|
||||
mapElement = map_get_footpath_element(x / 32, y / 32, z);
|
||||
if (mapElement != NULL && (flags & (1 << 0))) {
|
||||
RCT2_GLOBAL(0x00F3EFF4, uint32) = 0x00F3EFF8;
|
||||
RCT2_CALLPROC_X(0x006BA23E, 0, 0, 0, 0, (int)mapElement, 0, 0);
|
||||
sub_6A6AA7(x, y, mapElement);
|
||||
map_invalidate_tile_full(x, y);
|
||||
map_element_remove(mapElement);
|
||||
RCT2_CALLPROC_EBPSAFE(0x006A759F);
|
||||
}
|
||||
|
||||
return (flags & (1 << 5)) || (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) ? 0 : -MONEY(10,00);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006A61DE
|
||||
*/
|
||||
void game_command_place_footpath(int* eax, int* ebx, int* ecx, int* edx, int* esi, int* edi, int* ebp)
|
||||
{
|
||||
if (*ebx & (1 << 5))
|
||||
RCT2_CALLFUNC_X(0x006A61DE, eax, ebx, ecx, edx, esi, edi, ebp);
|
||||
else
|
||||
*ebx = footpath_place_real((*edx >> 8) & 0xFF, *eax & 0xFFFF, *ecx & 0xFFFF, *edx & 0xFF, (*ebx >> 8) & 0xFF, *ebx & 0xFF);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006A67C0
|
||||
*/
|
||||
void game_command_remove_footpath(int* eax, int* ebx, int* ecx, int* edx, int* esi, int* edi, int* ebp)
|
||||
{
|
||||
*ebx = footpath_remove_real((*eax & 0xFFFF), (*ecx & 0xFFFF), (*edx & 0xFF), (*ebx & 0xFF));
|
||||
}
|
||||
|
||||
money32 footpath_place(int type, int x, int y, int z, int slope, int flags)
|
||||
{
|
||||
return game_do_command(x, (slope << 8) | flags, y, (type << 8) | z, GAME_COMMAND_PLACE_PATH, 0, 0);
|
||||
@@ -43,7 +392,7 @@ money32 footpath_provisional_set(int type, int x, int y, int z, int slope)
|
||||
|
||||
footpath_provisional_remove();
|
||||
|
||||
cost = footpath_place(type, x, y, z, slope, (1 << 6) | (1 << 5) | (1 << 4) | (1 << 3) | (1 << 0));
|
||||
cost = footpath_place(type, x, y, z, slope, (1 << 6) | (1 << 5) | (1 << 4) | FOOTPATH_CONSTRUCTION_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_APPLY);
|
||||
if (cost != MONEY32_UNDEFINED) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_X, uint16) = x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_Y, uint16) = y;
|
||||
@@ -69,7 +418,7 @@ void footpath_provisional_remove()
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_Y, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_Z, uint16),
|
||||
(1 << 0) | (1 << 3) | (1 << 5)
|
||||
(1 << 0) | FOOTPATH_CONSTRUCTION_FLAG_ALLOW_DURING_PAUSED | (1 << 5)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ typedef struct {
|
||||
uint8 flags; // 0x0B
|
||||
} rct_path_type;
|
||||
|
||||
void game_command_place_footpath(int* eax, int* ebx, int* ecx, int* edx, int* esi, int* edi, int* ebp);
|
||||
void game_command_remove_footpath(int* eax, int* ebx, int* ecx, int* edx, int* esi, int* edi, int* ebp);
|
||||
money32 footpath_place(int type, int x, int y, int z, int slope, int flags);
|
||||
void footpath_remove(int x, int y, int z, int flags);
|
||||
money32 footpath_provisional_set(int type, int x, int y, int z, int slope);
|
||||
|
||||
Reference in New Issue
Block a user