1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Additional 3d support

This commit is contained in:
Brian Fiete 2021-05-12 07:24:29 -04:00
parent 70680fdf39
commit f26df6c86b
32 changed files with 2370 additions and 165 deletions

View file

@ -943,6 +943,21 @@ char* Beefy::LoadTextData(const StringImpl& path, int* size)
return data;
}
bool Beefy::LoadTextData(const StringImpl& path, StringImpl& str)
{
int size = 0;
char* data = LoadTextData(path, &size);
if (data == NULL)
return false;
if ((str.mAllocSizeAndFlags & StringImpl::DynAllocFlag) != 0)
str.Release();
str.mPtr = data;
str.mAllocSizeAndFlags = size | StringImpl::DynAllocFlag | StringImpl::StrPtrFlag;
str.mLength = size;
return true;
}
#ifdef BF_MINGW
unsigned long long __cdecl _byteswap_uint64(unsigned long long _Int64)
{
@ -1262,4 +1277,5 @@ bool Beefy::RecursiveDeleteDirectory(const StringImpl& dirPath)
void Beefy::BFFatalError(const char* message, const char* file, int line)
{
BFFatalError(String(message), String(file), line);
}
}