diff options
author | aap <aap@papnet.eu> | 2020-04-27 20:56:44 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-04-27 20:56:44 +0200 |
commit | f399fd105038b70285d6829c1933873c72d2af15 (patch) | |
tree | c0f22620b19168fd831a102a2bcabaa79b2fe131 /src/fakerw | |
parent | Merge branch 'master' of github.com:gtamodding/re3 (diff) | |
download | re3-f399fd105038b70285d6829c1933873c72d2af15.tar re3-f399fd105038b70285d6829c1933873c72d2af15.tar.gz re3-f399fd105038b70285d6829c1933873c72d2af15.tar.bz2 re3-f399fd105038b70285d6829c1933873c72d2af15.tar.lz re3-f399fd105038b70285d6829c1933873c72d2af15.tar.xz re3-f399fd105038b70285d6829c1933873c72d2af15.tar.zst re3-f399fd105038b70285d6829c1933873c72d2af15.zip |
Diffstat (limited to '')
-rw-r--r-- | src/fakerw/fake.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp index 26b5ae3d..ccc7635f 100644 --- a/src/fakerw/fake.cpp +++ b/src/fakerw/fake.cpp @@ -294,6 +294,14 @@ static rw::Raster* ConvertTexRaster(rw::Raster *ras) { using namespace rw; + + if(ras->platform == rw::platform) + return ras; + // compatible platforms + if(ras->platform == PLATFORM_D3D8 && rw::platform == PLATFORM_D3D9 || + ras->platform == PLATFORM_D3D9 && rw::platform == PLATFORM_D3D8) + return ras; + Image *img = ras->toImage(); ras->destroy(); img->unindex(); @@ -306,9 +314,7 @@ ConvertTexRaster(rw::Raster *ras) RwBool rwNativeTextureHackRead(RwStream *stream, RwTexture **tex, RwInt32 size) { *tex = Texture::streamReadNative(stream); -#ifdef RW_GL3 - if(strcmp((*tex)->name, "copnu") == 0) - tex = tex; +#ifdef LIBRW (*tex)->raster = ConvertTexRaster((*tex)->raster); #endif return *tex != nil; @@ -830,4 +836,10 @@ RwBool RtCharsetDestroy(RtCharset * charSet) { charSet->destroy(); return // fake shit -RwInt32 _rwD3D8FindCorrectRasterFormat(RwRasterType type, RwInt32 flags) { return 1; } +RwInt32 _rwD3D8FindCorrectRasterFormat(RwRasterType type, RwInt32 flags) +{ +#ifdef RW_GL3 + return '3LGO'; +#endif + return flags & 0xF00; +} |