mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Finish implementing sprites in textboxes
This commit adjusts the Y position for flip-mode, and makes the main game use this new system.
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
76ea4488af
commit
b5c9508dd4
@@ -838,20 +838,14 @@ const char* Graphics::textbox_line(
|
||||
void Graphics::drawgui(void)
|
||||
{
|
||||
int text_sign;
|
||||
int crew_yp;
|
||||
int crew_sprite;
|
||||
|
||||
if (flipmode)
|
||||
{
|
||||
text_sign = -1;
|
||||
crew_yp = 64 + 48 + 4;
|
||||
crew_sprite = 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
text_sign = 1;
|
||||
crew_yp = 64 + 32 + 4;
|
||||
crew_sprite = 0;
|
||||
}
|
||||
|
||||
//Draw all the textboxes to the screen
|
||||
@@ -1023,41 +1017,27 @@ void Graphics::drawgui(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
int crew_xp = textboxes[i].xp+20 - 6;
|
||||
if (textboxes[i].r == 175 && textboxes[i].g == 175)
|
||||
{
|
||||
//purple guy
|
||||
draw_sprite(crew_xp, crew_yp, crew_sprite, 220 - help.glow / 4 - textboxes[i].rand, 120 - help.glow / 4, 210 - help.glow / 4);
|
||||
}
|
||||
else if (textboxes[i].r == 175 && textboxes[i].b == 175)
|
||||
{
|
||||
//red guy
|
||||
draw_sprite(crew_xp, crew_yp, crew_sprite, 255 - help.glow / 8, 70 - help.glow / 4, 70 - help.glow / 4);
|
||||
}
|
||||
else if (textboxes[i].r == 175)
|
||||
{
|
||||
//green guy
|
||||
draw_sprite(crew_xp, crew_yp, crew_sprite, 120 - help.glow / 4 - textboxes[i].rand, 220 - help.glow / 4, 120 - help.glow / 4);
|
||||
}
|
||||
else if (textboxes[i].g == 175)
|
||||
{
|
||||
//yellow guy
|
||||
draw_sprite(crew_xp, crew_yp, crew_sprite, 220 - help.glow / 4 - textboxes[i].rand, 210 - help.glow / 4, 120 - help.glow / 4);
|
||||
}
|
||||
else if (textboxes[i].b == 175)
|
||||
{
|
||||
//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++)
|
||||
for (size_t index = 0; index < textboxes[i].sprites.size(); index++)
|
||||
{
|
||||
TextboxSprite* sprite = &textboxes[i].sprites[index];
|
||||
draw_sprite(
|
||||
sprite->x + textboxes[i].xp,
|
||||
sprite->y + textboxes[i].yp,
|
||||
int y = sprite->y + yp;
|
||||
|
||||
if (flipmode)
|
||||
{
|
||||
y = yp + textboxes[i].h - sprite->y - sprites_rect.h;
|
||||
}
|
||||
|
||||
draw_grid_tile(
|
||||
grphx.im_sprites,
|
||||
sprite->tile,
|
||||
getcol(sprite->col)
|
||||
sprite->x + textboxes[i].xp,
|
||||
y,
|
||||
sprites_rect.w,
|
||||
sprites_rect.h,
|
||||
getcol(sprite->col),
|
||||
1,
|
||||
(flipmode ? -1 : 1)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user