Added SoundMode enum

Controls whether a PlaySoundObject call start, stops, or loops a
sound
This commit is contained in:
Clownacy 2020-07-08 18:52:32 +01:00
parent 53c8d2e55c
commit 13985fb349
43 changed files with 420 additions and 413 deletions

View file

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

View file

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

View file

@ -196,7 +196,7 @@ void ActBossChar_Core_Mini(NPCHAR *npc)
ym = GetSin(deg) * 2; ym = GetSin(deg) * 2;
xm = GetCos(deg) * 2; xm = GetCos(deg) * 2;
SetNpChar(178, npc->x, npc->y, xm, ym, 0, NULL, 0x100); SetNpChar(178, npc->x, npc->y, xm, ym, 0, NULL, 0x100);
PlaySoundObject(39, 1); PlaySoundObject(39, SOUND_MODE_PLAY);
} }
break; break;
@ -360,7 +360,7 @@ void ActBossChar_Core(void)
if (npc->act_wait > 400) if (npc->act_wait > 400)
{ {
++npc->count1; ++npc->count1;
PlaySoundObject(115, 1); PlaySoundObject(115, SOUND_MODE_PLAY);
if (npc->count1 > 3) if (npc->count1 > 3)
{ {
@ -471,7 +471,7 @@ void ActBossChar_Core(void)
ym = GetSin(deg) * 3; ym = GetSin(deg) * 3;
xm = GetCos(deg) * 3; xm = GetCos(deg) * 3;
SetNpChar(218, npc->x - (40 * 0x200), npc->y, xm, ym, 0, NULL, 0x100); 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) if (npc->act_wait > 400)
@ -561,7 +561,7 @@ void ActBossChar_Core(void)
gBoss[6].act_no = 100; gBoss[6].act_no = 100;
gBoss[7].act_no = 100; gBoss[7].act_no = 100;
PlaySoundObject(26, 1); PlaySoundObject(26, SOUND_MODE_PLAY);
for (i = 0; i < 8; ++i) 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); 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; npc->act_wait = 0;
if (npc->act_wait > 250 && npc->act_wait % 0x10 == 1) 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) if (npc->act_wait > 250 && npc->act_wait % 0x10 == 7)
{ {
SetNpChar(293, npc->x, npc->y, 0, 0, 0, NULL, 0x80); SetNpChar(293, npc->x, npc->y, 0, 0, 0, NULL, 0x80);
PlaySoundObject(101, 1); PlaySoundObject(101, SOUND_MODE_PLAY);
} }
if (npc->act_wait == 200) if (npc->act_wait == 200)
PlaySoundObject(116, 1); PlaySoundObject(116, SOUND_MODE_PLAY);
if (npc->act_wait > 200 && npc->act_wait % 2 != 0) if (npc->act_wait > 200 && npc->act_wait % 2 != 0)
npc->ani_no = 4; npc->ani_no = 4;
@ -414,7 +414,7 @@ void ActBossChar_Undead(void)
if (npc->act_wait > 200) if (npc->act_wait > 200)
{ {
++npc->count1; ++npc->count1;
PlaySoundObject(115, 1); PlaySoundObject(115, SOUND_MODE_PLAY);
if (npc->life < 200) if (npc->life < 200)
{ {
@ -519,7 +519,7 @@ void ActBossChar_Undead(void)
break; 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, 0, NULL, 0x100);
SetNpChar(285, x - (16 * 0x200), y, 0, 0, 0x400, 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[10].bits |= NPC_INVULNERABLE;
gBoss[11].bits |= NPC_SHOOTABLE; 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, 0, NULL, 0x100);
SetNpChar(285, gBoss[3].x - (16 * 0x200), gBoss[3].y, 0, 0, 0x400, 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; ++gBoss[0].act_wait;
if (gBoss[0].act_wait % 8 == 0) 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); 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_wait = 0;
gBoss[0].act_no = 1001; gBoss[0].act_no = 1001;
SetFlash(gBoss[0].x, gBoss[0].y, 1); SetFlash(gBoss[0].x, gBoss[0].y, 1);
PlaySoundObject(35, 1); PlaySoundObject(35, SOUND_MODE_PLAY);
} }
break; break;
@ -685,7 +685,7 @@ void ActBossChar_Undead(void)
if (npc->act_no == 231) if (npc->act_no == 231)
gBoss[1].act_no = gBoss[2].act_no = gBoss[6].act_no = gBoss[7].act_no = 30; 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) 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); SetNpChar(4, gBoss[4].x + (Random(-32, 16) * 0x200), gBoss[4].y, Random(-0x200, 0x200), Random(-0x100, 0x100), 0, NULL, 0x100);

View file

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

View file

@ -258,7 +258,7 @@ void ActBossChar_Frog(void)
boss->act_no = BALFROG_MIDAIR; boss->act_no = BALFROG_MIDAIR;
boss->ani_no = BALFROG_SPRITE_JUMPING; boss->ani_no = BALFROG_SPRITE_JUMPING;
boss->ym = PIXELS_TO_UNITS(-2); boss->ym = PIXELS_TO_UNITS(-2);
PlaySoundObject(25, 1); PlaySoundObject(25, SOUND_MODE_PLAY);
if (boss->direct == DIR_LEFT) if (boss->direct == DIR_LEFT)
boss->xm = PIXELS_TO_UNITS(-1); boss->xm = PIXELS_TO_UNITS(-1);
@ -286,7 +286,7 @@ void ActBossChar_Frog(void)
if (boss->flag & COLL_GROUND) if (boss->flag & COLL_GROUND)
{ {
PlaySoundObject(SND_LARGE_OBJECT_HIT_GROUND, 1); PlaySoundObject(SND_LARGE_OBJECT_HIT_GROUND, SOUND_MODE_PLAY);
SetQuake(30); SetQuake(30);
boss->act_no = BALFROG_WAIT; boss->act_no = BALFROG_WAIT;
boss->ani_no = BALFROG_SPRITE_STANDING_STILL; boss->ani_no = BALFROG_SPRITE_STANDING_STILL;
@ -385,7 +385,7 @@ void ActBossChar_Frog(void)
else 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 + TILES_TO_UNITS(2), boss->y - PIXELS_TO_UNITS(8), 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) if (boss->count1 == 0 || boss->life < boss->tgt_x - 90)
{ {
@ -460,7 +460,7 @@ void ActBossChar_Frog(void)
boss->ym = PIXELS_TO_UNITS(-5); boss->ym = PIXELS_TO_UNITS(-5);
boss->view.top = PIXELS_TO_UNITS(64); boss->view.top = PIXELS_TO_UNITS(64);
boss->view.bottom = PIXELS_TO_UNITS(24); boss->view.bottom = PIXELS_TO_UNITS(24);
PlaySoundObject(SND_SILLY_EXPLOSION, 1); PlaySoundObject(SND_SILLY_EXPLOSION, SOUND_MODE_PLAY);
} }
break; break;
@ -468,7 +468,7 @@ void ActBossChar_Frog(void)
case BALFROG_LEAP_MIDAIR: case BALFROG_LEAP_MIDAIR:
if (boss->flag & COLL_GROUND) if (boss->flag & COLL_GROUND)
{ {
PlaySoundObject(SND_LARGE_OBJECT_HIT_GROUND, 1); PlaySoundObject(SND_LARGE_OBJECT_HIT_GROUND, SOUND_MODE_PLAY);
SetQuake(60); SetQuake(60);
boss->act_no = BALFROG_WAIT; boss->act_no = BALFROG_WAIT;
boss->ani_no = BALFROG_SPRITE_STANDING_STILL; boss->ani_no = BALFROG_SPRITE_STANDING_STILL;
@ -504,7 +504,7 @@ void ActBossChar_Frog(void)
boss->ani_no = BALFROG_SPRITE_MOUTH_OPEN_CROUCHING; boss->ani_no = BALFROG_SPRITE_MOUTH_OPEN_CROUCHING;
boss->act_wait = 0; boss->act_wait = 0;
boss->xm = 0; boss->xm = 0;
PlaySoundObject(SND_EXPLOSION, 1); PlaySoundObject(SND_EXPLOSION, SOUND_MODE_PLAY);
for (i = 0; i < 8; ++i) 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 + 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);
@ -594,7 +594,7 @@ void ActBossChar_Frog(void)
if (boss->y < 0) if (boss->y < 0)
{ {
boss->cond = 0; boss->cond = 0;
PlaySoundObject(SND_LARGE_OBJECT_HIT_GROUND, 1); PlaySoundObject(SND_LARGE_OBJECT_HIT_GROUND, SOUND_MODE_PLAY);
SetQuake(30); 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) 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); 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; gBoss[0].y -= 1 * 0x200;
if (++gBoss[0].act_wait % 4 == 0) if (++gBoss[0].act_wait % 4 == 0)
PlaySoundObject(26, 1); PlaySoundObject(26, SOUND_MODE_PLAY);
if (gBoss[0].act_wait == 48) if (gBoss[0].act_wait == 48)
{ {
@ -231,7 +231,7 @@ void ActBossChar_Omega(void)
gBoss[0].act_no = 50; gBoss[0].act_no = 50;
gBoss[0].count1 = 0; gBoss[0].count1 = 0;
gBoss[5].hit.top = 16 * 0x200; gBoss[5].hit.top = 16 * 0x200;
PlaySoundObject(102, 1); PlaySoundObject(102, SOUND_MODE_PLAY);
} }
break; break;
@ -266,14 +266,14 @@ void ActBossChar_Omega(void)
else else
SetNpChar(48, gBoss[0].x, gBoss[0].y - (16 * 0x200), Random(-0x100, 0x100), -0x333, 2, NULL, 0x100); 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)) if (gBoss[0].act_wait == 200 || CountArmsBullet(6))
{ {
gBoss[0].count1 = 0; gBoss[0].count1 = 0;
gBoss[0].act_no = 70; gBoss[0].act_no = 70;
PlaySoundObject(102, 1); PlaySoundObject(102, SOUND_MODE_PLAY);
} }
break; break;
@ -292,8 +292,8 @@ void ActBossChar_Omega(void)
if (gBoss[0].count2 == 0) if (gBoss[0].count2 == 0)
{ {
PlaySoundObject(102, 0); PlaySoundObject(102, SOUND_MODE_STOP);
PlaySoundObject(12, 1); PlaySoundObject(12, SOUND_MODE_PLAY);
gBoss[0].act_no = 80; gBoss[0].act_no = 80;
gBoss[0].act_wait = 0; gBoss[0].act_wait = 0;
@ -327,7 +327,7 @@ void ActBossChar_Omega(void)
++gBoss[0].act_wait; ++gBoss[0].act_wait;
if (gBoss[0].act_wait % 4 == 0) if (gBoss[0].act_wait % 4 == 0)
PlaySoundObject(26, 1); PlaySoundObject(26, SOUND_MODE_PLAY);
if (gBoss[0].act_wait == 48) if (gBoss[0].act_wait == 48)
{ {
@ -376,7 +376,7 @@ void ActBossChar_Omega(void)
if (gBoss[0].act_wait == 50 || CountArmsBullet(6)) if (gBoss[0].act_wait == 50 || CountArmsBullet(6))
{ {
gBoss[0].act_no = 130; gBoss[0].act_no = 130;
PlaySoundObject(102, 1); PlaySoundObject(102, SOUND_MODE_PLAY);
gBoss[0].act_wait = 0; gBoss[0].act_wait = 0;
gBoss[0].count1 = 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) 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); 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; break;
@ -411,9 +411,9 @@ void ActBossChar_Omega(void)
gBoss[0].ym = -0x5FF; gBoss[0].ym = -0x5FF;
PlaySoundObject(102, 0); PlaySoundObject(102, SOUND_MODE_STOP);
PlaySoundObject(12, 1); PlaySoundObject(12, SOUND_MODE_PLAY);
PlaySoundObject(25, 1); PlaySoundObject(25, SOUND_MODE_PLAY);
if (gBoss[0].x < gMC.x) if (gBoss[0].x < gMC.x)
gBoss[0].xm = 0x100; gBoss[0].xm = 0x100;
@ -448,8 +448,8 @@ void ActBossChar_Omega(void)
gBoss[5].hit.top = 16 * 0x200; gBoss[5].hit.top = 16 * 0x200;
gBoss[5].damage = 0; gBoss[5].damage = 0;
PlaySoundObject(26, 1); PlaySoundObject(26, SOUND_MODE_PLAY);
PlaySoundObject(12, 1); PlaySoundObject(12, SOUND_MODE_PLAY);
SetQuake(30); SetQuake(30);
} }
@ -462,7 +462,7 @@ void ActBossChar_Omega(void)
++gBoss[0].act_wait; ++gBoss[0].act_wait;
if (gBoss[0].act_wait % 12 == 0) 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); 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_wait = 0;
gBoss[0].act_no = 160; gBoss[0].act_no = 160;
SetFlash(gBoss[0].x, gBoss[0].y, 1); SetFlash(gBoss[0].x, gBoss[0].y, 1);
PlaySoundObject(35, 1); PlaySoundObject(35, SOUND_MODE_PLAY);
} }
break; break;

View file

@ -85,7 +85,7 @@ void ActBossChar_Press(void)
npc->y = 413 * 0x200; npc->y = 413 * 0x200;
npc->ani_no = 0; npc->ani_no = 0;
npc->act_no = 20; npc->act_no = 20;
PlaySoundObject(44, 1); PlaySoundObject(44, SOUND_MODE_PLAY);
for (i = 0; i < 5; ++i) for (i = 0; i < 5; ++i)
{ {
@ -129,7 +129,7 @@ void ActBossChar_Press(void)
{ {
ChangeMapParts(i + 8, npc->count2, 0); ChangeMapParts(i + 8, npc->count2, 0);
SetDestroyNpChar((i + 8) * 0x200 * 0x10, npc->count2 * 0x200 * 0x10, 0, 4); 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: case 501:
if (++npc->act_wait % 0x10 == 0) 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); 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); ChangeMapParts(i + 7, 14, 0);
SetDestroyNpChar((i + 7) * 0x200 * 0x10, 224 * 0x200, 0, 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) if (npc->count2 > 10)
{ {
PlaySoundObject(51, 1); PlaySoundObject(51, SOUND_MODE_PLAY);
SetDestroyNpChar(npc->x, npc->y, npc->view.back, 4); SetDestroyNpChar(npc->x, npc->y, npc->view.back, 4);
npc->act_no = 300; npc->act_no = 300;
npc->act_wait = 0; npc->act_wait = 0;
@ -193,7 +193,7 @@ static void ActBossCharT_DragonHead(NPCHAR *npc)
else else
SetNpChar(202, npc->x + (8 * 0x200), npc->y, xm, ym, 0, NULL, 0x100); 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) if (npc->act_wait > 50)
@ -242,7 +242,7 @@ static void ActBossCharT_DragonHead(NPCHAR *npc)
else else
SetNpChar(202, npc->x + (8 * 0x200), npc->y, xm, ym, 0, NULL, 0x100); SetNpChar(202, npc->x + (8 * 0x200), npc->y, xm, ym, 0, NULL, 0x100);
PlaySoundObject(33, 1); PlaySoundObject(33, SOUND_MODE_PLAY);
} }
break; break;
@ -518,7 +518,7 @@ void ActBossChar_Twin(void)
npc->act_no = 1020; npc->act_no = 1020;
npc->act_wait = 0; npc->act_wait = 0;
SetFlash(gBoss[0].x, gBoss[0].y, 1); SetFlash(gBoss[0].x, gBoss[0].y, 1);
PlaySoundObject(35, 1); PlaySoundObject(35, SOUND_MODE_PLAY);
} }
break; 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) 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) 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)) 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); 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; npc->act_wait = 120;
break; break;
@ -404,7 +404,7 @@ static void ActBossChar03_04(NPCHAR *npc)
xm = GetCos(deg) * 3; xm = GetCos(deg) * 3;
SetNpChar(156, npc->x, npc->y, xm, ym, 0, NULL, 0x100); SetNpChar(156, npc->x, npc->y, xm, ym, 0, NULL, 0x100);
PlaySoundObject(39, 1); PlaySoundObject(39, SOUND_MODE_PLAY);
npc->act_wait = 40; npc->act_wait = 40;
break; break;
@ -836,7 +836,7 @@ void ActBossChar_MonstX(void)
SetQuake(2); SetQuake(2);
if (++npc->act_wait % 8 == 0) 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); 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_wait = 0;
npc->act_no = 1001; npc->act_no = 1001;
SetFlash(npc->x, npc->y, 1); SetFlash(npc->x, npc->y, 1);
PlaySoundObject(35, 1); PlaySoundObject(35, SOUND_MODE_PLAY);
} }
break; break;

View file

@ -14,7 +14,7 @@
static void Vanish(BULLET *bul) static void Vanish(BULLET *bul)
{ {
if (bul->code_bullet != 37 && bul->code_bullet != 38 && bul->code_bullet != 39) if (bul->code_bullet != 37 && bul->code_bullet != 38 && bul->code_bullet != 39)
PlaySoundObject(28, 1); PlaySoundObject(28, SOUND_MODE_PLAY);
else else
SetCaret(bul->x, bul->y, 2, 1); SetCaret(bul->x, bul->y, 2, 1);
@ -38,7 +38,7 @@ int JudgeHitBulletBlock(int x, int y, BULLET *bul)
bul->cond = 0; bul->cond = 0;
SetCaret(bul->x, bul->y, 2, 0); SetCaret(bul->x, bul->y, 2, 0);
PlaySoundObject(12, 1); PlaySoundObject(12, SOUND_MODE_PLAY);
for (i = 0; i < 4; ++i) for (i = 0; i < 4; ++i)
SetNpChar(4, x * 0x200 * 0x10, y * 0x200 * 0x10, Random(-0x200, 0x200), Random(-0x200, 0x200), 0, NULL, 0x100); 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; bul->cond = 0;
SetCaret(bul->x, bul->y, 2, 0); SetCaret(bul->x, bul->y, 2, 0);
PlaySoundObject(28, 1); PlaySoundObject(28, SOUND_MODE_PLAY);
return; return;
} }
@ -601,7 +601,7 @@ void ActBullet_FireBall(BULLET *bul, int level)
bul->y += bul->ym; bul->y += bul->ym;
if (bul->flag & 0xD) if (bul->flag & 0xD)
PlaySoundObject(34, 1); PlaySoundObject(34, SOUND_MODE_PLAY);
} }
RECT rect_left1[4] = { RECT rect_left1[4] = {
@ -989,7 +989,7 @@ void ActBullet_Bom(BULLET *bul, int level)
break; break;
} }
PlaySoundObject(44, 1); PlaySoundObject(44, SOUND_MODE_PLAY);
// Fallthrough // Fallthrough
case 1: case 1:
switch (level) switch (level)
@ -1192,7 +1192,7 @@ void ActBullet_Bubblin3(BULLET *bul)
{ {
bul->cond = 0; bul->cond = 0;
SetCaret(bul->x, bul->y, 2, 0); SetCaret(bul->x, bul->y, 2, 0);
PlaySoundObject(100, 1); PlaySoundObject(100, SOUND_MODE_PLAY);
if (gMC.up) if (gMC.up)
SetBullet(22, bul->x, bul->y, 1); SetBullet(22, bul->x, bul->y, 1);
@ -1363,7 +1363,7 @@ void ActBullet_Sword1(BULLET *bul)
bul->bbits &= ~4; bul->bbits &= ~4;
if (bul->count1 % 5 == 1) if (bul->count1 % 5 == 1)
PlaySoundObject(34, 1); PlaySoundObject(34, SOUND_MODE_PLAY);
if (bul->act_no == 0) if (bul->act_no == 0)
{ {
@ -1433,7 +1433,7 @@ void ActBullet_Sword2(BULLET *bul)
bul->bbits &= ~4; bul->bbits &= ~4;
if (bul->count1 % 7 == 1) if (bul->count1 % 7 == 1)
PlaySoundObject(106, 1); PlaySoundObject(106, SOUND_MODE_PLAY);
if (bul->act_no == 0) if (bul->act_no == 0)
{ {
@ -1546,7 +1546,7 @@ void ActBullet_Sword3(BULLET *bul)
if (++bul->act_wait % 4 == 1) if (++bul->act_wait % 4 == 1)
{ {
PlaySoundObject(106, 1); PlaySoundObject(106, SOUND_MODE_PLAY);
if (++bul->count1 % 2) if (++bul->count1 % 2)
SetBullet(23, bul->x, bul->y, 0); SetBullet(23, bul->x, bul->y, 0);
@ -1573,7 +1573,7 @@ void ActBullet_Sword3(BULLET *bul)
if (Random(-1, 1) == 0) if (Random(-1, 1) == 0)
{ {
PlaySoundObject(106, 1); PlaySoundObject(106, SOUND_MODE_PLAY);
if (Random(0, 1) % 2) if (Random(0, 1) % 2)
SetBullet(23, bul->x + (Random(-0x40, 0x40) * 0x200), bul->y + (Random(-0x40, 0x40) * 0x200), 0); 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; break;
} }
PlaySoundObject(44, 1); PlaySoundObject(44, SOUND_MODE_PLAY);
// Fallthrough // Fallthrough
case 1: case 1:
switch (level) switch (level)

View file

@ -353,7 +353,7 @@ static int ModeTitle(HWND hWnd)
{ {
if (gKeyTrg & gKeyOk) if (gKeyTrg & gKeyOk)
{ {
PlaySoundObject(18, 1); PlaySoundObject(18, SOUND_MODE_PLAY);
break; break;
} }
} }
@ -373,7 +373,7 @@ static int ModeTitle(HWND hWnd)
// Move cursor // Move cursor
if (gKeyTrg & (gKeyUp | gKeyDown)) if (gKeyTrg & (gKeyUp | gKeyDown))
{ {
PlaySoundObject(1, 1); PlaySoundObject(1, SOUND_MODE_PLAY);
if (bContinue) if (bContinue)
bContinue = FALSE; bContinue = FALSE;
@ -691,7 +691,7 @@ BOOL Game(HWND hWnd)
return FALSE; return FALSE;
} }
PlaySoundObject(7, -1); PlaySoundObject(7, SOUND_MODE_PLAY_LOOP);
char path[MAX_PATH]; char path[MAX_PATH];
sprintf(path, "%s\\npc.tbl", gDataPath); sprintf(path, "%s\\npc.tbl", gDataPath);
@ -718,7 +718,7 @@ BOOL Game(HWND hWnd)
mode = ModeAction(hWnd); mode = ModeAction(hWnd);
} }
PlaySoundObject(7, 0); PlaySoundObject(7, SOUND_MODE_STOP);
EndMapData(); EndMapData();
EndTextScript(); EndTextScript();

View file

@ -416,7 +416,7 @@ void InactiveWindow(void)
SleepNoise(); SleepNoise();
} }
PlaySoundObject(7, 0); PlaySoundObject(7, SOUND_MODE_STOP);
} }
void ActiveWindow(void) void ActiveWindow(void)
@ -429,7 +429,7 @@ void ActiveWindow(void)
ResetNoise(); ResetNoise();
} }
PlaySoundObject(7, -1); PlaySoundObject(7, SOUND_MODE_PLAY_LOOP);
} }
// Turns out you could drag-and-drop a save file onto the // Turns out you could drag-and-drop a save file onto the

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -286,7 +286,7 @@ void ActNpc123(NPCHAR *npc)
case 0: case 0:
npc->act_no = 1; npc->act_no = 1;
SetCaret(npc->x, npc->y, 3, 0); SetCaret(npc->x, npc->y, 3, 0);
PlaySoundObject(32, 1); PlaySoundObject(32, SOUND_MODE_PLAY);
switch (npc->direct) switch (npc->direct)
{ {
@ -346,7 +346,7 @@ void ActNpc123(NPCHAR *npc)
if (bBreak) if (bBreak)
{ {
SetCaret(npc->x, npc->y, 2, 2); SetCaret(npc->x, npc->y, 2, 2);
PlaySoundObject(28, 1); PlaySoundObject(28, SOUND_MODE_PLAY);
npc->cond = 0; npc->cond = 0;
} }
@ -399,7 +399,7 @@ void ActNpc124(NPCHAR *npc)
break; break;
} }
if (++npc->act_wait % 8 == 0) if (++npc->act_wait % 8 == 0)
PlaySoundObject(26, 1); PlaySoundObject(26, SOUND_MODE_PLAY);
SetQuake(20); SetQuake(20);
break; break;
@ -414,7 +414,7 @@ void ActNpc125(NPCHAR *npc)
if (npc->life < 990) if (npc->life < 990)
{ {
SetDestroyNpChar(npc->x, npc->y, npc->view.back, 8); SetDestroyNpChar(npc->x, npc->y, npc->view.back, 8);
PlaySoundObject(70, 1); PlaySoundObject(70, SOUND_MODE_PLAY);
if (npc->direct == 0) if (npc->direct == 0)
SetNpChar(87, npc->x, npc->y, 0, 0, 2, NULL, 0); SetNpChar(87, npc->x, npc->y, 0, 0, 2, NULL, 0);
@ -882,7 +882,7 @@ void ActNpc132(NPCHAR *npc)
npc->ani_no = 2; npc->ani_no = 2;
if (npc->ani_no == 4 && npc->ani_wait == 0) if (npc->ani_no == 4 && npc->ani_wait == 0)
PlaySoundObject(105, 1); PlaySoundObject(105, SOUND_MODE_PLAY);
} }
else else
{ {
@ -951,7 +951,7 @@ void ActNpc132(NPCHAR *npc)
} }
if (npc->ani_no == 4 && npc->ani_wait == 0) if (npc->ani_no == 4 && npc->ani_wait == 0)
PlaySoundObject(105, 1); PlaySoundObject(105, SOUND_MODE_PLAY);
break; break;
@ -1182,7 +1182,7 @@ void ActNpc135(NPCHAR *npc)
ym = GetSin(deg) * 2; ym = GetSin(deg) * 2;
xm = GetCos(deg) * 2; xm = GetCos(deg) * 2;
SetNpChar(50, npc->x, npc->y, xm, ym, 0, NULL, 0x180); SetNpChar(50, npc->x, npc->y, xm, ym, 0, NULL, 0x180);
PlaySoundObject(39, 1); PlaySoundObject(39, SOUND_MODE_PLAY);
} }
if (npc->flag & 8) if (npc->flag & 8)
@ -1324,7 +1324,7 @@ void ActNpc138(NPCHAR *npc)
// Fallthrough // Fallthrough
case 11: case 11:
if (++npc->act_wait % 8 == 0) if (++npc->act_wait % 8 == 0)
PlaySoundObject(26, 1); PlaySoundObject(26, SOUND_MODE_PLAY);
if (npc->direct == 0) if (npc->direct == 0)
{ {
@ -1428,7 +1428,7 @@ void ActNpc139(NPCHAR *npc)
npc->xm = 0; npc->xm = 0;
npc->ym = 0; npc->ym = 0;
npc->act_wait = (npc->rect.bottom - npc->rect.top) * 2; npc->act_wait = (npc->rect.bottom - npc->rect.top) * 2;
PlaySoundObject(29, 1); PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough // Fallthrough
case 31: case 31:
--npc->act_wait; --npc->act_wait;
@ -1444,7 +1444,7 @@ void ActNpc139(NPCHAR *npc)
npc->act_wait = 0; npc->act_wait = 0;
npc->xm = 0; npc->xm = 0;
npc->ym = 0; npc->ym = 0;
PlaySoundObject(29, 1); PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough // Fallthrough
case 41: case 41:
npc->ani_no = 2; npc->ani_no = 2;

View file

@ -196,7 +196,7 @@ void ActNpc140(NPCHAR *npc)
npc->act_no = 26; npc->act_no = 26;
npc->act_wait = 0; npc->act_wait = 0;
npc->ani_no = 2; npc->ani_no = 2;
PlaySoundObject(26, 1); PlaySoundObject(26, SOUND_MODE_PLAY);
SetQuake(20); SetQuake(20);
} }
@ -260,7 +260,7 @@ void ActNpc140(NPCHAR *npc)
npc->act_no = 102; npc->act_no = 102;
npc->act_wait = 0; npc->act_wait = 0;
npc->ani_no = 2; npc->ani_no = 2;
PlaySoundObject(26, 1); PlaySoundObject(26, SOUND_MODE_PLAY);
SetQuake(20); SetQuake(20);
} }
@ -327,7 +327,7 @@ void ActNpc140(NPCHAR *npc)
npc->act_no = 141; npc->act_no = 141;
npc->act_wait = 0; npc->act_wait = 0;
npc->ani_no = 12; npc->ani_no = 12;
PlaySoundObject(29, 1); PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough // Fallthrough
case 141: case 141:
if (++npc->ani_no > 13) if (++npc->ani_no > 13)
@ -403,7 +403,7 @@ void ActNpc141(NPCHAR *npc)
npc->ym = GetSin(deg) * 4; npc->ym = GetSin(deg) * 4;
npc->xm = GetCos(deg) * 4; npc->xm = GetCos(deg) * 4;
PlaySoundObject(39, 1); PlaySoundObject(39, SOUND_MODE_PLAY);
} }
break; break;
@ -414,7 +414,7 @@ void ActNpc141(NPCHAR *npc)
npc->act_no = 20; npc->act_no = 20;
npc->act_wait = 0; npc->act_wait = 0;
SetCaret(npc->x, npc->y, 2, 0); SetCaret(npc->x, npc->y, 2, 0);
PlaySoundObject(12, 1); PlaySoundObject(12, SOUND_MODE_PLAY);
for (i = 0; i < 4; ++i) for (i = 0; i < 4; ++i)
SetNpChar(4, npc->x, npc->y, Random(-0x200, 0x200), Random(-0x200, 0x200), 0, NULL, 0x100); 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_no = 21;
npc->act_wait = 0; npc->act_wait = 0;
npc->xm = 0; npc->xm = 0;
PlaySoundObject(23, 1); PlaySoundObject(23, SOUND_MODE_PLAY);
} }
break; break;
@ -585,7 +585,7 @@ void ActNpc144(NPCHAR *npc)
npc->ani_no = 0; npc->ani_no = 0;
npc->ani_wait = 0; npc->ani_wait = 0;
npc->tgt_x = npc->x; npc->tgt_x = npc->x;
PlaySoundObject(29, 1); PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough // Fallthrough
case 1: case 1:
if (++npc->act_wait == 64) if (++npc->act_wait == 64)
@ -611,7 +611,7 @@ void ActNpc144(NPCHAR *npc)
npc->act_no = 4; npc->act_no = 4;
npc->act_wait = 0; npc->act_wait = 0;
npc->ani_no = 4; npc->ani_no = 4;
PlaySoundObject(23, 1); PlaySoundObject(23, SOUND_MODE_PLAY);
} }
break; break;
@ -734,7 +734,7 @@ void ActNpc146(NPCHAR *npc)
if (++npc->act_wait > 10) if (++npc->act_wait > 10)
{ {
npc->act_no = 2; npc->act_no = 2;
PlaySoundObject(101, 1); PlaySoundObject(101, SOUND_MODE_PLAY);
} }
break; break;
@ -834,7 +834,7 @@ void ActNpc147(NPCHAR *npc)
npc->act_no = 3; npc->act_no = 3;
npc->ani_no = 2; npc->ani_no = 2;
npc->ym = -0x5FF; npc->ym = -0x5FF;
PlaySoundObject(30, 1); PlaySoundObject(30, SOUND_MODE_PLAY);
if (npc->x > gMC.x) if (npc->x > gMC.x)
npc->direct = 0; npc->direct = 0;
@ -873,7 +873,7 @@ void ActNpc147(NPCHAR *npc)
} }
if (npc->act_wait % 4 == 1) if (npc->act_wait % 4 == 1)
PlaySoundObject(109, 1); PlaySoundObject(109, SOUND_MODE_PLAY);
if (npc->flag & 8) if (npc->flag & 8)
npc->ym = -0x200; npc->ym = -0x200;
@ -886,7 +886,7 @@ void ActNpc147(NPCHAR *npc)
xm = GetCos(deg) * 3; xm = GetCos(deg) * 3;
SetNpChar(148, npc->x, npc->y, xm, ym, 0, NULL, 0x100); SetNpChar(148, npc->x, npc->y, xm, ym, 0, NULL, 0x100);
PlaySoundObject(39, 1); PlaySoundObject(39, SOUND_MODE_PLAY);
} }
if (++npc->ani_wait > 0) if (++npc->ani_wait > 0)
@ -908,7 +908,7 @@ void ActNpc147(NPCHAR *npc)
npc->act_wait = 0; npc->act_wait = 0;
npc->ani_no = 0; npc->ani_no = 0;
npc->act_no = 1; npc->act_no = 1;
PlaySoundObject(23, 1); PlaySoundObject(23, SOUND_MODE_PLAY);
} }
break; break;
@ -1012,7 +1012,7 @@ void ActNpc149(NPCHAR *npc)
case 11: case 11:
if (++npc->act_wait % 10 == 6) if (++npc->act_wait % 10 == 6)
PlaySoundObject(107, 1); PlaySoundObject(107, SOUND_MODE_PLAY);
if (npc->flag & 1) if (npc->flag & 1)
{ {
@ -1020,7 +1020,7 @@ void ActNpc149(NPCHAR *npc)
npc->direct = 2; npc->direct = 2;
npc->act_no = 20; npc->act_no = 20;
SetQuake(10); SetQuake(10);
PlaySoundObject(26, 1); PlaySoundObject(26, SOUND_MODE_PLAY);
for (i = 0; i < 4; ++i) 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); 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: case 21:
if (++npc->act_wait % 10 == 6) if (++npc->act_wait % 10 == 6)
PlaySoundObject(107, 1); PlaySoundObject(107, SOUND_MODE_PLAY);
if (npc->flag & 4) if (npc->flag & 4)
{ {
@ -1065,7 +1065,7 @@ void ActNpc149(NPCHAR *npc)
npc->direct = 0; npc->direct = 0;
npc->act_no = 10; npc->act_no = 10;
SetQuake(10); SetQuake(10);
PlaySoundObject(26, 1); PlaySoundObject(26, SOUND_MODE_PLAY);
for (i = 0; i < 4; ++i) 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); 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) for (i = 0; i < 4; ++i)
SetNpChar(4, npc->x, npc->y, Random(-0x155, 0x155), Random(-0x600, 0), 0, NULL, 0x100); SetNpChar(4, npc->x, npc->y, Random(-0x155, 0x155), Random(-0x600, 0), 0, NULL, 0x100);
PlaySoundObject(71, 1); PlaySoundObject(71, SOUND_MODE_PLAY);
// Fallthrough // Fallthrough
case 11: case 11:
npc->ani_no = 2; npc->ani_no = 2;
@ -1162,7 +1162,7 @@ void ActNpc150(NPCHAR *npc)
case 20: case 20:
npc->act_no = 21; npc->act_no = 21;
npc->act_wait = 64; npc->act_wait = 64;
PlaySoundObject(29, 1); PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough // Fallthrough
case 21: case 21:
if (--npc->act_wait == 0) if (--npc->act_wait == 0)
@ -1482,7 +1482,7 @@ void ActNpc153(NPCHAR *npc)
npc->act_no = 20; npc->act_no = 20;
if (!(gMC.cond & 2)) if (!(gMC.cond & 2))
PlaySoundObject(30, 1); PlaySoundObject(30, SOUND_MODE_PLAY);
} }
else if (npc->direct == 2 && npc->flag & 4) else if (npc->direct == 2 && npc->flag & 4)
{ {
@ -1491,7 +1491,7 @@ void ActNpc153(NPCHAR *npc)
npc->act_no = 20; npc->act_no = 20;
if (!(gMC.cond & 2)) if (!(gMC.cond & 2))
PlaySoundObject(30, 1); PlaySoundObject(30, SOUND_MODE_PLAY);
} }
break; break;
@ -1525,7 +1525,7 @@ void ActNpc153(NPCHAR *npc)
npc->xm = 0; npc->xm = 0;
if (!(gMC.cond & 2)) if (!(gMC.cond & 2))
PlaySoundObject(23, 1); PlaySoundObject(23, SOUND_MODE_PLAY);
} }
break; break;
@ -1577,7 +1577,7 @@ void ActNpc154(NPCHAR *npc)
else else
npc->xm = -0x100; npc->xm = -0x100;
PlaySoundObject(53, 1); PlaySoundObject(53, SOUND_MODE_PLAY);
break; break;
case 1: case 1:
@ -1678,7 +1678,7 @@ void ActNpc155(NPCHAR *npc)
SetNpChar(156, npc->x, npc->y, xm, ym, 0, NULL, 0x100); SetNpChar(156, npc->x, npc->y, xm, ym, 0, NULL, 0x100);
if (!(gMC.cond & 2)) if (!(gMC.cond & 2))
PlaySoundObject(39, 1); PlaySoundObject(39, SOUND_MODE_PLAY);
npc->act_no = 1; npc->act_no = 1;
npc->act_wait = Random(70, 150); npc->act_wait = Random(70, 150);
@ -1795,7 +1795,7 @@ void ActNpc157(NPCHAR *npc)
case 11: case 11:
if (++npc->act_wait % 10 == 6) if (++npc->act_wait % 10 == 6)
PlaySoundObject(107, 1); PlaySoundObject(107, SOUND_MODE_PLAY);
if (npc->flag & 2) if (npc->flag & 2)
{ {
@ -1803,7 +1803,7 @@ void ActNpc157(NPCHAR *npc)
npc->direct = 2; npc->direct = 2;
npc->act_no = 20; npc->act_no = 20;
SetQuake(10); SetQuake(10);
PlaySoundObject(26, 1); PlaySoundObject(26, SOUND_MODE_PLAY);
for (i = 0; i < 4; ++i) 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); 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: case 21:
if (++npc->act_wait % 10 == 6) if (++npc->act_wait % 10 == 6)
PlaySoundObject(107, 1); PlaySoundObject(107, SOUND_MODE_PLAY);
if (npc->flag & 8) if (npc->flag & 8)
{ {
@ -1848,7 +1848,7 @@ void ActNpc157(NPCHAR *npc)
npc->direct = 0; npc->direct = 0;
npc->act_no = 10; npc->act_no = 10;
SetQuake(10); SetQuake(10);
PlaySoundObject(26, 1); PlaySoundObject(26, SOUND_MODE_PLAY);
for (i = 0; i < 4; ++i) 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); 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_no = 3;
npc->act_wait = 0; npc->act_wait = 0;
SetQuake(30); SetQuake(30);
PlaySoundObject(26, 1); PlaySoundObject(26, SOUND_MODE_PLAY);
PlaySoundObject(72, 1); PlaySoundObject(72, SOUND_MODE_PLAY);
} }
if (npc->y < gMC.y && gMC.flag & 8) if (npc->y < gMC.y && gMC.flag & 8)
@ -246,7 +246,7 @@ void ActNpc162(NPCHAR *npc)
{ {
case 0: case 0:
DeleteNpCharCode(161, TRUE); DeleteNpCharCode(161, TRUE);
PlaySoundObject(72, 1); PlaySoundObject(72, SOUND_MODE_PLAY);
for (i = 0; i < 10; ++i) 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); 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); SetNpChar(161, npc->x + (Random(-12, 12) * 0x200), npc->y - (12 * 0x200), Random(-0x200, 0x200), 0x100, 0, NULL, 0x100);
if (npc->count1 % 4 == 2) if (npc->count1 % 4 == 2)
PlaySoundObject(21, 1); PlaySoundObject(21, SOUND_MODE_PLAY);
break; break;
@ -519,7 +519,7 @@ void ActNpc167(NPCHAR *npc)
npc->act_no = 21; npc->act_no = 21;
npc->act_wait = 0; npc->act_wait = 0;
npc->ani_no = 0; npc->ani_no = 0;
PlaySoundObject(29, 1); PlaySoundObject(29, SOUND_MODE_PLAY);
// Fallthrough // Fallthrough
case 21: case 21:
if (++npc->ani_no > 2) if (++npc->ani_no > 2)
@ -569,7 +569,7 @@ void ActNpc168(NPCHAR *npc)
npc->act_wait = 0; npc->act_wait = 0;
npc->ym = -0x400; npc->ym = -0x400;
npc->xm = 0x100; npc->xm = 0x100;
PlaySoundObject(25, 1); PlaySoundObject(25, SOUND_MODE_PLAY);
// Fallthrough // Fallthrough
case 21: case 21:
npc->ym += 0x10; npc->ym += 0x10;
@ -579,7 +579,7 @@ void ActNpc168(NPCHAR *npc)
if (npc->act_wait && npc->flag & 8) if (npc->act_wait && npc->flag & 8)
{ {
PlaySoundObject(35, 1); PlaySoundObject(35, SOUND_MODE_PLAY);
SetQuake(40); SetQuake(40);
npc->act_no = 0; npc->act_no = 0;
} }
@ -631,7 +631,7 @@ void ActNpc169(NPCHAR *npc)
++npc->ani_no; ++npc->ani_no;
if (npc->ani_no == 2 || npc->ani_no == 4) if (npc->ani_no == 2 || npc->ani_no == 4)
PlaySoundObject(23, 1); PlaySoundObject(23, SOUND_MODE_PLAY);
} }
if (npc->ani_no > 4) if (npc->ani_no > 4)
@ -700,7 +700,7 @@ void ActNpc169(NPCHAR *npc)
if (npc->act_wait < 30 && npc->act_wait % 6 == 1) 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); 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->act_no = 9;
npc->ani_no = 8; npc->ani_no = 8;
SetQuake(30); 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) 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; break;
case 20: case 20:
PlaySoundObject(25, 1); PlaySoundObject(25, SOUND_MODE_PLAY);
gMC.cond &= ~2; gMC.cond &= ~2;
if (npc->direct == 0) if (npc->direct == 0)
@ -870,7 +870,7 @@ void ActNpc170(NPCHAR *npc)
if (bHit) if (bHit)
{ {
PlaySoundObject(44, 1); PlaySoundObject(44, SOUND_MODE_PLAY);
SetDestroyNpChar(npc->x, npc->y, 0, 3); SetDestroyNpChar(npc->x, npc->y, 0, 3);
VanishNpChar(npc); VanishNpChar(npc);
return; return;
@ -1121,7 +1121,7 @@ void ActNpc173(NPCHAR *npc)
{ {
if (++npc->count1 == 3) if (++npc->count1 == 3)
{ {
PlaySoundObject(30, 1); PlaySoundObject(30, SOUND_MODE_PLAY);
npc->count1 = 0; npc->count1 = 0;
npc->act_no = 25; npc->act_no = 25;
npc->act_wait = 0; npc->act_wait = 0;
@ -1135,7 +1135,7 @@ void ActNpc173(NPCHAR *npc)
} }
else else
{ {
PlaySoundObject(30, 1); PlaySoundObject(30, SOUND_MODE_PLAY);
npc->act_no = 20; npc->act_no = 20;
npc->ani_no = 2; npc->ani_no = 2;
npc->ym = -0x200; npc->ym = -0x200;
@ -1154,7 +1154,7 @@ void ActNpc173(NPCHAR *npc)
if (npc->flag & 8) if (npc->flag & 8)
{ {
PlaySoundObject(23, 1); PlaySoundObject(23, SOUND_MODE_PLAY);
npc->ani_no = 1; npc->ani_no = 1;
npc->act_no = 30; npc->act_no = 30;
npc->act_wait = 0; npc->act_wait = 0;
@ -1172,7 +1172,7 @@ void ActNpc173(NPCHAR *npc)
SetNpChar(174, npc->x, npc->y, xm, ym, 0, NULL, 0x100); SetNpChar(174, npc->x, npc->y, xm, ym, 0, NULL, 0x100);
PlaySoundObject(39, 1); PlaySoundObject(39, SOUND_MODE_PLAY);
npc->ani_no = 3; npc->ani_no = 3;
gCurlyShoot_wait = Random(80, 100); gCurlyShoot_wait = Random(80, 100);
@ -1185,7 +1185,7 @@ void ActNpc173(NPCHAR *npc)
if (npc->flag & 8) if (npc->flag & 8)
{ {
PlaySoundObject(23, 1); PlaySoundObject(23, SOUND_MODE_PLAY);
npc->ani_no = 1; npc->ani_no = 1;
npc->act_no = 30; npc->act_no = 30;
npc->act_wait = 0; npc->act_wait = 0;
@ -1279,7 +1279,7 @@ void ActNpc174(NPCHAR *npc)
{ {
npc->act_no = 2; npc->act_no = 2;
++npc->count1; ++npc->count1;
PlaySoundObject(31, 1); PlaySoundObject(31, SOUND_MODE_PLAY);
} }
break; break;
@ -1445,7 +1445,7 @@ void ActNpc176(NPCHAR *npc)
else else
SetNpChar(177, npc->x, npc->y + (8 * 0x200), 0, 0, 2, NULL, 0x100); 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->act_no = 0;
npc->ani_no = 0; npc->ani_no = 0;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -100,7 +100,7 @@ void MoveStageSelectCursor(void)
StartTextScript(gPermitStage[gSelectedStage].index + 1000); StartTextScript(gPermitStage[gSelectedStage].index + 1000);
if (gKeyTrg & (gKeyLeft | gKeyRight)) if (gKeyTrg & (gKeyLeft | gKeyRight))
PlaySoundObject(1, 1); PlaySoundObject(1, SOUND_MODE_PLAY);
} }
void PutStageSelectObject(void) 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)) if (!UseArmsEnergy(1))
{ {
PlaySoundObject(37, 1); PlaySoundObject(37, SOUND_MODE_PLAY);
} }
else else
{ {
@ -158,9 +158,9 @@ void ShootBullet_PoleStar(int level)
} }
if (level == 3) if (level == 3)
PlaySoundObject(49, 1); PlaySoundObject(49, SOUND_MODE_PLAY);
else 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)) if (!UseArmsEnergy(1))
{ {
PlaySoundObject(37, 1); PlaySoundObject(37, SOUND_MODE_PLAY);
if (empty == 0) if (empty == 0)
{ {
@ -349,9 +349,9 @@ void ShootBullet_Machinegun1(int level)
} }
if (level == 3) if (level == 3)
PlaySoundObject(49, 1); PlaySoundObject(49, SOUND_MODE_PLAY);
else else
PlaySoundObject(32, 1); PlaySoundObject(32, SOUND_MODE_PLAY);
} }
else else
{ {
@ -482,7 +482,7 @@ void ShootBullet_Missile(int level, BOOL bSuper)
{ {
if (!UseArmsEnergy(1)) if (!UseArmsEnergy(1))
{ {
PlaySoundObject(37, 1); PlaySoundObject(37, SOUND_MODE_PLAY);
if (empty == 0) if (empty == 0)
{ {
@ -537,7 +537,7 @@ void ShootBullet_Missile(int level, BOOL bSuper)
{ {
if (!UseArmsEnergy(1)) if (!UseArmsEnergy(1))
{ {
PlaySoundObject(37, 1); PlaySoundObject(37, SOUND_MODE_PLAY);
if (empty == 0) 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)) if (!UseArmsEnergy(1))
{ {
PlaySoundObject(37, 1); PlaySoundObject(37, SOUND_MODE_PLAY);
if (empty == 0) if (empty == 0)
{ {
@ -667,7 +667,7 @@ void ShootBullet_Bubblin1(void)
} }
} }
PlaySoundObject(48, 1); PlaySoundObject(48, SOUND_MODE_PLAY);
} }
else if (++wait > 20) else if (++wait > 20)
{ {
@ -697,7 +697,7 @@ void ShootBullet_Bubblin2(int level)
if (!UseArmsEnergy(1)) if (!UseArmsEnergy(1))
{ {
PlaySoundObject(37, 1); PlaySoundObject(37, SOUND_MODE_PLAY);
if (empty == 0) if (empty == 0)
{ {
@ -748,7 +748,7 @@ void ShootBullet_Bubblin2(int level)
} }
} }
PlaySoundObject(48, 1); PlaySoundObject(48, SOUND_MODE_PLAY);
} }
else if (++wait > 1) 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); 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)) if (!UseArmsEnergy(1))
{ {
PlaySoundObject(37, 1); PlaySoundObject(37, SOUND_MODE_PLAY);
} }
else else
{ {
@ -880,15 +880,15 @@ void ShootBullet_Nemesis(int level)
switch (level) switch (level)
{ {
case 1: case 1:
PlaySoundObject(117, 1); PlaySoundObject(117, SOUND_MODE_PLAY);
break; break;
case 2: case 2:
PlaySoundObject(49, 1); PlaySoundObject(49, SOUND_MODE_PLAY);
break; break;
case 3: case 3:
PlaySoundObject(60, 1); PlaySoundObject(60, SOUND_MODE_PLAY);
break; break;
} }
} }
@ -925,16 +925,16 @@ void ShootBullet_Spur(int level)
switch (level) switch (level)
{ {
case 1: case 1:
PlaySoundObject(59, 1); PlaySoundObject(59, SOUND_MODE_PLAY);
break; break;
case 2: case 2:
PlaySoundObject(60, 1); PlaySoundObject(60, SOUND_MODE_PLAY);
break; break;
case 3: case 3:
if (!IsMaxExpMyChar()) if (!IsMaxExpMyChar())
PlaySoundObject(61, 1); PlaySoundObject(61, SOUND_MODE_PLAY);
break; break;
} }
@ -953,7 +953,7 @@ void ShootBullet_Spur(int level)
if (!bMax) if (!bMax)
{ {
bMax = TRUE; bMax = TRUE;
PlaySoundObject(65, 1); PlaySoundObject(65, SOUND_MODE_PLAY);
} }
} }
else else
@ -991,7 +991,7 @@ void ShootBullet_Spur(int level)
{ {
if (!UseArmsEnergy(1)) if (!UseArmsEnergy(1))
{ {
PlaySoundObject(37, 1); PlaySoundObject(37, SOUND_MODE_PLAY);
} }
else else
{ {
@ -1038,19 +1038,19 @@ void ShootBullet_Spur(int level)
switch (bul_no) switch (bul_no)
{ {
case 6: case 6:
PlaySoundObject(49, 1); PlaySoundObject(49, SOUND_MODE_PLAY);
break; break;
case 37: case 37:
PlaySoundObject(62, 1); PlaySoundObject(62, SOUND_MODE_PLAY);
break; break;
case 38: case 38:
PlaySoundObject(63, 1); PlaySoundObject(63, SOUND_MODE_PLAY);
break; break;
case 39: case 39:
PlaySoundObject(64, 1); PlaySoundObject(64, SOUND_MODE_PLAY);
break; break;
} }
} }

View file

@ -243,7 +243,7 @@ BOOL LoadSoundObject(LPCSTR file_name, int no)
return TRUE; return TRUE;
} }
void PlaySoundObject(int no, int mode) void PlaySoundObject(int no, SoundMode mode)
{ {
if (lpDS == NULL) if (lpDS == NULL)
return; return;
@ -252,17 +252,17 @@ void PlaySoundObject(int no, int mode)
{ {
switch (mode) switch (mode)
{ {
case 0: // 停止 (Stop) case SOUND_MODE_STOP: // 停止 (Stop)
lpSECONDARYBUFFER[no]->Stop(); lpSECONDARYBUFFER[no]->Stop();
break; break;
case 1: // 再生 (Playback) case SOUND_MODE_PLAY: // 再生 (Playback)
lpSECONDARYBUFFER[no]->Stop(); lpSECONDARYBUFFER[no]->Stop();
lpSECONDARYBUFFER[no]->SetCurrentPosition(0); lpSECONDARYBUFFER[no]->SetCurrentPosition(0);
lpSECONDARYBUFFER[no]->Play(0, 0, 0); lpSECONDARYBUFFER[no]->Play(0, 0, 0);
break; break;
case -1:// ループ再生 (Loop playback) case SOUND_MODE_PLAY_LOOP:// ループ再生 (Loop playback)
lpSECONDARYBUFFER[no]->Play(0, 0, DSBPLAY_LOOPING); lpSECONDARYBUFFER[no]->Play(0, 0, DSBPLAY_LOOPING);
break; break;
} }

View file

@ -30,6 +30,13 @@ enum SoundEffectNames
// To be continued // To be continued
}; };
enum SoundMode
{
SOUND_MODE_PLAY_LOOP = -1,
SOUND_MODE_STOP = 0,
SOUND_MODE_PLAY = 1
};
extern LPDIRECTSOUND lpDS; extern LPDIRECTSOUND lpDS;
extern LPDIRECTSOUNDBUFFER lpSECONDARYBUFFER[SE_MAX]; extern LPDIRECTSOUNDBUFFER lpSECONDARYBUFFER[SE_MAX];
@ -37,7 +44,7 @@ BOOL InitDirectSound(HWND hwnd);
void EndDirectSound(void); void EndDirectSound(void);
BOOL InitSoundObject(LPCSTR resname, int no); BOOL InitSoundObject(LPCSTR resname, int no);
BOOL LoadSoundObject(LPCSTR file_name, int no); BOOL LoadSoundObject(LPCSTR file_name, int no);
void PlaySoundObject(int no, int mode); void PlaySoundObject(int no, SoundMode mode);
void ChangeSoundFrequency(int no, DWORD rate); void ChangeSoundFrequency(int no, DWORD rate);
void ChangeSoundVolume(int no, long volume); void ChangeSoundVolume(int no, long volume);
void ChangeSoundPan(int no, long pan); void ChangeSoundPan(int no, long pan);

View file

@ -416,7 +416,7 @@ void SetNumberTextScript(int index)
strcat(text[gTS.line % 4], str); strcat(text[gTS.line % 4], str);
// Play sound and reset blinking cursor // Play sound and reset blinking cursor
PlaySoundObject(2, 1); PlaySoundObject(2, SOUND_MODE_PLAY);
gTS.wait_beam = 0; 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) // 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)
@ -650,7 +650,7 @@ int TextScriptProc(void)
else if (IS_COMMAND('I','T','+')) else if (IS_COMMAND('I','T','+'))
{ {
x = GetTextScriptNo(gTS.p_read + 4); x = GetTextScriptNo(gTS.p_read + 4);
PlaySoundObject(38, 1); PlaySoundObject(38, SOUND_MODE_PLAY);
AddItemData(x); AddItemData(x);
gTS.p_read += 8; gTS.p_read += 8;
} }
@ -683,7 +683,7 @@ int TextScriptProc(void)
gNumberTextScript[1] = z; gNumberTextScript[1] = z;
#endif #endif
PlaySoundObject(38, 1); PlaySoundObject(38, SOUND_MODE_PLAY);
AddArmsData(w, x); AddArmsData(w, x);
gTS.p_read += 13; gTS.p_read += 13;
} }
@ -888,7 +888,7 @@ int TextScriptProc(void)
gTS.next_event = GetTextScriptNo(gTS.p_read + 4); gTS.next_event = GetTextScriptNo(gTS.p_read + 4);
gTS.p_read += 8; gTS.p_read += 8;
gTS.mode = 6; gTS.mode = 6;
PlaySoundObject(5, 1); PlaySoundObject(5, SOUND_MODE_PLAY);
gTS.wait = 0; gTS.wait = 0;
gTS.select = 0; gTS.select = 0;
bExit = TRUE; bExit = TRUE;
@ -1049,7 +1049,7 @@ int TextScriptProc(void)
else if (IS_COMMAND('S','O','U')) else if (IS_COMMAND('S','O','U'))
{ {
z = GetTextScriptNo(gTS.p_read + 4); z = GetTextScriptNo(gTS.p_read + 4);
PlaySoundObject(z, 1); PlaySoundObject(z, SOUND_MODE_PLAY);
gTS.p_read += 8; gTS.p_read += 8;
} }
else if (IS_COMMAND('C','M','U')) else if (IS_COMMAND('C','M','U'))
@ -1372,7 +1372,7 @@ int TextScriptProc(void)
} }
strcat(text[gTS.line % 4], c); strcat(text[gTS.line % 4], c);
PlaySoundObject(2, 1); PlaySoundObject(2, SOUND_MODE_PLAY);
gTS.wait_beam = 0; gTS.wait_beam = 0;
// Offset read and write positions // Offset read and write positions
@ -1459,7 +1459,7 @@ int TextScriptProc(void)
// Select option // Select option
if (gKeyTrg & gKeyOk) if (gKeyTrg & gKeyOk)
{ {
PlaySoundObject(18, 1); PlaySoundObject(18, SOUND_MODE_PLAY);
if (gTS.select == 1) if (gTS.select == 1)
{ {
@ -1475,13 +1475,13 @@ int TextScriptProc(void)
else if (gKeyTrg & gKeyLeft) else if (gKeyTrg & gKeyLeft)
{ {
gTS.select = 0; gTS.select = 0;
PlaySoundObject(1, 1); PlaySoundObject(1, SOUND_MODE_PLAY);
} }
// No // No
else if (gKeyTrg & gKeyRight) else if (gKeyTrg & gKeyRight)
{ {
gTS.select = 1; gTS.select = 1;
PlaySoundObject(1, 1); PlaySoundObject(1, SOUND_MODE_PLAY);
} }
} }
break; break;