mirror of https://github.com/OpenRCT2/OpenRCT2.git
Integrate gUnkEDF81C
This commit is contained in:
parent
00e2d44264
commit
e4cb01e04b
|
@ -27,6 +27,7 @@ extern "C"
|
|||
#include "../../config.h"
|
||||
#include "../../game.h"
|
||||
#include "../../interface/screenshot.h"
|
||||
#include "../../interface/viewport.h"
|
||||
#include "../../interface/window.h"
|
||||
#include "../../intro.h"
|
||||
#include "../drawing.h"
|
||||
|
@ -1082,7 +1083,7 @@ void SoftwareDrawingContext::DrawSpriteSolid(uint32 image, sint32 x, sint32 y, u
|
|||
memset(palette, colour, 256);
|
||||
palette[0] = 0;
|
||||
|
||||
RCT2_GLOBAL(0x00EDF81C, uint32) = 0x20000000;
|
||||
gUnkEDF81C = 0x20000000;
|
||||
image &= 0x7FFFF;
|
||||
gfx_draw_sprite_palette_set_software(_dpi, image | 0x20000000, x, y, palette, nullptr);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
*****************************************************************************/
|
||||
#pragma endregion
|
||||
|
||||
#include "../addresses.h"
|
||||
#include "../common.h"
|
||||
#include "../openrct2.h"
|
||||
#include "../platform/platform.h"
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
*****************************************************************************/
|
||||
#pragma endregion
|
||||
|
||||
#include "../addresses.h"
|
||||
#include "../interface/colour.h"
|
||||
#include "../interface/viewport.h"
|
||||
#include "../interface/window.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../platform/platform.h"
|
||||
|
@ -914,7 +914,7 @@ static void ttf_draw_character_sprite(rct_drawpixelinfo *dpi, int codepoint, tex
|
|||
|
||||
if (!(info->flags & TEXT_DRAW_FLAG_NO_DRAW)) {
|
||||
unk_9ABDA4 = &info->palette;
|
||||
RCT2_GLOBAL(0x00EDF81C, uint32) = IMAGE_TYPE_REMAP;
|
||||
gUnkEDF81C = IMAGE_TYPE_REMAP;
|
||||
|
||||
int x = info->x;
|
||||
int y = info->y;
|
||||
|
|
|
@ -58,6 +58,8 @@ uint8 gSavedViewRotation;
|
|||
uint8 gCurrentRotation;
|
||||
#endif
|
||||
|
||||
uint32 gUnkEDF81C;
|
||||
|
||||
/**
|
||||
* This is not a viewport function. It is used to setup many variables for
|
||||
* multiple things.
|
||||
|
@ -1253,7 +1255,7 @@ static bool sub_679074(rct_drawpixelinfo *dpi, int imageId, sint16 x, sint16 y)
|
|||
}
|
||||
|
||||
uint8 *offset = image->offset + (yStartPoint * image->width) + xStartPoint;
|
||||
uint32 ebx = RCT2_GLOBAL(0x00EDF81C, uint32);
|
||||
uint32 ebx = gUnkEDF81C;
|
||||
|
||||
if (!(image->flags & 2)) {
|
||||
return sub_679236_679662_679B0D_679FF1(ebx, image, offset);
|
||||
|
@ -1309,7 +1311,7 @@ static void sub_679023(rct_drawpixelinfo *dpi, int imageId, int x, int y)
|
|||
RCT2_GLOBAL(0x00141F569, uint8) = 0;
|
||||
imageId &= 0xBFFFFFFF;
|
||||
if (imageId & 0x20000000) {
|
||||
RCT2_GLOBAL(0x00EDF81C, uint32) = 0x20000000;
|
||||
gUnkEDF81C = 0x20000000;
|
||||
int index = (imageId >> 19) & 0x7F;
|
||||
if (imageId & 0x80000000) {
|
||||
index &= 0x1F;
|
||||
|
@ -1317,7 +1319,7 @@ static void sub_679023(rct_drawpixelinfo *dpi, int imageId, int x, int y)
|
|||
int g1Index = palette_to_g1_offset[index];
|
||||
unk_9ABDA4 = g1Elements[g1Index].offset;
|
||||
} else {
|
||||
RCT2_GLOBAL(0x00EDF81C, uint32) = 0;
|
||||
gUnkEDF81C = 0;
|
||||
}
|
||||
RCT2_GLOBAL(0x00141F569, uint8) = sub_679074(dpi, imageId, x, y);
|
||||
}
|
||||
|
|
|
@ -119,6 +119,8 @@ extern uint8 gCurrentRotation;
|
|||
#define gCurrentRotation RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint8)
|
||||
#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);
|
||||
|
|
Loading…
Reference in New Issue