/*
Copyright (C) 2003, 2010 - Wolfire Games
+Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
This file is part of Lugaru.
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;
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;
extern int hotspottype[40];
extern float hotspotsize[40];
extern char hotspottext[40][256];
-extern int currenthotspot;;
+extern int currenthotspot;
extern bool campaign;
extern bool winfreeze;
-extern float menupulse;
-
extern bool gamestart;
extern bool gamestarted;
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();
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);
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;
}
}
}
- if (closest != -1)
+ if (closest != -1) {
currenthotspot = closest;
- if (currenthotspot != -1) {
if (hotspottype[closest] <= 10) {
if (distsq(&Person::players[0]->coords, &hotspot[closest]) < hotspotsize[closest])
tutorialstagetime = 0;
XYZ center;
float radius;
float distcheck;
- int numliveplayers = 0;
- center = 0;
- for (unsigned i = 0; i < Person::players.size(); i++) {
- if (!Person::players[i]->dead)
- numliveplayers++;
- }
-
- int numadd = 0;
-
- for (int i = 0; i < objects.numobjects; i++) {
- if (objects.type[i] == treetrunktype || objects.type[i] == boxtype) {
- center += objects.position[i];
- numadd++;
- }
- }
- for (unsigned i = 0; i < Person::players.size(); i++) {
- if (!Person::players[i]->dead)
- center += Person::players[i]->coords;
- }
- center /= numadd + numliveplayers;
center = Person::players[0]->coords;
- 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;
- }
- }
- for (unsigned i = 0; i < Person::players.size(); i++) {
- if (!Person::players[i]->dead) {
- tempdist = distsq(¢er, &Person::players[i]->coords);
- if (tempdist > maxdistance) {
- //~ whichclosest=i;
- maxdistance = tempdist;
- }
- }
- }
radius = 110;
glScalef(.25 / radius * 256 * terrain.scale * .4, .25 / radius * 256 * terrain.scale * .4, 1);