Boss.cpp cleanup

This commit is contained in:
Clownacy 2019-06-30 00:20:32 +01:00
parent a9940c9ca9
commit deb0538d03

View file

@ -36,7 +36,9 @@ void InitBossChar(int code)
void PutBossChar(int fx, int fy) void PutBossChar(int fx, int fy)
{ {
char a = 0; char a = 0;
for (int b = BOSS_MAX - 1; b >= 0; b--) int b;
for (b = BOSS_MAX - 1; b >= 0; --b)
{ {
if (gBoss[b].cond & 0x80) if (gBoss[b].cond & 0x80)
{ {
@ -78,17 +80,17 @@ void SetBossCharActNo(int a)
void HitBossBullet() void HitBossBullet()
{ {
int bos;
int bul;
int bos_;
BOOL bHit; BOOL bHit;
int bul;
int bos;
int bos_;
for (bos = 0; bos < BOSS_MAX; bos++) for (bos = 0; bos < BOSS_MAX; ++bos)
{ {
if ((gBoss[bos].cond & 0x80) == 0) if ((gBoss[bos].cond & 0x80) == 0)
continue; continue;
for (bul = 0; bul < BULLET_MAX; bul++) for (bul = 0; bul < BULLET_MAX; ++bul)
{ {
if ((gBul[bul].cond & 0x80) == 0) if ((gBul[bul].cond & 0x80) == 0)
continue; continue;
@ -180,7 +182,7 @@ void HitBossBullet()
} }
else else
{ {
if (!(gBul[bul].bbits & 0x10)) if ((gBul[bul].bbits & 0x10) == 0)
{ {
SetCaret(gBul[bul].x, gBul[bul].y, 2, 2); SetCaret(gBul[bul].x, gBul[bul].y, 2, 2);
PlaySoundObject(31, 1); PlaySoundObject(31, 1);
@ -224,11 +226,9 @@ void ActBossChar()
gpBossFuncTbl[code_char](); gpBossFuncTbl[code_char]();
for (bos = 0; bos < BOSS_MAX; bos++) for (bos = 0; bos < BOSS_MAX; ++bos)
{
if (gBoss[bos].shock) if (gBoss[bos].shock)
gBoss[bos].shock--; --gBoss[bos].shock;
}
} }
void HitBossMap() void HitBossMap()
@ -275,7 +275,7 @@ void HitBossMap()
offy[14] = -1; offy[14] = -1;
offy[15] = -1; offy[15] = -1;
for (b = 0; b < BOSS_MAX; b++) for (b = 0; b < BOSS_MAX; ++b)
{ {
int judg; int judg;
@ -299,7 +299,7 @@ void HitBossMap()
} }
gBoss[b].flag = 0; gBoss[b].flag = 0;
for (j = 0; j < judg; j++) for (j = 0; j < judg; ++j)
{ {
atrb[j] = GetAttribute(x + offx[j], y + offy[j]); atrb[j] = GetAttribute(x + offx[j], y + offy[j]);