Uncomment sound calls

This commit is contained in:
nukeykt 2019-09-22 00:47:55 +09:00 committed by Christoph Oelckers
parent fe7cbf87b7
commit bda7eb58f2
8 changed files with 27 additions and 22 deletions

View file

@ -1405,7 +1405,7 @@ void SetHiRes()
void DoClockBeep() void DoClockBeep()
{ {
for (int i = headspritestat[407]; i != -1; i = nextspritestat[i]) { for (int i = headspritestat[407]; i != -1; i = nextspritestat[i]) {
// TODO PlayFX2(StaticSound[kSound74], i); PlayFX2(StaticSound[kSound74], i);
} }
} }
@ -1421,7 +1421,7 @@ void DoRedAlert(int nVal)
{ {
if (nVal) if (nVal)
{ {
// TODO PlayFXAtXYZ(StaticSound[kSoundAlarm], sprite[i].x, sprite[i].y, sprite[i].z, sprite[i].sectnum); PlayFXAtXYZ(StaticSound[kSoundAlarm], sprite[i].x, sprite[i].y, sprite[i].z, sprite[i].sectnum);
AddFlash(sprite[i].sectnum, sprite[i].x, sprite[i].y, sprite[i].z, 192); AddFlash(sprite[i].sectnum, sprite[i].x, sprite[i].y, sprite[i].z, 192);
} }
} }
@ -2505,7 +2505,7 @@ void DoGameOverScene()
Clip(); Clip();
videoNextPage(); videoNextPage();
CinemaFadeIn(); CinemaFadeIn();
// TODO PlayGameOverSound(); PlayGameOverSound();
WaitAnyKey(3); WaitAnyKey(3);
FadeOut(0); FadeOut(0);
SetOverscan(kenpal); SetOverscan(kenpal);
@ -2544,7 +2544,7 @@ void DoTitle()
videoNextPage(); videoNextPage();
FadeIn(); FadeIn();
// TODO PlayLogoSound(); PlayLogoSound();
WaitAnyKey(2); WaitAnyKey(2);
@ -2588,7 +2588,7 @@ void DoTitle()
WaitNoKey(2, KeyFn1); WaitNoKey(2, KeyFn1);
if (time(0) & 0xF) { if (time(0) & 0xF) {
// TODO PlayGameOverSound(); PlayGameOverSound();
} }
else { else {
PlayLocalSound(StaticSound[61], 0); PlayLocalSound(StaticSound[61], 0);
@ -3255,7 +3255,7 @@ int DoSpiritHead()
if (esi < eax) if (esi < eax)
{ {
// SoundBigEntrance(); // TODO SoundBigEntrance();
AddGlow(sprite[nSpiritSprite].sectnum, 20); AddGlow(sprite[nSpiritSprite].sectnum, 20);
AddFlash( AddFlash(
sprite[nSpiritSprite].sectnum, sprite[nSpiritSprite].sectnum,

View file

@ -9,6 +9,7 @@
#include "move.h" #include "move.h"
#include "trigdat.h" #include "trigdat.h"
#include "init.h" #include "init.h"
#include "sound.h"
#include <assert.h> #include <assert.h>
#define kMaxFishes 128 #define kMaxFishes 128
@ -348,7 +349,7 @@ void FuncFish(int a, int nDamage, int nRun)
BuildFishLimb(nFish, i); BuildFishLimb(nFish, i);
} }
// TODO PlayFXAtXYZ(StaticSound[kSound40], sprite[nSprite].x, sprite[nSprite].y, sprite[nSprite].z, sprite[nSprite].sectnum); PlayFXAtXYZ(StaticSound[kSound40], sprite[nSprite].x, sprite[nSprite].y, sprite[nSprite].z, sprite[nSprite].sectnum);
DestroyFish(nFish); DestroyFish(nFish);
} }
else else

View file

@ -495,13 +495,11 @@ int CheckSectorSprites(short nSector, int nVal)
if (sprite[nSprite].statnum == 100 && PlayerList[GetPlayerFromSprite(nSprite)].nHealth <= 0) if (sprite[nSprite].statnum == 100 && PlayerList[GetPlayerFromSprite(nSprite)].nHealth <= 0)
{ {
/* TODO
PlayFXAtXYZ(StaticSound[kSoundJonFDie], PlayFXAtXYZ(StaticSound[kSoundJonFDie],
sprite[nSprite].x, sprite[nSprite].x,
sprite[nSprite].y, sprite[nSprite].y,
sprite[nSprite].z, sprite[nSprite].z,
sprite[nSprite].sectnum | 0x40FF); // TODO - check last param?? sprite[nSprite].sectnum | 0x40FF); // TODO - check last param??
*/
} }
} }
nSprite = nextspritesect[nSprite]; nSprite = nextspritesect[nSprite];
@ -737,7 +735,7 @@ void FuncElev(int a, int b, int nRun)
SetQuake(di, 30); SetQuake(di, 30);
} }
// TODO PlayFXAtXYZ(StaticSound[kSound26], sprite[di].x, sprite[di].y, sprite[di].z, sprite[di].sectnum); PlayFXAtXYZ(StaticSound[kSound26], sprite[di].x, sprite[di].y, sprite[di].z, sprite[di].sectnum);
} }
if (var_18 & 0x4) if (var_18 & 0x4)
@ -1500,7 +1498,7 @@ void DoFinale()
if (!RandomSize(2)) if (!RandomSize(2))
{ {
// TODO PlayFX2(StaticSound[kSound78] | 0x2000, nFinaleSpr); PlayFX2(StaticSound[kSound78] | 0x2000, nFinaleSpr);
for (int i = 0; i < nTotalPlayers; i++) { for (int i = 0; i < nTotalPlayers; i++) {
nQuake[i] = 1280; nQuake[i] = 1280;
@ -1675,7 +1673,7 @@ void ExplodeEnergyBlock(int nSprite)
sprite[nSprite].cstat = 0; sprite[nSprite].cstat = 0;
sprite[nSprite].xrepeat = 100; sprite[nSprite].xrepeat = 100;
// TODO PlayFX2(StaticSound[kSound78], nSprite); PlayFX2(StaticSound[kSound78], nSprite);
sprite[nSprite].xrepeat = 0; sprite[nSprite].xrepeat = 0;
@ -1888,7 +1886,7 @@ void ExplodeScreen(short nSprite)
} }
sprite[nSprite].cstat = 0x8000; sprite[nSprite].cstat = 0x8000;
// TODO PlayFX2(StaticSound[kSound78], nSprite); PlayFX2(StaticSound[kSound78], nSprite);
} }
void FuncObject(int a, int b, int nRun) void FuncObject(int a, int b, int nRun)

View file

@ -1275,7 +1275,7 @@ void FuncPlayer(int pA, int nDamage, int nRun)
sprite[nPlayerSprite].yvel = 0; sprite[nPlayerSprite].yvel = 0;
StopSpriteSound(nPlayerSprite); StopSpriteSound(nPlayerSprite);
// TODO PlayFXAtXYZ(StaticSound[kSoundJonFDie], sprite[nPlayerSprite].x, sprite[nPlayerSprite].y, sprite[nPlayerSprite].z, sprite[nPlayerSprite].sectnum |= 0x4000); // CHECKME PlayFXAtXYZ(StaticSound[kSoundJonFDie], sprite[nPlayerSprite].x, sprite[nPlayerSprite].y, sprite[nPlayerSprite].z, sprite[nPlayerSprite].sectnum |= 0x4000); // CHECKME
} }
else else
{ {
@ -1350,7 +1350,7 @@ void FuncPlayer(int pA, int nDamage, int nRun)
{ {
if (nPlayerPushSect[nPlayer] > -1) if (nPlayerPushSect[nPlayer] > -1)
{ {
// TODO StopSpriteSound(sBlockInfo[sector[nPlayerPushSect[nPlayer]].extra].nSprite); StopSpriteSound(sBlockInfo[sector[nPlayerPushSect[nPlayer]].extra].nSprite);
} }
nPlayerPushSound[nPlayer] = -1; nPlayerPushSound[nPlayer] = -1;

View file

@ -11,6 +11,7 @@
#include "trigdat.h" #include "trigdat.h"
#include "anims.h" #include "anims.h"
#include "player.h" #include "player.h"
#include "sound.h"
#include <assert.h> #include <assert.h>
#define kMaxQueens 1 #define kMaxQueens 1
@ -988,7 +989,7 @@ void FuncQueenHead(int a, int nDamage, int nRun)
if ((nMov & 0x3FFF) == nTarget) if ((nMov & 0x3FFF) == nTarget)
{ {
runlist_DamageEnemy(nTarget, nSprite, 10); runlist_DamageEnemy(nTarget, nSprite, 10);
// TODO D3PlayFX((StaticSound[kSoundQTail] | 0x2000)) & 0xFFFF, nSprite); D3PlayFX((StaticSound[kSoundQTail] | 0x2000) & 0xFFFF, nSprite);
sprite[nSprite].ang += RandomSize(9) + 768; sprite[nSprite].ang += RandomSize(9) + 768;
sprite[nSprite].ang &= kAngleMask; sprite[nSprite].ang &= kAngleMask;
@ -1573,14 +1574,12 @@ void FuncQueen(int a, int nDamage, int nRun)
sprite[nChunkSprite].picnum = 3126; sprite[nChunkSprite].picnum = 3126;
sprite[nChunkSprite].yrepeat = 100; sprite[nChunkSprite].yrepeat = 100;
sprite[nChunkSprite].xrepeat = 100; sprite[nChunkSprite].xrepeat = 100;
/* TODO
PlayFXAtXYZ( PlayFXAtXYZ(
StaticSound[40], StaticSound[40],
sprite[nSprite].x, sprite[nSprite].x,
sprite[nSprite].y, sprite[nSprite].y,
sprite[nSprite].z, sprite[nSprite].z,
sprite[nSprite].sectnum); sprite[nSprite].sectnum);
*/
BuildQueenHead(nQueen); BuildQueenHead(nQueen);
QueenList[nQueen].nAction++; QueenList[nQueen].nAction++;

View file

@ -234,7 +234,7 @@ int BuildSnake(short nPlayer, short zVal)
} }
} }
// TODO D3PlayFX(StaticSound[kSound6], var_24); D3PlayFX(StaticSound[kSound6], var_24);
} }
return nSprite; return nSprite;

View file

@ -116,4 +116,10 @@ void StopSpriteSound(short nSprite);
void StartSwirlies(); void StartSwirlies();
void UpdateSwirlies(); void UpdateSwirlies();
void PlayLogoSound(void);
void PlayTitleSound(void);
void PlayGameOverSound(void);
void SoundBigEntrance(void);
#endif #endif

View file

@ -4,6 +4,7 @@
#include "runlist.h" #include "runlist.h"
#include "engine.h" #include "engine.h"
#include "player.h" #include "player.h"
#include "sound.h"
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
@ -273,7 +274,7 @@ void FuncSwStepOn(int a, int, int nRun)
if (var_14 != sRunChannels[nChannel].c) if (var_14 != sRunChannels[nChannel].c)
{ {
short nWall = sector[nSector].wallptr; short nWall = sector[nSector].wallptr;
// TODO PlayFXAtXYZ(StaticSound[nSwitchSound], wall[nWall].x, wall[nWall].y, sector[nSector].floorz, nSector); PlayFXAtXYZ(StaticSound[nSwitchSound], wall[nWall].x, wall[nWall].y, sector[nSector].floorz, nSector);
assert(sRunChannels[nChannel].c < 8); assert(sRunChannels[nChannel].c < 8);
@ -439,7 +440,7 @@ void FuncSwPressSector(int a, int, int nRun)
if (SwitchData[nSwitch].field_12) if (SwitchData[nSwitch].field_12)
{ {
short nSprite = PlayerList[nPlayer].nSprite; short nSprite = PlayerList[nPlayer].nSprite;
// TODO PlayFXAtXYZ(StaticSound[nSwitchSound], sprite[nSprite].x, sprite[nSprite].y, 0, sprite[nSprite].sectnum); PlayFXAtXYZ(StaticSound[nSwitchSound], sprite[nSprite].x, sprite[nSprite].y, 0, sprite[nSprite].sectnum);
StatusMessage(300, "YOU NEED THE KEY FOR THIS DOOR"); StatusMessage(300, "YOU NEED THE KEY FOR THIS DOOR");
} }
@ -516,7 +517,7 @@ void FuncSwPressWall(int a, int, int nRun)
short nWall = SwitchData[nSwitch].nWall; short nWall = SwitchData[nSwitch].nWall;
short nSector = SwitchData[nSwitch].nSector; // CHECKME - where is this set?? short nSector = SwitchData[nSwitch].nSector; // CHECKME - where is this set??
// TODO PlayFXAtXYZ(StaticSound[nSwitchSound], wall[nWall].x, wall[nWall].y, 0, nSector); PlayFXAtXYZ(StaticSound[nSwitchSound], wall[nWall].x, wall[nWall].y, 0, nSector);
return; return;
} }