16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 17:09:19 +02:00

Dalsze poprawki do AnsiString w różnych plikach.

This commit is contained in:
firleju
2016-10-23 22:34:32 +02:00
parent 89756e81a1
commit 28d5be7363
18 changed files with 82 additions and 62 deletions

View File

@@ -20,6 +20,7 @@ http://mozilla.org/MPL/2.0/.
#include "MdlMngr.h"
#include "Globals.h"
#include <string>
#define SeekFiles AnsiString("*.t3d")
@@ -99,7 +100,7 @@ TModel3d * TModelsManager::GetModel(const char *Name, bool dynamic)
// - niebo animowane, œcie¿ka brana ze wpisu, tekstury nieokreœlone
// - wczytanie modelu animowanego - Init() - sprawdziæ
char buf[255];
AnsiString buftp = Global::asCurrentTexturePath; // zapamiêtanie aktualnej œcie¿ki do tekstur,
std::string buftp = Global::asCurrentTexturePath; // zapamiêtanie aktualnej œcie¿ki do tekstur,
// bo bêdzie tyczmasowo zmieniana
/*
// Ra: niby tak jest lepiej, ale dzia³a gorzej, wiêc przywrócone jest oryginalne
@@ -148,9 +149,9 @@ TModel3d * TModelsManager::GetModel(const char *Name, bool dynamic)
strcat(buf, Name);
if (strchr(Name, '/') != NULL)
{
Global::asCurrentTexturePath = Global::asCurrentTexturePath + AnsiString(Name);
Global::asCurrentTexturePath.Delete(Global::asCurrentTexturePath.Pos("/") + 1,
Global::asCurrentTexturePath.Length());
Global::asCurrentTexturePath = Global::asCurrentTexturePath + Name;
Global::asCurrentTexturePath.erase(Global::asCurrentTexturePath.find("/") + 1,
Global::asCurrentTexturePath.length());
}
}
else
@@ -159,9 +160,9 @@ TModel3d * TModelsManager::GetModel(const char *Name, bool dynamic)
if (dynamic) // na razie tak, bo nie wiadomo, jaki mo¿e mieæ wp³yw na pozosta³e modele
if (strchr(Name, '/') != NULL)
{ // pobieranie tekstur z katalogu, w którym jest model
Global::asCurrentTexturePath = Global::asCurrentTexturePath + AnsiString(Name);
Global::asCurrentTexturePath.Delete(Global::asCurrentTexturePath.Pos("/") + 1,
Global::asCurrentTexturePath.Length());
Global::asCurrentTexturePath = Global::asCurrentTexturePath + Name;
Global::asCurrentTexturePath.erase(Global::asCurrentTexturePath.find("/") + 1,
Global::asCurrentTexturePath.length() - 1);
}
}
StrLower(buf);