1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Working on installer, fixing more Win32 issues

Throwing error on member references with ".." cascade token outside invocations (ie: "ts..mA = 123")
Fixed 'Thread.ModuleTLSIndex' error - which caused us TLS lookup failures in Beef DLLs
Fixed some hotswap errors
Made BeefPerf shut down properly
Fixed an 'int literal' FixIntUnknown issue where rhs was System.Object which caused an illegal boxing
Fixed COFF::LocateSymbol issues with Win32 and also with linking to static libraries - showed up with hot-linking in fmod when hot-adding a floating point mod
Fixed a couple memory leaks
Fixed alignment issue in COFF::ParseCompileUnit
This commit is contained in:
Brian Fiete 2019-09-02 17:39:47 -07:00
parent aad0a640c5
commit b63a243fd7
73 changed files with 2474 additions and 293 deletions

View file

@ -101,10 +101,22 @@ VertexDefinition* Beefy::RenderDevice::CreateVertexDefinition(VertexDefData* ele
Texture* RenderDevice::LoadTexture(const StringImpl& fileName, int flags)
{
int dotPos = (int)fileName.LastIndexOf('.');
String ext = fileName.Substring(dotPos);
String ext;
if (dotPos != -1)
ext = fileName.Substring(dotPos);
ImageData* imageData = NULL;
if (ext == ".tga")
bool handled = false;
bool failed = false;
if (fileName == "!white")
{
imageData = new ImageData();
imageData->CreateNew(1, 1, true);
imageData->mBits[0] = 0xFFFFFFFF;
handled = true;
}
else if (ext == ".tga")
imageData = new TGAData();
else if (ext == ".png")
imageData = new PNGData();
@ -117,22 +129,20 @@ Texture* RenderDevice::LoadTexture(const StringImpl& fileName, int flags)
BF_FATAL("Unknown texture format");
return NULL; // Unknown format
}
imageData->mWantsAlphaPremultiplied = (flags & TextureFlag_NoPremult) == 0;
if (!handled)
{
imageData->mWantsAlphaPremultiplied = (flags & TextureFlag_NoPremult) == 0;
if (!imageData->LoadFromFile(fileName))
{
failed = true;
BF_FATAL("Failed to load image");
}
}
Texture* aTexture = NULL;
if (imageData->LoadFromFile(fileName))
{
// if ((int)fileName.IndexOf("fft") != -1)
// {
// BFIData bFIData;
// bFIData.Compress(imageData);
// }
if (!failed)
aTexture = LoadTexture(imageData, flags);
}
else
BF_FATAL("Failed to load image");
delete imageData;
return aTexture;