From b1f698f863893204a3f08f56102be4184369a8a3 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Thu, 14 Nov 2019 00:14:50 +0000 Subject: [PATCH] Star.cpp cleanup --- src/Star.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Star.cpp b/src/Star.cpp index 51a94bc9..5760fcb8 100644 --- a/src/Star.cpp +++ b/src/Star.cpp @@ -27,12 +27,12 @@ static struct RECT rect; } star[3]; -void InitStar() +void InitStar(void) { - //Clear stars + // Clear stars memset(star, 0, sizeof(star)); - //Position + // Position star[0].x = gMC.x; star[0].y = gMC.y; @@ -42,7 +42,7 @@ void InitStar() star[2].x = gMC.x; star[2].y = gMC.y; - //Speed + // Speed star[0].xm = 0x400; star[0].ym = -0x200; @@ -53,15 +53,17 @@ void InitStar() star[2].ym = 0x200; } -void ActStar() +void ActStar(void) { + int i; static int a; - a++; + + ++a; a %= 3; - for (int i = 0; i < 3; i++) + for (i = 0; i < 3; ++i) { - if (i) + if (i != 0) { if (star[i - 1].x < star[i].x) star[i].xm -= 0x80;