Clean-up BossPress.cpp
This commit is contained in:
parent
ab4763d2a3
commit
04c2f4c055
1 changed files with 43 additions and 42 deletions
|
@ -26,15 +26,15 @@ void ActBossChar_Press(void)
|
||||||
npc->direct = 2;
|
npc->direct = 2;
|
||||||
npc->x = 0;
|
npc->x = 0;
|
||||||
npc->y = 0;
|
npc->y = 0;
|
||||||
npc->view.front = 0x5000;
|
npc->view.front = 40 * 0x200;
|
||||||
npc->view.top = 0x7800;
|
npc->view.top = 60 * 0x200;
|
||||||
npc->view.back = 0x5000;
|
npc->view.back = 40 * 0x200;
|
||||||
npc->view.bottom = 0x7800;
|
npc->view.bottom = 60 * 0x200;
|
||||||
npc->hit_voice = 54;
|
npc->hit_voice = 54;
|
||||||
npc->hit.front = 0x6200;
|
npc->hit.front = 49 * 0x200;
|
||||||
npc->hit.top = 0x7800;
|
npc->hit.top = 60 * 0x200;
|
||||||
npc->hit.back = 0x5000;
|
npc->hit.back = 40 * 0x200;
|
||||||
npc->hit.bottom = 0x6000;
|
npc->hit.bottom = 48 * 0x200;
|
||||||
npc->bits = (NPC_IGNORE_SOLIDITY | NPC_SOLID_HARD | NPC_EVENT_WHEN_KILLED | NPC_SHOW_DAMAGE);
|
npc->bits = (NPC_IGNORE_SOLIDITY | NPC_SOLID_HARD | NPC_EVENT_WHEN_KILLED | NPC_SHOW_DAMAGE);
|
||||||
npc->size = 3;
|
npc->size = 3;
|
||||||
npc->damage = 10;
|
npc->damage = 10;
|
||||||
|
@ -52,21 +52,21 @@ void ActBossChar_Press(void)
|
||||||
|
|
||||||
case 10:
|
case 10:
|
||||||
npc->act_no = 11;
|
npc->act_no = 11;
|
||||||
npc->x = 0x14000;
|
npc->x = 160 * 0x200;
|
||||||
npc->y = 0x9400;
|
npc->y = 74 * 0x200;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20:
|
case 20:
|
||||||
npc->damage = 0;
|
npc->damage = 0;
|
||||||
npc->act_no = 21;
|
npc->act_no = 21;
|
||||||
npc->x = 0x14000;
|
npc->x = 160 * 0x200;
|
||||||
npc->y = 0x33A00;
|
npc->y = 413 * 0x200;
|
||||||
npc->bits &= ~NPC_SOLID_HARD;
|
npc->bits &= ~NPC_SOLID_HARD;
|
||||||
gBoss[1].cond = 0;
|
gBoss[1].cond = 0;
|
||||||
gBoss[2].cond = 0;
|
gBoss[2].cond = 0;
|
||||||
// Fallthrough
|
// Fallthrough
|
||||||
case 21:
|
case 21:
|
||||||
if ((++npc->act_wait % 0x10) == 0)
|
if (++npc->act_wait % 0x10 == 0)
|
||||||
SetDestroyNpChar(npc->x + (Random(-40, 40) * 0x200), npc->y + (Random(-60, 60) * 0x200), 1, 1);
|
SetDestroyNpChar(npc->x + (Random(-40, 40) * 0x200), npc->y + (Random(-60, 60) * 0x200), 1, 1);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -74,15 +74,15 @@ void ActBossChar_Press(void)
|
||||||
case 30:
|
case 30:
|
||||||
npc->act_no = 31;
|
npc->act_no = 31;
|
||||||
npc->ani_no = 2;
|
npc->ani_no = 2;
|
||||||
npc->x = 0x14000;
|
npc->x = 160 * 0x200;
|
||||||
npc->y = 0x8000;
|
npc->y = 64 * 0x200;
|
||||||
// Fallthrough
|
// Fallthrough
|
||||||
case 31:
|
case 31:
|
||||||
npc->y += 0x800;
|
npc->y += 4 * 0x200;
|
||||||
|
|
||||||
if (npc->y >= 0x33A00)
|
if (npc->y >= 413 * 0x200)
|
||||||
{
|
{
|
||||||
npc->y = 0x33A00;
|
npc->y = 413 * 0x200;
|
||||||
npc->ani_no = 0;
|
npc->ani_no = 0;
|
||||||
npc->act_no = 20;
|
npc->act_no = 20;
|
||||||
PlaySoundObject(44, 1);
|
PlaySoundObject(44, 1);
|
||||||
|
@ -90,7 +90,7 @@ void ActBossChar_Press(void)
|
||||||
for (i = 0; i < 5; ++i)
|
for (i = 0; i < 5; ++i)
|
||||||
{
|
{
|
||||||
x = npc->x + (Random(-40, 40) * 0x200);
|
x = npc->x + (Random(-40, 40) * 0x200);
|
||||||
SetNpChar(4, x, npc->y + 0x7800, 0, 0, 0, 0, 0x100);
|
SetNpChar(4, x, npc->y + (60 * 0x200), 0, 0, 0, NULL, 0x100);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -103,25 +103,25 @@ void ActBossChar_Press(void)
|
||||||
npc->act_wait = -100;
|
npc->act_wait = -100;
|
||||||
|
|
||||||
gBoss[1].cond = 0x80;
|
gBoss[1].cond = 0x80;
|
||||||
gBoss[1].hit.front = 0x1C00;
|
gBoss[1].hit.front = 14 * 0x200;
|
||||||
gBoss[1].hit.back = 0x1C00;
|
gBoss[1].hit.back = 14 * 0x200;
|
||||||
gBoss[1].hit.top = 0x1000;
|
gBoss[1].hit.top = 8 * 0x200;
|
||||||
gBoss[1].hit.bottom = 0x1000;
|
gBoss[1].hit.bottom = 8 * 0x200;
|
||||||
gBoss[1].bits = (NPC_INVULNERABLE | NPC_IGNORE_SOLIDITY);
|
gBoss[1].bits = (NPC_INVULNERABLE | NPC_IGNORE_SOLIDITY);
|
||||||
|
|
||||||
gBoss[2] = gBoss[1];
|
gBoss[2] = gBoss[1];
|
||||||
|
|
||||||
gBoss[3].cond = 0x90;
|
gBoss[3].cond = 0x90;
|
||||||
gBoss[3].bits |= NPC_SHOOTABLE;
|
gBoss[3].bits |= NPC_SHOOTABLE;
|
||||||
gBoss[3].hit.front = 0xC00;
|
gBoss[3].hit.front = 6 * 0x200;
|
||||||
gBoss[3].hit.back = 0xC00;
|
gBoss[3].hit.back = 6 * 0x200;
|
||||||
gBoss[3].hit.top = 0x1000;
|
gBoss[3].hit.top = 8 * 0x200;
|
||||||
gBoss[3].hit.bottom = 0x1000;
|
gBoss[3].hit.bottom = 8 * 0x200;
|
||||||
|
|
||||||
SetNpChar(325, npc->x, npc->y + 0x7800, 0, 0, 0, 0, 0x100);
|
SetNpChar(325, npc->x, npc->y + (60 * 0x200), 0, 0, 0, NULL, 0x100);
|
||||||
// Fallthrough
|
// Fallthrough
|
||||||
case 101:
|
case 101:
|
||||||
if (npc->count2 > 1 && npc->life < 70 * npc->count2)
|
if (npc->count2 > 1 && npc->life < npc->count2 * 70)
|
||||||
{
|
{
|
||||||
--npc->count2;
|
--npc->count2;
|
||||||
|
|
||||||
|
@ -134,15 +134,15 @@ void ActBossChar_Press(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (++npc->act_wait == 81 || npc->act_wait == 241)
|
if (++npc->act_wait == 81 || npc->act_wait == 241)
|
||||||
SetNpChar(323, 0x6000, 0x1E000, 0, 0, 1, 0, 0x100);
|
SetNpChar(323, 48 * 0x200, 240 * 0x200, 0, 0, 1, NULL, 0x100);
|
||||||
|
|
||||||
if (npc->act_wait == 1 || npc->act_wait == 161)
|
if (npc->act_wait == 1 || npc->act_wait == 161)
|
||||||
SetNpChar(323, 0x22000, 0x1E000, 0, 0, 1, 0, 0x100);
|
SetNpChar(323, 272 * 0x200, 240 * 0x200, 0, 0, 1, NULL, 0x100);
|
||||||
|
|
||||||
if (npc->act_wait >= 300)
|
if (npc->act_wait >= 300)
|
||||||
{
|
{
|
||||||
npc->act_wait = 0;
|
npc->act_wait = 0;
|
||||||
SetNpChar(325, npc->x, npc->y + 0x7800, 0, 0, 0, 0, 0x100);
|
SetNpChar(325, npc->x, npc->y + (60 * 0x200), 0, 0, 0, NULL, 0x100);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -158,7 +158,7 @@ void ActBossChar_Press(void)
|
||||||
DeleteNpCharCode(330, 1);
|
DeleteNpCharCode(330, 1);
|
||||||
// Fallthrough
|
// Fallthrough
|
||||||
case 501:
|
case 501:
|
||||||
if ((++npc->act_wait % 0x10) == 0)
|
if (++npc->act_wait % 0x10 == 0)
|
||||||
{
|
{
|
||||||
PlaySoundObject(12, 1);
|
PlaySoundObject(12, 1);
|
||||||
SetDestroyNpChar(npc->x + (Random(-40, 40) * 0x200), npc->y + (Random(-60, 60) * 0x200), 1, 1);
|
SetDestroyNpChar(npc->x + (Random(-40, 40) * 0x200), npc->y + (Random(-60, 60) * 0x200), 1, 1);
|
||||||
|
@ -171,6 +171,7 @@ void ActBossChar_Press(void)
|
||||||
|
|
||||||
if (npc->act_wait > 100)
|
if (npc->act_wait > 100)
|
||||||
npc->act_no = 510;
|
npc->act_no = 510;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 510:
|
case 510:
|
||||||
|
@ -178,7 +179,7 @@ void ActBossChar_Press(void)
|
||||||
npc->damage = 0x7F;
|
npc->damage = 0x7F;
|
||||||
npc->y += npc->ym;
|
npc->y += npc->ym;
|
||||||
|
|
||||||
if (npc->count1 == 0 && npc->y > 0x14000)
|
if (npc->count1 == 0 && npc->y > 160 * 0x200)
|
||||||
{
|
{
|
||||||
npc->count1 = 1;
|
npc->count1 = 1;
|
||||||
npc->ym = -0x200;
|
npc->ym = -0x200;
|
||||||
|
@ -187,25 +188,25 @@ void ActBossChar_Press(void)
|
||||||
for (i = 0; i < 7; ++i)
|
for (i = 0; i < 7; ++i)
|
||||||
{
|
{
|
||||||
ChangeMapParts(i + 7, 14, 0);
|
ChangeMapParts(i + 7, 14, 0);
|
||||||
SetDestroyNpChar((i + 7) * 0x200 * 0x10, 0x1C000, 0, 0);
|
SetDestroyNpChar((i + 7) * 0x200 * 0x10, 224 * 0x200, 0, 0);
|
||||||
PlaySoundObject(12, 1);
|
PlaySoundObject(12, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc->y > 0x3C000)
|
if (npc->y > 480 * 0x200)
|
||||||
npc->act_no = 520;
|
npc->act_no = 520;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gBoss[1].x = npc->x - 0x3000;
|
gBoss[1].x = npc->x - (24 * 0x200);
|
||||||
gBoss[1].y = npc->y + 0x6800;
|
gBoss[1].y = npc->y + (52 * 0x200);
|
||||||
|
|
||||||
gBoss[2].x = npc->x + 0x3000;
|
gBoss[2].x = npc->x + (24 * 0x200);
|
||||||
gBoss[2].y = npc->y + 0x6800;
|
gBoss[2].y = npc->y + (52 * 0x200);
|
||||||
|
|
||||||
gBoss[3].x = npc->x;
|
gBoss[3].x = npc->x;
|
||||||
gBoss[3].y = npc->y + 0x5000;
|
gBoss[3].y = npc->y + (40 * 0x200);
|
||||||
|
|
||||||
RECT rc[3] = {
|
RECT rc[3] = {
|
||||||
{0, 0, 80, 120},
|
{0, 0, 80, 120},
|
||||||
|
@ -219,7 +220,7 @@ void ActBossChar_Press(void)
|
||||||
{160, 120, 240, 240},
|
{160, 120, 240, 240},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (npc->shock)
|
if (npc->shock != 0)
|
||||||
{
|
{
|
||||||
if (++flash / 2 % 2)
|
if (++flash / 2 % 2)
|
||||||
npc->rect = rc[npc->ani_no];
|
npc->rect = rc[npc->ani_no];
|
||||||
|
|
Loading…
Add table
Reference in a new issue