1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 17:24:47 +01:00

Move around map element and sprite functions into seperate files

Add dummy files for big file move around

Fix files so they can compile

Add copyright header

Split up functions into seperate files

Remove suffix

Move supports again

Change functions signatures to remove viewport_setup

Rename folder structure

Finish moving about files
This commit is contained in:
duncanspumpkin
2016-05-01 16:01:40 +01:00
parent 83f984d85a
commit 7f02193411
101 changed files with 4836 additions and 3724 deletions

View File

@@ -1,433 +0,0 @@
#include "paint.h"
#include "../drawing/drawing.h"
#include "../addresses.h"
/**
*
* rct2: 0x0068615B
*/
void painter_setup() {
RCT2_GLOBAL(0xEE7888, uint32) = 0x00EE788C;
RCT2_GLOBAL(0xF1AD28, uint32) = 0;
RCT2_GLOBAL(0xF1AD2C, uint32) = 0;
uint8* edi = RCT2_ADDRESS(0xF1A50C, uint8);
memset(edi, 0, 2048);
RCT2_GLOBAL(0xF1AD0C, sint32) = -1;
RCT2_GLOBAL(0xF1AD10, uint32) = 0;
RCT2_GLOBAL(0xF1AD20, uint32) = 0;
RCT2_GLOBAL(0xF1AD24, uint32) = 0;
}
/**
*
* rct2: 0x006874B0, 0x00687618, 0x0068778C, 0x00687902, 0x0098199C
*
* @param image_id (ebx)
* @param x_offset (al)
* @param y_offset (cl)
* @param bound_box_length_x (di)
* @param bound_box_length_y (si)
* @param bound_box_length_z (ah)
* @param z_offset (dx)
* @param bound_box_offset_x (0x009DEA52)
* @param bound_box_offset_y (0x009DEA54)
* @param bound_box_offset_z (0x009DEA56)
* @param rotation (ebp)
* @return (!CF) success
*/
bool sub_98199C(
uint32 image_id,
sint8 x_offset, sint8 y_offset,
sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z,
uint16 z_offset,
sint16 bound_box_offset_x, uint16 bound_box_offset_y, sint16 bound_box_offset_z,
uint32 rotation
) {
RCT2_GLOBAL(RCT2_ADDRESS_PAINT_BOUNDBOX_OFFSET_X, uint16) = bound_box_offset_x;
RCT2_GLOBAL(RCT2_ADDRESS_PAINT_BOUNDBOX_OFFSET_Y, uint16) = bound_box_offset_y;
RCT2_GLOBAL(RCT2_ADDRESS_PAINT_BOUNDBOX_OFFSET_Z, uint16) = bound_box_offset_z;
int flags = RCT2_CALLPROC_X(RCT2_ADDRESS(0x98199C, uint32_t)[rotation],
x_offset | (bound_box_length_z << 8),
image_id,
y_offset,
z_offset,
bound_box_length_y,
bound_box_length_x,
rotation);
return !(flags & (1 << 8));
}
/**
* rct2: 0x006861AC, 0x00686337, 0x006864D0, 0x0068666B, 0x0098196C
*
* @param image_id (ebx)
* @param x_offset (al)
* @param y_offset (cl)
* @param bound_box_length_x (di)
* @param bound_box_length_y (si)
* @param bound_box_length_z (ah)
* @param z_offset (dx)
* @param rotation (ebp)
* @return (!CF) success
*/
bool 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,
uint16 z_offset,
uint32 rotation
) {
int flags = RCT2_CALLPROC_X(RCT2_ADDRESS(0x0098196C, uint32)[rotation],
x_offset | (bound_box_length_z << 8),
image_id,
y_offset,
z_offset,
bound_box_length_y,
bound_box_length_x,
rotation
);
return !(flags & (1 << 8));
}
/**
* rct2: 0x00686806, 0x006869B2, 0x00686B6F, 0x00686D31, 0x0098197C
*
* @param image_id (ebx)
* @param x_offset (al)
* @param y_offset (cl)
* @param bound_box_length_x (di)
* @param bound_box_length_y (si)
* @param bound_box_length_z (ah)
* @param z_offset (dx)
* @param bound_box_offset_x (0x009DEA52)
* @param bound_box_offset_y (0x009DEA54)
* @param bound_box_offset_z (0x009DEA56)
* @param rotation (ebp)
* @return (!CF) success
*/
bool sub_98197C(
uint32 image_id,
sint8 x_offset, sint8 y_offset,
sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z,
uint16 z_offset,
sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z,
uint32 rotation
) {
RCT2_GLOBAL(0xF1AD28, paint_struct*) = 0;
RCT2_GLOBAL(0xF1AD2C, uint32) = 0;
//Not a paint struct but something similar
paint_struct* ps = RCT2_GLOBAL(0xEE7888, paint_struct*);
if ((uint32)ps >= RCT2_GLOBAL(0xEE7880, uint32))return false;
ps->image_id = image_id;
uint32 image_element = image_id & 0x7FFFF;
rct_g1_element *g1Element = gfx_get_g1_element(image_element);
rct_xyz16 coord_3d = {
.x = x_offset,
.y = y_offset,
.z = z_offset
};
switch (rotation) {
case 0:
rotate_map_coordinates(&coord_3d.x, &coord_3d.y, 0);
break;
case 1:
rotate_map_coordinates(&coord_3d.x, &coord_3d.y, 3);
break;
case 2:
rotate_map_coordinates(&coord_3d.x, &coord_3d.y, 2);
break;
case 3:
rotate_map_coordinates(&coord_3d.x, &coord_3d.y, 1);
break;
}
coord_3d.x += RCT2_GLOBAL(0x9DE568, sint16);
coord_3d.y += RCT2_GLOBAL(0x9DE56C, sint16);
rct_xy16 map = coordinate_3d_to_2d(&coord_3d, rotation);
ps->x = map.x;
ps->y = map.y;
int left = map.x + g1Element->x_offset;
int bottom = map.y + g1Element->y_offset;
int right = left + g1Element->width;
int top = bottom + g1Element->height;
RCT2_GLOBAL(0xF1AD1C, uint16) = left;
RCT2_GLOBAL(0xF1AD1E, uint16) = bottom;
rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
if (right <= dpi->x)return false;
if (top <= dpi->y)return false;
if (left > dpi->x + dpi->width)return false;
if (bottom > dpi->y + dpi->height)return false;
rct_xy16 boundBox = {
.x = bound_box_length_x,
.y = bound_box_length_y
};
rct_xy16 boundBoxOffset = {
.x = bound_box_offset_x,
.y = bound_box_offset_y
};
// Unsure why rots 1 and 3 need to swap
switch (rotation) {
case 0:
boundBox.x--;
boundBox.y--;
rotate_map_coordinates(&boundBoxOffset.x, &boundBoxOffset.y, 0);
rotate_map_coordinates(&boundBox.x, &boundBox.y, 0);
break;
case 1:
boundBox.x--;
rotate_map_coordinates(&boundBoxOffset.x, &boundBoxOffset.y, 3);
rotate_map_coordinates(&boundBox.x, &boundBox.y, 3);
break;
case 2:
rotate_map_coordinates(&boundBox.x, &boundBox.y, 2);
rotate_map_coordinates(&boundBoxOffset.x, &boundBoxOffset.y, 2);
break;
case 3:
boundBox.y--;
rotate_map_coordinates(&boundBox.x, &boundBox.y, 1);
rotate_map_coordinates(&boundBoxOffset.x, &boundBoxOffset.y, 1);
break;
}
ps->bound_box_x_end = boundBox.x + boundBoxOffset.x + RCT2_GLOBAL(0x9DE568, sint16);
ps->bound_box_z = bound_box_offset_z;
int boundBoxZEnd = bound_box_length_z + bound_box_offset_z;
ps->bound_box_z_end = boundBoxZEnd;
ps->bound_box_y_end = boundBox.y + boundBoxOffset.y + RCT2_GLOBAL(0x009DE56C, sint16);
ps->flags = 0;
ps->bound_box_x = boundBoxOffset.x + RCT2_GLOBAL(0x9DE568, sint16);
ps->bound_box_y = boundBoxOffset.y + RCT2_GLOBAL(0x009DE56C, sint16);
ps->attached_ps = NULL;
ps->var_20 = NULL;
ps->sprite_type = RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8);
ps->var_29 = RCT2_GLOBAL(0x9DE571, uint8);
ps->map_x = RCT2_GLOBAL(0x9DE574, uint16);
ps->map_y = RCT2_GLOBAL(0x9DE576, uint16);
ps->mapElement = RCT2_GLOBAL(0x9DE578, rct_map_element*);
RCT2_GLOBAL(0xF1AD28, paint_struct*) = ps;
rct_xy16 attach = {
.x = ps->bound_box_x,
.y = ps->bound_box_y
};
rotate_map_coordinates(&attach.x, &attach.y, rotation);
switch (rotation) {
case 0:
break;
case 1:
case 3:
attach.x += 0x2000;
break;
case 2:
attach.x += 0x4000;
break;
}
sint16 di = attach.x + attach.y;
if (di < 0)
di = 0;
di /= 32;
if (di > 511)
di = 511;
ps->var_18 = di;
paint_struct* old_ps = RCT2_ADDRESS(0x00F1A50C, paint_struct*)[di];
RCT2_ADDRESS(0x00F1A50C, paint_struct*)[di] = ps;
ps->next_quadrant_ps = old_ps;
if ((uint16)di < RCT2_GLOBAL(0x00F1AD0C, uint32)) {
RCT2_GLOBAL(0x00F1AD0C, uint32) = di;
}
if ((uint16)di > RCT2_GLOBAL(0x00F1AD10, uint32)) {
RCT2_GLOBAL(0x00F1AD10, uint32) = di;
}
RCT2_GLOBAL(0xEE7888, paint_struct*)++;
return true;
}
/**
*
* rct2: 0x00686EF0, 0x00687056, 0x006871C8, 0x0068733C, 0x0098198C
*
* @param image_id (ebx)
* @param x_offset (al)
* @param y_offset (cl)
* @param bound_box_length_x (di)
* @param bound_box_length_y (si)
* @param bound_box_length_z (ah)
* @param z_offset (dx)
* @param bound_box_offset_x (0x009DEA52)
* @param bound_box_offset_y (0x009DEA54)
* @param bound_box_offset_z (0x009DEA56)
* @param rotation
* @return (!CF) success
*/
bool sub_98198C(
uint32 image_id,
sint8 x_offset, sint8 y_offset,
sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z,
uint16 z_offset,
sint16 bound_box_offset_x, uint16 bound_box_offset_y, sint16 bound_box_offset_z,
uint32 rotation
) {
RCT2_GLOBAL(RCT2_ADDRESS_PAINT_BOUNDBOX_OFFSET_X, uint16) = bound_box_offset_x;
RCT2_GLOBAL(RCT2_ADDRESS_PAINT_BOUNDBOX_OFFSET_Y, uint16) = bound_box_offset_y;
RCT2_GLOBAL(RCT2_ADDRESS_PAINT_BOUNDBOX_OFFSET_Z, uint16) = bound_box_offset_z;
int flags = RCT2_CALLPROC_X(RCT2_ADDRESS(0x0098198C, uint32)[rotation],
x_offset | (bound_box_length_z << 8),
image_id,
y_offset,
z_offset,
bound_box_length_y,
bound_box_length_x,
rotation
);
return !(flags & (1 << 8));
}
/**
* rct2: 0x006881D0
*
* @param image_id (ebx)
* @param x (ax)
* @param y (cx)
* @return (!CF) success
*/
bool paint_attach_to_previous_attach(uint32 image_id, uint16 x, uint16 y)
{
if (RCT2_GLOBAL(0xF1AD2C, uint32) == 0) {
return paint_attach_to_previous_ps(image_id, x, y);
}
attached_paint_struct * ps = RCT2_GLOBAL(0xEE7888, attached_paint_struct *);
if ((uint32) ps >= RCT2_GLOBAL(0xEE7880, uint32)) {
return false;
}
ps->image_id = image_id;
ps->x = x;
ps->y = y;
ps->flags = 0;
attached_paint_struct * ebx = RCT2_GLOBAL(0xF1AD2C, attached_paint_struct *);
ps->next = NULL;
ebx->next = ps;
RCT2_GLOBAL(0xF1AD2C, attached_paint_struct *) = ps;
RCT2_GLOBAL(0xEE7888, attached_paint_struct *)++;
return true;
}
/**
* rct2: 0x0068818E
*
* @param image_id (ebx)
* @param x (ax)
* @param y (cx)
* @return (!CF) success
*/
bool paint_attach_to_previous_ps(uint32 image_id, uint16 x, uint16 y)
{
attached_paint_struct * ps = RCT2_GLOBAL(0xEE7888, attached_paint_struct *);
if ((uint32) ps >= RCT2_GLOBAL(0xEE7880, uint32)) {
return false;
}
ps->image_id = image_id;
ps->x = x;
ps->y = y;
ps->flags = 0;
paint_struct * masterPs = RCT2_GLOBAL(0xF1AD28, paint_struct *);
if (masterPs == NULL) {
return false;
}
RCT2_GLOBAL(0x00EE7888, attached_paint_struct *)++;
attached_paint_struct * oldFirstAttached = masterPs->attached_ps;
masterPs->attached_ps = ps;
ps->next = oldFirstAttached;
RCT2_GLOBAL(0xF1AD2C, attached_paint_struct *) = ps;
return true;
}
/**
* rct2: 0x00685EBC, 0x00686046, 0x00685FC8, 0x00685F4A, 0x00685ECC
* @param amount (eax)
* @param string_id (bx)
* @param y (cx)
* @param z (dx)
* @param offset_x (si)
* @param y_offsets (di)
* @param rotation (ebp)
*/
void sub_685EBC(money32 amount, uint16 string_id, sint16 y, sint16 z, sint8 y_offsets[], sint16 offset_x, uint32 rotation)
{
paint_string_struct * ps = RCT2_GLOBAL(0xEE7888, paint_string_struct*);
if ((uint32) ps >= RCT2_GLOBAL(0xEE7880, uint32)) {
return;
}
ps->string_id = string_id;
ps->next = 0;
ps->args[0] = amount;
ps->args[4] = y;
ps->args[8] = y_offsets;
ps->args[12] = 0;
ps->y_offsets = y_offsets;
rct_xyz16 position = {.x = RCT2_GLOBAL(0x9DE568, sint16), .y = RCT2_GLOBAL(0x9DE56C, sint16), .z = z};
rct_xy16 coord = coordinate_3d_to_2d(&position, rotation);
ps->x = coord.x + offset_x;
ps->y = coord.y;
RCT2_GLOBAL(0xEE7888, uint32) += 0x1E;
paint_string_struct * oldPs = RCT2_GLOBAL(0xF1AD24, paint_string_struct*);
RCT2_GLOBAL(0xF1AD24, paint_string_struct*) = ps;
if (oldPs == 0) { // 0 or NULL?
RCT2_GLOBAL(0xF1AD20, paint_string_struct *) = ps;
} else {
oldPs->next = ps;
}
}

View File

@@ -1,76 +0,0 @@
#ifndef _PAINT_H
#define _PAINT_H
#include "../common.h"
#include "../world/map.h"
typedef struct attached_paint_struct attached_paint_struct;
/* size 0x12 */
struct attached_paint_struct {
uint32 image_id; // 0x00
union {
uint32 tertiary_colour;
// If masked image_id is masked_id
uint32 colour_image_id;
};
uint16 x; // 0x08
uint16 y; // 0x0A
uint8 flags; // 0x0C
uint8 pad_0D;
attached_paint_struct* next; //0x0E
};
typedef struct paint_struct paint_struct;
/* size 0x34 */
struct paint_struct {
uint32 image_id; // 0x00
union {
uint32 tertiary_colour;
// If masked image_id is masked_id
uint32 colour_image_id;
};
uint16 bound_box_x; // 0x08
uint16 bound_box_y; // 0x0A
uint16 bound_box_z; // 0x0C
uint16 bound_box_z_end; // 0x0E
uint16 bound_box_x_end; // 0x10
uint16 bound_box_y_end; // 0x12
uint16 x; // 0x14
uint16 y; // 0x16
uint16 var_18;
uint8 flags;
uint8 var_1B;
attached_paint_struct* attached_ps; //0x1C
paint_struct* var_20;
paint_struct* next_quadrant_ps; // 0x24
uint8 sprite_type; //0x28
uint8 var_29;
uint16 pad_2A;
uint16 map_x; // 0x2C
uint16 map_y; // 0x2E
rct_map_element *mapElement; // 0x30 (or sprite pointer)
};
typedef struct paint_string_struct paint_string_struct;
/* size 0x1E */
struct paint_string_struct {
rct_string_id string_id; // 0x00
paint_string_struct *next; // 0x02
uint16 x; // 0x06
uint16 y; // 0x08
uint8 args[16]; // 0x0A
uint8 *y_offsets; // 0x1A
};
enum PAINT_STRUCT_FLAGS {
PAINT_STRUCT_FLAG_IS_MASKED = (1 << 0)
};
bool paint_attach_to_previous_attach(uint32 image_id, uint16 x, uint16 y);
bool paint_attach_to_previous_ps(uint32 image_id, uint16 x, uint16 y);
void sub_685EBC(money32 amount, uint16 string_id, sint16 y, sint16 z, sint8 y_offsets[], sint16 offset_x, uint32 rotation);
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,105 +0,0 @@
#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers
/*****************************************************************************
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
*
* OpenRCT2 is the work of many authors, a full list can be found in contributors.md
* For more information, visit https://github.com/OpenRCT2/OpenRCT2
*
* OpenRCT2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* A full copy of the GNU General Public License can be found in licence.txt
*****************************************************************************/
#pragma endregion
#ifndef _PAINT_SURFACE_H
#define _PAINT_SURFACE_H
#include "../common.h"
#include "../world/map.h"
enum
{
SPR_TERRAIN_GRASS = 1915,
SPR_TERRAIN_GRASS_GRID = 1934,
SPR_TERRAIN_GRASS_UNDERGROUND = 1953,
SPR_TERRAIN_SAND = 1972,
SPR_TERRAIN_SAND_GRID = 1991,
SPR_TERRAIN_SAND_UNDERGROUND = 2010,
SPR_TERRAIN_SAND_RED = 2029,
SPR_TERRAIN_SAND_RED_GRID = 2048,
SPR_TERRAIN_SAND_RED_UNDERGROUND = 2067,
SPR_TERRAIN_SAND_YELLOW = 2086,
SPR_TERRAIN_SAND_YELLOW_GRID = 2105,
SPR_TERRAIN_SAND_YELLOW_UNDERGROUND = 2124,
SPR_TERRAIN_ICE = 2143,
SPR_TERRAIN_ICE_GRID = 2162,
SPR_TERRAIN_ICE_UNDERGROUND = 2181,
SPR_TERRAIN_GRASS_CLUMPS = 2200,
SPR_TERRAIN_GRASS_CLUMPS_GRID = 2219,
SPR_TERRAIN_GRASS_CLUMPS_UNDERGROUND = 2238,
SPR_TERRAIN_GRID = 2257,
SPR_TERRAIN_GRID_GRID = 2276,
SPR_TERRAIN_GRID_UNDERGROUND = 2295,
SPR_TERRAIN_MARTIAN = 2314,
SPR_TERRAIN_MARTIAN_GRID = 2333,
SPR_TERRAIN_MARTIAN_UNDERGROUND = 2352,
SPR_TERRAIN_CHECKERBOARD = 2371,
SPR_TERRAIN_CHECKERBOARD_GRID = 2390,
SPR_TERRAIN_CHECKERBOARD_UNDERGROUND = 2409,
SPR_TERRAIN_CHECKERBOARD_INVERTED = 2428,
SPR_TERRAIN_CHECKERBOARD_INVERTED_GRID = 2447,
SPR_TERRAIN_CHECKERBOARD_INVERTED_UNDERGROUND = 2466,
SPR_TERRAIN_DIRT = 2485,
SPR_TERRAIN_DIRT_GRID = 2504,
SPR_TERRAIN_DIRT_UNDERGROUND = 2523,
SPR_TERRAIN_ROCK = 2542,
SPR_TERRAIN_ROCK_GRID = 2561,
SPR_TERRAIN_ROCK_UNDERGROUND = 2580,
SPR_TERRAIN_SELECTION_PATROL_AREA = 2599,
SPR_TERRAIN_GRASS_MOWED = 2663,
SPR_TERRAIN_GRASS_MOWED_GRID = 2682,
SPR_TERRAIN_GRASS_MOWED_90 = 2701,
SPR_TERRAIN_GRASS_MOWED_90_GRID = 2720,
SPR_TERRAIN_GRASS_LENGTH_4_VARIANT_1 = 2739,
SPR_TERRAIN_GRASS_LENGTH_4_VARIANT_1_GRID = 2758,
SPR_TERRAIN_GRASS_LENGTH_4_VARIANT_2 = 2777,
SPR_TERRAIN_GRASS_LENGTH_4_VARIANT_2_GRID = 2796,
SPR_TERRAIN_GRASS_LENGTH_4_VARIANT_3 = 2815,
SPR_TERRAIN_GRASS_LENGTH_4_VARIANT_3_GRID = 2834,
SPR_TERRAIN_GRASS_LENGTH_4_VARIANT_4 = 2853,
SPR_TERRAIN_GRASS_LENGTH_4_VARIANT_4_GRID = 2872,
SPR_TERRAIN_GRASS_LENGTH_6_VARIANT_1 = 2891,
SPR_TERRAIN_GRASS_LENGTH_6_VARIANT_1_GRID = 2910,
SPR_TERRAIN_GRASS_LENGTH_6_VARIANT_2 = 2929,
SPR_TERRAIN_GRASS_LENGTH_6_VARIANT_2_GRID = 2948,
SPR_TERRAIN_GRASS_LENGTH_6_VARIANT_3 = 2967,
SPR_TERRAIN_GRASS_LENGTH_6_VARIANT_3_GRID = 2986,
SPR_TERRAIN_GRASS_LENGTH_6_VARIANT_4 = 3005,
SPR_TERRAIN_GRASS_LENGTH_6_VARIANT_4_GRID = 3024,
SPR_TERRAIN_SELECTION_CORNER = 3043,
SPR_TERRAIN_SELECTION_EDGE = 3062,
SPR_TERRAIN_SELECTION_QUARTER = 3081,
SPR_WATER_MASK = 5048,
SPR_WATER_OVERLAY = 5053,
SPR_HEIGHT_MARKER_BASE = 5769,
SPR_TERRAIN_EDGE_MASK_TOP_RIGHT = 28883,
SPR_TERRAIN_EDGE_MASK_BOTTOM_RIGHT = 28902,
SPR_TERRAIN_EDGE_MASK_BOTTOM_LEFT = 28921,
SPR_TERRAIN_EDGE_MASK_TOP_LEFT = 28940,
SPR_TERRAIN_PATTERN_GRASS = 28959,
SPR_TERRAIN_PATTERN_SAND = 28965,
SPR_TERRAIN_PATTERN_SAND_RED = 28971,
SPR_TERRAIN_PATTERN_DIRT = 28977,
SPR_TERRAIN_PATTERN_SAND_YELLOW = 28983,
SPR_TERRAIN_PATTERN_ROCK = 28989,
SPR_TERRAIN_PATTERN_MARTIAN = 28995,
SPR_TERRAIN_PATTERN_GRASS_CLUMPS = 29001,
SPR_TERRAIN_PATTERN_ICE = 29007,
};
void viewport_surface_paint_setup(uint8 direction, uint16 height, rct_map_element *mapElement);
#endif //_PAINT_SURFACE_H

File diff suppressed because it is too large Load Diff

View File

@@ -72,56 +72,6 @@ enum {
VIEWPORT_INTERACTION_MASK_BANNER = ~(1 << (VIEWPORT_INTERACTION_ITEM_BANNER - 2)), // Note the -2 for BANNER
};
typedef struct paint_struct paint_struct;
typedef struct attached_paint_struct attached_paint_struct;
struct attached_paint_struct {
uint32 image_id; // 0x00
union {
uint32 tertiary_colour;
// If masked image_id is masked_id
uint32 colour_image_id;
};
uint16 x; // 0x08
uint16 y; // 0x0A
uint8 flags;
uint8 pad_0D;
attached_paint_struct* next; //0x0E
};
struct paint_struct {
uint32 image_id; // 0x00
union {
uint32 tertiary_colour;
// If masked image_id is masked_id
uint32 colour_image_id;
};
uint16 bound_box_x; // 0x08
uint16 bound_box_y; // 0x0A
uint16 bound_box_z; // 0x0C
uint16 bound_box_z_end; // 0x0E
uint16 bound_box_x_end; // 0x10
uint16 bound_box_y_end; // 0x12
uint16 x; // 0x14
uint16 y; // 0x16
uint16 var_18;
uint8 flags;
uint8 var_1B;
attached_paint_struct* attached_ps; //0x1C
paint_struct* var_20;
paint_struct* next_quadrant_ps; // 0x24
uint8 sprite_type; //0x28
uint8 var_29;
uint16 pad_2A;
uint16 map_x; // 0x2C
uint16 map_y; // 0x2E
rct_map_element *mapElement; // 0x30 (or sprite pointer)
};
enum PAINT_STRUCT_FLAGS {
PAINT_STRUCT_FLAG_IS_MASKED = (1 << 0)
};
typedef struct {
int type;
int x;
@@ -186,11 +136,6 @@ void painter_setup();
void paint_quadrant_ps();
void sub_688217();
bool 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, uint16 z_offset, uint32 rotation);
bool sub_98197C(uint32 image_id, sint8 x_offset, sint8 y_offset, sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, uint16 z_offset, sint16 bound_box_offset_x, sint16 bound_box_offset_y, sint16 bound_box_offset_z, uint32 rotation);
bool sub_98198C(uint32 image_id, sint8 x_offset, sint8 y_offset, sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, uint16 z_offset, sint16 bound_box_offset_x, uint16 bound_box_offset_y, sint16 bound_box_offset_z, uint32 rotation);
bool sub_98199C(uint32 image_id, sint8 x_offset, sint8 y_offset, sint16 bound_box_length_x, sint16 bound_box_length_y, sint8 bound_box_length_z, uint16 z_offset, sint16 bound_box_offset_x, uint16 bound_box_offset_y, sint16 bound_box_offset_z, uint32 rotation);
void viewport_invalidate(rct_viewport *viewport, int left, int top, int right, int bottom);
void screen_get_map_xy(int screenX, int screenY, sint16 *x, sint16 *y, rct_viewport **viewport);