X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FSkybox.cpp;h=811029ae92b9757704b579ec04128e0798f637a3;hb=1aef858f5ecb3dc8fd816e0155635371ed3632f2;hp=4c466282c42f9b3fa76dec037a5ba69846288196;hpb=36cc3af3e5074215817ddee16defde754e2ad67f;p=lugaru.git diff --git a/Source/Skybox.cpp b/Source/Skybox.cpp index 4c46628..811029a 100644 --- a/Source/Skybox.cpp +++ b/Source/Skybox.cpp @@ -1,4 +1,25 @@ -#include "skybox.h" +/* +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 "Skybox.h" #include "Game.h" extern float viewdistance; @@ -13,7 +34,7 @@ extern float skyboxg; extern float skyboxb; extern int tutoriallevel; -bool SkyBox::load( char *ffront,char *fleft,char *fback,char *fright,char *fup,char *fdown,char *fcloud,char *freflect) +bool SkyBox::load( const char *ffront,const char *fleft,const char *fback,const char *fright,const char *fup,const char *fdown,const char *fcloud,const char *freflect) { /* static GLuint type; unsigned char fileNamep[256]; @@ -347,13 +368,13 @@ SkyBox::SkyBox() } SkyBox::~SkyBox() { - if (front) glDeleteTextures( 1, (const unsigned long *)&front ); - if (left) glDeleteTextures( 1, (const unsigned long *)&left ); - if (back) glDeleteTextures( 1, (const unsigned long *)&back ); - if (right) glDeleteTextures( 1, (const unsigned long *)&right ); - if (up) glDeleteTextures( 1, (const unsigned long *)&up ); - if (down) glDeleteTextures( 1, (const unsigned long *)&down ); - if (cloud) glDeleteTextures( 1, (const unsigned long *)&cloud ); - if (reflect) glDeleteTextures( 1, (const unsigned long *)&reflect ); + if (front) glDeleteTextures( 1, &front ); + if (left) glDeleteTextures( 1, &left ); + if (back) glDeleteTextures( 1, &back ); + if (right) glDeleteTextures( 1, &right ); + if (up) glDeleteTextures( 1, &up ); + if (down) glDeleteTextures( 1, &down ); + if (cloud) glDeleteTextures( 1, &cloud ); + if (reflect) glDeleteTextures( 1, &reflect ); };