mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #1550 from zsilencer/bugfixes
fix bugs introduced in last commit
This commit is contained in:
commit
eec8696452
|
@ -266,6 +266,7 @@ uint8* gfx_get_dirty_blocks()
|
|||
} else {
|
||||
_screenDirtyBlocks = malloc(size);
|
||||
}
|
||||
_screenDirtyBlocksSize = size;
|
||||
}
|
||||
return _screenDirtyBlocks;
|
||||
}
|
||||
|
@ -278,7 +279,7 @@ uint8* gfx_get_dirty_blocks()
|
|||
* right (dx)
|
||||
* bottom (bp)
|
||||
*/
|
||||
void gfx_set_dirty_blocks(int left, int top, int right, int bottom)
|
||||
void gfx_set_dirty_blocks(uint16 left, uint16 top, uint16 right, uint16 bottom)
|
||||
{
|
||||
int x, y;
|
||||
uint8 *screenDirtyBlocks = gfx_get_dirty_blocks();
|
||||
|
|
|
@ -80,7 +80,7 @@ extern rct_gx g2;
|
|||
|
||||
//
|
||||
rct_drawpixelinfo* clip_drawpixelinfo(rct_drawpixelinfo* dpi, int left, int width, int top, int height);
|
||||
void gfx_set_dirty_blocks(int left, int top, int right, int bottom);
|
||||
void gfx_set_dirty_blocks(uint16 left, uint16 top, uint16 right, uint16 bottom);
|
||||
void gfx_draw_all_dirty_blocks();
|
||||
void gfx_redraw_screen_rect(short left, short top, short right, short bottom);
|
||||
void gfx_invalidate_tile_if_zoomed(int x, int y, int base_height, int clearance_height);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "config.h"
|
||||
#include "editor.h"
|
||||
#include "game.h"
|
||||
#include "hook.h"
|
||||
#include "interface/window.h"
|
||||
#include "localisation/localisation.h"
|
||||
#include "network/http.h"
|
||||
|
@ -189,6 +190,8 @@ bool openrct2_initialise()
|
|||
|
||||
openrct2_copy_original_user_files_over();
|
||||
|
||||
addhook(0x006E732D, (int)gfx_set_dirty_blocks, 0, (int[]){EAX, EBX, EDX, EBP, END}, 0); // remove after all drawing is decompiled
|
||||
|
||||
Mixer_Init(NULL);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue