mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-02-02 19:56:13 +01:00
Use decompiled construction markers
This commit is contained in:
@@ -53,7 +53,7 @@ void banner_paint(uint8 direction, int height, rct_map_element* map_element)
|
||||
if (map_element->flags & MAP_ELEMENT_FLAG_GHOST)//if being placed
|
||||
{
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8_t) = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
image_id |= RCT2_ADDRESS(0x993CC4, uint32_t)[gConfigGeneral.construction_marker_colour];
|
||||
image_id |= construction_markers[gConfigGeneral.construction_marker_colour];
|
||||
}
|
||||
else{
|
||||
image_id |=
|
||||
|
||||
@@ -60,7 +60,7 @@ void ride_entrance_exit_paint(uint8 direction, int height, rct_map_element* map_
|
||||
|
||||
if (map_element->flags & MAP_ELEMENT_FLAG_GHOST){
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
image_id = RCT2_ADDRESS(0x993CC4, uint32_t)[gConfigGeneral.construction_marker_colour];
|
||||
image_id = construction_markers[gConfigGeneral.construction_marker_colour];
|
||||
RCT2_GLOBAL(0x009E32BC, uint32) = image_id;
|
||||
if (transparant_image_id)
|
||||
transparant_image_id = image_id;
|
||||
@@ -168,7 +168,7 @@ void park_entrance_paint(uint8 direction, int height, rct_map_element* map_eleme
|
||||
uint32 image_id, ghost_id = 0;
|
||||
if (map_element->flags & MAP_ELEMENT_FLAG_GHOST){
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
ghost_id = RCT2_ADDRESS(0x993CC4, uint32)[gConfigGeneral.construction_marker_colour];
|
||||
ghost_id = construction_markers[gConfigGeneral.construction_marker_colour];
|
||||
RCT2_GLOBAL(0x009E32BC, uint32) = ghost_id;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,11 +27,6 @@
|
||||
#include "../../interface/viewport.h"
|
||||
#include "../paint.h"
|
||||
|
||||
uint32 dword_993CC4[] = {
|
||||
COLOUR_DARK_GREEN << 19 | COLOUR_GREY << 24 | 0x20000000,
|
||||
COLOUR_YELLOW << 19 | COLOUR_GREY << 24 | 0x40000000
|
||||
};
|
||||
|
||||
const uint8 byte_9A406C[] = {
|
||||
2, 2, 22, 26, 30, 34, 34, 34, 34, 34, 30, 26, 22, 2, 6, 2,
|
||||
2, 2, 6, 10, 14, 18, 18, 18, 18, 18, 14, 10, 6, 2, 22, 2
|
||||
@@ -178,7 +173,7 @@ void fence_paint(uint8 direction, int height, rct_map_element * map_element)
|
||||
|
||||
if (map_element->flags & MAP_ELEMENT_FLAG_GHOST) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
dword_141F710 = dword_993CC4[gConfigGeneral.construction_marker_colour];
|
||||
dword_141F710 = construction_markers[gConfigGeneral.construction_marker_colour];
|
||||
}
|
||||
|
||||
// save map_element
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
#include "../common.h"
|
||||
#include "../world/map.h"
|
||||
#include "../interface/colour.h"
|
||||
#include "../drawing/drawing.h"
|
||||
|
||||
typedef struct attached_paint_struct attached_paint_struct;
|
||||
|
||||
@@ -85,6 +87,12 @@ enum PAINT_STRUCT_FLAGS {
|
||||
PAINT_STRUCT_FLAG_IS_MASKED = (1 << 0)
|
||||
};
|
||||
|
||||
/** rct2: 0x00993CC4 */
|
||||
const uint32 construction_markers[] = {
|
||||
COLOUR_DARK_GREEN << 19 | COLOUR_GREY << 24 | IMAGE_TYPE_USE_PALETTE << 28, // White
|
||||
2 << 19 | 0b110000 << 19 | IMAGE_TYPE_MIX_BACKGROUND << 28, // Translucent
|
||||
};
|
||||
|
||||
void painter_setup();
|
||||
|
||||
paint_struct * sub_98196C(uint32 image_id, sint8 x_offset, sint8 y_offset, sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, sint16 z_offset, uint32 rotation);
|
||||
|
||||
@@ -238,7 +238,7 @@ void track_paint(uint8 direction, int height, rct_map_element *mapElement)
|
||||
RCT2_GLOBAL(0x00F441A4, uint32) = 0x21600000;
|
||||
}
|
||||
if (mapElement->flags & MAP_ELEMENT_FLAG_GHOST) {
|
||||
uint32 ghost_id = RCT2_ADDRESS(0x00993CC4, uint32)[gConfigGeneral.construction_marker_colour];
|
||||
uint32 ghost_id = construction_markers[gConfigGeneral.construction_marker_colour];
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = 0;
|
||||
RCT2_GLOBAL(0x00F44198, uint32) = ghost_id;
|
||||
RCT2_GLOBAL(0x00F4419C, uint32) = ghost_id;
|
||||
|
||||
Reference in New Issue
Block a user