mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-27 09:20:51 +00:00
Move implementation details of Mapster32's sound system from m32exec.c into sounds_mapster32.c, and set up a sound system stub in KenBuild Editor.
DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@4563 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
61b956cd41
commit
cf4473c4d7
4 changed files with 39 additions and 12 deletions
|
@ -2943,7 +2943,7 @@ dodefault:
|
||||||
insptr++;
|
insptr++;
|
||||||
{
|
{
|
||||||
int32_t j=Gv_GetVarX(*insptr);
|
int32_t j=Gv_GetVarX(*insptr);
|
||||||
if (j<0 || j>=MAXSOUNDS)
|
if (S_InvalidSound(j))
|
||||||
{
|
{
|
||||||
M32_ERROR("Invalid sound %d", j);
|
M32_ERROR("Invalid sound %d", j);
|
||||||
insptr++;
|
insptr++;
|
||||||
|
@ -2954,14 +2954,7 @@ dodefault:
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case CON_IFNOSOUNDS:
|
case CON_IFNOSOUNDS:
|
||||||
{
|
VM_DoConditional(S_SoundsPlaying(vm.g_i) < 0);
|
||||||
int32_t j = MAXSOUNDS-1;
|
|
||||||
for (; j>=0; j--)
|
|
||||||
if (g_sounds[j].SoundOwner[0].ow == vm.g_i)
|
|
||||||
break;
|
|
||||||
|
|
||||||
VM_DoConditional(j < 0);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case CON_IFIN3DMODE:
|
case CON_IFIN3DMODE:
|
||||||
|
@ -2986,14 +2979,14 @@ dodefault:
|
||||||
insptr++;
|
insptr++;
|
||||||
{
|
{
|
||||||
int32_t j=Gv_GetVarX(*insptr++), var=*insptr++;
|
int32_t j=Gv_GetVarX(*insptr++), var=*insptr++;
|
||||||
if (j<0 || j>=MAXSOUNDS)
|
if (S_InvalidSound(j))
|
||||||
{
|
{
|
||||||
M32_ERROR("Invalid sound %d", j);
|
M32_ERROR("Invalid sound %d", j);
|
||||||
insptr++;
|
insptr++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Gv_SetVarX(var, g_sounds[j].m);
|
Gv_SetVarX(var, S_SoundFlags(j));
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -3005,7 +2998,7 @@ dodefault:
|
||||||
{
|
{
|
||||||
int32_t j=Gv_GetVarX(*insptr++);
|
int32_t j=Gv_GetVarX(*insptr++);
|
||||||
|
|
||||||
if (j<0 || j>=MAXSOUNDS)
|
if (S_InvalidSound(j))
|
||||||
{
|
{
|
||||||
M32_ERROR("Invalid sound %d", j);
|
M32_ERROR("Invalid sound %d", j);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -505,3 +505,23 @@ int32_t S_CheckSoundPlaying(int32_t i, int32_t num)
|
||||||
}
|
}
|
||||||
return(g_sounds[num].num);
|
return(g_sounds[num].num);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t S_SoundsPlaying(int32_t i)
|
||||||
|
{
|
||||||
|
int32_t j = MAXSOUNDS-1;
|
||||||
|
for (; j>=0; j--)
|
||||||
|
if (g_sounds[j].SoundOwner[0].ow == i)
|
||||||
|
break;
|
||||||
|
|
||||||
|
return j;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t S_InvalidSound(int32_t num)
|
||||||
|
{
|
||||||
|
return (unsigned) num >= MAXSOUNDS;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t S_SoundFlags(int32_t num)
|
||||||
|
{
|
||||||
|
return g_sounds[num].m;
|
||||||
|
}
|
||||||
|
|
|
@ -61,6 +61,9 @@ void S_Update(void);
|
||||||
int32_t A_CheckSoundPlaying(int32_t i, int32_t num);
|
int32_t A_CheckSoundPlaying(int32_t i, int32_t num);
|
||||||
int32_t S_CheckSoundPlaying(int32_t i, int32_t num);
|
int32_t S_CheckSoundPlaying(int32_t i, int32_t num);
|
||||||
void S_ClearSoundLocks(void);
|
void S_ClearSoundLocks(void);
|
||||||
|
int32_t S_SoundsPlaying(int32_t i);
|
||||||
|
int32_t S_InvalidSound(int32_t num);
|
||||||
|
int32_t S_SoundFlags(int32_t num);
|
||||||
|
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
|
|
@ -642,6 +642,17 @@ int32_t taglab_getnextfreetag(int32_t *duetoptr)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t S_InvalidSound(int32_t num) { UNREFERENCED_PARAMETER(num); return 1; };
|
||||||
|
int32_t S_CheckSoundPlaying(int32_t i, int32_t num) { UNREFERENCED_PARAMETER(i); UNREFERENCED_PARAMETER(num); return 0; };
|
||||||
|
int32_t S_SoundsPlaying(int32_t i) { UNREFERENCED_PARAMETER(i); return -1; }
|
||||||
|
int32_t S_SoundFlags(int32_t num) { UNREFERENCED_PARAMETER(num); return 0; };
|
||||||
|
int32_t A_PlaySound(uint32_t num, int32_t i) { UNREFERENCED_PARAMETER(num); UNREFERENCED_PARAMETER(i); return 0; };
|
||||||
|
void S_StopSound(int32_t num) { UNREFERENCED_PARAMETER(num); };
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
#endif
|
||||||
|
int32_t FX_StopAllSounds(void) { return 0; };
|
||||||
|
|
||||||
//Just thought you might want my getnumber16 code
|
//Just thought you might want my getnumber16 code
|
||||||
/*
|
/*
|
||||||
getnumber16(char namestart[80], short num, int maxnumber)
|
getnumber16(char namestart[80], short num, int maxnumber)
|
||||||
|
|
Loading…
Reference in a new issue