Merge branch 'master' into addSomeMoreStuffToGitIgnore

This commit is contained in:
Gabriel Ravier 2019-05-07 20:20:45 +02:00
commit d3ae0df01a
2 changed files with 20 additions and 18 deletions

View file

@ -28,7 +28,7 @@ int JudgeHitBulletBlock(int x, int y, BULLET *bul)
if (bul->x - bul->blockXL < (0x10 * x + 8) * 0x200 if (bul->x - bul->blockXL < (0x10 * x + 8) * 0x200
&& bul->x + bul->blockXL > (0x10 * x - 8) * 0x200 && bul->x + bul->blockXL > (0x10 * x - 8) * 0x200
&& bul->y - bul->blockYL < (0x10 * y + 8) * 0x200 && bul->y - bul->blockYL < (0x10 * y + 8) * 0x200
&& bul->y + bul->blockYL> (0x10 * y - 8) * 0x200) && bul->y + bul->blockYL > (0x10 * y - 8) * 0x200)
hit |= 0x200; hit |= 0x200;
if (hit && (bul->bbits & 0x60) && GetAttribute(x, y) == 0x43) if (hit && (bul->bbits & 0x60) && GetAttribute(x, y) == 0x43)
@ -81,7 +81,7 @@ int JudgeHitBulletBlock2(int x, int y, uint8_t *atrb, BULLET *bul)
workX = (0x10 * x + 8) * 0x200; workX = (0x10 * x + 8) * 0x200;
workY = (0x10 * y + 8) * 0x200; workY = (0x10 * y + 8) * 0x200;
//Left wall // Left wall
if (block[0] && block[2]) if (block[0] && block[2])
{ {
if (bul->x - bul->blockXL < workX) if (bul->x - bul->blockXL < workX)
@ -98,7 +98,7 @@ int JudgeHitBulletBlock2(int x, int y, uint8_t *atrb, BULLET *bul)
hit |= 1; hit |= 1;
} }
//Right wall // Right wall
if (block[1] && block[3]) if (block[1] && block[3])
{ {
if (bul->x + bul->blockXL > workX) if (bul->x + bul->blockXL > workX)
@ -115,7 +115,7 @@ int JudgeHitBulletBlock2(int x, int y, uint8_t *atrb, BULLET *bul)
hit |= 4; hit |= 4;
} }
//Ceiling // Ceiling
if (block[0] && block[1]) if (block[0] && block[1])
{ {
if (bul->y - bul->blockYL < workY) if (bul->y - bul->blockYL < workY)
@ -132,7 +132,7 @@ int JudgeHitBulletBlock2(int x, int y, uint8_t *atrb, BULLET *bul)
hit |= 2; hit |= 2;
} }
//Ground // Ground
if (block[2] && block[3]) if (block[2] && block[3])
{ {
if (bul->y + bul->blockYL > workY) if (bul->y + bul->blockYL > workY)
@ -149,7 +149,7 @@ int JudgeHitBulletBlock2(int x, int y, uint8_t *atrb, BULLET *bul)
hit |= 8; hit |= 8;
} }
//Clip // Clip
if (bul->bbits & 8) if (bul->bbits & 8)
{ {
if (hit & 1) if (hit & 1)
@ -324,7 +324,7 @@ void HitBulletMap()
x = gBul[i].x / 0x10 / 0x200; x = gBul[i].x / 0x10 / 0x200;
y = gBul[i].y / 0x10 / 0x200; y = gBul[i].y / 0x10 / 0x200;
//Get surrounding tiles // Get surrounding tiles
offx[0] = 0; offx[0] = 0;
offx[1] = 1; offx[1] = 1;
offx[2] = 0; offx[2] = 0;
@ -339,12 +339,13 @@ void HitBulletMap()
atrb[2] = GetAttribute(x, y + 1); atrb[2] = GetAttribute(x, y + 1);
atrb[3] = GetAttribute(x + 1, y + 1); atrb[3] = GetAttribute(x + 1, y + 1);
//Clear hit tiles // Clear hit tiles
gBul[i].flag = 0; gBul[i].flag = 0;
if (gBul[i].bbits & 4) if (gBul[i].bbits & 4)
{ {
// For some reason a 'continue' just doesn't produce the same assembly // Using "continue" here doesn't produce accurate assembly
// TODO Figure out what Pixel actually did (it's unlikely he left the brackets empty)
} }
else else
{ {
@ -401,3 +402,4 @@ void HitBulletMap()
} }
} }
} }

View file

@ -346,13 +346,13 @@ void ActBullet_Frontia2(BULLET *bul, int level)
bul->y += bul->ym; bul->y += bul->ym;
} }
if ( ++bul->ani_wait > 0 ) if (++bul->ani_wait > 0)
{ {
bul->ani_wait = 0; bul->ani_wait = 0;
++bul->ani_no; ++bul->ani_no;
} }
if ( bul->ani_no > 2 ) if (bul->ani_no > 2)
bul->ani_no = 0; bul->ani_no = 0;
RECT rect[3] = { RECT rect[3] = {
@ -387,7 +387,7 @@ void ActBullet_PoleStar(BULLET *bul, int level)
{ {
bul->act_no = 1; bul->act_no = 1;
//Set speed // Set speed
switch (bul->direct) switch (bul->direct)
{ {
case 0: case 0:
@ -404,7 +404,7 @@ void ActBullet_PoleStar(BULLET *bul, int level)
break; break;
} }
//Set hitbox // Set hitbox
switch (level) switch (level)
{ {
case 1: case 1:
@ -445,7 +445,7 @@ void ActBullet_PoleStar(BULLET *bul, int level)
} }
else else
{ {
//Move // Move
bul->x += bul->xm; bul->x += bul->xm;
bul->y += bul->ym; bul->y += bul->ym;
} }
@ -1800,7 +1800,7 @@ void ActBullet_SuperMissile(BULLET *bul, int level)
if (bul->xm < -0x1400) if (bul->xm < -0x1400)
bul->xm = -0x1400; bul->xm = -0x1400;
if (bul->xm > 0x1400 ) if (bul->xm > 0x1400)
bul->xm = 0x1400; bul->xm = 0x1400;
if (bul->ym < -0x1400) if (bul->ym < -0x1400)
@ -2147,11 +2147,11 @@ void ActBullet_Spur(BULLET *bul, int level)
void ActBullet_SpurTail(BULLET *bul, int level) void ActBullet_SpurTail(BULLET *bul, int level)
{ {
if ( ++bul->count1 > 20 ) if (++bul->count1 > 20)
bul->ani_no = bul->count1 - 20; bul->ani_no = bul->count1 - 20;
if ( bul->ani_no > 2 ) if (bul->ani_no > 2)
bul->cond = 0; bul->cond = 0;
if ( bul->damage && bul->life != 100 ) if (bul->damage && bul->life != 100)
bul->damage = 0; bul->damage = 0;
RECT rc_h_lv1[3] = { RECT rc_h_lv1[3] = {