- give SW's sounds proper names and move their definition out of the EXE.

Also handle custom rolloff by the sound engine
This commit is contained in:
Christoph Oelckers 2023-05-26 23:27:46 +02:00
parent 0e64a38812
commit 1cb86af5f9
7 changed files with 2549 additions and 779 deletions

View file

@ -63,6 +63,7 @@ enum SICommands
SI_PitchSet, SI_PitchSet,
SI_PitchSetDuke, SI_PitchSetDuke,
SI_DukeFlags, SI_DukeFlags,
SI_SWFlags,
SI_Loop, SI_Loop,
SI_BloodRelVol, SI_BloodRelVol,
SI_Volume, SI_Volume,
@ -102,6 +103,7 @@ static const char *SICommandStrings[] =
"$pitchset", "$pitchset",
"$pitchsetduke", "$pitchsetduke",
"$dukeflags", "$dukeflags",
"$swflags",
"$loop", "$loop",
"$bloodrelvol", "$bloodrelvol",
"$volume", "$volume",
@ -157,7 +159,8 @@ static FSoundID S_AddSound(const char* logicalname, int lumpnum, FScanner* sc)
FSoundID S_AddSound(const char* logicalname, const char* lumpname, FScanner* sc) FSoundID S_AddSound(const char* logicalname, const char* lumpname, FScanner* sc)
{ {
int lump = fileSystem.CheckNumForFullName(lumpname, true, ns_sounds); int lump = fileSystem.CheckNumForFullName(lumpname, true, ns_sounds);
if (lump == -1 && sc) sc->ScriptMessage("%s: sound file not found", sc->String); if (lump == -1 && sc)
sc->ScriptMessage("%s: sound file not found", sc->String);
return S_AddSound(logicalname, lump, sc); return S_AddSound(logicalname, lump, sc);
} }
@ -468,15 +471,18 @@ static void S_AddSNDINFO (int lump)
case SI_DukeFlags: { case SI_DukeFlags: {
static const char* dukeflags[] = { "LOOP", "MSFX", "TALK", "GLOBAL", nullptr}; static const char* dukeflags[] = { "LOOP", "MSFX", "TALK", "GLOBAL", nullptr};
// dukesound <logical name> <flag> <flag> <flag>.. // dukeflags <logical name> <flag> <flag> <flag>..
// Sets a pitch range for the sound.
sc.MustGetString(); sc.MustGetString();
auto sfxid = soundEngine->FindSoundTentative(sc.String, DEFAULT_LIMIT); auto sfxid = soundEngine->FindSoundTentative(sc.String, DEFAULT_LIMIT);
int flags = 0; int flags = 0;
while (sc.GetString()) while (sc.GetString())
{ {
int bit = sc.MatchString(dukeflags); int bit = sc.MatchString(dukeflags);
if (bit == -1) break; if (bit == -1)
{
sc.UnGet();
break;
}
flags |= 1 << bit; flags |= 1 << bit;
} }
if (isDukeEngine()) if (isDukeEngine())
@ -497,6 +503,40 @@ static void S_AddSNDINFO (int lump)
} }
case SI_SWFlags: {
static const char* swflags[] = { "PLAYERVOICE", "PLAYERSPEECH", "LOOP", nullptr };
// swflags <logical name> <flag> <flag> <flag>..
sc.MustGetString();
auto sfxid = soundEngine->FindSoundTentative(sc.String, DEFAULT_LIMIT);
int flags = 0;
while (sc.GetString())
{
int bit = sc.MatchString(swflags);
if (bit == -1)
{
sc.UnGet();
break;
}
flags |= 1 << bit;
}
if (isSWALL())
{
auto sfx = soundEngine->GetWritableSfx(sfxid);
if (sfx->UserData.Size() < 1)
{
sfx->UserData.Resize(1);
}
sfx->UserData[0] = flags;
}
else
{
sc.ScriptMessage("'$swflags' is not available in the current game and will be ignored");
}
break;
}
case SI_Loop: { case SI_Loop: {
// loop <logical name> <start> <end> // loop <logical name> <start> <end>
// Sets loop points for the given sound in samples. Only really useful for WAV - for Ogg and FLAC use the metadata they can contain. // Sets loop points for the given sound in samples. Only really useful for WAV - for Ogg and FLAC use the metadata they can contain.

View file

@ -91,8 +91,8 @@ END_BLD_NS
static void SerializeSession(FSerializer& arc) static void SerializeSession(FSerializer& arc)
{ {
// In Duke and Blood we now have reliable sound names. // Only Exhumed still depends in indexed sounds.
if (isDukeEngine() || isBlood()) arc.SetUniqueSoundNames(); if (!isExhumed()) arc.SetUniqueSoundNames();
arc.ReadObjects(false); arc.ReadObjects(false);
SerializeMap(arc); SerializeMap(arc);

View file

@ -1399,20 +1399,20 @@ enum
short SoundAngle(int x, int y); short SoundAngle(int x, int y);
//void PlaySound(int num, short angle, short vol); //void PlaySound(int num, short angle, short vol);
int _PlaySound(int num, DSWActor* sprite, PLAYER* player, const DVector3 *const pos, int flags, int channel, EChanFlags sndflags); int _PlaySound(FSoundID num, DSWActor* sprite, PLAYER* player, const DVector3 *const pos, int flags, int channel, EChanFlags sndflags);
void InitAmbient(int num, DSWActor* actor); void InitAmbient(int num, DSWActor* actor);
inline void PlaySound(int num, PLAYER* player, int flags, int channel = 8, EChanFlags sndflags = CHANF_NONE) inline void PlaySound(int num, PLAYER* player, int flags, int channel = 8, EChanFlags sndflags = CHANF_NONE)
{ {
_PlaySound(num, nullptr, player, nullptr, flags | v3df_follow, channel, sndflags); _PlaySound(soundEngine->FindSoundByResID(num), nullptr, player, nullptr, flags | v3df_follow, channel, sndflags);
} }
inline void PlaySound(int num, int flags, int channel = 8, EChanFlags sndflags = CHANF_NONE) inline void PlaySound(int num, int flags, int channel = 8, EChanFlags sndflags = CHANF_NONE)
{ {
_PlaySound(num, nullptr, nullptr, nullptr, flags, channel, sndflags); _PlaySound(soundEngine->FindSoundByResID(num), nullptr, nullptr, nullptr, flags, channel, sndflags);
} }
inline void PlaySound(int num, const DVector3 &pos, int flags, int channel = 8, EChanFlags sndflags = CHANF_NONE) inline void PlaySound(int num, const DVector3 &pos, int flags, int channel = 8, EChanFlags sndflags = CHANF_NONE)
{ {
_PlaySound(num, nullptr, nullptr, &pos, flags, channel, sndflags); _PlaySound(soundEngine->FindSoundByResID(num), nullptr, nullptr, &pos, flags, channel, sndflags);
} }
int _PlayerSound(int num, PLAYER* pp); int _PlayerSound(int num, PLAYER* pp);
@ -2073,7 +2073,7 @@ inline bool PLAYER_MOVING(PLAYER* pp)
inline void PlaySound(int num, DSWActor* actor, int flags, int channel = 8, EChanFlags sndflags = CHANF_NONE) inline void PlaySound(int num, DSWActor* actor, int flags, int channel = 8, EChanFlags sndflags = CHANF_NONE)
{ {
_PlaySound(num, actor, nullptr, nullptr, flags, channel, sndflags); _PlaySound(soundEngine->FindSoundByResID(num), actor, nullptr, nullptr, flags, channel, sndflags);
} }
struct ANIM struct ANIM

View file

@ -56,27 +56,13 @@ enum EChanExFlags
CHANEXF_DONTPAN = 0x40000000, CHANEXF_DONTPAN = 0x40000000,
}; };
// Parentally locked sounds list enum ESoundFlags
int PLocked_Sounds[] =
{ {
483,328,334,335,338,478,450,454,452,453,456,457,458,455,460,462, SFLAG_PLAYERVOICE = 1,
461,464,466,465,467,463,342,371,254,347,350,432,488,489,490,76,339, SFLAG_PLAYERSPEECH = 2,
499,500,506,479,480,481,482,78,600,467,548,547,544,546,545,542,541,540, SFLAG_LOOP = 4
539,536,529,525,522,521,515,516,612,611,589,625,570,569,567,565,
558,557
}; };
//
// Includes digi.h to build the table
//
#define DIGI_TABLE
VOCstruct voc[] =
{
#include "digi.h"
};
#undef DIGI_TABLE
// //
// Includes ambient.h to build the table of ambient sounds for game // Includes ambient.h to build the table of ambient sounds for game
@ -116,7 +102,7 @@ enum
const int MAXLEVLDIST = 19000; // The higher the number, the further away you can hear sound const int MAXLEVLDIST = 19000; // The higher the number, the further away you can hear sound
short SoundDist(const DVector3& pos, int basedist) short SoundDist(const DVector3& pos, double basedist)
{ {
double tx, ty, tz; double tx, ty, tz;
double sqrdist; double sqrdist;
@ -127,12 +113,12 @@ short SoundDist(const DVector3& pos, int basedist)
if (basedist < 0) // if basedist is negative if (basedist < 0) // if basedist is negative
{ {
double decayshift = 2; double decayshift = 2;
int decay = abs(basedist) / DECAY_CONST; int decay = abs(int(basedist)) / DECAY_CONST;
for (int i = 0; i < decay; i++) for (int i = 0; i < decay; i++)
decayshift *= 2; decayshift *= 2;
if (fabs(double(basedist) / decayshift) >= distance) if (fabs(basedist / decayshift) >= distance)
distance = 0; distance = 0;
else else
distance *= decay; distance *= decay;
@ -153,38 +139,6 @@ short SoundDist(const DVector3& pos, int basedist)
return short(distance); return short(distance);
} }
//==========================================================================
//
// Calculate rolloff info.
//
//==========================================================================
FRolloffInfo GetRolloff(int basedist)
{
FRolloffInfo info;
if (basedist < 0) // if basedist is negative
{
double decayshift = 2;
int decay = abs(basedist) / DECAY_CONST;
for (int i = 0; i < decay; i++)
decayshift *= 2;
info.RolloffType = ROLLOFF_Doom;
info.MinDistance = (float)(-basedist / decayshift / 16.);
info.MaxDistance = MAXLEVLDIST / 16.f / decay;
}
else
{
info.RolloffType = ROLLOFF_Doom;
info.MinDistance = basedist / 16.f;
info.MaxDistance = info.MinDistance + MAXLEVLDIST / 16.f;
}
return info;
}
//========================================================================== //==========================================================================
// //
// //
@ -231,7 +185,6 @@ void StopAmbientSound(void)
void InitAmbient(int num, DSWActor* actor) void InitAmbient(int num, DSWActor* actor)
{ {
VOCstruct* vp;
int pitch = 0; int pitch = 0;
short angle, sound_dist; short angle, sound_dist;
int tx, ty, tz; int tx, ty, tz;
@ -250,11 +203,12 @@ void InitAmbient(int num, DSWActor* actor)
} }
return; return;
} }
auto vnum = FSoundID::fromInt(ambarray[num].diginame); auto vnum = soundEngine->FindSoundByResID(ambarray[num].diginame);
if (!soundEngine->isValidSoundId(vnum)) if (!soundEngine->isValidSoundId(vnum))
{ {
return; // linked sound does not exist. return; // linked sound does not exist.
} }
auto sfx = soundEngine->GetSfx(vnum);
auto amb = new AmbientSound; auto amb = new AmbientSound;
amb->spot = actor; amb->spot = actor;
@ -262,7 +216,7 @@ void InitAmbient(int num, DSWActor* actor)
amb->vocIndex = vnum; amb->vocIndex = vnum;
amb->ChanFlags = CHANF_TRANSIENT; amb->ChanFlags = CHANF_TRANSIENT;
if (ambarray[num].ambient_flags & v3df_dontpan) amb->ChanFlags |= EChanFlags::FromInt(CHANEXF_DONTPAN); if (ambarray[num].ambient_flags & v3df_dontpan) amb->ChanFlags |= EChanFlags::FromInt(CHANEXF_DONTPAN);
if (voc[vnum.index()].voc_flags & vf_loop) amb->ChanFlags |= CHANF_LOOP; if (sfx->UserData[0] & SFLAG_LOOP) amb->ChanFlags |= CHANF_LOOP;
amb->maxIndex = ambarray[num].maxtics; amb->maxIndex = ambarray[num].maxtics;
amb->curIndex = 0; amb->curIndex = 0;
amb->intermit = !!(ambarray[num].ambient_flags & v3df_intermit); amb->intermit = !!(ambarray[num].ambient_flags & v3df_intermit);
@ -296,15 +250,11 @@ static void RestartAmbient(AmbientSound* amb)
{ {
if (!SoundEnabled()) return; if (!SoundEnabled()) return;
auto& vp = voc[amb->vocIndex.index()]; auto sfx = soundEngine->GetSfx(amb->vocIndex);
auto rolloff = GetRolloff(vp.voc_distance);
int pitch = 0;
if (vp.pitch_hi <= vp.pitch_lo) pitch = vp.pitch_lo;
else pitch = vp.pitch_lo + (StdRandomRange(vp.pitch_hi - vp.pitch_lo));
amb->curIndex = PlayClock; amb->curIndex = PlayClock;
if (!soundEngine->IsSourcePlayingSomething(SOURCE_Ambient, amb, CHAN_BODY, amb->vocIndex)) if (!soundEngine->IsSourcePlayingSomething(SOURCE_Ambient, amb, CHAN_BODY, amb->vocIndex))
soundEngine->StartSound(SOURCE_Ambient, amb, nullptr, CHAN_BODY, EChanFlags::FromInt(amb->ChanFlags), amb->vocIndex, 1.f, ATTN_NORM, &rolloff, S_ConvertPitch(pitch)); soundEngine->StartSound(SOURCE_Ambient, amb, nullptr, CHAN_BODY, EChanFlags::FromInt(amb->ChanFlags), amb->vocIndex, 1.f, ATTN_NORM);
} }
//========================================================================== //==========================================================================
// //
@ -348,7 +298,7 @@ static void DoTimedSound(AmbientSound* amb)
int ambid = RandomizeAmbientSpecials(amb->ambIndex); int ambid = RandomizeAmbientSpecials(amb->ambIndex);
if (ambid != -1) if (ambid != -1)
{ {
amb->vocIndex = FSoundID::fromInt(ambarray[ambid].diginame); amb->vocIndex = soundEngine->FindSoundByResID(ambarray[ambid].diginame);
amb->maxIndex = StdRandomRange(ambarray[ambid].maxtics); amb->maxIndex = StdRandomRange(ambarray[ambid].maxtics);
} }
RestartAmbient(amb); RestartAmbient(amb);
@ -369,9 +319,10 @@ static void UpdateAmbients()
for (auto& amb : ambients) for (auto& amb : ambients)
{ {
auto spot = amb->spot; auto spot = amb->spot;
auto sdist = SoundDist(spot->spr.pos, voc[amb->vocIndex.index()].voc_distance); auto sfx = soundEngine->GetSfx(amb->vocIndex);
auto sdist = SoundDist(spot->spr.pos, sfx->Rolloff.MinDistance * 16);
if (sdist < 255 && amb->vocIndex.index() == DIGI_WHIPME) if (sdist < 255 && sfx->ResourceId == DIGI_WHIPME)
{ {
PLAYER* pp = Player + screenpeek; PLAYER* pp = Player + screenpeek;
if (!FAFcansee(spot->spr.pos, spot->sector(), pp->actor->getPosWithOffsetZ(), pp->cursector)) if (!FAFcansee(spot->spr.pos, spot->sector(), pp->actor->getPosWithOffsetZ(), pp->cursector))
@ -481,20 +432,15 @@ void InitFX(void)
{ {
auto &S_sfx = soundEngine->GetSounds(); auto &S_sfx = soundEngine->GetSounds();
S_sfx.Resize(countof(voc)); for (auto& sfx : S_sfx)
for (size_t i = 1; i < countof(voc); i++)
{ {
auto& entry = voc[i]; if (sfx.UserData.Size() < 1)
auto lump = S_LookupSound(entry.name);
if (lump > 0)
{ {
auto& newsfx = S_sfx[i]; sfx.UserData.Resize(1);
newsfx.name = entry.name; sfx.UserData[0] = 0;
newsfx.lumpnum = lump;
newsfx.NearLimit = 6;
newsfx.bTentative = false;
} }
} }
soundEngine->HashSounds(); soundEngine->HashSounds();
for (auto& sfx : S_sfx) for (auto& sfx : S_sfx)
{ {
@ -581,7 +527,8 @@ void SWSoundEngine::CalcPosVel(int type, const void* source, const float pt[3],
{ {
// For unpanned sounds the volume must be set directly and the position taken from the listener. // For unpanned sounds the volume must be set directly and the position taken from the listener.
*pos = campos; *pos = campos;
auto sdist = SoundDist(vPos, voc[chanSound.index()].voc_distance); auto sfx = soundEngine->GetSfx(chanSound);
auto sdist = SoundDist(vPos, sfx->Rolloff.MinDistance * 16);
if (chan) SetVolume(chan, (255 - sdist) * (1 / 255.f)); if (chan) SetVolume(chan, (255 - sdist) * (1 / 255.f));
} }
@ -637,15 +584,15 @@ void GameInterface::UpdateSounds(void)
// //
//========================================================================== //==========================================================================
int _PlaySound(int num, DSWActor* actor, PLAYER* pp, const DVector3* const ppos, int flags, int channel, EChanFlags cflags) int _PlaySound(const FSoundID sndid, DSWActor* actor, PLAYER* pp, const DVector3* const ppos, int flags, int channel, EChanFlags cflags)
{ {
if (Prediction || !SoundEnabled() || !soundEngine->isValidSoundId(FSoundID::fromInt(num))) if (Prediction || !SoundEnabled() || !soundEngine->isValidSoundId(sndid))
return -1; return -1;
auto sps = actor; auto sps = actor;
auto pos = ppos ? *ppos : DVector3(0, 0, 0); auto pos = ppos ? *ppos : DVector3(0, 0, 0);
auto vp = &voc[num]; auto sfx = soundEngine->GetSfx(sndid);
int sourcetype = SOURCE_None; int sourcetype = SOURCE_None;
cflags |= channel == 8 ? CHANF_OVERLAP : CHANF_NONE; // for the default channel we do not want to have sounds stopping each other. cflags |= channel == 8 ? CHANF_OVERLAP : CHANF_NONE; // for the default channel we do not want to have sounds stopping each other.
void* source = nullptr; void* source = nullptr;
@ -685,15 +632,10 @@ int _PlaySound(int num, DSWActor* actor, PLAYER* pp, const DVector3* const ppos,
//if (flags & v3df_doppler) cflags |= EChanFlags::FromInt(CHANEXF_NODOPPLER); // intentionally not implemented //if (flags & v3df_doppler) cflags |= EChanFlags::FromInt(CHANEXF_NODOPPLER); // intentionally not implemented
//if (flags & v3df_dontpan) cflags |= EChanFlags::FromInt(CHANEXF_DONTPAN); // disabled due to poor use //if (flags & v3df_dontpan) cflags |= EChanFlags::FromInt(CHANEXF_DONTPAN); // disabled due to poor use
if (vp->voc_flags & vf_loop) cflags |= CHANF_LOOP; // with the new sound engine these can just be started and don't have to be stopped ever. if (sfx->UserData[0] & SFLAG_LOOP) cflags |= CHANF_LOOP; // with the new sound engine these can just be started and don't have to be stopped ever.
int pitch = 0;
if (vp->pitch_hi <= vp->pitch_lo) pitch = vp->pitch_lo;
else if (vp->pitch_hi != vp->pitch_lo) pitch = vp->pitch_lo + (StdRandomRange(vp->pitch_hi - vp->pitch_lo));
auto rolloff = GetRolloff(vp->voc_distance);
FVector3 spos = GetSoundPos(pos); FVector3 spos = GetSoundPos(pos);
auto chan = soundEngine->StartSound(sourcetype, source, &spos, channel, cflags, FSoundID::fromInt(num), 1.f, ATTN_NORM, &rolloff, S_ConvertPitch(pitch)); auto chan = soundEngine->StartSound(sourcetype, source, &spos, channel, cflags, sndid, 1.f, ATTN_NORM);
if (chan && sourcetype == SOURCE_Unattached) chan->Source = sps; // needed for sound termination. if (chan && sourcetype == SOURCE_Unattached) chan->Source = sps; // needed for sound termination.
return 1; return 1;
} }
@ -811,7 +753,6 @@ void PlaySpriteSound(DSWActor* actor, int attrib_ndx, int flags)
int _PlayerSound(int num, PLAYER* pp) int _PlayerSound(int num, PLAYER* pp)
{ {
int handle; int handle;
VOCstruct* vp;
if (Prediction) if (Prediction)
return 0; return 0;
@ -821,24 +762,25 @@ int _PlayerSound(int num, PLAYER* pp)
return 0; return 0;
} }
if (num < 0 || num >= DIGI_MAX || !soundEngine->isValidSoundId(FSoundID::fromInt(num)) || !SoundEnabled()) auto sndid = soundEngine->FindSoundByResID(num);
if (num < 0 || num >= DIGI_MAX || !soundEngine->isValidSoundId(sndid) || !SoundEnabled())
return 0; return 0;
if (pp->Flags & (PF_DEAD)) return 0; // You're dead, no talking! if (pp->Flags & (PF_DEAD)) return 0; // You're dead, no talking!
auto sfx = soundEngine->GetSfx(sndid);
// If this is a player voice and he's already yacking, forget it. // If this is a player voice and he's already yacking, forget it.
vp = &voc[num];
// Not a player voice, bail. // Not a player voice, bail.
if (vp->priority != PRI_PLAYERVOICE && vp->priority != PRI_PLAYERDEATH && vp->priority != PRI_PLAYERSPEECH) if (!(sfx->UserData[0] & (SFLAG_PLAYERSPEECH|SFLAG_PLAYERVOICE)))
return 0; return 0;
// Don't talk if not allowed to. // Don't talk if not allowed to.
if (vp->priority == PRI_PLAYERSPEECH && !snd_speech) if ((sfx->UserData[0] & SFLAG_PLAYERSPEECH) && !snd_speech)
return 0; return 0;
// The surfacing sound should not block other player speech. // The surfacing sound should not block other player speech.
if (soundEngine->IsSourcePlayingSomething(SOURCE_Player, pp, CHAN_VOICE, FSoundID::fromInt(DIGI_SURFACE))) if (soundEngine->IsSourcePlayingSomething(SOURCE_Player, pp, CHAN_VOICE, soundEngine->FindSoundByResID(DIGI_SURFACE)))
{ {
soundEngine->StopSound(SOURCE_Player, pp, CHAN_VOICE); soundEngine->StopSound(SOURCE_Player, pp, CHAN_VOICE);
} }
@ -846,7 +788,7 @@ int _PlayerSound(int num, PLAYER* pp)
// He wasn't talking, but he will be now. // He wasn't talking, but he will be now.
if (!soundEngine->IsSourcePlayingSomething(SOURCE_Player, pp, CHAN_VOICE)) if (!soundEngine->IsSourcePlayingSomething(SOURCE_Player, pp, CHAN_VOICE))
{ {
soundEngine->StartSound(SOURCE_Player, pp, nullptr, CHAN_VOICE, 0, FSoundID::fromInt(num), 1.f, ATTN_NORM); soundEngine->StartSound(SOURCE_Player, pp, nullptr, CHAN_VOICE, 0, soundEngine->FindSoundByResID(num), 1.f, ATTN_NORM);
} }
return 0; return 0;
@ -854,7 +796,7 @@ int _PlayerSound(int num, PLAYER* pp)
void StopPlayerSound(PLAYER* pp, int which) void StopPlayerSound(PLAYER* pp, int which)
{ {
soundEngine->StopSound(SOURCE_Player, pp, CHAN_VOICE, FSoundID::fromInt(which)); soundEngine->StopSound(SOURCE_Player, pp, CHAN_VOICE, soundEngine->FindSoundByResID(which));
} }
bool SoundValidAndActive(DSWActor* spr, int channel) bool SoundValidAndActive(DSWActor* spr, int channel)
@ -1000,11 +942,11 @@ void StopFX()
DEFINE_ACTION_FUNCTION(_SW, PlaySound) DEFINE_ACTION_FUNCTION(_SW, PlaySound)
{ {
PARAM_PROLOGUE; PARAM_PROLOGUE;
PARAM_INT(sound); PARAM_SOUND(sound);
PARAM_INT(vflags); PARAM_INT(vflags);
PARAM_INT(channel); PARAM_INT(channel);
PARAM_INT(cflags); PARAM_INT(cflags);
PlaySound(sound, vflags, channel, EChanFlags::FromInt(cflags)); _PlaySound(sound, nullptr, nullptr, nullptr, vflags, channel, EChanFlags::FromInt(cflags));
return 0; return 0;
} }

File diff suppressed because it is too large Load diff

View file

@ -122,7 +122,7 @@ struct SW native
TFLAG_BUNNYFRIENDLY = 1, TFLAG_BUNNYFRIENDLY = 1,
}; };
native static void PlaySound(int sound, int flags, int channel = CHAN_AUTO, int cflags = 0); native static void PlaySound(Sound snd, int flags, int channel = CHAN_AUTO, int cflags = 0);
native static void StopSound(); native static void StopSound();
native static bool IsSoundPlaying(int channel); // soundEngine.IsSourcePlayingSomething(SOURCE_None, nullptr, CHAN_VOICE)) native static bool IsSoundPlaying(int channel); // soundEngine.IsSourcePlayingSomething(SOURCE_None, nullptr, CHAN_VOICE))
native static void PlaySong(int trackid); native static void PlaySong(int trackid);
@ -309,642 +309,3 @@ struct SWPlayer native
native int Health(); native int Health();
native int MaxUserHealth(); native int MaxUserHealth();
} }
struct SWSnd native
{
enum ESounds
{
DIGI_NULL= 0,
DIGI_SWORDSWOOSH= 1,
DIGI_STAR= 2,
DIGI_STARCLINK= 3,
DIGI_STARWIZ= 4,
DIGI_UZIFIRE= 5,
DIGI_RICHOCHET1= 6,
DIGI_RICHOCHET2= 7,
DIGI_REMOVECLIP= 8,
DIGI_REPLACECLIP= 9,
DIGI_SHELL= 10,
DIGI_RIOTFIRE= 11,
DIGI_RIOTFIRE2= 12,
DIGI_RIOTRELOAD= 13,
DIGI_BOLTEXPLODE= 14,
DIGI_BOLTWIZ= 15,
DIGI_30MMFIRE= 16,
DIGI_30MMRELOAD= 17,
DIGI_30MMEXPLODE= 18,
DIGI_30MMWIZ= 19,
DIGI_HEADFIRE= 20,
DIGI_HEADSHOTWIZ= 21,
DIGI_HEADSHOTHIT= 22,
DIGI_MINETHROW= 23,
DIGI_MINEBOUNCE= 24,
DIGI_MINEBLOW= 25,
DIGI_MINEBEEP= 26,
DIGI_HEARTBEAT= 27,
DIGI_HEARTFIRE= 28,
DIGI_HEARTWIZ= 29,
DIGI_MISSLFIRE= 30,
DIGI_MISSLEXP= 31,
DIGI_RFWIZ= 32,
DIGI_NAPFIRE= 33,
DIGI_NAPWIZ= 34,
DIGI_NAPPUFF= 35,
DIGI_MIRVFIRE= 36,
DIGI_MIRVWIZ= 37,
DIGI_SPIRALFIRE= 38,
DIGI_SPIRALWIZ= 39,
DIGI_MAGIC1= 40,
DIGI_MAGIC2= 41,
DIGI_MAGIC3= 42,
DIGI_MAGIC4= 43,
DIGI_MAGIC5= 44,
DIGI_MAGIC6= 45,
DIGI_MAGIC7= 46,
DIGI_SWCLOAKUNCLOAK= 47,
DIGI_DHVOMIT= 48,
DIGI_DHCLUNK= 49,
DIGI_DHSQUISH= 50,
DIGI_NULL_DHSQUISH= 50,
DIGI_PROJECTILELAVAHIT=51,
DIGI_PROJECTILEWATERHIT=52,
DIGI_KEY= 53,
DIGI_ITEM= 54,
DIGI_BIGITEM= 55,
DIGI_BODYFALL1= 56,
DIGI_HITGROUND= 57,
DIGI_BODYSQUISH1= 58,
DIGI_BODYBURN= 59,
DIGI_BODYBURNSCREAM= 60,
DIGI_BODYCRUSHED1= 61,
DIGI_BODYHACKED1= 62,
DIGI_BODYSINGED= 63,
DIGI_DROWN= 64,
DIGI_SCREAM1= 65,
DIGI_SCREAM2= 66,
DIGI_SCREAM3= 67,
DIGI_HIT1= 68,
DIGI_ELECTRICUTE1= 69,
DIGI_REMOVEME= 70,
DIGI_IMPALED= 71,
DIGI_OOF1= 72,
DIGI_ACTORBODYFALL1= 73,
IGI_ACTORHITGROUND= 74,
DIGI_COOLIEEXPLODE= 75,
DIGI_COOLIESCREAM= 76,
DIGI_COOLIEALERT= 77,
DIGI_COOLIEAMBIENT= 78,
DIGI_COOLIEPAIN= 79,
DIGI_CGMATERIALIZE= 80,
DIGI_CGALERT= 81,
DIGI_CGTHIGHBONE= 82,
DIGI_CGAMBIENT= 83,
DIGI_CGPAIN= 84,
DIGI_CGMAGIC= 85,
DIGI_CGMAGICHIT= 86,
DIGI_CGSCREAM= 87,
DIGI_NINJAAMBIENT= 88,
DIGI_NINJASTAR= 89,
DIGI_NINJAPAIN= 90,
DIGI_NINJASCREAM= 91,
DIGI_NINJAALERT= 92,
DIGI_NINJAUZIATTACK= 93,
DIGI_NINJARIOTATTACK= 94,
DIGI_RIPPERAMBIENT= 95,
DIGI_RIPPERALERT= 96,
DIGI_RIPPERATTACK= 97,
DIGI_RIPPERPAIN= 98,
DIGI_RIPPERSCREAM= 99,
DIGI_RIPPERHEARTOUT= 100,
DIGI_GRDAMBIENT= 101,
DIGI_GRDALERT= 102,
DIGI_GRDPAIN= 103,
DIGI_GRDSCREAM= 104,
DIGI_GRDFIREBALL= 105,
DIGI_GRDSWINGAXE= 106,
DIGI_GRDAXEHIT= 107,
DIGI_SPAMBIENT= 108,
DIGI_SPALERT= 109,
DIGI_SPPAIN= 110,
DIGI_SPSCREAM= 111,
DIGI_SPBLADE= 112,
DIGI_SPELEC= 113,
DIGI_SPTELEPORT= 114,
DIGI_AHAMBIENT= 115,
DIGI_AHSCREAM= 116,
DIGI_AHEXPLODE= 117,
DIGI_AHSWOOSH= 118,
DIGI_HORNETBUZZ= 119,
DIGI_HORNETSTING= 120,
DIGI_HORNETPAIN= 121,
DIGI_HORNETDEATH= 122,
DIGI_SERPAMBIENT= 123,
DIGI_SERPALERT= 124,
DIGI_SERPPAIN= 125,
DIGI_SERPSCREAM= 126,
DIGI_SERPDEATHEXPLODE=127,
DIGI_SERPSWORDATTACK= 128,
DIGI_SERPMAGICLAUNCH= 129,
DIGI_SERPSUMMONHEADS= 130,
DIGI_SERPTAUNTYOU= 131,
DIGI_LAVABOSSAMBIENT= 132,
DIGI_LAVABOSSSWIM= 133,
DIGI_LAVABOSSRISE= 134,
DIGI_LAVABOSSALERT= 135,
DIGI_LAVABOSSFLAME= 136,
DIGI_LAVABOSSMETEOR= 137,
DIGI_LAVABOSSMETEXP= 138,
DIGI_LAVABOSSPAIN= 139,
DIGI_LAVABOSSSIZZLE= 140,
DIGI_LAVABOSSEXPLODE= 141,
DIGI_BOATSTART= 142,
DIGI_BOATRUN= 143,
DIGI_BOATSTOP= 144,
DIGI_BOATFIRE= 145,
DIGI_TANKSTART= 146,
DIGI_TANKRUN= 147,
DIGI_TANKSTOP= 148,
DIGI_TANKIDLE= 149,
DIGI_TANKFIRE= 150,
DIGI_TRUKRUN= 151,
DIGI_TRUKIDLE= 152,
DIGI_SUBRUN= 153,
DIGI_SUBIDLE= 154,
DIGI_SUBDOOR= 155,
DIGI_BOMBRFLYING= 156,
DIGI_BOMBRDROPBOMB= 157,
DIGI_BUBBLES= 158,
DIGI_CHAIN= 159,
DIGI_CHAINDOOR= 160,
DIGI_CRICKETS= 161,
DIGI_WOODDOOROPEN= 162,
DIGI_WOODDOORCLOSE= 163,
DIGI_METALDOOROPEN= 164,
DIGI_METALDOORCLOSE= 165,
DIGI_SLIDEDOOROPEN= 166,
DIGI_SLIDEDOORCLOSE= 167,
DIGI_STONEDOOROPEN= 168,
DIGI_STONEDOORCLOSE= 169,
DIGI_SQUEAKYDOOROPEN= 170,
DIGI_SQUEAKYDOORCLOSE=171,
DIGI_DRILL= 172,
DIGI_CAVEDRIP1= 173,
DIGI_CAVEDRIP2= 174,
DIGI_DRIP= 175,
DIGI_WATERFALL1= 176,
DIGI_WATERFALL2= 177,
DIGI_WATERFLOW1= 178,
DIGI_WATERFLOW2= 179,
DIGI_ELEVATOR= 180,
DIGI_SMALLEXP= 181,
DIGI_MEDIUMEXP= 182,
DIGI_LARGEEXP= 183,
DIGI_HUGEEXP= 184,
DIGI_NULL_HUGEEXP= 184,
DIGI_FIRE1= 185,
DIGI_FIRE2= 186,
DIGI_FIREBALL1= 187,
DIGI_FIREBALL2= 188,
DIGI_GEAR1= 189,
DIGI_GONG= 190,
DIGI_LAVAFLOW1= 191,
DIGI_MACHINE1= 192,
DIGI_MUBBUBBLES1= 193,
DIGI_EARTHQUAKE= 194,
DIGI_SEWERFLOW1= 195,
DIGI_SPLASH1= 196,
DIGI_STEAM1= 197,
DIGI_VOLCANOSTEAM1= 198,
DIGI_STOMPER= 199,
DIGI_SWAMP= 200,
DIGI_REGULARSWITCH= 201,
DIGI_BIGSWITCH= 202,
DIGI_STONESWITCH= 203,
DIGI_GLASSSWITCH= 204,
DIGI_HUGESWITCH= 205,
DIGI_THUNDER= 206,
DIGI_TELEPORT= 207,
DIGI_UNDERWATER= 208,
DIGI_UNLOCK= 209,
DIGI_SQUEAKYVALVE= 210,
DIGI_VOID1= 211,
DIGI_VOID2= 212,
DIGI_VOID3= 213,
DIGI_VOID4= 214,
DIGI_VOID5= 215,
DIGI_ERUPTION= 216,
DIGI_VOLCANOPROJECTILE= 217,
DIGI_LIGHTWIND= 218,
DIGI_STRONGWIND= 219,
DIGI_BREAKINGWOOD= 220,
DIGI_BREAKSTONES= 221,
DIGI_ENGROOM1= 222,
DIGI_ENGROOM2= 223,
DIGI_ENGROOM3= 224,
DIGI_ENGROOM4= 225,
DIGI_ENGROOM5= 226,
DIGI_BREAKGLASS= 227,
DIGI_MUSSTING= 228,
DIGI_HELI= 229,
DIGI_BIGHART= 230,
DIGI_WIND4= 231,
DIGI_SPOOKY1= 232,
DIGI_DRILL1= 233,
DIGI_JET= 234,
DIGI_DRUMCHANT= 235,
DIGI_BUZZZ= 236,
DIGI_CHOP_CLICK= 237,
DIGI_SWORD_UP= 238,
DIGI_UZI_UP= 239,
DIGI_SHOTGUN_UP= 240,
DIGI_ROCKET_UP= 241,
DIGI_GRENADE_UP= 242,
DIGI_RAIL_UP= 243,
DIGI_MINE_UP= 244,
DIGI_TAUNTAI1= 246,
DIGI_TAUNTAI2= 247,
DIGI_TAUNTAI3= 248,
DIGI_TAUNTAI4= 249,
DIGI_TAUNTAI5= 250,
DIGI_TAUNTAI6= 251,
DIGI_TAUNTAI7= 252,
DIGI_TAUNTAI8= 253,
DIGI_TAUNTAI9= 254,
DIGI_TAUNTAI10= 255,
DIGI_PLAYERPAIN1= 256,
DIGI_PLAYERPAIN2= 257,
DIGI_PLAYERPAIN3= 258,
DIGI_PLAYERPAIN4= 259,
DIGI_PLAYERPAIN5= 260,
DIGI_PLAYERYELL1= 261,
DIGI_PLAYERYELL2= 262,
DIGI_PLAYERYELL3= 263,
DIGI_SEARCHWALL= 264,
DIGI_NOURINAL= 265,
DIGI_FALLSCREAM= 266,
DIGI_GOTITEM1= 267,
DIGI_LASTPLAYERVOICE= 268,
DIGI_RAILFIRE= 269,
DIGI_NULL_RAILFIRE= 269,
DIGI_RAILREADY= 270,
DIGI_RAILPWRUP= 271,
DIGI_NUCLEAREXP= 272,
DIGI_NUKESTDBY= 273,
DIGI_NUKECDOWN= 274,
DIGI_NUKEREADY= 275,
DIGI_CHEMGAS= 276,
DIGI_CHEMBOUNCE= 277,
DIGI_THROW= 278,
DIGI_PULL= 279,
DIGI_MINEARM= 280,
DIGI_HEARTDOWN= 281,
DIGI_TOOLBOX= 282,
DIGI_NULL_TOOLBOX= 282,
DIGI_GASPOP= 283,
DIGI_40MMBNCE= 284,
DIGI_BURGLARALARM= 285,
DIGI_CARALARM= 286,
DIGI_CARALARMOFF= 287,
DIGI_CALTROPS= 288,
DIGI_NIGHTON= 289,
DIGI_NIGHTOFF= 290,
DIGI_SHOTSHELLSPENT= 291,
DIGI_BUSSKID= 292,
DIGI_BUSCRASH= 293,
DIGI_BUSENGINE= 294,
DIGI_ARMORHIT= 295,
DIGI_ASIREN1= 296,
DIGI_FIRETRK1= 297,
DIGI_TRAFFIC1= 298,
DIGI_TRAFFIC2= 299,
DIGI_TRAFFIC3= 300,
DIGI_TRAFFIC4= 301,
DIGI_TRAFFIC5= 302,
DIGI_TRAFFIC6= 303,
DIGI_HELI1= 304,
DIGI_JET1= 305,
DIGI_MOTO1= 306,
DIGI_MOTO2= 307,
DIGI_NEON1= 308,
DIGI_SUBWAY= 309,
DIGI_TRAIN1= 310,
DIGI_COINS= 311,
DIGI_SWORDCLANK= 312,
DIGI_RIPPER2AMBIENT= 313,
DIGI_RIPPER2ALERT= 314,
DIGI_RIPPER2ATTACK= 315,
DIGI_RIPPER2PAIN= 316,
DIGI_RIPPER2SCREAM= 317,
DIGI_RIPPER2HEARTOUT=318,
DIGI_M60= 319,
DIGI_SUMOSCREAM= 320,
DIGI_SUMOALERT= 321,
DIGI_SUMOAMBIENT= 322,
DIGI_SUMOPAIN= 323,
DIGI_RAMUNLOCK= 324,
DIGI_CARDUNLOCK= 325,
DIGI_ANCIENTSECRET= 326,
DIGI_AMERICANDRIVER= 327,
DIGI_DRIVELIKEBABOON= 328,
DIGI_BURNBABY= 329,
DIGI_LIKEBIGWEAPONS= 330,
DIGI_COWABUNGA= 331,
DIGI_NOCHARADE= 332,
DIGI_TIMETODIE= 333,
DIGI_EATTHIS= 334,
DIGI_FIRECRACKERUPASS=335,
DIGI_HOLYCOW= 336,
DIGI_HOLYPEICESOFCOW= 337,
DIGI_HOLYSHIT= 338,
DIGI_HOLYPEICESOFSHIT=339,
DIGI_PAYINGATTENTION= 340,
DIGI_EVERYBODYDEAD= 341,
DIGI_KUNGFU= 342,
DIGI_HOWYOULIKEMOVE= 343,
DIGI_NOMESSWITHWANG= 344,
DIGI_RAWREVENGE= 345,
DIGI_YOULOOKSTUPID= 346,
DIGI_TINYDICK= 347,
DIGI_NOTOURNAMENT= 348,
DIGI_WHOWANTSWANG= 349,
DIGI_MOVELIKEYAK= 350,
DIGI_ALLINREFLEXES= 351,
DIGI_EVADEFOREVER= 352,
DIGI_MRFLY= 353,
DIGI_SHISEISI= 354,
DIGI_LIKEFIREWORKS= 355,
DIGI_LIKEHIROSHIMA= 356,
DIGI_LIKENAGASAKI= 357,
DIGI_LIKEPEARL= 358,
DIGI_IAMSHADOW= 359,
DIGI_ILIKENUKES= 360,
DIGI_ILIKESWORD= 361,
DIGI_ILIKESHURIKEN= 362,
DIGI_BADLUCK= 363,
DIGI_NOMOVIEMRCHAN= 364,
DIGI_REALLIFEMRCHAN= 365,
DIGI_NOLIKEMUSIC= 366,
DIGI_NODIFFERENCE= 367,
DIGI_NOFEAR= 368,
DIGI_NOPAIN= 369,
DIGI_NOREPAIRMAN= 370,
DIGI_SONOFABITCH= 371,
DIGI_PAINFORWEAK= 372,
DIGI_GOSPEEDY= 373,
DIGI_GETTINGSTIFF= 374,
DIGI_TOMBRAIDER= 375,
DIGI_STICKYGOTU1= 376,
DIGI_STICKYGOTU2= 377,
DIGI_STICKYGOTU3= 378,
DIGI_STICKYGOTU4= 379,
DIGI_SWORDGOTU1= 380,
DIGI_SWORDGOTU2= 381,
DIGI_SWORDGOTU3= 382,
DIGI_HURTBAD1= 383,
DIGI_HURTBAD2= 384,
DIGI_HURTBAD3= 385,
DIGI_HURTBAD4= 386,
DIGI_HURTBAD5= 387,
DIGI_TOILETGIRLSCREAM= 388,
DIGI_TOILETGIRLALERT= 389,
DIGI_TOILETGIRLAMBIENT=390,
DIGI_TOILETGIRLPAIN= 391,
DIGI_TOILETGIRLTAUNT1= 392,
DIGI_TOILETGIRLTAUNT2= 393,
DIGI_SUMOFART= 394,
DIGI_GIBS1= 395,
DIGI_GIBS2= 396,
DIGI_BIRDS1= 397,
DIGI_BIRDS2= 398,
DIGI_TOILET= 399,
DIGI_FORKLIFTIDLE= 400,
DIGI_FORKLIFTRUN= 401,
DIGI_TOYCAR= 402,
DIGI_UZIMATIC= 403,
DIGI_COMPUTERPOWER= 404,
DIGI_GENERATORON= 405,
DIGI_GENERATORRUN= 406,
DIGI_BIGDRILL= 407,
DIGI_FLUORLIGHT= 408,
DIGI_AMOEBA= 409,
DIGI_BODYFALL2= 410,
DIGI_GIBS3= 411,
DIGI_NINJACHOKE= 412,
DIGI_TRAIN3= 413,
DIGI_TRAINR02= 414,
DIGI_TRAIN8= 415,
DIGI_TRASHLID= 416,
DIGI_GETMEDKIT= 417,
DIGI_AHH= 418,
DIGI_PALARM= 419,
DIGI_PFLIP= 420,
DIGI_PROLL1= 421,
DIGI_PROLL2= 422,
DIGI_PROLL3= 423,
DIGI_BUNNYATTACK= 424,
DIGI_BUNNYDIE1= 425,
DIGI_BUNNYDIE2= 426,
DIGI_BUNNYDIE3= 427,
DIGI_BUNNYAMBIENT= 428,
DIGI_STONESLIDE= 429,
DIGI_NINJAINHALF= 430,
DIGI_RIPPER2CHEST= 431,
DIGI_WHIPME= 432,
DIGI_ENDLEV= 433,
DIGI_MDALARM= 434,
DIGI_BREAKMETAL= 435,
DIGI_BREAKDEBRIS= 436,
DIGI_BREAKMARBELS= 437,
DIGI_BANZAI= 438,
DIGI_HAHA1= 439,
DIGI_HAHA2= 440,
DIGI_HAHA3= 441,
DIGI_ITEM_SPAWN= 442,
DIGI_NOREPAIRMAN2= 443,
DIGI_NOPOWER= 444,
DIGI_DOUBLEUZI= 445,
DIGI_NOTORDBUNNY= 446,
DIGI_CANBEONLYONE= 447,
DIGI_MIRROR1= 448,
DIGI_MIRROR2= 449,
DIGI_HITTINGWALLS= 450,
DIGI_GOTRAILGUN= 451,
DIGI_RABBITHUMP1= 452,
DIGI_RABBITHUMP2= 453,
DIGI_RABBITHUMP3= 454,
DIGI_RABBITHUMP4= 455,
DIGI_FAGRABBIT1= 456,
DIGI_FAGRABBIT2= 457,
DIGI_FAGRABBIT3= 458,
DIGI_STINKLIKEBABBOON= 459,
DIGI_WHATYOUEATBABY= 460,
DIGI_WHATDIEDUPTHERE= 461,
DIGI_YOUGOPOOPOO= 462,
DIGI_PULLMYFINGER= 463,
DIGI_SOAPYOUGOOD= 464,
DIGI_WASHWANG= 465,
DIGI_DROPSOAP= 466,
DIGI_REALTITS= 467,
DIGI_MSTRLEEP= 468,
DIGI_SEEKLEEPADVICE= 469,
DIGI_AVENGELEEPDEATH= 470,
DIGI_LEEPGHOST= 471,
DIGI_DOOR1= 472,
DIGI_DOOR2= 473,
DIGI_DOOR3= 474,
DIGI_FLAGWAVE= 475,
DIGI_SURFACE= 476,
DIGI_GASHURT= 477,
DIGI_BONUS_GRAB= 478,
DIGI_ANIMECRY= 479,
DIGI_ANIMESING1= 480,
DIGI_ANIMEMAD1= 481,
DIGI_ANIMESING2= 482,
DIGI_ANIMEMAD2= 483,
DIGI_PLAYER_TELEPORT= 484,
DIGI_INTRO_SLASH= 485,
DIGI_WARNING= 486,
DIGI_INTRO_WHIRL= 487,
DIGI_TOILETGIRLFART1= 488,
DIGI_TOILETGIRLFART2= 489,
DIGI_TOILETGIRLFART3= 490,
DIGI_WINDCHIMES= 491,
DIGI_MADATCARPET= 492,
DIGI_JUMPONCARPET= 493,
DIGI_USEBROKENVEHICLE= 494,
DIGI_STEPONCALTROPS= 495,
DIGI_WANGSEESERP= 496,
DIGI_SERPTAUNTWANG= 497,
DIGI_WANGTAUNTSERP1= 498,
DIGI_WANGTAUNTSERP2= 499,
DIGI_WANGORDER1= 500,
DIGI_WANGORDER2= 501,
DIGI_WANGDROWNING= 502,
DIGI_ZILLAREGARDS= 503,
DIGI_PMESSAGE= 504,
DIGI_SHAREND_UGLY1= 505,
DIGI_SHAREND_UGLY2= 506,
DIGI_SHAREND_TELEPORT= 507,
DIGI_HOTHEADSWITCH= 508,
DIGI_BOATCREAK= 509,
DIGI_BOATRUN2= 510,
DIGI_BOATIDLE= 511,
DIGI_SHIPBELL= 512,
DIGI_FOGHORN= 513,
DIGI_CANNON= 514,
DIGI_JG41001= 515,
DIGI_JG41012= 516,
DIGI_JG41018= 517,
DIGI_JG41028= 518,
DIGI_JG41048= 519,
DIGI_JG41052= 520,
DIGI_JG41058= 521,
DIGI_JG41060= 522,
DIGI_JG41075= 523,
DIGI_JG42004= 524,
DIGI_JG42019= 525,
DIGI_JG42021= 526,
DIGI_JG42028= 527,
DIGI_JG42033= 528,
DIGI_JG42034= 529,
DIGI_JG42050= 530,
DIGI_JG42056= 531,
DIGI_JG42061= 532,
DIGI_JG43004= 533,
DIGI_JG43015= 534,
DIGI_JG43019= 535,
DIGI_JG43021= 536,
DIGI_JG44011= 537,
DIGI_JG44014= 538,
DIGI_JG44027= 539,
DIGI_JG44038= 540,
DIGI_JG44039= 541,
DIGI_JG44048= 542,
DIGI_JG44052= 543,
DIGI_JG45014= 544,
DIGI_JG44068= 545,
DIGI_JG45010= 546,
DIGI_JG45018= 547,
DIGI_JG45030= 548,
DIGI_JG45033= 549,
DIGI_JG45043= 550,
DIGI_JG45053= 551,
DIGI_JG45067= 552,
DIGI_JG46005= 553,
DIGI_JG46010= 554,
DIGI_LANI049= 555,
DIGI_LANI051= 556,
DIGI_LANI052= 557,
DIGI_LANI054= 558,
DIGI_LANI060= 559,
DIGI_LANI063= 560,
DIGI_LANI065= 561,
DIGI_LANI066= 562,
DIGI_LANI073= 563,
DIGI_LANI075= 564,
DIGI_LANI077= 565,
DIGI_LANI079= 566,
DIGI_LANI089= 567,
DIGI_LANI091= 568,
DIGI_LANI093= 569,
DIGI_LANI095= 570,
DIGI_VENTWALK= 571,
DIGI_CARWALK= 572,
DIGI_JETSOAR= 573,
DIGI_VACUUM= 574,
DIGI_GIRLNINJAALERTT= 575,
DIGI_GIRLNINJASCREAM= 576,
DIGI_GIRLNINJAALERT= 577,
DIGI_PRUNECACKLE= 578,
DIGI_PRUNECACKLE2= 579,
DIGI_PRUNECACKLE3= 580,
DIGI_SUMOSTOMP= 581,
DIGI_VATOR= 582,
DIGI_JG9009= 583,
DIGI_Z16004= 584,
DIGI_Z16012= 585,
DIGI_Z16022= 586,
DIGI_Z16027= 587,
DIGI_JG93030= 588,
DIGI_JG94002= 589,
DIGI_Z17010= 590,
DIGI_Z17052= 591,
DIGI_Z17025= 592,
DIGI_ML25014= 593,
DIGI_ML250101= 594,
DIGI_JG9022= 595,
DIGI_JG9032= 596,
DIGI_JG9038= 597,
DIGI_JG9055= 598,
DIGI_JG9060= 599,
DIGI_JG92055= 600,
DIGI_ML25032= 601,
DIGI_JG92036= 602,
DIGI_JG92042= 603,
DIGI_ML26001= 604,
DIGI_JG93000= 605,
DIGI_JG93011= 606,
DIGI_JG93018= 607,
DIGI_JG93023= 608,
DIGI_ML26008= 609,
DIGI_ML26011= 610,
DIGI_JG94007= 611,
DIGI_JG94024= 612,
DIGI_JG94039= 613,
DIGI_JG95012= 614,
DIGI_ZILLASTOMP= 615,
DIGI_ZC1= 616,
DIGI_ZC2= 617,
DIGI_ZC3= 618,
DIGI_ZC4= 619,
DIGI_ZC5= 620,
DIGI_ZC6= 621,
DIGI_ZC7= 622,
DIGI_ZC8= 623,
DIGI_ZC9= 624,
DIGI_Z16043= 625,
}
}

View file

@ -89,7 +89,7 @@ class SWCreditsScreen : SkippableScreenJob
override void Start() override void Start()
{ {
// Lo Wang feel like singing! // Lo Wang feel like singing!
SW.PlaySound(SWSnd.DIGI_JG95012, SW.v3df_none, CHAN_VOICE, CHANF_UI); SW.PlaySound("JG95012", SW.v3df_none, CHAN_VOICE, CHANF_UI);
} }
override void OnTick() override void OnTick()
@ -190,13 +190,13 @@ class SWSummaryScreen : SummaryScreenBase
switch (random(0, 2)) switch (random(0, 2))
{ {
case 0: case 0:
anim.Init("BONUS_PUNCH%02d", 15, SWSnd.DIGI_PLAYERYELL3, 8); anim.Init("BONUS_PUNCH%02d", 15, "PLAYERYELL3", 8);
break; break;
case 1: case 1:
anim.Init("BONUS_KICK%02d", 15, SWSnd.DIGI_PLAYERYELL2, 8); anim.Init("BONUS_KICK%02d", 15, "PLAYERYELL2", 8);
break; break;
case 2: case 2:
anim.Init("BONUS_GRAB%02d", 15, SWSnd.DIGI_BONUS_GRAB, 20); anim.Init("BONUS_GRAB%02d", 15, "BONUS_GRAB", 20);
break; break;
} }
rest[0] = TexMan.CheckForTexture("BONUS_PUNCH00", TexMan.Type_Any); rest[0] = TexMan.CheckForTexture("BONUS_PUNCH00", TexMan.Type_Any);
@ -377,9 +377,9 @@ class SWCutscenes ui
SW.PlaySong(0); SW.PlaySong(0);
Array<int> soundinfo; Array<int> soundinfo;
soundinfo.Pushv( soundinfo.Pushv(
1, SWSnd.DIGI_NOMESSWITHWANG, 1, int(Sound("NOMESSWITHWANG")),
5, SWSnd.DIGI_INTRO_SLASH, 5, int(Sound("INTRO_SLASH")),
15, SWSnd.DIGI_INTRO_WHIRL); 15,int(Sound("INTRO_WHIRL")));
runner.Append(new("SWDRealmsScreen").Init()); runner.Append(new("SWDRealmsScreen").Init());
runner.Append(MoviePlayerJob.CreateWithSoundinfo("sw.anm", soundinfo, MoviePlayer.NOSOUNDCUTOFF | MoviePlayer.NOMUSICCUTOFF, 8, 360, 128)); runner.Append(MoviePlayerJob.CreateWithSoundinfo("sw.anm", soundinfo, MoviePlayer.NOSOUNDCUTOFF | MoviePlayer.NOMUSICCUTOFF, 8, 360, 128));
} }
@ -395,11 +395,11 @@ class SWCutscenes ui
{ {
Array<int> soundinfo; Array<int> soundinfo;
soundinfo.Pushv( soundinfo.Pushv(
1, SWSnd.DIGI_SERPTAUNTWANG, 1, int(Sound("SERPTAUNTWANG")),
16, SWSnd.DIGI_SHAREND_TELEPORT, 16, int(Sound("SHAREND_TELEPORT")),
35, SWSnd.DIGI_WANGTAUNTSERP1, 35, int(Sound("WANGTAUNTSERP1")),
51, SWSnd.DIGI_SHAREND_UGLY1, 51, int(Sound("SHAREND_UGLY1")),
64, SWSnd.DIGI_SHAREND_UGLY2); 64, int(Sound("SHAREND_UGLY2")));
runner.Append(MoviePlayerJob.CreateWithSoundinfo("swend.anm", soundinfo, MoviePlayer.NOSOUNDCUTOFF, 16, 16, 140)); runner.Append(MoviePlayerJob.CreateWithSoundinfo("swend.anm", soundinfo, MoviePlayer.NOSOUNDCUTOFF, 16, 16, 140));
} }
@ -413,10 +413,10 @@ class SWCutscenes ui
{ {
Array<int> soundinfo; Array<int> soundinfo;
soundinfo.Pushv( soundinfo.Pushv(
2, SWSnd.DIGI_JG41012, 2, int(Sound("JG41012")),
30, SWSnd.DIGI_HOTHEADSWITCH, 30, int(Sound("HOTHEADSWITCH")),
42, SWSnd.DIGI_HOTHEADSWITCH, 42, int(Sound("HOTHEADSWITCH")),
59, SWSnd.DIGI_JG41028); 59, int(Sound("JG41028")));
runner.Append(MoviePlayerJob.CreateWithSoundinfo("sumocinm.anm", soundinfo, MoviePlayer.NOSOUNDCUTOFF, 10, 40, 130)); runner.Append(MoviePlayerJob.CreateWithSoundinfo("sumocinm.anm", soundinfo, MoviePlayer.NOSOUNDCUTOFF, 10, 40, 130));
} }
@ -430,22 +430,22 @@ class SWCutscenes ui
{ {
Array<int> soundinfo; Array<int> soundinfo;
soundinfo.Pushv( soundinfo.Pushv(
1, SWSnd.DIGI_ZC1, 1, int(Sound("ZC1")),
5, SWSnd.DIGI_JG94024, 5, int(Sound("JG94024")),
14, SWSnd.DIGI_ZC2, 14, int(Sound("ZC2")),
30, SWSnd.DIGI_ZC3, 30, int(Sound("ZC3")),
32, SWSnd.DIGI_ZC4, 32, int(Sound("ZC4")),
37, SWSnd.DIGI_ZC5, 37, int(Sound("ZC5")),
63, SWSnd.DIGI_Z16043, 63, int(Sound("Z16043")),
63, SWSnd.DIGI_ZC6, 63, int(Sound("ZC6")),
63, SWSnd.DIGI_ZC7, 63, int(Sound("ZC7")),
72, SWSnd.DIGI_ZC7, 72, int(Sound("ZC7")),
73, SWSnd.DIGI_ZC4, 73, int(Sound("ZC4")),
77, SWSnd.DIGI_ZC5, 77, int(Sound("ZC5")),
87, SWSnd.DIGI_ZC8, 87, int(Sound("ZC8")),
103, SWSnd.DIGI_ZC7, 103,int(Sound("ZC7")),
108, SWSnd.DIGI_ZC9, 108,int(Sound("ZC9")),
120, SWSnd.DIGI_JG94039); 120,int(Sound("JG94039")));
runner.Append(MoviePlayerJob.CreateWithSoundinfo("zfcin.anm", soundinfo, MoviePlayer.NOSOUNDCUTOFF, 16, 16, 140)); runner.Append(MoviePlayerJob.CreateWithSoundinfo("zfcin.anm", soundinfo, MoviePlayer.NOSOUNDCUTOFF, 16, 16, 140));
runner.Append(new("SWCreditsScreen").Init()); runner.Append(new("SWCreditsScreen").Init());
} }