From fb9b545e2706ca8e4ec791b6ed50f9db53e5a149 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Thu, 21 Feb 2019 19:51:40 +0000 Subject: [PATCH] Made Flash.cpp more source-accurate The returns make more sense than those empty brackets --- src/Flash.cpp | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/src/Flash.cpp b/src/Flash.cpp index c6a04389..28d4e5f7 100644 --- a/src/Flash.cpp +++ b/src/Flash.cpp @@ -21,7 +21,7 @@ static unsigned long gFlashColor; void InitFlash(void) { - gFlashColor = 0xFEFFFF; + gFlashColor = GetCortBoxColor(RGB(0xFF, 0xFF, 0xFE)); } void SetFlash(int x, int y, int mode) @@ -137,34 +137,26 @@ void ActFlash_Flash(void) void ActFlash(int flx, int fly) { if (flash.flag == FALSE) + return; + + switch (flash.mode) { - // Do nothing - } - else - { - switch (flash.mode) - { - case 1: - ActFlash_Explosion(flx, fly); - break; - case 2: - ActFlash_Flash(); - break; - } + case 1: + ActFlash_Explosion(flx, fly); + break; + case 2: + ActFlash_Flash(); + break; } } void PutFlash(void) { if (flash.flag == FALSE) - { - // Do nothing - } - else - { - CortBox(&flash.rect1, gFlashColor); - CortBox(&flash.rect2, gFlashColor); - } + return; + + CortBox(&flash.rect1, gFlashColor); + CortBox(&flash.rect2, gFlashColor); } void ResetFlash(void)