X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FWeapons.cpp;h=a7d587fca88a1d2958683a620563d373cd89f4ff;hb=e724a1c4bd1f94b55ac1331bedd32c51eebb08d9;hp=2f6a1ffd65106ed999e25df90608104433b89347;hpb=9e06cb73424ca3f0eb971350c5dfb3cdaec0d5bf;p=lugaru.git diff --git a/Source/Weapons.cpp b/Source/Weapons.cpp index 2f6a1ff..a7d587f 100644 --- a/Source/Weapons.cpp +++ b/Source/Weapons.cpp @@ -54,17 +54,17 @@ extern int tutoriallevel; extern int numthrowkill; Model Weapon::throwingknifemodel; -GLuint Weapon::knifetextureptr = 0; -GLuint Weapon::lightbloodknifetextureptr = 0; -GLuint Weapon::bloodknifetextureptr = 0; +Texture Weapon::knifetextureptr; +Texture Weapon::lightbloodknifetextureptr; +Texture Weapon::bloodknifetextureptr; Model Weapon::swordmodel; -GLuint Weapon::swordtextureptr = 0; -GLuint Weapon::lightbloodswordtextureptr = 0; -GLuint Weapon::bloodswordtextureptr = 0; +Texture Weapon::swordtextureptr; +Texture Weapon::lightbloodswordtextureptr; +Texture Weapon::bloodswordtextureptr; Model Weapon::staffmodel; -GLuint Weapon::stafftextureptr = 0; +Texture Weapon::stafftextureptr; Weapon::Weapon(int t, int o) : owner(o) { setType(t); @@ -1073,12 +1073,12 @@ Weapons::Weapons() Weapons::~Weapons() { - if (Weapon::stafftextureptr) glDeleteTextures( 1, &Weapon::stafftextureptr ); - if (Weapon::knifetextureptr) glDeleteTextures( 1, &Weapon::knifetextureptr ); - if (Weapon::lightbloodknifetextureptr) glDeleteTextures( 1, &Weapon::lightbloodknifetextureptr ); - if (Weapon::bloodknifetextureptr) glDeleteTextures( 1, &Weapon::bloodknifetextureptr ); - if (Weapon::swordtextureptr) glDeleteTextures( 1, &Weapon::swordtextureptr ); - if (Weapon::lightbloodswordtextureptr) glDeleteTextures( 1, &Weapon::lightbloodswordtextureptr ); - if (Weapon::bloodswordtextureptr) glDeleteTextures( 1, &Weapon::bloodswordtextureptr ); + Weapon::stafftextureptr.destroy(); + Weapon::knifetextureptr.destroy(); + Weapon::lightbloodknifetextureptr.destroy(); + Weapon::bloodknifetextureptr.destroy(); + Weapon::swordtextureptr.destroy(); + Weapon::lightbloodswordtextureptr.destroy(); + Weapon::bloodswordtextureptr.destroy(); }