Merge branch 'accurate' into portable

This commit is contained in:
Clownacy 2020-07-08 19:42:28 +01:00
commit adb09e19b7
48 changed files with 533 additions and 553 deletions

View file

@ -281,7 +281,7 @@ void MoveCampCursor(void)
if (gCampActive == FALSE)
{
// Switch to a weapon
PlaySoundObject(SND_SWITCH_WEAPON, 1);
PlaySoundObject(SND_SWITCH_WEAPON, SOUND_MODE_PLAY);
if (arms_num != 0)
StartTextScript(1000 + gArmsData[gSelectedArms].code);
@ -291,7 +291,7 @@ void MoveCampCursor(void)
else
{
// Switch to an item
PlaySoundObject(SND_YES_NO_CHANGE_CHOICE, 1);
PlaySoundObject(SND_YES_NO_CHANGE_CHOICE, SOUND_MODE_PLAY);
if (item_num != 0)
StartTextScript(5000 + gItemData[gSelectedItem].code);
@ -592,7 +592,7 @@ int RotationArms(void)
gSelectedArms = 0;
gArmsEnergyX = 32;
PlaySoundObject(SND_SWITCH_WEAPON, 1);
PlaySoundObject(SND_SWITCH_WEAPON, SOUND_MODE_PLAY);
return gArmsData[gSelectedArms].code;
}
@ -624,7 +624,7 @@ int RotationArmsRev(void)
}
gArmsEnergyX = 0;
PlaySoundObject(SND_SWITCH_WEAPON, 1);
PlaySoundObject(SND_SWITCH_WEAPON, SOUND_MODE_PLAY);
return gArmsData[gSelectedArms].code;
}
@ -633,5 +633,5 @@ void ChangeToFirstArms(void)
{
gSelectedArms = 0;
gArmsEnergyX = 32;
PlaySoundObject(SND_SWITCH_WEAPON, 1);
PlaySoundObject(SND_SWITCH_WEAPON, SOUND_MODE_PLAY);
}

View file

@ -136,7 +136,7 @@ void HitBossBullet(void)
}
else
{
PlaySoundObject(gBoss[bos_].destroy_voice, 1);
PlaySoundObject(gBoss[bos_].destroy_voice, SOUND_MODE_PLAY);
switch (gBoss[bos_].size)
{
@ -161,7 +161,7 @@ void HitBossBullet(void)
SetCaret(gBul[bul].x, gBul[bul].y, 11, 0);
SetCaret(gBul[bul].x, gBul[bul].y, 11, 0);
SetCaret(gBul[bul].x, gBul[bul].y, 11, 0);
PlaySoundObject(gBoss[bos_].hit_voice, 1);
PlaySoundObject(gBoss[bos_].hit_voice, SOUND_MODE_PLAY);
}
gBoss[bos].shock = 8;
@ -188,7 +188,7 @@ void HitBossBullet(void)
if (!(gBul[bul].bbits & 0x10))
{
SetCaret(gBul[bul].x, gBul[bul].y, 2, 2);
PlaySoundObject(31, 1);
PlaySoundObject(31, SOUND_MODE_PLAY);
gBul[bul].cond = 0;
continue;
}

View file

@ -196,7 +196,7 @@ void ActBossChar_Core_Mini(NPCHAR *npc)
ym = GetSin(deg) * 2;
xm = GetCos(deg) * 2;
SetNpChar(178, npc->x, npc->y, xm, ym, 0, NULL, 0x100);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
}
break;
@ -360,7 +360,7 @@ void ActBossChar_Core(void)
if (npc->act_wait > 400)
{
++npc->count1;
PlaySoundObject(115, 1);
PlaySoundObject(115, SOUND_MODE_PLAY);
if (npc->count1 > 3)
{
@ -471,7 +471,7 @@ void ActBossChar_Core(void)
ym = GetSin(deg) * 3;
xm = GetCos(deg) * 3;
SetNpChar(218, npc->x - (40 * 0x200), npc->y, xm, ym, 0, NULL, 0x100);
PlaySoundObject(101, 1);
PlaySoundObject(101, SOUND_MODE_PLAY);
}
if (npc->act_wait > 400)
@ -561,7 +561,7 @@ void ActBossChar_Core(void)
gBoss[6].act_no = 100;
gBoss[7].act_no = 100;
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
for (i = 0; i < 8; ++i)
SetNpChar(4, gBoss[4].x + (Random(-32, 16) * 0x200), gBoss[4].y, Random(-0x200, 0x200), Random(-0x100, 0x100), 0, NULL, 0x100);

View file

@ -147,16 +147,16 @@ static void ActBossCharA_Face(NPCHAR *npc)
npc->act_wait = 0;
if (npc->act_wait > 250 && npc->act_wait % 0x10 == 1)
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
if (npc->act_wait > 250 && npc->act_wait % 0x10 == 7)
{
SetNpChar(293, npc->x, npc->y, 0, 0, 0, NULL, 0x80);
PlaySoundObject(101, 1);
PlaySoundObject(101, SOUND_MODE_PLAY);
}
if (npc->act_wait == 200)
PlaySoundObject(116, 1);
PlaySoundObject(116, SOUND_MODE_PLAY);
if (npc->act_wait > 200 && npc->act_wait % 2 != 0)
npc->ani_no = 4;
@ -414,7 +414,7 @@ void ActBossChar_Undead(void)
if (npc->act_wait > 200)
{
++npc->count1;
PlaySoundObject(115, 1);
PlaySoundObject(115, SOUND_MODE_PLAY);
if (npc->life < 200)
{
@ -519,7 +519,7 @@ void ActBossChar_Undead(void)
break;
}
PlaySoundObject(25, 1);
PlaySoundObject(25, SOUND_MODE_PLAY);
SetNpChar(285, x - (16 * 0x200), y, 0, 0, 0, NULL, 0x100);
SetNpChar(285, x - (16 * 0x200), y, 0, 0, 0x400, NULL, 0x100);
}
@ -553,7 +553,7 @@ void ActBossChar_Undead(void)
gBoss[10].bits |= NPC_INVULNERABLE;
gBoss[11].bits |= NPC_SHOOTABLE;
PlaySoundObject(25, 1);
PlaySoundObject(25, SOUND_MODE_PLAY);
SetNpChar(285, gBoss[3].x - (16 * 0x200), gBoss[3].y, 0, 0, 0, NULL, 0x100);
SetNpChar(285, gBoss[3].x - (16 * 0x200), gBoss[3].y, 0, 0, 0x400, NULL, 0x100);
@ -641,7 +641,7 @@ void ActBossChar_Undead(void)
++gBoss[0].act_wait;
if (gBoss[0].act_wait % 8 == 0)
PlaySoundObject(44, 1);
PlaySoundObject(44, SOUND_MODE_PLAY);
SetDestroyNpChar(gBoss[0].x + (Random(-72, 72) * 0x200), gBoss[0].y + (Random(-64, 64) * 0x200), 1, 1);
@ -650,7 +650,7 @@ void ActBossChar_Undead(void)
gBoss[0].act_wait = 0;
gBoss[0].act_no = 1001;
SetFlash(gBoss[0].x, gBoss[0].y, 1);
PlaySoundObject(35, 1);
PlaySoundObject(35, SOUND_MODE_PLAY);
}
break;
@ -685,7 +685,7 @@ void ActBossChar_Undead(void)
if (npc->act_no == 231)
gBoss[1].act_no = gBoss[2].act_no = gBoss[6].act_no = gBoss[7].act_no = 30;
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
for (i = 0; i < 8; ++i)
SetNpChar(4, gBoss[4].x + (Random(-32, 16) * 0x200), gBoss[4].y, Random(-0x200, 0x200), Random(-0x100, 0x100), 0, NULL, 0x100);
@ -695,7 +695,7 @@ void ActBossChar_Undead(void)
{
if (npc->x < 192 * 0x200)
npc->direct = 2;
if (npc->x > (gMap.width - 4) * 0x2000) // Pixel is inconsistent: the assembly code indicates he really used '0x2000' instead of '0x200 * 0x10', which he usually uses
if (npc->x > (gMap.width - 4) * (0x200 * 0x10))
npc->direct = 0;
if (npc->direct == 0)
@ -715,11 +715,11 @@ void ActBossChar_Undead(void)
if (npc->count2 == 150)
{
npc->count2 = 0;
SetNpChar(282, (gMap.width * 0x200 * 0x10) + 0x40, (Random(-1, 3) + 10) * 0x2000, 0, 0, 0, NULL, 0x30);
SetNpChar(282, (gMap.width * 0x200 * 0x10) + 0x40, (Random(-1, 3) + 10) * (0x200 * 0x10), 0, 0, 0, NULL, 0x30);
}
else if (npc->count2 == 75)
{
SetNpChar(282, (gMap.width * 0x200 * 0x10) + 0x40, (Random(-3, 0) + 3) * 0x2000, 0, 0, 0, NULL, 0x30);
SetNpChar(282, (gMap.width * 0x200 * 0x10) + 0x40, (Random(-3, 0) + 3) * (0x200 * 0x10), 0, 0, 0, NULL, 0x30);
}
break;

View file

@ -237,7 +237,7 @@ void ActBossChar_Ballos(void)
npc->act_no = 103;
npc->act_wait = 0;
SetQuake2(30);
PlaySoundObject(44, 1);
PlaySoundObject(44, SOUND_MODE_PLAY);
if (gMC.y > npc->y + (48 * 0x200) && gMC.x < npc->x + (24 * 0x200) && gMC.x > npc->x - (24 * 0x200))
DamageMyChar(16);
@ -325,10 +325,10 @@ void ActBossChar_Ballos(void)
gMC.ym = -0x200;
SetQuake2(30);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
SetNpChar(332, npc->x - (12 * 0x200), npc->y + (52 * 0x200), 0, 0, 0, NULL, 0x100);
SetNpChar(332, npc->x + (12 * 0x200), npc->y + (52 * 0x200), 0, 0, 2, NULL, 0x100);
PlaySoundObject(44, 1);
PlaySoundObject(44, SOUND_MODE_PLAY);
for (i = 0; i < 0x10; ++i)
{
@ -363,7 +363,7 @@ void ActBossChar_Ballos(void)
npc->act_no = 222;
npc->act_wait = 0;
SetQuake2(30);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
for (i = 0; i < 0x10; ++i)
{
@ -514,7 +514,7 @@ void ActBossChar_Ballos(void)
}
if (npc->act_wait / 3 % 2)
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
if (npc->act_wait > 540)
npc->act_no = 420;
@ -526,7 +526,7 @@ void ActBossChar_Ballos(void)
npc->act_wait = 0;
npc->ani_wait = 0;
SetQuake2(30);
PlaySoundObject(35, 1);
PlaySoundObject(35, SOUND_MODE_PLAY);
gBoss[1].act_no = 102;
gBoss[2].act_no = 102;
@ -648,7 +648,7 @@ void ActBossChar_Ballos(void)
++gBoss[0].act_wait;
if (gBoss[0].act_wait % 12 == 0)
PlaySoundObject(44, 1);
PlaySoundObject(44, SOUND_MODE_PLAY);
SetDestroyNpChar(gBoss[0].x + (Random(-60, 60) * 0x200), gBoss[0].y + (Random(-60, 60) * 0x200), 1, 1);
@ -657,7 +657,7 @@ void ActBossChar_Ballos(void)
gBoss[0].act_wait = 0;
gBoss[0].act_no = 1002;
SetFlash(gBoss[0].x, gBoss[0].y, 1);
PlaySoundObject(35, 1);
PlaySoundObject(35, SOUND_MODE_PLAY);
}
break;
@ -718,7 +718,7 @@ void ActBossChar_Ballos(void)
if (npc->act_wait == 270 || npc->act_wait == 280 || npc->act_wait == 290)
{
SetNpChar(353, npc->x, npc->y - (52 * 0x200), 0, 0, 1, NULL, 0x100);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
for (i = 0; i < 4; ++i)
SetNpChar(4, npc->x, npc->y - (52 * 0x200), 0, 0, 0, NULL, 0x100);

View file

@ -73,33 +73,33 @@ static void ActBossChar02_01(void)
{
case BALFROG_SPRITE_NOTHING:
boss->hit_voice = SND_BEHEMOTH_LARGE_HURT;
boss->hit.front = PIXELS_TO_UNITS(16);
boss->hit.top = PIXELS_TO_UNITS(16);
boss->hit.back = PIXELS_TO_UNITS(16);
boss->hit.bottom = PIXELS_TO_UNITS(16);
boss->hit.front = 16 * 0x200;
boss->hit.top = 16 * 0x200;
boss->hit.back = 16 * 0x200;
boss->hit.bottom = 16 * 0x200;
boss->size = 3;
boss->bits = NPC_INVULNERABLE;
break;
case BALFROG_SPRITE_STANDING_STILL:
boss->x = gBoss[0].x + PIXELS_TO_UNITS(-24) * minus;
boss->y = gBoss[0].y - PIXELS_TO_UNITS(24);
boss->x = gBoss[0].x + -24 * 0x200 * minus;
boss->y = gBoss[0].y - 24 * 0x200;
break;
case BALFROG_SPRITE_MOUTH_BARELY_OPEN_CROUCHING:
boss->x = gBoss[0].x + PIXELS_TO_UNITS(-24) * minus;
boss->y = gBoss[0].y - PIXELS_TO_UNITS(20);
boss->x = gBoss[0].x + -24 * 0x200 * minus;
boss->y = gBoss[0].y - 20 * 0x200;
break;
case BALFROG_SPRITE_MOUTH_OPEN_CROUCHING:
case BALFROG_SPRITE_MOUTH_OPEN_CROUCHING_FLASHING:
boss->x = gBoss[0].x + PIXELS_TO_UNITS(-24) * minus;
boss->y = gBoss[0].y - PIXELS_TO_UNITS(16);
boss->x = gBoss[0].x + -24 * 0x200 * minus;
boss->y = gBoss[0].y - 16 * 0x200;
break;
case BALFROG_SPRITE_JUMPING:
boss->x = gBoss[0].x + PIXELS_TO_UNITS(-24) * minus;
boss->y = gBoss[0].y - PIXELS_TO_UNITS(43);
boss->x = gBoss[0].x + -24 * 0x200 * minus;
boss->y = gBoss[0].y - 43 * 0x200;
break;
}
}
@ -112,10 +112,10 @@ static void ActBossChar02_02(void)
{
case BALFROG_SPRITE_NOTHING:
boss->hit_voice = SND_BEHEMOTH_LARGE_HURT;
boss->hit.front = PIXELS_TO_UNITS(24);
boss->hit.top = PIXELS_TO_UNITS(16);
boss->hit.back = PIXELS_TO_UNITS(24);
boss->hit.bottom = PIXELS_TO_UNITS(16);
boss->hit.front = 24 * 0x200;
boss->hit.top = 16 * 0x200;
boss->hit.back = 24 * 0x200;
boss->hit.bottom = 16 * 0x200;
boss->size = 3;
boss->bits = NPC_INVULNERABLE;
break;
@ -169,18 +169,18 @@ void ActBossChar_Frog(void)
switch (boss->act_no)
{
case BALFROG_INITIALIZE:
boss->x = TILES_TO_UNITS(6);
boss->y = TILES_TO_UNITS(12.5);
boss->x = 6 * (0x200 * 0x10);
boss->y = 12 * (0x200 * 0x10) + 8 * 0x200;
boss->direct = DIR_RIGHT;
boss->view.front = PIXELS_TO_UNITS(48);
boss->view.top = PIXELS_TO_UNITS(48);
boss->view.back = PIXELS_TO_UNITS(32);
boss->view.bottom = PIXELS_TO_UNITS(16);
boss->view.front = 48 * 0x200;
boss->view.top = 48 * 0x200;
boss->view.back = 32 * 0x200;
boss->view.bottom = 16 * 0x200;
boss->hit_voice = SND_BEHEMOTH_LARGE_HURT;
boss->hit.front = PIXELS_TO_UNITS(24);
boss->hit.top = PIXELS_TO_UNITS(16);
boss->hit.back = PIXELS_TO_UNITS(24);
boss->hit.bottom = PIXELS_TO_UNITS(16);
boss->hit.front = 24 * 0x200;
boss->hit.top = 16 * 0x200;
boss->hit.back = 24 * 0x200;
boss->hit.bottom = 16 * 0x200;
boss->size = 3;
boss->exp = 1;
boss->code_event = 1000;
@ -202,7 +202,7 @@ void ActBossChar_Frog(void)
gBoss[2].damage = 5;
for (i = 0; i < 8; ++i)
SetNpChar(NPC_SMOKE, boss->x + PIXELS_TO_UNITS(Random(-12, 12)), boss->y + PIXELS_TO_UNITS(Random(-12, 12)), Random(-341, 341), Random(PIXELS_TO_UNITS(-3), 0), DIR_LEFT, NULL, 0x100);
SetNpChar(NPC_SMOKE, boss->x + Random(-12, 12) * 0x200, boss->y + Random(-12, 12) * 0x200, Random(-341, 341), Random(-3 * 0x200, 0), DIR_LEFT, NULL, 0x100);
break;
@ -257,16 +257,16 @@ void ActBossChar_Frog(void)
{
boss->act_no = BALFROG_MIDAIR;
boss->ani_no = BALFROG_SPRITE_JUMPING;
boss->ym = PIXELS_TO_UNITS(-2);
PlaySoundObject(25, 1);
boss->ym = -2 * 0x200;
PlaySoundObject(25, SOUND_MODE_PLAY);
if (boss->direct == DIR_LEFT)
boss->xm = PIXELS_TO_UNITS(-1);
boss->xm = -1 * 0x200;
else
boss->xm = PIXELS_TO_UNITS(1);
boss->xm = 1 * 0x200;
boss->view.top = PIXELS_TO_UNITS(64);
boss->view.bottom = PIXELS_TO_UNITS(24);
boss->view.top = 64 * 0x200;
boss->view.bottom = 24 * 0x200;
}
break;
@ -275,23 +275,23 @@ void ActBossChar_Frog(void)
if (boss->direct == DIR_LEFT && boss->flag & COLL_LEFT_WALL)
{
boss->direct = DIR_RIGHT;
boss->xm = PIXELS_TO_UNITS(1);
boss->xm = 1 * 0x200;
}
if (boss->direct == DIR_RIGHT && boss->flag & COLL_RIGHT_WALL)
{
boss->direct = DIR_LEFT;
boss->xm = PIXELS_TO_UNITS(-1);
boss->xm = -1 * 0x200;
}
if (boss->flag & COLL_GROUND)
{
PlaySoundObject(SND_LARGE_OBJECT_HIT_GROUND, 1);
PlaySoundObject(SND_LARGE_OBJECT_HIT_GROUND, SOUND_MODE_PLAY);
SetQuake(30);
boss->act_no = BALFROG_WAIT;
boss->ani_no = BALFROG_SPRITE_STANDING_STILL;
boss->view.top = PIXELS_TO_UNITS(48);
boss->view.bottom = PIXELS_TO_UNITS(16);
boss->view.top = 48 * 0x200;
boss->view.bottom = 16 * 0x200;
if (boss->direct == DIR_LEFT && boss->x < gMC.x)
{
@ -305,10 +305,10 @@ void ActBossChar_Frog(void)
boss->act_no = BALFROG_INITIALIZE_LAND;
}
SetNpChar(110, TILES_TO_UNITS(Random(4, 16)), TILES_TO_UNITS(Random(0, 4)), 0, 0, DIR_AUTO, NULL, 0x80);
SetNpChar(110, Random(4, 16) * (0x200 * 0x10), Random(0, 4) * (0x200 * 0x10), 0, 0, DIR_AUTO, NULL, 0x80);
for (i = 0; i < 4; ++i)
SetNpChar(NPC_SMOKE, boss->x + PIXELS_TO_UNITS(Random(-12, 12)), boss->y + boss->hit.bottom, Random(-341, 341), Random(PIXELS_TO_UNITS(-3), 0), DIR_LEFT, NULL, 0x100);
SetNpChar(NPC_SMOKE, boss->x + Random(-12, 12) * 0x200, boss->y + boss->hit.bottom, Random(-341, 341), Random(-3 * 0x200, 0), DIR_LEFT, NULL, 0x100);
}
break;
@ -371,9 +371,9 @@ void ActBossChar_Frog(void)
--boss->count1;
if (boss->direct == DIR_LEFT)
deg = GetArktan(boss->x - TILES_TO_UNITS(2) - gMC.x, boss->y - PIXELS_TO_UNITS(8) - gMC.y);
deg = GetArktan(boss->x - 2 * (0x200 * 0x10) - gMC.x, boss->y - 8 * 0x200 - gMC.y);
else
deg = GetArktan(boss->x + TILES_TO_UNITS(2) - gMC.x, boss->y - PIXELS_TO_UNITS(8) - gMC.y);
deg = GetArktan(boss->x + 2 * (0x200 * 0x10) - gMC.x, boss->y - 8 * 0x200 - gMC.y);
deg += (unsigned char)Random(-0x10, 0x10);
@ -381,11 +381,11 @@ void ActBossChar_Frog(void)
xm = GetCos(deg);
if (boss->direct == DIR_LEFT)
SetNpChar(NPC_PROJECTILE_BALFROG_SPITBALL, boss->x - TILES_TO_UNITS(2), boss->y - PIXELS_TO_UNITS(8), xm, ym, DIR_LEFT, NULL, 0x100);
SetNpChar(NPC_PROJECTILE_BALFROG_SPITBALL, boss->x - 2 * (0x200 * 0x10), boss->y - 8 * 0x200, xm, ym, DIR_LEFT, NULL, 0x100);
else
SetNpChar(NPC_PROJECTILE_BALFROG_SPITBALL, boss->x + TILES_TO_UNITS(2), boss->y - PIXELS_TO_UNITS(8), xm, ym, DIR_LEFT, NULL, 0x100);
SetNpChar(NPC_PROJECTILE_BALFROG_SPITBALL, boss->x + 2 * (0x200 * 0x10), boss->y - 8 * 0x200, xm, ym, DIR_LEFT, NULL, 0x100);
PlaySoundObject(SND_ENEMY_SHOOT_PROJETILE, 1);
PlaySoundObject(SND_ENEMY_SHOOT_PROJETILE, SOUND_MODE_PLAY);
if (boss->count1 == 0 || boss->life < boss->tgt_x - 90)
{
@ -457,10 +457,10 @@ void ActBossChar_Frog(void)
{
boss->act_no = BALFROG_LEAP_MIDAIR;
boss->ani_no = BALFROG_SPRITE_JUMPING;
boss->ym = PIXELS_TO_UNITS(-5);
boss->view.top = PIXELS_TO_UNITS(64);
boss->view.bottom = PIXELS_TO_UNITS(24);
PlaySoundObject(SND_SILLY_EXPLOSION, 1);
boss->ym = -5 * 0x200;
boss->view.top = 64 * 0x200;
boss->view.bottom = 24 * 0x200;
PlaySoundObject(SND_SILLY_EXPLOSION, SOUND_MODE_PLAY);
}
break;
@ -468,21 +468,21 @@ void ActBossChar_Frog(void)
case BALFROG_LEAP_MIDAIR:
if (boss->flag & COLL_GROUND)
{
PlaySoundObject(SND_LARGE_OBJECT_HIT_GROUND, 1);
PlaySoundObject(SND_LARGE_OBJECT_HIT_GROUND, SOUND_MODE_PLAY);
SetQuake(60);
boss->act_no = BALFROG_WAIT;
boss->ani_no = BALFROG_SPRITE_STANDING_STILL;
boss->view.top = PIXELS_TO_UNITS(48);
boss->view.bottom = PIXELS_TO_UNITS(16);
boss->view.top = 48 * 0x200;
boss->view.bottom = 16 * 0x200;
for (i = 0; i < 2; ++i)
SetNpChar(NPC_ENEMY_FROG, TILES_TO_UNITS(Random(4, 16)), TILES_TO_UNITS(Random(0, 4)), 0, 0, DIR_AUTO, NULL, 0x80);
SetNpChar(NPC_ENEMY_FROG, Random(4, 16) * (0x200 * 0x10), Random(0, 4) * (0x200 * 0x10), 0, 0, DIR_AUTO, NULL, 0x80);
for (i = 0; i < 6; ++i)
SetNpChar(NPC_ENEMY_PUCHI, TILES_TO_UNITS(Random(4, 16)), TILES_TO_UNITS(Random(0, 4)), 0, 0, DIR_AUTO, NULL, 0x80);
SetNpChar(NPC_ENEMY_PUCHI, Random(4, 16) * (0x200 * 0x10), Random(0, 4) * (0x200 * 0x10), 0, 0, DIR_AUTO, NULL, 0x80);
for (i = 0; i < 8; ++i)
SetNpChar(NPC_SMOKE, boss->x + PIXELS_TO_UNITS(Random(-12, 12)), boss->y + boss->hit.bottom, Random(-341, 341), Random(PIXELS_TO_UNITS(-3), 0), DIR_LEFT, NULL, 0x100);
SetNpChar(NPC_SMOKE, boss->x + Random(-12, 12) * 0x200, boss->y + boss->hit.bottom, Random(-341, 341), Random(-3 * 0x200, 0), DIR_LEFT, NULL, 0x100);
if (boss->direct == DIR_LEFT && boss->x < gMC.x)
{
@ -504,10 +504,10 @@ void ActBossChar_Frog(void)
boss->ani_no = BALFROG_SPRITE_MOUTH_OPEN_CROUCHING;
boss->act_wait = 0;
boss->xm = 0;
PlaySoundObject(SND_EXPLOSION, 1);
PlaySoundObject(SND_EXPLOSION, SOUND_MODE_PLAY);
for (i = 0; i < 8; ++i)
SetNpChar(NPC_SMOKE, boss->x + PIXELS_TO_UNITS(Random(-12, 12)), boss->y + PIXELS_TO_UNITS(Random(-12, 12)), Random(-341, 341), Random(PIXELS_TO_UNITS(-3), 0), DIR_LEFT, NULL, 0x100);
SetNpChar(NPC_SMOKE, boss->x + Random(-12, 12) * 0x200, boss->y + Random(-12, 12) * 0x200, Random(-341, 341), Random(-3 * 0x200, 0), DIR_LEFT, NULL, 0x100);
gBoss[1].cond = 0;
gBoss[2].cond = 0;
@ -516,12 +516,12 @@ void ActBossChar_Frog(void)
++boss->act_wait;
if (boss->act_wait % 5 == 0)
SetNpChar(NPC_SMOKE, boss->x + PIXELS_TO_UNITS(Random(-12, 12)), boss->y + PIXELS_TO_UNITS(Random(-12, 12)), Random(-341, 341), Random(PIXELS_TO_UNITS(-3), 0), DIR_LEFT, NULL, 0x100);
SetNpChar(NPC_SMOKE, boss->x + Random(-12, 12) * 0x200, boss->y + Random(-12, 12) * 0x200, Random(-341, 341), Random(-3 * 0x200, 0), DIR_LEFT, NULL, 0x100);
if (boss->act_wait / 2 % 2)
boss->x -= PIXELS_TO_UNITS(1);
boss->x -= 1 * 0x200;
else
boss->x += PIXELS_TO_UNITS(1);
boss->x += 1 * 0x200;
if (boss->act_wait > 100)
{
@ -536,28 +536,28 @@ void ActBossChar_Frog(void)
if (boss->act_wait / 2 % 2)
{
boss->view.front = PIXELS_TO_UNITS(20);
boss->view.top = PIXELS_TO_UNITS(12);
boss->view.back = PIXELS_TO_UNITS(20);
boss->view.bottom = PIXELS_TO_UNITS(12);
boss->view.front = 20 * 0x200;
boss->view.top = 12 * 0x200;
boss->view.back = 20 * 0x200;
boss->view.bottom = 12 * 0x200;
boss->ani_no = BALFROG_SPRITE_BALROG_WHITE;
}
else
{
boss->view.front = PIXELS_TO_UNITS(48);
boss->view.top = PIXELS_TO_UNITS(48);
boss->view.back = PIXELS_TO_UNITS(32);
boss->view.bottom = PIXELS_TO_UNITS(16);
boss->view.front = 48 * 0x200;
boss->view.top = 48 * 0x200;
boss->view.back = 32 * 0x200;
boss->view.bottom = 16 * 0x200;
boss->ani_no = BALFROG_SPRITE_MOUTH_OPEN_CROUCHING;
}
if (boss->act_wait % 9 == 0)
SetNpChar(NPC_SMOKE, boss->x + PIXELS_TO_UNITS(Random(-12, 12)), boss->y + PIXELS_TO_UNITS(Random(-12, 12)), Random(-341, 341), Random(PIXELS_TO_UNITS(-3), 0), DIR_LEFT, NULL, 0x100);
SetNpChar(NPC_SMOKE, boss->x + Random(-12, 12) * 0x200, boss->y + Random(-12, 12) * 0x200, Random(-341, 341), Random(-3 * 0x200, 0), DIR_LEFT, NULL, 0x100);
if (boss->act_wait > 150)
{
boss->act_no = BALFROG_NOP_START;
boss->hit.bottom = PIXELS_TO_UNITS(12);
boss->hit.bottom = 12 * 0x200;
}
break;
@ -581,7 +581,7 @@ void ActBossChar_Frog(void)
if (boss->act_wait > 30)
{
boss->ani_no = BALFROG_SPRITE_BALROG_JUMPING;
boss->ym = PIXELS_TO_UNITS(-5);
boss->ym = -5 * 0x200;
boss->bits |= NPC_IGNORE_SOLIDITY;
boss->act_no = BALFROG_GONE_INTO_CEILING;
}
@ -589,12 +589,12 @@ void ActBossChar_Frog(void)
break;
case BALFROG_GONE_INTO_CEILING:
boss->ym = PIXELS_TO_UNITS(-5);
boss->ym = -5 * 0x200;
if (boss->y < 0)
{
boss->cond = 0;
PlaySoundObject(SND_LARGE_OBJECT_HIT_GROUND, 1);
PlaySoundObject(SND_LARGE_OBJECT_HIT_GROUND, SOUND_MODE_PLAY);
SetQuake(30);
}

View file

@ -139,7 +139,7 @@ void ActBossChar_Ironhead(void)
if (npc->act_wait == 300 || npc->act_wait == 310 || npc->act_wait == 320)
{
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
SetNpChar(198, npc->x + (10 * 0x200), npc->y + (1 * 0x200), Random(-3, 0) * 0x200, Random(-3, 3) * 0x200, 2, NULL, 0x100);
}
}

View file

@ -198,7 +198,7 @@ void ActBossChar_Omega(void)
gBoss[0].y -= 1 * 0x200;
if (++gBoss[0].act_wait % 4 == 0)
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
if (gBoss[0].act_wait == 48)
{
@ -231,7 +231,7 @@ void ActBossChar_Omega(void)
gBoss[0].act_no = 50;
gBoss[0].count1 = 0;
gBoss[5].hit.top = 16 * 0x200;
PlaySoundObject(102, 1);
PlaySoundObject(102, SOUND_MODE_PLAY);
}
break;
@ -266,14 +266,14 @@ void ActBossChar_Omega(void)
else
SetNpChar(48, gBoss[0].x, gBoss[0].y - (16 * 0x200), Random(-0x100, 0x100), -0x333, 2, NULL, 0x100);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
}
if (gBoss[0].act_wait == 200 || CountArmsBullet(6))
{
gBoss[0].count1 = 0;
gBoss[0].act_no = 70;
PlaySoundObject(102, 1);
PlaySoundObject(102, SOUND_MODE_PLAY);
}
break;
@ -292,8 +292,8 @@ void ActBossChar_Omega(void)
if (gBoss[0].count2 == 0)
{
PlaySoundObject(102, 0);
PlaySoundObject(12, 1);
PlaySoundObject(102, SOUND_MODE_STOP);
PlaySoundObject(12, SOUND_MODE_PLAY);
gBoss[0].act_no = 80;
gBoss[0].act_wait = 0;
@ -327,7 +327,7 @@ void ActBossChar_Omega(void)
++gBoss[0].act_wait;
if (gBoss[0].act_wait % 4 == 0)
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
if (gBoss[0].act_wait == 48)
{
@ -376,7 +376,7 @@ void ActBossChar_Omega(void)
if (gBoss[0].act_wait == 50 || CountArmsBullet(6))
{
gBoss[0].act_no = 130;
PlaySoundObject(102, 1);
PlaySoundObject(102, SOUND_MODE_PLAY);
gBoss[0].act_wait = 0;
gBoss[0].count1 = 0;
}
@ -384,7 +384,7 @@ void ActBossChar_Omega(void)
if (gBoss[0].act_wait < 30 && gBoss[0].act_wait % 5 == 0)
{
SetNpChar(48, gBoss[0].x, gBoss[0].y - (16 * 0x200), Random(-341, 341), -0x333, 0, NULL, 0x100);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
}
break;
@ -411,9 +411,9 @@ void ActBossChar_Omega(void)
gBoss[0].ym = -0x5FF;
PlaySoundObject(102, 0);
PlaySoundObject(12, 1);
PlaySoundObject(25, 1);
PlaySoundObject(102, SOUND_MODE_STOP);
PlaySoundObject(12, SOUND_MODE_PLAY);
PlaySoundObject(25, SOUND_MODE_PLAY);
if (gBoss[0].x < gMC.x)
gBoss[0].xm = 0x100;
@ -448,8 +448,8 @@ void ActBossChar_Omega(void)
gBoss[5].hit.top = 16 * 0x200;
gBoss[5].damage = 0;
PlaySoundObject(26, 1);
PlaySoundObject(12, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
PlaySoundObject(12, SOUND_MODE_PLAY);
SetQuake(30);
}
@ -462,7 +462,7 @@ void ActBossChar_Omega(void)
++gBoss[0].act_wait;
if (gBoss[0].act_wait % 12 == 0)
PlaySoundObject(52, 1);
PlaySoundObject(52, SOUND_MODE_PLAY);
SetDestroyNpChar(gBoss[0].x + (Random(-0x30, 0x30) * 0x200), gBoss[0].y + (Random(-0x30, 0x18) * 0x200), 1, 1);
@ -471,7 +471,7 @@ void ActBossChar_Omega(void)
gBoss[0].act_wait = 0;
gBoss[0].act_no = 160;
SetFlash(gBoss[0].x, gBoss[0].y, 1);
PlaySoundObject(35, 1);
PlaySoundObject(35, SOUND_MODE_PLAY);
}
break;

View file

@ -85,7 +85,7 @@ void ActBossChar_Press(void)
npc->y = 413 * 0x200;
npc->ani_no = 0;
npc->act_no = 20;
PlaySoundObject(44, 1);
PlaySoundObject(44, SOUND_MODE_PLAY);
for (i = 0; i < 5; ++i)
{
@ -129,7 +129,7 @@ void ActBossChar_Press(void)
{
ChangeMapParts(i + 8, npc->count2, 0);
SetDestroyNpChar((i + 8) * 0x200 * 0x10, npc->count2 * 0x200 * 0x10, 0, 4);
PlaySoundObject(12, 1);
PlaySoundObject(12, SOUND_MODE_PLAY);
}
}
@ -160,7 +160,7 @@ void ActBossChar_Press(void)
case 501:
if (++npc->act_wait % 0x10 == 0)
{
PlaySoundObject(12, 1);
PlaySoundObject(12, SOUND_MODE_PLAY);
SetDestroyNpChar(npc->x + (Random(-40, 40) * 0x200), npc->y + (Random(-60, 60) * 0x200), 1, 1);
}
@ -189,7 +189,7 @@ void ActBossChar_Press(void)
{
ChangeMapParts(i + 7, 14, 0);
SetDestroyNpChar((i + 7) * 0x200 * 0x10, 224 * 0x200, 0, 0);
PlaySoundObject(12, 1);
PlaySoundObject(12, SOUND_MODE_PLAY);
}
}

View file

@ -168,7 +168,7 @@ static void ActBossCharT_DragonHead(NPCHAR *npc)
if (npc->count2 > 10)
{
PlaySoundObject(51, 1);
PlaySoundObject(51, SOUND_MODE_PLAY);
SetDestroyNpChar(npc->x, npc->y, npc->view.back, 4);
npc->act_no = 300;
npc->act_wait = 0;
@ -193,7 +193,7 @@ static void ActBossCharT_DragonHead(NPCHAR *npc)
else
SetNpChar(202, npc->x + (8 * 0x200), npc->y, xm, ym, 0, NULL, 0x100);
PlaySoundObject(33, 1);
PlaySoundObject(33, SOUND_MODE_PLAY);
}
if (npc->act_wait > 50)
@ -242,7 +242,7 @@ static void ActBossCharT_DragonHead(NPCHAR *npc)
else
SetNpChar(202, npc->x + (8 * 0x200), npc->y, xm, ym, 0, NULL, 0x100);
PlaySoundObject(33, 1);
PlaySoundObject(33, SOUND_MODE_PLAY);
}
break;
@ -518,7 +518,7 @@ void ActBossChar_Twin(void)
npc->act_no = 1020;
npc->act_wait = 0;
SetFlash(gBoss[0].x, gBoss[0].y, 1);
PlaySoundObject(35, 1);
PlaySoundObject(35, SOUND_MODE_PLAY);
}
break;

View file

@ -183,10 +183,10 @@ static void ActBossChar03_01(NPCHAR *npc)
}
if ((npc->act_no == 101 || npc->act_no == 201 || npc->act_no == 301 || npc->act_no == 401) && npc->act_wait % 2 == 1)
PlaySoundObject(112, 1);
PlaySoundObject(112, SOUND_MODE_PLAY);
if ((npc->act_no == 103 || npc->act_no == 203) && npc->act_wait % 4 == 1)
PlaySoundObject(111, 1);
PlaySoundObject(111, SOUND_MODE_PLAY);
if (npc->act_no >= 100 && gMC.y < npc->y + (4 * 0x200) && gMC.y > npc->y - (4 * 0x200))
{
@ -262,7 +262,7 @@ static void ActBossChar03_02(NPCHAR *npc)
}
SetNpChar(158, npc->x + x, npc->y + y, 0, 0, direct, NULL, 0x100);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
npc->act_wait = 120;
break;
@ -404,7 +404,7 @@ static void ActBossChar03_04(NPCHAR *npc)
xm = GetCos(deg) * 3;
SetNpChar(156, npc->x, npc->y, xm, ym, 0, NULL, 0x100);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
npc->act_wait = 40;
break;
@ -836,7 +836,7 @@ void ActBossChar_MonstX(void)
SetQuake(2);
if (++npc->act_wait % 8 == 0)
PlaySoundObject(52, 1);
PlaySoundObject(52, SOUND_MODE_PLAY);
SetDestroyNpChar(npc->x + (Random(-72, 72) * 0x200), npc->y + (Random(-64, 64) * 0x200), 1, 1);
@ -845,7 +845,7 @@ void ActBossChar_MonstX(void)
npc->act_wait = 0;
npc->act_no = 1001;
SetFlash(npc->x, npc->y, 1);
PlaySoundObject(35, 1);
PlaySoundObject(35, SOUND_MODE_PLAY);
}
break;

View file

@ -14,7 +14,7 @@
static void Vanish(BULLET *bul)
{
if (bul->code_bullet != 37 && bul->code_bullet != 38 && bul->code_bullet != 39)
PlaySoundObject(28, 1);
PlaySoundObject(28, SOUND_MODE_PLAY);
else
SetCaret(bul->x, bul->y, 2, 1);
@ -38,7 +38,7 @@ int JudgeHitBulletBlock(int x, int y, BULLET *bul)
bul->cond = 0;
SetCaret(bul->x, bul->y, 2, 0);
PlaySoundObject(12, 1);
PlaySoundObject(12, SOUND_MODE_PLAY);
for (i = 0; i < 4; ++i)
SetNpChar(4, x * 0x200 * 0x10, y * 0x200 * 0x10, Random(-0x200, 0x200), Random(-0x200, 0x200), 0, NULL, 0x100);

View file

@ -537,7 +537,7 @@ void ActBullet_FireBall(BULLET *bul, int level)
{
bul->cond = 0;
SetCaret(bul->x, bul->y, 2, 0);
PlaySoundObject(28, 1);
PlaySoundObject(28, SOUND_MODE_PLAY);
return;
}
@ -601,7 +601,7 @@ void ActBullet_FireBall(BULLET *bul, int level)
bul->y += bul->ym;
if (bul->flag & 0xD)
PlaySoundObject(34, 1);
PlaySoundObject(34, SOUND_MODE_PLAY);
}
RECT rect_left1[4] = {
@ -989,7 +989,7 @@ void ActBullet_Bom(BULLET *bul, int level)
break;
}
PlaySoundObject(44, 1);
PlaySoundObject(44, SOUND_MODE_PLAY);
// Fallthrough
case 1:
switch (level)
@ -1192,7 +1192,7 @@ void ActBullet_Bubblin3(BULLET *bul)
{
bul->cond = 0;
SetCaret(bul->x, bul->y, 2, 0);
PlaySoundObject(100, 1);
PlaySoundObject(100, SOUND_MODE_PLAY);
if (gMC.up)
SetBullet(22, bul->x, bul->y, 1);
@ -1363,7 +1363,7 @@ void ActBullet_Sword1(BULLET *bul)
bul->bbits &= ~4;
if (bul->count1 % 5 == 1)
PlaySoundObject(34, 1);
PlaySoundObject(34, SOUND_MODE_PLAY);
if (bul->act_no == 0)
{
@ -1433,7 +1433,7 @@ void ActBullet_Sword2(BULLET *bul)
bul->bbits &= ~4;
if (bul->count1 % 7 == 1)
PlaySoundObject(106, 1);
PlaySoundObject(106, SOUND_MODE_PLAY);
if (bul->act_no == 0)
{
@ -1546,7 +1546,7 @@ void ActBullet_Sword3(BULLET *bul)
if (++bul->act_wait % 4 == 1)
{
PlaySoundObject(106, 1);
PlaySoundObject(106, SOUND_MODE_PLAY);
if (++bul->count1 % 2)
SetBullet(23, bul->x, bul->y, 0);
@ -1573,7 +1573,7 @@ void ActBullet_Sword3(BULLET *bul)
if (Random(-1, 1) == 0)
{
PlaySoundObject(106, 1);
PlaySoundObject(106, SOUND_MODE_PLAY);
if (Random(0, 1) % 2)
SetBullet(23, bul->x + (Random(-0x40, 0x40) * 0x200), bul->y + (Random(-0x40, 0x40) * 0x200), 0);
@ -1913,7 +1913,7 @@ void ActBullet_SuperBom(BULLET *bul, int level)
break;
}
PlaySoundObject(44, 1);
PlaySoundObject(44, SOUND_MODE_PLAY);
// Fallthrough
case 1:
switch (level)

View file

@ -2,6 +2,8 @@
#include "WindowsWrapper.h"
#include "CommonDefines.h"
#define BULLET_MAX 0x40
typedef struct BULLET
@ -31,13 +33,7 @@ typedef struct BULLET
int enemyYL;
int blockXL;
int blockYL;
struct
{
int front;
int top;
int back;
int bottom;
} view;
OTHER_RECT view;
} BULLET;
typedef struct BULLET_TABLE
@ -50,13 +46,7 @@ typedef struct BULLET_TABLE
int enemyYL;
int blockXL;
int blockYL;
struct
{
int front;
int top;
int back;
int bottom;
} view;
OTHER_RECT view;
} BULLET_TABLE;
extern BULLET gBul[BULLET_MAX];

View file

@ -3,13 +3,6 @@
#define WINDOW_WIDTH 320
#define WINDOW_HEIGHT 240
#define TILES_TO_PIXELS(x) ((int)((x) * 0x10))
#define PIXELS_TO_TILES(x) ((int)((x) / 0x10))
#define PIXELS_TO_UNITS(x) ((int)((x) * 0x200))
#define UNITS_TO_PIXELS(x) ((int)((x) / 0x200))
#define TILES_TO_UNITS(x) ((int)((x) * (0x200 * 0x10)))
#define UNITS_TO_TILES(x) ((int)((x) / (0x200 * 0x10)))
enum Collisions
{
COLL_LEFT_WALL = 1, // Touching a left wall
@ -27,3 +20,11 @@ enum Direction
DIR_DOWN = 3,
DIR_AUTO = 4
};
struct OTHER_RECT // The original name for this struct is unknown
{
int front;
int top;
int back;
int bottom;
};

View file

@ -355,7 +355,7 @@ static int ModeTitle(void)
{
if (gKeyTrg & gKeyOk)
{
PlaySoundObject(18, 1);
PlaySoundObject(18, SOUND_MODE_PLAY);
break;
}
}
@ -375,7 +375,7 @@ static int ModeTitle(void)
// Move cursor
if (gKeyTrg & (gKeyUp | gKeyDown))
{
PlaySoundObject(1, 1);
PlaySoundObject(1, SOUND_MODE_PLAY);
if (bContinue)
bContinue = FALSE;
@ -698,7 +698,7 @@ BOOL Game(void)
return FALSE;
}
PlaySoundObject(7, -1);
PlaySoundObject(7, SOUND_MODE_PLAY_LOOP);
std::string path = gDataPath + "/npc.tbl";
@ -729,7 +729,7 @@ BOOL Game(void)
mode = ModeAction();
}
PlaySoundObject(7, 0);
PlaySoundObject(7, SOUND_MODE_STOP);
EndMapData();
EndTextScript();

View file

@ -74,14 +74,17 @@ BOOL WriteLog(const char *string, int value1, int value2, int value3)
BOOL IsKeyFile(const char *name)
{
std::string path = gModulePath + '/' + name;
std::string path;
FILE *fp;
FILE *file = fopen(path.c_str(), "rb");
path = gModulePath + '/' + name;
if (file == NULL)
fp = fopen(path.c_str(), "rb");
if (fp == NULL)
return FALSE;
fclose(file);
fclose(fp);
return TRUE;
}

View file

@ -363,7 +363,7 @@ void InactiveWindow(void)
SleepNoise();
}
PlaySoundObject(7, 0);
PlaySoundObject(7, SOUND_MODE_STOP);
}
void ActiveWindow(void)
@ -376,7 +376,7 @@ void ActiveWindow(void)
ResetNoise();
}
PlaySoundObject(7, -1);
PlaySoundObject(7, SOUND_MODE_PLAY_LOOP);
}
void JoystickProc(void);

View file

@ -91,7 +91,7 @@ void AnimationMyChar(BOOL bKey)
gMC.ani_wait = 0;
if (++gMC.ani_no == 7 || gMC.ani_no == 9)
PlaySoundObject(24, 1);
PlaySoundObject(24, SOUND_MODE_PLAY);
}
if (gMC.ani_no > 9 || gMC.ani_no < 6)
@ -106,7 +106,7 @@ void AnimationMyChar(BOOL bKey)
gMC.ani_wait = 0;
if (++gMC.ani_no == 2 || gMC.ani_no == 4)
PlaySoundObject(24, 1);
PlaySoundObject(24, SOUND_MODE_PLAY);
}
if (gMC.ani_no > 4 || gMC.ani_no < 1)
@ -115,7 +115,7 @@ void AnimationMyChar(BOOL bKey)
else if (gKey & gKeyUp && bKey)
{
if (gMC.cond & 4)
PlaySoundObject(24, 1);
PlaySoundObject(24, SOUND_MODE_PLAY);
gMC.cond &= ~4;
gMC.ani_no = 5;
@ -123,7 +123,7 @@ void AnimationMyChar(BOOL bKey)
else
{
if (gMC.cond & 4)
PlaySoundObject(24, 1);
PlaySoundObject(24, SOUND_MODE_PLAY);
gMC.cond &= ~4;
gMC.ani_no = 0;
@ -452,7 +452,7 @@ void ActMyChar_Normal(BOOL bKey)
else
{
gMC.ym = -jump;
PlaySoundObject(15, 1);
PlaySoundObject(15, SOUND_MODE_PLAY);
}
}
}
@ -498,7 +498,7 @@ void ActMyChar_Normal(BOOL bKey)
if (gMC.direct == 2)
SetCaret(gMC.x - (2 * 0x200), gMC.y + (2 * 0x200), 7, 0);
PlaySoundObject(113, 1);
PlaySoundObject(113, SOUND_MODE_PLAY);
}
}
else if (gMC.boost_sw == 2)
@ -510,14 +510,14 @@ void ActMyChar_Normal(BOOL bKey)
if (gKeyTrg & gKeyJump || gMC.boost_cnt % 3 == 1)
{
SetCaret(gMC.x, gMC.y + (6 * 0x200), 7, 3);
PlaySoundObject(113, 1);
PlaySoundObject(113, SOUND_MODE_PLAY);
}
}
else if (gMC.boost_sw == 3 && (gKeyTrg & gKeyJump || gMC.boost_cnt % 3 == 1))
{
// Boost particles (and sound)
SetCaret(gMC.x, gMC.y - (6 * 0x200), 7, 1);
PlaySoundObject(113, 1);
PlaySoundObject(113, SOUND_MODE_PLAY);
}
}
// Upwards wind/current
@ -534,7 +534,7 @@ void ActMyChar_Normal(BOOL bKey)
if (gMC.boost_cnt % 3 == 0)
{
SetCaret(gMC.x, gMC.y + (gMC.hit.bottom / 2), 7, 3);
PlaySoundObject(113, 1);
PlaySoundObject(113, SOUND_MODE_PLAY);
}
// Bounce off of ceiling
@ -616,7 +616,7 @@ void ActMyChar_Normal(BOOL bKey)
SetNpChar(73, x, gMC.y, gMC.xm + Random(-0x200, 0x200), Random(-0x200, 0x80) - (gMC.ym / 2), dir, NULL, 0);
}
PlaySoundObject(56, 1);
PlaySoundObject(56, SOUND_MODE_PLAY);
}
else
{
@ -628,7 +628,7 @@ void ActMyChar_Normal(BOOL bKey)
SetNpChar(73, x, gMC.y, gMC.xm + Random(-0x200, 0x200), Random(-0x200, 0x80), dir, NULL, 0);
}
PlaySoundObject(56, 1);
PlaySoundObject(56, SOUND_MODE_PLAY);
}
}
@ -1000,12 +1000,12 @@ void SetNoise(int no, int freq)
case 1:
ChangeSoundFrequency(40, noise_freq);
ChangeSoundFrequency(41, noise_freq + 100);
PlaySoundObject(40, -1);
PlaySoundObject(41, -1);
PlaySoundObject(40, SOUND_MODE_PLAY_LOOP);
PlaySoundObject(41, SOUND_MODE_PLAY_LOOP);
break;
case 2:
PlaySoundObject(58, -1);
PlaySoundObject(58, SOUND_MODE_PLAY_LOOP);
break;
}
}
@ -1013,9 +1013,9 @@ void SetNoise(int no, int freq)
void CutNoise(void)
{
noise_no = 0;
PlaySoundObject(40, 0);
PlaySoundObject(41, 0);
PlaySoundObject(58, 0);
PlaySoundObject(40, SOUND_MODE_STOP);
PlaySoundObject(41, SOUND_MODE_STOP);
PlaySoundObject(58, SOUND_MODE_STOP);
}
void ResetNoise(void)
@ -1025,19 +1025,19 @@ void ResetNoise(void)
case 1:
ChangeSoundFrequency(40, noise_freq);
ChangeSoundFrequency(41, noise_freq + 100);
PlaySoundObject(40, -1);
PlaySoundObject(41, -1);
PlaySoundObject(40, SOUND_MODE_PLAY_LOOP);
PlaySoundObject(41, SOUND_MODE_PLAY_LOOP);
break;
case 2:
PlaySoundObject(58, -1);
PlaySoundObject(58, SOUND_MODE_PLAY_LOOP);
break;
}
}
void SleepNoise(void)
{
PlaySoundObject(40, 0);
PlaySoundObject(41, 0);
PlaySoundObject(58, 0);
PlaySoundObject(40, SOUND_MODE_STOP);
PlaySoundObject(41, SOUND_MODE_STOP);
PlaySoundObject(58, SOUND_MODE_STOP);
}

View file

@ -2,6 +2,8 @@
#include "WindowsWrapper.h"
#include "CommonDefines.h"
// TODO - When I add bitmask constants for gMC.flags...
// 0x100 is a 'player is underwater' flag
@ -38,20 +40,8 @@ typedef struct MYCHAR
int ym;
int ani_wait;
int ani_no;
struct
{
int front;
int top;
int back;
int bottom;
} hit;
struct
{
int front;
int top;
int back;
int bottom;
} view;
OTHER_RECT hit;
OTHER_RECT view;
RECT rect;
RECT rect_arms;
int level;

View file

@ -23,7 +23,7 @@ static void PutlittleStar(void)
{
if (!(gMC.cond & 2) && gMC.ym < -0x200)
{
PlaySoundObject(3, 1);
PlaySoundObject(3, SOUND_MODE_PLAY);
SetCaret(gMC.x, gMC.y - gMC.hit.top, 13, 0);
SetCaret(gMC.x, gMC.y - gMC.hit.top, 13, 0);
}
@ -101,7 +101,7 @@ int JudgeHitMyCharBlock(int x, int y)
// Halt momentum
if (gMC.ym > 0x400)
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
if (gMC.ym > 0)
gMC.ym = 0;
@ -228,7 +228,7 @@ int JudgeHitMyCharTriangleE(int x, int y)
// Halt momentum
if (gMC.ym > 0x400)
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
if (gMC.ym > 0)
gMC.ym = 0;
@ -255,7 +255,7 @@ int JudgeHitMyCharTriangleF(int x, int y)
// Halt momentum
if (gMC.ym > 0x400)
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
if (gMC.ym > 0)
gMC.ym = 0;
@ -282,7 +282,7 @@ int JudgeHitMyCharTriangleG(int x, int y)
// Halt momentum
if (gMC.ym > 0x400)
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
if (gMC.ym > 0)
gMC.ym = 0;
@ -309,7 +309,7 @@ int JudgeHitMyCharTriangleH(int x, int y)
// Halt momentum
if (gMC.ym > 0x400)
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
if (gMC.ym > 0)
gMC.ym = 0;
@ -715,7 +715,7 @@ int JudgeHitMyCharNPC4(NPCHAR *npc)
if (gMC.y + gMC.hit.bottom > npc->y - npc->hit.top && gMC.hit.bottom + gMC.y < npc->y + (3 * 0x200))
{
if (gMC.ym - npc->ym > 2 * 0x200)
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
if (gMC.unit == 1)
{
@ -799,21 +799,21 @@ void HitMyCharNpChar(void)
// Special NPCs (pickups)
if (hit != 0 && gNPC[i].code_char == 1)
{
PlaySoundObject(14, 1);
PlaySoundObject(14, SOUND_MODE_PLAY);
AddExpMyChar(gNPC[i].exp);
gNPC[i].cond = 0;
}
if (hit != 0 && gNPC[i].code_char == 86)
{
PlaySoundObject(42, 1);
PlaySoundObject(42, SOUND_MODE_PLAY);
AddBulletMyChar(gNPC[i].code_event, gNPC[i].exp);
gNPC[i].cond = 0;
}
if (hit != 0 && gNPC[i].code_char == 87)
{
PlaySoundObject(20, 1);
PlaySoundObject(20, SOUND_MODE_PLAY);
AddLifeMyChar(gNPC[i].exp);
gNPC[i].cond = 0;
}

View file

@ -68,7 +68,7 @@ void AddExpMyChar(int x)
if (gArmsData[gSelectedArms].code != 13)
{
PlaySoundObject(27, 1);
PlaySoundObject(27, SOUND_MODE_PLAY);
SetCaret(gMC.x, gMC.y, 10, 0);
}
}
@ -121,7 +121,7 @@ void DamageMyChar(int damage)
return;
// Damage player
PlaySoundObject(16, 1);
PlaySoundObject(16, SOUND_MODE_PLAY);
gMC.cond &= ~1;
gMC.shock = 128;
@ -173,7 +173,7 @@ void DamageMyChar(int damage)
// Death
if (gMC.life <= 0)
{
PlaySoundObject(17, 1);
PlaySoundObject(17, SOUND_MODE_PLAY);
gMC.cond = 0;
SetDestroyNpChar(gMC.x, gMC.y, 0x1400, 0x40);
StartTextScript(40);

View file

@ -618,7 +618,7 @@ void DeleteNpCharCode(int code, BOOL bSmoke)
if (bSmoke)
{
PlaySoundObject(gNPC[n].destroy_voice, 1);
PlaySoundObject(gNPC[n].destroy_voice, SOUND_MODE_PLAY);
switch (gNPC[n].size)
{

View file

@ -2,6 +2,7 @@
#include "WindowsWrapper.h"
#include "CommonDefines.h"
#include "Draw.h"
#define NPC_MAX 0x200
@ -81,20 +82,8 @@ typedef struct NPCHAR
int count2;
int act_no;
int act_wait;
struct
{
int front;
int top;
int back;
int bottom;
} hit;
struct
{
int front;
int top;
int back;
int bottom;
} view;
OTHER_RECT hit;
OTHER_RECT view;
unsigned char shock;
int damage_view;
int damage;

View file

@ -110,7 +110,7 @@ void ActNpc001(NPCHAR *npc)
// Bounce off floor
if (npc->flag & 8)
{
PlaySoundObject(45, 1);
PlaySoundObject(45, SOUND_MODE_PLAY);
npc->ym = -0x280;
npc->xm = 2 * npc->xm / 3;
}
@ -118,7 +118,7 @@ void ActNpc001(NPCHAR *npc)
// Play bounce song (and try to clip out of floor if stuck)
if (npc->flag & 0xD)
{
PlaySoundObject(45, 1);
PlaySoundObject(45, SOUND_MODE_PLAY);
if (++npc->count2 > 2)
npc->y -= 1 * 0x200;
}
@ -309,7 +309,7 @@ void ActNpc002(NPCHAR *npc)
npc->ani_no = 5;
// These three lines are missing in the Linux port, because it's based on v1.0.0.4:
// https://www.cavestory.org/forums/threads/version-1-0-0-5-really-different-than-1-0-0-6.102/#post-3231
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
SetNpChar(4, npc->x, npc->y + (3 * 0x200), 0, 0, 0, NULL, 0x100);
SetQuake(8);
}
@ -487,7 +487,7 @@ void ActNpc005(NPCHAR *npc)
// Jump
npc->ym = -0x5FF;
PlaySoundObject(30, 1);
PlaySoundObject(30, SOUND_MODE_PLAY);
// Jump in facing direction
if (npc->direct == 0)
@ -506,7 +506,7 @@ void ActNpc005(NPCHAR *npc)
npc->act_wait = 0;
npc->ani_no = 0;
npc->act_no = 1;
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
}
break;
@ -870,7 +870,7 @@ void ActNpc009(NPCHAR *npc)
npc->act_no = 2;
npc->ani_no = 1;
npc->act_wait = 0;
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
SetQuake(30);
}
@ -947,7 +947,7 @@ void ActNpc010(NPCHAR *npc)
xm = GetCos(deg);
SetNpChar(11, npc->x, npc->y + (4 * 0x200), xm, ym, 0, NULL, 0x100);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
if (npc->count1 == 0)
{
@ -984,7 +984,7 @@ void ActNpc010(NPCHAR *npc)
npc->act_no = 5;
npc->act_wait = 0;
npc->ani_no = 2;
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
SetQuake(30);
npc->damage = 0;
}
@ -1142,7 +1142,7 @@ void ActNpc012(NPCHAR *npc)
if (npc->y < 0)
{
npc->code_char = 0;
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
SetQuake(30);
}
@ -1165,7 +1165,7 @@ void ActNpc012(NPCHAR *npc)
for (i = 0; i < 4; ++i)
SetNpChar(4, npc->x + (Random(-12, 12) * 0x200), npc->y + (Random(-12, 12) * 0x200), Random(-341, 341), Random(-0x600, 0), 0, NULL, 0x100);
PlaySoundObject(72, 1);
PlaySoundObject(72, SOUND_MODE_PLAY);
// Fallthrough
case 21:
npc->tgt_x = 1;
@ -1260,7 +1260,7 @@ void ActNpc012(NPCHAR *npc)
npc->ani_wait = 0;
if (++npc->ani_no == 10 || npc->ani_no == 11)
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
}
if (npc->ani_no > 12)
@ -1276,7 +1276,7 @@ void ActNpc012(NPCHAR *npc)
case 70:
npc->act_no = 71;
npc->act_wait = 64;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
npc->ani_no = 13;
// Fallthrough
case 71:
@ -1331,7 +1331,7 @@ void ActNpc012(NPCHAR *npc)
{
ChangeMapParts(x - 1, y, 0);
ChangeMapParts(x + 1, y, 0);
PlaySoundObject(44, 1);
PlaySoundObject(44, SOUND_MODE_PLAY);
SetQuake2(10);
}
@ -1704,8 +1704,8 @@ void ActNpc019(NPCHAR *npc)
npc->act_no = 1;
npc->ani_no = 3;
npc->ym = -0x100;
PlaySoundObject(12, 1);
PlaySoundObject(26, 1);
PlaySoundObject(12, SOUND_MODE_PLAY);
PlaySoundObject(26, SOUND_MODE_PLAY);
SetQuake(30);
// Fallthrough
case 1:
@ -1716,7 +1716,7 @@ void ActNpc019(NPCHAR *npc)
npc->act_no = 2;
npc->ani_no = 2;
npc->act_wait = 0;
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
SetQuake(30);
}

View file

@ -171,7 +171,7 @@ void ActNpc024(NPCHAR *npc)
npc->act_no = 3;
npc->ani_no = 2;
npc->ym = -0x5FF;
PlaySoundObject(108, 1);
PlaySoundObject(108, SOUND_MODE_PLAY);
if (npc->x > gMC.x)
npc->direct = 0;
@ -216,7 +216,7 @@ void ActNpc024(NPCHAR *npc)
}
if (npc->act_wait % 4 == 1)
PlaySoundObject(110, 1);
PlaySoundObject(110, SOUND_MODE_PLAY);
if (++npc->ani_wait > 0)
{
@ -237,7 +237,7 @@ void ActNpc024(NPCHAR *npc)
npc->act_wait = 0;
npc->ani_no = 0;
npc->act_no = 1;
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
SetQuake(30);
}
@ -604,7 +604,7 @@ void ActNpc028(NPCHAR *npc)
npc->act_no = 3;
npc->ani_no = 2;
npc->ym = -0x4CC;
PlaySoundObject(30, 1);
PlaySoundObject(30, SOUND_MODE_PLAY);
if (npc->x > gMC.x)
npc->direct = 0;
@ -649,7 +649,7 @@ void ActNpc028(NPCHAR *npc)
}
if (npc->act_wait % 4 == 1)
PlaySoundObject(109, 1);
PlaySoundObject(109, SOUND_MODE_PLAY);
if (npc->flag & 8)
npc->ym = -0x200;
@ -673,7 +673,7 @@ void ActNpc028(NPCHAR *npc)
npc->act_wait = 0;
npc->ani_no = 0;
npc->act_no = 1;
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
}
break;
@ -1022,7 +1022,7 @@ void ActNpc035(NPCHAR *npc)
{
if (npc->act_no < 3 && npc->life < 90)
{
PlaySoundObject(71, 1);
PlaySoundObject(71, SOUND_MODE_PLAY);
SetDestroyNpChar(npc->x, npc->y, npc->view.back, 8);
SetExpObjects(npc->x, npc->y, npc->exp);
npc->act_no = 3;
@ -1128,7 +1128,7 @@ void ActNpc036(NPCHAR *npc)
xm = GetCos(deg);
SetNpChar(11, npc->x, npc->y + 0x800, xm, ym, 0, NULL, 0x100);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
if (npc->count1 == 0)
{
@ -1180,7 +1180,7 @@ void ActNpc036(NPCHAR *npc)
if (npc->ani_no > 5)
{
npc->ani_no = 4;
PlaySoundObject(47, 1);
PlaySoundObject(47, SOUND_MODE_PLAY);
}
if (++npc->act_wait > 100)
@ -1212,8 +1212,8 @@ void ActNpc036(NPCHAR *npc)
npc->act_no = 7;
npc->act_wait = 0;
npc->ani_no = 2;
PlaySoundObject(26, 1);
PlaySoundObject(25, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
PlaySoundObject(25, SOUND_MODE_PLAY);
SetQuake(30);
npc->damage = 0;

View file

@ -207,7 +207,7 @@ void ActNpc042(NPCHAR *npc)
break;
case 6:
PlaySoundObject(50, 1);
PlaySoundObject(50, SOUND_MODE_PLAY);
npc->act_wait = 0;
npc->act_no = 7;
npc->ani_no = 7;
@ -219,7 +219,7 @@ void ActNpc042(NPCHAR *npc)
break;
case 8:
PlaySoundObject(50, 1);
PlaySoundObject(50, SOUND_MODE_PLAY);
npc->act_wait = 0;
npc->act_no = 9;
npc->ani_no = 7;
@ -572,7 +572,7 @@ void ActNpc044(NPCHAR *npc)
SetNpChar(45, npc->x, npc->y, 0, 0, 0, NULL, 0x100);
SetDestroyNpChar(npc->x, npc->y, npc->view.back, 8);
PlaySoundObject(25, 1);
PlaySoundObject(25, SOUND_MODE_PLAY);
npc->cond = 0;
}
@ -720,7 +720,7 @@ void ActNpc047(NPCHAR *npc)
{
npc->act_no = 2;
npc->act_wait = 0;
PlaySoundObject(102, 1);
PlaySoundObject(102, SOUND_MODE_PLAY);
}
if (npc->x < gMC.x)
@ -965,7 +965,7 @@ void ActNpc049(NPCHAR *npc)
ym = GetSin(deg) * 2;
xm = GetCos(deg) * 2;
SetNpChar(50, npc->x, npc->y, xm, ym, 0, NULL, 0x100);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
}
if (npc->act_wait > 50)
@ -1424,7 +1424,7 @@ void ActNpc054(NPCHAR *npc)
{
VanishNpChar(npc);
SetDestroyNpChar(npc->x, npc->y, npc->view.back, 8);
PlaySoundObject(25, 1);
PlaySoundObject(25, SOUND_MODE_PLAY);
}
break;
@ -1923,7 +1923,7 @@ void ActNpc058(NPCHAR *npc)
ym = GetSin(deg) * 2;
xm = GetCos(deg) * 2;
SetNpChar(84, npc->x, npc->y, xm, ym, 0, NULL, 0x100);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
}
if (npc->count2 > 8)

View file

@ -153,7 +153,7 @@ void ActNpc060(NPCHAR *npc)
npc->act_no = 11;
npc->ani_no = 6;
npc->ym = -0x400;
PlaySoundObject(50, 1);
PlaySoundObject(50, SOUND_MODE_PLAY);
if (npc->direct == 0)
npc->xm = -0x100;
@ -358,7 +358,7 @@ void ActNpc061(NPCHAR *npc)
npc->ani_wait = 0;
npc->ym = -0x400;
npc->xm = 0x200;
PlaySoundObject(71, 1);
PlaySoundObject(71, SOUND_MODE_PLAY);
SetDestroyNpChar(npc->x, npc->y, 0x800, 4);
}
@ -368,7 +368,7 @@ void ActNpc061(NPCHAR *npc)
npc->act_no = 42;
npc->act_wait = 0;
npc->ani_no = 8;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough
case 42:
if (++npc->ani_no > 9)
@ -704,7 +704,7 @@ void ActNpc064(NPCHAR *npc)
// Jump
npc->ym = -0x5FF;
PlaySoundObject(30, 1);
PlaySoundObject(30, SOUND_MODE_PLAY);
// Jump in facing direction
if (npc->direct == 0)
@ -722,7 +722,7 @@ void ActNpc064(NPCHAR *npc)
npc->act_wait = 0;
npc->ani_no = 0;
npc->act_no = 1;
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
}
break;
}
@ -864,7 +864,7 @@ void ActNpc066(NPCHAR *npc)
npc->act_no = 2;
npc->ani_no = 2;
gNPC[npc->count1].cond = 0;
PlaySoundObject(21, 1);
PlaySoundObject(21, SOUND_MODE_PLAY);
}
break;
@ -909,7 +909,7 @@ void ActNpc067(NPCHAR *npc)
npc->tgt_x = npc->x;
npc->tgt_y = npc->y;
npc->ani_no = 0;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough
case 1:
npc->x = npc->tgt_x + (Random(-1, 1) * 0x200);
@ -948,7 +948,7 @@ void ActNpc067(NPCHAR *npc)
if (npc->flag & 8)
{
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
npc->ym = 0;
npc->act_no = 14;
npc->bits |= NPC_IGNORE_SOLIDITY;
@ -965,7 +965,7 @@ void ActNpc067(NPCHAR *npc)
case 16:
if (++npc->act_wait == 30)
{
PlaySoundObject(21, 1);
PlaySoundObject(21, SOUND_MODE_PLAY);
SetNpChar(66, npc->x, npc->y - (16 * 0x200), 0, 0, 0, npc, 0);
}
@ -1000,7 +1000,7 @@ void ActNpc067(NPCHAR *npc)
if (++npc->act_wait == 30)
{
PlaySoundObject(101, 1);
PlaySoundObject(101, SOUND_MODE_PLAY);
SetFlash(0, 0, 2);
npc->act_no = 27;
npc->ani_no = 7;
@ -1117,7 +1117,7 @@ void ActNpc068(NPCHAR *npc)
npc->ani_wait = 0;
if (++npc->ani_no == 2 || npc->ani_no == 4)
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
}
if (npc->ani_no > 4)
@ -1162,7 +1162,7 @@ void ActNpc068(NPCHAR *npc)
npc->act_no = 9;
npc->ani_no = 8;
SetQuake(30);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
}
if (npc->act_wait >= 8 && npc->x - (12 * 0x200) < gMC.x && npc->x + (12 * 0x200) > gMC.x && npc->y - (12 * 0x200) < gMC.y && npc->y + (8 * 0x200) > gMC.y)
@ -1220,7 +1220,7 @@ void ActNpc068(NPCHAR *npc)
break;
case 20:
PlaySoundObject(25, 1);
PlaySoundObject(25, SOUND_MODE_PLAY);
gMC.cond &= ~2;
if (npc->direct == 0)

View file

@ -86,7 +86,7 @@ void ActNpc080(NPCHAR *npc)
npc->act_wait = 0;
npc->act_no = 3;
npc->bits |= NPC_SHOOTABLE;
PlaySoundObject(34, 1);
PlaySoundObject(34, SOUND_MODE_PLAY);
if (npc->direct == 0)
npc->xm = -0x400;
@ -114,7 +114,7 @@ void ActNpc080(NPCHAR *npc)
{
npc->act_wait = 0;
npc->act_no = 4;
PlaySoundObject(106, 1);
PlaySoundObject(106, SOUND_MODE_PLAY);
}
npc->ani_no = 4;
@ -353,7 +353,7 @@ void ActNpc082(NPCHAR *npc)
case 16:
if (++npc->act_wait == 30)
{
PlaySoundObject(21, 1);
PlaySoundObject(21, SOUND_MODE_PLAY);
SetNpChar(66, npc->x, npc->y - (16 * 0x200), 0, 0, 0, npc, 0);
}
@ -388,7 +388,7 @@ void ActNpc082(NPCHAR *npc)
if (++npc->act_wait == 30)
{
PlaySoundObject(101, 1);
PlaySoundObject(101, SOUND_MODE_PLAY);
SetFlash(0, 0, 2);
npc->act_no = 27;
npc->ani_no = 7;
@ -442,7 +442,7 @@ void ActNpc082(NPCHAR *npc)
case 40:
case 50:
SetNpChar(11, npc->x + (8 * 0x200), npc->y - (8 * 0x200), 0x600, Random(-0x200, 0), 0, NULL, 0x100);
PlaySoundObject(33, 1);
PlaySoundObject(33, SOUND_MODE_PLAY);
break;
}
@ -600,7 +600,7 @@ void ActNpc083(NPCHAR *npc)
npc->act_wait = 0;
npc->act_no = 6;
npc->ani_no = 7;
PlaySoundObject(70, 1);
PlaySoundObject(70, SOUND_MODE_PLAY);
}
break;
@ -691,7 +691,7 @@ void ActNpc085(NPCHAR *npc)
if (npc->x - (8 * 0x200) < gMC.x && npc->x + (8 * 0x200) > gMC.x && npc->y - (16 * 0x200) < gMC.y && npc->y + (8 * 0x200) > gMC.y)
{
PlaySoundObject(43, 1);
PlaySoundObject(43, SOUND_MODE_PLAY);
npc->act_no = 1;
}
@ -1022,7 +1022,7 @@ void ActNpc088(NPCHAR *npc)
npc->act_wait = 0;
npc->act_no = 6;
npc->ani_no = 7;
PlaySoundObject(70, 1);
PlaySoundObject(70, SOUND_MODE_PLAY);
npc->damage = 5;
npc->hit.front = 24 * 0x200;
npc->hit.top = 1;
@ -1047,7 +1047,7 @@ void ActNpc088(NPCHAR *npc)
{
npc->act_no = 8;
npc->ani_no = 9;
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
SetQuake(30);
npc->damage = 0;
@ -1092,7 +1092,7 @@ void ActNpc088(NPCHAR *npc)
xm = GetCos(deg) * 3;
SetNpChar(11, npc->x, npc->y + (4 * 0x200), xm, ym, 0, NULL, 0x100);
PlaySoundObject(12, 1);
PlaySoundObject(12, SOUND_MODE_PLAY);
}
if (npc->act_wait > 50 && npc->act_wait / 2 % 2)
@ -1145,7 +1145,7 @@ void ActNpc089(NPCHAR *npc)
switch (npc->act_no)
{
case 0:
PlaySoundObject(72, 1);
PlaySoundObject(72, SOUND_MODE_PLAY);
if (npc->x > gMC.x)
npc->direct = 0;

View file

@ -132,7 +132,7 @@ void ActNpc103(NPCHAR *npc)
npc->cond = 0;
if (npc->count1 % 4 == 1)
PlaySoundObject(46, 1);
PlaySoundObject(46, SOUND_MODE_PLAY);
}
// Frog
@ -279,7 +279,7 @@ void ActNpc104(NPCHAR *npc)
npc->ym = -0x5FF;
if (!(gMC.cond & 2))
PlaySoundObject(30, 1);
PlaySoundObject(30, SOUND_MODE_PLAY);
if (npc->direct == 0)
npc->xm = -0x200;
@ -356,7 +356,7 @@ void ActNpc107(NPCHAR *npc)
case 11:
if (++npc->ani_wait > 1)
{
PlaySoundObject(43, 1);
PlaySoundObject(43, SOUND_MODE_PLAY);
npc->ani_wait = 0;
++npc->ani_no;
}
@ -388,7 +388,7 @@ void ActNpc107(NPCHAR *npc)
if (npc->act_wait / 2 % 2)
{
npc->x += 1 * 0x200;
PlaySoundObject(11, 1);
PlaySoundObject(11, SOUND_MODE_PLAY);
}
else
{
@ -404,7 +404,7 @@ void ActNpc107(NPCHAR *npc)
npc->act_no = 17;
npc->act_wait = 0;
npc->ani_no = 2;
PlaySoundObject(12, 1);
PlaySoundObject(12, SOUND_MODE_PLAY);
for (i = 0; i < 8; ++i)
SetNpChar(4, npc->x, npc->y, Random(-341, 341), Random(-0x600, 0), 0, NULL, 0x100);
@ -431,14 +431,14 @@ void ActNpc107(NPCHAR *npc)
if (npc->ani_no > 4)
{
PlaySoundObject(11, 1);
PlaySoundObject(11, SOUND_MODE_PLAY);
npc->ani_no = 3;
}
if (++npc->act_wait > 100)
{
npc->act_no = 20;
PlaySoundObject(12, 1);
PlaySoundObject(12, SOUND_MODE_PLAY);
for (i = 0; i < 4; ++i)
SetNpChar(4, npc->x, npc->y, Random(-341, 341), Random(-0x600, 0), 0, NULL, 0x100);
@ -453,7 +453,7 @@ void ActNpc107(NPCHAR *npc)
case 21:
npc->act_no = 22;
npc->ani_no = 5;
PlaySoundObject(51, 1);
PlaySoundObject(51, SOUND_MODE_PLAY);
break;
case 100:
@ -584,7 +584,7 @@ void ActNpc109(NPCHAR *npc)
case 10:
npc->act_no = 0;
PlaySoundObject(12, 1);
PlaySoundObject(12, SOUND_MODE_PLAY);
for (i = 0; i < 8; ++i)
SetNpChar(4, npc->x, npc->y, Random(-341, 341), Random(-0x600, 0), 0, NULL, 0x100);
@ -747,7 +747,7 @@ void ActNpc110(NPCHAR *npc)
npc->act_no = 10;
npc->ani_no = 2;
npc->ym = -0x2FF;
PlaySoundObject(6, 1);
PlaySoundObject(6, SOUND_MODE_PLAY);
if (npc->direct == 0)
npc->xm = -0x100;
@ -818,7 +818,7 @@ void ActNpc111(NPCHAR *npc)
{
npc->act_no = 4;
npc->act_wait = 64;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
}
break;
@ -878,7 +878,7 @@ void ActNpc112(NPCHAR *npc)
npc->ani_wait = 0;
npc->x += 16 * 0x200;
npc->y += 8 * 0x200;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough
case 1:
if (++npc->act_wait == 64)
@ -1016,7 +1016,7 @@ void ActNpc113(NPCHAR *npc)
npc->hit.bottom = 16 * 0x200;
npc->x -= 16 * 0x200;
npc->y += 8 * 0x200;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough
case 31:
if (++npc->act_wait == 64)
@ -1124,7 +1124,7 @@ void ActNpc114(NPCHAR *npc)
for (i = 0; i < 4; ++i)
SetNpChar(4, npc->x, npc->y, Random(-341, 341), Random(-0x600, 0), 0, NULL, 0x100);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
SetQuake(10);
}
@ -1232,13 +1232,13 @@ void ActNpc115(NPCHAR *npc)
npc->ym = -0x400;
npc->xm *= 2;
npc->damage = 5;
PlaySoundObject(102, 1);
PlaySoundObject(102, SOUND_MODE_PLAY);
}
else
{
npc->act_no = 21;
npc->ym = -0x400;
PlaySoundObject(30, 1);
PlaySoundObject(30, SOUND_MODE_PLAY);
}
}
@ -1247,7 +1247,7 @@ void ActNpc115(NPCHAR *npc)
case 21:
if (npc->flag & 8)
{
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
npc->act_no = 20;
npc->ani_no = 1;
npc->ani_wait = 0;
@ -1274,12 +1274,12 @@ void ActNpc115(NPCHAR *npc)
npc->damage = 0;
npc->ym = -0x200;
npc->bits &= ~(NPC_SOLID_SOFT | NPC_SHOOTABLE);
PlaySoundObject(51, 1);
PlaySoundObject(51, SOUND_MODE_PLAY);
// Fallthrough
case 51:
if (npc->flag & 8)
{
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
npc->act_no = 52;
npc->ani_no = 5;
npc->xm = 0;
@ -1617,7 +1617,7 @@ void ActNpc118(NPCHAR *npc)
npc->bits |= NPC_SHOOTABLE;
npc->act_no = 20;
npc->act_wait = 0;
PlaySoundObject(103, 1);
PlaySoundObject(103, SOUND_MODE_PLAY);
}
break;

View file

@ -286,7 +286,7 @@ void ActNpc123(NPCHAR *npc)
case 0:
npc->act_no = 1;
SetCaret(npc->x, npc->y, 3, 0);
PlaySoundObject(32, 1);
PlaySoundObject(32, SOUND_MODE_PLAY);
switch (npc->direct)
{
@ -346,7 +346,7 @@ void ActNpc123(NPCHAR *npc)
if (bBreak)
{
SetCaret(npc->x, npc->y, 2, 2);
PlaySoundObject(28, 1);
PlaySoundObject(28, SOUND_MODE_PLAY);
npc->cond = 0;
}
@ -399,7 +399,7 @@ void ActNpc124(NPCHAR *npc)
break;
}
if (++npc->act_wait % 8 == 0)
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
SetQuake(20);
break;
@ -414,7 +414,7 @@ void ActNpc125(NPCHAR *npc)
if (npc->life < 990)
{
SetDestroyNpChar(npc->x, npc->y, npc->view.back, 8);
PlaySoundObject(70, 1);
PlaySoundObject(70, SOUND_MODE_PLAY);
if (npc->direct == 0)
SetNpChar(87, npc->x, npc->y, 0, 0, 2, NULL, 0);
@ -684,29 +684,29 @@ void ActNpc128(NPCHAR *npc)
void ActNpc129(NPCHAR *npc)
{
RECT rect[18] = {
{0x80, 0x30, 0x90, 0x40},
{0x90, 0x30, 0xA0, 0x40},
{0xA0, 0x30, 0xB0, 0x40},
{128, 48, 144, 64},
{144, 48, 160, 64},
{160, 48, 176, 64},
{0x80, 0x40, 0x90, 0x50},
{0x90, 0x40, 0xA0, 0x50},
{0xA0, 0x40, 0xB0, 0x50},
{128, 64, 144, 80},
{144, 64, 160, 80},
{160, 64, 176, 80},
{0x80, 0x50, 0x90, 0x60},
{0x90, 0x50, 0xA0, 0x60},
{0xA0, 0x50, 0xB0, 0x60},
{128, 80, 144, 96},
{144, 80, 160, 96},
{160, 80, 176, 96},
{0xB0, 0x30, 0xC0, 0x40},
{0xC0, 0x30, 0xD0, 0x40},
{0xD0, 0x30, 0xE0, 0x40},
{176, 48, 192, 64},
{192, 48, 208, 64},
{208, 48, 224, 64},
{0xB0, 0x40, 0xC0, 0x50},
{0xC0, 0x40, 0xD0, 0x50},
{0xD0, 0x40, 0xE0, 0x50},
{176, 64, 192, 80},
{192, 64, 208, 80},
{208, 64, 224, 80},
{0xB0, 0x50, 0xC0, 0x60},
{0xC0, 0x50, 0xD0, 0x60},
{0xD0, 0x50, 0xE0, 0x60},
{176, 80, 192, 96},
{192, 80, 208, 96},
{208, 80, 224, 96},
};
if (++npc->ani_wait > 1)
@ -882,7 +882,7 @@ void ActNpc132(NPCHAR *npc)
npc->ani_no = 2;
if (npc->ani_no == 4 && npc->ani_wait == 0)
PlaySoundObject(105, 1);
PlaySoundObject(105, SOUND_MODE_PLAY);
}
else
{
@ -951,7 +951,7 @@ void ActNpc132(NPCHAR *npc)
}
if (npc->ani_no == 4 && npc->ani_wait == 0)
PlaySoundObject(105, 1);
PlaySoundObject(105, SOUND_MODE_PLAY);
break;
@ -1182,7 +1182,7 @@ void ActNpc135(NPCHAR *npc)
ym = GetSin(deg) * 2;
xm = GetCos(deg) * 2;
SetNpChar(50, npc->x, npc->y, xm, ym, 0, NULL, 0x180);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
}
if (npc->flag & 8)
@ -1324,7 +1324,7 @@ void ActNpc138(NPCHAR *npc)
// Fallthrough
case 11:
if (++npc->act_wait % 8 == 0)
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
if (npc->direct == 0)
{
@ -1428,7 +1428,7 @@ void ActNpc139(NPCHAR *npc)
npc->xm = 0;
npc->ym = 0;
npc->act_wait = (npc->rect.bottom - npc->rect.top) * 2;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough
case 31:
--npc->act_wait;
@ -1444,7 +1444,7 @@ void ActNpc139(NPCHAR *npc)
npc->act_wait = 0;
npc->xm = 0;
npc->ym = 0;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough
case 41:
npc->ani_no = 2;

View file

@ -196,7 +196,7 @@ void ActNpc140(NPCHAR *npc)
npc->act_no = 26;
npc->act_wait = 0;
npc->ani_no = 2;
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
SetQuake(20);
}
@ -260,7 +260,7 @@ void ActNpc140(NPCHAR *npc)
npc->act_no = 102;
npc->act_wait = 0;
npc->ani_no = 2;
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
SetQuake(20);
}
@ -327,7 +327,7 @@ void ActNpc140(NPCHAR *npc)
npc->act_no = 141;
npc->act_wait = 0;
npc->ani_no = 12;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough
case 141:
if (++npc->ani_no > 13)
@ -403,7 +403,7 @@ void ActNpc141(NPCHAR *npc)
npc->ym = GetSin(deg) * 4;
npc->xm = GetCos(deg) * 4;
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
}
break;
@ -414,7 +414,7 @@ void ActNpc141(NPCHAR *npc)
npc->act_no = 20;
npc->act_wait = 0;
SetCaret(npc->x, npc->y, 2, 0);
PlaySoundObject(12, 1);
PlaySoundObject(12, SOUND_MODE_PLAY);
for (i = 0; i < 4; ++i)
SetNpChar(4, npc->x, npc->y, Random(-0x200, 0x200), Random(-0x200, 0x200), 0, NULL, 0x100);
@ -514,7 +514,7 @@ void ActNpc142(NPCHAR *npc)
npc->act_no = 21;
npc->act_wait = 0;
npc->xm = 0;
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
}
break;
@ -585,7 +585,7 @@ void ActNpc144(NPCHAR *npc)
npc->ani_no = 0;
npc->ani_wait = 0;
npc->tgt_x = npc->x;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough
case 1:
if (++npc->act_wait == 64)
@ -611,7 +611,7 @@ void ActNpc144(NPCHAR *npc)
npc->act_no = 4;
npc->act_wait = 0;
npc->ani_no = 4;
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
}
break;
@ -734,7 +734,7 @@ void ActNpc146(NPCHAR *npc)
if (++npc->act_wait > 10)
{
npc->act_no = 2;
PlaySoundObject(101, 1);
PlaySoundObject(101, SOUND_MODE_PLAY);
}
break;
@ -834,7 +834,7 @@ void ActNpc147(NPCHAR *npc)
npc->act_no = 3;
npc->ani_no = 2;
npc->ym = -0x5FF;
PlaySoundObject(30, 1);
PlaySoundObject(30, SOUND_MODE_PLAY);
if (npc->x > gMC.x)
npc->direct = 0;
@ -873,7 +873,7 @@ void ActNpc147(NPCHAR *npc)
}
if (npc->act_wait % 4 == 1)
PlaySoundObject(109, 1);
PlaySoundObject(109, SOUND_MODE_PLAY);
if (npc->flag & 8)
npc->ym = -0x200;
@ -886,7 +886,7 @@ void ActNpc147(NPCHAR *npc)
xm = GetCos(deg) * 3;
SetNpChar(148, npc->x, npc->y, xm, ym, 0, NULL, 0x100);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
}
if (++npc->ani_wait > 0)
@ -908,7 +908,7 @@ void ActNpc147(NPCHAR *npc)
npc->act_wait = 0;
npc->ani_no = 0;
npc->act_no = 1;
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
}
break;
@ -1012,7 +1012,7 @@ void ActNpc149(NPCHAR *npc)
case 11:
if (++npc->act_wait % 10 == 6)
PlaySoundObject(107, 1);
PlaySoundObject(107, SOUND_MODE_PLAY);
if (npc->flag & 1)
{
@ -1020,7 +1020,7 @@ void ActNpc149(NPCHAR *npc)
npc->direct = 2;
npc->act_no = 20;
SetQuake(10);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
for (i = 0; i < 4; ++i)
SetNpChar(4, npc->x - (16 * 0x200), npc->y + (Random(-12, 12) * 0x200), Random(-341, 341), Random(-0x600, 0), 0, NULL, 0x100);
@ -1057,7 +1057,7 @@ void ActNpc149(NPCHAR *npc)
case 21:
if (++npc->act_wait % 10 == 6)
PlaySoundObject(107, 1);
PlaySoundObject(107, SOUND_MODE_PLAY);
if (npc->flag & 4)
{
@ -1065,7 +1065,7 @@ void ActNpc149(NPCHAR *npc)
npc->direct = 0;
npc->act_no = 10;
SetQuake(10);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
for (i = 0; i < 4; ++i)
SetNpChar(4, npc->x + (16 * 0x200), npc->y + (Random(-12, 12) * 0x200), Random(-341, 341), Random(-0x600, 0), 0, NULL, 0x100);
@ -1153,7 +1153,7 @@ void ActNpc150(NPCHAR *npc)
for (i = 0; i < 4; ++i)
SetNpChar(4, npc->x, npc->y, Random(-0x155, 0x155), Random(-0x600, 0), 0, NULL, 0x100);
PlaySoundObject(71, 1);
PlaySoundObject(71, SOUND_MODE_PLAY);
// Fallthrough
case 11:
npc->ani_no = 2;
@ -1162,7 +1162,7 @@ void ActNpc150(NPCHAR *npc)
case 20:
npc->act_no = 21;
npc->act_wait = 64;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough
case 21:
if (--npc->act_wait == 0)
@ -1482,7 +1482,7 @@ void ActNpc153(NPCHAR *npc)
npc->act_no = 20;
if (!(gMC.cond & 2))
PlaySoundObject(30, 1);
PlaySoundObject(30, SOUND_MODE_PLAY);
}
else if (npc->direct == 2 && npc->flag & 4)
{
@ -1491,7 +1491,7 @@ void ActNpc153(NPCHAR *npc)
npc->act_no = 20;
if (!(gMC.cond & 2))
PlaySoundObject(30, 1);
PlaySoundObject(30, SOUND_MODE_PLAY);
}
break;
@ -1525,7 +1525,7 @@ void ActNpc153(NPCHAR *npc)
npc->xm = 0;
if (!(gMC.cond & 2))
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
}
break;
@ -1577,7 +1577,7 @@ void ActNpc154(NPCHAR *npc)
else
npc->xm = -0x100;
PlaySoundObject(53, 1);
PlaySoundObject(53, SOUND_MODE_PLAY);
break;
case 1:
@ -1678,7 +1678,7 @@ void ActNpc155(NPCHAR *npc)
SetNpChar(156, npc->x, npc->y, xm, ym, 0, NULL, 0x100);
if (!(gMC.cond & 2))
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
npc->act_no = 1;
npc->act_wait = Random(70, 150);
@ -1795,7 +1795,7 @@ void ActNpc157(NPCHAR *npc)
case 11:
if (++npc->act_wait % 10 == 6)
PlaySoundObject(107, 1);
PlaySoundObject(107, SOUND_MODE_PLAY);
if (npc->flag & 2)
{
@ -1803,7 +1803,7 @@ void ActNpc157(NPCHAR *npc)
npc->direct = 2;
npc->act_no = 20;
SetQuake(10);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
for (i = 0; i < 4; ++i)
SetNpChar(4, npc->x + (Random(-12, 12) * 0x200), npc->y - (16 * 0x200), Random(-341, 341), Random(-0x600, 0), 0, NULL, 0x100);
@ -1840,7 +1840,7 @@ void ActNpc157(NPCHAR *npc)
case 21:
if (++npc->act_wait % 10 == 6)
PlaySoundObject(107, 1);
PlaySoundObject(107, SOUND_MODE_PLAY);
if (npc->flag & 8)
{
@ -1848,7 +1848,7 @@ void ActNpc157(NPCHAR *npc)
npc->direct = 0;
npc->act_no = 10;
SetQuake(10);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
for (i = 0; i < 4; ++i)
SetNpChar(4, npc->x + (Random(-12, 12) * 0x200), npc->y + (16 * 0x200), Random(-341, 341), Random(-0x600, 0), 0, NULL, 0x100);

View file

@ -59,8 +59,8 @@ void ActNpc160(NPCHAR *npc)
npc->act_no = 3;
npc->act_wait = 0;
SetQuake(30);
PlaySoundObject(26, 1);
PlaySoundObject(72, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
PlaySoundObject(72, SOUND_MODE_PLAY);
}
if (npc->y < gMC.y && gMC.flag & 8)
@ -246,7 +246,7 @@ void ActNpc162(NPCHAR *npc)
{
case 0:
DeleteNpCharCode(161, TRUE);
PlaySoundObject(72, 1);
PlaySoundObject(72, SOUND_MODE_PLAY);
for (i = 0; i < 10; ++i)
SetNpChar(4, npc->x + (Random(-12, 12) * 0x200), npc->y + (Random(-12, 12) * 0x200), Random(-0x600, 0x600), Random(-0x600, 0x600), 0, NULL, 0x100);
@ -307,7 +307,7 @@ void ActNpc162(NPCHAR *npc)
SetNpChar(161, npc->x + (Random(-12, 12) * 0x200), npc->y - (12 * 0x200), Random(-0x200, 0x200), 0x100, 0, NULL, 0x100);
if (npc->count1 % 4 == 2)
PlaySoundObject(21, 1);
PlaySoundObject(21, SOUND_MODE_PLAY);
break;
@ -519,7 +519,7 @@ void ActNpc167(NPCHAR *npc)
npc->act_no = 21;
npc->act_wait = 0;
npc->ani_no = 0;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough
case 21:
if (++npc->ani_no > 2)
@ -569,7 +569,7 @@ void ActNpc168(NPCHAR *npc)
npc->act_wait = 0;
npc->ym = -0x400;
npc->xm = 0x100;
PlaySoundObject(25, 1);
PlaySoundObject(25, SOUND_MODE_PLAY);
// Fallthrough
case 21:
npc->ym += 0x10;
@ -579,7 +579,7 @@ void ActNpc168(NPCHAR *npc)
if (npc->act_wait && npc->flag & 8)
{
PlaySoundObject(35, 1);
PlaySoundObject(35, SOUND_MODE_PLAY);
SetQuake(40);
npc->act_no = 0;
}
@ -631,7 +631,7 @@ void ActNpc169(NPCHAR *npc)
++npc->ani_no;
if (npc->ani_no == 2 || npc->ani_no == 4)
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
}
if (npc->ani_no > 4)
@ -700,7 +700,7 @@ void ActNpc169(NPCHAR *npc)
if (npc->act_wait < 30 && npc->act_wait % 6 == 1)
{
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
SetNpChar(170, npc->x, npc->y, 0, 0, npc->direct, NULL, 0x100);
}
@ -709,7 +709,7 @@ void ActNpc169(NPCHAR *npc)
npc->act_no = 9;
npc->ani_no = 8;
SetQuake(30);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
}
if (npc->act_wait >= 8 && npc->x - (12 * 0x200) < gMC.x && npc->x + (12 * 0x200) > gMC.x && npc->y - (12 * 0x200) < gMC.y && npc->y + (8 * 0x200) > gMC.y)
@ -769,7 +769,7 @@ void ActNpc169(NPCHAR *npc)
break;
case 20:
PlaySoundObject(25, 1);
PlaySoundObject(25, SOUND_MODE_PLAY);
gMC.cond &= ~2;
if (npc->direct == 0)
@ -870,7 +870,7 @@ void ActNpc170(NPCHAR *npc)
if (bHit)
{
PlaySoundObject(44, 1);
PlaySoundObject(44, SOUND_MODE_PLAY);
SetDestroyNpChar(npc->x, npc->y, 0, 3);
VanishNpChar(npc);
return;
@ -1121,7 +1121,7 @@ void ActNpc173(NPCHAR *npc)
{
if (++npc->count1 == 3)
{
PlaySoundObject(30, 1);
PlaySoundObject(30, SOUND_MODE_PLAY);
npc->count1 = 0;
npc->act_no = 25;
npc->act_wait = 0;
@ -1135,7 +1135,7 @@ void ActNpc173(NPCHAR *npc)
}
else
{
PlaySoundObject(30, 1);
PlaySoundObject(30, SOUND_MODE_PLAY);
npc->act_no = 20;
npc->ani_no = 2;
npc->ym = -0x200;
@ -1154,7 +1154,7 @@ void ActNpc173(NPCHAR *npc)
if (npc->flag & 8)
{
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
npc->ani_no = 1;
npc->act_no = 30;
npc->act_wait = 0;
@ -1172,7 +1172,7 @@ void ActNpc173(NPCHAR *npc)
SetNpChar(174, npc->x, npc->y, xm, ym, 0, NULL, 0x100);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
npc->ani_no = 3;
gCurlyShoot_wait = Random(80, 100);
@ -1185,7 +1185,7 @@ void ActNpc173(NPCHAR *npc)
if (npc->flag & 8)
{
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
npc->ani_no = 1;
npc->act_no = 30;
npc->act_wait = 0;
@ -1279,7 +1279,7 @@ void ActNpc174(NPCHAR *npc)
{
npc->act_no = 2;
++npc->count1;
PlaySoundObject(31, 1);
PlaySoundObject(31, SOUND_MODE_PLAY);
}
break;
@ -1445,7 +1445,7 @@ void ActNpc176(NPCHAR *npc)
else
SetNpChar(177, npc->x, npc->y + (8 * 0x200), 0, 0, 2, NULL, 0x100);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
npc->act_no = 0;
npc->ani_no = 0;

View file

@ -197,7 +197,7 @@ void ActNpc180(NPCHAR *npc)
npc->count1 = 0;
npc->ym = -0x600;
npc->ani_no = 1;
PlaySoundObject(15, 1);
PlaySoundObject(15, SOUND_MODE_PLAY);
if (npc->x > npc->tgt_x)
npc->act_no = 210;
@ -251,7 +251,7 @@ void ActNpc180(NPCHAR *npc)
npc->ym = -0x600;
npc->act_no += 10;
npc->ani_no = 1;
PlaySoundObject(15, 1);
PlaySoundObject(15, SOUND_MODE_PLAY);
}
}
else
@ -613,7 +613,7 @@ void ActNpc184(NPCHAR *npc)
}
if ((++npc->act_wait % 8) == 0)
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
SetQuake(20);
break;
@ -991,7 +991,7 @@ void ActNpc190(NPCHAR *npc)
break;
case 10:
PlaySoundObject(72, 1);
PlaySoundObject(72, SOUND_MODE_PLAY);
for (i = 0; i < 8; ++i)
SetNpChar(4, npc->x, npc->y + (Random(-8, 8) * 0x200), Random(-8, -2) * 0x200, Random(-3, 3) * 0x200, 0, NULL, 0x100);
@ -1144,7 +1144,7 @@ void ActNpc192(NPCHAR *npc)
npc->xm = -0x800;
npc->x = npc->tgt_x;
npc->y = npc->tgt_y;
PlaySoundObject(44, 1);
PlaySoundObject(44, SOUND_MODE_PLAY);
// Fallthrough
case 31:
npc->xm += 0x20;
@ -1181,7 +1181,7 @@ void ActNpc192(NPCHAR *npc)
if (npc->act_wait % 4 == 0 && npc->act_no >= 20)
{
PlaySoundObject(34, 1);
PlaySoundObject(34, SOUND_MODE_PLAY);
if (npc->direct == 0)
SetCaret(npc->x + (10 * 0x200), npc->y + (10 * 0x200), 7, 2);
@ -1375,7 +1375,7 @@ void ActNpc198(NPCHAR *npc)
npc->cond = 0;
if (npc->count1 % 4 == 1)
PlaySoundObject(46, 1);
PlaySoundObject(46, SOUND_MODE_PLAY);
}
// Water/wind particles

View file

@ -39,7 +39,7 @@ void ActNpc200(NPCHAR *npc)
if (npc->act_no < 100 && npc->life < 950)
{
PlaySoundObject(72, 1);
PlaySoundObject(72, SOUND_MODE_PLAY);
SetDestroyNpChar(npc->x, npc->y, npc->view.back, 8);
SetExpObjects(npc->x, npc->y, npc->exp);
npc->act_no = 100;
@ -117,7 +117,7 @@ void ActNpc200(NPCHAR *npc)
SetNpChar(202, npc->x + (14 * 0x200), npc->y, xm, ym, 0, NULL, 0x100);
if (!(gMC.cond & 2))
PlaySoundObject(33, 1);
PlaySoundObject(33, SOUND_MODE_PLAY);
}
if (npc->act_wait > 60)
@ -256,7 +256,7 @@ void ActNpc203(NPCHAR *npc)
npc->ym = -0x5FF;
if (!(gMC.cond & 2))
PlaySoundObject(30, 1);
PlaySoundObject(30, SOUND_MODE_PLAY);
if (npc->direct == 0)
npc->xm = -0x100;
@ -275,7 +275,7 @@ void ActNpc203(NPCHAR *npc)
npc->act_no = 1;
if (!(gMC.cond & 2))
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
}
break;
@ -334,7 +334,7 @@ void ActNpc204(NPCHAR *npc)
if (npc->flag & 0xFF)
{
if (!(gMC.cond & 2))
PlaySoundObject(12, 1);
PlaySoundObject(12, SOUND_MODE_PLAY);
SetDestroyNpChar(npc->x, npc->y, npc->view.back, 4);
npc->cond = 0;
@ -409,7 +409,7 @@ void ActNpc205(NPCHAR *npc)
npc->act_wait = 0;
npc->ym = 0;
npc->damage = 0;
PlaySoundObject(12, 1);
PlaySoundObject(12, SOUND_MODE_PLAY);
SetDestroyNpChar(npc->x, npc->y, npc->view.back, 4);
SetBullet(24, npc->x, npc->y, 0);
return;
@ -502,7 +502,7 @@ void ActNpc206(NPCHAR *npc)
npc->hit.top = 100 * 0x200;
npc->hit.bottom = 100 * 0x200;
npc->damage = 30;
PlaySoundObject(35, 1);
PlaySoundObject(35, SOUND_MODE_PLAY);
SetDestroyNpChar(npc->x, npc->y, 0x10000, 100);
SetQuake(20);
npc->cond |= 8;
@ -563,7 +563,7 @@ void ActNpc207(NPCHAR *npc)
case 0:
npc->act_no = 1;
npc->ani_no = npc->direct;
PlaySoundObject(43, 1);
PlaySoundObject(43, SOUND_MODE_PLAY);
// Fallthrough
case 1:
npc->x += 1 * 0x200;
@ -715,7 +715,7 @@ void ActNpc208(NPCHAR *npc)
ym = GetSin(deg) * 3;
xm = GetCos(deg) * 3;
SetNpChar(209, npc->x, npc->y, xm, ym, 0, NULL, 0x100);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
}
if (npc->count2 > 16)
@ -1100,7 +1100,7 @@ void ActNpc213(NPCHAR *npc)
if (++npc->act_wait % 5 == 1)
{
SetNpChar(214, npc->x, npc->y, (Random(2, 12) * 0x200) / 4, Random(-0x200, 0x200), 0, NULL, 0x100);
PlaySoundObject(21, 1);
PlaySoundObject(21, SOUND_MODE_PLAY);
}
if (npc->act_wait > 50)
@ -1212,7 +1212,7 @@ void ActNpc214(NPCHAR *npc)
if (npc->flag & 0xFF)
{
SetDestroyNpChar(npc->x, npc->y, npc->view.back, 4);
PlaySoundObject(28, 1);
PlaySoundObject(28, SOUND_MODE_PLAY);
npc->cond = 0;
}
@ -1249,7 +1249,7 @@ void ActNpc215(NPCHAR *npc)
case 15:
if (++npc->act_wait > 10)
{
PlaySoundObject(102, 1);
PlaySoundObject(102, SOUND_MODE_PLAY);
npc->act_no = 20;
}

View file

@ -608,7 +608,7 @@ void ActNpc231(NPCHAR *npc)
for (i = 0; i < 10; ++i)
{
SetNpChar(4, npc->x + (Random(-16, 16) * 0x200), npc->y + (Random(-8, 8) * 0x200), 0, 0, 0, NULL, 0x100);
PlaySoundObject(12, 1); // Wait, it does this in a loop?
PlaySoundObject(12, SOUND_MODE_PLAY); // Wait, it does this in a loop?
}
// Fallthrough
case 13:
@ -622,7 +622,7 @@ void ActNpc231(NPCHAR *npc)
SetCaret(npc->x + (10 * 0x200), npc->y + (8 * 0x200), 7, 3);
if (npc->act_wait % 4 == 1)
PlaySoundObject(34, 1);
PlaySoundObject(34, SOUND_MODE_PLAY);
if (npc->flag & 2 || gMC.flag & 2 || npc->act_wait > 450)
{
@ -634,7 +634,7 @@ void ActNpc231(NPCHAR *npc)
for (i = 0; i < 6; ++i)
{
SetNpChar(4, npc->x + (Random(-16, 16) * 0x200), npc->y + (Random(-8, 8) * 0x200), 0, 0, 0, NULL, 0x100);
PlaySoundObject(12, 1);
PlaySoundObject(12, SOUND_MODE_PLAY); // Here it does it again...
}
}
@ -653,7 +653,7 @@ void ActNpc231(NPCHAR *npc)
SetCaret(npc->x + (10 * 0x200), npc->y + (8 * 0x200), 7, 3);
if (npc->act_wait % 16 == 1)
PlaySoundObject(34, 1);
PlaySoundObject(34, SOUND_MODE_PLAY);
}
if (npc->flag & 8)
@ -1088,7 +1088,7 @@ void ActNpc236(NPCHAR *npc)
if (npc->act_wait % 10 == 3)
{
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
if (npc->direct == 0)
SetNpChar(237, npc->x - (8 * 0x200), npc->y - (8 * 0x200), -0x400, -0x400, 0, NULL, 0x100);
@ -1155,7 +1155,7 @@ void ActNpc237(NPCHAR *npc)
for (i = 0; i < 5; ++i)
SetCaret(npc->x, npc->y, 1, 0);
PlaySoundObject(21, 1);
PlaySoundObject(21, SOUND_MODE_PLAY);
npc->cond = 0;
return;
}
@ -1226,7 +1226,7 @@ void ActNpc238(NPCHAR *npc)
for (i = 0; i < 4; ++i)
{
SetNpChar(4, npc->x + (Random(-16, 16) * 0x200), npc->y + (Random(-8, 8) * 0x200), 0, 0, 0, NULL, 0x100);
PlaySoundObject(12, 1);
PlaySoundObject(12, SOUND_MODE_PLAY);
}
}

View file

@ -179,7 +179,7 @@ void ActNpc241(NPCHAR *npc)
npc->act_no = 3;
npc->ani_no = 2;
npc->ym = -0x5FF;
PlaySoundObject(30, 1);
PlaySoundObject(30, SOUND_MODE_PLAY);
if (npc->direct == 0)
npc->xm = -0x200;
@ -196,7 +196,7 @@ void ActNpc241(NPCHAR *npc)
npc->act_wait = 0;
npc->ani_no = 0;
npc->act_no = 1;
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
}
break;
@ -341,7 +341,7 @@ void ActNpc244(NPCHAR *npc)
SetCaret(npc->x, npc->y + (4 * 0x200), 1, 2);
if (npc->x > gMC.x - (256 * 0x200) && npc->x < gMC.x + (256 * 0x200) && npc->y > gMC.y - (160 * 0x200) && npc->y < gMC.y + (160 * 0x200))
PlaySoundObject(21, 1);
PlaySoundObject(21, SOUND_MODE_PLAY);
npc->cond = 0;
}
@ -478,7 +478,7 @@ void ActNpc246(NPCHAR *npc)
for (i = 0; i < 4; ++i)
SetNpChar(4, npc->x, npc->y, Random(-341, 341), Random(-0x600, 0), 0, NULL, 0x100);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
SetQuake(10);
}
@ -659,7 +659,7 @@ void ActNpc247(NPCHAR *npc)
xm = GetCos(deg) * 4;
SetNpChar(248, npc->x, npc->y + (4 * 0x200), xm, ym, 0, NULL, 0x100);
PlaySoundObject(34, 1);
PlaySoundObject(34, SOUND_MODE_PLAY);
}
if (npc->act_wait > 30)
@ -696,7 +696,7 @@ void ActNpc247(NPCHAR *npc)
npc->tgt_x = Random(9, 31) * 0x200 * 0x10;
npc->tgt_y = Random(5, 7) * 0x200 * 0x10;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough
case 151:
if (++npc->act_wait == 42)
@ -757,7 +757,7 @@ void ActNpc247(NPCHAR *npc)
if (++npc->act_wait % 24 == 0)
{
SetNpChar(250, npc->x, npc->y + (4 * 0x200), 0, 0, 0, NULL, 0x100);
PlaySoundObject(34, 1);
PlaySoundObject(34, SOUND_MODE_PLAY);
}
if (npc->act_wait > 72)
@ -946,7 +946,7 @@ void ActNpc250(NPCHAR *npc)
if (++npc->act_wait > 10)
{
SetNpChar(251, npc->x, npc->y, 0, 0, 0, NULL, 0x100);
PlaySoundObject(101, 1);
PlaySoundObject(101, SOUND_MODE_PLAY);
npc->cond = 0;
return;
}
@ -1111,7 +1111,7 @@ void ActNpc253(NPCHAR *npc)
{
SetExpObjects(npc->x, npc->y, npc->code_flag);
SetDestroyNpChar(npc->x, npc->y, npc->view.back, 8);
PlaySoundObject(25, 1);
PlaySoundObject(25, SOUND_MODE_PLAY);
npc->cond = 0;
}

View file

@ -268,7 +268,7 @@ void ActNpc263(NPCHAR *npc)
if (npc->act_wait == 80)
{
npc->ani_no = 5;
PlaySoundObject(25, 1);
PlaySoundObject(25, SOUND_MODE_PLAY);
if (npc->direct == 0)
{
@ -314,7 +314,7 @@ void ActNpc263(NPCHAR *npc)
npc->act_no = 32;
npc->act_wait = 0;
npc->ani_no = 7;
PlaySoundObject(101, 1);
PlaySoundObject(101, SOUND_MODE_PLAY);
for (deg = 8; deg < 0x100; deg += 0x10)
{
@ -337,7 +337,7 @@ void ActNpc263(NPCHAR *npc)
npc->bits &= ~NPC_SHOOTABLE;
npc->damage = 0;
npc->act_wait = 0;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough
case 101:
npc->act_wait += 2;
@ -684,7 +684,7 @@ void ActNpc267(NPCHAR *npc)
npc->ani_no = 6;
DamageMyChar(5);
SetQuake(10);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
gMC.ym = -0x400;
if (npc->x > gMC.x)
@ -797,7 +797,7 @@ void ActNpc267(NPCHAR *npc)
npc->act_no = 18;
npc->act_wait = 0;
SetQuake(10);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
// Fallthrough
case 18:
npc->ani_no = 3;
@ -829,7 +829,7 @@ void ActNpc267(NPCHAR *npc)
else
SetNpChar(269, npc->x + 0x1000, npc->y - 0x800, xm, ym, 2, NULL, 0x100);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
}
if (npc->act_wait > 90)
@ -853,7 +853,7 @@ void ActNpc267(NPCHAR *npc)
npc->ani_no = 7;
npc->bits |= NPC_REAR_AND_TOP_DONT_HURT;
npc->damage = 10;
PlaySoundObject(25, 1);
PlaySoundObject(25, SOUND_MODE_PLAY);
if (npc->direct == 0)
npc->xm = -0x5FF;
@ -945,7 +945,7 @@ void ActNpc267(NPCHAR *npc)
npc->act_wait = 0;
npc->bits &= ~(NPC_INVULNERABLE | NPC_SHOOTABLE);
npc->damage = 0;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough
case 101:
npc->act_wait += 2;
@ -1045,7 +1045,7 @@ void ActNpc267(NPCHAR *npc)
SetQuake(2);
if (++npc->act_wait % 6 == 3)
PlaySoundObject(25, 1);
PlaySoundObject(25, SOUND_MODE_PLAY);
if (npc->act_wait / 2 % 2)
npc->x = npc->tgt_x;
@ -1250,7 +1250,7 @@ void ActNpc268(NPCHAR *npc)
else
npc->xm = 0x200;
PlaySoundObject(108, 1);
PlaySoundObject(108, SOUND_MODE_PLAY);
}
break;
@ -1263,7 +1263,7 @@ void ActNpc268(NPCHAR *npc)
npc->act_no = 40;
npc->act_wait = 0;
SetQuake(20);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
}
break;
@ -1298,7 +1298,7 @@ void ActNpc268(NPCHAR *npc)
ym = GetSin(deg) * 5;
xm = GetCos(deg) * 5;
SetNpChar(11, npc->x, npc->y + (4 * 0x200), xm, ym, 0, NULL, 0x100);
PlaySoundObject(12, 1);
PlaySoundObject(12, SOUND_MODE_PLAY);
}
if (npc->act_wait < 50 && npc->act_wait / 2 % 2)
@ -1594,7 +1594,7 @@ void ActNpc273(NPCHAR *npc)
}
if (++npc->act_wait % 5 == 0)
PlaySoundObject(110, 1);
PlaySoundObject(110, SOUND_MODE_PLAY);
if (++npc->ani_no > 2)
npc->ani_no = 0;
@ -1694,7 +1694,7 @@ void ActNpc274(NPCHAR *npc)
ym = GetSin(deg) * 4;
xm = GetCos(deg) * 4;
SetNpChar(273, npc->x, npc->y - (10 * 0x200), xm, ym, 0, NULL, 0x100);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
}
}
@ -1872,7 +1872,7 @@ void ActNpc276(NPCHAR *npc)
xm = GetCos(deg) * 4;
SetNpChar(277, npc->x, npc->y, xm, ym, 0, NULL, 0x100);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
break;
@ -1921,7 +1921,7 @@ void ActNpc276(NPCHAR *npc)
xm = GetCos(deg) * 4;
SetNpChar(277, npc->x, npc->y - (10 * 0x200), xm, ym, 0, NULL, 0x100);
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
break;
@ -1940,7 +1940,7 @@ void ActNpc276(NPCHAR *npc)
npc->act_wait = 0;
npc->ani_no = 2;
SetQuake(10);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
}
break;
@ -1964,7 +1964,7 @@ void ActNpc276(NPCHAR *npc)
SetQuake(10);
SetExpObjects(npc->x, npc->y, 19);
SetDestroyNpChar(npc->x, npc->y, npc->view.back, 8);
PlaySoundObject(72, 1);
PlaySoundObject(72, SOUND_MODE_PLAY);
}
break;
@ -2024,7 +2024,7 @@ void ActNpc277(NPCHAR *npc)
}
if (++npc->act_wait % 5 == 0)
PlaySoundObject(110, 1);
PlaySoundObject(110, SOUND_MODE_PLAY);
if (++npc->ani_no > 2)
npc->ani_no = 0;
@ -2224,7 +2224,7 @@ void ActNpc279(NPCHAR *npc)
npc->ym = -0x200;
npc->act_no = 110;
npc->bits |= NPC_IGNORE_SOLIDITY;
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
SetQuake(10);
for (i = 0; i < 4; ++i)

View file

@ -34,7 +34,7 @@ void ActNpc280(NPCHAR *npc)
npc->ani_wait = 0;
npc->x += 6 * 0x200;
npc->tgt_x = npc->x;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough
case 1:
if (++npc->act_wait == 64)
@ -53,7 +53,7 @@ void ActNpc280(NPCHAR *npc)
npc->act_no = 4;
npc->act_wait = 0;
npc->ani_no = 1;
PlaySoundObject(23, 1);
PlaySoundObject(23, SOUND_MODE_PLAY);
}
break;
@ -242,7 +242,7 @@ void ActNpc283(NPCHAR *npc)
case 0:
npc->act_no = 1;
npc->y -= 8 * 0x200;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough
case 1:
if (++npc->act_wait / 2 % 2)
@ -353,7 +353,7 @@ void ActNpc283(NPCHAR *npc)
else
npc->direct = 2;
PlaySoundObject(103, 1);
PlaySoundObject(103, SOUND_MODE_PLAY);
if (gMC.y < 160 * 0x200)
npc->count2 = 290;
@ -389,7 +389,7 @@ void ActNpc283(NPCHAR *npc)
if (y > (gMap.length - 2) * 0x200 * 0x10)
y = (gMap.length - 2) * 0x200 * 0x10;
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
SetNpChar(npc->count2, x, y, 0, 0, 0, NULL, 0x100);
}
@ -435,7 +435,7 @@ void ActNpc283(NPCHAR *npc)
else
npc->direct = 2;
PlaySoundObject(103, 1);
PlaySoundObject(103, SOUND_MODE_PLAY);
// Fallthrough
case 51:
if (++npc->act_wait / 2 % 2)
@ -496,7 +496,7 @@ void ActNpc283(NPCHAR *npc)
}
}
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
SetNpChar(301, x, y, 0, 0, direct, NULL, 0x100);
}
}
@ -551,7 +551,7 @@ void ActNpc283(NPCHAR *npc)
}
}
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
SetNpChar(301, x, y, 0, 0, direct, NULL, 0x100);
}
@ -659,7 +659,7 @@ void ActNpc284(NPCHAR *npc)
case 0:
npc->act_no = 1;
npc->y -= 4 * 0x200;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
npc->count2 = npc->life;
// Fallthrough
case 1:
@ -860,7 +860,7 @@ void ActNpc284(NPCHAR *npc)
npc->ani_no = 4;
if (npc->act_wait % 5 == 1)
PlaySoundObject(109, 1);
PlaySoundObject(109, SOUND_MODE_PLAY);
break;
@ -1118,7 +1118,7 @@ void ActNpc288(NPCHAR *npc)
break;
case 2:
PlaySoundObject(44, 1);
PlaySoundObject(44, SOUND_MODE_PLAY);
npc->act_no = 3;
npc->act_wait = 0;
npc->bits |= NPC_IGNORE_SOLIDITY;
@ -1220,7 +1220,7 @@ void ActNpc289(NPCHAR *npc)
else
npc->act_no = 10;
PlaySoundObject(30, 1);
PlaySoundObject(30, SOUND_MODE_PLAY);
npc->ym = -0x600;
if (npc->direct == 0)

View file

@ -704,7 +704,7 @@ void ActNpc310(NPCHAR *npc)
npc->xm /= 2;
npc->ani_no = 2;
npc->act_no = 30;
PlaySoundObject(30, 1);
PlaySoundObject(30, SOUND_MODE_PLAY);
}
break;
@ -1141,7 +1141,7 @@ void ActNpc313(NPCHAR *npc)
npc->ani_no = 3;
npc->xm = 2 * Random(-0x200, 0x200);
npc->ym = -0x800;
PlaySoundObject(30, 1);
PlaySoundObject(30, SOUND_MODE_PLAY);
++npc->count1;
}
@ -1209,7 +1209,7 @@ void ActNpc313(NPCHAR *npc)
else
npc->xm = 0x5FF;
PlaySoundObject(25, 1);
PlaySoundObject(25, SOUND_MODE_PLAY);
npc->bits &= ~NPC_SHOOTABLE;
npc->bits |= NPC_INVULNERABLE;
npc->damage = 10;
@ -1232,7 +1232,7 @@ void ActNpc313(NPCHAR *npc)
npc->act_no = 221;
npc->act_wait = 0;
SetQuake(16);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
npc->damage = 4;
// Fallthrough
case 221:
@ -1289,7 +1289,7 @@ void ActNpc313(NPCHAR *npc)
npc->act_no = 320;
npc->ani_no = 12;
npc->ym = -0x800;
PlaySoundObject(25, 1);
PlaySoundObject(25, SOUND_MODE_PLAY);
npc->bits |= NPC_IGNORE_SOLIDITY;
npc->bits &= ~NPC_SHOOTABLE;
npc->bits |= NPC_INVULNERABLE;
@ -1312,7 +1312,7 @@ void ActNpc313(NPCHAR *npc)
npc->act_no = 331;
npc->act_wait = 0;
SetQuake(16);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
// Fallthrough
case 331:
if (++npc->ani_no > 13)
@ -1411,7 +1411,7 @@ void ActNpc314(NPCHAR *npc)
npc->ym = -0x200;
npc->act_no = 110;
npc->bits |= NPC_IGNORE_SOLIDITY;
PlaySoundObject(12, 1);
PlaySoundObject(12, SOUND_MODE_PLAY);
SetQuake(10);
for (i = 0; i < 2; ++i)
@ -1513,7 +1513,7 @@ void ActNpc315(NPCHAR *npc)
npc->ani_no = 3;
npc->xm = 2 * Random(-0x200, 0x200);
npc->ym = -0x800;
PlaySoundObject(30, 1);
PlaySoundObject(30, SOUND_MODE_PLAY);
}
break;
@ -1626,7 +1626,7 @@ void ActNpc316(NPCHAR *npc)
else
npc->xm = -0x100;
PlaySoundObject(50, 1);
PlaySoundObject(50, SOUND_MODE_PLAY);
break;
@ -1734,7 +1734,7 @@ void ActNpc317(NPCHAR *npc)
npc->act_wait = 0;
npc->act_no = 12;
npc->ani_no = 3;
PlaySoundObject(39, 1);
PlaySoundObject(39, SOUND_MODE_PLAY);
}
break;
@ -1796,7 +1796,7 @@ void ActNpc318(NPCHAR *npc)
else
npc->xm = -0x40;
PlaySoundObject(54, 1);
PlaySoundObject(54, SOUND_MODE_PLAY);
break;
case 1:
@ -1895,7 +1895,7 @@ void ActNpc319(NPCHAR *npc)
if (npc->flag & 8)
{
PlaySoundObject(12, 1);
PlaySoundObject(12, SOUND_MODE_PLAY);
SetDestroyNpChar(npc->x, npc->y, 0, 3);
npc->cond = 0;
}

View file

@ -168,7 +168,7 @@ void ActNpc321(NPCHAR *npc)
{
SetBullet(43, npc->pNpc->x, npc->pNpc->y, direct);
SetCaret(npc->pNpc->x, npc->pNpc->y, 3, 0);
PlaySoundObject(117, 1);
PlaySoundObject(117, SOUND_MODE_PLAY);
}
if (gMC.direct == 0)
@ -192,7 +192,7 @@ void ActNpc322(NPCHAR *npc)
npc->act_wait = 0;
npc->bits &= ~NPC_SHOOTABLE;
npc->bits |= NPC_INVULNERABLE;
PlaySoundObject(22, 1);
PlaySoundObject(22, SOUND_MODE_PLAY);
}
switch (npc->act_no)
@ -247,7 +247,7 @@ void ActNpc322(NPCHAR *npc)
npc->hit.top = 48 * 0x200;
npc->hit.bottom = 48 * 0x200;
npc->damage = 12;
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
SetDestroyNpChar(npc->x, npc->y, 0x6000, 40);
SetQuake(10);
@ -404,7 +404,7 @@ void ActNpc325(NPCHAR *npc)
{
case 0:
npc->act_no = 1;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough
case 1:
if (++npc->ani_wait > 0)
@ -424,7 +424,7 @@ void ActNpc325(NPCHAR *npc)
npc->damage = 10;
npc->view.front = 8 * 0x200;
npc->view.top = 12 * 0x200;
PlaySoundObject(101, 1);
PlaySoundObject(101, SOUND_MODE_PLAY);
SetDestroyNpChar(npc->x, npc->y + (84 * 0x200), 0, 3);
}
@ -812,7 +812,7 @@ void ActNpc332(NPCHAR *npc)
switch (npc->act_no)
{
case 0:
PlaySoundObject(44, 1);
PlaySoundObject(44, SOUND_MODE_PLAY);
npc->act_no = 1;
if (npc->direct == 0)
@ -838,7 +838,7 @@ void ActNpc332(NPCHAR *npc)
SetNpChar(331, npc->x, npc->y, xm, -0x400, 0, 0, 0x100);
PlaySoundObject(12, 1);
PlaySoundObject(12, SOUND_MODE_PLAY);
}
break;
@ -868,7 +868,7 @@ void ActNpc333(NPCHAR *npc)
npc->act_no = 1;
npc->tgt_x = npc->x;
npc->tgt_y = npc->y;
PlaySoundObject(103, 1);
PlaySoundObject(103, SOUND_MODE_PLAY);
npc->y = gMC.y;
// Fallthrough
case 1:

View file

@ -152,7 +152,7 @@ void ActNpc340(NPCHAR *npc)
else
npc->direct = 2;
PlaySoundObject(25, 1);
PlaySoundObject(25, SOUND_MODE_PLAY);
// Fallthrough
case 211:
if (npc->direct == 0)
@ -171,7 +171,7 @@ void ActNpc340(NPCHAR *npc)
npc->act_wait = 0;
npc->damage = 3;
SetQuake2(10);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
}
if (npc->direct == 2 && npc->flag & 4)
@ -180,7 +180,7 @@ void ActNpc340(NPCHAR *npc)
npc->act_wait = 0;
npc->damage = 3;
SetQuake2(10);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
}
if (npc->count1 < 4 && gMC.x > npc->x - (16 * 0x200) && gMC.x < npc->x + (16 * 0x200))
@ -211,7 +211,7 @@ void ActNpc340(NPCHAR *npc)
npc->xm = 0;
npc->damage = 10;
npc->direct = 0;
PlaySoundObject(25, 1);
PlaySoundObject(25, SOUND_MODE_PLAY);
// Fallthrough
case 221:
npc->ym = -0x800;
@ -238,7 +238,7 @@ void ActNpc340(NPCHAR *npc)
SetNpChar(332, npc->x - (12 * 0x200), npc->y - (12 * 0x200), 0, 0, 0, NULL, 0x100);
SetNpChar(332, npc->x + (12 * 0x200), npc->y - (12 * 0x200), 0, 0, 2, NULL, 0x100);
SetQuake2(10);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
}
if (npc->count1 < 4 && gMC.y > npc->y - (16 * 0x200) && gMC.y < npc->y + (16 * 0x200))
@ -269,7 +269,7 @@ void ActNpc340(NPCHAR *npc)
npc->xm = 0;
npc->damage = 10;
npc->direct = 2;
PlaySoundObject(25, 1);
PlaySoundObject(25, SOUND_MODE_PLAY);
// Fallthrough
case 231:
npc->ym = 0x800;
@ -299,7 +299,7 @@ void ActNpc340(NPCHAR *npc)
SetNpChar(332, npc->x - (12 * 0x200), npc->y + (12 * 0x200), 0, 0, 0, NULL, 0x100);
SetNpChar(332, npc->x + (12 * 0x200), npc->y + (12 * 0x200), 0, 0, 2, NULL, 0x100);
SetQuake2(10);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
}
if (npc->count1 < 4 && gMC.y > npc->y - (16 * 0x200) && gMC.y < npc->y + (16 * 0x200))
@ -458,7 +458,7 @@ void ActNpc340(NPCHAR *npc)
npc->xm = 0;
npc->bits &= ~NPC_SHOOTABLE;
SetDestroyNpChar(npc->x, npc->y, 0x10, 0x10);
PlaySoundObject(72, 1);
PlaySoundObject(72, SOUND_MODE_PLAY);
// Fallthrough
case 1001:
npc->ym += 0x20;
@ -514,7 +514,7 @@ void ActNpc340(NPCHAR *npc)
npc->act_no = 1005;
npc->act_wait = 0;
SetFlash(0, 0, 2);
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
}
if (++npc->act_wait / 2 % 2)
@ -663,7 +663,7 @@ void ActNpc342(NPCHAR *npc)
npc->act_no = 22;
npc->bits &= ~NPC_SHOOTABLE;
SetDestroyNpChar(npc->x, npc->y, 0x2000, 0x20);
PlaySoundObject(71, 1);
PlaySoundObject(71, SOUND_MODE_PLAY);
}
npc->pNpc->count1 = 4;
@ -746,7 +746,7 @@ void ActNpc342(NPCHAR *npc)
npc->damage = 5;
npc->bits &= ~(NPC_IGNORE_SOLIDITY | NPC_SHOOTABLE);
SetDestroyNpChar(npc->x, npc->y, 0x2000, 0x20);
PlaySoundObject(71, 1);
PlaySoundObject(71, SOUND_MODE_PLAY);
// Fallthrough
case 41:
if (npc->flag & 1)
@ -766,7 +766,7 @@ void ActNpc342(NPCHAR *npc)
}
npc->ym = -0x800;
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
}
npc->ym += 0x20;
@ -796,7 +796,7 @@ void ActNpc342(NPCHAR *npc)
else
{
SetDestroyNpChar(npc->x, npc->y, 0x2000, 0x20);
PlaySoundObject(71, 1);
PlaySoundObject(71, SOUND_MODE_PLAY);
VanishNpChar(npc);
return;
}
@ -813,7 +813,7 @@ void ActNpc342(NPCHAR *npc)
{
SetNpChar(4, npc->x + (8 * 0x200), npc->y + 0x1800, 0, 0, 0, NULL, 0x100);
SetNpChar(4, npc->x - (8 * 0x200), npc->y + 0x1800, 0, 0, 0, NULL, 0x100);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
}
break;
@ -822,7 +822,7 @@ void ActNpc342(NPCHAR *npc)
{
SetNpChar(4, npc->x - (12 * 0x200), npc->y + (8 * 0x200), 0, 0, 0, NULL, 0x100);
SetNpChar(4, npc->x - (12 * 0x200), npc->y - (8 * 0x200), 0, 0, 0, NULL, 0x100);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
}
break;
@ -832,7 +832,7 @@ void ActNpc342(NPCHAR *npc)
SetNpChar(4, npc->x + (8 * 0x200), npc->y - (12 * 0x200), 0, 0, 0, NULL, 0x100);
SetNpChar(4, npc->x - (8 * 0x200), npc->y - (12 * 0x200), 0, 0, 0, NULL, 0x100);
SetNpChar(345, npc->x - (8 * 0x200), npc->y - (12 * 0x200), 0, 0, 0, NULL, 0x100);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
}
break;
@ -841,7 +841,7 @@ void ActNpc342(NPCHAR *npc)
{
SetNpChar(4, npc->x + (12 * 0x200), npc->y + (8 * 0x200), 0, 0, 0, NULL, 0x100);
SetNpChar(4, npc->x + (12 * 0x200), npc->y - (8 * 0x200), 0, 0, 0, NULL, 0x100);
PlaySoundObject(26, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
}
break;
}
@ -937,7 +937,7 @@ void ActNpc345(NPCHAR *npc)
npc->ym = -0x200;
npc->act_no = 110;
npc->bits |= NPC_IGNORE_SOLIDITY;
PlaySoundObject(12, 1);
PlaySoundObject(12, SOUND_MODE_PLAY);
SetQuake(10);
for (i = 0; i < 4; ++i)
@ -1135,7 +1135,7 @@ void ActNpc347(NPCHAR *npc)
{
npc->act_no = 12;
npc->xm = 0x700;
PlaySoundObject(6, 1);
PlaySoundObject(6, SOUND_MODE_PLAY);
npc->ani_no = 3;
}
@ -1746,8 +1746,8 @@ void ActNpc354(NPCHAR *npc)
{
npc->act_wait = 0;
SetQuake(20);
PlaySoundObject(26, 1);
PlaySoundObject(12, 1);
PlaySoundObject(26, SOUND_MODE_PLAY);
PlaySoundObject(12, SOUND_MODE_PLAY);
if (npc->direct == 0)
npc->x -= 16 * 0x200;
@ -1901,7 +1901,7 @@ void ActNpc357(NPCHAR *npc)
case 10:
npc->act_wait = 0;
npc->act_no = 11;
PlaySoundObject(29, 1);
PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough
case 11:
++npc->act_wait;

View file

@ -463,7 +463,7 @@ void LoseNpChar(NPCHAR *npc, BOOL bVanish)
int val;
// Play death sound
PlaySoundObject(npc->destroy_voice, 1);
PlaySoundObject(npc->destroy_voice, SOUND_MODE_PLAY);
// Create smoke
switch (npc->size)
@ -594,7 +594,7 @@ void HitNpCharBullet(void)
SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, 11, 0);
SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, 11, 0);
SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, 11, 0);
PlaySoundObject(gNPC[n].hit_voice, 1);
PlaySoundObject(gNPC[n].hit_voice, SOUND_MODE_PLAY);
gNPC[n].shock = 16;
}
@ -615,7 +615,7 @@ void HitNpCharBullet(void)
{
// Hit invulnerable NPC
SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, 2, 2);
PlaySoundObject(31, 1);
PlaySoundObject(31, SOUND_MODE_PLAY);
gBul[b].life = 0;
continue;
}

View file

@ -101,7 +101,7 @@ void MoveStageSelectCursor(void)
StartTextScript(gPermitStage[gSelectedStage].index + 1000);
if (gKeyTrg & (gKeyLeft | gKeyRight))
PlaySoundObject(1, 1);
PlaySoundObject(1, SOUND_MODE_PLAY);
}
void PutStageSelectObject(void)

View file

@ -82,7 +82,7 @@ void ShootBullet_Frontia1(int level)
}
}
PlaySoundObject(33, 1);
PlaySoundObject(33, SOUND_MODE_PLAY);
}
}
}
@ -113,7 +113,7 @@ void ShootBullet_PoleStar(int level)
{
if (!UseArmsEnergy(1))
{
PlaySoundObject(37, 1);
PlaySoundObject(37, SOUND_MODE_PLAY);
}
else
{
@ -158,9 +158,9 @@ void ShootBullet_PoleStar(int level)
}
if (level == 3)
PlaySoundObject(49, 1);
PlaySoundObject(49, SOUND_MODE_PLAY);
else
PlaySoundObject(32, 1);
PlaySoundObject(32, SOUND_MODE_PLAY);
}
}
}
@ -241,7 +241,7 @@ void ShootBullet_FireBall(int level)
}
}
PlaySoundObject(34, 1);
PlaySoundObject(34, SOUND_MODE_PLAY);
}
}
}
@ -281,7 +281,7 @@ void ShootBullet_Machinegun1(int level)
if (!UseArmsEnergy(1))
{
PlaySoundObject(37, 1);
PlaySoundObject(37, SOUND_MODE_PLAY);
if (empty == 0)
{
@ -349,9 +349,9 @@ void ShootBullet_Machinegun1(int level)
}
if (level == 3)
PlaySoundObject(49, 1);
PlaySoundObject(49, SOUND_MODE_PLAY);
else
PlaySoundObject(32, 1);
PlaySoundObject(32, SOUND_MODE_PLAY);
}
else
{
@ -482,7 +482,7 @@ void ShootBullet_Missile(int level, BOOL bSuper)
{
if (!UseArmsEnergy(1))
{
PlaySoundObject(37, 1);
PlaySoundObject(37, SOUND_MODE_PLAY);
if (empty == 0)
{
@ -537,7 +537,7 @@ void ShootBullet_Missile(int level, BOOL bSuper)
{
if (!UseArmsEnergy(1))
{
PlaySoundObject(37, 1);
PlaySoundObject(37, SOUND_MODE_PLAY);
if (empty == 0)
{
@ -601,7 +601,7 @@ void ShootBullet_Missile(int level, BOOL bSuper)
}
}
PlaySoundObject(32, 1);
PlaySoundObject(32, SOUND_MODE_PLAY);
}
}
@ -616,7 +616,7 @@ void ShootBullet_Bubblin1(void)
{
if (!UseArmsEnergy(1))
{
PlaySoundObject(37, 1);
PlaySoundObject(37, SOUND_MODE_PLAY);
if (empty == 0)
{
@ -667,7 +667,7 @@ void ShootBullet_Bubblin1(void)
}
}
PlaySoundObject(48, 1);
PlaySoundObject(48, SOUND_MODE_PLAY);
}
else if (++wait > 20)
{
@ -697,7 +697,7 @@ void ShootBullet_Bubblin2(int level)
if (!UseArmsEnergy(1))
{
PlaySoundObject(37, 1);
PlaySoundObject(37, SOUND_MODE_PLAY);
if (empty == 0)
{
@ -748,7 +748,7 @@ void ShootBullet_Bubblin2(int level)
}
}
PlaySoundObject(48, 1);
PlaySoundObject(48, SOUND_MODE_PLAY);
}
else if (++wait > 1)
{
@ -803,7 +803,7 @@ void ShootBullet_Sword(int level)
SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y - (3 * 0x200), 2);
}
PlaySoundObject(34, 1);
PlaySoundObject(34, SOUND_MODE_PLAY);
}
}
@ -833,7 +833,7 @@ void ShootBullet_Nemesis(int level)
{
if (!UseArmsEnergy(1))
{
PlaySoundObject(37, 1);
PlaySoundObject(37, SOUND_MODE_PLAY);
}
else
{
@ -880,15 +880,15 @@ void ShootBullet_Nemesis(int level)
switch (level)
{
case 1:
PlaySoundObject(117, 1);
PlaySoundObject(117, SOUND_MODE_PLAY);
break;
case 2:
PlaySoundObject(49, 1);
PlaySoundObject(49, SOUND_MODE_PLAY);
break;
case 3:
PlaySoundObject(60, 1);
PlaySoundObject(60, SOUND_MODE_PLAY);
break;
}
}
@ -925,16 +925,16 @@ void ShootBullet_Spur(int level)
switch (level)
{
case 1:
PlaySoundObject(59, 1);
PlaySoundObject(59, SOUND_MODE_PLAY);
break;
case 2:
PlaySoundObject(60, 1);
PlaySoundObject(60, SOUND_MODE_PLAY);
break;
case 3:
if (!IsMaxExpMyChar())
PlaySoundObject(61, 1);
PlaySoundObject(61, SOUND_MODE_PLAY);
break;
}
@ -953,7 +953,7 @@ void ShootBullet_Spur(int level)
if (!bMax)
{
bMax = TRUE;
PlaySoundObject(65, 1);
PlaySoundObject(65, SOUND_MODE_PLAY);
}
}
else
@ -991,7 +991,7 @@ void ShootBullet_Spur(int level)
{
if (!UseArmsEnergy(1))
{
PlaySoundObject(37, 1);
PlaySoundObject(37, SOUND_MODE_PLAY);
}
else
{
@ -1038,19 +1038,19 @@ void ShootBullet_Spur(int level)
switch (bul_no)
{
case 6:
PlaySoundObject(49, 1);
PlaySoundObject(49, SOUND_MODE_PLAY);
break;
case 37:
PlaySoundObject(62, 1);
PlaySoundObject(62, SOUND_MODE_PLAY);
break;
case 38:
PlaySoundObject(63, 1);
PlaySoundObject(63, SOUND_MODE_PLAY);
break;
case 39:
PlaySoundObject(64, 1);
PlaySoundObject(64, SOUND_MODE_PLAY);
break;
}
}

View file

@ -219,7 +219,7 @@ BOOL LoadSoundObject(const char *file_name, int no)
return TRUE;
}
void PlaySoundObject(int no, int mode)
void PlaySoundObject(int no, SoundMode mode)
{
if (!audio_backend_initialised)
return;
@ -228,17 +228,17 @@ void PlaySoundObject(int no, int mode)
{
switch (mode)
{
case 0: // 停止 (Stop)
case SOUND_MODE_STOP: // 停止 (Stop)
AudioBackend_StopSound(lpSECONDARYBUFFER[no]);
break;
case 1: // 再生 (Playback)
case SOUND_MODE_PLAY: // 再生 (Playback)
AudioBackend_StopSound(lpSECONDARYBUFFER[no]);
AudioBackend_RewindSound(lpSECONDARYBUFFER[no]);
AudioBackend_PlaySound(lpSECONDARYBUFFER[no], FALSE);
break;
case -1:// ループ再生 (Loop playback)
case SOUND_MODE_PLAY_LOOP:// ループ再生 (Loop playback)
AudioBackend_PlaySound(lpSECONDARYBUFFER[no], TRUE);
break;
}

View file

@ -26,6 +26,13 @@ enum SoundEffectNames
// To be continued
};
enum SoundMode
{
SOUND_MODE_PLAY_LOOP = -1,
SOUND_MODE_STOP = 0,
SOUND_MODE_PLAY = 1
};
extern BOOL audio_backend_initialised;
extern AudioBackend_Sound *lpSECONDARYBUFFER[SE_MAX];
@ -33,7 +40,7 @@ BOOL InitDirectSound(void);
void EndDirectSound(void);
BOOL InitSoundObject(const char *resname, int no);
BOOL LoadSoundObject(const char *file_name, int no);
void PlaySoundObject(int no, int mode);
void PlaySoundObject(int no, SoundMode mode);
void ChangeSoundFrequency(int no, unsigned long rate);
void ChangeSoundVolume(int no, long volume);
void ChangeSoundPan(int no, long pan);

View file

@ -418,7 +418,7 @@ void SetNumberTextScript(int index)
strcat(text[gTS.line % 4], str);
// Play sound and reset blinking cursor
PlaySoundObject(2, 1);
PlaySoundObject(2, SOUND_MODE_PLAY);
gTS.wait_beam = 0;
// Check if should move to next line (prevent a memory overflow, come on guys, this isn't a leftover of pixel trying to make text wrapping)
@ -652,7 +652,7 @@ int TextScriptProc(void)
else if (IS_COMMAND('I','T','+'))
{
x = GetTextScriptNo(gTS.p_read + 4);
PlaySoundObject(38, 1);
PlaySoundObject(38, SOUND_MODE_PLAY);
AddItemData(x);
gTS.p_read += 8;
}
@ -685,7 +685,7 @@ int TextScriptProc(void)
gNumberTextScript[1] = z;
#endif
PlaySoundObject(38, 1);
PlaySoundObject(38, SOUND_MODE_PLAY);
AddArmsData(w, x);
gTS.p_read += 13;
}
@ -895,7 +895,7 @@ int TextScriptProc(void)
gTS.next_event = GetTextScriptNo(gTS.p_read + 4);
gTS.p_read += 8;
gTS.mode = 6;
PlaySoundObject(5, 1);
PlaySoundObject(5, SOUND_MODE_PLAY);
gTS.wait = 0;
gTS.select = 0;
bExit = TRUE;
@ -1056,7 +1056,7 @@ int TextScriptProc(void)
else if (IS_COMMAND('S','O','U'))
{
z = GetTextScriptNo(gTS.p_read + 4);
PlaySoundObject(z, 1);
PlaySoundObject(z, SOUND_MODE_PLAY);
gTS.p_read += 8;
}
else if (IS_COMMAND('C','M','U'))
@ -1385,7 +1385,7 @@ int TextScriptProc(void)
}
strcat(text[gTS.line % 4], c);
PlaySoundObject(2, 1);
PlaySoundObject(2, SOUND_MODE_PLAY);
gTS.wait_beam = 0;
// Offset read and write positions
@ -1472,7 +1472,7 @@ int TextScriptProc(void)
// Select option
if (gKeyTrg & gKeyOk)
{
PlaySoundObject(18, 1);
PlaySoundObject(18, SOUND_MODE_PLAY);
if (gTS.select == 1)
{
@ -1488,13 +1488,13 @@ int TextScriptProc(void)
else if (gKeyTrg & gKeyLeft)
{
gTS.select = 0;
PlaySoundObject(1, 1);
PlaySoundObject(1, SOUND_MODE_PLAY);
}
// No
else if (gKeyTrg & gKeyRight)
{
gTS.select = 1;
PlaySoundObject(1, 1);
PlaySoundObject(1, SOUND_MODE_PLAY);
}
}
break;