Do not bother backing up SPR_TEMP

This commit is contained in:
Ted John 2017-11-03 22:29:44 +00:00
parent 446f57e43b
commit 498857a95d
4 changed files with 0 additions and 14 deletions

View File

@ -228,17 +228,13 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi)
sint32 colour = ColourMapA[w->colours[0]].darkest;
gfx_fill_rect(dpi, x, y, x + 369, y + 216, colour);
auto g1backup = gfx_get_g1_element(SPR_TEMP);
rct_g1_element g1temp = { 0 };
g1temp.offset = _trackDesignPreviewPixels + (_currentTrackPieceDirection * TRACK_PREVIEW_IMAGE_SIZE);
g1temp.width = 370;
g1temp.height = 217;
g1temp.flags = G1_FLAG_BMP;
gfx_set_g1_element(SPR_TEMP, &g1temp);
gfx_draw_sprite(dpi, 0, x, y, 0);
gfx_set_g1_element(SPR_TEMP, g1backup);
x = w->x + (widget->left + widget->right) / 2;
y = w->y + widget->bottom - 12;

View File

@ -882,18 +882,14 @@ static void window_map_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, sint32
{
gfx_clear(dpi, PALETTE_INDEX_10);
auto g1backup = gfx_get_g1_element(SPR_TEMP);
rct_g1_element g1temp = { 0 };
g1temp.offset = (uint8 *)_mapImageData;
g1temp.width = MAP_WINDOW_MAP_SIZE;
g1temp.height = MAP_WINDOW_MAP_SIZE;
g1temp.x_offset = -8;
g1temp.y_offset = -8;
gfx_set_g1_element(SPR_TEMP, &g1temp);
gfx_draw_sprite(dpi, SPR_TEMP, 0, 0, 0);
gfx_set_g1_element(SPR_TEMP, g1backup);
if (w->selected_tab == PAGE_PEEPS)
{

View File

@ -467,14 +467,12 @@ static void window_track_place_paint(rct_window *w, rct_drawpixelinfo *dpi)
// Draw mini tile preview
rct_drawpixelinfo clippedDpi;
if (clip_drawpixelinfo(&clippedDpi, dpi, w->x + 4, w->y + 18, 168, 78)) {
auto g1backup = gfx_get_g1_element(SPR_TEMP);
rct_g1_element g1temp = { 0 };
g1temp.offset = _window_track_place_mini_preview;
g1temp.width = TRACK_MINI_PREVIEW_WIDTH;
g1temp.height = TRACK_MINI_PREVIEW_HEIGHT;
gfx_set_g1_element(SPR_TEMP, &g1temp);
gfx_draw_sprite(&clippedDpi, SPRITE_ID_PALETTE_COLOUR_1(NOT_TRANSLUCENT(w->colours[0])), 0, 0, 0);
gfx_set_g1_element(SPR_TEMP, g1backup);
}
// Price

View File

@ -422,17 +422,13 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
return;
}
auto g1backup = gfx_get_g1_element(SPR_TEMP);
rct_g1_element g1temp = { 0 };
g1temp.offset = _trackDesignPreviewPixels + (_currentTrackPieceDirection * TRACK_PREVIEW_IMAGE_SIZE);
g1temp.width = 370;
g1temp.height = 217;
g1temp.flags = G1_FLAG_BMP;
gfx_set_g1_element(SPR_TEMP, &g1temp);
gfx_draw_sprite(dpi, 0, x, y, 0);
gfx_set_g1_element(SPR_TEMP, g1backup);
x = w->x + (widget->left + widget->right) / 2;
y = w->y + widget->bottom - 12;