mirror of https://github.com/OpenRCT2/OpenRCT2.git
Added path bit placement
Fixed bug in footpath_place_real that causes it to not place path bits.
This commit is contained in:
parent
d0420eef0b
commit
9749d7d602
|
@ -1314,8 +1314,20 @@ static void window_top_toolbar_scenery_tool_down(short x, short y, rct_window* w
|
|||
sound_play_panned(SOUND_ERROR, 0x8001, RCT2_GLOBAL(0x009DEA5E, uint16), RCT2_GLOBAL(0x009DEA60, uint16), RCT2_GLOBAL(0x009DEA62, uint16));
|
||||
}
|
||||
else if (ebp >= 256){
|
||||
//6e2eda
|
||||
RCT2_CALLPROC_X(0x6E2CC6, x, y, 0, widgetIndex, (int)w, 0, 0);
|
||||
// Path Bits
|
||||
int ebx = parameter_1;
|
||||
ebx &= 0xFF00;
|
||||
ebx |= 0x81;
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 1161;
|
||||
|
||||
ebx = game_do_command(grid_x, ebx, grid_y, parameter_2, GAME_COMMAND_PLACE_PATH, parameter_3, 0);
|
||||
|
||||
if (ebx == MONEY32_UNDEFINED){
|
||||
return;
|
||||
}
|
||||
|
||||
sound_play_panned(SOUND_PLACE_ITEM, 0x8001, RCT2_GLOBAL(0x009DEA5E, uint16), RCT2_GLOBAL(0x009DEA60, uint16), RCT2_GLOBAL(0x009DEA62, uint16));
|
||||
}
|
||||
else{
|
||||
//6e2d2d
|
||||
|
|
|
@ -289,7 +289,7 @@ static money32 footpath_element_update(int x, int y, rct_map_element *mapElement
|
|||
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)
|
||||
static money32 footpath_place_real(int type, int x, int y, int z, int slope, int flags, uint8 path_bit_type)
|
||||
{
|
||||
rct_map_element *mapElement;
|
||||
|
||||
|
@ -308,7 +308,7 @@ static money32 footpath_place_real(int type, int x, int y, int z, int slope, int
|
|||
|
||||
RCT2_GLOBAL(0x00F3EFD9, money32) = 0;
|
||||
RCT2_GLOBAL(0x00F3EFA4, uint8) = 0;
|
||||
RCT2_GLOBAL(0x00F3EF88, uint16) = 0; // di
|
||||
RCT2_GLOBAL(0x00F3EF88, uint16) = path_bit_type; // 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;
|
||||
|
@ -394,7 +394,7 @@ void game_command_place_footpath(int *eax, int *ebx, int *ecx, int *edx, int *es
|
|||
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);
|
||||
*ebx = footpath_place_real((*edx >> 8) & 0xFF, *eax & 0xFFFF, *ecx & 0xFFFF, *edx & 0xFF, (*ebx >> 8) & 0xFF, *ebx & 0xFF, *edi & 0xFF);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue