Clean-up Shoot.cpp
This commit is contained in:
parent
156e47438c
commit
9468659b43
2 changed files with 279 additions and 244 deletions
349
src/Shoot.cpp
349
src/Shoot.cpp
|
@ -22,9 +22,11 @@ void ShootBullet_Frontia1(int level)
|
|||
case 1:
|
||||
bul_no = 1;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
bul_no = 2;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
bul_no = 3;
|
||||
break;
|
||||
|
@ -45,39 +47,39 @@ void ShootBullet_Frontia1(int level)
|
|||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x600, gMC.y - 0x1400, 1);
|
||||
SetCaret(gMC.x - 0x600, gMC.y - 0x1400, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y - (10 * 0x200), 1);
|
||||
SetCaret(gMC.x - (3 * 0x200), gMC.y - (10 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x600, gMC.y - 0x1400, 1);
|
||||
SetCaret(gMC.x + 0x600, gMC.y - 0x1400, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y - (10 * 0x200), 1);
|
||||
SetCaret(gMC.x + (3 * 0x200), gMC.y - (10 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
else if (gMC.down)
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x600, gMC.y + 0x1400, 3);
|
||||
SetCaret(gMC.x - 0x600, gMC.y + 0x1400, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y + (10 * 0x200), 3);
|
||||
SetCaret(gMC.x - (3 * 0x200), gMC.y + (10 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x600, gMC.y + 0x1400, 3);
|
||||
SetCaret(gMC.x + 0x600, gMC.y + 0x1400, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y + (10 * 0x200), 3);
|
||||
SetCaret(gMC.x + (3 * 0x200), gMC.y + (10 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0xC00, gMC.y + 0x400, 0);
|
||||
SetCaret(gMC.x - 0x1800, gMC.y + 0x400, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (2 * 0x200), 0);
|
||||
SetCaret(gMC.x - (12 * 0x200), gMC.y + (2 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0xC00, gMC.y + 0x400, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y + 0x400, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (2 * 0x200), 2);
|
||||
SetCaret(gMC.x + (12 * 0x200), gMC.y + (2 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,14 +91,17 @@ void ShootBullet_Frontia1(int level)
|
|||
void ShootBullet_PoleStar(int level)
|
||||
{
|
||||
int bul_no;
|
||||
|
||||
switch (level)
|
||||
{
|
||||
case 1:
|
||||
bul_no = 4;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
bul_no = 5;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
bul_no = 6;
|
||||
break;
|
||||
|
@ -117,39 +122,39 @@ void ShootBullet_PoleStar(int level)
|
|||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x200, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x - 0x200, gMC.y - 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||
SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x + 0x200, gMC.y - 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||
SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
else if (gMC.down)
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x200, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x - 0x200, gMC.y + 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||
SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x + 0x200, gMC.y + 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||
SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0xC00, gMC.y + 0x600, 0);
|
||||
SetCaret(gMC.x - 0x1800, gMC.y + 0x600, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (3 * 0x200), 0);
|
||||
SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0xC00, gMC.y + 0x600, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y + 0x600, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (3 * 0x200), 2);
|
||||
SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -170,16 +175,21 @@ void ShootBullet_FireBall(int level)
|
|||
case 1:
|
||||
if (CountArmsBullet(3) > 1)
|
||||
return;
|
||||
|
||||
bul_no = 7;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (CountArmsBullet(3) > 2)
|
||||
return;
|
||||
|
||||
bul_no = 8;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (CountArmsBullet(3) > 3)
|
||||
return;
|
||||
|
||||
bul_no = 9;
|
||||
break;
|
||||
}
|
||||
|
@ -196,39 +206,39 @@ void ShootBullet_FireBall(int level)
|
|||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x800, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x - 0x800, gMC.y - 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (4 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||
SetCaret(gMC.x - (4 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x800, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x + 0x800, gMC.y - 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (4 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||
SetCaret(gMC.x + (4 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
else if (gMC.down)
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x800, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x - 0x800, gMC.y + 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (4 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||
SetCaret(gMC.x - (4 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x800, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x + 0x800, gMC.y + 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (4 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||
SetCaret(gMC.x + (4 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0xC00, gMC.y + 0x400, 0);
|
||||
SetCaret(gMC.x - 0x1800, gMC.y + 0x400, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (2 * 0x200), 0);
|
||||
SetCaret(gMC.x - (12 * 0x200), gMC.y + (2 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0xC00, gMC.y + 0x400, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y + 0x400, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (2 * 0x200), 2);
|
||||
SetCaret(gMC.x + (12 * 0x200), gMC.y + (2 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -239,19 +249,21 @@ void ShootBullet_FireBall(int level)
|
|||
|
||||
void ShootBullet_Machinegun1(int level)
|
||||
{
|
||||
int bul_no;
|
||||
|
||||
if (CountArmsBullet(4) > 4)
|
||||
return;
|
||||
|
||||
int bul_no;
|
||||
|
||||
switch (level)
|
||||
{
|
||||
case 1:
|
||||
bul_no = 10;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
bul_no = 11;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
bul_no = 12;
|
||||
break;
|
||||
|
@ -279,8 +291,7 @@ void ShootBullet_Machinegun1(int level)
|
|||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (gMC.up)
|
||||
{
|
||||
if (level == 3)
|
||||
|
@ -288,13 +299,13 @@ void ShootBullet_Machinegun1(int level)
|
|||
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x600, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x - 0x600, gMC.y - 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||
SetCaret(gMC.x - (3 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x600, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x + 0x600, gMC.y - 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||
SetCaret(gMC.x + (3 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
else if (gMC.down)
|
||||
|
@ -314,26 +325,26 @@ void ShootBullet_Machinegun1(int level)
|
|||
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x600, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x - 0x600, gMC.y + 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||
SetCaret(gMC.x - (3 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x600, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x + 0x600, gMC.y + 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||
SetCaret(gMC.x + (3 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x1800, gMC.y + 0x600, 0);
|
||||
SetCaret(gMC.x - 0x1800, gMC.y + 0x600, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 0);
|
||||
SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x1800, gMC.y + 0x600, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y + 0x600, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 2);
|
||||
SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -342,12 +353,11 @@ void ShootBullet_Machinegun1(int level)
|
|||
else
|
||||
PlaySoundObject(32, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
static int wait = 0;
|
||||
|
||||
++wait;
|
||||
|
||||
if (gMC.equip & 8)
|
||||
{
|
||||
if (wait > 1)
|
||||
|
@ -378,9 +388,11 @@ void ShootBullet_Missile(int level, BOOL bSuper)
|
|||
case 1:
|
||||
bul_no = 28;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
bul_no = 29;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
bul_no = 30;
|
||||
break;
|
||||
|
@ -424,9 +436,11 @@ void ShootBullet_Missile(int level, BOOL bSuper)
|
|||
case 1:
|
||||
bul_no = 13;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
bul_no = 14;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
bul_no = 15;
|
||||
break;
|
||||
|
@ -484,39 +498,39 @@ void ShootBullet_Missile(int level, BOOL bSuper)
|
|||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x200, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x - 0x200, gMC.y - 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||
SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x + 0x200, gMC.y - 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||
SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
else if (gMC.down)
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x200, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x - 0x200, gMC.y + 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||
SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x + 0x200, gMC.y + 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||
SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0xC00, gMC.y, 0);
|
||||
SetCaret(gMC.x - 0x1800, gMC.y, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y, 0);
|
||||
SetCaret(gMC.x - (12 * 0x200), gMC.y, 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0xC00, gMC.y, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y, 2);
|
||||
SetCaret(gMC.x + (12 * 0x200), gMC.y, 3, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -539,51 +553,51 @@ void ShootBullet_Missile(int level, BOOL bSuper)
|
|||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x200, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x - 0x200, gMC.y - 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + 0x600, gMC.y, 1);
|
||||
SetBullet(bul_no, gMC.x - 0x600, gMC.y, 1);
|
||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||
SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y, 1);
|
||||
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x + 0x200, gMC.y - 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + 0x600, gMC.y, 1);
|
||||
SetBullet(bul_no, gMC.x - 0x600, gMC.y, 1);
|
||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||
SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y, 1);
|
||||
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y, 1);
|
||||
}
|
||||
}
|
||||
else if (gMC.down)
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x200, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x - 0x200, gMC.y + 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + 0x600, gMC.y, 3);
|
||||
SetBullet(bul_no, gMC.x - 0x600, gMC.y, 3);
|
||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||
SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y, 3);
|
||||
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y, 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x + 0x200, gMC.y + 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - 0x600, gMC.y, 3);
|
||||
SetBullet(bul_no, gMC.x + 0x600, gMC.y, 3);
|
||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||
SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y, 3);
|
||||
SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y, 3);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0xC00, gMC.y + 0x200, 0);
|
||||
SetCaret(gMC.x - 0x1800, gMC.y + 0x200, 3, 0);
|
||||
SetBullet(bul_no, gMC.x, gMC.y - 0x1000, 0);
|
||||
SetBullet(bul_no, gMC.x + 0x800, gMC.y - 0x200, 0);
|
||||
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (1 * 0x200), 0);
|
||||
SetCaret(gMC.x - (12 * 0x200), gMC.y + (1 * 0x200), 3, 0);
|
||||
SetBullet(bul_no, gMC.x, gMC.y - (8 * 0x200), 0);
|
||||
SetBullet(bul_no, gMC.x + (4 * 0x200), gMC.y - (1 * 0x200), 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0xC00, gMC.y + 0x200, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y + 0x200, 3, 0);
|
||||
SetBullet(bul_no, gMC.x, gMC.y - 0x1000, 2);
|
||||
SetBullet(bul_no, gMC.x - 0x800, gMC.y - 0x200, 2);
|
||||
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (1 * 0x200), 2);
|
||||
SetCaret(gMC.x + (12 * 0x200), gMC.y + (1 * 0x200), 3, 0);
|
||||
SetBullet(bul_no, gMC.x, gMC.y - (8 * 0x200), 2);
|
||||
SetBullet(bul_no, gMC.x - (4 * 0x200), gMC.y - (1 * 0x200), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -613,51 +627,49 @@ void ShootBullet_Bubblin1(void)
|
|||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (gMC.up)
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(19, gMC.x - 0x200, gMC.y - 0x400, 1);
|
||||
SetCaret(gMC.x - 0x200, gMC.y - 0x400, 3, 0);
|
||||
SetBullet(19, gMC.x - (1 * 0x200), gMC.y - (2 * 0x200), 1);
|
||||
SetCaret(gMC.x - (1 * 0x200), gMC.y - (2 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(19, gMC.x + 0x200, gMC.y - 0x400, 1);
|
||||
SetCaret(gMC.x + 0x200, gMC.y - 0x400, 3, 0);
|
||||
SetBullet(19, gMC.x + (1 * 0x200), gMC.y - (2 * 0x200), 1);
|
||||
SetCaret(gMC.x + (1 * 0x200), gMC.y - (2 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
else if (gMC.down)
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(19, gMC.x - 0x200, gMC.y + 0x400, 3);
|
||||
SetCaret(gMC.x - 0x200, gMC.y + 0x400, 3, 0);
|
||||
SetBullet(19, gMC.x - (1 * 0x200), gMC.y + (2 * 0x200), 3);
|
||||
SetCaret(gMC.x - (1 * 0x200), gMC.y + (2 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(19, gMC.x + 0x200, gMC.y + 0x400, 3);
|
||||
SetCaret(gMC.x + 0x200, gMC.y + 0x400, 3, 0);
|
||||
SetBullet(19, gMC.x + (1 * 0x200), gMC.y + (2 * 0x200), 3);
|
||||
SetCaret(gMC.x + (1 * 0x200), gMC.y + (2 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(19, gMC.x - 0xC00, gMC.y + 0x600, 0);
|
||||
SetCaret(gMC.x - 0x1800, gMC.y + 0x600, 3, 0);
|
||||
SetBullet(19, gMC.x - (6 * 0x200), gMC.y + (3 * 0x200), 0);
|
||||
SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(19, gMC.x + 0xC00, gMC.y + 0x600, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y + 0x600, 3, 0);
|
||||
SetBullet(19, gMC.x + (6 * 0x200), gMC.y + (3 * 0x200), 2);
|
||||
SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
|
||||
PlaySoundObject(48, 1);
|
||||
}
|
||||
}
|
||||
else if (++wait > 20)
|
||||
{
|
||||
wait = 0;
|
||||
|
@ -696,51 +708,49 @@ void ShootBullet_Bubblin2(int level)
|
|||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (gMC.up)
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(level, gMC.x - 0x600, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x - 0x600, gMC.y - 0x2000, 3, 0);
|
||||
SetBullet(level, gMC.x - (3 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||
SetCaret(gMC.x - (3 * 0x200), gMC.y - (16 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(level, gMC.x + 0x600, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x + 0x600, gMC.y - 0x2000, 3, 0);
|
||||
SetBullet(level, gMC.x + (3 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||
SetCaret(gMC.x + (3 * 0x200), gMC.y - (16 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
else if (gMC.down)
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(level, gMC.x - 0x600, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x - 0x600, gMC.y + 0x2000, 3, 0);
|
||||
SetBullet(level, gMC.x - (3 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||
SetCaret(gMC.x - (3 * 0x200), gMC.y + (16 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(level, gMC.x + 0x600, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x + 0x600, gMC.y + 0x2000, 3, 0);
|
||||
SetBullet(level, gMC.x + (3 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||
SetCaret(gMC.x + (3 * 0x200), gMC.y + (16 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(level, gMC.x - 0xC00, gMC.y + 0x600, 0);
|
||||
SetCaret(gMC.x - 0x1800, gMC.y + 0x600, 3, 0);
|
||||
SetBullet(level, gMC.x - (6 * 0x200), gMC.y + (3 * 0x200), 0);
|
||||
SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(level, gMC.x + 0xC00, gMC.y + 0x600, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y + 0x600, 3, 0);
|
||||
SetBullet(level, gMC.x + (6 * 0x200), gMC.y + (3 * 0x200), 2);
|
||||
SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
|
||||
PlaySoundObject(48, 1);
|
||||
}
|
||||
}
|
||||
else if (++wait > 1)
|
||||
{
|
||||
wait = 0;
|
||||
|
@ -750,19 +760,21 @@ void ShootBullet_Bubblin2(int level)
|
|||
|
||||
void ShootBullet_Sword(int level)
|
||||
{
|
||||
int bul_no;
|
||||
|
||||
if (CountArmsBullet(9) > 0)
|
||||
return;
|
||||
|
||||
int bul_no;
|
||||
|
||||
switch (level)
|
||||
{
|
||||
case 1:
|
||||
bul_no = 25;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
bul_no = 26;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
bul_no = 27;
|
||||
break;
|
||||
|
@ -773,23 +785,23 @@ void ShootBullet_Sword(int level)
|
|||
if (gMC.up)
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
SetBullet(bul_no, gMC.x - 0x200, gMC.y + 0x800, 1);
|
||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (4 * 0x200), 1);
|
||||
else
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y + 0x800, 1);
|
||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (4 * 0x200), 1);
|
||||
}
|
||||
else if (gMC.down)
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
SetBullet(bul_no, gMC.x - 0x200, gMC.y - 0xC00, 3);
|
||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (6 * 0x200), 3);
|
||||
else
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y - 0xC00, 3);
|
||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (6 * 0x200), 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
SetBullet(bul_no, gMC.x + 0xC00, gMC.y - 0x600, 0);
|
||||
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y - (3 * 0x200), 0);
|
||||
else
|
||||
SetBullet(bul_no, gMC.x - 0xC00, gMC.y - 0x600, 2);
|
||||
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y - (3 * 0x200), 2);
|
||||
}
|
||||
|
||||
PlaySoundObject(34, 1);
|
||||
|
@ -805,9 +817,11 @@ void ShootBullet_Nemesis(int level)
|
|||
case 1:
|
||||
bul_no = 34;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
bul_no = 35;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
bul_no = 36;
|
||||
break;
|
||||
|
@ -828,39 +842,39 @@ void ShootBullet_Nemesis(int level)
|
|||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x200, gMC.y - 0x1800, 1);
|
||||
SetCaret(gMC.x - 0x200, gMC.y - 0x1800, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (12 * 0x200), 1);
|
||||
SetCaret(gMC.x - (1 * 0x200), gMC.y - (12 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y - 0x1800, 1);
|
||||
SetCaret(gMC.x + 0x200, gMC.y - 0x1800, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (12 * 0x200), 1);
|
||||
SetCaret(gMC.x + (1 * 0x200), gMC.y - (12 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
else if (gMC.down)
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x200, gMC.y + 0x1800, 3);
|
||||
SetCaret(gMC.x - 0x200, gMC.y + 0x1800, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (12 * 0x200), 3);
|
||||
SetCaret(gMC.x - (1 * 0x200), gMC.y + (12 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y + 0x1800, 3);
|
||||
SetCaret(gMC.x + 0x200, gMC.y + 0x1800, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (12 * 0x200), 3);
|
||||
SetCaret(gMC.x + (1 * 0x200), gMC.y + (12 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x2C00, gMC.y + 0x600, 0);
|
||||
SetCaret(gMC.x - 0x2000, gMC.y + 0x600, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (22 * 0x200), gMC.y + (3 * 0x200), 0);
|
||||
SetCaret(gMC.x - (16 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x2C00, gMC.y + 0x600, 2);
|
||||
SetCaret(gMC.x + 0x2000, gMC.y + 0x600, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (22 * 0x200), gMC.y + (3 * 0x200), 2);
|
||||
SetCaret(gMC.x + (16 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -869,9 +883,11 @@ void ShootBullet_Nemesis(int level)
|
|||
case 1:
|
||||
PlaySoundObject(117, 1);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
PlaySoundObject(49, 1);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
PlaySoundObject(60, 1);
|
||||
break;
|
||||
|
@ -933,7 +949,7 @@ void ShootBullet_Spur(int level)
|
|||
|
||||
if (IsMaxExpMyChar())
|
||||
{
|
||||
if (bMax == FALSE)
|
||||
if (!bMax)
|
||||
{
|
||||
bMax = TRUE;
|
||||
PlaySoundObject(65, 1);
|
||||
|
@ -953,9 +969,11 @@ void ShootBullet_Spur(int level)
|
|||
bul_no = 6;
|
||||
bShot = FALSE;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
bul_no = 37;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (bMax)
|
||||
bul_no = 39;
|
||||
|
@ -980,39 +998,39 @@ void ShootBullet_Spur(int level)
|
|||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x200, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x - 0x200, gMC.y - 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||
SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x + 0x200, gMC.y - 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 1);
|
||||
SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
else if (gMC.down)
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x200, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x - 0x200, gMC.y + 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||
SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x + 0x200, gMC.y + 0x1000, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3);
|
||||
SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0xC00, gMC.y + 0x600, 0);
|
||||
SetCaret(gMC.x - 0x1800, gMC.y + 0x600, 3, 0);
|
||||
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (3 * 0x200), 0);
|
||||
SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0xC00, gMC.y + 0x600, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y + 0x600, 3, 0);
|
||||
SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (3 * 0x200), 2);
|
||||
SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1021,12 +1039,15 @@ void ShootBullet_Spur(int level)
|
|||
case 6:
|
||||
PlaySoundObject(49, 1);
|
||||
break;
|
||||
|
||||
case 37:
|
||||
PlaySoundObject(62, 1);
|
||||
break;
|
||||
|
||||
case 38:
|
||||
PlaySoundObject(63, 1);
|
||||
break;
|
||||
|
||||
case 39:
|
||||
PlaySoundObject(64, 1);
|
||||
break;
|
||||
|
@ -1035,20 +1056,21 @@ void ShootBullet_Spur(int level)
|
|||
}
|
||||
}
|
||||
|
||||
void ShootBullet()
|
||||
void ShootBullet(void)
|
||||
{
|
||||
if (empty)
|
||||
if (empty != 0)
|
||||
--empty;
|
||||
|
||||
// Only let the player shoot every 4 frames
|
||||
static int soft_rensha; // 'rensha' is Japanese for 'rapid-fire', apparently
|
||||
if (soft_rensha)
|
||||
if (soft_rensha != 0)
|
||||
--soft_rensha;
|
||||
|
||||
if (gKeyTrg & gKeyShot)
|
||||
{
|
||||
if (soft_rensha)
|
||||
if (soft_rensha != 0)
|
||||
return;
|
||||
|
||||
soft_rensha = 4;
|
||||
}
|
||||
|
||||
|
@ -1061,54 +1083,67 @@ void ShootBullet()
|
|||
case 1:
|
||||
ShootBullet_Frontia1(gArmsData[gSelectedArms].level);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
ShootBullet_PoleStar(gArmsData[gSelectedArms].level);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
ShootBullet_FireBall(gArmsData[gSelectedArms].level);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
ShootBullet_Machinegun1(gArmsData[gSelectedArms].level);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
ShootBullet_Missile(gArmsData[gSelectedArms].level, FALSE);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
switch (gArmsData[gSelectedArms].level)
|
||||
{
|
||||
case 1:
|
||||
ShootBullet_Bubblin1();
|
||||
break;
|
||||
|
||||
case 2:
|
||||
ShootBullet_Bubblin2(2);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
ShootBullet_Bubblin2(3);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 9:
|
||||
switch (gArmsData[gSelectedArms].level)
|
||||
{
|
||||
case 1:
|
||||
ShootBullet_Sword(1);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
ShootBullet_Sword(2);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
ShootBullet_Sword(3);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 10:
|
||||
ShootBullet_Missile(gArmsData[gSelectedArms].level, TRUE);
|
||||
break;
|
||||
|
||||
case 12:
|
||||
ShootBullet_Nemesis(gArmsData[gSelectedArms].level);
|
||||
break;
|
||||
|
||||
case 13:
|
||||
ShootBullet_Spur(gArmsData[gSelectedArms].level);
|
||||
break;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#pragma once
|
||||
|
||||
void ResetSpurCharge(void);
|
||||
void ShootBullet();
|
||||
void ShootBullet(void);
|
||||
|
|
Loading…
Add table
Reference in a new issue