spectfov, weap code restructured

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1799 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-04-16 19:36:20 +00:00
parent 96a660733d
commit 81d2cc3ac6
8 changed files with 559 additions and 450 deletions
+8 -6
View File
@@ -3,6 +3,11 @@
#include "pch.h"
#include "cube.h"
#include "AL/al.h"
#include "AL/alc.h"
#include "AL/alut.h"
#include "vorbis/vorbisfile.h"
bool nosound = true;
bool alerr()
@@ -83,7 +88,7 @@ struct oggstream
alGetError();
alSourceQueueBuffers(sourceid, 2, bufferids);
alSourcePlay(sourceid);
extern int musicvol; gain(musicvol/255.0f);
extern void setmusicvol(); setmusicvol();
ASSERT(!alGetError());
return true;
}
@@ -413,7 +418,6 @@ struct location
{
if(p) // players
{
//if(p == camera1) gain(s->vol/1000.0f*0.1f);
if(p != camera1)
{
//gain(s->vol/1000.0f);
@@ -449,10 +453,8 @@ VARFP(soundvol, 0, 128, 255,
alListenerf(AL_GAIN, soundvol/255.0f*10.0f);
});
VARFP(musicvol, 0, 128, 255,
{
if(gamemusic.playing()) gamemusic.gain(musicvol/255.0f);
});
void setmusicvol() { extern int musicvol; if(gamemusic.playing()) gamemusic.gain(musicvol/255.0f); }
VARFP(musicvol, 0, 128, 255, setmusicvol());
char *musicdonecmd = NULL;