X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FModels.cpp;h=f6a2a9164e636618eef72a9a892e942397839c94;hb=cd043e3f9e26c2b3406b40a354c2840941e9db7f;hp=dfa8ad089baab08bedcf7f6865658f0d498461ee;hpb=25e3d5e35a7fd7efdffc420efe3c41a91cefe43f;p=lugaru.git diff --git a/Source/Models.cpp b/Source/Models.cpp index dfa8ad0..f6a2a91 100644 --- a/Source/Models.cpp +++ b/Source/Models.cpp @@ -3,20 +3,18 @@ Copyright (C) 2003, 2010 - Wolfire Games This file is part of Lugaru. -Lugaru is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. +Lugaru is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. -This program is distributed in the hope that it will be useful, +Lugaru 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. - -See the GNU General Public License for more details. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +along with Lugaru. If not, see . */ #include "Game.h" @@ -245,7 +243,7 @@ int Model::SphereCheck(XYZ *p1, float radius, XYZ *p, XYZ *move, float *rotate) int Model::SphereCheckPossible(XYZ *p1, float radius, XYZ *move, float *rotate) { - static int i, j; + static int j; static float distance; static float olddistance; static int intersecting; @@ -451,9 +449,9 @@ bool Model::loadnotex(const char *filename ) FILE *tfile; long i; - int oldvertexNum, oldTriangleNum; - oldvertexNum = vertexNum; - oldTriangleNum = TriangleNum; + //~ int oldvertexNum, oldTriangleNum; + //~ oldvertexNum = vertexNum; + //~ oldTriangleNum = TriangleNum; type = notextype; color = 0; @@ -526,9 +524,9 @@ bool Model::load(const char *filename, bool texture ) if (visibleloading) Game::LoadingScreen(); - int oldvertexNum, oldTriangleNum; - oldvertexNum = vertexNum; - oldTriangleNum = TriangleNum; + //~ int oldvertexNum, oldTriangleNum; + //~ oldvertexNum = vertexNum; + //~ oldTriangleNum = TriangleNum; type = normaltype; color = 0; @@ -605,9 +603,9 @@ bool Model::loaddecal(const char *filename, bool texture ) LOG(std::string("Loading decal...") + FixedFN); - int oldvertexNum, oldTriangleNum; - oldvertexNum = vertexNum; - oldTriangleNum = TriangleNum; + //~ int oldvertexNum, oldTriangleNum; + //~ oldvertexNum = vertexNum; + //~ oldTriangleNum = TriangleNum; type = decalstype; numdecals = 0; @@ -706,9 +704,9 @@ bool Model::loadraw(char *filename ) LOG(std::string("Loading raw...") + filename); - int oldvertexNum, oldTriangleNum; - oldvertexNum = vertexNum; - oldTriangleNum = TriangleNum; + //~ int oldvertexNum, oldTriangleNum; + //~ oldvertexNum = vertexNum; + //~ oldTriangleNum = TriangleNum; type = rawtype; color = 0; @@ -1112,13 +1110,13 @@ void Model::drawdecals(Texture shadowtexture, Texture bloodtexture, Texture bloo if (decals) { if (type != decalstype) return; - static int i, j; - static float distancemult; + static int i; + //~ static float distancemult; static int lasttype; - static float viewdistsquared; + //~ static float viewdistsquared; static bool blend; - viewdistsquared = viewdistance * viewdistance; + //~ viewdistsquared = viewdistance * viewdistance; blend = 1; lasttype = -1;