diff --git a/src/paint/paint.c b/src/paint/paint.c index 38933cec83..f7af917533 100644 --- a/src/paint/paint.c +++ b/src/paint/paint.c @@ -32,8 +32,10 @@ paint_struct * g_ps_F1AD28; attached_paint_struct * g_aps_F1AD2C; paint_string_struct *pss1; paint_string_struct *pss2; +uint32 _F1AD0C; #ifdef NO_RCT2 +uint32 _F1AD10; static paint_struct *_paint_structs[512]; void *g_currently_drawn_item; paint_struct * g_ps_EE7880; @@ -42,6 +44,7 @@ support_height gSupportSegments[9] = { 0 }; support_height gSupport; #else #define _paint_structs (RCT2_ADDRESS(0x00F1A50C, paint_struct*)) +#define _F1AD10 RCT2_GLOBAL(0xF1AD10, uint32) #endif static const uint8 BoundBoxDebugColours[] = { @@ -73,8 +76,8 @@ void painter_setup() { for (int i = 0; i < 512; i++) { _paint_structs[i] = NULL; } - RCT2_GLOBAL(0xF1AD0C, sint32) = -1; - RCT2_GLOBAL(0xF1AD10, uint32) = 0; + _F1AD0C = -1; + _F1AD10 = 0; pss1 = NULL; pss2 = NULL; } @@ -323,12 +326,12 @@ paint_struct * sub_98196C( _paint_structs[edi] = ps; ps->next_quadrant_ps = old_ps; - if ((uint16)edi < RCT2_GLOBAL(0x00F1AD0C, uint32)) { - RCT2_GLOBAL(0x00F1AD0C, uint32) = edi; + if ((uint16)edi < _F1AD0C) { + _F1AD0C = edi; } - if ((uint16)edi > RCT2_GLOBAL(0x00F1AD10, uint32)) { - RCT2_GLOBAL(0x00F1AD10, uint32) = edi; + if ((uint16)edi > _F1AD10) { + _F1AD10 = edi; } unk_EE7888 ++; @@ -407,12 +410,12 @@ paint_struct * sub_98197C( _paint_structs[di] = ps; ps->next_quadrant_ps = old_ps; - if ((uint16)di < RCT2_GLOBAL(0x00F1AD0C, uint32)) { - RCT2_GLOBAL(0x00F1AD0C, uint32) = di; + if ((uint16)di < _F1AD0C) { + _F1AD0C = di; } - if ((uint16)di > RCT2_GLOBAL(0x00F1AD10, uint32)) { - RCT2_GLOBAL(0x00F1AD10, uint32) = di; + if ((uint16)di > _F1AD10) { + _F1AD10 = di; } unk_EE7888++; @@ -868,7 +871,7 @@ void sub_688217() unk_EE7888++; unk_EE7884 = ps; ps->next_quadrant_ps = NULL; - uint32 edi = RCT2_GLOBAL(0x00F1AD0C, uint32); + uint32 edi = _F1AD0C; if (edi == -1) return; @@ -881,15 +884,15 @@ void sub_688217() ps_next = ps_next->next_quadrant_ps; } while (ps_next != NULL); } - } while (++edi <= RCT2_GLOBAL(0x00F1AD10, uint32)); + } while (++edi <= _F1AD10); - uint32 eax = RCT2_GLOBAL(0x00F1AD0C, uint32); + uint32 eax = _F1AD0C; sub_688217_helper(eax & 0xFFFF, 1 << 1); - eax = RCT2_GLOBAL(0x00F1AD0C, uint32); + eax = _F1AD0C; - while (++eax < RCT2_GLOBAL(0x00F1AD10, uint32)) + while (++eax < _F1AD10) sub_688217_helper(eax & 0xFFFF, 0); }