]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Models.h
Reading debug mode from config again, but command line option overrides it
[lugaru.git] / Source / Models.h
index e69cca93a7f7af4fcf7b39d521214de652a32151..3874e233003710e5122983fe42234c9f60001cbf 100644 (file)
@@ -1,22 +1,21 @@
 /*
 Copyright (C) 2003, 2010 - Wolfire Games
+Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
 
 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 <http://www.gnu.org/licenses/>.
 */
 
 #ifndef _MODELS_H_
@@ -40,9 +39,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 //
 // Textures List
 //
-typedef struct         {
-    long                       xsz, ysz;
-    GLubyte                            *txt;
+typedef struct {
+    long xsz, ysz;
+    GLubyte *txt;
 } ModelTexture;
 
 //
@@ -52,7 +51,7 @@ typedef struct                {
 class TexturedTriangle
 {
 public:
-    short                      vertex[3];
+    short vertex[3];
     float gx[3], gy[3];
 };
 
@@ -67,7 +66,7 @@ public:
 class Model
 {
 public:
-    short      vertexNum, TriangleNum;
+    short vertexNum, TriangleNum;
     bool hastexture;
 
     int type, oldtype;
@@ -123,16 +122,15 @@ public:
     int SphereCheck(XYZ *p1, float radius, XYZ *p, XYZ *move, float *rotate);
     int SphereCheckPossible(XYZ *p1, float radius, XYZ *move, float *rotate);
     int LineCheck(XYZ *p1, XYZ *p2, XYZ *p, XYZ *move, float *rotate);
-    int LineCheckSlide(XYZ *p1, XYZ *p2, XYZ *p, XYZ *move, float *rotate);
     int LineCheckPossible(XYZ *p1, XYZ *p2, XYZ *p, XYZ *move, float *rotate);
     int LineCheckSlidePossible(XYZ *p1, XYZ *p2, XYZ *p, XYZ *move, float *rotate);
     void UpdateVertexArray();
     void UpdateVertexArrayNoTex();
     void UpdateVertexArrayNoTexNoNorm();
-    bool loadnotex(const char *filename);
-    bool loadraw(char *filename);
-    bool load(const char *filename, bool texture);
-    bool loaddecal(const char *filename, bool texture);
+    bool loadnotex(const std::string& filename);
+    bool loadraw(const std::string& filename);
+    bool load(const std::string& filename, bool texture);
+    bool loaddecal(const std::string& filename, bool texture);
     void Scale(float xscale, float yscale, float zscale);
     void FlipTexCoords();
     void UniformTexCoords();
@@ -144,7 +142,6 @@ public:
     void drawdifftex(GLuint texture);
     void drawdifftex(Texture texture);
     void drawimmediate();
-    void drawdiffteximmediate(GLuint texture);
     void Rotate(float xang, float yang, float zang);
     ~Model();
     void deallocate();