From 8866bcf90dba64f2fd6cecd6839b9b80988e46a6 Mon Sep 17 00:00:00 2001 From: Harley Laue Date: Tue, 11 May 2010 16:53:46 -0500 Subject: [PATCH] Source changes to make Linux CMake build use system libs * I also opted to use C++'s true/false instead of #define's --- Source/Game.h | 8 +- Source/GameDraw.cpp | 4 +- Source/GameInitDispose.cpp | 196 +++---- Source/GameTick.cpp | 1014 +++++++++++++++++------------------ Source/MacCompatibility.cpp | 2 +- Source/OpenGL_Windows.cpp | 28 +- Source/Person.cpp | 620 ++++++++++----------- Source/Skeleton.cpp | 74 +-- Source/Weapons.cpp | 106 ++-- Source/WinInput.cpp | 186 +++---- Source/gamegl.h | 12 +- Source/openal_wrapper.cpp | 84 +-- 12 files changed, 1166 insertions(+), 1168 deletions(-) diff --git a/Source/Game.h b/Source/Game.h index 79f2abc..cbd7090 100644 --- a/Source/Game.h +++ b/Source/Game.h @@ -10,7 +10,7 @@ of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -51,7 +51,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "Terrain.h" #include "Skybox.h" #include "Skeleton.h" -#include "Models.h" +#include "Models.h" #include "Lights.h" #include "Person.h" #include "Constants.h" @@ -68,7 +68,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern GLuint rabbittexture; -class Game +class Game { public: @@ -279,7 +279,7 @@ public: int musicselected; int change; Game(); - ~Game() { + ~Game() { for(int i=0;i<10;i++){ if(Mainmenuitems[i])glDeleteTextures( 1, &Mainmenuitems[i] ); } diff --git a/Source/GameDraw.cpp b/Source/GameDraw.cpp index c817285..1275a45 100644 --- a/Source/GameDraw.cpp +++ b/Source/GameDraw.cpp @@ -1092,10 +1092,10 @@ int Game::DrawGLScene(void) if(dialogueboxsound[whichdialogue][indialogue]==-2)whichsoundplay=firestartsound; if(dialogueboxsound[whichdialogue][indialogue]==-3)whichsoundplay=consolesuccesssound; if(dialogueboxsound[whichdialogue][indialogue]==-4)whichsoundplay=consolefailsound; - PlaySoundEx( whichsoundplay, samp[whichsoundplay], NULL, TRUE); + PlaySoundEx( whichsoundplay, samp[whichsoundplay], NULL, true); FSOUND_3D_SetAttributes(channels[whichsoundplay], gLoc, vel); FSOUND_SetVolume(channels[whichsoundplay], 256); - FSOUND_SetPaused(channels[whichsoundplay], FALSE); + FSOUND_SetPaused(channels[whichsoundplay], false); } } } diff --git a/Source/GameInitDispose.cpp b/Source/GameInitDispose.cpp index 00190a9..118a7b5 100644 --- a/Source/GameInitDispose.cpp +++ b/Source/GameInitDispose.cpp @@ -10,7 +10,7 @@ of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "Game.h" +#include "Game.h" extern float screenwidth,screenheight; extern float viewdistance; extern XYZ viewer; @@ -112,7 +112,7 @@ extern int accountcampaignchoices[10][5000]; extern FSOUND_STREAM * strm[20]; -extern "C" void PlaySoundEx(int channel, FSOUND_SAMPLE *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused); +extern "C" void PlaySoundEx(int channel, FSOUND_SAMPLE *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused); extern "C" void PlayStreamEx(int chan, FSOUND_STREAM *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused); Game::TextureList Game::textures; @@ -226,69 +226,69 @@ void Game::LoadSounds() FSOUND_3D_SetDopplerFactor(0); FSOUND_SetSFXMasterVolume((int)(volume*255)); - + samp[footstepsound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:footstepsnow1.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} FSOUND_Sample_SetMinMaxDistance(samp[footstepsound], 4.0f, 1000.0f); samp[footstepsound2] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:footstepsnow2.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[footstepsound2], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[footstepsound2], 4.0f, 1000.0f); samp[footstepsound3] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:footstepstone1.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[footstepsound3], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[footstepsound3], 4.0f, 1000.0f); samp[footstepsound4] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:footstepstone2.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[footstepsound4], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[footstepsound4], 4.0f, 1000.0f); samp[landsound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:land.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[landsound], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[landsound], 4.0f, 1000.0f); samp[jumpsound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:jump.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[jumpsound], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[jumpsound], 4.0f, 1000.0f); samp[hawksound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:hawk.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[hawksound], 40.0f, 10000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[hawksound], 40.0f, 10000.0f); samp[whooshsound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:whoosh.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[whooshsound], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[whooshsound], 4.0f, 1000.0f); FSOUND_Sample_SetMode(samp[whooshsound], FSOUND_LOOP_NORMAL); samp[landsound1] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:land1.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[landsound1], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[landsound1], 4.0f, 1000.0f); samp[landsound2] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:land2.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[landsound2], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[landsound2], 4.0f, 1000.0f); samp[breaksound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:broken.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[breaksound], 8.0f, 2000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[breaksound], 8.0f, 2000.0f); samp[lowwhooshsound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:Lowwhoosh.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[lowwhooshsound], 8.0f, 2000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[lowwhooshsound], 8.0f, 2000.0f); samp[midwhooshsound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:midwhoosh.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[midwhooshsound], 8.0f, 2000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[midwhooshsound], 8.0f, 2000.0f); samp[highwhooshsound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:highwhoosh.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[highwhooshsound], 8.0f, 2000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[highwhooshsound], 8.0f, 2000.0f); samp[movewhooshsound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:movewhoosh.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[movewhooshsound], 8.0f, 2000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[movewhooshsound], 8.0f, 2000.0f); samp[heavyimpactsound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:heavyimpact.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[heavyimpactsound], 8.0f, 2000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[heavyimpactsound], 8.0f, 2000.0f); samp[whooshhitsound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:Whooshhit.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[whooshhitsound], 8.0f, 2000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[whooshhitsound], 8.0f, 2000.0f); samp[thudsound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:thud.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[thudsound], 8.0f, 2000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[thudsound], 8.0f, 2000.0f); samp[alarmsound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:alarm.ogg", FSOUND_2D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[alarmsound], 8.0f, 2000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[alarmsound], 8.0f, 2000.0f); samp[breaksound2] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:break.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[breaksound2], 8.0f, 2000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[breaksound2], 8.0f, 2000.0f); samp[knifedrawsound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:knifedraw.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} FSOUND_Sample_SetMinMaxDistance(samp[knifedrawsound], 8.0f, 2000.0f); @@ -318,7 +318,7 @@ void Game::LoadSounds() FSOUND_Sample_SetMinMaxDistance(samp[snowskidsound], 8.0f, 2000.0f); samp[bushrustle] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:bushrustle.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[bushrustle], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[bushrustle], 4.0f, 1000.0f); samp[clank1sound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:clank1.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} FSOUND_Sample_SetMinMaxDistance(samp[clank1sound], 8.0f, 2000.0f); @@ -333,10 +333,10 @@ void Game::LoadSounds() FSOUND_Sample_SetMinMaxDistance(samp[clank4sound], 8.0f, 2000.0f); samp[consolesuccesssound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:consolesuccess.ogg", FSOUND_2D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[consolesuccesssound], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[consolesuccesssound], 4.0f, 1000.0f); samp[consolefailsound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:consolefail.ogg", FSOUND_2D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[consolefailsound], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[consolefailsound], 4.0f, 1000.0f); samp[metalhitsound] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:MetalHit.ogg", FSOUND_HW3D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} FSOUND_Sample_SetMinMaxDistance(samp[metalhitsound], 8.0f, 2000.0f); @@ -426,7 +426,7 @@ void Game::LoadTexture(char *fileName, GLuint *textureid,int mipmap, bool hasalp unsigned char fileNamep[256]; CopyCStringToPascal(fileName,fileNamep); //Load Image - upload_image( fileNamep ,hasalpha); + upload_image( fileNamep ,hasalpha); // std::string fname(fileName); // std::transform(fname.begin(), fname.end(), tolower); @@ -482,8 +482,8 @@ void Game::LoadTextureSave(char *fileName, GLuint *textureid,int mipmap,GLubyte unsigned char fileNamep[256]; CopyCStringToPascal(fileName,fileNamep); //Load Image - upload_image( fileNamep ,0); - //LoadTGA( fileName ); + upload_image( fileNamep ,0); + //LoadTGA( fileName ); // std::string fname(fileName); // std::transform(fname.begin(), fname.end(), tolower); @@ -544,13 +544,13 @@ void Game::LoadSave(char *fileName, GLuint *textureid,bool mipmap,GLubyte *array //Load Image float temptexdetail=texdetail; texdetail=1; - //upload_image( fileName ); - //LoadTGA( fileName ); + //upload_image( fileName ); + //LoadTGA( fileName ); //Load Image unsigned char fileNamep[256]; CopyCStringToPascal(fileName,fileNamep); //Load Image - upload_image( fileNamep ,0); + upload_image( fileNamep ,0); texdetail=temptexdetail; //Is it valid? @@ -574,14 +574,14 @@ bool Game::AddClothes(char *fileName, GLuint *textureid,bool mipmap,GLubyte *arr LOGFUNC; - //upload_image( fileName ); - //LoadTGA( fileName ); + //upload_image( fileName ); + //LoadTGA( fileName ); //Load Image unsigned char fileNamep[256]; CopyCStringToPascal(fileName,fileNamep); //Load Image bool opened; - opened=upload_image( fileNamep ,1); + opened=upload_image( fileNamep ,1); float alphanum; //Is it valid? @@ -631,11 +631,11 @@ GLvoid Game::ReSizeGLScene(float fov, float pnear) gluPerspective(fov,(GLfloat)screenwidth/(GLfloat)screenheight,pnear,viewdistance); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); } -void Game::LoadingScreen() +void Game::LoadingScreen() { static float loadprogress,minprogress,maxprogress; static AbsoluteTime time = {0,0}; @@ -702,13 +702,13 @@ void Game::LoadingScreen() //glScalef(.25,.25,.25); glBegin(GL_QUADS); glTexCoord2f(.1-loadprogress/100,0+loadprogress/100+.3); - glVertex3f(-1, -1, 0.0f); + glVertex3f(-1, -1, 0.0f); glTexCoord2f(.1-loadprogress/100,0+loadprogress/100+.3); - glVertex3f(1, -1, 0.0f); + glVertex3f(1, -1, 0.0f); glTexCoord2f(.1-loadprogress/100,1+loadprogress/100+.3); glVertex3f(1, 1, 0.0f); glTexCoord2f(.1-loadprogress/100,1+loadprogress/100+.3); - glVertex3f(-1, 1, 0.0f); + glVertex3f(-1, 1, 0.0f); glEnd(); glPopMatrix(); glEnable(GL_BLEND); @@ -716,13 +716,13 @@ void Game::LoadingScreen() //glScalef(.25,.25,.25); glBegin(GL_QUADS); glTexCoord2f(.4+loadprogress/100,0+loadprogress/100); - glVertex3f(-1, -1, 0.0f); + glVertex3f(-1, -1, 0.0f); glTexCoord2f(.4+loadprogress/100,0+loadprogress/100); - glVertex3f(1, -1, 0.0f); + glVertex3f(1, -1, 0.0f); glTexCoord2f(.4+loadprogress/100,1+loadprogress/100); glVertex3f(1, 1, 0.0f); glTexCoord2f(.4+loadprogress/100,1+loadprogress/100); - glVertex3f(-1, 1, 0.0f); + glVertex3f(-1, 1, 0.0f); glEnd(); glPopMatrix(); glDisable(GL_TEXTURE_2D); @@ -765,13 +765,13 @@ void Game::LoadingScreen() //glScalef(.25,.25,.25); glBegin(GL_QUADS); glTexCoord2f(0+.5,0+.5); - glVertex3f(-1, -1, 0.0f); + glVertex3f(-1, -1, 0.0f); glTexCoord2f(1+.5,0+.5); - glVertex3f(1, -1, 0.0f); + glVertex3f(1, -1, 0.0f); glTexCoord2f(1+.5,1+.5); glVertex3f(1, 1, 0.0f); glTexCoord2f(0+.5,1+.5); - glVertex3f(-1, 1, 0.0f); + glVertex3f(-1, 1, 0.0f); glEnd(); glPopMatrix(); glDisable(GL_TEXTURE_2D); @@ -806,13 +806,13 @@ void Game::LoadingScreen() //glScalef(.25,.25,.25); glBegin(GL_QUADS); glTexCoord2f(0+.2,0+.8); - glVertex3f(-1, -1, 0.0f); + glVertex3f(-1, -1, 0.0f); glTexCoord2f(1+.2,0+.8); - glVertex3f(1, -1, 0.0f); + glVertex3f(1, -1, 0.0f); glTexCoord2f(1+.2,1+.8); glVertex3f(1, 1, 0.0f); glTexCoord2f(0+.2,1+.8); - glVertex3f(-1, 1, 0.0f); + glVertex3f(-1, 1, 0.0f); glEnd(); glPopMatrix(); glDisable(GL_TEXTURE_2D); @@ -856,10 +856,10 @@ void Game::LoadingScreen() glEnable(GL_BLEND); glColor4f(flashr,flashg,flashb,flashamount); glBegin(GL_QUADS); - glVertex3f(0, 0, 0.0f); - glVertex3f(256, 0, 0.0f); + glVertex3f(0, 0, 0.0f); + glVertex3f(256, 0, 0.0f); glVertex3f(256, 256, 0.0f); - glVertex3f(0, 256, 0.0f); + glVertex3f(0, 256, 0.0f); glEnd(); glMatrixMode(GL_PROJECTION); // Select The Projection Matrix glPopMatrix(); // Restore The Old Projection Matrix @@ -869,14 +869,14 @@ void Game::LoadingScreen() glEnable(GL_CULL_FACE); glDisable(GL_BLEND); glDepthMask(1); - } + } swap_gl_buffers(); loadscreencolor=0; } } -void Game::FadeLoadingScreen(float howmuch) +void Game::FadeLoadingScreen(float howmuch) { static float loadprogress,minprogress,maxprogress; @@ -924,13 +924,13 @@ void Game::FadeLoadingScreen(float howmuch) //glScalef(.25,.25,.25); glBegin(GL_QUADS); glTexCoord2f(0,0); - glVertex3f(-1, -1, 0.0f); + glVertex3f(-1, -1, 0.0f); glTexCoord2f(1,0); - glVertex3f(1, -1, 0.0f); + glVertex3f(1, -1, 0.0f); glTexCoord2f(1,1); glVertex3f(1, 1, 0.0f); glTexCoord2f(0,1); - glVertex3f(-1, 1, 0.0f); + glVertex3f(-1, 1, 0.0f); glEnd(); glPopMatrix(); glDisable(GL_TEXTURE_2D); @@ -955,7 +955,7 @@ void Game::FadeLoadingScreen(float howmuch) } -void Game::InitGame() +void Game::InitGame() { #if PLATFORM_MACOSX ProcessSerialNumber PSN; @@ -1234,7 +1234,7 @@ void Game::InitGame() output = FSOUND_OUTPUT_NOSOUND; FSOUND_SetOutput(output); - if ((rc = FSOUND_Init(44100, 32, 0)) == FALSE) + if ((rc = FSOUND_Init(44100, 32, 0)) == false) { // if we tried ALSA and failed, fall back to OSS. if ( (output == FSOUND_OUTPUT_ALSA) && (!cmdline("forcealsa")) ) @@ -1246,7 +1246,7 @@ void Game::InitGame() } } - if (rc == FALSE) + if (rc == false) { FSOUND_Close(); output = FSOUND_OUTPUT_NOSOUND; // we tried! just do silence. @@ -1260,13 +1260,13 @@ void Game::InitGame() FSOUND_SetSFXMasterVolume((int)(volume*255)); strm[stream_music3] = FSOUND_Stream_Open(ConvertFileName(":Data:Sounds:music3.mp3"), FSOUND_2D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=0;} -// FSOUND_Sample_SetMinMaxDistance(strm[stream_music3], 4.0f, 1000.0f); +// FSOUND_Sample_SetMinMaxDistance(strm[stream_music3], 4.0f, 1000.0f); FSOUND_Stream_SetMode(strm[stream_music3], FSOUND_LOOP_NORMAL); if(musictoggle){ -// PlaySoundEx( stream_music3, strm[stream_music3], NULL, TRUE); - PlayStreamEx(stream_music3, strm[stream_music3], 0, TRUE); - FSOUND_SetPaused(channels[stream_music3], FALSE); +// PlaySoundEx( stream_music3, strm[stream_music3], NULL, true); + PlayStreamEx(stream_music3, strm[stream_music3], 0, true); + FSOUND_SetPaused(channels[stream_music3], false); FSOUND_SetVolume(channels[stream_music3], 256); } @@ -1274,48 +1274,48 @@ void Game::InitGame() if(ambientsound){ strm[stream_wind] = FSOUND_Stream_Open(ConvertFileName(":Data:Sounds:wind.mp3"), FSOUND_2D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} -// FSOUND_Sample_SetMinMaxDistance(strm[stream_wind], 4.0f, 1000.0f); +// FSOUND_Sample_SetMinMaxDistance(strm[stream_wind], 4.0f, 1000.0f); FSOUND_Stream_SetMode(strm[stream_wind], FSOUND_LOOP_NORMAL); FadeLoadingScreen(30); strm[stream_desertambient] = FSOUND_Stream_Open(ConvertFileName(":Data:Sounds:desertambient.mp3"), FSOUND_2D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} -// FSOUND_Sample_SetMinMaxDistance(strm[stream_desertambient], 4.0f, 1000.0f); +// FSOUND_Sample_SetMinMaxDistance(strm[stream_desertambient], 4.0f, 1000.0f); FSOUND_Stream_SetMode(strm[stream_desertambient], FSOUND_LOOP_NORMAL); } FadeLoadingScreen(40); samp[firestartsound] = FSOUND_Sample_Load(FSOUND_FREE, ConvertFileName(":Data:Sounds:firestart.ogg"), FSOUND_2D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); strm[stream_firesound] = FSOUND_Stream_Open(":Data:Sounds:fire.ogg", FSOUND_2D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} -// FSOUND_Sample_SetMinMaxDistance(strm[stream_firesound], 8.0f, 2000.0f); +// FSOUND_Sample_SetMinMaxDistance(strm[stream_firesound], 8.0f, 2000.0f); FSOUND_Stream_SetMode(strm[stream_firesound], FSOUND_LOOP_NORMAL); FadeLoadingScreen(50); samp[fireendsound] = FSOUND_Sample_Load(FSOUND_FREE, ConvertFileName(":Data:Sounds:fireend.ogg"), FSOUND_2D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=5;} - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); //if(musictoggle){ strm[stream_music1grass] = FSOUND_Stream_Open(ConvertFileName(":Data:Sounds:music1grass.mp3"), FSOUND_2D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=1;} -// FSOUND_Sample_SetMinMaxDistance(strm[stream_music1grass], 4.0f, 1000.0f); +// FSOUND_Sample_SetMinMaxDistance(strm[stream_music1grass], 4.0f, 1000.0f); FSOUND_Stream_SetMode(strm[stream_music1grass], FSOUND_LOOP_NORMAL); strm[stream_music1snow] = FSOUND_Stream_Open(ConvertFileName(":Data:Sounds:music1snow.mp3"), FSOUND_2D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=2;} -// FSOUND_Sample_SetMinMaxDistance(strm[stream_music1snow], 4.0f, 1000.0f); +// FSOUND_Sample_SetMinMaxDistance(strm[stream_music1snow], 4.0f, 1000.0f); FSOUND_Stream_SetMode(strm[stream_music1snow], FSOUND_LOOP_NORMAL); FadeLoadingScreen(60); strm[stream_music1desert] = FSOUND_Stream_Open(ConvertFileName(":Data:Sounds:music1desert.mp3"), FSOUND_2D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=3;} -// FSOUND_Sample_SetMinMaxDistance(strm[stream_music1desert], 4.0f, 1000.0f); +// FSOUND_Sample_SetMinMaxDistance(strm[stream_music1desert], 4.0f, 1000.0f); FSOUND_Stream_SetMode(strm[stream_music1desert], FSOUND_LOOP_NORMAL); FadeLoadingScreen(80); strm[stream_music2] = FSOUND_Stream_Open(ConvertFileName(":Data:Sounds:music2.ogg"), FSOUND_2D, 0, 0); if(visibleloading){LoadingScreen(); loadscreencolor=4;} -// FSOUND_Sample_SetMinMaxDistance(strm[stream_music2], 4.0f, 1000.0f); +// FSOUND_Sample_SetMinMaxDistance(strm[stream_music2], 4.0f, 1000.0f); FSOUND_Stream_SetMode(strm[stream_music2], FSOUND_LOOP_NORMAL); //} @@ -1358,17 +1358,17 @@ void Game::InitGame() newscreenwidth=screenwidth; newscreenheight=screenheight; - - + + /* float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -1379,11 +1379,11 @@ void Game::InitGame() } -void Game::LoadStuff() +void Game::LoadStuff() { static float temptexdetail; static float viewdistdetail; - static int i,j,texsize; + static int i,j,texsize; float megascale =1; LOGFUNC; @@ -1391,8 +1391,8 @@ void Game::LoadStuff() visibleloading=1; /*musicvolume[3]=512; - PlaySoundEx( music4, samp[music4], NULL, TRUE); - FSOUND_SetPaused(channels[music4], FALSE); + PlaySoundEx( music4, samp[music4], NULL, true); + FSOUND_SetPaused(channels[music4], false); FSOUND_SetVolume(channels[music4], 512); */ loadtime=0; @@ -1424,7 +1424,7 @@ void Game::LoadStuff() text.BuildFont(); texdetail=temptexdetail; - numsounds=71; + numsounds=71; viewdistdetail=2; viewdistance=50*megascale*viewdistdetail; @@ -1762,7 +1762,7 @@ void Game::LoadStuff() for(i=0;i Tick() <*****/ extern FSOUND_STREAM * strm[20]; -extern "C" void PlaySoundEx(int channel, FSOUND_SAMPLE *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused); +extern "C" void PlaySoundEx(int channel, FSOUND_SAMPLE *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused); extern "C" void PlayStreamEx(int chan, FSOUND_STREAM *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused); extern void ScreenShot(const char * fname); @@ -239,14 +239,14 @@ void Screenshot (void) mkdir("Screenshots", S_IRWXU); ScreenShot(temp/*"Screenshots\\Screenshot.png"*/); - /*FSSpec MAC_file; - GraphicsExportComponent QT_exporter; + /*FSSpec MAC_file; + GraphicsExportComponent QT_exporter; OSErr MAC_error_code; CGrafPtr MAC_currentPort; GDHandle MAC_currentDevice; unsigned char* MAC_pixels; Rect MAC_picture_rectangle; - GWorldPtr MAC_offscreen_graphics_port; + GWorldPtr MAC_offscreen_graphics_port; static int numscreenshots=0; @@ -307,7 +307,7 @@ void Screenshot (void) // Get the GWorld - GWorldPtr MAC_gWorld = (CGrafPtr) FrontWindow(); + GWorldPtr MAC_gWorld = (CGrafPtr) FrontWindow(); //assert(MAC_gWorld != NULL); // Allocate memory for loading image @@ -318,18 +318,18 @@ void Screenshot (void) } // Get GWorld - ::GetGWorld(&MAC_currentPort, &MAC_currentDevice); + ::GetGWorld(&MAC_currentPort, &MAC_currentDevice); // Make a picture Rectangle MAC_picture_rectangle.left = 0; MAC_picture_rectangle.right = screenwidth; MAC_picture_rectangle.top = 0; - MAC_picture_rectangle.bottom = screenheight; + MAC_picture_rectangle.bottom = screenheight; // Create new offscreen GWorld MAC_error_code = ::QTNewGWorldFromPtr (&MAC_offscreen_graphics_port, k32ARGBPixelFormat, &MAC_picture_rectangle, NULL, NULL, 0, (char *) MAC_pixels, screenwidth * 4); if (MAC_error_code) { - ::SetGWorld(MAC_currentPort, MAC_currentDevice); + ::SetGWorld(MAC_currentPort, MAC_currentDevice); delete MAC_pixels; //UTIL_Error("Could not create offscreen GWorld. "); return; @@ -337,7 +337,7 @@ void Screenshot (void) } // Copy OpenGL Context to new GWorld - glReadBuffer(GL_FRONT); + glReadBuffer(GL_FRONT); glReadPixels(0,0,screenwidth,screenheight,GL_RGBA,GL_UNSIGNED_BYTE,MAC_pixels); // Swizzle texture @@ -355,7 +355,7 @@ void Screenshot (void) int dst_index; unsigned char temp; for (int horz = 0; horz < screenwidth; ++horz) - for (vert = 0; vert < screenheight / 2; ++vert) { + for (vert = 0; vert < screenheight / 2; ++vert) { src_index = (screenwidth * vert + horz) * 4; dst_index = (screenwidth * (screenheight - vert - 1) + horz) * 4; @@ -381,12 +381,12 @@ void Screenshot (void) // Export the Gworld MAC_error_code = OpenADefaultComponent(GraphicsExporterComponentType, kQTFileTypeBMP, &QT_exporter); if (MAC_error_code) { - //UTIL_Warning("Unable to export screenshot."); - ::SetGWorld(MAC_currentPort, MAC_currentDevice); + //UTIL_Warning("Unable to export screenshot."); + ::SetGWorld(MAC_currentPort, MAC_currentDevice); ::DisposeGWorld(MAC_offscreen_graphics_port); delete MAC_pixels; return; - } + } MAC_error_code = GraphicsExportSetInputGWorld(QT_exporter,MAC_offscreen_graphics_port); if (MAC_error_code) { @@ -396,27 +396,27 @@ void Screenshot (void) delete MAC_pixels; //UTIL_Warning("Unable to export screenshot."); return; - } + } MAC_error_code = GraphicsExportSetOutputFile(QT_exporter,&MAC_file); if (MAC_error_code) { ::CloseComponent(QT_exporter); - ::SetGWorld(MAC_currentPort, MAC_currentDevice); + ::SetGWorld(MAC_currentPort, MAC_currentDevice); ::DisposeGWorld(MAC_offscreen_graphics_port); delete MAC_pixels; //UTIL_Warning("Unable to export screenshot."); return; - } + } MAC_error_code = GraphicsExportDoExport(QT_exporter,NULL); if (MAC_error_code) { ::CloseComponent(QT_exporter); - ::SetGWorld(MAC_currentPort, MAC_currentDevice); + ::SetGWorld(MAC_currentPort, MAC_currentDevice); ::DisposeGWorld(MAC_offscreen_graphics_port); delete MAC_pixels; //UTIL_Warning("Unable to export screenshot."); return; - } + } ::CloseComponent(QT_exporter); ::SetGWorld(MAC_currentPort, MAC_currentDevice); @@ -427,14 +427,14 @@ void Screenshot (void) -void Game::SetUpLighting(){ +void Game::SetUpLighting(){ if(environment==snowyenvironment){ light.color[0]=.65; light.color[1]=.65; light.color[2]=.7; light.ambient[0]=.4; light.ambient[1]=.4; - light.ambient[2]=.44; + light.ambient[2]=.44; } if(environment==desertenvironment){ light.color[0]=.95; @@ -442,7 +442,7 @@ void Game::SetUpLighting(){ light.color[2]=.95; light.ambient[0]=.4; light.ambient[1]=.35; - light.ambient[2]=.3; + light.ambient[2]=.3; } if(environment==grassyenvironment){ @@ -451,7 +451,7 @@ void Game::SetUpLighting(){ light.color[2]=1; light.ambient[0]=.4; light.ambient[1]=.4; - light.ambient[2]=.44; + light.ambient[2]=.44; } if(!skyboxtexture){ light.color[0]=1; @@ -459,7 +459,7 @@ void Game::SetUpLighting(){ light.color[2]=1; light.ambient[0]=.4; light.ambient[1]=.4; - light.ambient[2]=.4; + light.ambient[2]=.4; } float average; average=(skyboxlightr+skyboxlightg+skyboxlightb)/3; @@ -468,7 +468,7 @@ void Game::SetUpLighting(){ light.color[2]*=(skyboxlightb+average)/2; light.ambient[0]=light.ambient[0]*(skyboxlightr+average)/2*1; light.ambient[1]=light.ambient[1]*(skyboxlightg+average)/2*1; - light.ambient[2]=light.ambient[2]*(skyboxlightb+average)/2*1; + light.ambient[2]=light.ambient[2]*(skyboxlightb+average)/2*1; /* light.ambient[0]=0; light.ambient[1]=0; @@ -555,7 +555,7 @@ int Game::checkcollide(XYZ startpoint,XYZ endpoint){ if(objects.type[i]!=treeleavestype&&objects.type[i]!=bushtype&&objects.type[i]!=firetype){ colviewer=startpoint; coltarget=endpoint; - if(objects.model[i].LineCheck(&colviewer,&coltarget,&colpoint,&objects.position[i],&objects.rotation[i])!=-1)return i; + if(objects.model[i].LineCheck(&colviewer,&coltarget,&colpoint,&objects.position[i],&objects.rotation[i])!=-1)return i; } } } @@ -601,7 +601,7 @@ int Game::checkcollide(XYZ startpoint,XYZ endpoint,int what){ if(objects.type[what]!=treeleavestype&&objects.type[what]!=bushtype&&objects.type[what]!=firetype){ colviewer=startpoint; coltarget=endpoint; - if(objects.model[what].LineCheck(&colviewer,&coltarget,&colpoint,&objects.position[what],&objects.rotation[what])!=-1)return i; + if(objects.model[what].LineCheck(&colviewer,&coltarget,&colpoint,&objects.position[what],&objects.rotation[what])!=-1)return i; } } } @@ -611,7 +611,7 @@ int Game::checkcollide(XYZ startpoint,XYZ endpoint,int what){ return -1; } -void Game::Setenvironment(int which) +void Game::Setenvironment(int which) { LOGFUNC; @@ -620,26 +620,26 @@ void Game::Setenvironment(int which) float temptexdetail; environment=which; /* - FSOUND_SetPaused(channels[music1snow], TRUE); - FSOUND_SetPaused(channels[music1grass], TRUE); - FSOUND_SetPaused(channels[music1desert], TRUE); - FSOUND_SetPaused(channels[wind], TRUE); - FSOUND_SetPaused(channels[desertambient], TRUE); + FSOUND_SetPaused(channels[music1snow], true); + FSOUND_SetPaused(channels[music1grass], true); + FSOUND_SetPaused(channels[music1desert], true); + FSOUND_SetPaused(channels[wind], true); + FSOUND_SetPaused(channels[desertambient], true); */ - FSOUND_SetPaused(channels[stream_music1snow], TRUE); - FSOUND_SetPaused(channels[stream_music1grass], TRUE); - FSOUND_SetPaused(channels[stream_music1desert], TRUE); - FSOUND_SetPaused(channels[stream_wind], TRUE); - FSOUND_SetPaused(channels[stream_desertambient], TRUE); + FSOUND_SetPaused(channels[stream_music1snow], true); + FSOUND_SetPaused(channels[stream_music1grass], true); + FSOUND_SetPaused(channels[stream_music1desert], true); + FSOUND_SetPaused(channels[stream_wind], true); + FSOUND_SetPaused(channels[stream_desertambient], true); if(environment==snowyenvironment){ windvector=0; windvector.z=3; if(ambientsound){ - //PlaySoundEx( wind, samp[wind], NULL, TRUE); - PlayStreamEx(stream_wind, strm[stream_wind], 0, TRUE); - FSOUND_SetPaused(channels[stream_wind], FALSE); + //PlaySoundEx( wind, samp[wind], NULL, true); + PlayStreamEx(stream_wind, strm[stream_wind], 0, true); + FSOUND_SetPaused(channels[stream_wind], false); FSOUND_SetVolume(channels[stream_wind], 256); } @@ -656,10 +656,10 @@ void Game::Setenvironment(int which) samp[footstepsound2] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:footstepsnow2.ogg", FSOUND_HW3D, 0, 0); samp[footstepsound3] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:footstepstone1.ogg", FSOUND_HW3D, 0, 0); samp[footstepsound4] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:footstepstone2.ogg", FSOUND_HW3D, 0, 0); - FSOUND_Sample_SetMinMaxDistance(samp[footstepsound], 4.0f, 1000.0f); - FSOUND_Sample_SetMinMaxDistance(samp[footstepsound2], 4.0f, 1000.0f); - FSOUND_Sample_SetMinMaxDistance(samp[footstepsound3], 4.0f, 1000.0f); - FSOUND_Sample_SetMinMaxDistance(samp[footstepsound4], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[footstepsound], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[footstepsound2], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[footstepsound3], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[footstepsound4], 4.0f, 1000.0f); LoadTexture(":Data:Textures:snow.jpg",&terraintexture,1,0); @@ -696,9 +696,9 @@ void Game::Setenvironment(int which) if(ambientsound){ - //PlaySoundEx( desertambient, samp[desertambient], NULL, TRUE); - PlayStreamEx( stream_desertambient, strm[stream_desertambient], NULL, TRUE); - FSOUND_SetPaused(channels[stream_desertambient], FALSE); + //PlaySoundEx( desertambient, samp[desertambient], NULL, true); + PlayStreamEx( stream_desertambient, strm[stream_desertambient], NULL, true); + FSOUND_SetPaused(channels[stream_desertambient], false); FSOUND_SetVolume(channels[stream_desertambient], 256); } @@ -710,10 +710,10 @@ void Game::Setenvironment(int which) samp[footstepsound2] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:footstepsnow2.ogg", FSOUND_HW3D, 0, 0); samp[footstepsound3] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:footstepsnow1.ogg", FSOUND_HW3D, 0, 0); samp[footstepsound4] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:footstepsnow2.ogg", FSOUND_HW3D, 0, 0); - FSOUND_Sample_SetMinMaxDistance(samp[footstepsound], 4.0f, 1000.0f); - FSOUND_Sample_SetMinMaxDistance(samp[footstepsound2], 4.0f, 1000.0f); - FSOUND_Sample_SetMinMaxDistance(samp[footstepsound3], 4.0f, 1000.0f); - FSOUND_Sample_SetMinMaxDistance(samp[footstepsound4], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[footstepsound], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[footstepsound2], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[footstepsound3], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[footstepsound4], 4.0f, 1000.0f); LoadTexture(":Data:Textures:sand.jpg",&terraintexture,1,0); @@ -748,8 +748,8 @@ void Game::Setenvironment(int which) LoadTexture(":Data:Textures:grassbox.jpg",&objects.boxtextureptr,1,0); if(ambientsound){ - PlayStreamEx( stream_wind, strm[stream_wind], NULL, TRUE); - FSOUND_SetPaused(channels[stream_wind], FALSE); + PlayStreamEx( stream_wind, strm[stream_wind], NULL, true); + FSOUND_SetPaused(channels[stream_wind], false); FSOUND_SetVolume(channels[stream_wind], 100); } @@ -761,10 +761,10 @@ void Game::Setenvironment(int which) samp[footstepsound2] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:footstepgrass2.ogg", FSOUND_HW3D, 0, 0); samp[footstepsound3] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:footstepstone1.ogg", FSOUND_HW3D, 0, 0); samp[footstepsound4] = FSOUND_Sample_Load(FSOUND_FREE, ":Data:Sounds:footstepstone2.ogg", FSOUND_HW3D, 0, 0); - FSOUND_Sample_SetMinMaxDistance(samp[footstepsound], 4.0f, 1000.0f); - FSOUND_Sample_SetMinMaxDistance(samp[footstepsound2], 4.0f, 1000.0f); - FSOUND_Sample_SetMinMaxDistance(samp[footstepsound3], 4.0f, 1000.0f); - FSOUND_Sample_SetMinMaxDistance(samp[footstepsound4], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[footstepsound], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[footstepsound2], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[footstepsound3], 4.0f, 1000.0f); + FSOUND_Sample_SetMinMaxDistance(samp[footstepsound4], 4.0f, 1000.0f); LoadTexture(":Data:Textures:grassdirt.jpg",&terraintexture,1,0); @@ -797,7 +797,7 @@ void Game::Setenvironment(int which) } -void Game::Loadlevel(int which){ +void Game::Loadlevel(int which){ stealthloading=0; if(which==0)Loadlevel((char *)":Data:Maps:map1"); @@ -827,9 +827,9 @@ char temp[50]; char temp2[100]; strcpy(temp2,(const char *)string); -strcat((char *)temp2,(const char *)"Lugaru"); +strcat((char *)temp2,(const char *)"Lugaru"); sprintf (temp, "%d",strlen((char *)temp2)); -strcat((char *)temp2,temp); +strcat((char *)temp2,temp); MD5 context; unsigned int len = strlen ( (char *)temp2); @@ -842,7 +842,7 @@ return context.hex_digest(); -void Game::Loadlevel(char *name){ +void Game::Loadlevel(char *name){ int i,j,k,l,m; static int oldlevel; int templength; @@ -876,15 +876,15 @@ void Game::Loadlevel(char *name){ if(!firstload){ oldlevel=50; } - FSOUND_SetPaused(channels[whooshsound], TRUE); - FSOUND_SetPaused(channels[stream_firesound], TRUE); + FSOUND_SetPaused(channels[whooshsound], true); + FSOUND_SetPaused(channels[stream_firesound], true); int mapvers; FILE *tfile; tfile=fopen( name, "rb" ); if(tfile) { - FSOUND_SetPaused(channels[stream_firesound], TRUE); + FSOUND_SetPaused(channels[stream_firesound], true); scoreadded=0; @@ -955,9 +955,9 @@ void Game::Loadlevel(char *name){ changedelay=0; if(console) { - PlaySoundEx( consolesuccesssound, samp[consolesuccesssound], NULL, TRUE); + PlaySoundEx( consolesuccesssound, samp[consolesuccesssound], NULL, true); FSOUND_SetVolume(channels[consolesuccesssound], 256); - FSOUND_SetPaused(channels[consolesuccesssound], FALSE); + FSOUND_SetPaused(channels[consolesuccesssound], false); freeze=0; console=0; } @@ -1108,7 +1108,7 @@ void Game::Loadlevel(char *name){ for(m=0;m20) + //if(i<16||i>20) FSOUND_StopSound(i); } */ @@ -1612,8 +1612,8 @@ void Game::Loadlevel(char *name){ { if(ambientsound) { - PlayStreamEx(stream_wind, strm[stream_wind], NULL, TRUE); - FSOUND_SetPaused(channels[stream_wind], FALSE); + PlayStreamEx(stream_wind, strm[stream_wind], NULL, true); + FSOUND_SetPaused(channels[stream_wind], false); FSOUND_SetVolume(channels[stream_wind], 256); } } @@ -1622,10 +1622,10 @@ void Game::Loadlevel(char *name){ if(ambientsound) { //PlaySoundEx(desertambient, - // samp[desertambient], NULL, TRUE); + // samp[desertambient], NULL, true); PlayStreamEx(stream_desertambient, - strm[stream_desertambient], NULL, TRUE); - FSOUND_SetPaused(channels[stream_desertambient], FALSE); + strm[stream_desertambient], NULL, true); + FSOUND_SetPaused(channels[stream_desertambient], false); FSOUND_SetVolume(channels[stream_desertambient], 256); } } @@ -1633,9 +1633,9 @@ void Game::Loadlevel(char *name){ { if(ambientsound) { - //PlaySoundEx(wind, samp[wind], NULL, TRUE); - PlayStreamEx(stream_wind, strm[stream_wind], NULL, TRUE); - FSOUND_SetPaused(channels[stream_wind], FALSE); + //PlaySoundEx(wind, samp[wind], NULL, true); + PlayStreamEx(stream_wind, strm[stream_wind], NULL, true); + FSOUND_SetPaused(channels[stream_wind], false); FSOUND_SetVolume(channels[stream_wind], 100); } } @@ -1665,7 +1665,7 @@ void Game::Loadlevel(char *name){ visibleloading=0; } -void Game::Tick() +void Game::Tick() { static int i,k,j,l,m; static XYZ facing,flatfacing,absflatfacing; @@ -1687,9 +1687,9 @@ void Game::Tick() if(newnetmessages){ newnetmessages=0; - PlaySoundEx( consolesuccesssound, samp[consolesuccesssound], NULL, TRUE); + PlaySoundEx( consolesuccesssound, samp[consolesuccesssound], NULL, true); FSOUND_SetVolume(channels[consolesuccesssound], 256); - FSOUND_SetPaused(channels[consolesuccesssound], FALSE); + FSOUND_SetPaused(channels[consolesuccesssound], false); for(k=14;k>=2;k--){ for(j=0;j<255;j++){ @@ -1750,12 +1750,12 @@ void Game::Tick() if(!stealthloading){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -1828,7 +1828,7 @@ void Game::Tick() campaign=1; mainmenu=0; gameon=1; - FSOUND_SetPaused(channels[music3], TRUE); + FSOUND_SetPaused(channels[music3], true); stealthloading=0;*/ } @@ -1836,26 +1836,26 @@ void Game::Tick() if(mainmenu&&musictoggle){ if(mainmenu==1||mainmenu==2||mainmenu==100){ FSOUND_SetFrequency(FSOUND_ALL, 0.001); - PlayStreamEx( stream_music3, strm[stream_music3], NULL, TRUE); - FSOUND_SetPaused(channels[stream_music3], FALSE); + PlayStreamEx( stream_music3, strm[stream_music3], NULL, true); + FSOUND_SetPaused(channels[stream_music3], false); FSOUND_SetVolume(channels[stream_music3], 256); - FSOUND_SetPaused(channels[music1], TRUE); + FSOUND_SetPaused(channels[music1], true); } } if(!mainmenu){ - FSOUND_SetPaused(channels[stream_music3], TRUE); - FSOUND_SetPaused(channels[music1], FALSE); + FSOUND_SetPaused(channels[stream_music3], true); + FSOUND_SetPaused(channels[music1], false); } } if(mainmenu==3){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -1947,23 +1947,23 @@ void Game::Tick() opstream << "\nChat key:\n"; opstream << KeyToChar(chatkey); opstream.close(); - } + } if(mainmenu==4||mainmenu==5||mainmenu==6||mainmenu==7||mainmenu==9||mainmenu==12||mainmenu==13||mainmenu==14||mainmenu==10||mainmenu==11||mainmenu==100){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; flashb=0; flashamount=1; flashdelay=1; - } + } if(mainmenu==3&&gameon)mainmenu=2; if(mainmenu==3&&!gameon)mainmenu=1; if(mainmenu==5&&gameon)mainmenu=2; @@ -2003,9 +2003,9 @@ void Game::Tick() if(IsKeyDown(theKeyMap, MAC_TAB_KEY)&&!minimaptogglekeydown&&tutoriallevel){ if(tutorialstage!=51) tutorialstagetime=tutorialmaxtime; - PlaySoundEx( consolefailsound, samp[consolefailsound], NULL, TRUE); + PlaySoundEx( consolefailsound, samp[consolefailsound], NULL, true); FSOUND_SetVolume(channels[consolefailsound], 128); - FSOUND_SetPaused(channels[consolefailsound], FALSE); + FSOUND_SetPaused(channels[consolefailsound], false); minimaptogglekeydown=1; } if(!IsKeyDown(theKeyMap, MAC_TAB_KEY)){ @@ -2019,12 +2019,12 @@ void Game::Tick() if(!gameon){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2047,26 +2047,26 @@ void Game::Tick() } mainmenu=0; gameon=1; - FSOUND_SetPaused(channels[music3], TRUE); */ + FSOUND_SetPaused(channels[music3], true); */ } else { //resume mainmenu=0; - FSOUND_SetPaused(channels[stream_music3], TRUE); - FSOUND_SetPaused(channels[music1], FALSE); + FSOUND_SetPaused(channels[stream_music3], true); + FSOUND_SetPaused(channels[music1], false); } } if(Button()&&!oldbutton&&selected==2){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2076,25 +2076,25 @@ void Game::Tick() //options - mainmenu=3; + mainmenu=3; if(newdetail>2)newdetail=detail; if(newdetail<0)newdetail=detail; if(newscreenwidth>3000)newscreenwidth=screenwidth; if(newscreenwidth<0)newscreenwidth=screenwidth; if(newscreenheight>3000)newscreenheight=screenheight; - if(newscreenheight<0)newscreenheight=screenheight; + if(newscreenheight<0)newscreenheight=screenheight; } if(Button()&&!oldbutton&&selected==3){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2105,7 +2105,7 @@ void Game::Tick() if(!gameon){ //quit tryquit=1; - if(registered)FSOUND_SetPaused(channels[stream_music3], TRUE); + if(registered)FSOUND_SetPaused(channels[stream_music3], true); } else{ //end game @@ -2121,12 +2121,12 @@ void Game::Tick() if(Button()&&!oldbutton&&selected!=-1){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); } if(Button()&&!oldbutton&&selected==0){ #if USE_SDL @@ -2247,9 +2247,9 @@ void Game::Tick() musictoggle=1-musictoggle; if(!musictoggle){ - FSOUND_SetPaused(channels[music1], TRUE); - FSOUND_SetPaused(channels[stream_music2], TRUE); - FSOUND_SetPaused(channels[stream_music3], TRUE); + FSOUND_SetPaused(channels[music1], true); + FSOUND_SetPaused(channels[stream_music2], true); + FSOUND_SetPaused(channels[stream_music3], true); for(i=0;i<4;i++){ oldmusicvolume[i]=0; @@ -2258,9 +2258,9 @@ void Game::Tick() } if(musictoggle){ - PlayStreamEx( stream_music3, strm[stream_music3], NULL, TRUE); - FSOUND_SetPaused(channels[stream_music3], FALSE); - FSOUND_SetVolume(channels[stream_music3], 256); + PlayStreamEx( stream_music3, strm[stream_music3], NULL, true); + FSOUND_SetPaused(channels[stream_music3], false); + FSOUND_SetVolume(channels[stream_music3], 256); } } if(Button()&&!oldbutton&&selected==9){ @@ -2278,12 +2278,12 @@ void Game::Tick() if(Button()&&!oldbutton&&selected==7){ /*float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); */ flashr=1; flashg=0; @@ -2293,18 +2293,18 @@ void Game::Tick() //options - mainmenu=4; + mainmenu=4; keyselect=-1; } if(Button()&&!oldbutton&&selected==8){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2408,12 +2408,12 @@ void Game::Tick() if(Button()&&!oldbutton&&selected!=-1&&keyselect==-1){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); } if(Button()&&!oldbutton&&selected<9&&keyselect==-1){ keyselect=selected; @@ -2429,12 +2429,12 @@ void Game::Tick() if(i!=MAC_ESCAPE_KEY&&(strcmp(KeyToChar(i),"unknown")||(buttons[0]&&!oldbuttons[0]&&!oldbutton)||(buttons[1]&&!oldbuttons[1]&&!oldbutton))){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); int keynum; keynum=i; @@ -2459,12 +2459,12 @@ void Game::Tick() if(Button()&&!oldbutton&&selected==9){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2485,9 +2485,9 @@ void Game::Tick() if(mainmenu==5){ if(accountcampaignchoicesmade[accountactive]>8&&!registered){ - FSOUND_SetFrequency(FSOUND_ALL, 0.001); - PlayStreamEx( stream_music3, strm[stream_music3], NULL, TRUE); - FSOUND_SetPaused(channels[stream_music3], FALSE); + FSOUND_SetFrequency(FSOUND_ALL, 0.001); + PlayStreamEx( stream_music3, strm[stream_music3], NULL, true); + FSOUND_SetPaused(channels[stream_music3], false); FSOUND_SetVolume(channels[stream_music3], 256); gameon=0; @@ -2498,12 +2498,12 @@ void Game::Tick() float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2519,15 +2519,15 @@ void Game::Tick() endgame=0; } - if(Button()&&!oldbutton&&selected==1){ + if(Button()&&!oldbutton&&selected==1){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2548,17 +2548,17 @@ void Game::Tick() mainmenu=0; gameon=1; - FSOUND_SetPaused(channels[stream_music3], TRUE); + FSOUND_SetPaused(channels[stream_music3], true); } - if(Button()&&!oldbutton&&selected-7>=accountcampaignchoicesmade[accountactive]){//selected>=7&&(selected-7<=campaignnumchoices)){ + if(Button()&&!oldbutton&&selected-7>=accountcampaignchoicesmade[accountactive]){//selected>=7&&(selected-7<=campaignnumchoices)){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2598,17 +2598,17 @@ void Game::Tick() campaign=1; mainmenu=0; gameon=1; - FSOUND_SetPaused(channels[stream_music3], TRUE); + FSOUND_SetPaused(channels[stream_music3], true); } if(Button()&&!oldbutton&&selected==4){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2622,12 +2622,12 @@ void Game::Tick() if(Button()&&!oldbutton&&selected==5){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2640,12 +2640,12 @@ void Game::Tick() if(Button()&&!oldbutton&&selected==3){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2658,12 +2658,12 @@ void Game::Tick() if(Button()&&!oldbutton&&selected==2){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2677,15 +2677,15 @@ void Game::Tick() else oldbutton=0; } if(mainmenu==9){ - if(Button()&&!oldbutton&&selected=0&&selected<=accountprogress[accountactive]){ + if(Button()&&!oldbutton&&selected=0&&selected<=accountprogress[accountactive]){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2707,17 +2707,17 @@ void Game::Tick() mainmenu=0; gameon=1; - FSOUND_SetPaused(channels[stream_music3], TRUE); + FSOUND_SetPaused(channels[stream_music3], true); } if(Button()&&!oldbutton&&selected==numchallengelevels){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2731,15 +2731,15 @@ void Game::Tick() else oldbutton=0; } if(mainmenu==11){ - if(Button()&&!oldbutton&&selected=0&&selected<=accountprogress[accountactive]){ + if(Button()&&!oldbutton&&selected=0&&selected<=accountprogress[accountactive]){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2761,17 +2761,17 @@ void Game::Tick() mainmenu=0; gameon=1; - FSOUND_SetPaused(channels[stream_music3], TRUE); + FSOUND_SetPaused(channels[stream_music3], true); } if(Button()&&!oldbutton&&selected==numchallengelevels){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2789,12 +2789,12 @@ void Game::Tick() if(Button()&&!oldbutton&&selected==3){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2812,12 +2812,12 @@ void Game::Tick() if(Button()&&!oldbutton&&selected==1){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2838,12 +2838,12 @@ void Game::Tick() if(tryquit)quit=1; float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2859,12 +2859,12 @@ void Game::Tick() quit=1; float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2878,12 +2878,12 @@ void Game::Tick() tryquit=0; float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2900,22 +2900,22 @@ void Game::Tick() if(Button()&&!oldbutton&&selected!=-1){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); } if(Button()&&!oldbutton&&selected==1){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2956,12 +2956,12 @@ void Game::Tick() if(Button()&&!oldbutton&&selected==2){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -2978,12 +2978,12 @@ void Game::Tick() if(Button()&&!oldbutton&&selected!=-1){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); } if(Button()&&!oldbutton&&selected==0&&numaccounts<8){ entername=1; @@ -3000,12 +3000,12 @@ void Game::Tick() if(Button()&&!oldbutton&&selected==numaccounts+1){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -3029,18 +3029,18 @@ void Game::Tick() if(Button()&&!oldbutton&&selected!=-1){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); if(selected==0)accountdifficulty[accountactive]=0; if(selected==1)accountdifficulty[accountactive]=1; if(selected==2)accountdifficulty[accountactive]=2; - mainmenu=5; + mainmenu=5; flashr=1; flashg=0; @@ -3156,7 +3156,7 @@ void Game::Tick() loaddistrib=0; } } - FSOUND_SetFrequency(channels[stream_music3], 22050); + FSOUND_SetFrequency(channels[stream_music3], 22050); if(entername||mainmenu==13||mainmenu==14){ for(i=0;i<140;i++){ @@ -3228,12 +3228,12 @@ void Game::Tick() float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); for(j=0;j<255;j++){ displaytext[0][j]=' '; @@ -3331,12 +3331,12 @@ void Game::Tick() float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); for(j=0;j<255;j++){ displaytext[0][j]=' '; @@ -3360,12 +3360,12 @@ void Game::Tick() float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); for(j=0;j<255;j++){ displaytext[0][j]=' '; @@ -3405,7 +3405,7 @@ void Game::Tick() } } - if(!mainmenu){ + if(!mainmenu){ if(hostile==1)hostiletime+=multiplier; else hostiletime=0; if(!winfreeze)leveltime+=multiplier; @@ -3581,9 +3581,9 @@ void Game::Tick() archiveselected=0; donesomething=0; if(Compare(consoletext[0],"quit ",0,4)||Compare(consoletext[0],"exit ",0,4)){ - PlaySoundEx( consolesuccesssound, samp[consolesuccesssound], NULL, TRUE); + PlaySoundEx( consolesuccesssound, samp[consolesuccesssound], NULL, true); FSOUND_SetVolume(channels[consolesuccesssound], 256); - FSOUND_SetPaused(channels[consolesuccesssound], FALSE); + FSOUND_SetPaused(channels[consolesuccesssound], false); donesomething=1; tryquit=1; } @@ -3667,12 +3667,12 @@ void Game::Tick() consoleselected=0; } } - else + else { donesomething=1; - PlaySoundEx( consolesuccesssound, samp[consolesuccesssound], NULL, TRUE); + PlaySoundEx( consolesuccesssound, samp[consolesuccesssound], NULL, true); FSOUND_SetVolume(channels[consolesuccesssound], 256); - FSOUND_SetPaused(channels[consolesuccesssound], FALSE); + FSOUND_SetPaused(channels[consolesuccesssound], false); if(consolechars[0]>0){ for(k=14;k>=1;k--){ @@ -3729,9 +3729,9 @@ void Game::Tick() else { donesomething=1; - PlaySoundEx( consolesuccesssound, samp[consolesuccesssound], NULL, TRUE); + PlaySoundEx( consolesuccesssound, samp[consolesuccesssound], NULL, true); FSOUND_SetVolume(channels[consolesuccesssound], 256); - FSOUND_SetPaused(channels[consolesuccesssound], FALSE); + FSOUND_SetPaused(channels[consolesuccesssound], false); if(consolechars[0]>0){ for(k=14;k>=1;k--){ @@ -3768,9 +3768,9 @@ void Game::Tick() } mapname[consolechars[0]-5+11]='\0'; - PlaySoundEx( consolesuccesssound, samp[consolesuccesssound], NULL, TRUE); + PlaySoundEx( consolesuccesssound, samp[consolesuccesssound], NULL, true); FSOUND_SetVolume(channels[consolesuccesssound], 256); - FSOUND_SetPaused(channels[consolesuccesssound], FALSE); + FSOUND_SetPaused(channels[consolesuccesssound], false); int mapvers; mapvers=12; @@ -3828,7 +3828,7 @@ void Game::Tick() fpackf(tfile, "Bi",templength); for(m=0;m49){ - realdialoguetype=dialoguetype[i]-50; + realdialoguetype=dialoguetype[i]-50; special=1; } else if(dialoguetype[i]>39){ - realdialoguetype=dialoguetype[i]-40; + realdialoguetype=dialoguetype[i]-40; special=1; } else if(dialoguetype[i]>29){ - realdialoguetype=dialoguetype[i]-30; + realdialoguetype=dialoguetype[i]-30; special=1; } else if(dialoguetype[i]>19){ - realdialoguetype=dialoguetype[i]-20; + realdialoguetype=dialoguetype[i]-20; special=1; } else if(dialoguetype[i]>9){ - realdialoguetype=dialoguetype[i]-10; + realdialoguetype=dialoguetype[i]-10; special=1; } else { @@ -5904,10 +5904,10 @@ void Game::Tick() if(dialogueboxsound[whichdialogue][indialogue]==-2)whichsoundplay=firestartsound; if(dialogueboxsound[whichdialogue][indialogue]==-3)whichsoundplay=consolesuccesssound; if(dialogueboxsound[whichdialogue][indialogue]==-4)whichsoundplay=consolefailsound; - PlaySoundEx( whichsoundplay, samp[whichsoundplay], NULL, TRUE); + PlaySoundEx( whichsoundplay, samp[whichsoundplay], NULL, true); FSOUND_3D_SetAttributes(channels[whichsoundplay], gLoc, vel); FSOUND_SetVolume(channels[whichsoundplay], 256); - FSOUND_SetPaused(channels[whichsoundplay], FALSE); + FSOUND_SetPaused(channels[whichsoundplay], false); } if(IsKeyDown(theKeyMap, attackkey))oldbuttondialogue=1; } @@ -5935,7 +5935,7 @@ void Game::Tick() hotspotsprite+=hotspot[i]; sprites.MakeSprite(breathsprite, hotspotsprite, hotspotsprite*0, 1,0.5,0, 7, 0.4); hotspotvisual[i]+=0.1/hotspotsize[i]/hotspotsize[i]/hotspotsize[i]; - } + } } for(i=0;i=1){ @@ -6472,16 +6472,16 @@ void Game::Tick() if(tutoriallevel!=1){ if(bonustime==0&&bonus!=solidhit&&bonus!=spinecrusher&&bonus!=tracheotomy&&bonus!=backstab&&bonusvalue>10){ - PlaySoundEx( consolesuccesssound, samp[consolesuccesssound], NULL, TRUE); + PlaySoundEx( consolesuccesssound, samp[consolesuccesssound], NULL, true); FSOUND_SetVolume(channels[consolesuccesssound], 256); - FSOUND_SetPaused(channels[consolesuccesssound], FALSE); + FSOUND_SetPaused(channels[consolesuccesssound], false); } } else if(bonustime==0){ - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); + FSOUND_SetPaused(channels[fireendsound], false); } if(bonustime==0){ if(bonus!=solidhit&&bonus!=twoxcombo&&bonus!=threexcombo&&bonus!=fourxcombo&&bonus!=megacombo)bonusnum[bonus]++; @@ -6595,11 +6595,11 @@ void Game::Tick() vel[0]=0; vel[1]=0; vel[2]=0; - PlaySoundEx( movewhooshsound, samp[movewhooshsound], NULL, TRUE); + PlaySoundEx( movewhooshsound, samp[movewhooshsound], NULL, true); FSOUND_3D_SetAttributes(channels[movewhooshsound], gLoc, vel); FSOUND_SetVolume(channels[movewhooshsound], 256); - FSOUND_SetPaused(channels[movewhooshsound], FALSE); - if(k==0)FSOUND_SetPaused(channels[whooshsound], TRUE); + FSOUND_SetPaused(channels[movewhooshsound], false); + if(k==0)FSOUND_SetPaused(channels[whooshsound], true); lowpointtarget=DoRotation(objects.model[i].facenormals[whichhit],0,objects.rotation[i],0); player[k].rotation=-asin(0-lowpointtarget.x); @@ -6626,11 +6626,11 @@ void Game::Tick() vel[0]=0; vel[1]=0; vel[2]=0; - PlaySoundEx( movewhooshsound, samp[movewhooshsound], NULL, TRUE); + PlaySoundEx( movewhooshsound, samp[movewhooshsound], NULL, true); FSOUND_3D_SetAttributes(channels[movewhooshsound], gLoc, vel); FSOUND_SetVolume(channels[movewhooshsound], 256); - FSOUND_SetPaused(channels[movewhooshsound], FALSE); - if(k==0)FSOUND_SetPaused(channels[whooshsound], TRUE); + FSOUND_SetPaused(channels[movewhooshsound], false); + if(k==0)FSOUND_SetPaused(channels[whooshsound], true); lowpointtarget=DoRotation(objects.model[i].facenormals[whichhit],0,objects.rotation[i],0); player[k].rotation=-asin(0-lowpointtarget.x); @@ -6657,11 +6657,11 @@ void Game::Tick() vel[0]=0; vel[1]=0; vel[2]=0; - PlaySoundEx( movewhooshsound, samp[movewhooshsound], NULL, TRUE); + PlaySoundEx( movewhooshsound, samp[movewhooshsound], NULL, true); FSOUND_3D_SetAttributes(channels[movewhooshsound], gLoc, vel); FSOUND_SetVolume(channels[movewhooshsound], 256); - FSOUND_SetPaused(channels[movewhooshsound], FALSE); - if(k==0)FSOUND_SetPaused(channels[whooshsound], TRUE); + FSOUND_SetPaused(channels[movewhooshsound], false); + if(k==0)FSOUND_SetPaused(channels[whooshsound], true); lowpointtarget=DoRotation(objects.model[i].facenormals[whichhit],0,objects.rotation[i],0); player[k].rotation=-asin(0-lowpointtarget.x); @@ -6688,11 +6688,11 @@ void Game::Tick() vel[0]=0; vel[1]=0; vel[2]=0; - PlaySoundEx( movewhooshsound, samp[movewhooshsound], NULL, TRUE); + PlaySoundEx( movewhooshsound, samp[movewhooshsound], NULL, true); FSOUND_3D_SetAttributes(channels[movewhooshsound], gLoc, vel); FSOUND_SetVolume(channels[movewhooshsound], 256); - FSOUND_SetPaused(channels[movewhooshsound], FALSE); - if(k==0)FSOUND_SetPaused(channels[whooshsound], TRUE); + FSOUND_SetPaused(channels[movewhooshsound], false); + if(k==0)FSOUND_SetPaused(channels[whooshsound], true); lowpointtarget=DoRotation(objects.model[i].facenormals[whichhit],0,objects.rotation[i],0); player[k].rotation=-asin(0-lowpointtarget.x); @@ -6723,11 +6723,11 @@ void Game::Tick() if(player[k].targetanimation==jumpupanim){player[k].jumppower=-4;player[k].targetanimation=player[k].getIdle();} player[k].target=0; - player[k].targetframe=0; + player[k].targetframe=0; player[k].onterrain=1; if(player[k].id==0){ - FSOUND_SetPaused(channels[whooshsound], TRUE); + FSOUND_SetPaused(channels[whooshsound], true); FSOUND_SetVolume(channels[whooshsound], 0); } @@ -6742,10 +6742,10 @@ void Game::Tick() vel[0]=player[k].velocity.x; vel[1]=player[k].velocity.y; vel[2]=player[k].velocity.z; - PlaySoundEx( landsound, samp[landsound], NULL, TRUE); + PlaySoundEx( landsound, samp[landsound], NULL, true); FSOUND_3D_SetAttributes(channels[landsound], gLoc, vel); FSOUND_SetVolume(channels[landsound], 128); - FSOUND_SetPaused(channels[landsound], FALSE); + FSOUND_SetPaused(channels[landsound], false); if(k==0){ envsound[numenvsounds]=player[k].coords; envsoundvol[numenvsounds]=16; @@ -6755,7 +6755,7 @@ void Game::Tick() } } - } + } } } if(tempcollide&&terrain.patchobjectnum[player[k].whichpatchx][player[k].whichpatchz]&&(/*player[k].jumptogglekeydown*/1==1||player[k].aitype!=playercontrolled)) @@ -6765,10 +6765,10 @@ void Game::Tick() lowpoint.y+=1.35; if(objects.type[i]!=rocktype) if(player[k].SphereCheck(&lowpoint, 1.33, &colpoint, &objects.position[i], &objects.rotation[i], &objects.model[i])!=-1){ - if(player[k].targetanimation!=jumpupanim&&player[k].targetanimation!=jumpdownanim&&player[k].onterrain)player[k].avoidcollided=1; + if(player[k].targetanimation!=jumpupanim&&player[k].targetanimation!=jumpdownanim&&player[k].onterrain)player[k].avoidcollided=1; player[k].coords=lowpoint; player[k].coords.y-=1.35; - player[k].collide=1; + player[k].collide=1; if((player[k].grabdelay<=0||player[k].aitype!=playercontrolled)&&((/*(player[k].isRun()||player[k].targetanimation==sneakanim||player[k].targetanimation==walkanim)&&*/player[k].currentanimation!=climbanim&&player[k].currentanimation!=hanganim&&!player[k].isWallJump())||player[k].targetanimation==jumpupanim||player[k].targetanimation==jumpdownanim)){ lowpoint=player[k].coords; @@ -6841,9 +6841,9 @@ void Game::Tick() player[k].coords.y=lowpointtarget.y-.07; player[k].currentoffset=(flatfacing-player[k].coords)/player[k].scale; - if(j>10||!player[k].isRun()){ + if(j>10||!player[k].isRun()){ if(player[k].targetanimation==jumpdownanim||player[k].targetanimation==jumpupanim){ - if(k==0)FSOUND_SetPaused(channels[whooshsound], TRUE); + if(k==0)FSOUND_SetPaused(channels[whooshsound], true); } float gLoc[3]; float vel[3]; @@ -6853,10 +6853,10 @@ void Game::Tick() vel[0]=player[k].velocity.x; vel[1]=player[k].velocity.y; vel[2]=player[k].velocity.z; - PlaySoundEx( jumpsound, samp[jumpsound], NULL, TRUE); + PlaySoundEx( jumpsound, samp[jumpsound], NULL, true); FSOUND_3D_SetAttributes(channels[jumpsound], gLoc, vel); FSOUND_SetVolume(channels[jumpsound], 128); - FSOUND_SetPaused(channels[jumpsound], FALSE); + FSOUND_SetPaused(channels[jumpsound], false); lowpointtarget=DoRotation(objects.model[i].facenormals[whichhit],0,objects.rotation[i],0); player[k].rotation=-asin(0-lowpointtarget.x); @@ -6885,7 +6885,7 @@ void Game::Tick() //player[k].currentanimation=hanganim; player[k].targetanimation=hanganim; player[k].jumppower=0; - } + } } j=100; } @@ -6915,10 +6915,10 @@ void Game::Tick() vel[1]=player[k].velocity.y; vel[2]=player[k].velocity.z; if(k==0){ - PlaySoundEx( whooshsound, samp[whooshsound], NULL, TRUE); + PlaySoundEx( whooshsound, samp[whooshsound], NULL, true); FSOUND_3D_SetAttributes(channels[whooshsound], gLoc, vel); FSOUND_SetVolume(channels[whooshsound], 128); - FSOUND_SetPaused(channels[whooshsound], FALSE); + FSOUND_SetPaused(channels[whooshsound], false); } } player[k].velocity.y+=gravity; @@ -6959,7 +6959,7 @@ void Game::Tick() static bool endkeydown; if(indialogue!=-1){ cameramode=1; - if(directing){ + if(directing){ facing=0; facing.z=-1; @@ -7045,10 +7045,10 @@ void Game::Tick() if(dialogueboxsound[whichdialogue][indialogue]==-2)whichsoundplay=firestartsound; if(dialogueboxsound[whichdialogue][indialogue]==-3)whichsoundplay=consolesuccesssound; if(dialogueboxsound[whichdialogue][indialogue]==-4)whichsoundplay=consolefailsound; - PlaySoundEx( whichsoundplay, samp[whichsoundplay], NULL, TRUE); + PlaySoundEx( whichsoundplay, samp[whichsoundplay], NULL, true); FSOUND_3D_SetAttributes(channels[whichsoundplay], gLoc, vel); FSOUND_SetVolume(channels[whichsoundplay], 256); - FSOUND_SetPaused(channels[whichsoundplay], FALSE); + FSOUND_SetPaused(channels[whichsoundplay], false); } } @@ -7085,12 +7085,12 @@ void Game::Tick() cameramode=0; } } - if(!directing){ - FSOUND_SetPaused(channels[whooshsound], TRUE); + if(!directing){ + FSOUND_SetPaused(channels[whooshsound], true); viewer=dialoguecamera[whichdialogue][indialogue]; if(viewer.y0.5) @@ -7137,10 +7137,10 @@ void Game::Tick() if(dialogueboxsound[whichdialogue][indialogue]==-4)whichsoundplay=consolefailsound; if(dialogueboxsound[whichdialogue][indialogue]==-6)whichsoundplay=alarmsound; if(dialogueboxsound[whichdialogue][indialogue]!=-5){ - PlaySoundEx( whichsoundplay, samp[whichsoundplay], NULL, TRUE); + PlaySoundEx( whichsoundplay, samp[whichsoundplay], NULL, true); FSOUND_3D_SetAttributes(channels[whichsoundplay], gLoc, vel); FSOUND_SetVolume(channels[whichsoundplay], 256); - FSOUND_SetPaused(channels[whichsoundplay], FALSE); + FSOUND_SetPaused(channels[whichsoundplay], false); } if(dialogueboxsound[whichdialogue][indialogue]==-5){ hotspot[numhotspots]=player[0].coords; @@ -7324,10 +7324,10 @@ void Game::Tick() vel[0]=0; vel[1]=0; vel[2]=0; - PlaySoundEx( hawksound, samp[hawksound], NULL, TRUE); + PlaySoundEx( hawksound, samp[hawksound], NULL, true); FSOUND_3D_SetAttributes(channels[hawksound], gLoc, vel); FSOUND_SetVolume(channels[hawksound], 128); - FSOUND_SetPaused(channels[hawksound], FALSE); + FSOUND_SetPaused(channels[hawksound], false); hawkcalldelay=16+abs(Random()%8); } @@ -7397,7 +7397,7 @@ void Game::Tick() for(j=0;j2)drawmode=0; - if(objects.numobjects0&&closest>=0)objects.DeleteObject(closest); + if(closestdist>0&&closest>=0)objects.DeleteObject(closest); drawmodetogglekeydown=1; } @@ -8335,11 +8335,11 @@ void Game::Tick() vel[0]=player[0].velocity.x; vel[1]=player[0].velocity.y; vel[2]=player[0].velocity.z; - PlaySoundEx( whooshsound, samp[whooshsound], NULL, TRUE); + PlaySoundEx( whooshsound, samp[whooshsound], NULL, true); FSOUND_3D_SetAttributes(channels[whooshsound], gLoc, vel); FSOUND_SetVolume(channels[whooshsound], 128); - FSOUND_SetPaused(channels[whooshsound], FALSE); - //FSOUND_SetPaused(channels[whooshsound], TRUE); + FSOUND_SetPaused(channels[whooshsound], false); + //FSOUND_SetPaused(channels[whooshsound], true); texturesizetogglekeydown=1; } @@ -8419,7 +8419,7 @@ void Game::Tick() for(i=0;i1) for(i=0;i1000||player[k].isRun()||(hasstaff)||(player[k].weaponactive!=-1&&player[i].skeleton.free&&(player[i].skeleton.longdead>2000||player[i].damage>player[i].damagetolerance/8||player[i].bloodloss>player[i].damagetolerance/2)&&findDistancefast(&player[k].coords,&player[i].coords)<1.5*(player[k].scale*5)*(player[k].scale*5)))){ @@ -8708,7 +8708,7 @@ void Game::Tick() if(player[i].onfire||player[k].onfire){ if(!player[i].onfire)player[i].CatchFire(); if(!player[k].onfire)player[k].CatchFire(); - } + } } tempcoords1=player[i].coords; @@ -8718,7 +8718,7 @@ void Game::Tick() collisionradius=1.2*((player[i].scale+player[k].scale)*2.5)*((player[i].scale+player[k].scale)*2.5); if(player[0].hasvictim) if(player[0].targetanimation==rabbitkickanim&&(k==0||i==0)&&!player[0].victim->skeleton.free)collisionradius=3; - if((!player[i].skeleton.oldfree||!player[k].skeleton.oldfree)&&(findDistancefast(&tempcoords1,&tempcoords2)1)||(player[k].skeleton.oldfree==1&&findLengthfast(&player[k].velocity)>1)||(player[i].skeleton.oldfree==0&&player[k].skeleton.oldfree==0)){ + if((player[i].skeleton.oldfree==1&&findLengthfast(&player[i].velocity)>1)||(player[k].skeleton.oldfree==1&&findLengthfast(&player[k].velocity)>1)||(player[i].skeleton.oldfree==0&&player[k].skeleton.oldfree==0)){ rotatetarget=player[k].velocity-player[i].velocity; if(((player[i].targetanimation!=getupfrombackanim&&player[i].targetanimation!=getupfromfrontanim)||player[i].skeleton.free)&&((player[k].targetanimation!=getupfrombackanim&&player[k].targetanimation!=getupfromfrontanim)||player[k].skeleton.free)) if(((((findLengthfast(&rotatetarget)>150&&(i!=0&&k!=0))||(findLengthfast(&rotatetarget)>50&&player[0].rabbitkickragdoll/*currentanimation==rabbitkickanim*/&&(i==0||k==0)))&&normaldotproduct(rotatetarget,player[k].coords-player[i].coords)>0)&&((i==0||k==0)||((player[i].skeleton.oldfree==1&&k!=0&&animation[player[k].currentanimation].attack==neutral)||(player[k].skeleton.oldfree==1&&i!=0&&animation[player[i].currentanimation].attack==neutral)||(player[i].isFlip()&&!player[i].skeleton.oldfree&&(i==0||k==0))||(player[k].isFlip()&&!player[k].skeleton.oldfree&&(i==0||k==0))||(i==0||k==0))))||((player[i].targetanimation==jumpupanim||player[i].targetanimation==jumpdownanim||player[i].isFlip())&&(player[k].targetanimation==jumpupanim||player[k].targetanimation==jumpdownanim||player[k].isFlip())&&(i==0||k==0)&&(!player[i].skeleton.oldfree&&!player[k].skeleton.oldfree))){ @@ -8759,10 +8759,10 @@ void Game::Tick() vel[1]=player[i].velocity.y; vel[2]=player[i].velocity.z; if(tutoriallevel!=1){ - PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, TRUE); + PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, true); FSOUND_3D_SetAttributes(channels[heavyimpactsound], gLoc, vel); FSOUND_SetVolume(channels[heavyimpactsound], 256); - FSOUND_SetPaused(channels[heavyimpactsound], FALSE); + FSOUND_SetPaused(channels[heavyimpactsound], false); } //player[i].velocity=player[k].velocity; //player[k].velocity=player[i].velocity; @@ -8843,7 +8843,7 @@ void Game::Tick() player[k].velocity.y=player[i].velocity.y; player[i].DoDamage(20); player[i].RagDoll(0); - player[k].lastcollide=1; + player[k].lastcollide=1; if(k==0){ bonus=AboveBonus; bonustime=0; @@ -8856,8 +8856,8 @@ void Game::Tick() //player[k].velocity.y-=10; player[i].velocity.y=player[k].velocity.y; player[k].DoDamage(20); - player[k].RagDoll(0); - player[i].lastcollide=1; + player[k].RagDoll(0); + player[i].lastcollide=1; if(i==0){ bonus=AboveBonus; bonustime=0; @@ -9060,7 +9060,7 @@ void Game::Tick() /* if(IsKeyDown(theKeyMap, MAC_Z_KEY)){ //Respawn - FSOUND_SetPaused(channels[whooshsound], TRUE); + FSOUND_SetPaused(channels[whooshsound], true); changedelay=0; for(k=0;kplayer[i].numwaypoints-1)player[i].waypoint=0; } - } + } if(player[i].numwaypoints>1&&player[i].howactive==typeactive&&player[i].pausetime<=0)player[i].forwardkeydown=1; else player[i].forwardkeydown=0; @@ -9406,7 +9406,7 @@ void Game::Tick() else player[i].targetrotation-=90; } } - } + } if(player[i].collided<1||player[i].targetanimation!=jumpupanim)player[i].jumpkeydown=0; if((player[i].collided>.8&&player[i].jumppower>=5))player[i].jumpkeydown=1; @@ -9438,7 +9438,7 @@ void Game::Tick() player[i].howactive=typeactive; } - } + } if(player[i].howactive=0){ if(weapons.owner[player[i].ally]!=-1||findDistancefast(&player[i].coords,&weapons.position[player[i].ally])>16){ @@ -9758,7 +9758,7 @@ void Game::Tick() if(rotatetarget.z<0)player[i].targetrotation=180-player[i].targetrotation; player[i].lookrotation=player[i].targetrotation; player[i].aiupdatedelay=.05; - player[i].forwardkeydown=1; + player[i].forwardkeydown=1; if(player[i].avoidcollided>.8&&!player[i].jumpkeydown&&player[i].collided<.8){ @@ -9796,7 +9796,7 @@ void Game::Tick() player[i].rightkeydown=0; player[i].attackkeydown=0; player[i].throwkeydown=1; - player[i].crouchkeydown=0; + player[i].crouchkeydown=0; if(player[i].targetanimation!=crouchremoveknifeanim&&player[i].targetanimation!=removeknifeanim)player[i].throwtogglekeydown=0; player[i].drawkeydown=0; } @@ -9888,7 +9888,7 @@ void Game::Tick() player[i].lastpathfindpoint2=-1; player[i].lastpathfindpoint3=-1; player[i].lastpathfindpoint4=-1; - } + } if(player[i].aiupdatedelay<0&&!animation[player[i].targetanimation].attack&&player[i].targetanimation!=staggerbackhighanim&&player[i].targetanimation!=staggerbackhardanim&&player[i].targetanimation!=backhandspringanim&&player[i].targetanimation!=dodgebackanim){ if(player[i].weaponactive==-1&&player[i].num_weapons>0)player[i].drawkeydown=Random()%2; else player[i].drawkeydown=0; @@ -10133,10 +10133,10 @@ void Game::Tick() vel[1]=player[i].velocity.y; vel[2]=player[i].velocity.z; if(weapons.type[j]!=staff){ - PlaySoundEx( knifedrawsound, samp[knifedrawsound], NULL, TRUE); + PlaySoundEx( knifedrawsound, samp[knifedrawsound], NULL, true); FSOUND_3D_SetAttributes(channels[knifedrawsound], gLoc, vel); FSOUND_SetVolume(channels[knifedrawsound], 128); - FSOUND_SetPaused(channels[knifedrawsound], FALSE); + FSOUND_SetPaused(channels[knifedrawsound], false); } player[i].weaponactive=0; @@ -10180,10 +10180,10 @@ void Game::Tick() vel[1]=player[i].velocity.y; vel[2]=player[i].velocity.z; if(weapons.type[k]!=staff){ - PlaySoundEx( knifedrawsound, samp[knifedrawsound], NULL, TRUE); + PlaySoundEx( knifedrawsound, samp[knifedrawsound], NULL, true); FSOUND_3D_SetAttributes(channels[knifedrawsound], gLoc, vel); FSOUND_SetVolume(channels[knifedrawsound], 128); - FSOUND_SetPaused(channels[knifedrawsound], FALSE); + FSOUND_SetPaused(channels[knifedrawsound], false); } player[i].weaponactive=0; @@ -10241,17 +10241,17 @@ void Game::Tick() } if(!fleshstuck){ if(weapons.type[k]!=staff){ - PlaySoundEx( knifedrawsound, samp[knifedrawsound], NULL, TRUE); + PlaySoundEx( knifedrawsound, samp[knifedrawsound], NULL, true); FSOUND_3D_SetAttributes(channels[knifedrawsound], gLoc, vel); FSOUND_SetVolume(channels[knifedrawsound], 128); - FSOUND_SetPaused(channels[knifedrawsound], FALSE); + FSOUND_SetPaused(channels[knifedrawsound], false); } } if(fleshstuck){ - PlaySoundEx( fleshstabremovesound, samp[fleshstabremovesound], NULL, TRUE); + PlaySoundEx( fleshstabremovesound, samp[fleshstabremovesound], NULL, true); FSOUND_3D_SetAttributes(channels[fleshstabremovesound], gLoc, vel); FSOUND_SetVolume(channels[fleshstabremovesound], 128); - FSOUND_SetPaused(channels[fleshstabremovesound], FALSE); + FSOUND_SetPaused(channels[fleshstabremovesound], false); } player[i].weaponactive=0; @@ -10339,7 +10339,7 @@ void Game::Tick() player[i].victim=&player[j]; XYZ aim; weapons.owner[player[i].weaponids[0]]=-1; - aim=player[i].victim->coords+DoRotation(player[i].victim->skeleton.joints[player[i].victim->skeleton.jointlabels[abdomen]].position,0,player[i].victim->rotation,0)*player[i].victim->scale+player[i].victim->velocity*findDistance(&player[i].victim->coords,&player[i].coords)/50-(player[i].coords+DoRotation(player[i].skeleton.joints[player[i].skeleton.jointlabels[righthand]].position,0,player[i].rotation,0)*player[i].scale); + aim=player[i].victim->coords+DoRotation(player[i].victim->skeleton.joints[player[i].victim->skeleton.jointlabels[abdomen]].position,0,player[i].victim->rotation,0)*player[i].victim->scale+player[i].victim->velocity*findDistance(&player[i].victim->coords,&player[i].coords)/50-(player[i].coords+DoRotation(player[i].skeleton.joints[player[i].skeleton.jointlabels[righthand]].position,0,player[i].rotation,0)*player[i].scale); Normalise(&aim); aim=DoRotation(aim,(float)abs(Random()%30)-15,(float)abs(Random()%30)-15,0); @@ -10355,7 +10355,7 @@ void Game::Tick() player[i].weaponids[0]=player[i].weaponids[player[i].num_weapons]; } player[i].weaponactive=-1; - } + } } } } @@ -10415,7 +10415,7 @@ void Game::Tick() player[i].target=0; player[i].drawtogglekeydown=1; } - } + } } if(player[i].isCrouch()&&weapons.bloody[player[i].weaponids[player[i].weaponactive]]&&bloodtoggle&&player[i].onterrain&&player[i].num_weapons&&player[i].weaponactive!=-1&&player[i].attackkeydown){ if(weapons.bloody[player[i].weaponids[player[i].weaponactive]]&&player[i].onterrain&&bloodtoggle&&musictype!=stream_music2){ @@ -10513,7 +10513,7 @@ void Game::Tick() if(target>=0)player[target].Reverse(); player[i].highreversaldelay=.5; - if(player[i].isCrouch()){ + if(player[i].isCrouch()){ if(!player[i].wasCrouch()){ player[i].currentanimation=player[i].getCrouch(); player[i].currentframe=0; @@ -10676,17 +10676,17 @@ void Game::Tick() vel[2]=player[i].velocity.z; if(i==0){ - PlaySoundEx( whooshsound, samp[whooshsound], NULL, TRUE); + PlaySoundEx( whooshsound, samp[whooshsound], NULL, true); FSOUND_3D_SetAttributes(channels[whooshsound], gLoc, vel); FSOUND_SetVolume(channels[whooshsound], 128); - FSOUND_SetPaused(channels[whooshsound], FALSE); + FSOUND_SetPaused(channels[whooshsound], false); } - PlaySoundEx( jumpsound, samp[jumpsound], NULL, TRUE); + PlaySoundEx( jumpsound, samp[jumpsound], NULL, true); FSOUND_3D_SetAttributes(channels[jumpsound], gLoc, vel); FSOUND_SetVolume(channels[jumpsound], 128); - FSOUND_SetPaused(channels[jumpsound], FALSE); - } + FSOUND_SetPaused(channels[jumpsound], false); + } if((player[i].isIdle())&&player[i].jumppower>1){ player[i].targetanimation=player[i].getLanding(); player[i].landhard=0; @@ -10694,7 +10694,7 @@ void Game::Tick() player[i].targetframe=2; player[i].jumpstart=1; player[i].tempdeltav=deltav; - } + } if(player[i].targetanimation==jumpupanim&&(((!floatjump&&!editorenabled)||!debugmode)||player[i].aitype!=playercontrolled)){ if(player[i].jumppower>multiplier*6){ player[i].velocity.y+=multiplier*6; @@ -10705,7 +10705,7 @@ void Game::Tick() player[i].jumppower=0; } } - if(((floatjump||editorenabled)&&debugmode)&&i==0)player[i].velocity.y+=multiplier*30; + if(((floatjump||editorenabled)&&debugmode)&&i==0)player[i].velocity.y+=multiplier*30; } if(!movekey){ @@ -10852,8 +10852,8 @@ void Game::Tick() FSOUND_StopSound(FSOUND_ALL); // hack...OpenAL renderer isn't stopping music after tutorial goes to level menu... FSOUND_SetFrequency(FSOUND_ALL, 0.001); - PlayStreamEx( stream_music3, strm[stream_music3], NULL, TRUE); - FSOUND_SetPaused(channels[stream_music3], FALSE); + PlayStreamEx( stream_music3, strm[stream_music3], NULL, true); + FSOUND_SetPaused(channels[stream_music3], false); FSOUND_SetVolume(channels[stream_music3], 256); gameon=0; @@ -10861,12 +10861,12 @@ void Game::Tick() float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -10884,10 +10884,10 @@ void Game::Tick() vel[0]=0; vel[1]=0; vel[2]=0; - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); + FSOUND_SetPaused(channels[fireendsound], false); player[0].coords=(oldtemp+oldtemp2)/2; @@ -10907,10 +10907,10 @@ void Game::Tick() vel[0]=0; vel[1]=0; vel[2]=0; - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); + FSOUND_SetPaused(channels[fireendsound], false); for(int i=0;i128&&!loading&&!mainmenu)musicvolume[2]=128; - if(musictoggle){ + if(musictoggle){ if(musicvolume[0]>0&&oldmusicvolume[0]<=0){ - PlayStreamEx( music1, strm[music1], NULL, TRUE); - FSOUND_SetPaused(channels[music1], FALSE); + PlayStreamEx( music1, strm[music1], NULL, true); + FSOUND_SetPaused(channels[music1], false); } if(musicvolume[1]>0&&oldmusicvolume[1]<=0){ - PlayStreamEx( stream_music2, strm[stream_music2], NULL, TRUE); - FSOUND_SetPaused(channels[stream_music2], FALSE); + PlayStreamEx( stream_music2, strm[stream_music2], NULL, true); + FSOUND_SetPaused(channels[stream_music2], false); } if(musicvolume[2]>0&&oldmusicvolume[2]<=0){ - PlayStreamEx( stream_music3, strm[stream_music3], NULL, TRUE); - FSOUND_SetPaused(channels[stream_music3], FALSE); + PlayStreamEx( stream_music3, strm[stream_music3], NULL, true); + FSOUND_SetPaused(channels[stream_music3], false); } } - if(!musictoggle){ - FSOUND_SetPaused(channels[music1], TRUE); - FSOUND_SetPaused(channels[stream_music2], TRUE); - FSOUND_SetPaused(channels[stream_music3], TRUE); + if(!musictoggle){ + FSOUND_SetPaused(channels[music1], true); + FSOUND_SetPaused(channels[stream_music2], true); + FSOUND_SetPaused(channels[stream_music3], true); for(i=0;i<4;i++){ oldmusicvolume[i]=0; @@ -11163,15 +11163,15 @@ void Game::TickOnceAfter(){ } } - if(musictoggle){ + if(musictoggle){ if(musicvolume[0]<=0&&oldmusicvolume[0]>0){ - FSOUND_SetPaused(channels[music1], TRUE); + FSOUND_SetPaused(channels[music1], true); } if(musicvolume[1]<=0&&oldmusicvolume[1]>0){ - FSOUND_SetPaused(channels[stream_music2], TRUE); + FSOUND_SetPaused(channels[stream_music2], true); } if(musicvolume[2]<=0&&oldmusicvolume[2]>0){ - FSOUND_SetPaused(channels[stream_music3], TRUE); + FSOUND_SetPaused(channels[stream_music3], true); } if(musicvolume[0]!=oldmusicvolume[0]){ @@ -11214,19 +11214,19 @@ void Game::TickOnceAfter(){ int numalarmed=0; if(numplayers>1) - for(i=1;imaxalarmed)maxalarmed=numalarmed; - if(changedelay<=0&&!loading&&!editorenabled&&gameon&&!tutoriallevel&&changedelay!=-999&&!won){ + if(changedelay<=0&&!loading&&!editorenabled&&gameon&&!tutoriallevel&&changedelay!=-999&&!won){ if(player[0].dead&&changedelay<=0){ changedelay=1; targetlevel=whichlevel; } alldead=1; if(numplayers>1) - for(i=1;iaccounthighscore[accountactive][whichlevel])accounthighscore[accountactive][whichlevel]=bonustotal-startbonustotal; - if(accountfasttime[accountactive][whichlevel]==0||leveltime3&&!registered){ - FSOUND_SetFrequency(FSOUND_ALL, 0.001); - PlayStreamEx( stream_music3, strm[stream_music3], NULL, TRUE); - FSOUND_SetPaused(channels[stream_music3], FALSE); + FSOUND_SetFrequency(FSOUND_ALL, 0.001); + PlayStreamEx( stream_music3, strm[stream_music3], NULL, true); + FSOUND_SetPaused(channels[stream_music3], false); FSOUND_SetVolume(channels[stream_music3], 256); gameon=0; @@ -11377,12 +11377,12 @@ void Game::TickOnceAfter(){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 9999.0f, 99999.0f); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[fireendsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -11414,12 +11414,12 @@ void Game::TickOnceAfter(){ if(!stealthloading){ float gLoc[3]={0,0,0}; float vel[3]={0,0,0}; - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 9999.0f, 99999.0f); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); - FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); + FSOUND_SetPaused(channels[firestartsound], false); + FSOUND_Sample_SetMinMaxDistance(samp[firestartsound], 8.0f, 2000.0f); flashr=1; flashg=0; @@ -11530,7 +11530,7 @@ void Game::TickOnceAfter(){ campaign=1; mainmenu=0; gameon=1; - FSOUND_SetPaused(channels[stream_music3], TRUE); + FSOUND_SetPaused(channels[stream_music3], true); stealthloading=0; } @@ -11556,7 +11556,7 @@ void Game::TickOnceAfter(){ target.y+=.1; if(player[0].skeleton.free){ for(i=0;itarget.y) + if(player[0].skeleton.joints[i].position.y*player[0].scale+player[0].coords.y>target.y) target.y=player[0].skeleton.joints[i].position.y*player[0].scale+player[0].coords.y; } target.y+=.1; @@ -11586,7 +11586,7 @@ void Game::TickOnceAfter(){ i=terrain.patchobjects[player[0].whichpatchx][player[0].whichpatchz][j]; colviewer=viewer; coltarget=cameraloc; - if(objects.model[i].LineCheckPossible(&colviewer,&coltarget,&col,&objects.position[i],&objects.rotation[i])!=-1)viewer=col; + if(objects.model[i].LineCheckPossible(&colviewer,&coltarget,&col,&objects.position[i],&objects.rotation[i])!=-1)viewer=col; } if(terrain.patchobjectnum[player[0].whichpatchx][player[0].whichpatchz]) for(j=0;jd_name, ptr) == 0) + if (strcasecmp(dent->d_name, ptr) == 0) { strcpy(ptr, dent->d_name); /* found a match. Overwrite with this case. */ closedir(dirp); diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index b4faa66..9affb71 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -24,8 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #endif -#include "Game.h" - #ifndef USE_DEVIL # ifdef WIN32 # define USE_DEVIL @@ -36,13 +34,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "IL/il.h" #include "IL/ilu.h" #include "IL/ilut.h" + #include "Game.h" #else - // just use libpng and libjpg directly; it's lighter-weight and easier - // to manage the dependencies on Linux... - extern "C" { - #include "png.h" - #include "jpeglib.h" - } + + #include + #include + #include + #include "Game.h" static bool load_image(const char * fname, TGAImageRec & tex); static bool load_png(const char * fname, TGAImageRec & tex); static bool load_jpg(const char * fname, TGAImageRec & tex); @@ -268,7 +266,7 @@ bool cmdline(const char *cmd) char *arg = _argv[i]; while (*arg == '-') arg++; - if (stricmp(arg, cmd) == 0) + if (strcasecmp(arg, cmd) == 0) return true; } @@ -1522,7 +1520,7 @@ char *calcBaseDir(const char *argv0) char *retval; char *envr; - char *ptr = strrchr(argv0, '/'); + char *ptr = strrchr((char *)argv0, '/'); if (strchr(argv0, '/')) { retval = strdup(argv0); @@ -2576,12 +2574,12 @@ int main(int argc, char **argv) #if !USE_DEVIL static bool load_image(const char *file_name, TGAImageRec &tex) { - char *ptr = strrchr(file_name, '.'); + char *ptr = strrchr((char *)file_name, '.'); if (ptr) { - if (stricmp(ptr+1, "png") == 0) + if (strcasecmp(ptr+1, "png") == 0) return load_png(file_name, tex); - else if (stricmp(ptr+1, "jpg") == 0) + else if (strcasecmp(ptr+1, "jpg") == 0) return load_jpg(file_name, tex); } @@ -2740,10 +2738,10 @@ png_done: static bool save_image(const char *file_name) { - char *ptr = strrchr(file_name, '.'); + char *ptr = strrchr((char *)file_name, '.'); if (ptr) { - if (stricmp(ptr+1, "png") == 0) + if (strcasecmp(ptr+1, "png") == 0) return save_png(file_name); } diff --git a/Source/Person.cpp b/Source/Person.cpp index 9362358..e495d77 100644 --- a/Source/Person.cpp +++ b/Source/Person.cpp @@ -10,7 +10,7 @@ of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -109,7 +109,7 @@ extern int indialogue; extern bool gamestarted; extern FSOUND_STREAM * strm[20]; -extern "C" void PlaySoundEx(int channel, FSOUND_SAMPLE *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused); +extern "C" void PlaySoundEx(int channel, FSOUND_SAMPLE *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused); extern "C" void PlayStreamEx(int chan, FSOUND_STREAM *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused); void Person::CheckKick(){ @@ -139,10 +139,10 @@ void Person::CheckKick(){ vel[1]=velocity.y; vel[2]=velocity.z; if(tutoriallevel!=1){ - PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, TRUE); + PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, true); FSOUND_3D_SetAttributes(channels[heavyimpactsound], gLoc, vel); FSOUND_SetVolume(channels[heavyimpactsound], 128); - FSOUND_SetPaused(channels[heavyimpactsound], FALSE); + FSOUND_SetPaused(channels[heavyimpactsound], false); } victim->RagDoll(0); relative=velocity; @@ -162,7 +162,7 @@ void Person::CheckKick(){ velocity=facing*-10; velocity.y=5; skeleton.free=0; - if(id==0)FSOUND_SetPaused(channels[whooshsound], FALSE); + if(id==0)FSOUND_SetPaused(channels[whooshsound], false); //if(victim->damage>victim->damagetolerance){ if(id==0){ @@ -214,19 +214,19 @@ void Person::CatchFire(){ vel[0]=0; vel[1]=0; vel[2]=0; - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); + FSOUND_SetPaused(channels[firestartsound], false); vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - //PlaySoundEx( firesound, samp[firesound], NULL, TRUE); - PlayStreamEx( stream_firesound, strm[stream_firesound], NULL, TRUE); + //PlaySoundEx( firesound, samp[firesound], NULL, true); + PlayStreamEx( stream_firesound, strm[stream_firesound], NULL, true); FSOUND_3D_SetAttributes(channels[stream_firesound], gLoc, vel); FSOUND_SetVolume(channels[stream_firesound], 256); - FSOUND_SetPaused(channels[stream_firesound], FALSE); + FSOUND_SetPaused(channels[stream_firesound], false); flamedelay=0; @@ -440,7 +440,7 @@ void Person::DoBlood(float howmuch,int which){ if(!skeleton.free){ sprites.MakeSprite(bloodsprite, DoRotation((skeleton.joints[skeleton.jointlabels[head]].position+skeleton.joints[skeleton.jointlabels[neck]].position)/2,0,rotation,0)*scale+coords,bloodvel, 1,1,1, .05, 1); sprites.MakeSprite(bloodflamesprite, DoRotation((skeleton.joints[skeleton.jointlabels[head]].position+skeleton.joints[skeleton.jointlabels[neck]].position)/2,0,rotation,0)*scale+coords,bloodvel, 1,1,1, .3, 1); - } + } } if(Random()%2==0) for(int i=0;i<3;i++){ @@ -531,10 +531,10 @@ void Person::DoBloodBig(float howmuch,int which){ } if(whichsound!=-1){ - PlaySoundEx( whichsound, samp[whichsound], NULL, TRUE); + PlaySoundEx( whichsound, samp[whichsound], NULL, true); FSOUND_3D_SetAttributes(channels[whichsound], gLoc, vel); FSOUND_SetVolume(channels[whichsound], 512); - FSOUND_SetPaused(channels[whichsound], FALSE); + FSOUND_SetPaused(channels[whichsound], false); } } @@ -567,7 +567,7 @@ void Person::DoBloodBig(float howmuch,int which){ if(!skeleton.free){ sprites.MakeSprite(bloodsprite, DoRotation((skeleton.joints[skeleton.jointlabels[head]].position+skeleton.joints[skeleton.jointlabels[neck]].position)/2,0,rotation,0)*scale+coords,bloodvel, 1,1,1, .05, 1); sprites.MakeSprite(bloodflamesprite, DoRotation((skeleton.joints[skeleton.jointlabels[head]].position+skeleton.joints[skeleton.jointlabels[neck]].position)/2,0,rotation,0)*scale+coords,bloodvel, 1,1,1, .3, 1); - } + } } } int offsetx=0,offsety=0; @@ -608,7 +608,7 @@ void Person::DoBloodBig(float howmuch,int which){ if(i>endx)endx=i; if(j>endy)endy=j; } - } + } } if(creature==wolftype) for(i=0;i<512;i++){ @@ -619,7 +619,7 @@ void Person::DoBloodBig(float howmuch,int which){ if(i>endx)endx=i; if(j>endy)endy=j; } - } + } } startx+=offsetx; @@ -697,7 +697,7 @@ void Person::DoBloodBig(float howmuch,int which){ bloodloss+=bleeding*3; if(tutoriallevel!=1&&aitype!=playercontrolled&&bloodloss>damagetolerance*2/3&&bloodlossendx)endx=i; if(j>endy)endy=j; } - } + } } if(creature==wolftype) for(i=0;i<512;i++){ @@ -835,7 +835,7 @@ bool Person::DoBloodBigWhere(float howmuch,int which, XYZ where){ if(i>endx)endx=i; if(j>endy)endy=j; } - } + } } startx+=offsetx; endx+=offsetx; @@ -915,7 +915,7 @@ bool Person::DoBloodBigWhere(float howmuch,int which, XYZ where){ bloodloss+=bleeding*3; if(tutoriallevel!=1&&aitype!=playercontrolled&&bloodloss>damagetolerance*2/3&&bloodlossweaponids[0]]==staff)weapons.damage[victim->weaponids[0]]+=.2+float(abs(Random()%100)-50)/250; if(weapons.type[weaponids[0]]==staff)weapons.damage[weaponids[0]]+=.2+float(abs(Random()%100)-50)/250; - PlaySoundEx( swordstaffsound, samp[swordstaffsound], NULL, TRUE); + PlaySoundEx( swordstaffsound, samp[swordstaffsound], NULL, true); FSOUND_3D_SetAttributes(channels[swordstaffsound], gLoc, vel); FSOUND_SetVolume(channels[swordstaffsound], 512); - FSOUND_SetPaused(channels[swordstaffsound], FALSE); + FSOUND_SetPaused(channels[swordstaffsound], false); } else{ - PlaySoundEx( metalhitsound, samp[metalhitsound], NULL, TRUE); + PlaySoundEx( metalhitsound, samp[metalhitsound], NULL, true); FSOUND_3D_SetAttributes(channels[metalhitsound], gLoc, vel); FSOUND_SetVolume(channels[metalhitsound], 512); - FSOUND_SetPaused(channels[metalhitsound], FALSE); + FSOUND_SetPaused(channels[metalhitsound], false); } } XYZ aim; @@ -1227,10 +1227,10 @@ void Person::Reverse(){ - /*PlaySoundEx( metalhitsound, samp[metalhitsound], NULL, TRUE); + /*PlaySoundEx( metalhitsound, samp[metalhitsound], NULL, true); FSOUND_3D_SetAttributes(channels[metalhitsound], gLoc, vel); FSOUND_SetVolume(channels[metalhitsound], 512); - FSOUND_SetPaused(channels[metalhitsound], FALSE);*/ + FSOUND_SetPaused(channels[metalhitsound], false);*/ } if(abs(Random()%20)==0){ @@ -1247,16 +1247,16 @@ void Person::Reverse(){ if(weapons.type[victim->weaponids[0]]==staff)weapons.damage[victim->weaponids[0]]+=.2+float(abs(Random()%100)-50)/250; if(weapons.type[weaponids[0]]==staff)weapons.damage[weaponids[0]]+=.2+float(abs(Random()%100)-50)/250; - PlaySoundEx( swordstaffsound, samp[swordstaffsound], NULL, TRUE); + PlaySoundEx( swordstaffsound, samp[swordstaffsound], NULL, true); FSOUND_3D_SetAttributes(channels[swordstaffsound], gLoc, vel); FSOUND_SetVolume(channels[swordstaffsound], 512); - FSOUND_SetPaused(channels[swordstaffsound], FALSE); + FSOUND_SetPaused(channels[swordstaffsound], false); } else{ - PlaySoundEx( metalhitsound, samp[metalhitsound], NULL, TRUE); + PlaySoundEx( metalhitsound, samp[metalhitsound], NULL, true); FSOUND_3D_SetAttributes(channels[metalhitsound], gLoc, vel); FSOUND_SetVolume(channels[metalhitsound], 512); - FSOUND_SetPaused(channels[metalhitsound], FALSE); + FSOUND_SetPaused(channels[metalhitsound], false); } } @@ -1288,10 +1288,10 @@ void Person::Reverse(){ } - /*PlaySoundEx( metalhitsound, samp[metalhitsound], NULL, TRUE); + /*PlaySoundEx( metalhitsound, samp[metalhitsound], NULL, true); FSOUND_3D_SetAttributes(channels[metalhitsound], gLoc, vel); FSOUND_SetVolume(channels[metalhitsound], 512); - FSOUND_SetPaused(channels[metalhitsound], FALSE);*/ + FSOUND_SetPaused(channels[metalhitsound], false);*/ } } if(hasvictim) @@ -1366,7 +1366,7 @@ void Person::DoDamage(float howmuch){ if(aitype==passivetype&&damagedamagetolerance*2/3&&creature==rabbittype){ - if(abs(Random()%2)==0){aitype=gethelptype; + if(abs(Random()%2)==0){aitype=gethelptype; lastseentime=12; } else aitype=attacktypecutoff; @@ -1397,10 +1397,10 @@ void Person::DoDamage(float howmuch){ vel[0]=0; vel[1]=0; vel[2]=0; - PlaySoundEx( splattersound, samp[splattersound], NULL, TRUE); + PlaySoundEx( splattersound, samp[splattersound], NULL, true); FSOUND_3D_SetAttributes(channels[splattersound], gLoc, vel); FSOUND_SetVolume(channels[splattersound], 256); - FSOUND_SetPaused(channels[splattersound], FALSE); + FSOUND_SetPaused(channels[splattersound], false); skeleton.free=2; DoDamage(10000); @@ -1412,7 +1412,7 @@ void Person::DoDamage(float howmuch){ if(!dead&&creature==wolftype){ bonus=Wolfbonus; bonustime=0; - bonusvalue=300; + bonusvalue=300; } dead=2; coords=20; @@ -1451,10 +1451,10 @@ void Person::DoDamage(float howmuch){ } if(whichsound!=-1){ - PlaySoundEx( whichsound, samp[whichsound], NULL, TRUE); + PlaySoundEx( whichsound, samp[whichsound], NULL, true); FSOUND_3D_SetAttributes(channels[whichsound], gLoc, vel); FSOUND_SetVolume(channels[whichsound], 512); - FSOUND_SetPaused(channels[whichsound], FALSE); + FSOUND_SetPaused(channels[whichsound], false); } } speechdelay=.3; @@ -1758,7 +1758,7 @@ void Person::Puff(int whichlabel){ /* -HitStruct Person::BulletCollideWithPlayer(XYZ start, XYZ end){ +HitStruct Person::BulletCollideWithPlayer(XYZ start, XYZ end){ float damage=20; XYZ tempbulletloc[2]; XYZ collisionpoint; @@ -1926,7 +1926,7 @@ hitstruct.hitlocation=hitstruct.hitlocation+coords; return hitstruct; } */ -void Person::DoAnimations(){ +void Person::DoAnimations(){ if(!skeleton.free){ int i = 0; static float oldtarget; @@ -1934,7 +1934,7 @@ void Person::DoAnimations(){ if(isIdle()&¤tanimation!=getIdle())normalsupdatedelay=0; if(targetanimation==tempanim||currentanimation==tempanim){ - animation[tempanim]=tempanimation; + animation[tempanim]=tempanimation; } if(targetanimation==jumpupanim||targetanimation==jumpdownanim||isFlip()){ float gLoc[3]; @@ -1950,7 +1950,7 @@ void Person::DoAnimations(){ FSOUND_3D_SetAttributes(channels[whooshsound], gLoc, vel); FSOUND_SetVolume(channels[whooshsound], 64*findLength(&velocity)/5); } - if(((velocity.y<-15)||(crouchkeydown&&velocity.y<-8))&&abs(velocity.y)*4>fast_sqrt(velocity.x*velocity.x*velocity.z*velocity.z))landhard=1; + if(((velocity.y<-15)||(crouchkeydown&&velocity.y<-8))&&abs(velocity.y)*4>fast_sqrt(velocity.x*velocity.x*velocity.z*velocity.z))landhard=1; if(!crouchkeydown&&velocity.y>=-15)landhard=0; } if((currentanimation==jumpupanim||targetanimation==jumpdownanim)/*&&velocity.y<40*/&&!isFlip()&&(!isLanding()&&!isLandhard())&&((crouchkeydown&&!crouchtogglekeydown))){ @@ -1974,7 +1974,7 @@ void Person::DoAnimations(){ crouchtogglekeydown=0; if(aitype==playercontrolled)feint=0; } - else + else { if(!crouchtogglekeydown&&animation[targetanimation].attack==reversed&&aitype==playercontrolled&&(escapednum<2||reversaltrain))feint=1; if(!isFlip())crouchtogglekeydown=1; @@ -1996,11 +1996,11 @@ void Person::DoAnimations(){ vel[0]=0; vel[1]=0; vel[2]=0; - PlaySoundEx( fireendsound, samp[fireendsound], NULL, TRUE); + PlaySoundEx( fireendsound, samp[fireendsound], NULL, true); FSOUND_3D_SetAttributes(channels[fireendsound], gLoc, vel); FSOUND_SetVolume(channels[fireendsound], 256); - FSOUND_SetPaused(channels[fireendsound], FALSE); - FSOUND_SetPaused(channels[stream_firesound], TRUE); + FSOUND_SetPaused(channels[fireendsound], false); + FSOUND_SetPaused(channels[stream_firesound], true); deathbleeding=0; } @@ -2026,10 +2026,10 @@ void Person::DoAnimations(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, TRUE); + PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, true); FSOUND_3D_SetAttributes(channels[clawslicesound], gLoc, vel); FSOUND_SetVolume(channels[clawslicesound], 128); - FSOUND_SetPaused(channels[clawslicesound], FALSE); + FSOUND_SetPaused(channels[clawslicesound], false); victim->spurt=1; victim->DoBloodBig(1/victim->armorhead,210); } @@ -2057,10 +2057,10 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( knifesheathesound, samp[knifesheathesound], NULL, TRUE); + PlaySoundEx( knifesheathesound, samp[knifesheathesound], NULL, true); FSOUND_3D_SetAttributes(channels[knifesheathesound], gLoc, vel); FSOUND_SetVolume(channels[knifesheathesound], 128); - FSOUND_SetPaused(channels[knifesheathesound], FALSE); + FSOUND_SetPaused(channels[knifesheathesound], false); } if(weaponactive!=-1){ float gLoc[3]; @@ -2072,10 +2072,10 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( knifedrawsound, samp[knifedrawsound], NULL, TRUE); + PlaySoundEx( knifedrawsound, samp[knifedrawsound], NULL, true); FSOUND_3D_SetAttributes(channels[knifedrawsound], gLoc, vel); FSOUND_SetVolume(channels[knifedrawsound], 128); - FSOUND_SetPaused(channels[knifedrawsound], FALSE); + FSOUND_SetPaused(channels[knifedrawsound], false); } } drawtogglekeydown=1; @@ -2103,11 +2103,11 @@ void Person::DoAnimations(){ FootLand(0,1); } - } + } if(terrain.getOpacity(coords.x,coords.z)>=.2){ if(animation[targetanimation].label[targetframe]==1)whichsound=footstepsound3; else whichsound=footstepsound4; - } + } } if(!onterrain){ if(animation[targetanimation].label[targetframe]==1)whichsound=footstepsound3; @@ -2125,12 +2125,12 @@ void Person::DoAnimations(){ else if(animation[targetanimation].label[targetframe]==4)whichsound=knifeswishsound; if(animation[targetanimation].label[targetframe]==8&&tutoriallevel!=1)whichsound=landsound2; - PlaySoundEx( whichsound, samp[whichsound], NULL, TRUE); + PlaySoundEx( whichsound, samp[whichsound], NULL, true); FSOUND_3D_SetAttributes(channels[whichsound], gLoc, vel); if(whichsound!=knifeswishsound)FSOUND_SetVolume(channels[whichsound], 128); if(whichsound!=knifeswishsound&&(targetanimation==staffhitanim||targetanimation==staffgroundsmashanim||targetanimation==staffspinhitanim))FSOUND_SetVolume(channels[whichsound], 256); if(whichsound==knifeswishsound)FSOUND_SetVolume(channels[whichsound], 512); - FSOUND_SetPaused(channels[whichsound], FALSE); + FSOUND_SetPaused(channels[whichsound], false); if(id==0) if(whichsound==footstepsound||whichsound==footstepsound2||whichsound==footstepsound3||whichsound==footstepsound4){ @@ -2143,10 +2143,10 @@ void Person::DoAnimations(){ if(animation[targetanimation].label[targetframe]==3){ whichsound--; - PlaySoundEx( whichsound, samp[whichsound], NULL, TRUE); + PlaySoundEx( whichsound, samp[whichsound], NULL, true); FSOUND_3D_SetAttributes(channels[whichsound], gLoc, vel); FSOUND_SetVolume(channels[whichsound], 128); - FSOUND_SetPaused(channels[whichsound], FALSE); + FSOUND_SetPaused(channels[whichsound], false); } } @@ -2187,16 +2187,16 @@ void Person::DoAnimations(){ //if(animation[targetanimation].label[targetframe]==8)whichsound=landsound2; if(whichsound!=-1){ - PlaySoundEx( whichsound, samp[whichsound], NULL, TRUE); + PlaySoundEx( whichsound, samp[whichsound], NULL, true); FSOUND_3D_SetAttributes(channels[whichsound], gLoc, vel); FSOUND_SetVolume(channels[whichsound], 512); - FSOUND_SetPaused(channels[whichsound], FALSE); + FSOUND_SetPaused(channels[whichsound], false); } } - if((!wasLanding()&&!wasLandhard())&¤tanimation!=getIdle()&&(isLanding()||isLandhard())){ + if((!wasLanding()&&!wasLandhard())&¤tanimation!=getIdle()&&(isLanding()||isLandhard())){ FootLand(0,1); FootLand(1,1); } @@ -2221,10 +2221,10 @@ void Person::DoAnimations(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( knifedrawsound, samp[knifedrawsound], NULL, TRUE); + PlaySoundEx( knifedrawsound, samp[knifedrawsound], NULL, true); FSOUND_3D_SetAttributes(channels[knifedrawsound], gLoc, vel); FSOUND_SetVolume(channels[knifedrawsound], 128); - FSOUND_SetPaused(channels[knifedrawsound], FALSE); + FSOUND_SetPaused(channels[knifedrawsound], false); } weaponactive=0; @@ -2267,17 +2267,17 @@ void Person::DoAnimations(){ } if(!fleshstuck){ if(weapons.type[i]!=staff){ - PlaySoundEx( knifedrawsound, samp[knifedrawsound], NULL, TRUE); + PlaySoundEx( knifedrawsound, samp[knifedrawsound], NULL, true); FSOUND_3D_SetAttributes(channels[knifedrawsound], gLoc, vel); FSOUND_SetVolume(channels[knifedrawsound], 128); - FSOUND_SetPaused(channels[knifedrawsound], FALSE); + FSOUND_SetPaused(channels[knifedrawsound], false); } } if(fleshstuck){ - PlaySoundEx( fleshstabremovesound, samp[fleshstabremovesound], NULL, TRUE); + PlaySoundEx( fleshstabremovesound, samp[fleshstabremovesound], NULL, true); FSOUND_3D_SetAttributes(channels[fleshstabremovesound], gLoc, vel); FSOUND_SetVolume(channels[fleshstabremovesound], 128); - FSOUND_SetPaused(channels[fleshstabremovesound], FALSE); + FSOUND_SetPaused(channels[fleshstabremovesound], false); } weaponactive=0; if(weapons.owner[i]!=-1){ @@ -2354,10 +2354,10 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( knifesheathesound, samp[knifesheathesound], NULL, TRUE); + PlaySoundEx( knifesheathesound, samp[knifesheathesound], NULL, true); FSOUND_3D_SetAttributes(channels[knifesheathesound], gLoc, vel); FSOUND_SetVolume(channels[knifesheathesound], 128); - FSOUND_SetPaused(channels[knifesheathesound], FALSE); + FSOUND_SetPaused(channels[knifesheathesound], false); } if(weaponactive!=-1){ float gLoc[3]; @@ -2369,10 +2369,10 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( knifedrawsound, samp[knifedrawsound], NULL, TRUE); + PlaySoundEx( knifedrawsound, samp[knifedrawsound], NULL, true); FSOUND_3D_SetAttributes(channels[knifedrawsound], gLoc, vel); FSOUND_SetVolume(channels[knifedrawsound], 128); - FSOUND_SetPaused(channels[knifedrawsound], FALSE); + FSOUND_SetPaused(channels[knifedrawsound], false); } } @@ -2406,10 +2406,10 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( jumpsound, samp[jumpsound], NULL, TRUE); + PlaySoundEx( jumpsound, samp[jumpsound], NULL, true); FSOUND_3D_SetAttributes(channels[jumpsound], gLoc, vel); FSOUND_SetVolume(channels[jumpsound], 128); - FSOUND_SetPaused(channels[jumpsound], FALSE); + FSOUND_SetPaused(channels[jumpsound], false); } float closestdist; @@ -2454,10 +2454,10 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( jumpsound, samp[jumpsound], NULL, TRUE); + PlaySoundEx( jumpsound, samp[jumpsound], NULL, true); FSOUND_3D_SetAttributes(channels[jumpsound], gLoc, vel); FSOUND_SetVolume(channels[jumpsound], 128); - FSOUND_SetPaused(channels[jumpsound], FALSE); + FSOUND_SetPaused(channels[jumpsound], false); } } } @@ -2486,16 +2486,16 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; if(tutoriallevel!=1){ - PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, TRUE); + PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, true); FSOUND_3D_SetAttributes(channels[heavyimpactsound], gLoc, vel); FSOUND_SetVolume(channels[heavyimpactsound], 128); - FSOUND_SetPaused(channels[heavyimpactsound], FALSE); + FSOUND_SetPaused(channels[heavyimpactsound], false); } if(creature==wolftype){ - PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, TRUE); + PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, true); FSOUND_3D_SetAttributes(channels[clawslicesound], gLoc, vel); FSOUND_SetVolume(channels[clawslicesound], 128); - FSOUND_SetPaused(channels[clawslicesound], FALSE); + FSOUND_SetPaused(channels[clawslicesound], false); victim->spurt=1; victim->DoBloodBig(2/victim->armorhead,175); } @@ -2535,15 +2535,15 @@ void Person::DoAnimations(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( whooshhitsound, samp[whooshhitsound], NULL, TRUE); + PlaySoundEx( whooshhitsound, samp[whooshhitsound], NULL, true); FSOUND_3D_SetAttributes(channels[whooshhitsound], gLoc, vel); FSOUND_SetVolume(channels[whooshhitsound], 512); - FSOUND_SetPaused(channels[whooshhitsound], FALSE); + FSOUND_SetPaused(channels[whooshhitsound], false); if(creature==wolftype){ - PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, TRUE); + PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, true); FSOUND_3D_SetAttributes(channels[clawslicesound], gLoc, vel); FSOUND_SetVolume(channels[clawslicesound], 128); - FSOUND_SetPaused(channels[clawslicesound], FALSE); + FSOUND_SetPaused(channels[clawslicesound], false); victim->spurt=1; victim->DoBloodBig(2,175); } @@ -2580,16 +2580,16 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; if(tutoriallevel!=1){ - PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, TRUE); + PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, true); FSOUND_3D_SetAttributes(channels[heavyimpactsound], gLoc, vel); FSOUND_SetVolume(channels[heavyimpactsound], 160); - FSOUND_SetPaused(channels[heavyimpactsound], FALSE); + FSOUND_SetPaused(channels[heavyimpactsound], false); } if(creature==wolftype){ - PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, TRUE); + PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, true); FSOUND_3D_SetAttributes(channels[clawslicesound], gLoc, vel); FSOUND_SetVolume(channels[clawslicesound], 128); - FSOUND_SetPaused(channels[clawslicesound], FALSE); + FSOUND_SetPaused(channels[clawslicesound], false); victim->spurt=1; victim->DoBloodBig(2/victim->armorhead,175); } @@ -2635,16 +2635,16 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; if(tutoriallevel!=1){ - PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, TRUE); + PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, true); FSOUND_3D_SetAttributes(channels[heavyimpactsound], gLoc, vel); FSOUND_SetVolume(channels[heavyimpactsound], 160); - FSOUND_SetPaused(channels[heavyimpactsound], FALSE); + FSOUND_SetPaused(channels[heavyimpactsound], false); } if(creature==wolftype){ - PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, TRUE); + PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, true); FSOUND_3D_SetAttributes(channels[clawslicesound], gLoc, vel); FSOUND_SetVolume(channels[clawslicesound], 128); - FSOUND_SetPaused(channels[clawslicesound], FALSE); + FSOUND_SetPaused(channels[clawslicesound], false); victim->spurt=1; victim->DoBloodBig(2/victim->armorhead,175); } @@ -2691,10 +2691,10 @@ void Person::DoAnimations(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( whooshhitsound, samp[whooshhitsound], NULL, TRUE); + PlaySoundEx( whooshhitsound, samp[whooshhitsound], NULL, true); FSOUND_3D_SetAttributes(channels[whooshhitsound], gLoc, vel); FSOUND_SetVolume(channels[whooshhitsound], 512); - FSOUND_SetPaused(channels[whooshhitsound], FALSE); + FSOUND_SetPaused(channels[whooshhitsound], false); victim->RagDoll(0); XYZ relative; relative=victim->coords-coords; @@ -2722,15 +2722,15 @@ void Person::DoAnimations(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - /*PlaySoundEx( landsound2, samp[landsound2], NULL, TRUE); + /*PlaySoundEx( landsound2, samp[landsound2], NULL, true); FSOUND_3D_SetAttributes(channels[landsound2], gLoc, vel); FSOUND_SetVolume(channels[landsound2], 128); - FSOUND_SetPaused(channels[landsound2], FALSE); + FSOUND_SetPaused(channels[landsound2], false); */ - PlaySoundEx( movewhooshsound, samp[movewhooshsound], NULL, TRUE); + PlaySoundEx( movewhooshsound, samp[movewhooshsound], NULL, true); FSOUND_3D_SetAttributes(channels[movewhooshsound], gLoc, vel); FSOUND_SetVolume(channels[movewhooshsound], 128); - FSOUND_SetPaused(channels[movewhooshsound], FALSE); + FSOUND_SetPaused(channels[movewhooshsound], false); victim->skeleton.longdead=0; victim->skeleton.free=1; @@ -2772,10 +2772,10 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; if(tutoriallevel!=1){ - PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, TRUE); + PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, true); FSOUND_3D_SetAttributes(channels[heavyimpactsound], gLoc, vel); FSOUND_SetVolume(channels[heavyimpactsound], 128); - FSOUND_SetPaused(channels[heavyimpactsound], FALSE); + FSOUND_SetPaused(channels[heavyimpactsound], false); } XYZ relative; relative=victim->coords-coords; @@ -2807,10 +2807,10 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; if(tutoriallevel!=1){ - PlaySoundEx( thudsound, samp[thudsound], NULL, TRUE); + PlaySoundEx( thudsound, samp[thudsound], NULL, true); FSOUND_3D_SetAttributes(channels[thudsound], gLoc, vel); FSOUND_SetVolume(channels[thudsound], 400); - FSOUND_SetPaused(channels[thudsound], FALSE); + FSOUND_SetPaused(channels[thudsound], false); } victim->skeleton.longdead=0; @@ -2862,10 +2862,10 @@ void Person::DoAnimations(){ if(!hasvictim){ terrain.MakeDecal(blooddecalfast,(weapons.tippoint[weaponids[weaponactive]]*.8+weapons.position[weaponids[weaponactive]]*.2),.08,.6,Random()%360); - PlaySoundEx( knifesheathesound, samp[knifesheathesound], NULL, TRUE); + PlaySoundEx( knifesheathesound, samp[knifesheathesound], NULL, true); FSOUND_3D_SetAttributes(channels[knifesheathesound], gLoc, vel); FSOUND_SetVolume(channels[knifesheathesound], 128); - FSOUND_SetPaused(channels[knifesheathesound], FALSE); + FSOUND_SetPaused(channels[knifesheathesound], false); } if(victim&&hasvictim){ @@ -2928,10 +2928,10 @@ void Person::DoAnimations(){ victim->skeleton.joints[i].locked=0; //victim->skeleton.joints[i].velocity=0; } - PlaySoundEx( fleshstabsound, samp[fleshstabsound], NULL, TRUE); + PlaySoundEx( fleshstabsound, samp[fleshstabsound], NULL, true); FSOUND_3D_SetAttributes(channels[fleshstabsound], gLoc, vel); FSOUND_SetVolume(channels[fleshstabsound], 128); - FSOUND_SetPaused(channels[fleshstabsound], FALSE); + FSOUND_SetPaused(channels[fleshstabsound], false); } if(whichtri!=-1||weapons.bloody[weaponids[weaponactive]]){ @@ -2940,10 +2940,10 @@ void Person::DoAnimations(){ } if(whichtri==-1){ hasvictim=0; - PlaySoundEx( knifesheathesound, samp[knifesheathesound], NULL, TRUE); + PlaySoundEx( knifesheathesound, samp[knifesheathesound], NULL, true); FSOUND_3D_SetAttributes(channels[knifesheathesound], gLoc, vel); FSOUND_SetVolume(channels[knifesheathesound], 128); - FSOUND_SetPaused(channels[knifesheathesound], FALSE); + FSOUND_SetPaused(channels[knifesheathesound], false); } } } @@ -2961,19 +2961,19 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; if(!hasvictim){ - PlaySoundEx( knifedrawsound, samp[knifedrawsound], NULL, TRUE); + PlaySoundEx( knifedrawsound, samp[knifedrawsound], NULL, true); FSOUND_3D_SetAttributes(channels[knifedrawsound], gLoc, vel); FSOUND_SetVolume(channels[knifedrawsound], 128); - FSOUND_SetPaused(channels[knifedrawsound], FALSE); + FSOUND_SetPaused(channels[knifedrawsound], false); } if(victim&&hasvictim){ - XYZ footvel,footpoint; + XYZ footvel,footpoint; - PlaySoundEx( fleshstabremovesound, samp[fleshstabremovesound], NULL, TRUE); + PlaySoundEx( fleshstabremovesound, samp[fleshstabremovesound], NULL, true); FSOUND_3D_SetAttributes(channels[fleshstabremovesound], gLoc, vel); FSOUND_SetVolume(channels[fleshstabremovesound], 128); - FSOUND_SetPaused(channels[fleshstabremovesound], FALSE); + FSOUND_SetPaused(channels[fleshstabremovesound], false); footvel=0; footpoint=(weapons.tippoint[weaponids[weaponactive]]*.8+weapons.position[weaponids[weaponactive]]*.2); @@ -3033,7 +3033,7 @@ void Person::DoAnimations(){ for(i=0;iskeleton.num_joints;i++){ victim->skeleton.joints[i].velchange=0; - victim->skeleton.joints[i].locked=0; + victim->skeleton.joints[i].locked=0; //victim->skeleton.joints[i].velocity=0; } @@ -3056,7 +3056,7 @@ void Person::DoAnimations(){ if(!hasvictim&&onterrain){ weapons.bloody[weaponids[weaponactive]]=0; weapons.blooddrip[weaponids[weaponactive]]=0; - } + } } if(targetanimation==upunchanim&&animation[targetanimation].label[currentframe]==5){ @@ -3078,18 +3078,18 @@ void Person::DoAnimations(){ //if(!victim->isIdle()||victim->damage>victim->damagetolerance-60){ if(1==1){ if(tutoriallevel!=1){ - PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, TRUE); + PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, true); FSOUND_3D_SetAttributes(channels[heavyimpactsound], gLoc, vel); FSOUND_SetVolume(channels[heavyimpactsound], 128); - FSOUND_SetPaused(channels[heavyimpactsound], FALSE); + FSOUND_SetPaused(channels[heavyimpactsound], false); } } else { if(tutoriallevel!=1){ - PlaySoundEx( landsound2, samp[landsound2], NULL, TRUE); + PlaySoundEx( landsound2, samp[landsound2], NULL, true); FSOUND_3D_SetAttributes(channels[landsound2], gLoc, vel); FSOUND_SetVolume(channels[landsound2], 256); - FSOUND_SetPaused(channels[landsound2], FALSE); + FSOUND_SetPaused(channels[landsound2], false); } } @@ -3136,27 +3136,27 @@ void Person::DoAnimations(){ //if(!victim->isIdle()||victim->damage>victim->damagetolerance-60){ if(victim->damage<=victim->damagetolerance-60&&normaldotproduct(victim->facing,victim->coords-coords)<(scale*5)*(scale*5)*0&&animation[victim->targetanimation].height!=lowheight){ if(tutoriallevel!=1){ - PlaySoundEx( thudsound, samp[thudsound], NULL, TRUE); + PlaySoundEx( thudsound, samp[thudsound], NULL, true); FSOUND_3D_SetAttributes(channels[thudsound], gLoc, vel); FSOUND_SetVolume(channels[thudsound], 512); - FSOUND_SetPaused(channels[thudsound], FALSE); + FSOUND_SetPaused(channels[thudsound], false); } } else if(victim->damage<=victim->damagetolerance-60&&normaldotproduct(victim->facing,victim->coords-coords)<(scale*5)*(scale*5)*0&&animation[victim->targetanimation].height==lowheight){ if(tutoriallevel!=1){ - PlaySoundEx( whooshhitsound, samp[whooshhitsound], NULL, TRUE); + PlaySoundEx( whooshhitsound, samp[whooshhitsound], NULL, true); FSOUND_3D_SetAttributes(channels[whooshhitsound], gLoc, vel); FSOUND_SetVolume(channels[whooshhitsound], 512); - FSOUND_SetPaused(channels[whooshhitsound], FALSE); + FSOUND_SetPaused(channels[whooshhitsound], false); } } else { if(tutoriallevel!=1){ - PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, TRUE); + PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, true); FSOUND_3D_SetAttributes(channels[heavyimpactsound], gLoc, vel); FSOUND_SetVolume(channels[heavyimpactsound], 256); - FSOUND_SetPaused(channels[heavyimpactsound], FALSE); - } + FSOUND_SetPaused(channels[heavyimpactsound], false); + } } if(victim->damage>victim->damagetolerance-60||normaldotproduct(victim->facing,victim->coords-coords)>0||animation[victim->targetanimation].height==lowheight) @@ -3199,10 +3199,10 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( landsound2, samp[landsound2], NULL, TRUE); + PlaySoundEx( landsound2, samp[landsound2], NULL, true); FSOUND_3D_SetAttributes(channels[landsound2], gLoc, vel); FSOUND_SetVolume(channels[landsound2], 256); - FSOUND_SetPaused(channels[landsound2], FALSE); + FSOUND_SetPaused(channels[landsound2], false); Puff(righthand); } @@ -3225,16 +3225,16 @@ void Person::DoAnimations(){ if(weapons.type[victim->weaponids[0]]==staff)weapons.damage[victim->weaponids[0]]+=.2+float(abs(Random()%100)-50)/250; if(weapons.type[weaponids[0]]==staff)weapons.damage[weaponids[0]]+=.2+float(abs(Random()%100)-50)/250; - PlaySoundEx( swordstaffsound, samp[swordstaffsound], NULL, TRUE); + PlaySoundEx( swordstaffsound, samp[swordstaffsound], NULL, true); FSOUND_3D_SetAttributes(channels[swordstaffsound], gLoc, vel); FSOUND_SetVolume(channels[swordstaffsound], 512); - FSOUND_SetPaused(channels[swordstaffsound], FALSE); + FSOUND_SetPaused(channels[swordstaffsound], false); } else{ - PlaySoundEx( metalhitsound, samp[metalhitsound], NULL, TRUE); + PlaySoundEx( metalhitsound, samp[metalhitsound], NULL, true); FSOUND_3D_SetAttributes(channels[metalhitsound], gLoc, vel); FSOUND_SetVolume(channels[metalhitsound], 512); - FSOUND_SetPaused(channels[metalhitsound], FALSE); + FSOUND_SetPaused(channels[metalhitsound], false); } } @@ -3247,7 +3247,7 @@ void Person::DoAnimations(){ escapednum=0; XYZ aim; weapons.owner[weaponids[0]]=-1; - aim=victim->coords+DoRotation(victim->skeleton.joints[victim->skeleton.jointlabels[abdomen]].position,0,victim->rotation,0)*victim->scale+victim->velocity*findDistance(&victim->coords,&coords)/50-(coords+DoRotation(skeleton.joints[skeleton.jointlabels[righthand]].position,0,rotation,0)*scale); + aim=victim->coords+DoRotation(victim->skeleton.joints[victim->skeleton.jointlabels[abdomen]].position,0,victim->rotation,0)*victim->scale+victim->velocity*findDistance(&victim->coords,&coords)/50-(coords+DoRotation(skeleton.joints[skeleton.jointlabels[righthand]].position,0,rotation,0)*scale); Normalise(&aim); /*if(victim->targetanimation==jumpupanim||victim->targetanimation==jumpdownanim){ aim=DoRotation(aim,(float)abs(Random()%15)-7,(float)abs(Random()%15)-7,0); @@ -3264,7 +3264,7 @@ void Person::DoAnimations(){ weaponids[0]=weaponids[num_weapons]; } weaponactive=-1; - } + } } if(targetanimation==knifeslashstartanim&&animation[targetanimation].label[currentframe]==5){ @@ -3289,10 +3289,10 @@ void Person::DoAnimations(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( knifeslicesound, samp[knifeslicesound], NULL, TRUE); + PlaySoundEx( knifeslicesound, samp[knifeslicesound], NULL, true); FSOUND_3D_SetAttributes(channels[knifeslicesound], gLoc, vel); FSOUND_SetVolume(channels[knifeslicesound], 512); - FSOUND_SetPaused(channels[knifeslicesound], FALSE); + FSOUND_SetPaused(channels[knifeslicesound], false); } //victim->skeleton.joints[victim->skeleton.jointlabels[abdomen]].velocity+=relative*damagemult*200; if(animation[victim->targetanimation].attack&&(victim->aitype!=playercontrolled||victim->targetanimation==knifeslashstartanim)&&(victim->creature==rabbittype||victim->deathbleeding<=0)){ @@ -3310,14 +3310,14 @@ void Person::DoAnimations(){ if(tutoriallevel!=1)if(bloodtoggle&&!weapons.bloody[weaponids[weaponactive]])weapons.bloody[weaponids[weaponactive]]=1; if(tutoriallevel!=1)weapons.blooddrip[weaponids[weaponactive]]+=3; - XYZ footvel,footpoint; + XYZ footvel,footpoint; footvel=0; if(skeleton.free){ footpoint=(victim->skeleton.joints[victim->skeleton.jointlabels[abdomen]].position+victim->skeleton.joints[victim->skeleton.jointlabels[neck]].position)/2*victim->scale+victim->coords; } if(!skeleton.free){ footpoint=DoRotation((victim->skeleton.joints[victim->skeleton.jointlabels[abdomen]].position+victim->skeleton.joints[victim->skeleton.jointlabels[neck]].position)/2,0,victim->rotation,0)*victim->scale+victim->coords; - } + } if(tutoriallevel!=1){ if(bloodtoggle)sprites.MakeSprite(cloudimpactsprite, footpoint,footvel, 1,0,0, .6, .3); footvel=DoRotation(facing,0,90,0)*.8; @@ -3341,7 +3341,7 @@ void Person::DoAnimations(){ bonustime=0; bonusvalue=40; } - escapednum=0; + escapednum=0; if(tutoriallevel!=1){ if(normaldotproduct(victim->facing,victim->coords-coords)<0)victim->DoBloodBig(2/victim->armorhigh,190); else victim->DoBloodBig(2/victim->armorhigh,185); @@ -3354,10 +3354,10 @@ void Person::DoAnimations(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( swordslicesound, samp[swordslicesound], NULL, TRUE); + PlaySoundEx( swordslicesound, samp[swordslicesound], NULL, true); FSOUND_3D_SetAttributes(channels[swordslicesound], gLoc, vel); FSOUND_SetVolume(channels[swordslicesound], 512); - FSOUND_SetPaused(channels[swordslicesound], FALSE); + FSOUND_SetPaused(channels[swordslicesound], false); } //victim->skeleton.joints[victim->skeleton.jointlabels[abdomen]].velocity+=relative*damagemult*200; //if(animation[victim->targetanimation].attack){ @@ -3381,14 +3381,14 @@ void Person::DoAnimations(){ //victim->bloodloss+=100*(6.5-findDistancefast(&coords,&victim->coords)); victim->DoDamage(damagemult*0); - XYZ footvel,footpoint; + XYZ footvel,footpoint; footvel=0; if(skeleton.free){ footpoint=(victim->skeleton.joints[victim->skeleton.jointlabels[abdomen]].position+victim->skeleton.joints[victim->skeleton.jointlabels[neck]].position)/2*victim->scale+victim->coords; } if(!skeleton.free){ footpoint=DoRotation((victim->skeleton.joints[victim->skeleton.jointlabels[abdomen]].position+victim->skeleton.joints[victim->skeleton.jointlabels[neck]].position)/2,0,victim->rotation,0)*victim->scale+victim->coords; - } + } if(bloodtoggle)sprites.MakeSprite(cloudimpactsprite, footpoint,footvel, 1,0,0, .9, .3); footvel=DoRotation(facing,0,90,0)*.8; footvel.y-=.3; @@ -3414,16 +3414,16 @@ void Person::DoAnimations(){ if(weapons.type[victim->weaponids[0]]==staff)weapons.damage[victim->weaponids[0]]+=.2+float(abs(Random()%100)-50)/250; if(weapons.type[weaponids[0]]==staff)weapons.damage[weaponids[0]]+=.2+float(abs(Random()%100)-50)/250; - PlaySoundEx( swordstaffsound, samp[swordstaffsound], NULL, TRUE); + PlaySoundEx( swordstaffsound, samp[swordstaffsound], NULL, true); FSOUND_3D_SetAttributes(channels[swordstaffsound], gLoc, vel); FSOUND_SetVolume(channels[swordstaffsound], 512); - FSOUND_SetPaused(channels[swordstaffsound], FALSE); + FSOUND_SetPaused(channels[swordstaffsound], false); } else{ - PlaySoundEx( metalhitsound, samp[metalhitsound], NULL, TRUE); + PlaySoundEx( metalhitsound, samp[metalhitsound], NULL, true); FSOUND_3D_SetAttributes(channels[metalhitsound], gLoc, vel); FSOUND_SetVolume(channels[metalhitsound], 512); - FSOUND_SetPaused(channels[metalhitsound], FALSE); + FSOUND_SetPaused(channels[metalhitsound], false); } } @@ -3455,10 +3455,10 @@ void Person::DoAnimations(){ player[i].wentforweapon=0; } - /*PlaySoundEx( metalhitsound, samp[metalhitsound], NULL, TRUE); + /*PlaySoundEx( metalhitsound, samp[metalhitsound], NULL, true); FSOUND_3D_SetAttributes(channels[metalhitsound], gLoc, vel); FSOUND_SetVolume(channels[metalhitsound], 512); - FSOUND_SetPaused(channels[metalhitsound], FALSE);*/ + FSOUND_SetPaused(channels[metalhitsound], false);*/ } } @@ -3481,10 +3481,10 @@ void Person::DoAnimations(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( staffheadsound, samp[staffheadsound], NULL, TRUE); + PlaySoundEx( staffheadsound, samp[staffheadsound], NULL, true); FSOUND_3D_SetAttributes(channels[staffheadsound], gLoc, vel); FSOUND_SetVolume(channels[staffheadsound], 256); - FSOUND_SetPaused(channels[staffheadsound], FALSE); + FSOUND_SetPaused(channels[staffheadsound], false); } victim->RagDoll(0); XYZ relative; @@ -3530,10 +3530,10 @@ void Person::DoAnimations(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( staffheadsound, samp[staffheadsound], NULL, TRUE); + PlaySoundEx( staffheadsound, samp[staffheadsound], NULL, true); FSOUND_3D_SetAttributes(channels[staffheadsound], gLoc, vel); FSOUND_SetVolume(channels[staffheadsound], 256); - FSOUND_SetPaused(channels[staffheadsound], FALSE); + FSOUND_SetPaused(channels[staffheadsound], false); } victim->RagDoll(0); XYZ relative; @@ -3576,10 +3576,10 @@ void Person::DoAnimations(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( staffbodysound, samp[staffbodysound], NULL, TRUE); + PlaySoundEx( staffbodysound, samp[staffbodysound], NULL, true); FSOUND_3D_SetAttributes(channels[staffbodysound], gLoc, vel); FSOUND_SetVolume(channels[staffbodysound], 256); - FSOUND_SetPaused(channels[staffbodysound], FALSE); + FSOUND_SetPaused(channels[staffbodysound], false); } victim->skeleton.longdead=0; victim->skeleton.free=1; @@ -3587,7 +3587,7 @@ void Person::DoAnimations(){ for(i=0;iskeleton.num_joints;i++){ victim->skeleton.joints[i].velchange=0; - victim->skeleton.joints[i].locked=0; + victim->skeleton.joints[i].locked=0; //victim->skeleton.joints[i].velocity=0; } @@ -3660,19 +3660,19 @@ void Person::DoAnimations(){ } victim->skeleton.joints[victim->skeleton.jointlabels[head]].velocity+=relative*damagemult*200; if(tutoriallevel!=1){ - PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, TRUE); + PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, true); FSOUND_3D_SetAttributes(channels[heavyimpactsound], gLoc, vel); FSOUND_SetVolume(channels[heavyimpactsound], 128); - FSOUND_SetPaused(channels[heavyimpactsound], FALSE); + FSOUND_SetPaused(channels[heavyimpactsound], false); } victim->Puff(head); victim->DoDamage(damagemult*100/victim->protectionhead); if(victim->howactive==typesleeping)victim->DoDamage(damagemult*150/victim->protectionhead); if(creature==wolftype){ - PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, TRUE); + PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, true); FSOUND_3D_SetAttributes(channels[clawslicesound], gLoc, vel); FSOUND_SetVolume(channels[clawslicesound], 128); - FSOUND_SetPaused(channels[clawslicesound], FALSE); + FSOUND_SetPaused(channels[clawslicesound], false); victim->spurt=1; victim->DoBloodBig(2/victim->armorhead,175); } @@ -3688,18 +3688,18 @@ void Person::DoAnimations(){ victim->targetrotation=targetrotation+180; victim->target=0; if(tutoriallevel!=1){ - PlaySoundEx( landsound2, samp[landsound2], NULL, TRUE); + PlaySoundEx( landsound2, samp[landsound2], NULL, true); FSOUND_3D_SetAttributes(channels[landsound2], gLoc, vel); FSOUND_SetVolume(channels[landsound2], 128); - FSOUND_SetPaused(channels[landsound2], FALSE); + FSOUND_SetPaused(channels[landsound2], false); } victim->Puff(abdomen); victim->DoDamage(damagemult*30/victim->protectionhigh); if(creature==wolftype){ - PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, TRUE); + PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, true); FSOUND_3D_SetAttributes(channels[clawslicesound], gLoc, vel); FSOUND_SetVolume(channels[clawslicesound], 128); - FSOUND_SetPaused(channels[clawslicesound], FALSE); + FSOUND_SetPaused(channels[clawslicesound], false); victim->spurt=1; victim->DoBloodBig(2/victim->armorhigh,170); } @@ -3721,10 +3721,10 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; if(tutoriallevel!=1){ - PlaySoundEx( landsound2, samp[landsound2], NULL, TRUE); + PlaySoundEx( landsound2, samp[landsound2], NULL, true); FSOUND_3D_SetAttributes(channels[landsound2], gLoc, vel); FSOUND_SetVolume(channels[landsound2], 128); - FSOUND_SetPaused(channels[landsound2], FALSE); + FSOUND_SetPaused(channels[landsound2], false); } XYZ relative; relative=victim->coords-coords; @@ -3763,10 +3763,10 @@ void Person::DoAnimations(){ victim->targetrotation=targetrotation+180; victim->target=0; if(tutoriallevel!=1){ - PlaySoundEx( landsound2, samp[landsound2], NULL, TRUE); + PlaySoundEx( landsound2, samp[landsound2], NULL, true); FSOUND_3D_SetAttributes(channels[landsound2], gLoc, vel); FSOUND_SetVolume(channels[landsound2], 128); - FSOUND_SetPaused(channels[landsound2], FALSE); + FSOUND_SetPaused(channels[landsound2], false); } victim->Puff(abdomen); victim->DoDamage(damagemult*30/victim->protectionlow); @@ -3778,7 +3778,7 @@ void Person::DoAnimations(){ } } - } + } if(animation[targetanimation].attack==reversal&&(!victim->feint||(victim->lastattack==victim->lastattack2&&victim->lastattack2==victim->lastattack3&&Random()%2)||targetanimation==knifefollowanim)){ if(targetanimation==spinkickreversalanim&&animation[targetanimation].label[currentframe]==7){ escapednum=0; @@ -3796,16 +3796,16 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; if(tutoriallevel!=1){ - PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, TRUE); + PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, true); FSOUND_3D_SetAttributes(channels[heavyimpactsound], gLoc, vel); FSOUND_SetVolume(channels[heavyimpactsound], 128); - FSOUND_SetPaused(channels[heavyimpactsound], FALSE); + FSOUND_SetPaused(channels[heavyimpactsound], false); } if(creature==wolftype){ - PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, TRUE); + PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, true); FSOUND_3D_SetAttributes(channels[clawslicesound], gLoc, vel); FSOUND_SetVolume(channels[clawslicesound], 128); - FSOUND_SetPaused(channels[clawslicesound], FALSE); + FSOUND_SetPaused(channels[clawslicesound], false); victim->spurt=1; victim->DoBloodBig(2/victim->armorhigh,170); } @@ -3865,10 +3865,10 @@ void Person::DoAnimations(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( whooshhitsound, samp[whooshhitsound], NULL, TRUE); + PlaySoundEx( whooshhitsound, samp[whooshhitsound], NULL, true); FSOUND_3D_SetAttributes(channels[whooshhitsound], gLoc, vel); FSOUND_SetVolume(channels[whooshhitsound], 128); - FSOUND_SetPaused(channels[whooshhitsound], FALSE); + FSOUND_SetPaused(channels[whooshhitsound], false); victim->RagDoll(0); XYZ relative; relative=victim->coords-oldcoords; @@ -3907,10 +3907,10 @@ void Person::DoAnimations(){ } if(tutoriallevel!=1){ - PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, TRUE); + PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, true); FSOUND_3D_SetAttributes(channels[heavyimpactsound], gLoc, vel); FSOUND_SetVolume(channels[heavyimpactsound], 128); - FSOUND_SetPaused(channels[heavyimpactsound], FALSE); + FSOUND_SetPaused(channels[heavyimpactsound], false); } victim->RagDoll(0); if(id==0){ @@ -3978,18 +3978,18 @@ void Person::DoAnimations(){ vel[2]=velocity.z; if(weaponactive!=-1){ victim->DoBloodBig(2/victim->armorhigh,225); - PlaySoundEx( knifeslicesound, samp[knifeslicesound], NULL, TRUE); + PlaySoundEx( knifeslicesound, samp[knifeslicesound], NULL, true); FSOUND_3D_SetAttributes(channels[knifeslicesound], gLoc, vel); FSOUND_SetVolume(channels[knifeslicesound], 512); - FSOUND_SetPaused(channels[knifeslicesound], FALSE); + FSOUND_SetPaused(channels[knifeslicesound], false); if(bloodtoggle&&!weapons.bloody[weaponids[weaponactive]])weapons.bloody[weaponids[weaponactive]]=1; weapons.blooddrip[weaponids[weaponactive]]+=3; } if(weaponactive==-1&&creature==wolftype){ - PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, TRUE); + PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, true); FSOUND_3D_SetAttributes(channels[clawslicesound], gLoc, vel); FSOUND_SetVolume(channels[clawslicesound], 128); - FSOUND_SetPaused(channels[clawslicesound], FALSE); + FSOUND_SetPaused(channels[clawslicesound], false); victim->spurt=1; victim->DoBloodBig(2/victim->armorhigh,175); } @@ -4036,10 +4036,10 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; victim->DoBloodBig(2,225); - PlaySoundEx( knifeslicesound, samp[knifeslicesound], NULL, TRUE); + PlaySoundEx( knifeslicesound, samp[knifeslicesound], NULL, true); FSOUND_3D_SetAttributes(channels[knifeslicesound], gLoc, vel); FSOUND_SetVolume(channels[knifeslicesound], 512); - FSOUND_SetPaused(channels[knifeslicesound], FALSE); + FSOUND_SetPaused(channels[knifeslicesound], false); if(bloodtoggle&&!weapons.bloody[weaponids[weaponactive]])weapons.bloody[weaponids[weaponactive]]=1; weapons.blooddrip[weaponids[weaponactive]]+=3; }*/ @@ -4061,10 +4061,10 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; if(tutoriallevel!=1){ - PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, TRUE); + PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, true); FSOUND_3D_SetAttributes(channels[heavyimpactsound], gLoc, vel); FSOUND_SetVolume(channels[heavyimpactsound], 128); - FSOUND_SetPaused(channels[heavyimpactsound], FALSE); + FSOUND_SetPaused(channels[heavyimpactsound], false); } victim->RagDoll(0); XYZ relative; @@ -4117,19 +4117,19 @@ void Person::DoAnimations(){ vel[2]=velocity.z; if(weaponactive!=-1){ victim->DoBloodBig(200,225); - PlaySoundEx( knifeslicesound, samp[knifeslicesound], NULL, TRUE); + PlaySoundEx( knifeslicesound, samp[knifeslicesound], NULL, true); FSOUND_3D_SetAttributes(channels[knifeslicesound], gLoc, vel); FSOUND_SetVolume(channels[knifeslicesound], 512); - FSOUND_SetPaused(channels[knifeslicesound], FALSE); + FSOUND_SetPaused(channels[knifeslicesound], false); if(bloodtoggle)weapons.bloody[weaponids[weaponactive]]=2; weapons.blooddrip[weaponids[weaponactive]]+=5; } if(creature==wolftype&&weaponactive==-1){ - PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, TRUE); + PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, true); FSOUND_3D_SetAttributes(channels[clawslicesound], gLoc, vel); FSOUND_SetVolume(channels[clawslicesound], 128); - FSOUND_SetPaused(channels[clawslicesound], FALSE); + FSOUND_SetPaused(channels[clawslicesound], false); victim->spurt=1; victim->DoBloodBig(2,175); } @@ -4154,7 +4154,7 @@ void Person::DoAnimations(){ bloodvel=DoRotation(bloodvel,((float)(Random()%100))/4,rotation+((float)(Random()%100))/4,0)*scale; sprites.MakeSprite(bloodsprite, DoRotation(skeleton.joints[skeleton.jointlabels[neck]].position,0,rotation,0)*scale+coords,bloodvel, 1,1,1, .05, 1); */ - XYZ footvel,footpoint; + XYZ footvel,footpoint; footvel=0; footpoint=weapons.tippoint[weaponids[0]]; if(bloodtoggle)sprites.MakeSprite(cloudimpactsprite, footpoint,footvel, 1,0,0, .9, .3); @@ -4178,7 +4178,7 @@ void Person::DoAnimations(){ bonustime=0; bonusvalue=40; } - XYZ footvel,footpoint; + XYZ footvel,footpoint; footvel=0; footpoint=weapons.tippoint[weaponids[0]]; if(bloodtoggle)sprites.MakeSprite(cloudimpactsprite, footpoint,footvel, 1,0,0, .9, .3); @@ -4199,10 +4199,10 @@ void Person::DoAnimations(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( fleshstabsound, samp[fleshstabsound], NULL, TRUE); + PlaySoundEx( fleshstabsound, samp[fleshstabsound], NULL, true); FSOUND_3D_SetAttributes(channels[fleshstabsound], gLoc, vel); FSOUND_SetVolume(channels[fleshstabsound], 512); - FSOUND_SetPaused(channels[fleshstabsound], FALSE); + FSOUND_SetPaused(channels[fleshstabsound], false); if(bloodtoggle)weapons.bloody[weaponids[weaponactive]]=2; weapons.blooddrip[weaponids[weaponactive]]+=5; } @@ -4229,14 +4229,14 @@ void Person::DoAnimations(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( fleshstabremovesound, samp[fleshstabremovesound], NULL, TRUE); + PlaySoundEx( fleshstabremovesound, samp[fleshstabremovesound], NULL, true); FSOUND_3D_SetAttributes(channels[fleshstabremovesound], gLoc, vel); FSOUND_SetVolume(channels[fleshstabremovesound], 512); - FSOUND_SetPaused(channels[fleshstabremovesound], FALSE); + FSOUND_SetPaused(channels[fleshstabremovesound], false); if(bloodtoggle)weapons.bloody[weaponids[weaponactive]]=2; weapons.blooddrip[weaponids[weaponactive]]+=5; - XYZ footvel,footpoint; + XYZ footvel,footpoint; footvel=0; footpoint=weapons.tippoint[weaponids[0]]; if(bloodtoggle)sprites.MakeSprite(cloudimpactsprite, footpoint,footvel, 1,0,0, .9, .3); @@ -4258,7 +4258,7 @@ void Person::DoAnimations(){ escapednum=0; - XYZ footvel,footpoint; + XYZ footvel,footpoint; footvel=0; footpoint=(weapons.tippoint[weaponids[0]]+weapons.position[weaponids[0]])/2; if(bloodtoggle)sprites.MakeSprite(cloudimpactsprite, footpoint,footvel, 1,0,0, .9, .3); @@ -4279,10 +4279,10 @@ void Person::DoAnimations(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( fleshstabsound, samp[fleshstabsound], NULL, TRUE); + PlaySoundEx( fleshstabsound, samp[fleshstabsound], NULL, true); FSOUND_3D_SetAttributes(channels[fleshstabsound], gLoc, vel); FSOUND_SetVolume(channels[fleshstabsound], 512); - FSOUND_SetPaused(channels[fleshstabsound], FALSE); + FSOUND_SetPaused(channels[fleshstabsound], false); if(bloodtoggle)weapons.bloody[weaponids[weaponactive]]=2; weapons.blooddrip[weaponids[weaponactive]]+=5; } @@ -4303,14 +4303,14 @@ void Person::DoAnimations(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( fleshstabremovesound, samp[fleshstabremovesound], NULL, TRUE); + PlaySoundEx( fleshstabremovesound, samp[fleshstabremovesound], NULL, true); FSOUND_3D_SetAttributes(channels[fleshstabremovesound], gLoc, vel); FSOUND_SetVolume(channels[fleshstabremovesound], 512); - FSOUND_SetPaused(channels[fleshstabremovesound], FALSE); + FSOUND_SetPaused(channels[fleshstabremovesound], false); if(bloodtoggle)weapons.bloody[weaponids[weaponactive]]=2; weapons.blooddrip[weaponids[weaponactive]]+=5; - XYZ footvel,footpoint; + XYZ footvel,footpoint; footvel=0; footpoint=weapons.tippoint[weaponids[0]]; if(bloodtoggle)sprites.MakeSprite(cloudimpactsprite, footpoint,footvel, 1,0,0, .9, .3); @@ -4339,10 +4339,10 @@ void Person::DoAnimations(){ vel[2]=velocity.z; if(weaponactive==-1){ if(tutoriallevel!=1){ - PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, TRUE); + PlaySoundEx( heavyimpactsound, samp[heavyimpactsound], NULL, true); FSOUND_3D_SetAttributes(channels[heavyimpactsound], gLoc, vel); FSOUND_SetVolume(channels[heavyimpactsound], 128); - FSOUND_SetPaused(channels[heavyimpactsound], FALSE); + FSOUND_SetPaused(channels[heavyimpactsound], false); } } bool doslice; @@ -4352,18 +4352,18 @@ void Person::DoAnimations(){ if(doslice){ if(weaponactive!=-1){ victim->DoBloodBig(2/victim->armorhead,225); - PlaySoundEx( knifeslicesound, samp[knifeslicesound], NULL, TRUE); + PlaySoundEx( knifeslicesound, samp[knifeslicesound], NULL, true); FSOUND_3D_SetAttributes(channels[knifeslicesound], gLoc, vel); FSOUND_SetVolume(channels[knifeslicesound], 512); - FSOUND_SetPaused(channels[knifeslicesound], FALSE); + FSOUND_SetPaused(channels[knifeslicesound], false); if(bloodtoggle&&!weapons.bloody[weaponids[weaponactive]])weapons.bloody[weaponids[weaponactive]]=1; weapons.blooddrip[weaponids[weaponactive]]+=3; } - if(weaponactive==-1&&creature==wolftype){ - PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, TRUE); + if(weaponactive==-1&&creature==wolftype){ + PlaySoundEx( clawslicesound, samp[clawslicesound], NULL, true); FSOUND_3D_SetAttributes(channels[clawslicesound], gLoc, vel); FSOUND_SetVolume(channels[clawslicesound], 128); - FSOUND_SetPaused(channels[clawslicesound], FALSE); + FSOUND_SetPaused(channels[clawslicesound], false); victim->spurt=1; victim->DoBloodBig(2/victim->armorhead,175); } @@ -4442,10 +4442,10 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( movewhooshsound, samp[movewhooshsound], NULL, TRUE); + PlaySoundEx( movewhooshsound, samp[movewhooshsound], NULL, true); FSOUND_3D_SetAttributes(channels[movewhooshsound], gLoc, vel); FSOUND_SetVolume(channels[movewhooshsound], 128); - FSOUND_SetPaused(channels[movewhooshsound], FALSE); + FSOUND_SetPaused(channels[movewhooshsound], false); } if(currentanimation==staggerbackhighanim){ targetanimation=getIdle(); @@ -4494,10 +4494,10 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( knifesheathesound, samp[knifesheathesound], NULL, TRUE); + PlaySoundEx( knifesheathesound, samp[knifesheathesound], NULL, true); FSOUND_3D_SetAttributes(channels[knifesheathesound], gLoc, vel); FSOUND_SetVolume(channels[knifesheathesound], 128); - FSOUND_SetPaused(channels[knifesheathesound], FALSE); + FSOUND_SetPaused(channels[knifesheathesound], false); } if(weaponactive!=-1){ float gLoc[3]; @@ -4509,10 +4509,10 @@ void Person::DoAnimations(){ vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( knifedrawsound, samp[knifedrawsound], NULL, TRUE); + PlaySoundEx( knifedrawsound, samp[knifedrawsound], NULL, true); FSOUND_3D_SetAttributes(channels[knifedrawsound], gLoc, vel); FSOUND_SetVolume(channels[knifedrawsound], 128); - FSOUND_SetPaused(channels[knifedrawsound], FALSE); + FSOUND_SetPaused(channels[knifedrawsound], false); } } if(currentanimation==rollanim){ @@ -4587,7 +4587,7 @@ void Person::DoAnimations(){ targetframe=3; velocity=facing*-8; velocity.y=4; - if(id==0)FSOUND_SetPaused(channels[whooshsound], FALSE); + if(id==0)FSOUND_SetPaused(channels[whooshsound], false); } if(targetanimation==walljumprightanim){ targetanimation=rightflipanim; @@ -4605,7 +4605,7 @@ void Person::DoAnimations(){ velocity=facing*8; velocity.y=4; } - if(id==0)FSOUND_SetPaused(channels[whooshsound], FALSE); + if(id==0)FSOUND_SetPaused(channels[whooshsound], false); } if(targetanimation==walljumpleftanim){ if(attackkeydown){ @@ -4645,7 +4645,7 @@ void Person::DoAnimations(){ velocity=DoRotation(facing,0,-30,0)*-8; velocity.y=4; } - if(id==0)FSOUND_SetPaused(channels[whooshsound], FALSE); + if(id==0)FSOUND_SetPaused(channels[whooshsound], false); } if(targetanimation==sneakattackanim){ float ycoords=oldcoords.y; @@ -4740,10 +4740,10 @@ void Person::DoAnimations(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( landsound, samp[landsound], NULL, TRUE); + PlaySoundEx( landsound, samp[landsound], NULL, true); FSOUND_3D_SetAttributes(channels[landsound], gLoc, vel); FSOUND_SetVolume(channels[landsound], 128); - FSOUND_SetPaused(channels[landsound], FALSE); + FSOUND_SetPaused(channels[landsound], false); if(currentanimation==upunchreversedanim||currentanimation==swordslashreversedanim){ targetanimation=rollanim; @@ -4809,7 +4809,7 @@ void Person::DoAnimations(){ escapednum++; targetanimation=rollanim; coords+=facing; - if(id==0)FSOUND_SetPaused(channels[whooshsound], TRUE); + if(id==0)FSOUND_SetPaused(channels[whooshsound], true); } lastfeint=0; } @@ -4832,7 +4832,7 @@ void Person::DoAnimations(){ escapednum++; targetanimation=rollanim; coords+=facing*2; - if(id==0)FSOUND_SetPaused(channels[whooshsound], TRUE); + if(id==0)FSOUND_SetPaused(channels[whooshsound], true); } lastfeint=0; } @@ -4864,7 +4864,7 @@ void Person::DoAnimations(){ targetanimation=jumpdownanim; } } - if(!skeleton.free){ + if(!skeleton.free){ oldtarget=target; if(!transspeed&&animation[targetanimation].attack!=2&&animation[targetanimation].attack!=3){ if(!isRun()||!wasRun()){ @@ -4904,7 +4904,7 @@ void Person::DoAnimations(){ if(currentanimation!=oldcurrentanimation||targetanimation!=oldtargetanimation||((currentframe!=oldcurrentframe||targetframe!=oldtargetframe)&&!calcrot)){ //Old rotates for(i=0;i0){ @@ -5155,7 +5155,7 @@ void Person::DoStuff(){ if(!skeleton.free)bloodvel+=DoRotation(velocity,((float)(Random()%100))/4,((float)(Random()%100))/4,0)*scale; if(skeleton.free)sprites.MakeSprite(bloodsprite, skeleton.joints[skeleton.jointlabels[abdomen]].position*scale+coords,bloodvel, 1,1,1, .05, 1); if(!skeleton.free)sprites.MakeSprite(bloodsprite, DoRotation((skeleton.joints[skeleton.jointlabels[abdomen]].position+skeleton.joints[skeleton.jointlabels[abdomen]].position)/2,0,rotation,0)*scale+coords,bloodvel, 1,1,1, .05, 1); - } + } } /*if(id==0){ bloodloss+=deathbleeding*40; @@ -5164,7 +5164,7 @@ void Person::DoStuff(){ bloodloss+=deathbleeding*multiplier*80; deathbleeding-=multiplier*1.6; //if(id==0)deathbleeding-=multiplier*.2; - if(deathbleeding<0)deathbleeding=0; + if(deathbleeding<0)deathbleeding=0; if(bloodloss>damagetolerance&&animation[targetanimation].attack==neutral){ if(weaponactive!=-1){ weapons.owner[weaponids[0]]=-1; @@ -5198,7 +5198,7 @@ void Person::DoStuff(){ if(!dead&&creature==wolftype){ bonus=Wolfbonus; bonustime=0; - bonusvalue=300; + bonusvalue=300; } dead=2; if(targetanimation==knifefollowedanim&&!skeleton.free){ @@ -5380,7 +5380,7 @@ void Person::DoStuff(){ if(!skeleton.free)footpoint=DoRotation((skeleton.joints[skeleton.jointlabels[head]].position+skeleton.joints[skeleton.jointlabels[neck]].position)/2,0,rotation,0)*scale+coords; if(skeleton.free)footpoint=((skeleton.joints[skeleton.jointlabels[head]].position+skeleton.joints[skeleton.jointlabels[neck]].position)/2)*scale+coords; if(targetanimation==sleepanim)footvel=DoRotation(footvel,0,90,0); - sprites.MakeSprite(breathsprite, footpoint+footvel*.2,footvel*.4, 1,1,1, .4, .3); + sprites.MakeSprite(breathsprite, footpoint+footvel*.2,footvel*.4, 1,1,1, .4, .3); } } @@ -5468,7 +5468,7 @@ void Person::DoStuff(){ } } } - if(creature==wolftype){ + if(creature==wolftype){ twitchdelay2-=multiplier*1.5; if(tailmorphend!=0) if((isRun()||targetanimation==jumpupanim||targetanimation==jumpdownanim||targetanimation==backflipanim)&&!skeleton.free){ @@ -5579,7 +5579,7 @@ void Person::DoStuff(){ if(creature==wolftype){ bonus=Wolfbonus; bonustime=0; - bonusvalue=300; + bonusvalue=300; } RagDoll(0); @@ -5617,7 +5617,7 @@ void Person::DoStuff(){ /* if(bloodlossdamagetolerance&&dead!=2){ @@ -5675,7 +5675,7 @@ void Person::DoStuff(){ if(!dead&&creature==wolftype){ bonus=Wolfbonus; bonustime=0; - bonusvalue=300; + bonusvalue=300; } if(id!=0&&unconscioustime<.1&&(bonus!=spinecrusher||bonustime>1)&&(bonus!=FinishedBonus||bonustime>1)&&bloodloss2000){ if(skeleton.longdead>6000){ - if(id==0)FSOUND_SetPaused(channels[whooshsound], TRUE); + if(id==0)FSOUND_SetPaused(channels[whooshsound], true); skeleton.free=3; DrawSkeleton(); skeleton.free=2; @@ -5832,7 +5832,7 @@ void Person::DoStuff(){ if(objects.type[i]!=treeleavestype&&objects.type[i]!=bushtype&&objects.type[i]!=firetype){ colviewer=startpoint; coltarget=endpoint; - if(objects.model[i].LineCheck(&colviewer,&coltarget,&colpoint,&objects.position[i],&objects.rotation[i])!=-1)canrecover=0; + if(objects.model[i].LineCheck(&colviewer,&coltarget,&colpoint,&objects.position[i],&objects.rotation[i])!=-1)canrecover=0; } } if(canrecover){ @@ -5889,7 +5889,7 @@ void Person::DoStuff(){ if(findLength(&average)<10&&!dead&&skeleton.free){ skeleton.longdead+=(2000-findLength(&average))*multiplier+multiplier; if(skeleton.longdead>(damage+500)*1.5){ - if(id==0)FSOUND_SetPaused(channels[whooshsound], TRUE); + if(id==0)FSOUND_SetPaused(channels[whooshsound], true); skeleton.free=0; velocity=0; XYZ middle; @@ -6016,10 +6016,10 @@ void Person::DoStuff(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( movewhooshsound, samp[movewhooshsound], NULL, TRUE); + PlaySoundEx( movewhooshsound, samp[movewhooshsound], NULL, true); FSOUND_3D_SetAttributes(channels[movewhooshsound], gLoc, vel); FSOUND_SetVolume(channels[movewhooshsound], 128); - FSOUND_SetPaused(channels[movewhooshsound], FALSE); + FSOUND_SetPaused(channels[movewhooshsound], false); currentanimation=targetanimation; currentframe=targetframe-1; @@ -6056,10 +6056,10 @@ void Person::DoStuff(){ vel[0]=0; vel[1]=0; vel[2]=0; - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); + FSOUND_SetPaused(channels[firestartsound], false); } objects.onfire[i]=1; } @@ -6081,10 +6081,10 @@ void Person::DoStuff(){ vel[0]=0; vel[1]=0; vel[2]=0; - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); + FSOUND_SetPaused(channels[firestartsound], false); } objects.onfire[i]=1; } @@ -6106,10 +6106,10 @@ void Person::DoStuff(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( bushrustle, samp[bushrustle], NULL, TRUE); + PlaySoundEx( bushrustle, samp[bushrustle], NULL, true); FSOUND_3D_SetAttributes(channels[bushrustle], gLoc, vel); FSOUND_SetVolume(channels[bushrustle], 40*findLength(&velocity)); - FSOUND_SetPaused(channels[bushrustle], FALSE); + FSOUND_SetPaused(channels[bushrustle], false); if(id==0){ envsound[numenvsounds]=coords; @@ -6152,7 +6152,7 @@ void Person::DoStuff(){ } } objects.rotx[i]+=velocity.x*multiplier*6; - objects.roty[i]+=velocity.z*multiplier*6; + objects.roty[i]+=velocity.z*multiplier*6; objects.messedwith[i]=.5; } XYZ tempcoord; @@ -6175,10 +6175,10 @@ void Person::DoStuff(){ vel[0]=0; vel[1]=0; vel[2]=0; - PlaySoundEx( firestartsound, samp[firestartsound], NULL, TRUE); + PlaySoundEx( firestartsound, samp[firestartsound], NULL, true); FSOUND_3D_SetAttributes(channels[firestartsound], gLoc, vel); FSOUND_SetVolume(channels[firestartsound], 256); - FSOUND_SetPaused(channels[firestartsound], FALSE); + FSOUND_SetPaused(channels[firestartsound], false); objects.onfire[i]=1; } }*/ @@ -6194,10 +6194,10 @@ void Person::DoStuff(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( bushrustle, samp[bushrustle], NULL, TRUE); + PlaySoundEx( bushrustle, samp[bushrustle], NULL, true); FSOUND_3D_SetAttributes(channels[bushrustle], gLoc, vel); FSOUND_SetVolume(channels[bushrustle], 40*findLength(&velocity)); - FSOUND_SetPaused(channels[bushrustle], FALSE); + FSOUND_SetPaused(channels[bushrustle], false); if(id==0){ envsound[numenvsounds]=coords; @@ -6242,11 +6242,11 @@ void Person::DoStuff(){ } } objects.messedwith[i]=.5; - } + } } } - if(!skeleton.free){ + if(!skeleton.free){ bool play; play=0; if((stunned>0||surprised>0)&&numplayers>2&&aitype!=passivetype)play=1; @@ -6279,12 +6279,12 @@ void Person::DoStuff(){ //if(animation[targetanimation].label[targetframe]==8)whichsound=landsound2; if(whichsound!=-1){ - PlaySoundEx( whichsound, samp[whichsound], NULL, TRUE); + PlaySoundEx( whichsound, samp[whichsound], NULL, true); FSOUND_3D_SetAttributes(channels[whichsound], gLoc, vel); FSOUND_SetVolume(channels[whichsound], 512); - FSOUND_SetPaused(channels[whichsound], FALSE); - } - } + FSOUND_SetPaused(channels[whichsound], false); + } + } if(targetanimation==staggerbackhighanim)staggerdelay=1; if(targetanimation==staggerbackhardanim)staggerdelay=1; @@ -6400,7 +6400,7 @@ void Person::DoStuff(){ } } /* - if(speechdelay>.25){ + if(speechdelay>.25){ if(headmorphend!=2)headmorphness=0; headmorphend=2; targetheadmorphness=1; @@ -6494,7 +6494,7 @@ void Person::DoStuff(){ //if(!creature==wolftype||targetanimation==rabbitkickanim) if(targetanimation==rabbittackleanim){ velocity+=facing*multiplier*speed*700*scale; - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); if(velspeed>speed*65*scale){ velocity/=velspeed; velspeed=speed*65*scale; @@ -6502,13 +6502,13 @@ void Person::DoStuff(){ } velocity.y+=gravity*multiplier*20; ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z)); - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); velocity=flatfacing*velspeed; } if(targetanimation!=rabbitrunninganim&&targetanimation!=wolfrunninganim){ if(isRun()||targetanimation==rabbitkickanim){ velocity+=facing*multiplier*speed*700*scale; - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); if(velspeed>speed*45*scale){ velocity/=velspeed; velspeed=speed*45*scale; @@ -6516,14 +6516,14 @@ void Person::DoStuff(){ } velocity.y+=gravity*multiplier*20; ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z)); - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); if(velspeedspeed*55*scale){ velocity/=velspeed; @@ -6540,14 +6540,14 @@ void Person::DoStuff(){ } velocity.y+=gravity*multiplier*20; ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z)); - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); velocity=flatfacing*velspeed; } /*if(creature==wolftype) if(isRun()){ velocity+=facing*multiplier*speed*700*scale; - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); if(velspeed>speed*55*scale){ velocity/=velspeed; velspeed=speed*55*scale; @@ -6555,13 +6555,13 @@ void Person::DoStuff(){ } velocity.y+=gravity*multiplier*20; ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z)); - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); velocity=flatfacing*velspeed; }*/ if(targetanimation==rollanim&&animation[targetanimation].label[targetframe]!=6){ velocity+=facing*multiplier*speed*700*scale; - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); if(velspeed>speed*45*scale){ velocity/=velspeed; velspeed=speed*45*scale; @@ -6569,14 +6569,14 @@ void Person::DoStuff(){ } velocity.y+=gravity*multiplier*20; ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z)); - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); velocity=flatfacing*velspeed; } /*if(currentanimation==rollanim&&(isCrouch()||isIdle())){ velocity+=facing*multiplier*speed*700*scale; - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); if(velspeed>speed*25*scale){ velocity/=velspeed; velspeed=speed*25*scale; @@ -6584,13 +6584,13 @@ void Person::DoStuff(){ } velocity.y+=gravity*multiplier*20; ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z)); - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); velocity=flatfacing*velspeed; }*/ if(targetanimation==sneakanim||targetanimation==walkanim){ velocity+=facing*multiplier*speed*700*scale; - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); if(velspeed>speed*12*scale){ velocity/=velspeed; velspeed=speed*12*scale; @@ -6598,13 +6598,13 @@ void Person::DoStuff(){ } velocity.y+=gravity*multiplier*20; ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z)); - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); velocity=flatfacing*velspeed; } if((targetanimation==fightidleanim||targetanimation==knifefightidleanim)&&(currentanimation==bounceidleanim||currentanimation==hurtidleanim)){ velocity+=facing*multiplier*speed*700*scale; - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); if(velspeed>speed*2*scale){ velocity/=velspeed; velspeed=speed*2*scale; @@ -6612,14 +6612,14 @@ void Person::DoStuff(){ } velocity.y+=gravity*multiplier*20; ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z)); - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); velocity=flatfacing*velspeed; } if((targetanimation==bounceidleanim||currentanimation==hurtidleanim)&&(currentanimation==fightidleanim||currentanimation==knifefightidleanim)){ velocity-=facing*multiplier*speed*700*scale; - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); if(velspeed>speed*2*scale){ velocity/=velspeed; velspeed=speed*2*scale; @@ -6627,13 +6627,13 @@ void Person::DoStuff(){ } velocity.y+=gravity*multiplier*20; ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z)); - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); velocity=flatfacing*velspeed*-1; } if(targetanimation==fightsidestep){ velocity+=DoRotation(facing*multiplier*speed*700*scale,0,-90,0); - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); if(velspeed>speed*12*scale){ velocity/=velspeed; velspeed=speed*12*scale; @@ -6641,7 +6641,7 @@ void Person::DoStuff(){ } velocity.y+=gravity*multiplier*20; ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z)); - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); velocity=DoRotation(flatfacing*velspeed,0,-90,0); } @@ -6657,7 +6657,7 @@ void Person::DoStuff(){ if(targetanimation==backhandspringanim){ //coords-=facing*multiplier*50*scale; velocity+=facing*multiplier*speed*700*scale*-1; - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); if(velspeed>speed*50*scale){ velocity/=velspeed; velspeed=speed*50*scale; @@ -6665,13 +6665,13 @@ void Person::DoStuff(){ } velocity.y+=gravity*multiplier*20; ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z)); - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); velocity=flatfacing*velspeed*-1; } if(targetanimation==dodgebackanim){ //coords-=facing*multiplier*50*scale; velocity+=facing*multiplier*speed*700*scale*-1; - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); if(velspeed>speed*60*scale){ velocity/=velspeed; velspeed=speed*60*scale; @@ -6679,12 +6679,12 @@ void Person::DoStuff(){ } velocity.y+=gravity*multiplier*20; ReflectVector(&velocity,&terrain.getNormal(coords.x,coords.z)); - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); velocity=flatfacing*velspeed*-1; } if(targetanimation==jumpupanim||targetanimation==jumpdownanim||isFlip()){ - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); } @@ -6699,11 +6699,11 @@ void Person::DoStuff(){ if(targetanimation==jumpupanim){jumppower=-4;targetanimation=getIdle();} target=0; - targetframe=0; + targetframe=0; onterrain=1; if(id==0){ - FSOUND_SetPaused(channels[whooshsound], TRUE); + FSOUND_SetPaused(channels[whooshsound], true); FSOUND_SetVolume(channels[whooshsound], 0); } @@ -6718,10 +6718,10 @@ void Person::DoStuff(){ vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( landsound, samp[landsound], NULL, TRUE); + PlaySoundEx( landsound, samp[landsound], NULL, true); FSOUND_3D_SetAttributes(channels[landsound], gLoc, vel); FSOUND_SetVolume(channels[landsound], 128); - FSOUND_SetPaused(channels[landsound], FALSE); + FSOUND_SetPaused(channels[landsound], false); if(id==0){ envsound[numenvsounds]=coords; @@ -6740,7 +6740,7 @@ void Person::DoStuff(){ if(isIdle()||targetanimation==drawrightanim||targetanimation==drawleftanim||targetanimation==crouchdrawrightanim||targetanimation==crouchstabanim||targetanimation==swordgroundstabanim||isStop()||targetanimation==removeknifeanim||targetanimation==crouchremoveknifeanim||isLanding()||isCrouch()||animation[targetanimation].attack||(targetanimation==rollanim&&animation[targetanimation].label[targetframe]==6)){ - velspeed=findLength(&velocity); + velspeed=findLength(&velocity); velocity.y=0; if(velspeedcoords; } } - skeleton.oldfree=skeleton.free; + skeleton.oldfree=skeleton.free; XYZ midterrain; midterrain=0; @@ -6834,7 +6834,7 @@ void Person::DoStuff(){ int Person::DrawSkeleton(){ int oldplayerdetail; - if((frustum.SphereInFrustum(coords.x,coords.y+scale*3,coords.z,scale*8)&&findDistancefast(&viewer,&coords)0){ for(k=0;klabel==righthand||skeleton.muscles[j].parent2->label==righthand)&&skeleton.muscles[j].numvertices>0){ @@ -7419,7 +7419,7 @@ int Person::DrawSkeleton(){ }*/ } } - if(weaponactive!=k&&weaponstuck!=k){ + if(weaponactive!=k&&weaponstuck!=k){ if(weapons.type[i]==knife)weaponpoint=skeleton.joints[skeleton.jointlabels[abdomen]].position+(skeleton.joints[skeleton.jointlabels[righthip]].position-skeleton.joints[skeleton.jointlabels[lefthip]].position)*.1+(skeleton.joints[skeleton.jointlabels[rightshoulder]].position-skeleton.joints[skeleton.jointlabels[leftshoulder]].position)*.35; if(weapons.type[i]==sword)weaponpoint=skeleton.joints[skeleton.jointlabels[abdomen]].position+(skeleton.joints[skeleton.jointlabels[lefthip]].position-skeleton.joints[skeleton.jointlabels[righthip]].position)*.09+(skeleton.joints[skeleton.jointlabels[leftshoulder]].position-skeleton.joints[skeleton.jointlabels[rightshoulder]].position)*.33; if(weapons.type[i]==staff)weaponpoint=skeleton.joints[skeleton.jointlabels[abdomen]].position+(skeleton.joints[skeleton.jointlabels[lefthip]].position-skeleton.joints[skeleton.jointlabels[righthip]].position)*.09+(skeleton.joints[skeleton.jointlabels[leftshoulder]].position-skeleton.joints[skeleton.jointlabels[rightshoulder]].position)*.33; @@ -7429,7 +7429,7 @@ int Person::DrawSkeleton(){ } } } - if(weaponstuck==k){ + if(weaponstuck==k){ if(weaponstuckwhere==0)weaponpoint=skeleton.joints[skeleton.jointlabels[abdomen]].position*.5+skeleton.joints[skeleton.jointlabels[neck]].position*.5-skeleton.forward*.8; else weaponpoint=skeleton.joints[skeleton.jointlabels[abdomen]].position*.5+skeleton.joints[skeleton.jointlabels[neck]].position*.5+skeleton.forward*.8; for(j=0;jtemppoint2.x)weapons.rotation1[i]=360-weapons.rotation1[i]; + if(temppoint1.x>temppoint2.x)weapons.rotation1[i]=360-weapons.rotation1[i]; } if((currentanimation==knifeslashreversalanim&&targetanimation==knifeslashreversalanim)||(currentanimation==knifeslashreversedanim&&targetanimation==knifeslashreversedanim)){ XYZ temppoint1,temppoint2,tempforward; @@ -7497,7 +7497,7 @@ int Person::DrawSkeleton(){ weapons.rotation3[i]=0; weapons.smallrotation[i]=90; weapons.smallrotation2[i]=0; - if(temppoint1.x>temppoint2.x)weapons.rotation1[i]=360-weapons.rotation1[i]; + if(temppoint1.x>temppoint2.x)weapons.rotation1[i]=360-weapons.rotation1[i]; } if(targetanimation==knifethrowanim){ weapons.smallrotation[i]=90; @@ -7540,7 +7540,7 @@ int Person::DrawSkeleton(){ weapons.rotation3[i]=0; weapons.smallrotation[i]=90; weapons.smallrotation2[i]=0; - if(temppoint1.x>temppoint2.x)weapons.rotation1[i]=360-weapons.rotation1[i]; + if(temppoint1.x>temppoint2.x)weapons.rotation1[i]=360-weapons.rotation1[i]; } } if(weapons.type[i]==staff){ @@ -7562,7 +7562,7 @@ int Person::DrawSkeleton(){ weapons.rotation3[i]=0; weapons.smallrotation[i]=90; weapons.smallrotation2[i]=0; - if(temppoint1.x>temppoint2.x)weapons.rotation1[i]=360-weapons.rotation1[i]; + if(temppoint1.x>temppoint2.x)weapons.rotation1[i]=360-weapons.rotation1[i]; } } } @@ -7649,11 +7649,11 @@ int Person::SphereCheck(XYZ *p1,float radius, XYZ *p, XYZ *move, float *rotate, if(targetanimation==jumpupanim){jumppower=-4;targetanimation=getIdle();} target=0; - targetframe=0; + targetframe=0; onterrain=1; if(id==0){ - FSOUND_SetPaused(channels[whooshsound], TRUE); + FSOUND_SetPaused(channels[whooshsound], true); FSOUND_SetVolume(channels[whooshsound], 0); } @@ -7668,10 +7668,10 @@ int Person::SphereCheck(XYZ *p1,float radius, XYZ *p, XYZ *move, float *rotate, vel[0]=velocity.x; vel[1]=velocity.y; vel[2]=velocity.z; - PlaySoundEx( landsound, samp[landsound], NULL, TRUE); + PlaySoundEx( landsound, samp[landsound], NULL, true); FSOUND_3D_SetAttributes(channels[landsound], gLoc, vel); FSOUND_SetVolume(channels[landsound], 128); - FSOUND_SetPaused(channels[landsound], FALSE); + FSOUND_SetPaused(channels[landsound], false); if(id==0){ envsound[numenvsounds]=coords; diff --git a/Source/Skeleton.cpp b/Source/Skeleton.cpp index c731434..fd44de1 100644 --- a/Source/Skeleton.cpp +++ b/Source/Skeleton.cpp @@ -10,7 +10,7 @@ of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -49,7 +49,7 @@ extern int whichjointendarray[26]; #include "Game.h" extern Game * pgame; extern bool visibleloading; -extern "C" void PlaySoundEx(int channel, FSOUND_SAMPLE *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused); +extern "C" void PlaySoundEx(int channel, FSOUND_SAMPLE *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused); void dealloc2(void* param){ free(param); @@ -203,7 +203,7 @@ float Skeleton::DoConstraints(XYZ *coords,float *scale) objects.SphereCheckPossible(&terrainlight, 1); /* for(i=0; i2500){ Normalise(&bounceness); bounceness=bounceness*50; - } + } joints[i].velocity+=bounceness*elasticity; @@ -547,10 +547,10 @@ float Skeleton::DoConstraints(XYZ *coords,float *scale) vel[1]=joints[i].velocity.y; vel[2]=joints[i].velocity.z; if(tutoriallevel!=1||id==0){ - PlaySoundEx( landsound1, samp[landsound1], NULL, TRUE); + PlaySoundEx( landsound1, samp[landsound1], NULL, true); FSOUND_3D_SetAttributes(channels[landsound1], gLoc, vel); FSOUND_SetVolume(channels[landsound1], 128); - FSOUND_SetPaused(channels[landsound1], FALSE); + FSOUND_SetPaused(channels[landsound1], false); } breaking=1; } @@ -567,10 +567,10 @@ float Skeleton::DoConstraints(XYZ *coords,float *scale) vel[1]=joints[i].velocity.y; vel[2]=joints[i].velocity.z; if(tutoriallevel!=1||id==0){ - PlaySoundEx( landsound2, samp[landsound2], NULL, TRUE); + PlaySoundEx( landsound2, samp[landsound2], NULL, true); FSOUND_3D_SetAttributes(channels[landsound2], gLoc, vel); FSOUND_SetVolume(channels[landsound2], 128); - FSOUND_SetPaused(channels[landsound2], FALSE); + FSOUND_SetPaused(channels[landsound2], false); } } @@ -596,10 +596,10 @@ float Skeleton::DoConstraints(XYZ *coords,float *scale) vel[0]=joints[i].velocity.x; vel[1]=joints[i].velocity.y; vel[2]=joints[i].velocity.z; - PlaySoundEx( breaksound2, samp[breaksound2], NULL, TRUE); + PlaySoundEx( breaksound2, samp[breaksound2], NULL, true); FSOUND_3D_SetAttributes(channels[breaksound2], gLoc, vel); FSOUND_SetVolume(channels[breaksound2], 300); - FSOUND_SetPaused(channels[breaksound2], FALSE); + FSOUND_SetPaused(channels[breaksound2], false); envsound[numenvsounds]=*coords; envsoundvol[numenvsounds]=64; @@ -683,9 +683,9 @@ float Skeleton::DoConstraints(XYZ *coords,float *scale) for(i=0; iposition.x,muscles[i].parent1->position.y,muscles[i].parent1->position.z); glVertex3f(muscles[i].parent2->position.x,muscles[i].parent2->position.y,muscles[i].parent2->position.z); } - } + } glEnd(); if(muscleview!=2){ @@ -906,7 +906,7 @@ void Skeleton::SetJoint(float x, float y, float z, int which, int whichjoint) joints[whichjoint].parent=&joints[which]; joints[whichjoint].hasparent=1; joints[whichjoint].length=findDistance(&joints[whichjoint].position,&joints[whichjoint].parent->position); - } + } } } @@ -1102,7 +1102,7 @@ void Animation::Load(char *filename, int aheight, int aattack) funpackf(tfile, "Bf Bf Bf", &weapontarget[i].x,&weapontarget[i].y,&weapontarget[i].z); } - fclose(tfile); + fclose(tfile); } startoffset=0; @@ -1250,8 +1250,8 @@ void Skeleton::Load(char *filename,char *lowfilename,char *clothesfilename, char funpackf(tfile, "Bi", &lowforwardjoints[j]); } for(j=0;j.2)FSOUND_SetVolume(channels[whichsound], 128*findLengthfast(&bounceness)); else FSOUND_SetVolume(channels[whichsound], 32*findLengthfast(&bounceness)); - FSOUND_SetPaused(channels[whichsound], FALSE); + FSOUND_SetPaused(channels[whichsound], false); if(terrain.getOpacity(position[i].x,position[i].z)<.2){ XYZ terrainlight; @@ -761,11 +761,11 @@ void Weapons::DoStuff(){ vel[0]=0; vel[1]=0; vel[2]=0; - PlaySoundEx( whichsound, samp[whichsound], NULL, TRUE); + PlaySoundEx( whichsound, samp[whichsound], NULL, true); FSOUND_3D_SetAttributes(channels[whichsound], gLoc, vel); if(terrain.getOpacity(tippoint[i].x,tippoint[i].z)>.2)FSOUND_SetVolume(channels[whichsound], 128*findLengthfast(&bounceness)); else FSOUND_SetVolume(channels[whichsound], 32*findLengthfast(&bounceness)); - FSOUND_SetPaused(channels[whichsound], FALSE); + FSOUND_SetPaused(channels[whichsound], false); if(terrain.getOpacity(tippoint[i].x,tippoint[i].z)<.2){ XYZ terrainlight; @@ -819,11 +819,11 @@ void Weapons::DoStuff(){ vel[0]=0; vel[1]=0; vel[2]=0; - PlaySoundEx( whichsound, samp[whichsound], NULL, TRUE); + PlaySoundEx( whichsound, samp[whichsound], NULL, true); FSOUND_3D_SetAttributes(channels[whichsound], gLoc, vel); if(terrain.getOpacity(position[i].x,position[i].z)>.2)FSOUND_SetVolume(channels[whichsound], 128*findLengthfast(&bounceness)); else FSOUND_SetVolume(channels[whichsound], 32*findLengthfast(&bounceness)); - FSOUND_SetPaused(channels[whichsound], FALSE); + FSOUND_SetPaused(channels[whichsound], false); } position[i]+=(mid-oldmid)*20; } @@ -863,11 +863,11 @@ void Weapons::DoStuff(){ vel[0]=0; vel[1]=0; vel[2]=0; - PlaySoundEx( whichsound, samp[whichsound], NULL, TRUE); + PlaySoundEx( whichsound, samp[whichsound], NULL, true); FSOUND_3D_SetAttributes(channels[whichsound], gLoc, vel); if(terrain.getOpacity(position[i].x,position[i].z)>.2)FSOUND_SetVolume(channels[whichsound], 128*findLengthfast(&bounceness)); else FSOUND_SetVolume(channels[whichsound], 32*findLengthfast(&bounceness)); - FSOUND_SetPaused(channels[whichsound], FALSE); + FSOUND_SetPaused(channels[whichsound], false); } tippoint[i]+=(mid-oldmid)*20; } @@ -905,11 +905,11 @@ void Weapons::DoStuff(){ vel[0]=0; vel[1]=0; vel[2]=0; - PlaySoundEx( whichsound, samp[whichsound], NULL, TRUE); + PlaySoundEx( whichsound, samp[whichsound], NULL, true); FSOUND_3D_SetAttributes(channels[whichsound], gLoc, vel); if(terrain.getOpacity(position[i].x,position[i].z)>.2)FSOUND_SetVolume(channels[whichsound], 128*findLengthfast(&bounceness)); else FSOUND_SetVolume(channels[whichsound], 32*findLengthfast(&bounceness)); - FSOUND_SetPaused(channels[whichsound], FALSE); + FSOUND_SetPaused(channels[whichsound], false); } } @@ -944,11 +944,11 @@ void Weapons::DoStuff(){ vel[0]=0; vel[1]=0; vel[2]=0; - PlaySoundEx( whichsound, samp[whichsound], NULL, TRUE); + PlaySoundEx( whichsound, samp[whichsound], NULL, true); FSOUND_3D_SetAttributes(channels[whichsound], gLoc, vel); if(terrain.getOpacity(tippoint[i].x,tippoint[i].z)>.2)FSOUND_SetVolume(channels[whichsound], 128*findLengthfast(&bounceness)); else FSOUND_SetVolume(channels[whichsound], 32*findLengthfast(&bounceness)); - FSOUND_SetPaused(channels[whichsound], FALSE); + FSOUND_SetPaused(channels[whichsound], false); } }*/ @@ -1060,7 +1060,7 @@ void Weapons::DoStuff(){ } //velocity[i]=(position[i]-oldposition[i])/multiplier; - //tipvelocity[i]==(tippoint[i-+oldtippoint[i])/multiplier; + //tipvelocity[i]==(tippoint[i-+oldtippoint[i])/multiplier; if(freetime[i]>.4){ velocity[i]=0; tipvelocity[i]=0; @@ -1083,7 +1083,7 @@ void Weapons::DoStuff(){ if(bloodtoggle){ bloodvel=0; sprites.MakeSprite(bloodsprite, bloodloc,bloodvel, 1,1,1, .03, 1); - } + } } } if(onfire[i]){ @@ -1182,8 +1182,8 @@ int Weapons::Draw() glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix glPushMatrix(); glColor4f(terrainlight.x,terrainlight.y,terrainlight.z,j/drawhowmany[i]); - if(owner[i]!=-1)glTranslatef(position[i].x*(((float)(j))/drawhowmany[i])+lastdrawnposition[i].x*(1-((float)(j))/drawhowmany[i]),position[i].y*(((float)(j))/drawhowmany[i])-.02+lastdrawnposition[i].y*(1-((float)(j))/drawhowmany[i]),position[i].z*(((float)(j))/drawhowmany[i])+lastdrawnposition[i].z*(1-((float)(j))/drawhowmany[i])); - if(owner[i]==-1)glTranslatef(position[i].x*(((float)(j))/drawhowmany[i])+lastdrawnposition[i].x*(1-((float)(j))/drawhowmany[i]),position[i].y*(((float)(j))/drawhowmany[i])+lastdrawnposition[i].y*(1-((float)(j))/drawhowmany[i]),position[i].z*(((float)(j))/drawhowmany[i])+lastdrawnposition[i].z*(1-((float)(j))/drawhowmany[i])); + if(owner[i]!=-1)glTranslatef(position[i].x*(((float)(j))/drawhowmany[i])+lastdrawnposition[i].x*(1-((float)(j))/drawhowmany[i]),position[i].y*(((float)(j))/drawhowmany[i])-.02+lastdrawnposition[i].y*(1-((float)(j))/drawhowmany[i]),position[i].z*(((float)(j))/drawhowmany[i])+lastdrawnposition[i].z*(1-((float)(j))/drawhowmany[i])); + if(owner[i]==-1)glTranslatef(position[i].x*(((float)(j))/drawhowmany[i])+lastdrawnposition[i].x*(1-((float)(j))/drawhowmany[i]),position[i].y*(((float)(j))/drawhowmany[i])+lastdrawnposition[i].y*(1-((float)(j))/drawhowmany[i]),position[i].z*(((float)(j))/drawhowmany[i])+lastdrawnposition[i].z*(1-((float)(j))/drawhowmany[i])); //glTranslatef(position[i].x,position[i].y-.02,position[i].z); glRotatef(bigrotation[i]*(((float)(j))/drawhowmany[i])+lastdrawnbigrotation[i]*(1-((float)(j))/drawhowmany[i]),0,1,0); glRotatef(bigtilt2[i]*(((float)(j))/drawhowmany[i])+lastdrawnbigtilt2[i]*(1-((float)(j))/drawhowmany[i]),1,0,0); @@ -1213,7 +1213,7 @@ int Weapons::Draw() if(type[i]==knife) { - glEnable(GL_LIGHTING); + glEnable(GL_LIGHTING); if(!bloody[i]||!bloodtoggle)throwingknifemodel.drawdifftex(knifetextureptr); if(bloodtoggle) { @@ -1223,7 +1223,7 @@ int Weapons::Draw() } if(type[i]==sword) { - glEnable(GL_LIGHTING); + glEnable(GL_LIGHTING); if(!bloody[i]||!bloodtoggle)swordmodel.drawdifftex(swordtextureptr); if(bloodtoggle) { @@ -1233,7 +1233,7 @@ int Weapons::Draw() } if(type[i]==staff) { - glEnable(GL_LIGHTING); + glEnable(GL_LIGHTING); staffmodel.drawdifftex(stafftextureptr); } @@ -1266,7 +1266,7 @@ int Weapons::Draw() glRotatef(-rotation3[i],0,1,0); glRotatef(smallrotation[i],1,0,0); glRotatef(smallrotation2[i],0,1,0); - glTranslatef(0,0,length[i]); + glTranslatef(0,0,length[i]); glGetFloatv(GL_MODELVIEW_MATRIX,M); tippoint[i].x=M[12]; tippoint[i].y=M[13]; diff --git a/Source/WinInput.cpp b/Source/WinInput.cpp index 53a5598..513924d 100644 --- a/Source/WinInput.cpp +++ b/Source/WinInput.cpp @@ -64,297 +64,297 @@ Boolean IsKeyDown( unsigned char *keyMap, unsigned short theKey ) unsigned short CharToKey(char* which) { // alphabetic keys - if(!stricmp(which,"a")){ + if(!strcasecmp(which,"a")){ return MAC_A_KEY; } - if(!stricmp(which,"b")){ + if(!strcasecmp(which,"b")){ return MAC_B_KEY; } - if(!stricmp(which,"c")){ + if(!strcasecmp(which,"c")){ return MAC_C_KEY; } - if(!stricmp(which,"d")){ + if(!strcasecmp(which,"d")){ return MAC_D_KEY; } - if(!stricmp(which,"e")){ + if(!strcasecmp(which,"e")){ return MAC_E_KEY; } - if(!stricmp(which,"f")){ + if(!strcasecmp(which,"f")){ return MAC_F_KEY; } - if(!stricmp(which,"g")){ + if(!strcasecmp(which,"g")){ return MAC_G_KEY; } - if(!stricmp(which,"h")){ + if(!strcasecmp(which,"h")){ return MAC_H_KEY; } - if(!stricmp(which,"i")){ + if(!strcasecmp(which,"i")){ return MAC_I_KEY; } - if(!stricmp(which,"j")){ + if(!strcasecmp(which,"j")){ return MAC_J_KEY; } - if(!stricmp(which,"k")){ + if(!strcasecmp(which,"k")){ return MAC_K_KEY; } - if(!stricmp(which,"l")){ + if(!strcasecmp(which,"l")){ return MAC_L_KEY; } - if(!stricmp(which,"m")){ + if(!strcasecmp(which,"m")){ return MAC_M_KEY; } - if(!stricmp(which,"n")){ + if(!strcasecmp(which,"n")){ return MAC_N_KEY; } - if(!stricmp(which,"o")){ + if(!strcasecmp(which,"o")){ return MAC_O_KEY; } - if(!stricmp(which,"p")){ + if(!strcasecmp(which,"p")){ return MAC_P_KEY; } - if(!stricmp(which,"q")){ + if(!strcasecmp(which,"q")){ return MAC_Q_KEY; } - if(!stricmp(which,"r")){ + if(!strcasecmp(which,"r")){ return MAC_R_KEY; } - if(!stricmp(which,"s")){ + if(!strcasecmp(which,"s")){ return MAC_S_KEY; } - if(!stricmp(which,"t")){ + if(!strcasecmp(which,"t")){ return MAC_T_KEY; } - if(!stricmp(which,"u")){ + if(!strcasecmp(which,"u")){ return MAC_U_KEY; } - if(!stricmp(which,"v")){ + if(!strcasecmp(which,"v")){ return MAC_V_KEY; } - if(!stricmp(which,"w")){ + if(!strcasecmp(which,"w")){ return MAC_W_KEY; } - if(!stricmp(which,"x")){ + if(!strcasecmp(which,"x")){ return MAC_X_KEY; } - if(!stricmp(which,"y")){ + if(!strcasecmp(which,"y")){ return MAC_Y_KEY; } - if(!stricmp(which,"z")){ + if(!strcasecmp(which,"z")){ return MAC_Z_KEY; } // keypad keys - if(!stricmp(which,"KP0")){ + if(!strcasecmp(which,"KP0")){ return MAC_NUMPAD_0_KEY; } - if(!stricmp(which,"KP1")){ + if(!strcasecmp(which,"KP1")){ return MAC_NUMPAD_1_KEY; } - if(!stricmp(which,"KP2")){ + if(!strcasecmp(which,"KP2")){ return MAC_NUMPAD_2_KEY; } - if(!stricmp(which,"KP3")){ + if(!strcasecmp(which,"KP3")){ return MAC_NUMPAD_3_KEY; } - if(!stricmp(which,"KP4")){ + if(!strcasecmp(which,"KP4")){ return MAC_NUMPAD_4_KEY; } - if(!stricmp(which,"KP5")){ + if(!strcasecmp(which,"KP5")){ return MAC_NUMPAD_5_KEY; } - if(!stricmp(which,"KP6")){ + if(!strcasecmp(which,"KP6")){ return MAC_NUMPAD_6_KEY; } - if(!stricmp(which,"KP7")){ + if(!strcasecmp(which,"KP7")){ return MAC_NUMPAD_7_KEY; } - if(!stricmp(which,"KP8")){ + if(!strcasecmp(which,"KP8")){ return MAC_NUMPAD_8_KEY; } - if(!stricmp(which,"KP9")){ + if(!strcasecmp(which,"KP9")){ return MAC_NUMPAD_9_KEY; } // enter - if(!stricmp(which,"enter")){ + if(!strcasecmp(which,"enter")){ return MAC_ENTER_KEY; } // number keys - if(!stricmp(which,"0")){ + if(!strcasecmp(which,"0")){ return MAC_0_KEY; } - if(!stricmp(which,"1")){ + if(!strcasecmp(which,"1")){ return MAC_1_KEY; } - if(!stricmp(which,"2")){ + if(!strcasecmp(which,"2")){ return MAC_2_KEY; } - if(!stricmp(which,"3")){ + if(!strcasecmp(which,"3")){ return MAC_3_KEY; } - if(!stricmp(which,"4")){ + if(!strcasecmp(which,"4")){ return MAC_4_KEY; } - if(!stricmp(which,"5")){ + if(!strcasecmp(which,"5")){ return MAC_5_KEY; } - if(!stricmp(which,"6")){ + if(!strcasecmp(which,"6")){ return MAC_6_KEY; } - if(!stricmp(which,"7")){ + if(!strcasecmp(which,"7")){ return MAC_7_KEY; } - if(!stricmp(which,"8")){ + if(!strcasecmp(which,"8")){ return MAC_8_KEY; } - if(!stricmp(which,"9")){ + if(!strcasecmp(which,"9")){ return MAC_9_KEY; } // function keys - if(!stricmp(which,"F1")){ + if(!strcasecmp(which,"F1")){ return MAC_F1_KEY; } - if(!stricmp(which,"F2")){ + if(!strcasecmp(which,"F2")){ return MAC_F2_KEY; } - if(!stricmp(which,"F3")){ + if(!strcasecmp(which,"F3")){ return MAC_F3_KEY; } - if(!stricmp(which,"F4")){ + if(!strcasecmp(which,"F4")){ return MAC_F4_KEY; } - if(!stricmp(which,"F5")){ + if(!strcasecmp(which,"F5")){ return MAC_F5_KEY; } - if(!stricmp(which,"F6")){ + if(!strcasecmp(which,"F6")){ return MAC_F6_KEY; } - if(!stricmp(which,"F7")){ + if(!strcasecmp(which,"F7")){ return MAC_F7_KEY; } - if(!stricmp(which,"F8")){ + if(!strcasecmp(which,"F8")){ return MAC_F8_KEY; } - if(!stricmp(which,"F9")){ + if(!strcasecmp(which,"F9")){ return MAC_F9_KEY; } - if(!stricmp(which,"F10")){ + if(!strcasecmp(which,"F10")){ return MAC_F10_KEY; } - if(!stricmp(which,"F11")){ + if(!strcasecmp(which,"F11")){ return MAC_F11_KEY; } - if(!stricmp(which,"F12")){ + if(!strcasecmp(which,"F12")){ return MAC_F12_KEY; } // escape - if(!stricmp(which,"escape")){ + if(!strcasecmp(which,"escape")){ return MAC_ESCAPE_KEY; } - if(!stricmp(which,"backspace")){ + if(!strcasecmp(which,"backspace")){ return MAC_DELETE_KEY; } - if(!stricmp(which,"tab")){ + if(!strcasecmp(which,"tab")){ return MAC_TAB_KEY; } - if(!stricmp(which,"`")){ + if(!strcasecmp(which,"`")){ return MAC_TILDE_KEY; } - if(!stricmp(which,"caps_lock")){ + if(!strcasecmp(which,"caps_lock")){ return MAC_CAPS_LOCK_KEY; } // if(which==){ // return ""; // } - if(!stricmp(which,"command")){ + if(!strcasecmp(which,"command")){ return MAC_COMMAND_KEY; } - if(!stricmp(which,"option")){ + if(!strcasecmp(which,"option")){ return MAC_OPTION_KEY; } - if(!stricmp(which,"delete")){ + if(!strcasecmp(which,"delete")){ return MAC_DEL_KEY; } - if(!stricmp(which,"insert")){ + if(!strcasecmp(which,"insert")){ return MAC_INSERT_KEY; } - if(!stricmp(which,"home")){ + if(!strcasecmp(which,"home")){ return MAC_HOME_KEY; } - if(!stricmp(which,"end")){ + if(!strcasecmp(which,"end")){ return MAC_END_KEY; } - if(!stricmp(which,"page_up")){ + if(!strcasecmp(which,"page_up")){ return MAC_PAGE_UP_KEY; } - if(!stricmp(which,"page_down")){ + if(!strcasecmp(which,"page_down")){ return MAC_PAGE_DOWN_KEY; } - if(!stricmp(which,"clear")){ + if(!strcasecmp(which,"clear")){ return MAC_NUMPAD_CLEAR_KEY; } - if(!stricmp(which,"control")){ + if(!strcasecmp(which,"control")){ return MAC_CONTROL_KEY; } - if(!stricmp(which,"return")){ + if(!strcasecmp(which,"return")){ return MAC_RETURN_KEY; } - if(!stricmp(which,"space")){ + if(!strcasecmp(which,"space")){ return MAC_SPACE_KEY; } - if(!stricmp(which,"shift")){ + if(!strcasecmp(which,"shift")){ return MAC_SHIFT_KEY; } - if(!stricmp(which,"uparrow")){ + if(!strcasecmp(which,"uparrow")){ return MAC_ARROW_UP_KEY; } - if(!stricmp(which,"downarrow")){ + if(!strcasecmp(which,"downarrow")){ return MAC_ARROW_DOWN_KEY; } - if(!stricmp(which,"leftarrow")){ + if(!strcasecmp(which,"leftarrow")){ return MAC_ARROW_LEFT_KEY; } - if(!stricmp(which,"rightarrow")){ + if(!strcasecmp(which,"rightarrow")){ return MAC_ARROW_RIGHT_KEY; } - if(!stricmp(which,"mouse1")){ + if(!strcasecmp(which,"mouse1")){ return MAC_MOUSEBUTTON1; } - if(!stricmp(which,"mouse2")){ + if(!strcasecmp(which,"mouse2")){ return MAC_MOUSEBUTTON2; } - if(!stricmp(which,"+")){ + if(!strcasecmp(which,"+")){ return MAC_NUMPAD_PLUS_KEY; } - if(!stricmp(which,"*")){ + if(!strcasecmp(which,"*")){ return MAC_NUMPAD_ASTERISK_KEY; } - if(!stricmp(which,"/")){ + if(!strcasecmp(which,"/")){ return MAC_SLASH_KEY; } - if(!stricmp(which,"\\")){ + if(!strcasecmp(which,"\\")){ return MAC_BACKSLASH_KEY; } - if(!stricmp(which,"[")){ + if(!strcasecmp(which,"[")){ return MAC_LEFTBRACKET_KEY; } - if(!stricmp(which,"]")){ + if(!strcasecmp(which,"]")){ return MAC_RIGHTBRACKET_KEY; } - if(!stricmp(which,".")){ + if(!strcasecmp(which,".")){ return MAC_PERIOD_KEY; } - if(!stricmp(which,",")){ + if(!strcasecmp(which,",")){ return MAC_COMMA_KEY; } - if(!stricmp(which,"\"")){ + if(!strcasecmp(which,"\"")){ return MAC_APOSTROPHE_KEY; } - if(!stricmp(which,";")){ + if(!strcasecmp(which,";")){ return MAC_SEMICOLON_KEY; } return UNKNOWN_KEY; diff --git a/Source/gamegl.h b/Source/gamegl.h index c88278a..203cc4d 100644 --- a/Source/gamegl.h +++ b/Source/gamegl.h @@ -33,13 +33,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef WIN32 #if PLATFORM_UNIX #define GL_GLEXT_PROTOTYPES - #include "gl.h" - #include "glu.h" - #include "glext.h" + #include "GL/gl.h" + #include "GL/glu.h" + #include "GL/glext.h" #else - #include - #include - #include + #include + #include + #include #endif #else #define WIN32_LEAN_AND_MEAN diff --git a/Source/openal_wrapper.cpp b/Source/openal_wrapper.cpp index 41be240..9f8debc 100644 --- a/Source/openal_wrapper.cpp +++ b/Source/openal_wrapper.cpp @@ -205,15 +205,15 @@ void F_API OPENAL_3D_Listener_SetAttributes(const float *pos, const float *vel, signed char F_API OPENAL_3D_SetAttributes(int channel, const float *pos, const float *vel) { - if (!initialized) return FALSE; - if ((channel < 0) || (channel >= num_channels)) return FALSE; + if (!initialized) return false; + if ((channel < 0) || (channel >= num_channels)) return false; if (pos != NULL) set_channel_position(channel, pos[0], pos[1], -pos[2]); // we ignore velocity, since doppler's broken in the Linux AL at the moment... - return TRUE; + return true; } void F_API OPENAL_3D_SetDopplerFactor(float scale) @@ -224,31 +224,31 @@ void F_API OPENAL_3D_SetDopplerFactor(float scale) signed char F_API OPENAL_Init(int mixrate, int maxsoftwarechannels, unsigned int flags) { - if (initialized) return FALSE; - if (maxsoftwarechannels == 0) return FALSE; + if (initialized) return false; + if (maxsoftwarechannels == 0) return false; if (flags != 0) // unsupported. - return FALSE; + return false; if (!lookup_all_alsyms("./openal.so")) // !!! FIXME: linux specific lib name { if (!lookup_all_alsyms("openal.so.1")) // !!! FIXME: linux specific lib name { if (!lookup_all_alsyms("openal.so")) // !!! FIXME: linux specific lib name - return FALSE; + return false; } } ALCdevice *dev = alcOpenDevice(NULL); if (!dev) - return FALSE; + return false; ALint caps[] = { ALC_FREQUENCY, mixrate, 0 }; ALCcontext *ctx = alcCreateContext(dev, caps); if (!ctx) { alcCloseDevice(dev); - return FALSE; + return false; } alcMakeContextCurrent(ctx); @@ -270,7 +270,7 @@ signed char F_API OPENAL_Init(int mixrate, int maxsoftwarechannels, unsigned int alGenSources(1, &channels[i].sid); // !!! FIXME: verify this didn't fail! initialized = true; - return TRUE; + return true; } void F_API OPENAL_Close() @@ -310,14 +310,14 @@ FSOUND_SAMPLE *F_API OPENAL_GetCurrentSample(int channel) signed char F_API OPENAL_GetPaused(int channel) { - if (!initialized) return FALSE; - if ((channel < 0) || (channel >= num_channels)) return FALSE; + if (!initialized) return false; + if ((channel < 0) || (channel >= num_channels)) return false; if (channels[channel].startpaused) - return(TRUE); + return(true); ALint state = 0; alGetSourceiv(channels[channel].sid, AL_SOURCE_STATE, &state); - return((state == AL_PAUSED) ? TRUE : FALSE); + return((state == AL_PAUSED) ? true : false); } unsigned int F_API OPENAL_GetLoopMode(int channel) @@ -333,11 +333,11 @@ unsigned int F_API OPENAL_GetLoopMode(int channel) signed char F_API OPENAL_IsPlaying(int channel) { - if (!initialized) return FALSE; - if ((channel < 0) || (channel >= num_channels)) return FALSE; + if (!initialized) return false; + if ((channel < 0) || (channel >= num_channels)) return false; ALint state = 0; alGetSourceiv(channels[channel].sid, AL_SOURCE_STATE, &state); - return((state == AL_PLAYING) ? TRUE : FALSE); + return((state == AL_PLAYING) ? true : false); } int F_API OPENAL_PlaySoundEx(int channel, FSOUND_SAMPLE *sptr, FSOUND_DSPUNIT *dsp, signed char startpaused) @@ -525,17 +525,17 @@ void F_API OPENAL_Sample_Free(FSOUND_SAMPLE *sptr) signed char F_API OPENAL_Sample_SetMode(FSOUND_SAMPLE *sptr, unsigned int mode) { - if (!initialized) return FALSE; - if ((mode != FSOUND_LOOP_NORMAL) && (mode != FSOUND_LOOP_OFF)) return FALSE; - if (!sptr) return FALSE; + if (!initialized) return false; + if ((mode != FSOUND_LOOP_NORMAL) && (mode != FSOUND_LOOP_OFF)) return false; + if (!sptr) return false; sptr->mode = mode; - return TRUE; + return true; } signed char F_API OPENAL_Sample_SetMinMaxDistance(FSOUND_SAMPLE *sptr, float mindist, float maxdist) { - if (!initialized) return FALSE; - if (sptr == NULL) return FALSE; + if (!initialized) return false; + if (sptr == NULL) return false; sptr->min_distance = mindist; // we ignore maxdist. It's not really important to this game, and the // FMOD docs suggest that it's worthless anyhow. @@ -555,54 +555,54 @@ signed char F_API OPENAL_Sample_SetMinMaxDistance(FSOUND_SAMPLE *sptr, float min signed char F_API OPENAL_SetFrequency(int channel, int freq) { - if (!initialized) return FALSE; + if (!initialized) return false; if (channel == FSOUND_ALL) { for (int i = 0; i < num_channels; i++) OPENAL_SetFrequency(i, freq); - return TRUE; + return true; } - if ((channel < 0) || (channel >= num_channels)) return FALSE; + if ((channel < 0) || (channel >= num_channels)) return false; if (freq == 8012) // hack alSourcef(channels[channel].sid, AL_PITCH, 8012.0f / 44100.0f); else alSourcef(channels[channel].sid, AL_PITCH, 1.0f); - return TRUE; + return true; } signed char F_API OPENAL_SetVolume(int channel, int vol) { - if (!initialized) return FALSE; + if (!initialized) return false; if (channel == FSOUND_ALL) { for (int i = 0; i < num_channels; i++) OPENAL_SetVolume(i, vol); - return TRUE; + return true; } - if ((channel < 0) || (channel >= num_channels)) return FALSE; + if ((channel < 0) || (channel >= num_channels)) return false; if (vol < 0) vol = 0; else if (vol > 255) vol = 255; ALfloat gain = ((ALfloat) vol) / 255.0f; alSourcef(channels[channel].sid, AL_GAIN, gain); - return TRUE; + return true; } signed char F_API OPENAL_SetPaused(int channel, signed char paused) { - if (!initialized) return FALSE; + if (!initialized) return false; if (channel == FSOUND_ALL) { for (int i = 0; i < num_channels; i++) OPENAL_SetPaused(i, paused); - return TRUE; + return true; } - if ((channel < 0) || (channel >= num_channels)) return FALSE; + if ((channel < 0) || (channel >= num_channels)) return false; ALint state = 0; if (channels[channel].startpaused) @@ -617,7 +617,7 @@ signed char F_API OPENAL_SetPaused(int channel, signed char paused) alSourcePlay(channels[channel].sid); channels[channel].startpaused = false; } - return TRUE; + return true; } void F_API OPENAL_SetSFXMasterVolume(int volume) @@ -629,19 +629,19 @@ void F_API OPENAL_SetSFXMasterVolume(int volume) signed char F_API OPENAL_StopSound(int channel) { - if (!initialized) return FALSE; + if (!initialized) return false; if (channel == FSOUND_ALL) { for (int i = 0; i < num_channels; i++) OPENAL_StopSound(i); - return TRUE; + return true; } - if ((channel < 0) || (channel >= num_channels)) return FALSE; + if ((channel < 0) || (channel >= num_channels)) return false; alSourceStop(channels[channel].sid); channels[channel].startpaused = false; - return TRUE; + return true; } FSOUND_STREAM * F_API OPENAL_Stream_Open(const char *name_or_data, unsigned int mode, int offset, int length) @@ -667,7 +667,7 @@ int F_API OPENAL_Stream_PlayEx(int channel, FSOUND_STREAM *stream, FSOUND_DSPUNI signed char F_API OPENAL_Stream_Stop(FSOUND_STREAM *stream) { - if (!initialized) return FALSE; + if (!initialized) return false; for (int i = 0; i < num_channels; i++) { if (channels[i].sample == (FSOUND_SAMPLE *) stream) @@ -676,7 +676,7 @@ signed char F_API OPENAL_Stream_Stop(FSOUND_STREAM *stream) channels[i].startpaused = false; } } - return TRUE; + return true; } signed char F_API OPENAL_Stream_SetMode(FSOUND_STREAM *stream, unsigned int mode) @@ -692,7 +692,7 @@ void F_API OPENAL_Update() signed char F_API OPENAL_SetOutput(int outputtype) { - return TRUE; + return true; } #endif -- 2.39.5