]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Objects.h
Using at() instead of operator[] in currentFrame to get more precise crashes
[lugaru.git] / Source / Objects.h
index 4d35552acd773694affea99fd543070c06ca2467..8b5f5929af800794c694b7aa9634c0a1184e006d 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 _OBJECTS_H_
@@ -24,13 +23,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "Quaternions.h"
 #include "gamegl.h"
-#include "TGALoader.h"
+#include "ImageIO.h"
 #include "Quaternions.h"
 #include "Frustum.h"
 #include "Lights.h"
 #include "Models.h"
 #include "Terrain.h"
 #include "Sprite.h"
+#include "Texture.h"
 #include <vector>
 //
 // Model Structures
@@ -53,46 +53,47 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #define firetype 13
 
 
-class Objects{
+class Objects
+{
 public:
-       XYZ center;
-       float radius;
-       XYZ position[max_objects];
-       int type[max_objects];
-       float yaw[max_objects];
-       float pitch[max_objects];
-       float rotx[max_objects];
-       float rotxvel[max_objects];
-       float roty[max_objects];
-       float rotyvel[max_objects];
-       int numobjects;
-       bool possible[max_objects];
-       Model model[max_objects];
-       Model displaymodel[max_objects];
-       float friction[max_objects];
-       float scale[max_objects];
-       float messedwith[max_objects];
-       float checked[max_objects];
-       GLuint  boxtextureptr;
-       GLuint  treetextureptr;
-       GLuint  bushtextureptr;
-       GLuint  rocktextureptr;
-       float shadowed[max_objects];
-       float occluded[max_objects];
-       bool checkcollide(XYZ startpoint, XYZ endpoint,int which);
-       bool onfire[max_objects];
-       float flamedelay[max_objects];
+    XYZ center;
+    float radius;
+    XYZ position[max_objects];
+    int type[max_objects];
+    float yaw[max_objects];
+    float pitch[max_objects];
+    float rotx[max_objects];
+    float rotxvel[max_objects];
+    float roty[max_objects];
+    float rotyvel[max_objects];
+    int numobjects;
+    bool possible[max_objects];
+    Model model[max_objects];
+    Model displaymodel[max_objects];
+    float friction[max_objects];
+    float scale[max_objects];
+    float messedwith[max_objects];
+    float checked[max_objects];
+    Texture boxtextureptr;
+    Texture treetextureptr;
+    Texture bushtextureptr;
+    Texture rocktextureptr;
+    float shadowed[max_objects];
+    float occluded[max_objects];
+    bool checkcollide(XYZ startpoint, XYZ endpoint, int which);
+    bool onfire[max_objects];
+    float flamedelay[max_objects];
 
-       void SphereCheckPossible(XYZ *p1,float radius);
-       void DeleteObject(int which);
-       void MakeObject(int atype, XYZ where, float ayaw, float ascale);
-       void MakeObject(int atype, XYZ where, float ayaw, float apitch, float ascale);
-       void Draw();
-       void DoShadows();
-       void DoStuff();
+    void SphereCheckPossible(XYZ *p1, float radius);
+    void DeleteObject(int which);
+    void MakeObject(int atype, XYZ where, float ayaw, float ascale);
+    void MakeObject(int atype, XYZ where, float ayaw, float apitch, float ascale);
+    void Draw();
+    void DoShadows();
+    void DoStuff();
 
-       Objects();
-       ~Objects();
+    Objects();
+    ~Objects();
 };
 
 #endif