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

don't apply linegap to certain special textboxes

level complete, game complete and "You have rescued a crew member!"
This commit is contained in:
TerryCavanagh 2024-02-01 20:02:06 +01:00 committed by Terry Cavanagh
parent cc1528aacc
commit 8b73a38ed2
3 changed files with 10 additions and 0 deletions

View file

@ -698,6 +698,7 @@ void Game::levelcomplete_textbox(void)
graphics.textboxprintflags(PR_FONT_8X8); graphics.textboxprintflags(PR_FONT_8X8);
graphics.textboxcenterx(); graphics.textboxcenterx();
graphics.setimage(TEXTIMAGE_LEVELCOMPLETE); graphics.setimage(TEXTIMAGE_LEVELCOMPLETE);
graphics.setlinegap(0);
} }
void Game::crewmate_textbox(const int color) void Game::crewmate_textbox(const int color)
@ -727,6 +728,7 @@ void Game::crewmate_textbox(const int color)
graphics.textboxpad(SDL_ceilf(5/spaces_per_8), SDL_ceilf(2/spaces_per_8)); graphics.textboxpad(SDL_ceilf(5/spaces_per_8), SDL_ceilf(2/spaces_per_8));
graphics.textboxcenterx(); graphics.textboxcenterx();
graphics.addsprite(14, 12 + extra_cjk_height/2, 0, color); graphics.addsprite(14, 12 + extra_cjk_height/2, 0, color);
graphics.setlinegap(0);
} }
void Game::remaining_textbox(void) void Game::remaining_textbox(void)
@ -2897,6 +2899,7 @@ void Game::updatestate(void)
graphics.textboxprintflags(PR_FONT_8X8); graphics.textboxprintflags(PR_FONT_8X8);
graphics.textboxcenterx(); graphics.textboxcenterx();
graphics.setimage(TEXTIMAGE_GAMECOMPLETE); graphics.setimage(TEXTIMAGE_GAMECOMPLETE);
graphics.setlinegap(0);
break; break;
case 3502: case 3502:
{ {

View file

@ -1506,6 +1506,12 @@ void Graphics::textboxadjust(void)
textboxes[m].adjust(); textboxes[m].adjust();
} }
void Graphics::setlinegap(int customvalue)
{
textboxes[m].linegap = customvalue;
textboxes[m].resize();
}
int Graphics::getlinegap(void) int Graphics::getlinegap(void)
{ {
// Don't use linegaps in custom levels, for now anyway // Don't use linegaps in custom levels, for now anyway

View file

@ -65,6 +65,7 @@ public:
void drawfade(void); void drawfade(void);
void setlinegap(int);
int getlinegap(void); int getlinegap(void);
void createtextboxreal( void createtextboxreal(
const std::string& t, const std::string& t,