1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00

Correct orientation of Game Saved clock in Flip Mode

The clock on the Game Saved quicksave screen has always been upside-down
in Flip Mode. And technically, the trinket was too, but this was
unnoticeable because the default trinket sprite is symmetrical.

To fix this, draw flipsprites.png if these sprites are being drawn in
Flip Mode instead of sprites.png.
This commit is contained in:
Misa 2023-06-03 16:00:30 -07:00
parent 4ea26617b8
commit 414b0647aa
3 changed files with 17 additions and 2 deletions

View file

@ -632,6 +632,11 @@ void Graphics::draw_sprite(const int x, const int y, const int t, const SDL_Colo
draw_grid_tile(grphx.im_sprites, t, x, y, sprites_rect.w, sprites_rect.h, color);
}
void Graphics::draw_flipsprite(const int x, const int y, const int t, const SDL_Color color)
{
draw_grid_tile(grphx.im_flipsprites, t, x, y, sprites_rect.w, sprites_rect.h, color);
}
void Graphics::scroll_texture(SDL_Texture* texture, SDL_Texture* temp, const int x, const int y)
{
SDL_Texture* target = SDL_GetRenderTarget(gameScreen.m_renderer);

View file

@ -164,6 +164,8 @@ public:
void draw_sprite(int x, int y, int t, int r, int g, int b);
void draw_sprite(int x, int y, int t, SDL_Color color);
void draw_flipsprite(int x, int y, int t, SDL_Color color);
void scroll_texture(SDL_Texture* texture, SDL_Texture* temp, int x, int y);
void printcrewname(int x, int y, int t);

View file

@ -2935,8 +2935,16 @@ void maprender(void)
);
font::print(PR_RIGHT, 262, FLIP(132, 8), buffer, 255 - help.glow/2, 255 - help.glow/2, 255 - help.glow/2);
graphics.draw_sprite(34, FLIP(126, 17), 50, graphics.col_clock);
graphics.draw_sprite(270, FLIP(126, 17), 22, graphics.col_trinket);
if (graphics.flipmode)
{
graphics.draw_flipsprite(34, FLIP(126, 17), 50, graphics.col_clock);
graphics.draw_flipsprite(270, FLIP(126, 17), 22, graphics.col_trinket);
}
else
{
graphics.draw_sprite(34, FLIP(126, 17), 50, graphics.col_clock);
graphics.draw_sprite(270, FLIP(126, 17), 22, graphics.col_trinket);
}
break;
}
case 10: