- append '\0' at the end of game name (dll injection)
- Release() fake texture (if force reload) instead of calling RemoveTexture(..)

Improvements:
- template support, you can now have more than one template set one of them as default.
- update function will only update the texture if this is needed or the reload button is pressed.
- textures will also be removed, if they are removed from the package list.
This commit is contained in:
code@koerner-de.net
2011-10-13 19:01:16 +00:00
parent ef57e3f86f
commit b2bade7ff8
34 changed files with 1544 additions and 562 deletions
+5 -11
View File
@@ -22,10 +22,8 @@ along with OpenTexMod. If not, see <http://www.gnu.org/licenses/>.
OTM_GameInfo::OTM_GameInfo(const wxString &name)
OTM_GameInfo::OTM_GameInfo(void)
{
Name = name;
Checked = NULL;
NumberOfChecked = 0;
LengthOfChecked = 0;
@@ -56,12 +54,10 @@ void OTM_GameInfo::Init(void)
int OTM_GameInfo::SaveToFile( const wxString &file_name)
{
wxString name;
name << "OTM_GameSave_" << file_name << ".txt";
wxFile file;
//if (!file.Access(name, wxFile::write)) return -1;
file.Open(name, wxFile::write);
file.Open(file_name, wxFile::write);
if (!file.IsOpened()) {return -1;}
wxString content;
@@ -122,13 +118,11 @@ int OTM_GameInfo::SaveToFile( const wxString &file_name)
int OTM_GameInfo::LoadFromFile( const wxString &file_name)
{
Init();
if (file_name.Len()==0) return -1;
wxString name;
name << "OTM_GameSave_" << file_name << ".txt";
wxFile file;
if (!file.Access(name, wxFile::read)) return -1;
file.Open(name, wxFile::read);
if (!file.Access(file_name, wxFile::read)) return -1;
file.Open(file_name, wxFile::read);
if (!file.IsOpened()) {return -1;}
unsigned len = file.Length();