ref: 4c758bb9261d783a439b650f8d84a08df349e7c8
parent: a305151302c38ca50aaf208ad72cca8e4c8c3c12
author: Clownacy <Clownacy@users.noreply.github.com>
date: Wed Aug 5 18:03:51 EDT 2020
Apply more direction macros
--- a/src/Bullet.cpp
+++ b/src/Bullet.cpp
@@ -79,19 +79,19 @@
{
switch (gBul[i].direct)
{
- case 0:
+ case DIR_LEFT:
x = gBul[i].x - gBul[i].view.front;
y = gBul[i].y - gBul[i].view.top;
break;
- case 1:
+ case DIR_UP:
x = gBul[i].x - gBul[i].view.top;
y = gBul[i].y - gBul[i].view.front;
break;
- case 2:
+ case DIR_RIGHT:
x = gBul[i].x - gBul[i].view.back;
y = gBul[i].y - gBul[i].view.top;
break;
- case 3:
+ case DIR_DOWN:
x = gBul[i].x - gBul[i].view.top;
y = gBul[i].y - gBul[i].view.back;
break;
@@ -216,16 +216,16 @@
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm = -0x600;
break;
- case 1:
+ case DIR_UP:
bul->ym = -0x600;
break;
- case 2:
+ case DIR_RIGHT:
bul->xm = 0x600;
break;
- case 3:
+ case DIR_DOWN:
bul->ym = 0x600;
break;
}
@@ -259,7 +259,7 @@
{136, 80, 152, 80},
};
- if (bul->direct == 0)
+ if (bul->direct == DIR_LEFT)
bul->rect = rcLeft[bul->ani_no];
else
bul->rect = rcRight[bul->ani_no];
@@ -283,16 +283,16 @@
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm = -0x200;
break;
- case 1:
+ case DIR_UP:
bul->ym = -0x200;
break;
- case 2:
+ case DIR_RIGHT:
bul->xm = 0x200;
break;
- case 3:
+ case DIR_DOWN:
bul->ym = 0x200;
break;
}
@@ -301,8 +301,8 @@
switch (bul->direct)
{
- case 0:
- case 2:
+ case DIR_LEFT:
+ case DIR_RIGHT:
if (inc % 2)
bul->ym = 0x400;
else
@@ -310,8 +310,8 @@
break;
- case 1:
- case 3:
+ case DIR_UP:
+ case DIR_DOWN:
if (inc % 2)
bul->xm = 0x400;
else
@@ -324,16 +324,16 @@
{
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm -= 0x80;
break;
- case 1:
+ case DIR_UP:
bul->ym -= 0x80;
break;
- case 2:
+ case DIR_RIGHT:
bul->xm += 0x80;
break;
- case 3:
+ case DIR_DOWN:
bul->ym += 0x80;
break;
}
@@ -340,8 +340,8 @@
switch (bul->direct)
{
- case 0:
- case 2:
+ case DIR_LEFT:
+ case DIR_RIGHT:
if (bul->count1 % 5 == 2)
{
if (bul->ym < 0)
@@ -352,8 +352,8 @@
break;
- case 1u:
- case 3u:
+ case DIR_UP:
+ case DIR_DOWN:
if (bul->count1 % 5 == 2)
{
if (bul->xm < 0)
@@ -408,16 +408,16 @@
// Set speed
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm = -0x1000;
break;
- case 1:
+ case DIR_UP:
bul->ym = -0x1000;
break;
- case 2:
+ case DIR_RIGHT:
bul->xm = 0x1000;
break;
- case 3:
+ case DIR_DOWN:
bul->ym = 0x1000;
break;
}
@@ -428,16 +428,16 @@
case 1:
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->enemyYL = 0x400;
break;
- case 1:
+ case DIR_UP:
bul->enemyXL = 0x400;
break;
- case 2:
+ case DIR_RIGHT:
bul->enemyYL = 0x400;
break;
- case 3:
+ case DIR_DOWN:
bul->enemyXL = 0x400;
break;
}
@@ -445,16 +445,16 @@
case 2:
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->enemyYL = 0x800;
break;
- case 1:
+ case DIR_UP:
bul->enemyXL = 0x800;
break;
- case 2:
+ case DIR_RIGHT:
bul->enemyYL = 0x800;
break;
- case 3:
+ case DIR_DOWN:
bul->enemyXL = 0x800;
break;
}
@@ -487,7 +487,7 @@
switch (level)
{
case 1:
- if (bul->direct == 1 || bul->direct == 3)
+ if (bul->direct == DIR_UP || bul->direct == DIR_DOWN)
bul->rect = rect1[1];
else
bul->rect = rect1[0];
@@ -495,7 +495,7 @@
break;
case 2:
- if (bul->direct == 1 || bul->direct == 3)
+ if (bul->direct == DIR_UP || bul->direct == DIR_DOWN)
bul->rect = rect2[1];
else
bul->rect = rect2[0];
@@ -503,7 +503,7 @@
break;
case 3:
- if (bul->direct == 1 || bul->direct == 3)
+ if (bul->direct == DIR_UP || bul->direct == DIR_DOWN)
bul->rect = rect3[1];
else
bul->rect = rect3[0];
@@ -529,10 +529,10 @@
if (bul->flag & 1 && bul->flag & 4)
bBreak = TRUE;
- if (bul->direct == 0 && bul->flag & 1)
- bul->direct = 2;
- if (bul->direct == 2 && bul->flag & 4)
- bul->direct = 0;
+ if (bul->direct == DIR_LEFT && bul->flag & 1)
+ bul->direct = DIR_RIGHT;
+ if (bul->direct == DIR_RIGHT && bul->flag & 4)
+ bul->direct = DIR_LEFT;
if (bBreak)
{
@@ -548,19 +548,19 @@
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm = -0x400;
break;
- case 1:
+ case DIR_UP:
bul->xm = gMC.xm;
if (gMC.xm < 0)
- bul->direct = 0;
+ bul->direct = DIR_LEFT;
else
- bul->direct = 2;
+ bul->direct = DIR_RIGHT;
- if (gMC.direct == 0)
+ if (gMC.direct == DIR_LEFT)
bul->xm -= 0x80;
else
bul->xm += 0x80;
@@ -568,17 +568,17 @@
bul->ym = -0x5FF;
break;
- case 2:
+ case DIR_RIGHT:
bul->xm = 0x400;
break;
- case 3:
+ case DIR_DOWN:
bul->xm = gMC.xm;
if (gMC.xm < 0)
- bul->direct = 0;
+ bul->direct = DIR_LEFT;
else
- bul->direct = 2;
+ bul->direct = DIR_RIGHT;
bul->ym = 0x5FF;
@@ -638,7 +638,7 @@
if (bul->ani_no > 3)
bul->ani_no = 0;
- if (bul->direct == 0)
+ if (bul->direct == DIR_LEFT)
bul->rect = rect_left1[bul->ani_no];
else
bul->rect = rect_right1[bul->ani_no];
@@ -648,7 +648,7 @@
if (bul->ani_no > 2)
bul->ani_no = 0;
- if (bul->direct == 0)
+ if (bul->direct == DIR_LEFT)
bul->rect = rect_left2[bul->ani_no];
else
bul->rect = rect_right2[bul->ani_no];
@@ -711,19 +711,19 @@
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm = -move;
bul->ym = Random(-0xAA, 0xAA);
break;
- case 1:
+ case DIR_UP:
bul->ym = -move;
bul->xm = Random(-0xAA, 0xAA);
break;
- case 2:
+ case DIR_RIGHT:
bul->xm = move;
bul->ym = Random(-0xAA, 0xAA);
break;
- case 3:
+ case DIR_DOWN:
bul->ym = move;
bul->xm = Random(-0xAA, 0xAA);
break;
@@ -743,10 +743,10 @@
case 2:
bul->rect = rect2[bul->direct];
- if (bul->direct == 1 || bul->direct == 3)
- SetNpChar(127, bul->x, bul->y, 0, 0, 1, NULL, 0x100);
+ if (bul->direct == DIR_UP || bul->direct == DIR_DOWN)
+ SetNpChar(127, bul->x, bul->y, 0, 0, DIR_UP, NULL, 0x100);
else
- SetNpChar(127, bul->x, bul->y, 0, 0, 0, NULL, 0x100);
+ SetNpChar(127, bul->x, bul->y, 0, 0, DIR_LEFT, NULL, 0x100);
break;
@@ -775,21 +775,21 @@
if (bul->life != 10)
bHit = TRUE;
- if (bul->direct == 0 && bul->flag & 1)
+ if (bul->direct == DIR_LEFT && bul->flag & 1)
bHit = TRUE;
- if (bul->direct == 2 && bul->flag & 4)
+ if (bul->direct == DIR_RIGHT && bul->flag & 4)
bHit = TRUE;
- if (bul->direct == 1 && bul->flag & 2)
+ if (bul->direct == DIR_UP && bul->flag & 2)
bHit = TRUE;
- if (bul->direct == 3 && bul->flag & 8)
+ if (bul->direct == DIR_DOWN && bul->flag & 8)
bHit = TRUE;
- if (bul->direct == 0 && bul->flag & 0x80)
+ if (bul->direct == DIR_LEFT && bul->flag & 0x80)
bHit = TRUE;
- if (bul->direct == 0 && bul->flag & 0x20)
+ if (bul->direct == DIR_LEFT && bul->flag & 0x20)
bHit = TRUE;
- if (bul->direct == 2 && bul->flag & 0x40)
+ if (bul->direct == DIR_RIGHT && bul->flag & 0x40)
bHit = TRUE;
- if (bul->direct == 2 && bul->flag & 0x10)
+ if (bul->direct == DIR_RIGHT && bul->flag & 0x10)
bHit = TRUE;
if (bHit)
@@ -805,12 +805,12 @@
switch (bul->direct)
{
- case 0:
- case 2:
+ case DIR_LEFT:
+ case DIR_RIGHT:
bul->tgt_y = bul->y;
break;
- case 1:
- case 3:
+ case DIR_UP:
+ case DIR_DOWN:
bul->tgt_x = bul->x;
break;
}
@@ -819,8 +819,8 @@
{
switch (bul->direct)
{
- case 0:
- case 2:
+ case DIR_LEFT:
+ case DIR_RIGHT:
if (bul->y > gMC.y)
bul->ym = 0x100;
else
@@ -829,8 +829,8 @@
bul->xm = Random(-0x200, 0x200);
break;
- case 1:
- case 3:
+ case DIR_UP:
+ case DIR_DOWN:
if (bul->x > gMC.x)
bul->xm = 0x100;
else
@@ -861,16 +861,16 @@
case 1:
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm += -bul->ani_no;
break;
- case 1:
+ case DIR_UP:
bul->ym += -bul->ani_no;
break;
- case 2:
+ case DIR_RIGHT:
bul->xm += bul->ani_no;
break;
- case 3:
+ case DIR_DOWN:
bul->ym += bul->ani_no;
break;
}
@@ -879,8 +879,8 @@
{
switch (bul->direct)
{
- case 0:
- case 2:
+ case DIR_LEFT:
+ case DIR_RIGHT:
if (bul->y < bul->tgt_y)
bul->ym += 0x20;
else
@@ -888,8 +888,8 @@
break;
- case 1:
- case 3:
+ case DIR_UP:
+ case DIR_DOWN:
if (bul->x < bul->tgt_x)
bul->xm += 0x20;
else
@@ -1034,16 +1034,16 @@
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm = -0x600;
break;
- case 2:
+ case DIR_RIGHT:
bul->xm = 0x600;
break;
- case 1:
+ case DIR_UP:
bul->ym = -0x600;
break;
- case 3:
+ case DIR_DOWN:
bul->ym = 0x600;
break;
}
@@ -1053,16 +1053,16 @@
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm += 0x2A;
break;
- case 2:
+ case DIR_RIGHT:
bul->xm -= 0x2A;
break;
- case 1:
+ case DIR_UP:
bul->ym += 0x2A;
break;
- case 3:
+ case DIR_DOWN:
bul->ym -= 0x2A;
break;
}
@@ -1099,13 +1099,13 @@
{
BOOL bDelete = FALSE;
- if (bul->direct == 0 && bul->flag & 1)
+ if (bul->direct == DIR_LEFT && bul->flag & 1)
bDelete = TRUE;
- if (bul->direct == 2 && bul->flag & 4)
+ if (bul->direct == DIR_RIGHT && bul->flag & 4)
bDelete = TRUE;
- if (bul->direct == 1 && bul->flag & 2)
+ if (bul->direct == DIR_UP && bul->flag & 2)
bDelete = TRUE;
- if (bul->direct == 3 && bul->flag & 8)
+ if (bul->direct == DIR_DOWN && bul->flag & 8)
bDelete = TRUE;
if (bDelete)
@@ -1122,19 +1122,19 @@
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm = -0x600;
bul->ym = Random(-0x100, 0x100);
break;
- case 2:
+ case DIR_RIGHT:
bul->xm = 0x600;
bul->ym = Random(-0x100, 0x100);
break;
- case 1:
+ case DIR_UP:
bul->ym = -0x600;
bul->xm = Random(-0x100, 0x100);
break;
- case 3:
+ case DIR_DOWN:
bul->ym = 0x600;
bul->xm = Random(-0x100, 0x100);
break;
@@ -1145,16 +1145,16 @@
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm += 0x10;
break;
- case 2:
+ case DIR_RIGHT:
bul->xm -= 0x10;
break;
- case 1:
+ case DIR_UP:
bul->ym += 0x10;
break;
- case 3:
+ case DIR_DOWN:
bul->ym -= 0x10;
break;
}
@@ -1196,9 +1196,9 @@
PlaySoundObject(100, SOUND_MODE_PLAY);
if (gMC.up)
- SetBullet(22, bul->x, bul->y, 1);
+ SetBullet(22, bul->x, bul->y, DIR_UP);
else if (gMC.down)
- SetBullet(22, bul->x, bul->y, 3);
+ SetBullet(22, bul->x, bul->y, DIR_DOWN);
else
SetBullet(22, bul->x, bul->y, gMC.direct);
@@ -1212,19 +1212,19 @@
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm = Random(-0x400, -0x200);
bul->ym = (Random(-4, 4) * 0x200) / 2;
break;
- case 2:
+ case DIR_RIGHT:
bul->xm = Random(0x200, 0x400);
bul->ym = (Random(-4, 4) * 0x200) / 2;
break;
- case 1:
+ case DIR_UP:
bul->ym = Random(-0x400, -0x200);
bul->xm = (Random(-4, 4) * 0x200) / 2;
break;
- case 3:
+ case DIR_DOWN:
bul->ym = Random(0x80, 0x100);
bul->xm = (Random(-4, 4) * 0x200) / 2;
break;
@@ -1290,16 +1290,16 @@
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm = (-Random(10, 16) * 0x200) / 2;
break;
- case 1:
+ case DIR_UP:
bul->ym = (-Random(10, 16) * 0x200) / 2;
break;
- case 2:
+ case DIR_RIGHT:
bul->xm = (Random(10, 16) * 0x200) / 2;
break;
- case 3:
+ case DIR_DOWN:
bul->ym = (Random(10, 16) * 0x200) / 2;
break;
}
@@ -1336,16 +1336,16 @@
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->rect = rcLeft[bul->ani_no];
break;
- case 1:
+ case DIR_UP:
bul->rect = rcDown[bul->ani_no];
break;
- case 2:
+ case DIR_RIGHT:
bul->rect = rcRight[bul->ani_no];
break;
- case 3:
+ case DIR_DOWN:
bul->rect = rcDown[bul->ani_no];
break;
}
@@ -1372,16 +1372,16 @@
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm = -0x800;
break;
- case 1:
+ case DIR_UP:
bul->ym = -0x800;
break;
- case 2:
+ case DIR_RIGHT:
bul->xm = 0x800;
break;
- case 3:
+ case DIR_DOWN:
bul->ym = 0x800;
break;
}
@@ -1415,7 +1415,7 @@
if (bul->ani_no > 3)
bul->ani_no = 0;
- if (bul->direct == 0)
+ if (bul->direct == DIR_LEFT)
bul->rect = rcLeft[bul->ani_no];
else
bul->rect = rcRight[bul->ani_no];
@@ -1442,16 +1442,16 @@
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm = -0x800;
break;
- case 1:
+ case DIR_UP:
bul->ym = -0x800;
break;
- case 2:
+ case DIR_RIGHT:
bul->xm = 0x800;
break;
- case 3:
+ case DIR_DOWN:
bul->ym = 0x800;
break;
}
@@ -1485,7 +1485,7 @@
if (bul->ani_no > 3)
bul->ani_no = 0;
- if (bul->direct == 0)
+ if (bul->direct == DIR_LEFT)
bul->rect = rcLeft[bul->ani_no];
else
bul->rect = rcRight[bul->ani_no];
@@ -1523,16 +1523,16 @@
case 1:
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm = -0x800;
break;
- case 1:
+ case DIR_UP:
bul->ym = -0x800;
break;
- case 2:
+ case DIR_RIGHT:
bul->xm = 0x800;
break;
- case 3:
+ case DIR_DOWN:
bul->ym = 0x800;
break;
}
@@ -1591,16 +1591,16 @@
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->rect = rcLeft[bul->ani_no];
break;
- case 1:
+ case DIR_UP:
bul->rect = rcUp[bul->ani_no];
break;
- case 2:
+ case DIR_RIGHT:
bul->rect = rcRight[bul->ani_no];
break;
- case 3:
+ case DIR_DOWN:
bul->rect = rcDown[bul->ani_no];
break;
}
@@ -1617,7 +1617,7 @@
bul->act_no = 1;
bul->y -= 12 * 0x200;
- if (bul->direct == 0)
+ if (bul->direct == DIR_LEFT)
bul->x += 16 * 0x200;
else
bul->x -= 16 * 0x200;
@@ -1629,7 +1629,7 @@
++bul->ani_no;
}
- if (bul->direct == 0)
+ if (bul->direct == DIR_LEFT)
bul->x -= 2 * 0x200;
else
bul->x += 2 * 0x200;
@@ -1668,7 +1668,7 @@
{96, 88, 120, 112},
};
- if (bul->direct == 0)
+ if (bul->direct == DIR_LEFT)
bul->rect = rcLeft[bul->ani_no];
else
bul->rect = rcRight[bul->ani_no];
@@ -1701,21 +1701,21 @@
if (bul->life != 10)
bHit = TRUE;
- if (bul->direct == 0 && bul->flag & 1)
+ if (bul->direct == DIR_LEFT && bul->flag & 1)
bHit = TRUE;
- if (bul->direct == 2 && bul->flag & 4)
+ if (bul->direct == DIR_RIGHT && bul->flag & 4)
bHit = TRUE;
- if (bul->direct == 1 && bul->flag & 2)
+ if (bul->direct == DIR_UP && bul->flag & 2)
bHit = TRUE;
- if (bul->direct == 3 && bul->flag & 8)
+ if (bul->direct == DIR_DOWN && bul->flag & 8)
bHit = TRUE;
- if (bul->direct == 0 && bul->flag & 0x80)
+ if (bul->direct == DIR_LEFT && bul->flag & 0x80)
bHit = TRUE;
- if (bul->direct == 0 && bul->flag & 0x20)
+ if (bul->direct == DIR_LEFT && bul->flag & 0x20)
bHit = TRUE;
- if (bul->direct == 2 && bul->flag & 0x40)
+ if (bul->direct == DIR_RIGHT && bul->flag & 0x40)
bHit = TRUE;
- if (bul->direct == 2 && bul->flag & 0x10)
+ if (bul->direct == DIR_RIGHT && bul->flag & 0x10)
bHit = TRUE;
if (bHit)
@@ -1731,15 +1731,15 @@
switch (bul->direct)
{
- case 0:
- case 2:
+ case DIR_LEFT:
+ case DIR_RIGHT:
bul->tgt_y = bul->y;
bul->enemyXL = 0x1000;
bul->blockXL = 0x1000;
break;
- case 1:
- case 3:
+ case DIR_UP:
+ case DIR_DOWN:
bul->tgt_x = bul->x;
bul->enemyYL = 0x1000;
bul->blockYL = 0x1000;
@@ -1750,8 +1750,8 @@
{
switch (bul->direct)
{
- case 0:
- case 2:
+ case DIR_LEFT:
+ case DIR_RIGHT:
if (bul->y > gMC.y)
bul->ym = 0x100;
else
@@ -1760,8 +1760,8 @@
bul->xm = Random(-0x200, 0x200);
break;
- case 1:
- case 3:
+ case DIR_UP:
+ case DIR_DOWN:
if (bul->x > gMC.x)
bul->xm = 0x100;
else
@@ -1792,16 +1792,16 @@
case 1:
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm += -bul->ani_no;
break;
- case 1:
+ case DIR_UP:
bul->ym += -bul->ani_no;
break;
- case 2:
+ case DIR_RIGHT:
bul->xm += bul->ani_no;
break;
- case 3:
+ case DIR_DOWN:
bul->ym += bul->ani_no;
break;
}
@@ -1810,8 +1810,8 @@
{
switch (bul->direct)
{
- case 0:
- case 2:
+ case DIR_LEFT:
+ case DIR_RIGHT:
if (bul->y < bul->tgt_y)
bul->ym += 0x40;
else
@@ -1818,8 +1818,8 @@
bul->ym -= 0x40;
break;
- case 1:
- case 3:
+ case DIR_UP:
+ case DIR_DOWN:
if (bul->x < bul->tgt_x)
bul->xm += 0x40;
else
@@ -1956,16 +1956,16 @@
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm = -0x1000;
break;
- case 1:
+ case DIR_UP:
bul->ym = -0x1000;
break;
- case 2:
+ case DIR_RIGHT:
bul->xm = 0x1000;
break;
- case 3:
+ case DIR_DOWN:
bul->ym = 0x1000;
break;
}
@@ -1984,16 +1984,16 @@
{
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
SetNpChar(4, bul->x, bul->y, -0x200, Random(-0x200, 0x200), 2, NULL, 0x100);
break;
- case 1:
+ case DIR_UP:
SetNpChar(4, bul->x, bul->y, Random(-0x200, 0x200), -0x200, 2, NULL, 0x100);
break;
- case 2:
+ case DIR_RIGHT:
SetNpChar(4, bul->x, bul->y, 0x200, Random(-0x200, 0x200), 2, NULL, 0x100);
break;
- case 3:
+ case DIR_DOWN:
SetNpChar(4, bul->x, bul->y, Random(-0x200, 0x200), 0x200, 2, NULL, 0x100);
break;
}
@@ -2028,16 +2028,16 @@
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->rect = rcL[bul->ani_no];
break;
- case 1:
+ case DIR_UP:
bul->rect = rcU[bul->ani_no];
break;
- case 2:
+ case DIR_RIGHT:
bul->rect = rcR[bul->ani_no];
break;
- case 3:
+ case DIR_DOWN:
bul->rect = rcD[bul->ani_no];
break;
}
@@ -2066,16 +2066,16 @@
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->xm = -0x1000;
break;
- case 1:
+ case DIR_UP:
bul->ym = -0x1000;
break;
- case 2:
+ case DIR_RIGHT:
bul->xm = 0x1000;
break;
- case 3:
+ case DIR_DOWN:
bul->ym = 0x1000;
break;
}
@@ -2085,16 +2085,16 @@
case 1:
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->enemyYL = 0x400;
break;
- case 1:
+ case DIR_UP:
bul->enemyXL = 0x400;
break;
- case 2:
+ case DIR_RIGHT:
bul->enemyYL = 0x400;
break;
- case 3:
+ case DIR_DOWN:
bul->enemyXL = 0x400;
break;
}
@@ -2104,16 +2104,16 @@
case 2:
switch (bul->direct)
{
- case 0:
+ case DIR_LEFT:
bul->enemyYL = 0x800;
break;
- case 1:
+ case DIR_UP:
bul->enemyXL = 0x800;
break;
- case 2:
+ case DIR_RIGHT:
bul->enemyYL = 0x800;
break;
- case 3:
+ case DIR_DOWN:
bul->enemyXL = 0x800;
break;
}
@@ -2147,7 +2147,7 @@
switch (level)
{
case 1:
- if (bul->direct == 1 || bul->direct == 3)
+ if (bul->direct == DIR_UP || bul->direct == DIR_DOWN)
bul->rect = rect1[1];
else
bul->rect = rect1[0];
@@ -2155,7 +2155,7 @@
break;
case 2:
- if (bul->direct == 1 || bul->direct == 3)
+ if (bul->direct == DIR_UP || bul->direct == DIR_DOWN)
bul->rect = rect2[1];
else
bul->rect = rect2[0];
@@ -2163,7 +2163,7 @@
break;
case 3:
- if (bul->direct == 1 || bul->direct == 3)
+ if (bul->direct == DIR_UP || bul->direct == DIR_DOWN)
bul->rect = rect3[1];
else
bul->rect = rect3[0];
@@ -2229,7 +2229,7 @@
switch (level)
{
case 1:
- if (bul->direct == 0 || bul->direct == 2)
+ if (bul->direct == DIR_LEFT || bul->direct == DIR_RIGHT)
bul->rect = rc_h_lv1[bul->ani_no];
else
bul->rect = rc_v_lv1[bul->ani_no];
@@ -2237,7 +2237,7 @@
break;
case 2:
- if (bul->direct == 0 || bul->direct == 2)
+ if (bul->direct == DIR_LEFT || bul->direct == DIR_RIGHT)
bul->rect = rc_h_lv2[bul->ani_no];
else
bul->rect = rc_v_lv2[bul->ani_no];
@@ -2245,7 +2245,7 @@
break;
case 3:
- if (bul->direct == 0 || bul->direct == 2)
+ if (bul->direct == DIR_LEFT || bul->direct == DIR_RIGHT)
bul->rect = rc_h_lv3[bul->ani_no];
else
bul->rect = rc_v_lv3[bul->ani_no];