Made Shoot.cpp ASM-accurate
This commit is contained in:
parent
75e062c775
commit
c9ac9d446d
4 changed files with 622 additions and 511 deletions
|
@ -554,6 +554,54 @@ addr = 0x41C8F0
|
|||
name = "MakePixelWaveData"
|
||||
addr = 0x41CB10
|
||||
|
||||
[[func]]
|
||||
name = "ShootBullet_Frontia1"
|
||||
addr = 0x41DBD0
|
||||
|
||||
[[func]]
|
||||
name = "ShootBullet_PoleStar"
|
||||
addr = 0x41DE60
|
||||
|
||||
[[func]]
|
||||
name = "ShootBullet_FireBall"
|
||||
addr = 0x41E110
|
||||
|
||||
[[func]]
|
||||
name = "ShootBullet_Machinegun1"
|
||||
addr = 0x41E3D0
|
||||
|
||||
[[func]]
|
||||
name = "ShootBullet_Missile"
|
||||
addr = 0x41E7B0
|
||||
|
||||
[[func]]
|
||||
name = "ShootBullet_Bubblin1"
|
||||
addr = 0x41EFD0
|
||||
|
||||
[[func]]
|
||||
name = "ShootBullet_Bubblin2"
|
||||
addr = 0x41F280
|
||||
|
||||
[[func]]
|
||||
name = "ShootBullet_Sword"
|
||||
addr = 0x41F580
|
||||
|
||||
[[func]]
|
||||
name = "ShootBullet_Nemesis"
|
||||
addr = 0x41F710
|
||||
|
||||
[[func]]
|
||||
name = "ResetSpurCharge"
|
||||
addr = 0x41F9E0
|
||||
|
||||
[[func]]
|
||||
name = "ShootBullet_Spur"
|
||||
addr = 0x41FA10
|
||||
|
||||
[[func]]
|
||||
name = "ShootBullet"
|
||||
addr = 0x41FE70
|
||||
|
||||
[[func]]
|
||||
name = "PlaySoundObject"
|
||||
addr = 0x420640
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include "SDL.h"
|
||||
|
||||
#include "WindowsWrapper.h"
|
||||
|
||||
#include "ArmsItem.h"
|
||||
#include "CommonDefines.h"
|
||||
#include "Caret.h"
|
||||
|
@ -92,7 +94,7 @@ void ZeroExpMyChar()
|
|||
gArmsData[gSelectedArms].exp = 0;
|
||||
}
|
||||
|
||||
bool IsMaxExpMyChar()
|
||||
BOOL IsMaxExpMyChar()
|
||||
{
|
||||
return gArmsData[gSelectedArms].level == 3
|
||||
&& gArmsData[gSelectedArms].exp >= gArmsLevelTable[gArmsData[gSelectedArms].code].exp[2];
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "WindowsWrapper.h"
|
||||
|
||||
struct ARMS_LEVEL
|
||||
{
|
||||
int exp[3];
|
||||
|
@ -17,7 +19,7 @@ extern ARMS_LEVEL gArmsLevelTable[14];
|
|||
|
||||
void AddExpMyChar(int x);
|
||||
void ZeroExpMyChar();
|
||||
bool IsMaxExpMyChar();
|
||||
BOOL IsMaxExpMyChar();
|
||||
void DamageMyChar(int damage);
|
||||
void ZeroArmsEnergy_All();
|
||||
void AddBulletMyChar(int no, int val);
|
||||
|
|
471
src/Shoot.cpp
471
src/Shoot.cpp
|
@ -28,7 +28,10 @@ void ShootBullet_Frontia1(int level)
|
|||
break;
|
||||
}
|
||||
|
||||
if (CountArmsBullet(1) <= 3 && gKeyTrg & gKeyShot)
|
||||
if (CountArmsBullet(1) > 3)
|
||||
return;
|
||||
|
||||
if (gKeyTrg & gKeyShot)
|
||||
{
|
||||
if (!UseArmsEnergy(1))
|
||||
{
|
||||
|
@ -86,18 +89,21 @@ 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;
|
||||
case 1:
|
||||
bul_no = 4;
|
||||
break;
|
||||
}
|
||||
|
||||
if (CountArmsBullet(2) < 2 && gKeyTrg & gKeyShot)
|
||||
if (CountArmsBullet(2) > 1)
|
||||
return;
|
||||
|
||||
if (gKeyTrg & gKeyShot)
|
||||
{
|
||||
if (!UseArmsEnergy(1))
|
||||
{
|
||||
|
@ -107,42 +113,42 @@ void ShootBullet_PoleStar(int level)
|
|||
{
|
||||
if (gMC.up)
|
||||
{
|
||||
if (gMC.direct)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x + 0x200, gMC.y - 0x1000, 3, 0);
|
||||
}
|
||||
else
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x200, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x - 0x200, gMC.y - 0x1000, 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x + 0x200, gMC.y - 0x1000, 3, 0);
|
||||
}
|
||||
}
|
||||
else if (gMC.down)
|
||||
{
|
||||
if (gMC.direct)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x + 0x200, gMC.y + 0x1000, 3, 0);
|
||||
}
|
||||
else
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x200, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x - 0x200, gMC.y + 0x1000, 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x + 0x200, gMC.y + 0x1000, 3, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.direct)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0xC00, gMC.y + 0x600, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y + 0x600, 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);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0xC00, gMC.y + 0x600, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y + 0x600, 3, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (level == 3)
|
||||
|
@ -160,17 +166,17 @@ void ShootBullet_FireBall(int level)
|
|||
switch (level)
|
||||
{
|
||||
case 1:
|
||||
if (CountArmsBullet(3) >= 2)
|
||||
if (CountArmsBullet(3) > 1)
|
||||
return;
|
||||
bul_no = 7;
|
||||
break;
|
||||
case 2:
|
||||
if (CountArmsBullet(3) >= 3)
|
||||
if (CountArmsBullet(3) > 2)
|
||||
return;
|
||||
bul_no = 8;
|
||||
break;
|
||||
case 3:
|
||||
if (CountArmsBullet(3) >= 4)
|
||||
if (CountArmsBullet(3) > 3)
|
||||
return;
|
||||
bul_no = 9;
|
||||
break;
|
||||
|
@ -186,42 +192,42 @@ void ShootBullet_FireBall(int level)
|
|||
{
|
||||
if (gMC.up)
|
||||
{
|
||||
if (gMC.direct)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x800, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x + 0x800, gMC.y - 0x1000, 3, 0);
|
||||
}
|
||||
else
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x800, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x - 0x800, gMC.y - 0x1000, 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x800, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x + 0x800, gMC.y - 0x1000, 3, 0);
|
||||
}
|
||||
}
|
||||
else if (gMC.down)
|
||||
{
|
||||
if (gMC.direct)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x800, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x + 0x800, gMC.y + 0x1000, 3, 0);
|
||||
}
|
||||
else
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x800, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x - 0x800, gMC.y + 0x1000, 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x800, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x + 0x800, gMC.y + 0x1000, 3, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.direct)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0xC00, gMC.y + 0x400, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y + 0x400, 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);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0xC00, gMC.y + 0x400, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y + 0x400, 3, 0);
|
||||
}
|
||||
}
|
||||
|
||||
PlaySoundObject(34, 1);
|
||||
|
@ -231,8 +237,9 @@ void ShootBullet_FireBall(int level)
|
|||
|
||||
void ShootBullet_Machinegun1(int level)
|
||||
{
|
||||
if (CountArmsBullet(4) < 5)
|
||||
{
|
||||
if (CountArmsBullet(4) > 4)
|
||||
return;
|
||||
|
||||
int bul_no;
|
||||
|
||||
switch (level)
|
||||
|
@ -253,18 +260,22 @@ void ShootBullet_Machinegun1(int level)
|
|||
|
||||
if (gKey & gKeyShot)
|
||||
{
|
||||
if (++gMC.rensha > 6)
|
||||
{
|
||||
if (++gMC.rensha < 6)
|
||||
return;
|
||||
|
||||
gMC.rensha = 0;
|
||||
|
||||
if (!UseArmsEnergy(1))
|
||||
{
|
||||
PlaySoundObject(37, 1);
|
||||
|
||||
if (!empty)
|
||||
if (empty == 0)
|
||||
{
|
||||
SetCaret(gMC.x, gMC.y, 16, 0);
|
||||
empty = 50;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -273,16 +284,16 @@ void ShootBullet_Machinegun1(int level)
|
|||
if (level == 3)
|
||||
gMC.ym += 0x100;
|
||||
|
||||
if (gMC.direct)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x600, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x + 0x600, gMC.y - 0x1000, 3, 0);
|
||||
}
|
||||
else
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x600, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x - 0x600, gMC.y - 0x1000, 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x600, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x + 0x600, gMC.y - 0x1000, 3, 0);
|
||||
}
|
||||
}
|
||||
else if (gMC.down)
|
||||
{
|
||||
|
@ -299,29 +310,29 @@ void ShootBullet_Machinegun1(int level)
|
|||
}
|
||||
}
|
||||
|
||||
if (gMC.direct)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x600, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x + 0x600, gMC.y + 0x1000, 3, 0);
|
||||
}
|
||||
else
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x600, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x - 0x600, gMC.y + 0x1000, 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x600, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x + 0x600, gMC.y + 0x1000, 3, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.direct)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x1800, gMC.y + 0x600, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y + 0x600, 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);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x1800, gMC.y + 0x600, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y + 0x600, 3, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (level == 3)
|
||||
|
@ -330,7 +341,6 @@ void ShootBullet_Machinegun1(int level)
|
|||
PlaySoundObject(32, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
static int wait = 0;
|
||||
|
@ -354,9 +364,8 @@ void ShootBullet_Machinegun1(int level)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ShootBullet_Missile(int level, bool bSuper)
|
||||
void ShootBullet_Missile(int level, BOOL bSuper)
|
||||
{
|
||||
int bul_no;
|
||||
|
||||
|
@ -375,20 +384,34 @@ void ShootBullet_Missile(int level, bool bSuper)
|
|||
break;
|
||||
}
|
||||
|
||||
if (level == 1)
|
||||
switch (level)
|
||||
{
|
||||
if (CountArmsBullet(10) >= 1 || CountArmsBullet(11) >= 1)
|
||||
case 1:
|
||||
if (CountArmsBullet(10) > 0)
|
||||
return;
|
||||
}
|
||||
else if (level == 2)
|
||||
{
|
||||
if (CountArmsBullet(10) >= 2 || CountArmsBullet(11) >= 2)
|
||||
|
||||
if (CountArmsBullet(11) > 0)
|
||||
return;
|
||||
}
|
||||
else if (level == 3)
|
||||
{
|
||||
if (CountArmsBullet(10) >= 4 || CountArmsBullet(11) >= 4)
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (CountArmsBullet(10) > 1)
|
||||
return;
|
||||
|
||||
if (CountArmsBullet(11) > 1)
|
||||
return;
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (CountArmsBullet(10) > 3)
|
||||
return;
|
||||
|
||||
if (CountArmsBullet(11) > 3)
|
||||
return;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -407,33 +430,46 @@ void ShootBullet_Missile(int level, bool bSuper)
|
|||
break;
|
||||
}
|
||||
|
||||
if (level == 1)
|
||||
switch (level)
|
||||
{
|
||||
if (CountArmsBullet(5) >= 1 || CountArmsBullet(6) >= 1)
|
||||
case 1:
|
||||
if (CountArmsBullet(5) > 0)
|
||||
return;
|
||||
}
|
||||
else if (level == 2)
|
||||
{
|
||||
if (CountArmsBullet(5) >= 2 || CountArmsBullet(6) >= 2)
|
||||
|
||||
if (CountArmsBullet(6) > 0)
|
||||
return;
|
||||
}
|
||||
else if ( level == 3 )
|
||||
{
|
||||
if (CountArmsBullet(5) >= 4 || CountArmsBullet(6) >= 4)
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (CountArmsBullet(5) > 1)
|
||||
return;
|
||||
|
||||
if (CountArmsBullet(6) > 1)
|
||||
return;
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (CountArmsBullet(5) > 3)
|
||||
return;
|
||||
|
||||
if (CountArmsBullet(6) > 3)
|
||||
return;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(gKeyTrg & gKeyShot))
|
||||
return;
|
||||
|
||||
if (gKeyTrg & gKeyShot)
|
||||
{
|
||||
if (level < 3)
|
||||
{
|
||||
if (!UseArmsEnergy(1))
|
||||
{
|
||||
PlaySoundObject(37, 1);
|
||||
|
||||
if (!empty)
|
||||
if (empty == 0)
|
||||
{
|
||||
SetCaret(gMC.x, gMC.y, 16, 0);
|
||||
empty = 50;
|
||||
|
@ -444,42 +480,42 @@ void ShootBullet_Missile(int level, bool bSuper)
|
|||
|
||||
if (gMC.up)
|
||||
{
|
||||
if (gMC.direct)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x + 0x200, gMC.y - 0x1000, 3, 0);
|
||||
}
|
||||
else
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x200, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x - 0x200, gMC.y - 0x1000, 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x + 0x200, gMC.y - 0x1000, 3, 0);
|
||||
}
|
||||
}
|
||||
else if (gMC.down)
|
||||
{
|
||||
if (gMC.direct)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x + 0x200, gMC.y + 0x1000, 3, 0);
|
||||
}
|
||||
else
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0x200, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x - 0x200, gMC.y + 0x1000, 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0x200, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x + 0x200, gMC.y + 0x1000, 3, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.direct)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0xC00, gMC.y, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y, 3, 0);
|
||||
}
|
||||
else
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(bul_no, gMC.x - 0xC00, gMC.y, 0);
|
||||
SetCaret(gMC.x - 0x1800, gMC.y, 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(bul_no, gMC.x + 0xC00, gMC.y, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y, 3, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -488,7 +524,7 @@ void ShootBullet_Missile(int level, bool bSuper)
|
|||
{
|
||||
PlaySoundObject(37, 1);
|
||||
|
||||
if (!empty)
|
||||
if (empty == 0)
|
||||
{
|
||||
SetCaret(gMC.x, gMC.y, 16, 0);
|
||||
empty = 50;
|
||||
|
@ -499,114 +535,122 @@ void ShootBullet_Missile(int level, bool bSuper)
|
|||
|
||||
if (gMC.up)
|
||||
{
|
||||
if (gMC.direct)
|
||||
{
|
||||
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);
|
||||
}
|
||||
else
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
else if (gMC.down)
|
||||
{
|
||||
if (gMC.direct)
|
||||
{
|
||||
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);
|
||||
}
|
||||
else
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.direct)
|
||||
{
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PlaySoundObject(32, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void ShootBullet_Bubblin1(void)
|
||||
{
|
||||
static int wait;
|
||||
|
||||
if (CountArmsBullet(7) <= 3)
|
||||
{
|
||||
if (CountArmsBullet(7) > 3)
|
||||
return;
|
||||
|
||||
if (gKeyTrg & gKeyShot)
|
||||
{
|
||||
if (!UseArmsEnergy(1))
|
||||
{
|
||||
PlaySoundObject(37, 1);
|
||||
if (!empty)
|
||||
|
||||
if (empty == 0)
|
||||
{
|
||||
SetCaret(gMC.x, gMC.y, 16, 0);
|
||||
empty = 50;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.up)
|
||||
{
|
||||
if (gMC.direct)
|
||||
{
|
||||
SetBullet(19, gMC.x + 0x200, gMC.y - 0x400, 1);
|
||||
SetCaret(gMC.x + 0x200, gMC.y - 0x400, 3, 0);
|
||||
}
|
||||
else
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(19, gMC.x - 0x200, gMC.y - 0x400, 1);
|
||||
SetCaret(gMC.x - 0x200, gMC.y - 0x400, 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(19, gMC.x + 0x200, gMC.y - 0x400, 1);
|
||||
SetCaret(gMC.x + 0x200, gMC.y - 0x400, 3, 0);
|
||||
}
|
||||
}
|
||||
else if (gMC.down)
|
||||
{
|
||||
if (gMC.direct)
|
||||
{
|
||||
SetBullet(19, gMC.x + 0x200, gMC.y + 0x400, 3);
|
||||
SetCaret(gMC.x + 0x200, gMC.y + 0x400, 3, 0);
|
||||
}
|
||||
else
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(19, gMC.x - 0x200, gMC.y + 0x400, 3);
|
||||
SetCaret(gMC.x - 0x200, gMC.y + 0x400, 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(19, gMC.x + 0x200, gMC.y + 0x400, 3);
|
||||
SetCaret(gMC.x + 0x200, gMC.y + 0x400, 3, 0);
|
||||
}
|
||||
else if (gMC.direct)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(19, gMC.x - 0xC00, gMC.y + 0x600, 0);
|
||||
SetCaret(gMC.x - 0x1800, gMC.y + 0x600, 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(19, gMC.x + 0xC00, gMC.y + 0x600, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y + 0x600, 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(19, gMC.x - 0xC00, gMC.y + 0x600, 0);
|
||||
SetCaret(gMC.x - 0x1800, gMC.y + 0x600, 3, 0);
|
||||
}
|
||||
|
||||
PlaySoundObject(48, 1);
|
||||
|
@ -618,14 +662,14 @@ void ShootBullet_Bubblin1(void)
|
|||
ChargeArmsEnergy(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ShootBullet_Bubblin2(int level)
|
||||
{
|
||||
static int wait;
|
||||
|
||||
if (CountArmsBullet(7) <= 15)
|
||||
{
|
||||
if (CountArmsBullet(7) > 15)
|
||||
return;
|
||||
|
||||
level += 18;
|
||||
|
||||
if (!(gKey & gKeyShot))
|
||||
|
@ -633,74 +677,80 @@ void ShootBullet_Bubblin2(int level)
|
|||
|
||||
if (gKey & gKeyShot)
|
||||
{
|
||||
if (++gMC.rensha >= 7)
|
||||
{
|
||||
if (++gMC.rensha < 7)
|
||||
return;
|
||||
|
||||
gMC.rensha = 0;
|
||||
|
||||
if (!UseArmsEnergy(1))
|
||||
{
|
||||
PlaySoundObject(37, 1);
|
||||
if (!empty)
|
||||
|
||||
if (empty == 0)
|
||||
{
|
||||
SetCaret(gMC.x, gMC.y, 16, 0);
|
||||
empty = 50;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gMC.up)
|
||||
{
|
||||
if (gMC.direct)
|
||||
{
|
||||
SetBullet(level, gMC.x + 0x600, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x + 0x600, gMC.y - 0x2000, 3, 0);
|
||||
}
|
||||
else
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(level, gMC.x - 0x600, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x - 0x600, gMC.y - 0x2000, 3, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(level, gMC.x + 0x600, gMC.y - 0x1000, 1);
|
||||
SetCaret(gMC.x + 0x600, gMC.y - 0x2000, 3, 0);
|
||||
}
|
||||
}
|
||||
else if (gMC.down)
|
||||
{
|
||||
if (gMC.direct)
|
||||
{
|
||||
SetBullet(level, gMC.x + 0x600, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x + 0x600, gMC.y + 0x2000, 3, 0);
|
||||
}
|
||||
else
|
||||
if (gMC.direct == 0)
|
||||
{
|
||||
SetBullet(level, gMC.x - 0x600, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x - 0x600, gMC.y + 0x2000, 3, 0);
|
||||
}
|
||||
}
|
||||
else if (gMC.direct)
|
||||
else
|
||||
{
|
||||
SetBullet(level, gMC.x + 0xC00, gMC.y + 0x600, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y + 0x600, 3, 0);
|
||||
SetBullet(level, gMC.x + 0x600, gMC.y + 0x1000, 3);
|
||||
SetCaret(gMC.x + 0x600, gMC.y + 0x2000, 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);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetBullet(level, gMC.x + 0xC00, gMC.y + 0x600, 2);
|
||||
SetCaret(gMC.x + 0x1800, gMC.y + 0x600, 3, 0);
|
||||
}
|
||||
}
|
||||
|
||||
PlaySoundObject(48, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (++wait > 1)
|
||||
{
|
||||
wait = 0;
|
||||
ChargeArmsEnergy(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ShootBullet_Sword(int level)
|
||||
{
|
||||
if (CountArmsBullet(9) <= 0)
|
||||
{
|
||||
if (CountArmsBullet(9) > 0)
|
||||
return;
|
||||
|
||||
int bul_no;
|
||||
|
||||
switch (level)
|
||||
|
@ -743,7 +793,6 @@ void ShootBullet_Sword(int level)
|
|||
PlaySoundObject(34, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ShootBullet_Nemesis(int level)
|
||||
{
|
||||
|
@ -762,7 +811,10 @@ void ShootBullet_Nemesis(int level)
|
|||
break;
|
||||
}
|
||||
|
||||
if (CountArmsBullet(12) <= 1 && gKeyTrg & gKeyShot)
|
||||
if (CountArmsBullet(12) > 1)
|
||||
return;
|
||||
|
||||
if (gKeyTrg & gKeyShot)
|
||||
{
|
||||
if (!UseArmsEnergy(1))
|
||||
{
|
||||
|
@ -836,9 +888,11 @@ void ResetSpurCharge(void)
|
|||
|
||||
void ShootBullet_Spur(int level)
|
||||
{
|
||||
static BOOL bMax;
|
||||
BOOL bShot;
|
||||
int bul_no;
|
||||
|
||||
bool bShot = false;
|
||||
bShot = FALSE;
|
||||
|
||||
if (gKey & gKeyShot)
|
||||
{
|
||||
|
@ -849,42 +903,43 @@ void ShootBullet_Spur(int level)
|
|||
|
||||
if (++spur_charge / 2 % 2)
|
||||
{
|
||||
if (level == 1)
|
||||
switch (level)
|
||||
{
|
||||
case 1:
|
||||
PlaySoundObject(59, 1);
|
||||
}
|
||||
else if (level == 2)
|
||||
{
|
||||
break;
|
||||
|
||||
case 2:
|
||||
PlaySoundObject(60, 1);
|
||||
}
|
||||
else if (level == 3)
|
||||
{
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (!IsMaxExpMyChar())
|
||||
PlaySoundObject(61, 1);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (spur_charge)
|
||||
bShot = true;
|
||||
bShot = TRUE;
|
||||
|
||||
spur_charge = 0;
|
||||
}
|
||||
|
||||
static bool bMax;
|
||||
|
||||
if (IsMaxExpMyChar())
|
||||
{
|
||||
if (bMax == false)
|
||||
if (bMax == FALSE)
|
||||
{
|
||||
bMax = true;
|
||||
bMax = TRUE;
|
||||
PlaySoundObject(65, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bMax = false;
|
||||
bMax = FALSE;
|
||||
}
|
||||
|
||||
if (!(gKey & gKeyShot))
|
||||
|
@ -894,7 +949,7 @@ void ShootBullet_Spur(int level)
|
|||
{
|
||||
case 1:
|
||||
bul_no = 6;
|
||||
bShot = false;
|
||||
bShot = FALSE;
|
||||
break;
|
||||
case 2:
|
||||
bul_no = 37;
|
||||
|
@ -904,10 +959,14 @@ void ShootBullet_Spur(int level)
|
|||
bul_no = 39;
|
||||
else
|
||||
bul_no = 38;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (CountArmsBullet(13) <= 0 && CountArmsBullet(14) <= 0 && (gKeyTrg & gKeyShot || bShot))
|
||||
if (CountArmsBullet(13) > 0 || CountArmsBullet(14) > 0)
|
||||
return;
|
||||
|
||||
if (gKeyTrg & gKeyShot || bShot)
|
||||
{
|
||||
if (!UseArmsEnergy(1))
|
||||
{
|
||||
|
@ -992,8 +1051,9 @@ void ShootBullet()
|
|||
}
|
||||
|
||||
//Run functions
|
||||
if (!(gMC.cond & 2))
|
||||
{
|
||||
if (gMC.cond & 2)
|
||||
return;
|
||||
|
||||
switch (gArmsData[gSelectedArms].code)
|
||||
{
|
||||
case 1:
|
||||
|
@ -1009,7 +1069,7 @@ void ShootBullet()
|
|||
ShootBullet_Machinegun1(gArmsData[gSelectedArms].level);
|
||||
break;
|
||||
case 5:
|
||||
ShootBullet_Missile(gArmsData[gSelectedArms].level, false);
|
||||
ShootBullet_Missile(gArmsData[gSelectedArms].level, FALSE);
|
||||
break;
|
||||
case 7:
|
||||
switch (gArmsData[gSelectedArms].level)
|
||||
|
@ -1042,7 +1102,7 @@ void ShootBullet()
|
|||
|
||||
break;
|
||||
case 10:
|
||||
ShootBullet_Missile(gArmsData[gSelectedArms].level, true);
|
||||
ShootBullet_Missile(gArmsData[gSelectedArms].level, TRUE);
|
||||
break;
|
||||
case 12:
|
||||
ShootBullet_Nemesis(gArmsData[gSelectedArms].level);
|
||||
|
@ -1052,4 +1112,3 @@ void ShootBullet()
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue