mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 06:23:04 +01:00
Refactor naming of paint global vars
Removed EDF81C from none viewport files this previously was used to pass image flags to the sprite renderer. gUnkF1A4CC replaced with address reference to paint struct array to allow for non rct builds Renamed _paint_structs to _paint_struct_quadrants. This array is used for working out which paint struct is at which quadrant and is not the main paint struct array
This commit is contained in:
@@ -53,7 +53,7 @@ uint8 gSavedViewRotation;
|
||||
|
||||
#ifdef NO_RCT2
|
||||
paint_struct *unk_EE7884;
|
||||
paint_struct *unk_EE7888;
|
||||
paint_struct *gNextFreePaintStruct;
|
||||
uint8 gCurrentRotation;
|
||||
uint32 gCurrentViewportFlags = 0;
|
||||
#endif
|
||||
@@ -769,7 +769,7 @@ void viewport_paint(rct_viewport* viewport, rct_drawpixelinfo* dpi, int left, in
|
||||
}
|
||||
gfx_clear(dpi2, colour);
|
||||
}
|
||||
g_ps_EE7880 = &gUnkF1A4CC;
|
||||
gEndOfPaintStructArray = &gPaintStructs[4000 - 1];
|
||||
unk_140E9A8 = dpi2;
|
||||
painter_setup();
|
||||
viewport_paint_setup();
|
||||
@@ -1398,7 +1398,7 @@ void get_map_coordinates_from_pos(int screenX, int screenY, int flags, sint16 *x
|
||||
dpi->zoom_level = _viewportDpi1.zoom_level;
|
||||
dpi->x = _viewportDpi1.x;
|
||||
dpi->width = 1;
|
||||
g_ps_EE7880 = &gUnkF1A4CC;
|
||||
gEndOfPaintStructArray = &gPaintStructs[4000 - 1];
|
||||
unk_140E9A8 = dpi;
|
||||
painter_setup();
|
||||
viewport_paint_setup();
|
||||
|
||||
@@ -106,18 +106,16 @@ extern uint8 gSavedViewRotation;
|
||||
|
||||
#ifdef NO_RCT2
|
||||
extern paint_struct *unk_EE7884;
|
||||
extern paint_struct *unk_EE7888;
|
||||
extern paint_struct *gNextFreePaintStruct;
|
||||
extern uint8 gCurrentRotation;
|
||||
extern uint32 gCurrentViewportFlags;
|
||||
#else
|
||||
#define unk_EE7884 RCT2_GLOBAL(0x00EE7884, paint_struct*)
|
||||
#define unk_EE7888 RCT2_GLOBAL(0x00EE7888, paint_struct*)
|
||||
#define gNextFreePaintStruct RCT2_GLOBAL(0x00EE7888, paint_struct*)
|
||||
#define gCurrentRotation RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint8)
|
||||
#define gCurrentViewportFlags RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_VIEWPORT_FLAGS, uint32)
|
||||
#endif
|
||||
|
||||
extern uint32 gUnkEDF81C;
|
||||
|
||||
void viewport_init_all();
|
||||
void center_2d_coordinates(int x, int y, int z, int* out_x, int* out_y, rct_viewport* viewport);
|
||||
void viewport_create(rct_window *w, int x, int y, int width, int height, int zoom, int center_x, int center_y, int center_z, char flags, sint16 sprite);
|
||||
|
||||
Reference in New Issue
Block a user