Files
gMod/uMod_GUI/uMod_ModElement.cpp
T
code@koerner-de.net 601c8c1504 Changes:
* The hash of textures is now computed the first time they are used. The hash is recomputed if the content might have changed.
* In some games, textures are used as rendering targets (e.g. a mirror or a portal in Portal). The hash calculation of these textures might slow down the game.
-> there is an option to disable the computation of hashes for rendering targets.
* Enable or Disable the support of tpf mods affect now the game immediately.
* Little rearrangements in the GUI.
* uMod can now extract the content of mods to disk and the game loads the textures from there. This solves the huge memory problem of uMod.
2013-01-07 07:43:38 +00:00

42 lines
678 B
C++

/*
* uMod_ModElement.cpp
*
* Created on: 26.06.2012
* Author: marts
*/
#include "uMod_Main.h"
int uMod_ModElement::Release()
{
if (--myCounter==0)
{
delete this;
return 0;
}
else
return myCounter;
}
void uMod_TextureElement::DeleteFileOnDisk(void)
{
//wxMessageBox(myExtractedFile, "here");
if (!myExtractedFile.IsEmpty())
if (wxFileExists(myExtractedFile))
wxRemoveFile(myExtractedFile);
}
int Compare_uMod_TextureElement(uMod_TextureElement* a,uMod_TextureElement* b)
{
if ( a->Hash() < b->Hash()) return -1;
else if ( a->Hash() == b->Hash()) return 0;
else return +1;
}