* Fix identation.
[matthijs/ABM2.git] / ABM2 / Amaltheia / Sprite.cpp
index a8c10a869d2c171150f070118ec695f499d43064..2eef2408b162f98ee93a90a1658c2f92e4158abb 100644 (file)
@@ -22,7 +22,6 @@
 #include <GL/gl.h>
 
 
-Graphics *gr;
 float z_order = 1.0;
 
 
@@ -42,14 +41,14 @@ void Sprite::glEnter2DMode()
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 //    glBlendFunc(GL_SRC_ALPHA, GL_ONE);
 
-       glViewport(0, 0, gr->getWidth(), gr->getHeight());
+       glViewport(0, 0, this->g->getWidth(), this->g->getHeight());
 
        glMatrixMode(GL_PROJECTION);
        glPushMatrix();
        glLoadIdentity();
 
-       glOrtho(0.0, (GLdouble)gr->getWidth(), (GLdouble)gr->getHeight(), 0.0, 0.0, -2.0);
-//     gluOrtho2D(0.0, (GLdouble)gr->getWidth(), (GLdouble)gr->getHeight(), 0.0);
+       glOrtho(0.0, (GLdouble)this->g->getWidth(), (GLdouble)this->g->getHeight(), 0.0, 0.0, -2.0);
+//     gluOrtho2D(0.0, (GLdouble)this->g->getWidth(), (GLdouble)this->g->getHeight(), 0.0);
        
        glMatrixMode(GL_MODELVIEW);
        glPushMatrix();
@@ -78,8 +77,8 @@ Sprite::Sprite( char * filename, colour key, int tw, int th, Graphics *g)
        tileHeight=th;
        
        glAlphaFunc(GL_NOTEQUAL, 0);
-               glEnable(GL_ALPHA_TEST);
-               tex = new Texture(filename, key, g);
+       glEnable(GL_ALPHA_TEST);
+       tex = new Texture(filename, key, g);
 
        texW = tex->getWidth();
        texH = tex->getHeight();