Changes for Jedi Knight 2
This commit is contained in:
parent
f6f7cc380c
commit
8fdd1da938
@ -43,6 +43,8 @@ std::string GetFilePathUserData(const std::string& filename);
|
||||
|
||||
#ifdef TARGET_WIN32
|
||||
|
||||
void GetFileList(const std::string& searchkey, std::vector<std::string> &list);
|
||||
|
||||
template<typename TYPENAME>
|
||||
boost::shared_array<TYPENAME> CreateMemFromFile(const std::string& fileName, cardinal& intCount)
|
||||
{
|
||||
@ -244,6 +246,18 @@ inline std::string GetFileExt(const std::string& filename)
|
||||
|
||||
}
|
||||
|
||||
inline std::string GetFileNameWithoutExt(const std::string& filename)
|
||||
{
|
||||
std::string result = GetFileName(filename);
|
||||
|
||||
std::string::const_iterator i = result.end() - 1;
|
||||
|
||||
while (*i != '.')
|
||||
--i;
|
||||
|
||||
return std::string(result.begin(), i);
|
||||
}
|
||||
|
||||
std::string GetFilePath(const std::string& filename);
|
||||
|
||||
#ifdef TARGET_IOS
|
||||
|
@ -39,7 +39,9 @@ void TFlexModelResource::Serialize(boost::property_tree::ptree& propertyTree)
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_FOREACH(auto& ptree, propertyTree.get_child("Model.SamplerMap"))
|
||||
if (propertyTree.find("Model")->second.find("SamplerMap") != propertyTree.not_found())
|
||||
{
|
||||
BOOST_FOREACH(auto& ptree, propertyTree.get_child("Model.SamplerMap")) //Xperimental - fix it!
|
||||
{
|
||||
if (ptree.first == "Sampler")
|
||||
{
|
||||
@ -50,6 +52,7 @@ void TFlexModelResource::Serialize(boost::property_tree::ptree& propertyTree)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -93,12 +93,22 @@ void TVolumeBody::Rotate(const mat3& r)
|
||||
|
||||
void TVolumeBody::Scale(float s)
|
||||
{
|
||||
throw ErrorToLog("TVolumeBody::Scale not implemented yet!");
|
||||
BOOST_FOREACH(TSmpTriangle& smpTriangle, SmpTriangleArr)
|
||||
{
|
||||
smpTriangle.p[0] *= s;
|
||||
smpTriangle.p[1] *= s;
|
||||
smpTriangle.p[2] *= s;
|
||||
}
|
||||
}
|
||||
|
||||
void TVolumeBody::Scale(const vec3& s)
|
||||
{
|
||||
throw ErrorToLog("TVolumeBody::Scale not implemented yet!");
|
||||
BOOST_FOREACH(TSmpTriangle& smpTriangle, SmpTriangleArr)
|
||||
{
|
||||
smpTriangle.p[0] *= s.v[0];
|
||||
smpTriangle.p[1] *= s.v[1];
|
||||
smpTriangle.p[2] *= s.v[2];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -825,6 +825,7 @@ void FillMemoryWithZero(char* bufferPtr, cardinal bufferSize)
|
||||
|
||||
void TSoundManagerWindows::Update(cardinal dt)
|
||||
{
|
||||
//Xperimental need mutex here
|
||||
std::map<std::string, boost::shared_ptr<TMusicStreamAncestor> >::iterator i;
|
||||
|
||||
for (i = StreamMap.begin(); i != StreamMap.end(); ++i)
|
||||
|
@ -90,6 +90,29 @@ std::string GetFilePathUserData(const std::string& filename)
|
||||
return realFileName;
|
||||
}
|
||||
|
||||
|
||||
#ifdef TARGET_WIN32
|
||||
void GetFileList(const std::string& searchkey, std::vector<std::string> &list)
|
||||
{
|
||||
WIN32_FIND_DATA fd;
|
||||
HANDLE h = FindFirstFile(searchkey.c_str(), &fd);
|
||||
|
||||
if(h == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
||||
list.push_back(fd.cFileName);
|
||||
|
||||
if(FindNextFile(h, &fd) == FALSE)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef TARGET_IOS
|
||||
//Special for IOS -> Foundation.h conflicts with sq_plus.h
|
||||
std::string GetPathToResources()
|
||||
|
Loading…
Reference in New Issue
Block a user