mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 05:53:02 +01:00
reinstate all drawing and fix resize
This commit is contained in:
@@ -22,6 +22,7 @@ extern "C"
|
||||
{
|
||||
#include "../../config.h"
|
||||
#include "../drawing.h"
|
||||
#include "../../interface/window.h"
|
||||
}
|
||||
|
||||
struct DirtyGrid
|
||||
@@ -75,9 +76,6 @@ public:
|
||||
|
||||
void Resize(uint32 width, uint32 height) override
|
||||
{
|
||||
_width = width;
|
||||
_height = height;
|
||||
|
||||
SDL_FreeSurface(_surface);
|
||||
SDL_FreeSurface(_RGBASurface);
|
||||
SDL_FreePalette(_palette);
|
||||
@@ -152,7 +150,14 @@ public:
|
||||
|
||||
void Draw() override
|
||||
{
|
||||
redraw_rain();
|
||||
|
||||
DrawAllDirtyBlocks();
|
||||
window_update_all_viewports();
|
||||
DrawAllDirtyBlocks();
|
||||
window_update_all();
|
||||
|
||||
rct2_draw();
|
||||
Display();
|
||||
}
|
||||
|
||||
|
||||
@@ -157,9 +157,9 @@ void window_update_all()
|
||||
{
|
||||
RCT2_GLOBAL(0x009E3CD8, sint32)++;
|
||||
|
||||
gfx_draw_all_dirty_blocks();
|
||||
window_update_all_viewports();
|
||||
gfx_draw_all_dirty_blocks();
|
||||
// gfx_draw_all_dirty_blocks();
|
||||
// window_update_all_viewports();
|
||||
// gfx_draw_all_dirty_blocks();
|
||||
|
||||
// 1000 tick update
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_UPDATE_TICKS, sint16) += gTicksSinceLastUpdate;
|
||||
|
||||
@@ -418,7 +418,7 @@ static void openrct2_loop()
|
||||
}
|
||||
|
||||
if ((SDL_GetWindowFlags(gWindow) & (SDL_WINDOW_MINIMIZED | SDL_WINDOW_HIDDEN)) == 0) {
|
||||
rct2_draw();
|
||||
// rct2_draw();
|
||||
platform_draw();
|
||||
}
|
||||
|
||||
|
||||
@@ -279,8 +279,8 @@ void rct2_draw()
|
||||
return;
|
||||
}
|
||||
|
||||
redraw_rain();
|
||||
window_update_all();
|
||||
// redraw_rain();
|
||||
// window_update_all();
|
||||
gfx_invalidate_pickedup_peep();
|
||||
gfx_draw_pickedup_peep();
|
||||
update_rain_animation();
|
||||
|
||||
Reference in New Issue
Block a user