mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-11-22 00:42:16 -05:00
Remove unused code
This commit is contained in:
parent
94a7129d4d
commit
5a2dd45d62
109
game.h
109
game.h
@ -4395,115 +4395,6 @@ void SFG_drawWinOverlay()
|
|||||||
#undef STRIP_START
|
#undef STRIP_START
|
||||||
#undef INNER_STRIP_HEIGHT
|
#undef INNER_STRIP_HEIGHT
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
void SFG_drawWinOverlay()
|
|
||||||
{
|
|
||||||
uint32_t t = RCL_min(SFG_WIN_ANIMATION_DURATION,
|
|
||||||
SFG_game.frameTime - SFG_game.stateChangeTime);
|
|
||||||
|
|
||||||
uint32_t t2 = RCL_min(t,SFG_WIN_ANIMATION_DURATION / 4);
|
|
||||||
|
|
||||||
#define STRIP_HEIGHT (SFG_GAME_RESOLUTION_Y / 2)
|
|
||||||
#define INNER_STRIP_HEIGHT ((STRIP_HEIGHT * 3) / 4)
|
|
||||||
#define STRIP_START ((SFG_GAME_RESOLUTION_Y - STRIP_HEIGHT) / 2)
|
|
||||||
|
|
||||||
RCL_Unit l = (t2 * STRIP_HEIGHT * 4) / SFG_WIN_ANIMATION_DURATION;
|
|
||||||
|
|
||||||
uint8_t n = (t * 5) / SFG_WIN_ANIMATION_DURATION;
|
|
||||||
|
|
||||||
for (uint16_t y = STRIP_START; y < STRIP_START + l; ++y)
|
|
||||||
for (uint16_t x = 0; x < SFG_GAME_RESOLUTION_X; ++x)
|
|
||||||
SFG_setGamePixel(x,y,
|
|
||||||
RCL_abs(y - (SFG_GAME_RESOLUTION_Y / 2)) <= (INNER_STRIP_HEIGHT / 2) ?
|
|
||||||
0 : 172);
|
|
||||||
|
|
||||||
char textLine[] = "level done";
|
|
||||||
|
|
||||||
uint16_t y = SFG_GAME_RESOLUTION_Y / 2 -
|
|
||||||
((STRIP_HEIGHT + INNER_STRIP_HEIGHT) / 2) / 2;
|
|
||||||
|
|
||||||
uint16_t x = (SFG_GAME_RESOLUTION_X -
|
|
||||||
SFG_textHorizontalSize(textLine,SFG_FONT_SIZE_BIG)) / 2;
|
|
||||||
|
|
||||||
SFG_drawText(textLine,x,y,SFG_FONT_SIZE_BIG,7 + SFG_game.blink * 95,255,0);
|
|
||||||
|
|
||||||
uint32_t timeTotal = SFG_SAVE_TOTAL_TIME;
|
|
||||||
|
|
||||||
uint8_t blinkDouble = (SFG_game.frame / SFG_BLINK_PERIOD_FRAMES) % 4;
|
|
||||||
|
|
||||||
// don't show totals in level 1:
|
|
||||||
blinkDouble &= (SFG_currentLevel.levelNumber != 0) || (timeTotal == 0);
|
|
||||||
|
|
||||||
if (t >= (SFG_WIN_ANIMATION_DURATION / 2))
|
|
||||||
{
|
|
||||||
y += (SFG_FONT_SIZE_BIG + SFG_FONT_SIZE_MEDIUM) * SFG_FONT_CHARACTER_SIZE;
|
|
||||||
x = SFG_GAME_RESOLUTION_X / 4;
|
|
||||||
|
|
||||||
#define CHAR_SIZE (SFG_FONT_SIZE_SMALL * SFG_FONT_CHARACTER_SIZE)
|
|
||||||
|
|
||||||
#if SFG_VERY_LOW_RESOLUTION
|
|
||||||
if (blinkDouble & 0x02)
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
uint32_t time = (blinkDouble & 0x01) ?
|
|
||||||
SFG_currentLevel.completionTime10sOfS : timeTotal;
|
|
||||||
|
|
||||||
x += (SFG_drawNumber(time / 10,x,y,SFG_FONT_SIZE_SMALL,7) + 1) *
|
|
||||||
CHAR_SIZE;
|
|
||||||
|
|
||||||
char timeRest[5] = ".X s";
|
|
||||||
|
|
||||||
timeRest[1] = '0' + (time % 10);
|
|
||||||
|
|
||||||
SFG_drawText(timeRest,x,y,SFG_FONT_SIZE_SMALL,7,4,0);
|
|
||||||
#if SFG_VERY_LOW_RESOLUTION
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
#else
|
|
||||||
x = SFG_GAME_RESOLUTION_X / 2;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (blinkDouble & 0x01)
|
|
||||||
{
|
|
||||||
x += SFG_drawNumber(SFG_currentLevel.monstersDead,x,y,
|
|
||||||
SFG_FONT_SIZE_SMALL,7) * CHAR_SIZE;
|
|
||||||
|
|
||||||
SFG_drawText("/",x,y,SFG_FONT_SIZE_SMALL,7,1,0);
|
|
||||||
|
|
||||||
x += CHAR_SIZE;
|
|
||||||
|
|
||||||
x += (SFG_drawNumber(SFG_currentLevel.monsterRecordCount,x,y,
|
|
||||||
SFG_FONT_SIZE_SMALL,7) + 1) * CHAR_SIZE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
x += (SFG_drawNumber(SFG_game.save[10] + SFG_game.save[11] * 256,x,y,
|
|
||||||
SFG_FONT_SIZE_SMALL,7) + 1) * CHAR_SIZE;
|
|
||||||
|
|
||||||
SFG_drawText(SFG_TEXT_KILLS,x,y,SFG_FONT_SIZE_SMALL,7,255,0);
|
|
||||||
|
|
||||||
#if SFG_VERY_LOW_RESOLUTION
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if ((t >= (SFG_WIN_ANIMATION_DURATION - 1)) &&
|
|
||||||
(SFG_currentLevel.levelNumber != (SFG_NUMBER_OF_LEVELS - 1)))
|
|
||||||
{
|
|
||||||
y += (SFG_FONT_SIZE_BIG + SFG_FONT_SIZE_MEDIUM) * SFG_FONT_CHARACTER_SIZE;
|
|
||||||
|
|
||||||
SFG_drawText(SFG_TEXT_SAVE_PROMPT,
|
|
||||||
(SFG_GAME_RESOLUTION_X - SFG_textHorizontalSize(SFG_TEXT_SAVE_PROMPT,
|
|
||||||
SFG_FONT_SIZE_MEDIUM)) / 2,y,SFG_FONT_SIZE_MEDIUM,7,255,0);
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef CHAR_SIZE
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef STRIP_HEIGHT
|
|
||||||
#undef STRIP_START
|
|
||||||
#undef INNER_STRIP_HEIGHT
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
void SFG_draw()
|
void SFG_draw()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user