]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Objects.h
major refactor of texture system
[lugaru.git] / Source / Objects.h
index a73d670f74244ce2c5337534479a5893f0feb2cb..a99c646f7e445b240629d0a59f660cc67c999c2d 100644 (file)
@@ -1,3 +1,24 @@
+/*
+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.
+
+This program 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.
+
+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.
+*/
+
 #ifndef _OBJECTS_H_
 #define _OBJECTS_H_
 
@@ -9,7 +30,8 @@
 #include "Lights.h"
 #include "Models.h"
 #include "Terrain.h"
-#include "Sprites.h"
+#include "Sprite.h"
+#include "Texture.h"
 #include <vector>
 //
 // Model Structures
@@ -38,8 +60,8 @@ public:
        float radius;
        XYZ position[max_objects];
        int type[max_objects];
-       float rotation[max_objects];
-       float rotation2[max_objects];
+       float yaw[max_objects];
+       float pitch[max_objects];
        float rotx[max_objects];
        float rotxvel[max_objects];
        float roty[max_objects];
@@ -52,10 +74,10 @@ public:
        float scale[max_objects];
        float messedwith[max_objects];
        float checked[max_objects];
-       GLuint  boxtextureptr;
-       GLuint  treetextureptr;
-       GLuint  bushtextureptr;
-       GLuint  rocktextureptr;
+       Texture boxtextureptr;
+       Texture treetextureptr;
+       Texture bushtextureptr;
+       Texture rocktextureptr;
        float shadowed[max_objects];
        float occluded[max_objects];
        bool checkcollide(XYZ startpoint, XYZ endpoint,int which);
@@ -64,8 +86,8 @@ public:
 
        void SphereCheckPossible(XYZ *p1,float radius);
        void DeleteObject(int which);
-       void MakeObject(int atype, XYZ where, float arotation, float ascale);
-       void MakeObject(int atype, XYZ where, float arotation, float arotation2, float ascale);
+       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();
@@ -75,3 +97,4 @@ public:
 };
 
 #endif
+