]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Objects.cpp
Cleanning up Sprite class. More can be done, but it's already prettier.
[lugaru.git] / Source / Objects.cpp
index 9bf8397e05b39ad95d55ef5e7ec67234a572790a..3317992d97d8553b00fffbe3f2999a2450bdd048 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.
+*/
+
 #include "Objects.h"
 extern XYZ viewer;
 extern float viewdistance;
@@ -17,7 +38,6 @@ extern float blurness;
 extern float windvar;
 extern float playerdist;
 extern bool skyboxtexture;
-extern Sprites sprites;
 
 //Functions
 
@@ -643,7 +663,7 @@ void Objects::DoStuff()
        XYZ spawnpoint;
        for(int i=0;i<numobjects;i++){
                /*if(type[i]==firetype){
-               sprites.MakeSprite(weaponshinesprite, position[i],position[i]*0, 1,1,1, 5, 1);
+               Sprite::MakeSprite(weaponshinesprite, position[i],position[i]*0, 1,1,1, 5, 1);
                }*/
 
                if(type[i]==firetype)onfire[i]=1;
@@ -659,7 +679,7 @@ void Objects::DoStuff()
                                        spawnpoint.z=0;
                                        spawnpoint=DoRotation(spawnpoint,0,Random()%360,0);
                                        spawnpoint+=position[i];
-                                       sprites.MakeSprite(flamesprite, spawnpoint,spawnpoint*0, 1,1,1, (.6+(float)abs(Random()%100)/200-.25)*5*scale[i], 1);
+                                       Sprite::MakeSprite(flamesprite, spawnpoint,spawnpoint*0, 1,1,1, (.6+(float)abs(Random()%100)/200-.25)*5*scale[i], 1);
                                }
                                if(type[i]==treeleavestype){
                                        spawnpoint.x=((float)(Random()%100))/80*scale[i];
@@ -667,7 +687,7 @@ void Objects::DoStuff()
                                        spawnpoint.z=0;
                                        spawnpoint=DoRotation(spawnpoint,0,Random()%360,0);
                                        spawnpoint+=position[i];
-                                       sprites.MakeSprite(flamesprite, spawnpoint,spawnpoint*0, 1,1,1, (.6+(float)abs(Random()%100)/200-.25)*6, 1);
+                                       Sprite::MakeSprite(flamesprite, spawnpoint,spawnpoint*0, 1,1,1, (.6+(float)abs(Random()%100)/200-.25)*6, 1);
                                }
                        }