* 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.
This commit is contained in:
code@koerner-de.net
2013-01-07 07:43:38 +00:00
parent 2593729634
commit 601c8c1504
34 changed files with 1523 additions and 1237 deletions
+31 -31
View File
@@ -31,42 +31,42 @@ class uMod_TreeViewNode
{
public:
uMod_TreeViewNode( uMod_TreeViewNode* parent, uMod_ModElement *element) : myParent(parent), myElement(element)
{
myElement->AddRef();
}
~uMod_TreeViewNode()
{
// free all our children nodes
size_t count = myChildren.GetCount();
for (size_t i = 0; i < count; i++)
{
myElement->AddRef();
uMod_TreeViewNode *child = myChildren[i];
delete child;
}
myElement->Release();
}
~uMod_TreeViewNode()
{
// free all our children nodes
size_t count = myChildren.GetCount();
for (size_t i = 0; i < count; i++)
{
uMod_TreeViewNode *child = myChildren[i];
delete child;
}
myElement->Release();
}
bool IsContainer() const {if (myElement->Type() == uMod_ModElement::Group) return true; else return false;}
bool IsContainer() const {if (myElement->Type() == uMod_ModElement::Group) return true; else return false;}
uMod_TreeViewNode* GetParent() {return myParent;}
uMod_TreeViewNode* GetParent() {return myParent;}
uMod_TreeViewNode_ArrayPtr& GetChildren() {return myChildren;}
uMod_TreeViewNode_ArrayPtr& GetChildren() {return myChildren;}
uMod_TreeViewNode* GetNthChild( unsigned int n ) {return myChildren.Item( n);}
uMod_TreeViewNode* GetNthChild( unsigned int n ) {return myChildren.Item( n);}
void Insert( uMod_TreeViewNode* child, unsigned int n) {myChildren.Insert( child, n);}
void Insert( uMod_TreeViewNode* child, unsigned int n) {myChildren.Insert( child, n);}
void Append( uMod_TreeViewNode* child ) {myChildren.Add( child );}
void Append( uMod_TreeViewNode* child ) {myChildren.Add( child );}
unsigned int GetChildCount() const {return myChildren.GetCount();}
unsigned int GetChildCount() const {return myChildren.GetCount();}
public: // public to avoid getters/setters
uMod_ModElement *myElement;
uMod_ModElement *myElement;
//private:
uMod_TreeViewNode* myParent;
uMod_TreeViewNode_ArrayPtr myChildren;
uMod_TreeViewNode* myParent;
uMod_TreeViewNode_ArrayPtr myChildren;
};
@@ -81,7 +81,7 @@ public:
virtual unsigned int GetColumnCount() const
{
return 5;
return 5;
}
virtual wxString GetColumnType( unsigned int col ) const
@@ -108,14 +108,14 @@ public:
// implementation of uMod functions
int CreateSingleNode(void);
int AddPackage(const wxString &file_name);
int AddPackages(const wxArrayString &files);
int AddPackagesFromTemplate(const wxArrayString &packages);
int DeletePackage( const wxDataViewItem &item);
int DeletePackages( const wxDataViewItemArray &item);
int DeleteAllPackages(void);
int AddPackage(const wxString &file_name, const wxString &extract_path);
int AddPackages(const wxArrayString &files, const wxString &extract_path);
int AddPackagesFromTemplate(const wxArrayString &packages, const wxString &extract_path);
int DeletePackage( const wxDataViewItem &item, bool delete_files_on_disk = false);
int DeletePackages( const wxDataViewItemArray &item, bool delete_files_on_disk = false);
int DeleteAllPackages( bool delete_files_on_disk = false);
int DeleteFileOfPackage(uMod_TreeViewNode *node);
int GetActiveTexture( uMod_TextureElement_SortedArrayPtr &texture);