integrate variables for various drawing pointers

This commit is contained in:
Ted John authored and Michał Janiszewski committed 2016-06-16 11:36:15 +02:00
1 parent a5c119ba60
commit ad1b9265dc
34 files changed
+110 -80

No files matched your search

+6
View File
@@ -34,6 +34,12 @@ uint32 gPickupPeepImage;
sint32 gPickupPeepX;
sint32 gPickupPeepY;
void *unk_9ABDA4;
void *unk_9E3CDC;
void *unk_9E3CE4[8];
#if NO_RCT2
rct_drawpixelinfo *unk_140E9A8;
#endif
//Originally 0x9ABE0C, 12 elements from 0xF3 are the peep top colour, 12 elements from 0xCA are peep trouser colour
const uint8 peep_palette[0x100] = {
+12
View File
@@ -113,6 +113,18 @@ extern sint32 gPickupPeepY;
extern rct_g1_element *g1Elements;
extern rct_gx g2;
extern rct_drawpixelinfo gScreenDPI;
extern rct_drawpixelinfo gWindowDPI;
extern void *unk_9ABDA4;
extern void *unk_9E3CDC;
extern void *unk_9E3CE4[8];
#if NO_RCT2
extern rct_drawpixelinfo *unk_140E9A8;
#else
#define unk_140E9A8 RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo*)
#endif
//
bool clip_drawpixelinfo(rct_drawpixelinfo *dst, rct_drawpixelinfo *src, int x, int y, int width, int height);
void gfx_set_dirty_blocks(sint16 left, sint16 top, sint16 right, sint16 bottom);
+1 -1
View File
@@ -144,7 +144,7 @@ int scrolling_text_setup(rct_string_id stringId, uint16 scroll, uint16 scrolling
memcpy(gCommonFormatArgs, (const void*)0x013CE952, 16);
}
rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo* dpi = unk_140E9A8;
if (dpi->zoom_level != 0) return 0x626;
+9 -10
View File
@@ -136,11 +136,10 @@ int gfx_load_g2()
*/
void sub_68371D()
{
uint8 **unk_9E3CE4 = (uint8**)0x009E3CE4;
unk_9E3CE4[0] = NULL;
for (int i = 1; i < 8; i++)
for (int i = 1; i < 8; i++) {
unk_9E3CE4[i] = g1Elements[23199 + i].offset;
}
}
/**
@@ -238,7 +237,7 @@ static void FASTCALL gfx_bmp_sprite_to_buffer(uint8* palette_pointer, uint8* unk
return;
}
if (RCT2_GLOBAL(0x9E3CDC, uint32) != 0){//Not tested. I can't actually work out when this code runs.
if (unk_9E3CDC != NULL) { //Not tested. I can't actually work out when this code runs.
unknown_pointer += source_pointer - source_image->offset;
for (; height > 0; height -= zoom_amount){
@@ -301,14 +300,14 @@ void FASTCALL gfx_draw_sprite_software(rct_drawpixelinfo *dpi, int image_id, int
RCT2_GLOBAL(0x00EDF81C, uint32) = image_id & 0xE0000000;
uint8* unknown_pointer = (uint8*)(RCT2_ADDRESS(0x9E3CE4, uint32*)[image_sub_type]);
RCT2_GLOBAL(0x009E3CDC, uint32) = (uint32)unknown_pointer;
uint8* unknown_pointer = (uint8*)unk_9E3CE4[image_sub_type];
unk_9E3CDC = unknown_pointer;
if (image_type && !(image_type & IMAGE_TYPE_UNKNOWN)) {
uint8 palette_ref = (image_id >> 19) & 0xFF;
if (image_type & IMAGE_TYPE_MIX_BACKGROUND){
unknown_pointer = NULL;
RCT2_GLOBAL(0x009E3CDC, uint32) = 0;
unk_9E3CDC = NULL;
}
else{
palette_ref &= 0x7F;
@@ -318,7 +317,7 @@ void FASTCALL gfx_draw_sprite_software(rct_drawpixelinfo *dpi, int image_id, int
palette_pointer = g1Elements[palette_offset].offset;
}
else if (image_type && !(image_type & IMAGE_TYPE_USE_PALETTE)){
RCT2_GLOBAL(0x9E3CDC, uint32) = 0;
unk_9E3CDC = NULL;
unknown_pointer = NULL;
palette_pointer = RCT2_ADDRESS(0x9ABF0C, uint8);
@@ -343,7 +342,7 @@ void FASTCALL gfx_draw_sprite_software(rct_drawpixelinfo *dpi, int image_id, int
image_id |= IMAGE_TYPE_USE_PALETTE << 28;
}
else if (image_type){
RCT2_GLOBAL(0x9E3CDC, uint32) = 0;
unk_9E3CDC = NULL;
unknown_pointer = NULL;
palette_pointer = RCT2_ADDRESS(0x9ABE0C, uint8);
@@ -362,7 +361,7 @@ void FASTCALL gfx_draw_sprite_software(rct_drawpixelinfo *dpi, int image_id, int
}
//For backwards compatibility
RCT2_GLOBAL(0x9ABDA4, uint8*) = palette_pointer;
unk_9ABDA4 = palette_pointer;
gfx_draw_sprite_palette_set_software(dpi, image_id, x, y, palette_pointer, unknown_pointer);
}
+5 -5
View File
@@ -461,7 +461,7 @@ void colour_char(uint8 colour, uint16* current_font_flags, uint8* palette_pointe
palette_pointer[2] = (eax >> 8) & 0xFF;
palette_pointer[3] = (eax >> 16) & 0xFF;
palette_pointer[4] = (eax >> 24) & 0xFF;
RCT2_GLOBAL(0x009ABDA4, uint32) = (uint32)palette_pointer;
unk_9ABDA4 = palette_pointer;
}
/**
@@ -481,7 +481,7 @@ void colour_char_window(uint8 colour, uint16* current_font_flags,uint8* palette_
palette_pointer[2] = (eax >> 8) & 0xFF;
palette_pointer[3] = (eax >> 16) & 0xFF;
palette_pointer[4] = (eax >> 24) & 0xFF;
RCT2_GLOBAL(0x009ABDA4, uint32) = (uint32)palette_pointer;
unk_9ABDA4 = palette_pointer;
}
/**
@@ -916,7 +916,7 @@ static void ttf_draw_character_sprite(rct_drawpixelinfo *dpi, int codepoint, tex
int sprite = font_sprite_get_codepoint_sprite(info->font_sprite_base, codepoint);
if (!(info->flags & TEXT_DRAW_FLAG_NO_DRAW)) {
RCT2_GLOBAL(0x009ABDA4, uint8*) = (uint8*)&info->palette;
unk_9ABDA4 = &info->palette;
RCT2_GLOBAL(0x00EDF81C, uint32) = (IMAGE_TYPE_USE_PALETTE << 28);
int x = info->x;
@@ -1079,7 +1079,7 @@ static const utf8 *ttf_process_format_code(rct_drawpixelinfo *dpi, const utf8 *t
memcpy(info->palette + 5, &(g1Element->offset[250]), 2);
// Set the palette pointer
RCT2_GLOBAL(0x009ABDA4, uint32) = (uint32)&info->palette;
unk_9ABDA4 = &info->palette;
break;
}
case 3:
@@ -1251,7 +1251,7 @@ static void ttf_process_initial_colour(int colour, text_draw_info *info)
info->palette[2] = (eax >> 8) & 0xFF;
info->palette[3] = (eax >> 16) & 0xFF;
info->palette[4] = (eax >> 24) & 0xFF;
RCT2_GLOBAL(0x009ABDA4, uint8*) = (uint8*)&info->palette;
unk_9ABDA4 = &info->palette;
eax = 0;
}
}
+11 -6
View File
@@ -41,6 +41,11 @@
rct_viewport g_viewport_list[MAX_VIEWPORT_COUNT];
#if NO_RCT2
paint_struct *unk_EE7884;
paint_struct *unk_EE7888;
#endif
/**
* This is not a viewport function. It is used to setup many variables for
* multiple things.
@@ -741,7 +746,7 @@ void viewport_paint(rct_viewport* viewport, rct_drawpixelinfo* dpi, int left, in
gfx_clear(dpi2, colour);
}
RCT2_GLOBAL(0xEE7880, uint32) = 0xF1A4CC;
RCT2_GLOBAL(0x140E9A8, uint32) = (int)dpi2;
unk_140E9A8 = dpi2;
painter_setup();
viewport_paint_setup();
sub_688217();
@@ -1019,7 +1024,7 @@ static bool sub_679236_679662_679B0D_679FF1(uint32 ebx, rct_g1_element *image, u
}
if (ebx & 0x20000000) {
uint8 *ebx_palette = RCT2_GLOBAL(0x009ABDA4, uint8*);
uint8 *ebx_palette = unk_9ABDA4;
uint8 al = *esi;
uint8 al2 = *(al + ebx_palette);
@@ -1288,7 +1293,7 @@ void sub_679023(rct_drawpixelinfo *dpi, int imageId, int x, int y)
index &= 0x1F;
}
int g1Index = RCT2_ADDRESS(0x0097FCBC, uint32)[index];
RCT2_GLOBAL(0x009ABDA4, uint8*) = g1Elements[g1Index].offset;
unk_9ABDA4 = g1Elements[g1Index].offset;
} else {
RCT2_GLOBAL(0x00EDF81C, uint32) = 0;
}
@@ -1301,8 +1306,8 @@ void sub_679023(rct_drawpixelinfo *dpi, int imageId, int x, int y)
*/
void sub_68862C()
{
rct_drawpixelinfo *dpi = RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo*);
paint_struct *ps = RCT2_GLOBAL(0x00EE7884, paint_struct*), *old_ps, *next_ps;
rct_drawpixelinfo *dpi = unk_140E9A8;
paint_struct *ps = unk_EE7884, *old_ps, *next_ps;
while ((ps = ps->next_quadrant_ps) != NULL) {
old_ps = ps;
@@ -1372,7 +1377,7 @@ void get_map_coordinates_from_pos(int screenX, int screenY, int flags, sint16 *x
dpi->x = RCT2_GLOBAL(RCT2_ADDRESS_VIEWPORT_PAINT_X, int16_t);
dpi->width = 1;
RCT2_GLOBAL(0xEE7880, uint32_t) = 0xF1A4CC;
RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*) = dpi;
unk_140E9A8 = dpi;
painter_setup();
viewport_paint_setup();
sub_688217();
+8
View File
@@ -19,6 +19,7 @@
#include "../world/map.h"
#include "../world/sprite.h"
#include "../paint/paint.h"
#include "window.h"
enum {
@@ -95,6 +96,13 @@ typedef struct viewport_interaction_info {
// rct2: 0x014234BC
extern rct_viewport g_viewport_list[MAX_VIEWPORT_COUNT];
#if NO_RCT2
extern paint_struct *unk_EE7884;
extern paint_struct *unk_EE7888;
#else
#define unk_EE7884 RCT2_GLOBAL(0x00EE7884, paint_struct*)
#define unk_EE7888 RCT2_GLOBAL(0x00EE7888, paint_struct*)
#endif
void viewport_init_all();
void center_2d_coordinates(int x, int y, int z, int* out_x, int* out_y, rct_viewport* viewport);
+1 -1
View File
@@ -30,7 +30,7 @@
void banner_paint(uint8 direction, int height, rct_map_element* map_element)
{
uint16 boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ;
rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo* dpi = unk_140E9A8;
gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_BANNER;
+1 -1
View File
@@ -246,7 +246,7 @@ void park_entrance_paint(uint8 direction, int height, rct_map_element* map_eleme
void entrance_paint(uint8 direction, int height, rct_map_element* map_element){
gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_LABEL;
rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo* dpi = unk_140E9A8;
if (gCurrentViewportFlags & VIEWPORT_FLAG_PATH_HEIGHTS &&
dpi->zoom_level == 0){
+2 -2
View File
@@ -132,10 +132,10 @@ void fence_paint_wall(uint32 frameNum, const rct_scenery_entry * sceneryEntry, u
*/
void fence_paint(uint8 direction, int height, rct_map_element * map_element)
{
rct_drawpixelinfo * dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo *);
rct_drawpixelinfo * dpi = unk_140E9A8;
gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_WALL;
rct_scenery_entry * sceneryEntry = get_wall_entry(map_element->properties.fence.type);
rct_scenery_entry * sceneryEntry = get_wall_entry(map_element->properties.fence.type);
uint32 frameNum = 0;
if (sceneryEntry->wall.flags2 & WALL_SCENERY_2_FLAG_5) {
+2 -2
View File
@@ -90,7 +90,7 @@ void sub_68B2B7(int x, int y)
*/
static void blank_tiles_paint(int x, int y)
{
rct_drawpixelinfo *dpi = RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo *dpi = unk_140E9A8;
int dx;
switch (get_current_rotation()) {
@@ -132,7 +132,7 @@ bool gShowSupportSegmentHeights = false;
*/
static void sub_68B3FB(int x, int y)
{
rct_drawpixelinfo *dpi = RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo *dpi = unk_140E9A8;
RCT2_GLOBAL(0x141F56A, uint16_t) = 0;
RCT2_GLOBAL(0x9E3138, uint8_t) = 0xFF;
+1 -1
View File
@@ -139,7 +139,7 @@ void scenery_paint(uint8 direction, int height, rct_map_element* mapElement) {
}
if (entry->small_scenery.flags & SMALL_SCENERY_FLAG_ANIMATED) {
rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo* dpi = unk_140E9A8;
if ( !(entry->small_scenery.flags & SMALL_SCENERY_FLAG21) || (dpi->zoom_level <= 1) ) {
// 6E01A9:
if (entry->small_scenery.flags & SMALL_SCENERY_FLAG12) {
+2 -2
View File
@@ -241,7 +241,7 @@ void scenery_multiple_paint(uint8 direction, uint16 height, rct_map_element *map
return;
}
}
rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo* dpi = unk_140E9A8;
if (dpi->zoom_level > 1) {
scenery_multiple_paint_supports(direction, height, mapElement, dword_F4387C, tile);
return;
@@ -324,7 +324,7 @@ void scenery_multiple_paint(uint8 direction, uint16 height, rct_map_element *map
}
return;
}
rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo* dpi = unk_140E9A8;
if (dpi->zoom_level > 0) {
scenery_multiple_paint_supports(direction, height, mapElement, dword_F4387C, tile);
return;
+1 -1
View File
@@ -965,7 +965,7 @@ void viewport_surface_draw_water_side_bottom(enum edge edge, uint8 height, uint8
*/
void surface_paint(uint8 direction, uint16 height, rct_map_element * mapElement)
{
rct_drawpixelinfo * dpi = RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo * dpi = unk_140E9A8;
gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_TERRAIN;
RCT2_GLOBAL(0x9DE57C, uint16) |= 1; // Probably a boolean indicating 'above surface'
RCT2_GLOBAL(0x9E3250, rct_map_element *) = mapElement;
+23 -23
View File
@@ -33,7 +33,7 @@ const uint32 construction_markers[] = {
* rct2: 0x0068615B
*/
void painter_setup() {
RCT2_GLOBAL(0xEE7888, uint32) = 0x00EE788C;
unk_EE7888 = (paint_struct*)0x00EE788C;
RCT2_GLOBAL(0xF1AD28, uint32) = 0;
RCT2_GLOBAL(0xF1AD2C, uint32) = 0;
uint8* edi = RCT2_ADDRESS(0xF1A50C, uint8);
@@ -49,7 +49,7 @@ void painter_setup() {
*/
paint_struct * sub_9819_c(uint32 image_id, rct_xyz16 offset, rct_xyz16 boundBoxSize, rct_xyz16 boundBoxOffset, uint8 rotation)
{
paint_struct * ps = RCT2_GLOBAL(0xEE7888, paint_struct*);
paint_struct * ps = unk_EE7888;
if ((uint32) ps >= RCT2_GLOBAL(0xEE7880, uint32))return NULL;
@@ -89,7 +89,7 @@ paint_struct * sub_9819_c(uint32 image_id, rct_xyz16 offset, rct_xyz16 boundBoxS
RCT2_GLOBAL(0xF1AD1C, uint16) = left;
RCT2_GLOBAL(0xF1AD1E, uint16) = bottom;
rct_drawpixelinfo * dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo * dpi = unk_140E9A8;
if (right <= dpi->x)return NULL;
if (top <= dpi->y)return NULL;
@@ -166,7 +166,7 @@ paint_struct * sub_98196C(
RCT2_GLOBAL(0xF1AD2C, uint32) = 0;
//Not a paint struct but something similar
paint_struct *ps = RCT2_GLOBAL(0xEE7888, paint_struct*);
paint_struct *ps = unk_EE7888;
if ((uint32) ps >= RCT2_GLOBAL(0xEE7880, uint32)) {
return NULL;
@@ -242,7 +242,7 @@ paint_struct * sub_98196C(
RCT2_GLOBAL(0xF1AD1C, sint16) = left;
RCT2_GLOBAL(0xF1AD1E, sint16) = bottom;
rct_drawpixelinfo *dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo *dpi = unk_140E9A8;
if (right <= dpi->x) return NULL;
if (top <= dpi->y) return NULL;
@@ -302,7 +302,7 @@ paint_struct * sub_98196C(
RCT2_GLOBAL(0x00F1AD10, uint32) = edi;
}
RCT2_GLOBAL(0xEE7888, paint_struct*) ++;
unk_EE7888 ++;
return ps;
}
@@ -386,7 +386,7 @@ paint_struct * sub_98197C(
RCT2_GLOBAL(0x00F1AD10, uint32) = di;
}
RCT2_GLOBAL(0xEE7888, paint_struct*)++;
unk_EE7888++;
return ps;
}
@@ -431,7 +431,7 @@ paint_struct * sub_98198C(
}
RCT2_GLOBAL(0xF1AD28, paint_struct*) = ps;
RCT2_GLOBAL(0xEE7888, paint_struct*)++;
unk_EE7888++;
return ps;
}
@@ -487,7 +487,7 @@ paint_struct * sub_98199C(
old_ps->var_20 = ps;
RCT2_GLOBAL(0xF1AD28, paint_struct*) = ps;
RCT2_GLOBAL(0xEE7888, paint_struct*)++;
unk_EE7888++;
return ps;
}
@@ -505,7 +505,7 @@ bool paint_attach_to_previous_attach(uint32 image_id, uint16 x, uint16 y)
return paint_attach_to_previous_ps(image_id, x, y);
}
attached_paint_struct * ps = RCT2_GLOBAL(0xEE7888, attached_paint_struct *);
attached_paint_struct * ps = (attached_paint_struct *)unk_EE7888;
if ((uint32) ps >= RCT2_GLOBAL(0xEE7880, uint32)) {
return false;
@@ -523,7 +523,7 @@ bool paint_attach_to_previous_attach(uint32 image_id, uint16 x, uint16 y)
RCT2_GLOBAL(0xF1AD2C, attached_paint_struct *) = ps;
RCT2_GLOBAL(0xEE7888, attached_paint_struct *)++;
unk_EE7888++;
return true;
}
@@ -538,7 +538,7 @@ 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)
{
attached_paint_struct * ps = RCT2_GLOBAL(0xEE7888, attached_paint_struct *);
attached_paint_struct * ps = (attached_paint_struct *)unk_EE7888;
if ((uint32) ps >= RCT2_GLOBAL(0xEE7880, uint32)) {
return false;
@@ -554,7 +554,7 @@ bool paint_attach_to_previous_ps(uint32 image_id, uint16 x, uint16 y)
return false;
}
RCT2_GLOBAL(0x00EE7888, attached_paint_struct *)++;
unk_EE7888++;
attached_paint_struct * oldFirstAttached = masterPs->attached_ps;
masterPs->attached_ps = ps;
@@ -578,7 +578,7 @@ 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)
{
paint_string_struct * ps = RCT2_GLOBAL(0xEE7888, paint_string_struct*);
paint_string_struct * ps = (paint_string_struct *)unk_EE7888;
if ((uint32) ps >= RCT2_GLOBAL(0xEE7880, uint32)) {
return;
@@ -598,7 +598,7 @@ void sub_685EBC(money32 amount, uint16 string_id, sint16 y, sint16 z, sint8 y_of
ps->x = coord.x + offset_x;
ps->y = coord.y;
RCT2_GLOBAL(0xEE7888, paint_string_struct*)++;
unk_EE7888++;
paint_string_struct * oldPs = RCT2_GLOBAL(0xF1AD24, paint_string_struct*);
@@ -617,7 +617,7 @@ void sub_685EBC(money32 amount, uint16 string_id, sint16 y, sint16 z, sint8 y_of
*/
void viewport_paint_setup()
{
rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo* dpi = unk_140E9A8;
rct_xy16 mapTile = {
.x = dpi->x & 0xFFE0,
@@ -725,7 +725,7 @@ void viewport_paint_setup()
void sub_688217_helper(uint16 ax, uint8 flag)
{
paint_struct *ps, *ps_temp;
paint_struct *ps_next = RCT2_GLOBAL(0x00EE7884, paint_struct*);
paint_struct *ps_next = unk_EE7884;
do {
ps = ps_next;
@@ -834,10 +834,10 @@ void sub_688217_helper(uint16 ax, uint8 flag)
*/
void sub_688217()
{
paint_struct *ps = RCT2_GLOBAL(0x00EE7888, paint_struct*);
paint_struct *ps = unk_EE7888;
paint_struct *ps_next;
RCT2_GLOBAL(0x00EE7888, paint_struct*)++;
RCT2_GLOBAL(0x00EE7884, paint_struct*) = ps;
unk_EE7888++;
unk_EE7884 = ps;
ps->next_quadrant_ps = NULL;
uint32 edi = RCT2_GLOBAL(0x00F1AD0C, uint32);
if (edi == -1)
@@ -904,8 +904,8 @@ void paint_attached_ps(paint_struct* ps, attached_paint_struct* attached_ps, rct
/* rct2: 0x00688485 */
void paint_quadrant_ps() {
rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
paint_struct* ps = RCT2_GLOBAL(0xEE7884, paint_struct*);
rct_drawpixelinfo* dpi = unk_140E9A8;
paint_struct* ps = unk_EE7884;
paint_struct* previous_ps = ps->next_quadrant_ps;
for (ps = ps->next_quadrant_ps; ps;) {
@@ -986,7 +986,7 @@ void viewport_draw_money_effects()
if (ps == NULL)
return;
rct_drawpixelinfo dpi = *(RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo*));
rct_drawpixelinfo dpi = *(unk_140E9A8);
draw_pixel_info_crop_by_zoom(&dpi);
do {
+1 -1
View File
@@ -27,7 +27,7 @@ void litter_paint(rct_litter *litter, int imageDirection)
{
rct_drawpixelinfo *dpi;
dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
dpi = unk_140E9A8;
if (dpi->zoom_level != 0) return; // If zoomed at all no litter drawn
// litter has no sprite direction so remove that
+2 -2
View File
@@ -36,7 +36,7 @@ const uint32 vehicle_particle_base_sprites[] = {
*/
void misc_paint(rct_sprite *misc, int imageDirection)
{
rct_drawpixelinfo * dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo *);
rct_drawpixelinfo * dpi = unk_140E9A8;
switch (misc->steam_particle.misc_identifier) {
case SPRITE_MISC_STEAM_PARTICLE: // 0
@@ -193,4 +193,4 @@ void misc_paint(rct_sprite *misc, int imageDirection)
break;
}
}
}
}
+1 -1
View File
@@ -25,7 +25,7 @@
*/
void peep_paint(rct_peep * peep, int imageDirection)
{
rct_drawpixelinfo * dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo * dpi = unk_140E9A8;
if (dpi->zoom_level > 2) {
return;
}
+2 -2
View File
@@ -39,13 +39,13 @@ void sprite_paint_setup(const uint16 eax, const uint16 ecx) {
if (gCurrentViewportFlags & VIEWPORT_FLAG_INVISIBLE_SPRITES) return;
dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
dpi = unk_140E9A8;
if (dpi->zoom_level > 2) return;
for (rct_sprite* spr = &g_sprite_list[sprite_idx]; sprite_idx != SPRITE_INDEX_NULL; sprite_idx = spr->unknown.next_in_quadrant) {
spr = &g_sprite_list[sprite_idx];
dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
dpi = unk_140E9A8;
if (dpi->y + dpi->height <= spr->unknown.sprite_top) continue;
if (spr->unknown.sprite_bottom <= dpi->y)continue;
+2 -2
View File
@@ -212,7 +212,7 @@ void vehicle_visual_virginia_reel(int x, int imageDirection, int y, int z, rct_v
image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0xA0000000;
sub_98197C(image_id, 0, 0, bb->length_x, bb->length_y, bb->length_z, z, bb->offset_x, bb->offset_y, bb->offset_z + z, rotation);
if (RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*)->zoom_level < 2 && vehicle->num_peeps > 0) {
if (unk_140E9A8->zoom_level < 2 && vehicle->num_peeps > 0) {
uint8 riding_peep_sprites[4] = {0xFF, 0xFF, 0xFF, 0xFF};
for (int i = 0; i < vehicle->num_peeps; i++) {
riding_peep_sprites[((ecx / 8) + i) & 3] = vehicle->peep_tshirt_colours[i];
@@ -538,4 +538,4 @@ TRACK_PAINT_FUNCTION get_track_paint_function_virginia_reel(int trackType, int d
}
return NULL;
}
}
+1 -1
View File
@@ -64,7 +64,7 @@ static void paint_haunted_house_structure(uint8 rideIndex, uint8 direction, sint
haunted_house_bound_box boundBox = haunted_house_data[part];
sub_98197C(imageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x, boundBox.offset_y, height, get_current_rotation());
rct_drawpixelinfo * dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo * dpi = unk_140E9A8;
if (dpi->zoom_level == 0 && frameNum != 0) {
switch (direction) {
case 0: imageId = baseImageId + 3 + frameNum; break;
+2 -2
View File
@@ -72,7 +72,7 @@ static void paint_merry_go_round_structure(uint8 rideIndex, uint8 direction, sin
uint32 imageId = (baseImageId + imageOffset) | imageColourFlags;
sub_98197C(imageId, xOffset, yOffset, 24, 24, 48, height, xOffset + 16, yOffset + 16, height, get_current_rotation());
rct_drawpixelinfo * dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo * dpi = unk_140E9A8;
if (dpi->zoom_level == 0
&& ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK
&& vehicle != NULL) {
@@ -160,4 +160,4 @@ TRACK_PAINT_FUNCTION get_track_paint_function_merry_go_round(int trackType, int
}
return paint_merry_go_round;
}
}
+2 -2
View File
@@ -972,7 +972,7 @@ void vehicle_visual_mini_golf_player(int x, int imageDirection, int y, int z, rc
return;
}
rct_drawpixelinfo *edi = RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo *edi = unk_140E9A8;
if (edi->zoom_level >= 2) {
return;
}
@@ -1001,7 +1001,7 @@ void vehicle_visual_mini_golf_ball(int x, int imageDirection, int y, int z, rct_
return;
}
rct_drawpixelinfo *edi = RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo *edi = unk_140E9A8;
if (edi->zoom_level >= 1) {
return;
}
+1 -1
View File
@@ -102,7 +102,7 @@ static void spiral_slide_paint_tile_front(uint8 rideIndex, uint8 trackSequence,
sub_98197C(image_id, 16, 16, 8, 16, 108, height, 8, 0, height + 3, get_current_rotation());
}
rct_drawpixelinfo *dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo *dpi = unk_140E9A8;
if (dpi->zoom_level == 0 && ride->slide_in_use != 0) {
uint8 slide_progress = ride->spiral_slide_progress;
if (slide_progress != 0) {
+1 -1
View File
@@ -51,7 +51,7 @@ static void paint_enterprise_structure(rct_ride * ride, sint8 xOffset, sint8 yOf
uint32 imageId = (baseImageId + imageOffset) | imageColourFlags;
sub_98197C(imageId, xOffset, yOffset, 24, 24, 48, height, 0, 0, height, get_current_rotation());
rct_drawpixelinfo * dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo *);
rct_drawpixelinfo * dpi = unk_140E9A8;
if (dpi->zoom_level == 0
&& imageOffset < 12
+1 -1
View File
@@ -57,7 +57,7 @@ void vehicle_visual_launched_freefall(int x, int imageDirection, int y, int z, r
sub_98197C(image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1, rotation);
// Draw peeps:
if (RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*)->zoom_level < 2) {
if (unk_140E9A8->zoom_level < 2) {
if (vehicle->num_peeps > 0) {
baseImage_id = vehicleEntry->base_image_id + 9;
if ((vehicle->restraints_position / 64) == 3) {
+1 -1
View File
@@ -136,7 +136,7 @@ static void paint_magic_carpet_vehicle(rct_ride *ride, uint8 direction, uint32 s
sub_98199C(vehicleImageId | imageColourFlags, (sint8)offset.x, (sint8)offset.y, bbSize.x, bbSize.y, 127, offset.z, bbOffset.x, bbOffset.y, bbOffset.z, get_current_rotation());
// Riders
rct_drawpixelinfo *dpi = RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo *dpi = unk_140E9A8;
if (dpi->zoom_level <= 1 && (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) {
rct_vehicle *vehicle = get_first_vehicle(ride);
if (vehicle != NULL) {
+1 -1
View File
@@ -115,7 +115,7 @@ static void paint_pirate_ship_structure(rct_ride * ride, uint8 direction, sint8
imageId = baseImageId | imageColourFlags;
sub_98199C(imageId, xOffset, yOffset, bounds.length_x, bounds.length_y, 80, height, bounds.offset_x, bounds.offset_y, height, get_current_rotation());
rct_drawpixelinfo * dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo * dpi = unk_140E9A8;
if (dpi->zoom_level <= 1
&& ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK
+1 -1
View File
@@ -171,7 +171,7 @@ static void top_spin_paint_vehicle(sint8 al, sint8 cl, uint8 rideIndex, uint8 di
sub_98199C(image_id, (sint8) seatCoords.x, (sint8) seatCoords.y, lengthX, lengthY, 90, seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ, rotation);
rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo* dpi = unk_140E9A8;
if (dpi->zoom_level < 2 && vehicle != NULL && vehicle->num_peeps != 0) {
image_id =
(vehicle->peep_tshirt_colours[0] << 19) |
+2 -2
View File
@@ -56,7 +56,7 @@ static void paint_twist_structure(rct_ride * ride, uint8 direction, sint8 xOffse
uint32 imageId = (baseImageId + structureFrameNum) | imageColourFlags;
sub_98197C(imageId, xOffset, yOffset, 24, 24, 48, height, xOffset + 16, yOffset + 16, height, get_current_rotation());
rct_drawpixelinfo * dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo * dpi = unk_140E9A8;
if (dpi->zoom_level < 1
&& ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK
@@ -151,4 +151,4 @@ TRACK_PAINT_FUNCTION get_track_paint_function_twist(int trackType, int direction
}
return paint_twist;
}
}
+1 -1
View File
@@ -861,7 +861,7 @@ void track_paint_util_spinning_tunnel_paint(sint8 thickness, sint16 height, uint
*/
void track_paint(uint8 direction, int height, rct_map_element *mapElement)
{
rct_drawpixelinfo *dpi = RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo *dpi = unk_140E9A8;
rct_ride *ride;
int rideIndex, trackType, trackColourScheme, trackSequence;
+1 -1
View File
@@ -905,7 +905,7 @@ void vehicle_sprite_paint(rct_vehicle *vehicle, int ebx, int ecx, int z, const r
if (ps != NULL) {
ps->tertiary_colour = vehicle->colours_extended;
}
rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo*);
rct_drawpixelinfo* dpi = unk_140E9A8;
if (dpi->zoom_level < 2 && vehicle->num_peeps > 0 && vehicleEntry->no_seating_rows > 0) {
baseImage_id += vehicleEntry->no_vehicle_images;
for (int i = 0; i < 8; i++){
+1 -1
View File
@@ -224,7 +224,7 @@ void vehicle_visual_river_rapids(int x, int imageDirection, int y, int z, rct_ve
image_id = baseImage_id | (vehicle->colours.body_colour << 19) | (vehicle->colours.trim_colour << 24) | 0xA0000000;
sub_98197C(image_id, 0, 0, bb->length_x, bb->length_y, bb->length_z, z, bb->offset_x, bb->offset_y, bb->offset_z + z, rotation);
if (RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*)->zoom_level < 2 && vehicle->num_peeps > 0) {
if (unk_140E9A8->zoom_level < 2 && vehicle->num_peeps > 0) {
// Draw peeps: (this particular vehicle doesn't sort them back to front like others so the back ones sometimes clip, but thats how the original does it...)
int peeps = ((ecx / 8) + 0) & 3;
image_id = (baseImage_id + ((peeps + 1) * 72)) | (vehicle->peep_tshirt_colours[0] << 19) | (vehicle->peep_tshirt_colours[1] << 24) | 0xA0000000;
+1 -1
View File
@@ -2252,7 +2252,7 @@ static void window_ride_construction_draw_track_piece(
}
dpi->x += x - width / 2;
dpi->y += y - height / 2 - 16;
RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo*) = dpi;
unk_140E9A8 = dpi;
uint32_t d = unknown << 16;
d |= rideIndex;
d |= trackType << 8;