mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Initial implementation of textbox sprites
This commit adds a system for displaying sprites in textboxes, meant to replace the hardcoded system in the main game. This does not support levelcomplete.png and gamecomplete.png yet, which will most likely just be special cases.
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
187fd85e14
commit
76ea4488af
@@ -1049,6 +1049,17 @@ void Graphics::drawgui(void)
|
||||
//blue guy
|
||||
draw_sprite(crew_xp, crew_yp, crew_sprite, 75, 75, 255 - help.glow / 4 - textboxes[i].rand);
|
||||
}
|
||||
|
||||
for (int index = 0; index < (int) textboxes[i].sprites.size(); index++)
|
||||
{
|
||||
TextboxSprite* sprite = &textboxes[i].sprites[index];
|
||||
draw_sprite(
|
||||
sprite->x + textboxes[i].xp,
|
||||
sprite->y + textboxes[i].yp,
|
||||
sprite->tile,
|
||||
getcol(sprite->col)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1428,6 +1439,17 @@ void Graphics::textboxtimer(int t)
|
||||
textboxes[m].timer = t;
|
||||
}
|
||||
|
||||
void Graphics::addsprite(int x, int y, int tile, int col)
|
||||
{
|
||||
if (!INBOUNDS_VEC(m, textboxes))
|
||||
{
|
||||
vlog_error("addsprite() out-of-bounds!");
|
||||
return;
|
||||
}
|
||||
|
||||
textboxes[m].addsprite(x, y, tile, col);
|
||||
}
|
||||
|
||||
void Graphics::addline( const std::string& t )
|
||||
{
|
||||
if (!INBOUNDS_VEC(m, textboxes))
|
||||
|
||||
Reference in New Issue
Block a user