|
|
|
@ -711,7 +711,7 @@ void game_command_remove_large_scenery(int* eax, int* ebx, int* ecx, int* edx, i
|
|
|
|
|
RCT2_GLOBAL(0x009DEA5E, uint16) = x + 16;
|
|
|
|
|
RCT2_GLOBAL(0x009DEA60, uint16) = y + 16;
|
|
|
|
|
RCT2_GLOBAL(0x009DEA62, uint16) = z;
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = 12;
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4;
|
|
|
|
|
|
|
|
|
|
if (!(*ebx & 0x40) && RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) != 0 && !gConfigCheat.build_in_pause_mode) {
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_CONSTRUCTION_NOT_POSSIBLE_WHILE_GAME_IS_PAUSED;
|
|
|
|
@ -833,7 +833,7 @@ void game_command_remove_banner(int* eax, int* ebx, int* ecx, int* edx, int* esi
|
|
|
|
|
uint8 base_height = *edx;
|
|
|
|
|
uint8 banner_position = *edx >> 8;
|
|
|
|
|
int z = base_height * 8;
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = 12;
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4;
|
|
|
|
|
RCT2_GLOBAL(0x009DEA5E, uint16) = x + 16;
|
|
|
|
|
RCT2_GLOBAL(0x009DEA60, uint16) = y + 16;
|
|
|
|
|
RCT2_GLOBAL(0x009DEA62, uint16) = z;
|
|
|
|
@ -875,7 +875,7 @@ void game_command_remove_banner(int* eax, int* ebx, int* ecx, int* edx, int* esi
|
|
|
|
|
*/
|
|
|
|
|
void game_command_set_scenery_colour(int* eax, int* ebx, int* ecx, int* edx, int* esi, int* edi, int* ebp)
|
|
|
|
|
{
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = 12;
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4;
|
|
|
|
|
int x = *eax;
|
|
|
|
|
int y = *ecx;
|
|
|
|
|
uint8 base_height = *edx;
|
|
|
|
@ -925,7 +925,7 @@ void game_command_set_scenery_colour(int* eax, int* ebx, int* ecx, int* edx, int
|
|
|
|
|
*/
|
|
|
|
|
void game_command_set_fence_colour(int* eax, int* ebx, int* ecx, int* edx, int* esi, int* edi, int* ebp)
|
|
|
|
|
{
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = 12;
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4;
|
|
|
|
|
int x = *eax;
|
|
|
|
|
int y = *ecx;
|
|
|
|
|
uint8 map_element_direction = *edx;
|
|
|
|
@ -980,7 +980,7 @@ void game_command_set_fence_colour(int* eax, int* ebx, int* ecx, int* edx, int*
|
|
|
|
|
*/
|
|
|
|
|
void game_command_set_large_scenery_colour(int* eax, int* ebx, int* ecx, int* edx, int* esi, int* edi, int* ebp)
|
|
|
|
|
{
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = 12;
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4;
|
|
|
|
|
int x = *eax;
|
|
|
|
|
int y = *ecx;
|
|
|
|
|
uint8 map_element_direction = *ebx >> 8;
|
|
|
|
@ -1097,7 +1097,7 @@ void game_command_set_large_scenery_colour(int* eax, int* ebx, int* ecx, int* ed
|
|
|
|
|
*/
|
|
|
|
|
void game_command_set_banner_colour(int* eax, int* ebx, int* ecx, int* edx, int* esi, int* edi, int* ebp)
|
|
|
|
|
{
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = 12;
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4;
|
|
|
|
|
int x = *eax;
|
|
|
|
|
int y = *ecx;
|
|
|
|
|
uint8 base_height = *edx;
|
|
|
|
@ -1290,7 +1290,7 @@ void game_command_clear_scenery(int* eax, int* ebx, int* ecx, int* edx, int* esi
|
|
|
|
|
/* rct2: 0x00663CCD */
|
|
|
|
|
money32 map_change_surface_style(int x0, int y0, int x1, int y1, uint8 surfaceStyle, uint8 edgeStyle, uint8 flags)
|
|
|
|
|
{
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = 12;
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4;
|
|
|
|
|
|
|
|
|
|
x0 = max(x0, 32);
|
|
|
|
|
y0 = max(y0, 32);
|
|
|
|
@ -1521,7 +1521,7 @@ money32 raise_land(int flags, int x, int y, int z, int ax, int ay, int bx, int b
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = 12;
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4;
|
|
|
|
|
RCT2_GLOBAL(0x009DEA5E, uint32) = x;
|
|
|
|
|
RCT2_GLOBAL(0x009DEA60, uint32) = y;
|
|
|
|
|
RCT2_GLOBAL(0x009DEA62, uint32) = z;
|
|
|
|
@ -1585,7 +1585,7 @@ money32 lower_land(int flags, int x, int y, int z, int ax, int ay, int bx, int b
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = 12;
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4;
|
|
|
|
|
RCT2_GLOBAL(0x009DEA5E, uint32) = x;
|
|
|
|
|
RCT2_GLOBAL(0x009DEA60, uint32) = y;
|
|
|
|
|
RCT2_GLOBAL(0x009DEA62, uint32) = z;
|
|
|
|
@ -1800,7 +1800,7 @@ void game_command_remove_fence(int* eax, int* ebx, int* ecx, int* edx, int* esi,
|
|
|
|
|
uint8 base_height = (*edx >> 8);
|
|
|
|
|
uint8 direction = *edx;
|
|
|
|
|
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = 12;
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4;
|
|
|
|
|
if(!(*ebx & 0x40) && RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) != 0 && !gConfigCheat.build_in_pause_mode){
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_CONSTRUCTION_NOT_POSSIBLE_WHILE_GAME_IS_PAUSED;
|
|
|
|
|
*ebx = MONEY32_UNDEFINED;
|
|
|
|
@ -1848,7 +1848,7 @@ void game_command_place_banner(int* eax, int* ebx, int* ecx, int* edx, int* esi,
|
|
|
|
|
RCT2_GLOBAL(0x009DEA5E, uint32) = x + 16;
|
|
|
|
|
RCT2_GLOBAL(0x009DEA60, uint32) = y + 16;
|
|
|
|
|
RCT2_GLOBAL(0x009DEA62, uint32) = base_height * 16;
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = 12;
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4;
|
|
|
|
|
if(RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) == 0 || gConfigCheat.build_in_pause_mode){
|
|
|
|
|
if(sub_68B044() && x < 8192 && y < 8192){
|
|
|
|
|
rct_map_element* map_element = map_get_first_element_at(x / 32, y / 32);
|
|
|
|
@ -1923,7 +1923,7 @@ void game_command_place_banner(int* eax, int* ebx, int* ecx, int* edx, int* esi,
|
|
|
|
|
*/
|
|
|
|
|
void game_command_place_scenery(int* eax, int* ebx, int* ecx, int* edx, int* esi, int* edi, int* ebp)
|
|
|
|
|
{
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = 12;
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4;
|
|
|
|
|
int x = (uint16)*eax;
|
|
|
|
|
int y = (uint16)*ecx;
|
|
|
|
|
uint8 color2 = *edi >> 16;
|
|
|
|
@ -2107,13 +2107,260 @@ void game_command_place_scenery(int* eax, int* ebx, int* ecx, int* edx, int* esi
|
|
|
|
|
*ebx = MONEY32_UNDEFINED;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* rct2: 0x006E519A
|
|
|
|
|
*/
|
|
|
|
|
void game_command_place_fence(int* eax, int* ebx, int* ecx, int* edx, int* esi, int* edi, int* ebp){
|
|
|
|
|
rct_xyz16 position = {
|
|
|
|
|
.x = *eax & 0xFFFF,
|
|
|
|
|
.y = *ecx & 0xFFFF,
|
|
|
|
|
.z = *edi & 0xFFFF
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
uint8 flags = *ebx & 0xFF;
|
|
|
|
|
uint8 fence_type = (*ebx >> 8) & 0xFF;
|
|
|
|
|
uint8 primary_colour = (*edx >> 8) & 0xFF;
|
|
|
|
|
uint8 secondary_colour = *ebp & 0xFF;
|
|
|
|
|
uint8 tertiary_colour = (*ebp >> 8) & 0xFF;
|
|
|
|
|
uint8 edge = *edx & 0xFF;
|
|
|
|
|
|
|
|
|
|
// *not used*
|
|
|
|
|
RCT2_GLOBAL(0x00141F726, uint8) = secondary_colour;
|
|
|
|
|
// *not used*
|
|
|
|
|
RCT2_GLOBAL(0x00141F727, uint8) = tertiary_colour;
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4;
|
|
|
|
|
// Banner index *not used*
|
|
|
|
|
RCT2_GLOBAL(0x00141F728, uint8) = 0xFF;
|
|
|
|
|
RCT2_GLOBAL(0x009DEA5E, sint16) = position.x + 16;
|
|
|
|
|
RCT2_GLOBAL(0x009DEA60, sint16) = position.y + 16;
|
|
|
|
|
RCT2_GLOBAL(0x009DEA62, sint16) = position.z;
|
|
|
|
|
|
|
|
|
|
if (position.z == 0){
|
|
|
|
|
RCT2_GLOBAL(0x009DEA62, sint16) = map_element_height(position.x, position.y) & 0xFFFF;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) != 0 && !gConfigCheat.build_in_pause_mode){
|
|
|
|
|
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 2214;
|
|
|
|
|
*ebx = MONEY32_UNDEFINED;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) &&
|
|
|
|
|
!(flags & (1 << 7)) && !gSandboxMode){
|
|
|
|
|
|
|
|
|
|
if (position.z == 0){
|
|
|
|
|
if (!map_is_location_in_park(position.x, position.y)){
|
|
|
|
|
*ebx = MONEY32_UNDEFINED;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (!map_is_location_owned(position.x, position.y, position.z)){
|
|
|
|
|
*ebx = MONEY32_UNDEFINED;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint8 bp = 0;
|
|
|
|
|
if (position.z == 0){
|
|
|
|
|
rct_map_element* map_element = map_get_surface_element_at(position.x / 32, position.y / 32);
|
|
|
|
|
if (map_element == NULL){
|
|
|
|
|
*ebx = MONEY32_UNDEFINED;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
position.z = map_element->base_height * 8;
|
|
|
|
|
|
|
|
|
|
uint8 slope = map_element->properties.surface.slope & MAP_ELEMENT_SLOPE_MASK;
|
|
|
|
|
bp = RCT2_ADDRESS(0x009A3FEC, uint8)[slope + (edge & 3) * 32];
|
|
|
|
|
if (bp & (1 << 0)){
|
|
|
|
|
position.z += 16;
|
|
|
|
|
bp &= ~(1 << 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RCT2_GLOBAL(0x00141F721, uint16) = position.z / 8;
|
|
|
|
|
RCT2_GLOBAL(0x00141F720, uint8) = primary_colour;
|
|
|
|
|
RCT2_GLOBAL(0x00141F723, uint8) = bp;
|
|
|
|
|
|
|
|
|
|
rct_map_element* map_element = map_get_surface_element_at(position.x / 32, position.y / 32);
|
|
|
|
|
if (map_element == NULL){
|
|
|
|
|
*ebx = MONEY32_UNDEFINED;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (map_element->properties.surface.terrain & MAP_ELEMENT_WATER_HEIGHT_MASK){
|
|
|
|
|
uint16 water_height = map_element->properties.surface.terrain & MAP_ELEMENT_WATER_HEIGHT_MASK;
|
|
|
|
|
water_height *= 16;
|
|
|
|
|
|
|
|
|
|
if (position.z < water_height){
|
|
|
|
|
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 1180;
|
|
|
|
|
*ebx = MONEY32_UNDEFINED;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (position.z / 8 < map_element->base_height){
|
|
|
|
|
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 1033;
|
|
|
|
|
*ebx = MONEY32_UNDEFINED;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!(bp & 0xC0)){
|
|
|
|
|
uint8 new_edge = (edge + 2) & 3;
|
|
|
|
|
bp += 2;
|
|
|
|
|
if (map_element->properties.surface.slope & (1 << new_edge)){
|
|
|
|
|
if (position.z / 8 < bp){
|
|
|
|
|
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 1033;
|
|
|
|
|
*ebx = MONEY32_UNDEFINED;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (map_element->properties.surface.slope & (1 << 4)){
|
|
|
|
|
new_edge = (new_edge - 1) & 3;
|
|
|
|
|
|
|
|
|
|
if (map_element->properties.surface.slope & (1 << new_edge)){
|
|
|
|
|
new_edge = (new_edge + 2) & 3;
|
|
|
|
|
if (map_element->properties.surface.slope & (1 << new_edge)){
|
|
|
|
|
bp += 2;
|
|
|
|
|
if (position.z / 8 < bp){
|
|
|
|
|
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 1033;
|
|
|
|
|
*ebx = MONEY32_UNDEFINED;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
bp -= 2;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
new_edge = (edge + 3) & 3;
|
|
|
|
|
if (map_element->properties.surface.slope & (1 << new_edge)){
|
|
|
|
|
if (position.z / 8 < bp){
|
|
|
|
|
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 1033;
|
|
|
|
|
*ebx = MONEY32_UNDEFINED;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (map_element->properties.surface.slope & (1 << 4)){
|
|
|
|
|
new_edge = (new_edge - 1) & 3;
|
|
|
|
|
|
|
|
|
|
if (map_element->properties.surface.slope & (1 << new_edge)){
|
|
|
|
|
new_edge = (new_edge + 2) & 3;
|
|
|
|
|
if (map_element->properties.surface.slope & (1 << new_edge)){
|
|
|
|
|
bp += 2;
|
|
|
|
|
if (position.z / 8 < bp){
|
|
|
|
|
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 1033;
|
|
|
|
|
*ebx = MONEY32_UNDEFINED;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
int banner_index = 0xFF;
|
|
|
|
|
rct_scenery_entry* fence = g_wallSceneryEntries[fence_type];
|
|
|
|
|
if (fence->wall.var_0D != 0xFF){
|
|
|
|
|
banner_index = create_new_banner(fence->wall.var_0D);
|
|
|
|
|
|
|
|
|
|
RCT2_GLOBAL(0x00141F728, uint8) = banner_index;
|
|
|
|
|
if (banner_index == 0xFF){
|
|
|
|
|
*ebx = MONEY32_UNDEFINED;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rct_banner* banner = &gBanners[banner_index];
|
|
|
|
|
if (flags & GAME_COMMAND_FLAG_APPLY){
|
|
|
|
|
banner->flags |= (1 << 3);
|
|
|
|
|
banner->type = 0;
|
|
|
|
|
banner->x = position.x / 32;
|
|
|
|
|
banner->y = position.y / 32;
|
|
|
|
|
|
|
|
|
|
*eax = position.x;
|
|
|
|
|
*ecx = position.y;
|
|
|
|
|
*edx = position.z;
|
|
|
|
|
RCT2_CALLFUNC_X(0x6B7D86, eax, ebx, ecx, edx, esi, edi, ebp);
|
|
|
|
|
if ((*eax & 0xFF) != 0xFF){
|
|
|
|
|
banner->colour = *eax & 0xFF;
|
|
|
|
|
banner->flags |= BANNER_FLAG_2;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bp = RCT2_GLOBAL(0x00141F723, uint8);
|
|
|
|
|
|
|
|
|
|
RCT2_GLOBAL(0x00141F722, uint8) = position.z / 8;
|
|
|
|
|
if (bp & 0xC0){
|
|
|
|
|
if (fence->wall.flags & WALL_SCENERY_FLAG3){
|
|
|
|
|
RCT2_GLOBAL(0x00141E9AC, rct_string_id) = 3133;
|
|
|
|
|
*ebx = MONEY32_UNDEFINED;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
RCT2_GLOBAL(0x00141F722, uint8) += 2;
|
|
|
|
|
}
|
|
|
|
|
RCT2_GLOBAL(0x00141F722, uint8) += fence->wall.height;
|
|
|
|
|
|
|
|
|
|
if (!(flags & (1 << 7))){
|
|
|
|
|
if (0x100 & RCT2_CALLPROC_X(0x006E5C1A, position.x, flags | (fence_type << 8), position.y, 0, 0, 0, 0)){
|
|
|
|
|
*ebx = MONEY32_UNDEFINED;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!sub_68B044()){
|
|
|
|
|
*ebx = MONEY32_UNDEFINED;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (flags & GAME_COMMAND_FLAG_APPLY){
|
|
|
|
|
map_element = map_element_insert(position.x / 32, position.y / 32, position.z / 8, 0);
|
|
|
|
|
|
|
|
|
|
map_animation_create(MAP_ANIMATION_TYPE_WALL, position.x, position.y, position.z / 8);
|
|
|
|
|
|
|
|
|
|
map_element->clearance_height = RCT2_GLOBAL(0x00141F722, uint8);
|
|
|
|
|
|
|
|
|
|
map_element->type = bp | edge | MAP_ELEMENT_TYPE_FENCE;
|
|
|
|
|
|
|
|
|
|
map_element->properties.fence.item[1] = primary_colour;
|
|
|
|
|
map_element->properties.fence.item[1] |= (secondary_colour & 7) << 5;
|
|
|
|
|
map_element->flags |= (secondary_colour & 0x18) << 2;
|
|
|
|
|
|
|
|
|
|
if (RCT2_GLOBAL(0x00141F725, uint8) & 1){
|
|
|
|
|
map_element->properties.fence.item[2] |= (1 << 2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
map_element->properties.fence.type = fence_type;
|
|
|
|
|
if (banner_index != 0xFF){
|
|
|
|
|
map_element->properties.fence.item[0] = banner_index;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (fence->wall.flags & WALL_SCENERY_HAS_TERNARY_COLOUR){
|
|
|
|
|
map_element->properties.fence.item[0] = tertiary_colour;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (flags & (1 << 6)){
|
|
|
|
|
map_element->flags |= MAP_ELEMENT_FLAG_GHOST;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RCT2_GLOBAL(0x00F64EBC, rct_map_element*) = map_element;
|
|
|
|
|
map_invalidate_tile(position.x, position.y, map_element->base_height * 8, map_element->base_height * 8 + 72);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY){
|
|
|
|
|
*ebx = 0;
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
*ebx = fence->wall.price;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* rct2: 0x006B893C
|
|
|
|
|
*/
|
|
|
|
|
void game_command_place_large_scenery(int* eax, int* ebx, int* ecx, int* edx, int* esi, int* edi, int* ebp)
|
|
|
|
|
{
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = 12;
|
|
|
|
|
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4;
|
|
|
|
|
int x = (sint16)*eax;
|
|
|
|
|
int y = (sint16)*ecx;
|
|
|
|
|
int z = (sint16)*ebp;
|
|
|
|
@ -2517,17 +2764,6 @@ int map_can_construct_at(int x, int y, int zLow, int zHigh, uint8 bl)
|
|
|
|
|
return map_can_construct_with_clear_at(x, y, zLow, zHigh, (void*)0xFFFFFFFF, bl);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* rct2: 0x006BA278
|
|
|
|
|
*/
|
|
|
|
|
int sub_6BA278(int ebx)
|
|
|
|
|
{
|
|
|
|
|
int eax, ecx, edx, esi, edi, ebp;
|
|
|
|
|
RCT2_CALLFUNC_X(0x006BA278, &eax, &ebx, &ecx, &edx, &esi, &edi, &ebp);
|
|
|
|
|
return eax;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* rct2: 0x006E5935
|
|
|
|
@ -2791,4 +3027,4 @@ static void sub_68AE2A(int x, int y)
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|