From: Alexander Monakov Date: Sun, 26 Dec 2010 11:08:18 +0000 (+0300) Subject: Consolidate bonus externs X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=fb33deea78909d498c363d973cda2c5d0d334314;p=lugaru.git Consolidate bonus externs --- diff --git a/Source/Awards.cpp b/Source/Awards.cpp index 47bfc7b..8640bdf 100644 --- a/Source/Awards.cpp +++ b/Source/Awards.cpp @@ -23,6 +23,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "Person.h" #include "Game.h" +int bonus; +float bonusvalue; +float bonustotal; +float startbonustotal; +float bonustime; + // FIXME: make these per-player float damagetaken; int numfalls; diff --git a/Source/Awards.h b/Source/Awards.h index d146ada..9168f1c 100644 --- a/Source/Awards.h +++ b/Source/Awards.h @@ -35,6 +35,13 @@ static const char *bonus_names[bonus_count] = { #undef DECLARE_BONUS }; +extern int bonus; +extern float bonusvalue; +extern float bonustotal; +extern float bonustime; +extern float startbonustotal; +extern float bonusnum[100]; + enum award_types { #define DECLARE_AWARD(id, name) id, #include "Awards.def" diff --git a/Source/GameDraw.cpp b/Source/GameDraw.cpp index 3b93f28..c98a3d2 100644 --- a/Source/GameDraw.cpp +++ b/Source/GameDraw.cpp @@ -81,13 +81,6 @@ extern bool decals; //extern int texdetail; extern float texdetail; extern bool musictoggle; -extern int bonus; -extern float bonusvalue; -extern float bonustotal; -extern float bonustime; -extern int oldbonus; -extern float startbonustotal; -extern float bonusnum[100]; extern int tutoriallevel; extern float smoketex; extern float tutorialstagetime; diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 466da3e..5c292f7 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -112,14 +112,7 @@ extern bool decals; extern bool vblsync; extern bool immediate; extern bool velocityblur; -extern int bonus; -extern int oldbonus; -extern float bonusvalue; -extern float bonustotal; -extern float bonustime; -extern float startbonustotal; extern float tintr,tintg,tintb; -extern float bonusnum[100]; extern bool skyboxtexture; extern float skyboxr; extern float skyboxg; diff --git a/Source/Globals.cpp b/Source/Globals.cpp index bf622bf..20a5452 100644 --- a/Source/Globals.cpp +++ b/Source/Globals.cpp @@ -218,13 +218,6 @@ bool vertexweird[6] = {0}; TGAImageRec texture; bool debugmode = 0; -int oldbonus = 0; -int bonus = 0; -float bonusvalue = 0; -float bonustotal = 0; -float startbonustotal = 0; -float bonustime = 0; - bool won = 0; diff --git a/Source/Person.cpp b/Source/Person.cpp index d77c81e..ca2c51d 100644 --- a/Source/Person.cpp +++ b/Source/Person.cpp @@ -72,10 +72,6 @@ extern XYZ envsound[30]; extern float envsoundvol[30]; extern float envsoundlife[30]; extern int numenvsounds; -extern int bonus; -extern float bonusvalue; -extern float bonustotal; -extern float bonustime; extern int tutoriallevel; extern float smoketex; extern int tutorialstage; diff --git a/Source/Skeleton.cpp b/Source/Skeleton.cpp index 9683f55..34a5aa5 100644 --- a/Source/Skeleton.cpp +++ b/Source/Skeleton.cpp @@ -40,8 +40,6 @@ extern XYZ envsound[30]; extern float envsoundvol[30]; extern int numenvsounds; extern float envsoundlife[30]; -extern int bonus; -extern float bonustime; extern int tutoriallevel; extern int whichjointstartarray[26]; diff --git a/Source/Weapons.cpp b/Source/Weapons.cpp index 128e7ce..212bdb4 100644 --- a/Source/Weapons.cpp +++ b/Source/Weapons.cpp @@ -52,10 +52,6 @@ extern float viewdistance; extern float blackout; extern int difficulty; extern bool freeze; -extern int bonus; -extern float bonusvalue; -extern float bonustotal; -extern float bonustime; extern int tutoriallevel; extern int numthrowkill; extern "C" void PlaySoundEx(int channel, OPENAL_SAMPLE *sptr, OPENAL_DSPUNIT *dsp, signed char startpaused);