/*
This file is part of Universal Modding Engine.
Universal Modding Engine 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 3 of the License, or
(at your option) any later version.
Universal Modding Engine 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 Universal Modding Engine. If not, see .
*/
#include "uMod_Main.h"
AddTextureClass::AddTextureClass(void)
{
Num = 0;
Textures = NULL;
Size = NULL;
Hash = NULL;
WasAdded = NULL;
Len=0;
Add = false;
Force = false;
Loaded = false;
OwnMemory = false;
}
AddTextureClass::~AddTextureClass(void)
{
ReleaseMemory();
}
int AddTextureClass::ReleaseMemory(void)
{
if (OwnMemory)
{
if (Size!=NULL) delete [] Size;
if (Hash!=NULL) delete [] Hash;
if (WasAdded!=NULL) delete [] WasAdded;
if (Textures!=NULL)
{
for (unsigned int i=0; i0)
{
if (GetMemory( Textures[i], tex.Size[i])) return -1;
for (unsigned int j=0u; j