1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

fix drawing of picked up peep

This commit is contained in:
Ted John
2016-06-04 23:07:01 +01:00
parent 8920c73ea4
commit 8036f6c773
4 changed files with 18 additions and 7 deletions

View File

@@ -286,10 +286,10 @@ void gfx_invalidate_pickedup_peep()
}
}
void gfx_draw_pickedup_peep()
void gfx_draw_pickedup_peep(rct_drawpixelinfo *dpi)
{
if (gPickupPeepImage != UINT32_MAX) {
gfx_draw_sprite(&gScreenDPI, gPickupPeepImage, gPickupPeepX, gPickupPeepY, 0);
gfx_draw_sprite(dpi, gPickupPeepImage, gPickupPeepX, gPickupPeepY, 0);
}
}

View File

@@ -132,7 +132,7 @@ void gfx_draw_rain(int left, int top, int width, int height, sint32 x_start, sin
void gfx_clear(rct_drawpixelinfo *dpi, int colour);
void gfx_draw_pixel(rct_drawpixelinfo *dpi, int x, int y, int colour);
void gfx_invalidate_pickedup_peep();
void gfx_draw_pickedup_peep();
void gfx_draw_pickedup_peep(rct_drawpixelinfo *dpi);
// line
void gfx_draw_line(rct_drawpixelinfo *dpi, int x1, int y1, int x2, int y2, int colour);

View File

@@ -179,6 +179,8 @@ public:
gfx_redraw_screen_rect(0, 0, _width - 1, _height - 1);
window_update_all();
gfx_draw_pickedup_peep(&_bitsDPI);
rct2_draw();
Display();
}
@@ -311,7 +313,16 @@ void OpenGLDrawingContext::FillRect(uint32 colour, sint32 left, sint32 top, sint
}
glDisable(GL_TEXTURE_2D);
glColor3f(paletteColour.r, paletteColour.g, paletteColour.b);
if (colour & 0x2000000)
{
glColor4f(paletteColour.r, paletteColour.g, paletteColour.b, 0.4f);
}
else
{
glColor3f(paletteColour.r, paletteColour.g, paletteColour.b);
}
glBegin(GL_QUADS);
glVertex2i(left, top);
glVertex2i(left, bottom);

View File

@@ -292,15 +292,15 @@ public:
{
_rainDrawer.SetDPI(&_bitsDPI);
_rainDrawer.Restore();
gfx_invalidate_pickedup_peep();
gfx_draw_pickedup_peep();
DrawAllDirtyBlocks();
window_update_all_viewports();
DrawAllDirtyBlocks();
window_update_all();
gfx_draw_pickedup_peep(&_bitsDPI);
gfx_invalidate_pickedup_peep();
DrawRain(&_rainDrawer);
rct2_draw();