Made Flash.cpp more source-accurate

The returns make more sense than those empty brackets
This commit is contained in:
Clownacy 2019-02-21 19:51:40 +00:00
parent 5ba0454bc8
commit fb9b545e27

View file

@ -21,7 +21,7 @@ static unsigned long gFlashColor;
void InitFlash(void) void InitFlash(void)
{ {
gFlashColor = 0xFEFFFF; gFlashColor = GetCortBoxColor(RGB(0xFF, 0xFF, 0xFE));
} }
void SetFlash(int x, int y, int mode) void SetFlash(int x, int y, int mode)
@ -137,34 +137,26 @@ void ActFlash_Flash(void)
void ActFlash(int flx, int fly) void ActFlash(int flx, int fly)
{ {
if (flash.flag == FALSE) if (flash.flag == FALSE)
return;
switch (flash.mode)
{ {
// Do nothing case 1:
} ActFlash_Explosion(flx, fly);
else break;
{ case 2:
switch (flash.mode) ActFlash_Flash();
{ break;
case 1:
ActFlash_Explosion(flx, fly);
break;
case 2:
ActFlash_Flash();
break;
}
} }
} }
void PutFlash(void) void PutFlash(void)
{ {
if (flash.flag == FALSE) if (flash.flag == FALSE)
{ return;
// Do nothing
} CortBox(&flash.rect1, gFlashColor);
else CortBox(&flash.rect2, gFlashColor);
{
CortBox(&flash.rect1, gFlashColor);
CortBox(&flash.rect2, gFlashColor);
}
} }
void ResetFlash(void) void ResetFlash(void)