mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 19:50:45 +00:00
- removed the "configuration" Exhumed came with.
Seriously, what's the point of emulating something this worthless? All settings have been remapped to the global CVARs.
This commit is contained in:
parent
b13ee90aa0
commit
0cd7c9a5ae
6 changed files with 11 additions and 159 deletions
|
@ -1041,20 +1041,6 @@ void CheckKeys()
|
||||||
buttonMap.ClearButton(gamefunc_Enlarge_Screen);
|
buttonMap.ClearButton(gamefunc_Enlarge_Screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
// F11?
|
|
||||||
#if 0
|
|
||||||
if (buttonMap.ButtonDown(gamefunc_Gamma_Correction))
|
|
||||||
{
|
|
||||||
nGamma++;
|
|
||||||
|
|
||||||
if (nGamma > 4)
|
|
||||||
nGamma = 0;
|
|
||||||
|
|
||||||
mysetbrightness((uint8_t)nGamma);
|
|
||||||
buttonMap.ClearButton(gamefunc_Gamma_Correction);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (buttonMap.ButtonDown(gamefunc_Shrink_Screen))
|
if (buttonMap.ButtonDown(gamefunc_Shrink_Screen))
|
||||||
{
|
{
|
||||||
if (bFullScreen)
|
if (bFullScreen)
|
||||||
|
@ -2005,7 +1991,6 @@ int GameInterface::app_main()
|
||||||
myloadconfig();
|
myloadconfig();
|
||||||
InitFX();
|
InitFX();
|
||||||
LoadFX();
|
LoadFX();
|
||||||
setCDaudiovolume(gMusicVolume);
|
|
||||||
seq_LoadSequences();
|
seq_LoadSequences();
|
||||||
InitStatus();
|
InitStatus();
|
||||||
InitTimer();
|
InitTimer();
|
||||||
|
@ -2240,7 +2225,6 @@ LOOP3:
|
||||||
ClearSerialInbuf();
|
ClearSerialInbuf();
|
||||||
}
|
}
|
||||||
|
|
||||||
mysetbrightness((uint8_t)nGamma);
|
|
||||||
//int edi = totalclock;
|
//int edi = totalclock;
|
||||||
tclocks2 = totalclock;
|
tclocks2 = totalclock;
|
||||||
CONTROL_BindsEnabled = 1;
|
CONTROL_BindsEnabled = 1;
|
||||||
|
|
|
@ -229,8 +229,6 @@ extern short screensize;
|
||||||
|
|
||||||
extern int totalmoves;
|
extern int totalmoves;
|
||||||
|
|
||||||
extern short nGamma;
|
|
||||||
|
|
||||||
extern int lCountDown;
|
extern int lCountDown;
|
||||||
|
|
||||||
extern short bSlipMode;
|
extern short bSlipMode;
|
||||||
|
|
|
@ -1031,62 +1031,12 @@ void LoadObjects()
|
||||||
|
|
||||||
int myloadconfig()
|
int myloadconfig()
|
||||||
{
|
{
|
||||||
FILE *fp = fopen("psa.ini", "rb");
|
|
||||||
|
|
||||||
if (fp == NULL)
|
|
||||||
{
|
|
||||||
gFXVolume = 200;
|
|
||||||
nGamma = 2;
|
|
||||||
gMusicVolume = 200;
|
|
||||||
bFullScreen = 0;
|
|
||||||
mysetbrightness((uint8_t)nGamma);
|
|
||||||
|
|
||||||
lMouseSens = 8;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
fread(&gFXVolume, sizeof(gFXVolume), 1, fp);
|
|
||||||
fread(&gMusicVolume, sizeof(gMusicVolume), 1, fp);
|
|
||||||
fread(&screensize, sizeof(screensize), 1, fp);
|
|
||||||
fread(&bFullScreen, sizeof(bFullScreen), 1, fp);
|
|
||||||
fread(&nGamma, sizeof(nGamma), 1, fp);
|
|
||||||
fread(&lMouseSens, sizeof(lMouseSens), 1, fp);
|
|
||||||
|
|
||||||
if (screensize < 0 || screensize > 15) {
|
|
||||||
screensize = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose(fp);
|
|
||||||
|
|
||||||
if (gFXVolume > 255) {
|
|
||||||
gFXVolume = 125;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gMusicVolume > 255) {
|
|
||||||
gMusicVolume = 125;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mysaveconfig()
|
int mysaveconfig()
|
||||||
{
|
{
|
||||||
FILE *fp = fopen("psa.ini", "wb");
|
|
||||||
if (fp == NULL) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
fwrite(&gFXVolume, sizeof(gFXVolume), 1, fp);
|
|
||||||
fwrite(&gMusicVolume, sizeof(gMusicVolume), 1, fp);
|
|
||||||
|
|
||||||
short nSize = screensize;
|
|
||||||
|
|
||||||
fwrite(&nSize, sizeof(nSize), 1, fp);
|
|
||||||
fwrite(&bFullScreen, sizeof(bFullScreen), 1, fp);
|
|
||||||
fwrite(&nGamma, sizeof(nGamma), 1, fp);
|
|
||||||
fwrite(&lMouseSens, sizeof(lMouseSens), 1, fp);
|
|
||||||
|
|
||||||
fclose(fp);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
END_PS_NS
|
END_PS_NS
|
||||||
|
|
|
@ -852,21 +852,22 @@ void menu_AdjustVolume()
|
||||||
overwritesprite(80, 50, kMenuMusicTile, (Sin((int)totalclock << 4) >> 9) * (nOption == 0), 2, kPalNormal);
|
overwritesprite(80, 50, kMenuMusicTile, (Sin((int)totalclock << 4) >> 9) * (nOption == 0), 2, kPalNormal);
|
||||||
overwritesprite(55, 75, kMenuBlankTitleTile, 0, 2, kPalNormal);
|
overwritesprite(55, 75, kMenuBlankTitleTile, 0, 2, kPalNormal);
|
||||||
|
|
||||||
|
/*
|
||||||
seq_DrawGunSequence(
|
seq_DrawGunSequence(
|
||||||
SeqOffsets[kSeqSlider], // eax
|
SeqOffsets[kSeqSlider], // eax
|
||||||
gMusicVolume % 3, // pick one of 3 frames?
|
gMusicVolume % 3, // pick one of 3 frames?
|
||||||
(gMusicVolume >> 1) - 93, // ebx. must be x???
|
(gMusicVolume >> 1) - 93, // ebx. must be x???
|
||||||
-22,
|
-22,
|
||||||
0,
|
0,
|
||||||
0);
|
0);*/
|
||||||
|
|
||||||
overwritesprite(80, 110, kMenuSoundFxTile, (Sin((int)totalclock << 4) >> 9) * (nOption == 1), 2, kPalNormal);
|
overwritesprite(80, 110, kMenuSoundFxTile, (Sin((int)totalclock << 4) >> 9) * (nOption == 1), 2, kPalNormal);
|
||||||
overwritesprite(55, 135, kMenuBlankTitleTile, 0, 2, kPalNormal);
|
overwritesprite(55, 135, kMenuBlankTitleTile, 0, 2, kPalNormal);
|
||||||
|
|
||||||
seq_DrawGunSequence(
|
seq_DrawGunSequence(
|
||||||
SeqOffsets[kSeqSlider],
|
SeqOffsets[kSeqSlider],
|
||||||
gFXVolume % 3,
|
snd_fxvolume % 3,
|
||||||
(gFXVolume / 2) - 93,
|
(snd_fxvolume / 2) - 93,
|
||||||
38,
|
38,
|
||||||
0,
|
0,
|
||||||
0);
|
0);
|
||||||
|
@ -914,67 +915,11 @@ void menu_AdjustVolume()
|
||||||
if (I_MenuLeft())
|
if (I_MenuLeft())
|
||||||
{
|
{
|
||||||
I_MenuLeftClear();
|
I_MenuLeftClear();
|
||||||
switch (nOption)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
{
|
|
||||||
if (gMusicVolume > 3) {
|
|
||||||
gMusicVolume -= 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO SetMusicVolume();
|
|
||||||
setCDaudiovolume(gMusicVolume);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
{
|
|
||||||
if (gFXVolume > 3) {
|
|
||||||
gFXVolume -= 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LocalSoundPlaying()) {
|
|
||||||
UpdateLocalSound();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
PlayLocalSound(StaticSound[kSound23], 0);
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (I_MenuRight())
|
if (I_MenuRight())
|
||||||
{
|
{
|
||||||
I_MenuRightClear();
|
I_MenuRightClear();
|
||||||
switch (nOption)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
{
|
|
||||||
if (gMusicVolume < 252) {
|
|
||||||
gMusicVolume += 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetMusicVolume();
|
|
||||||
setCDaudiovolume(gMusicVolume);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
{
|
|
||||||
if (gFXVolume < 252) {
|
|
||||||
gFXVolume += 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LocalSoundPlaying()) {
|
|
||||||
UpdateLocalSound();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
PlayLocalSound(StaticSound[kSound23], 0);
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetLocalSound() != 23) {
|
if (GetLocalSound() != 23) {
|
||||||
|
|
|
@ -261,7 +261,7 @@ void PlayMovie(const char* fileName)
|
||||||
if (ReadFrame(fp))
|
if (ReadFrame(fp))
|
||||||
{
|
{
|
||||||
// start audio playback
|
// start audio playback
|
||||||
hFx = FX_StartDemandFeedPlayback(ServeSample, kSampleRate, 0, gMusicVolume, gMusicVolume, gMusicVolume, FX_MUSIC_PRIORITY, fix16_one, -1);
|
hFx = FX_StartDemandFeedPlayback(ServeSample, kSampleRate, 0, mus_volume, mus_volume, mus_volume, FX_MUSIC_PRIORITY, fix16_one, -1);
|
||||||
|
|
||||||
while (!inputState.keyBufferWaiting())
|
while (!inputState.keyBufferWaiting())
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,8 +50,6 @@ extern "C" {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
short gMusicVolume = 200;
|
|
||||||
short gFXVolume = 200;
|
|
||||||
short nSoundsPlaying = 0;
|
short nSoundsPlaying = 0;
|
||||||
short nAmbientChannel = -1;
|
short nAmbientChannel = -1;
|
||||||
|
|
||||||
|
@ -738,7 +736,7 @@ void UpdateSounds()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int nVolume = gFXVolume+10-(Sin(nDist<<1)>>6);
|
int nVolume = snd_fxvolume+10-(Sin(nDist<<1)>>6);
|
||||||
if (nVolume < 0)
|
if (nVolume < 0)
|
||||||
nVolume = 0;
|
nVolume = 0;
|
||||||
if (nVolume > 255)
|
if (nVolume > 255)
|
||||||
|
@ -827,7 +825,7 @@ void UpdateLocalSound(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (sActiveSound[nLocalChan].f_e >= 0)
|
if (sActiveSound[nLocalChan].f_e >= 0)
|
||||||
FX_SetPan(sActiveSound[nLocalChan].f_e, gFXVolume, gFXVolume, gFXVolume);
|
FX_SetPan(sActiveSound[nLocalChan].f_e, snd_fxvolume, snd_fxvolume, snd_fxvolume);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StopLocalSound(void)
|
void StopLocalSound(void)
|
||||||
|
@ -863,18 +861,7 @@ void PlaySound(int nSound)
|
||||||
if (handle >= 0)
|
if (handle >= 0)
|
||||||
FX_StopSound(handle);
|
FX_StopSound(handle);
|
||||||
|
|
||||||
handle = FX_Play(SoundBuf[nSound], SoundLen[nSound], bLoop ? 0 : -1, 0, 0, gFXVolume, gFXVolume, gFXVolume, 0, fix16_one, -1);
|
handle = FX_Play(SoundBuf[nSound], SoundLen[nSound], bLoop ? 0 : -1, 0, 0, snd_fxvolume, snd_fxvolume, snd_fxvolume, 0, fix16_one, -1);
|
||||||
|
|
||||||
#if 0
|
|
||||||
AIL_init_sample(handle);
|
|
||||||
AIL_set_sample_file(handle, SoundBuf[nSound], -1);
|
|
||||||
AIL_set_sample_volume(handle, gFXVolume>>1);
|
|
||||||
|
|
||||||
if (SoundBuf[nSound][26] == 6)
|
|
||||||
AIL_set_sample_loop_count(handle, 0);
|
|
||||||
|
|
||||||
AIL_start_sample(handle);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayLocalSound(short nSound, short nRate)
|
void PlayLocalSound(short nSound, short nRate)
|
||||||
|
@ -897,7 +884,7 @@ void PlayLocalSound(short nSound, short nRate)
|
||||||
if (pASound->f_e >= 0)
|
if (pASound->f_e >= 0)
|
||||||
FX_StopSound(pASound->f_e);
|
FX_StopSound(pASound->f_e);
|
||||||
|
|
||||||
pASound->f_e = FX_Play(SoundBuf[nSound], SoundLen[nSound], bLoop ? 0 : -1, 0, 0, gFXVolume, gFXVolume, gFXVolume, 0, fix16_one, nLocalChan);
|
pASound->f_e = FX_Play(SoundBuf[nSound], SoundLen[nSound], bLoop ? 0 : -1, 0, 0, snd_fxvolume, snd_fxvolume, snd_fxvolume, 0, fix16_one, nLocalChan);
|
||||||
|
|
||||||
if (nRate)
|
if (nRate)
|
||||||
{
|
{
|
||||||
|
@ -905,19 +892,7 @@ void PlayLocalSound(short nSound, short nRate)
|
||||||
FX_GetFrequency(pASound->f_e, &nFreq);
|
FX_GetFrequency(pASound->f_e, &nFreq);
|
||||||
FX_SetFrequency(pASound->f_e, nFreq+nRate);
|
FX_SetFrequency(pASound->f_e, nFreq+nRate);
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
AIL_init_sample(pASound->f_e);
|
|
||||||
AIL_set_sample_file(pASound->f_e, SoundBuf[nSound], -1);
|
|
||||||
AIL_set_sample_volume(pASound->f_e, gFXVolume>>1);
|
|
||||||
|
|
||||||
if (nRate)
|
|
||||||
AIL_set_sample_playback_rate(pASound->f_e, AIL_sample_playback_rate(pASound->f_e)+nRate);
|
|
||||||
|
|
||||||
if (SoundBuf[nSound][26] == 6)
|
|
||||||
AIL_set_sample_loop_count(pASound->f_e, 0);
|
|
||||||
|
|
||||||
AIL_start_sample(pASound->f_e);
|
|
||||||
#endif
|
|
||||||
pASound->f_2 = nSound;
|
pASound->f_2 = nSound;
|
||||||
SetLocalChan(0);
|
SetLocalChan(0);
|
||||||
}
|
}
|
||||||
|
@ -993,7 +968,7 @@ short PlayFX2(unsigned short nSound, short nSprite)
|
||||||
|
|
||||||
if (!v1c)
|
if (!v1c)
|
||||||
{
|
{
|
||||||
nVolume = gFXVolume+10-(Sin(nDist<<1)>>6)-10;
|
nVolume = snd_fxvolume+10-(Sin(nDist<<1)>>6)-10;
|
||||||
if (nVolume <= 0)
|
if (nVolume <= 0)
|
||||||
{
|
{
|
||||||
if ((int16_t)nSound > -1)
|
if ((int16_t)nSound > -1)
|
||||||
|
@ -1004,7 +979,7 @@ short PlayFX2(unsigned short nSound, short nSprite)
|
||||||
nVolume = 255;
|
nVolume = 255;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
nVolume = gFXVolume;
|
nVolume = snd_fxvolume;
|
||||||
|
|
||||||
short vc = nSound & (~0x1ff);
|
short vc = nSound & (~0x1ff);
|
||||||
short v4 = nSound & 0x2000;
|
short v4 = nSound & 0x2000;
|
||||||
|
|
Loading…
Reference in a new issue