X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameDraw.cpp;h=4994b1184b92c6b72763d7c694660bba05fe65d0;hb=794f89c25569a9bf50f167689ca0faa3dcffc577;hp=6c8ac0abe05950020c30dacb385a5f8132374624;hpb=6aeefd781d62a9b5b8cf2f4d3a7ba4abaf82f54f;p=lugaru.git diff --git a/Source/GameDraw.cpp b/Source/GameDraw.cpp index 6c8ac0a..4994b11 100644 --- a/Source/GameDraw.cpp +++ b/Source/GameDraw.cpp @@ -1,5 +1,6 @@ /* Copyright (C) 2003, 2010 - Wolfire Games +Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file) This file is part of Lugaru. @@ -28,9 +29,7 @@ extern int environment; extern float texscale; extern Light light; extern Terrain terrain; -//extern Sprites sprites; extern float multiplier; -extern float sps; extern float viewdistance; extern float fadestart; extern float screenwidth, screenheight; @@ -40,7 +39,6 @@ extern Light light; extern Objects objects; extern int detail; extern float usermousesensitivity; -extern bool osx; extern float camerashake; extern int slomo; extern float slomodelay; @@ -61,20 +59,12 @@ extern int netstate; extern float motionbluramount; extern bool isclient; extern bool alwaysblur; -extern int test; -extern bool tilt2weird; -extern bool tiltweird; -extern bool midweird; -extern bool proportionweird; -extern bool vertexweird[6]; extern bool velocityblur; extern bool debugmode; extern int mainmenu; extern int bloodtoggle; extern int difficulty; extern bool decals; -// MODIFIED GWC -//extern int texdetail; extern float texdetail; extern bool musictoggle; extern int tutoriallevel; @@ -97,8 +87,6 @@ extern int currenthotspot;; extern bool campaign; extern bool winfreeze; -extern float menupulse; - extern bool gamestart; extern bool gamestarted; @@ -119,13 +107,13 @@ enum drawmodes { realmotionblurmode, doublevisionmode, glowmode, }; -void Game::flash() // shouldn't be that way, these should be attributes and Person class should not change rendering. +void Game::flash(float amount, int delay) // shouldn't be that way, these should be attributes and Person class should not change rendering. { flashr = 1; flashg = 0; flashb = 0; - flashamount = 1; - flashdelay = 1; + flashamount = amount; + flashdelay = delay; } void DrawMenu(); @@ -417,18 +405,6 @@ int Game::DrawGLScene(StereoSide side) glEnable(GL_COLOR_MATERIAL); - test = 2; - tilt2weird = 0; - tiltweird = 0; - midweird = 0; - proportionweird = 0; - vertexweird[0] = 0; - vertexweird[1] = 0; - vertexweird[2] = 0; - vertexweird[3] = 0; - vertexweird[4] = 0; - vertexweird[5] = 0; - if (!cellophane) { glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_CULL_FACE); @@ -914,8 +890,8 @@ int Game::DrawGLScene(StereoSide side) text->glPrint(screenwidth / 2 - 7.6 * strlen(string2)*screenwidth / 1024 * .8, 0 + screenheight * 1 / 10 - 20 * .8 * screenwidth / 1024, string2, 1, 1.5 * screenwidth / 1024 * .8, screenwidth, screenheight); text->glPrint(screenwidth / 2 - 7.6 * strlen(string3)*screenwidth / 1024 * .8, 0 + screenheight * 1 / 10 - 40 * .8 * screenwidth / 1024, string3, 1, 1.5 * screenwidth / 1024 * .8, screenwidth, screenheight); } - //Hot spots + //Hot spots if (numhotspots && (bonustime >= 1 || bonus <= 0 || bonustime < 0) && !tutoriallevel) { float closestdist = -1; float distance = 0; @@ -1483,11 +1459,9 @@ int Game::DrawGLScene(StereoSide side) float maxdistance = 0; float tempdist; - //~ int whichclosest; for (int i = 0; i < objects.numobjects; i++) { tempdist = distsq(¢er, &objects.position[i]); if (tempdist > maxdistance) { - //~ whichclosest=i; maxdistance = tempdist; } } @@ -1495,7 +1469,6 @@ int Game::DrawGLScene(StereoSide side) if (!Person::players[i]->dead) { tempdist = distsq(¢er, &Person::players[i]->coords); if (tempdist > maxdistance) { - //~ whichclosest=i; maxdistance = tempdist; } }