mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-22 12:11:21 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
0170c89815
4 changed files with 18 additions and 11 deletions
|
@ -43,3 +43,10 @@ Special thanks to Coraline of the 3DGE team for allowing us to use her README.md
|
||||||
## How to build Raze
|
## How to build Raze
|
||||||
|
|
||||||
To build Raze, please see the [wiki](https://zdoom.org/wiki/) and see the "Programmer's Corner" on the bottom-right corner of the page to build for your platform - use this repository instead of GZDoom's.
|
To build Raze, please see the [wiki](https://zdoom.org/wiki/) and see the "Programmer's Corner" on the bottom-right corner of the page to build for your platform - use this repository instead of GZDoom's.
|
||||||
|
|
||||||
|
# Resources
|
||||||
|
- https://raze.zdoom.org/ - Home Page
|
||||||
|
- https://forum.zdoom.org/viewforum.php?f=351 - Forum
|
||||||
|
- https://raze.zdoom.org/wiki/ - Wiki
|
||||||
|
- https://discord.gg/zdoom - Discord Server
|
||||||
|
- https://docs.google.com/spreadsheets/d/1pvwXEgytkor9SClCiDn4j5AH7FedyXS-ocCbsuQIXDU/edit?usp=sharing - Translation sheet (Google Docs)
|
||||||
|
|
|
@ -180,9 +180,11 @@ static void S_AddSNDINFO (int lump)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sc.String[0] == '$')
|
int cmd;
|
||||||
|
if (sc.String[0] == '$') cmd = sc.MatchString(SICommandStrings);
|
||||||
|
else cmd = -1;
|
||||||
{ // Got a command
|
{ // Got a command
|
||||||
switch (sc.MatchString (SICommandStrings))
|
switch (cmd)
|
||||||
{
|
{
|
||||||
case SI_MusicVolume: {
|
case SI_MusicVolume: {
|
||||||
sc.MustGetString();
|
sc.MustGetString();
|
||||||
|
|
|
@ -386,7 +386,7 @@ void SEQINST::Update()
|
||||||
if (snd.isvalid())
|
if (snd.isvalid())
|
||||||
{
|
{
|
||||||
auto udata = soundEngine->GetUserData(snd);
|
auto udata = soundEngine->GetUserData(snd);
|
||||||
int relVol = udata ? udata[0] : 255;
|
int relVol = udata ? udata[0] : 80;
|
||||||
sfxPlay3DSoundCP(actor, sndId, -1, 0, 0, (surfSfxMove[surf][2] != relVol) ? relVol : surfSfxMove[surf][3]);
|
sfxPlay3DSoundCP(actor, sndId, -1, 0, 0, (surfSfxMove[surf][2] != relVol) ? relVol : surfSfxMove[surf][3]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,11 +75,6 @@ static void S_AddBloodSFX(int lumpnum)
|
||||||
if (sfxnum.isvalid())
|
if (sfxnum.isvalid())
|
||||||
{
|
{
|
||||||
soundfx = soundEngine->GetWritableSfx(sfxnum);
|
soundfx = soundEngine->GetWritableSfx(sfxnum);
|
||||||
if (soundfx->UserData.Size() == 0)
|
|
||||||
{
|
|
||||||
soundfx->UserData.Resize(1);
|
|
||||||
soundfx->UserData[1] = 80; // default for RelVol
|
|
||||||
}
|
|
||||||
if (!soundfx->bTentative) return; // sound was already defined.
|
if (!soundfx->bTentative) return; // sound was already defined.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,8 +115,11 @@ static void S_AddBloodSFX(int lumpnum)
|
||||||
// pitchrange is unused.
|
// pitchrange is unused.
|
||||||
if (sfx->pitch != 0x10000) soundfx->DefPitch = sfx->pitch / 65536.f;
|
if (sfx->pitch != 0x10000) soundfx->DefPitch = sfx->pitch / 65536.f;
|
||||||
else soundfx->DefPitch = 0;
|
else soundfx->DefPitch = 0;
|
||||||
int* udata = (int*)soundfx->UserData.Data();
|
if (sfx->relVol != 80) // 80 is the default
|
||||||
udata[0] = sfx->relVol;
|
{
|
||||||
|
soundfx->UserData.Resize(1);
|
||||||
|
soundfx->UserData[0] = sfx->relVol;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,7 +212,7 @@ void sndStartSample(unsigned int nSound, int nVolume, int nChannel, bool bLoop,
|
||||||
if (nVolume < 0)
|
if (nVolume < 0)
|
||||||
{
|
{
|
||||||
auto udata = soundEngine->GetUserData(snd);
|
auto udata = soundEngine->GetUserData(snd);
|
||||||
if (udata) nVolume = min(Scale(udata[0], 255, 100), 255);
|
if (udata) nVolume = min(Scale(udata[0], 255, 80), 255);
|
||||||
else nVolume = 255;
|
else nVolume = 255;
|
||||||
}
|
}
|
||||||
if (bLoop) chanflags |= CHANF_LOOP;
|
if (bLoop) chanflags |= CHANF_LOOP;
|
||||||
|
|
Loading…
Reference in a new issue