1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 04:53:12 +01:00

fix intro with new drawing

This commit is contained in:
Ted John
2016-06-05 15:40:19 +01:00
parent 83fc6ec4af
commit ebd9710fdf
4 changed files with 113 additions and 73 deletions

View File

@@ -23,8 +23,9 @@
extern "C"
{
#include "../../config.h"
#include "../drawing.h"
#include "../../interface/window.h"
#include "../../intro.h"
#include "../drawing.h"
}
class SoftwareDrawingEngine;
@@ -290,23 +291,27 @@ public:
void Draw() override
{
_rainDrawer.SetDPI(&_bitsDPI);
_rainDrawer.Restore();
if (gIntroState != INTRO_STATE_NONE) {
intro_draw(&_bitsDPI);
} else {
_rainDrawer.SetDPI(&_bitsDPI);
_rainDrawer.Restore();
// Redraw dirty regions before updating the viewports, otherwise
// when viewports get panned, they copy dirty pixels
DrawAllDirtyBlocks();
// Redraw dirty regions before updating the viewports, otherwise
// when viewports get panned, they copy dirty pixels
DrawAllDirtyBlocks();
window_update_all_viewports();
DrawAllDirtyBlocks();
window_update_all();
window_update_all_viewports();
DrawAllDirtyBlocks();
window_update_all();
gfx_draw_pickedup_peep(&_bitsDPI);
gfx_invalidate_pickedup_peep();
gfx_draw_pickedup_peep(&_bitsDPI);
gfx_invalidate_pickedup_peep();
DrawRain(&_bitsDPI, &_rainDrawer);
DrawRain(&_bitsDPI, &_rainDrawer);
rct2_draw(&_bitsDPI);
rct2_draw(&_bitsDPI);
}
Display();
}