mirror of https://github.com/OpenRCT2/OpenRCT2.git
fix bugs introduced in last commit
This commit is contained in:
parent
66430b41db
commit
520d7840c0
|
@ -266,6 +266,7 @@ uint8* gfx_get_dirty_blocks()
|
||||||
} else {
|
} else {
|
||||||
_screenDirtyBlocks = malloc(size);
|
_screenDirtyBlocks = malloc(size);
|
||||||
}
|
}
|
||||||
|
_screenDirtyBlocksSize = size;
|
||||||
}
|
}
|
||||||
return _screenDirtyBlocks;
|
return _screenDirtyBlocks;
|
||||||
}
|
}
|
||||||
|
@ -278,7 +279,7 @@ uint8* gfx_get_dirty_blocks()
|
||||||
* right (dx)
|
* right (dx)
|
||||||
* bottom (bp)
|
* 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;
|
int x, y;
|
||||||
uint8 *screenDirtyBlocks = gfx_get_dirty_blocks();
|
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);
|
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_draw_all_dirty_blocks();
|
||||||
void gfx_redraw_screen_rect(short left, short top, short right, short bottom);
|
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);
|
void gfx_invalidate_tile_if_zoomed(int x, int y, int base_height, int clearance_height);
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "editor.h"
|
#include "editor.h"
|
||||||
#include "game.h"
|
#include "game.h"
|
||||||
|
#include "hook.h"
|
||||||
#include "interface/window.h"
|
#include "interface/window.h"
|
||||||
#include "localisation/localisation.h"
|
#include "localisation/localisation.h"
|
||||||
#include "network/http.h"
|
#include "network/http.h"
|
||||||
|
@ -189,6 +190,8 @@ bool openrct2_initialise()
|
||||||
|
|
||||||
openrct2_copy_original_user_files_over();
|
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);
|
Mixer_Init(NULL);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue