ref: e4ff51dc837262601423d399f2c722065591eec2
parent: b1f698f863893204a3f08f56102be4184369a8a3
author: Clownacy <Clownacy@users.noreply.github.com>
date: Wed Nov 13 19:18:10 EST 2019
More Star.cpp cleanup
--- a/src/Star.cpp
+++ b/src/Star.cpp
@@ -119,6 +119,8 @@
void PutStar(int fx, int fy)
{
+ int i;
+
RECT rc[3] = {
{192, 0, 200, 8},
{192, 8, 200, 16},
@@ -128,12 +130,10 @@
if (gMC.cond & 2)
return;
- if ((gMC.equip & 0x80) == 0)
+ if (!(gMC.equip & 0x80))
return;
- for (int i = 0; i < 3; i++)
- {
+ for (i = 0; i < 3; ++i)
if (i < gMC.star)
- PutBitmap3(&grcGame, star[i].x / 0x200 - fx / 0x200 - 4, star[i].y / 0x200 - fy / 0x200 - 4, &rc[i], SURFACE_ID_MY_CHAR);
- }
+ PutBitmap3(&grcGame, (star[i].x / 0x200) - (fx / 0x200) - 4, (star[i].y / 0x200) - (fy / 0x200) - 4, &rc[i], SURFACE_ID_MY_CHAR);
}