shithub: cstory

Download patch

ref: 9468659b4331fd2aaad48613c676c8650d2af555
parent: 156e47438c769ba8d9cf29d1f50a95ef9c1d913d
author: Clownacy <Clownacy@users.noreply.github.com>
date: Wed Nov 13 20:06:04 EST 2019

Clean-up Shoot.cpp

--- a/src/Shoot.cpp
+++ b/src/Shoot.cpp
@@ -22,9 +22,11 @@
 		case 1:
 			bul_no = 1;
 			break;
+
 		case 2:
 			bul_no = 2;
 			break;
+
 		case 3:
 			bul_no = 3;
 			break;
@@ -45,13 +47,13 @@
 			{
 				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)
@@ -58,13 +60,13 @@
 			{
 				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
@@ -71,13 +73,13 @@
 			{
 				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_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,13 +122,13 @@
 			{
 				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)
@@ -130,13 +135,13 @@
 			{
 				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
@@ -143,13 +148,13 @@
 			{
 				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 @@
 		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,13 +206,13 @@
 			{
 				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)
@@ -209,13 +219,13 @@
 			{
 				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
@@ -222,13 +232,13 @@
 			{
 				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_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,75 +291,73 @@
 
 			return;
 		}
-		else
+
+		if (gMC.up)
 		{
-			if (gMC.up)
-			{
-				if (level == 3)
-					gMC.ym += 0x100;
+			if (level == 3)
+				gMC.ym += 0x100;
 
-				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);
-				}
+			if (gMC.direct == 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)
+			else
 			{
-				if (level == 3)
-				{
-					if (gMC.ym > 0)
-						gMC.ym /= 2;
+				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)
+		{
+			if (level == 3)
+			{
+				if (gMC.ym > 0)
+					gMC.ym /= 2;
 
-					if (gMC.ym > -0x400)
-					{
-						gMC.ym -= 0x200;
-						if (gMC.ym < -0x400)
-							gMC.ym = -0x400;
-					}
-				}
-
-				if (gMC.direct == 0)
+				if (gMC.ym > -0x400)
 				{
-					SetBullet(bul_no, gMC.x - 0x600, gMC.y + 0x1000, 3);
-					SetCaret(gMC.x - 0x600, gMC.y + 0x1000, 3, 0);
+					gMC.ym -= 0x200;
+					if (gMC.ym < -0x400)
+						gMC.ym = -0x400;
 				}
-				else
-				{
-					SetBullet(bul_no, gMC.x + 0x600, gMC.y + 0x1000, 3);
-					SetCaret(gMC.x + 0x600, gMC.y + 0x1000, 3, 0);
-				}
 			}
+
+			if (gMC.direct == 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);
-				}
-				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 + (3 * 0x200), gMC.y + (8 * 0x200), 3);
+				SetCaret(gMC.x + (3 * 0x200), gMC.y + (8 * 0x200), 3, 0);
 			}
-
-			if (level == 3)
-				PlaySoundObject(49, 1);
+		}
+		else
+		{
+			if (gMC.direct == 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
-				PlaySoundObject(32, 1);
+			{
+				SetBullet(bul_no, gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 2);
+				SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 3, 0);
+			}
 		}
+
+		if (level == 3)
+			PlaySoundObject(49, 1);
+		else
+			PlaySoundObject(32, 1);
 	}
 	else
 	{
 		static int wait = 0;
-
 		++wait;
+
 		if (gMC.equip & 8)
 		{
 			if (wait > 1)
@@ -378,9 +388,11 @@
 			case 1:
 				bul_no = 28;
 				break;
+
 			case 2:
 				bul_no = 29;
 				break;
+
 			case 3:
 				bul_no = 30;
 				break;
@@ -424,9 +436,11 @@
 			case 1:
 				bul_no = 13;
 				break;
+
 			case 2:
 				bul_no = 14;
 				break;
+
 			case 3:
 				bul_no = 15;
 				break;
@@ -484,13 +498,13 @@
 			{
 				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)
@@ -497,13 +511,13 @@
 			{
 				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
@@ -510,13 +524,13 @@
 			{
 				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,17 +553,17 @@
 			{
 				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)
@@ -556,17 +570,17 @@
 			{
 				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
@@ -573,17 +587,17 @@
 			{
 				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,50 +627,48 @@
 
 			return;
 		}
-		else
+
+		if (gMC.up)
 		{
-			if (gMC.up)
+			if (gMC.direct == 0)
 			{
-				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);
-				}
+				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)
+			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);
-				}
+				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 - (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);
-				}
-				else
-				{
-					SetBullet(19, gMC.x + 0xC00, gMC.y + 0x600, 2);
-					SetCaret(gMC.x + 0x1800, gMC.y + 0x600, 3, 0);
-				}
+				SetBullet(19, gMC.x + (1 * 0x200), gMC.y + (2 * 0x200), 3);
+				SetCaret(gMC.x + (1 * 0x200), gMC.y + (2 * 0x200), 3, 0);
 			}
-
-			PlaySoundObject(48, 1);
 		}
+		else
+		{
+			if (gMC.direct == 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 + (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)
 	{
@@ -696,50 +708,48 @@
 
 			return;
 		}
-		else
+
+		if (gMC.up)
 		{
-			if (gMC.up)
+			if (gMC.direct == 0)
 			{
-				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);
-				}
+				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)
+			else
 			{
-				if (gMC.direct == 0)
-				{
-					SetBullet(level, gMC.x - 0x600, gMC.y + 0x1000, 3);
-					SetCaret(gMC.x - 0x600, gMC.y + 0x2000, 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), 1);
+				SetCaret(gMC.x + (3 * 0x200), gMC.y - (16 * 0x200), 3, 0);
 			}
+		}
+		else if (gMC.down)
+		{
+			if (gMC.direct == 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);
-				}
-				else
-				{
-					SetBullet(level, gMC.x + 0xC00, gMC.y + 0x600, 2);
-					SetCaret(gMC.x + 0x1800, gMC.y + 0x600, 3, 0);
-				}
+				SetBullet(level, gMC.x + (3 * 0x200), gMC.y + (8 * 0x200), 3);
+				SetCaret(gMC.x + (3 * 0x200), gMC.y + (16 * 0x200), 3, 0);
 			}
-
-			PlaySoundObject(48, 1);
 		}
+		else
+		{
+			if (gMC.direct == 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 + (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)
 	{
@@ -750,19 +760,21 @@
 
 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 @@
 		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 @@
 		case 1:
 			bul_no = 34;
 			break;
+
 		case 2:
 			bul_no = 35;
 			break;
+
 		case 3:
 			bul_no = 36;
 			break;
@@ -828,13 +842,13 @@
 			{
 				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)
@@ -841,13 +855,13 @@
 			{
 				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
@@ -854,13 +868,13 @@
 			{
 				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 @@
 				case 1:
 					PlaySoundObject(117, 1);
 					break;
+
 				case 2:
 					PlaySoundObject(49, 1);
 					break;
+
 				case 3:
 					PlaySoundObject(60, 1);
 					break;
@@ -933,7 +949,7 @@
 
 	if (IsMaxExpMyChar())
 	{
-		if (bMax == FALSE)
+		if (!bMax)
 		{
 			bMax = TRUE;
 			PlaySoundObject(65, 1);
@@ -953,9 +969,11 @@
 			bul_no = 6;
 			bShot = FALSE;
 			break;
+
 		case 2:
 			bul_no = 37;
 			break;
+
 		case 3:
 			if (bMax)
 				bul_no = 39;
@@ -980,13 +998,13 @@
 			{
 				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)
@@ -993,13 +1011,13 @@
 			{
 				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
@@ -1006,13 +1024,13 @@
 			{
 				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 @@
 				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,24 +1056,25 @@
 	}
 }
 
-void ShootBullet()
+void ShootBullet(void)
 {
-	if (empty)
+	if (empty != 0)
 		--empty;
 
-	//Only let the player shoot every 4 frames
+	// 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;
 	}
 
-	//Run functions
+	// Run functions
 	if (gMC.cond & 2)
 		return;
 
@@ -1061,18 +1083,23 @@
 		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)
 			{
@@ -1079,9 +1106,11 @@
 				case 1:
 					ShootBullet_Bubblin1();
 					break;
+
 				case 2:
 					ShootBullet_Bubblin2(2);
 					break;
+
 				case 3:
 					ShootBullet_Bubblin2(3);
 					break;
@@ -1088,6 +1117,7 @@
 			}
 
 			break;
+
 		case 9:
 			switch (gArmsData[gSelectedArms].level)
 			{
@@ -1094,9 +1124,11 @@
 				case 1:
 					ShootBullet_Sword(1);
 					break;
+
 				case 2:
 					ShootBullet_Sword(2);
 					break;
+
 				case 3:
 					ShootBullet_Sword(3);
 					break;
@@ -1103,12 +1135,15 @@
 			}
 
 			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;
--- a/src/Shoot.h
+++ b/src/Shoot.h
@@ -1,4 +1,4 @@
 #pragma once
 
 void ResetSpurCharge(void);
-void ShootBullet();
+void ShootBullet(void);