summaryrefslogtreecommitdiffstats
path: root/src/fakerw/fake.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2020-11-12 15:37:04 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2020-11-12 15:37:04 +0100
commit4f8029ad7c76d53f08d9f922d59db32ee27be3f2 (patch)
treed5a34f1f072e70671b33ebbff9b9d875053c6380 /src/fakerw/fake.cpp
parentPeds: Remove redundant lines (diff)
parentfixed zone bug (diff)
downloadre3-4f8029ad7c76d53f08d9f922d59db32ee27be3f2.tar
re3-4f8029ad7c76d53f08d9f922d59db32ee27be3f2.tar.gz
re3-4f8029ad7c76d53f08d9f922d59db32ee27be3f2.tar.bz2
re3-4f8029ad7c76d53f08d9f922d59db32ee27be3f2.tar.lz
re3-4f8029ad7c76d53f08d9f922d59db32ee27be3f2.tar.xz
re3-4f8029ad7c76d53f08d9f922d59db32ee27be3f2.tar.zst
re3-4f8029ad7c76d53f08d9f922d59db32ee27be3f2.zip
Diffstat (limited to 'src/fakerw/fake.cpp')
-rw-r--r--src/fakerw/fake.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp
index 58b3277a..f37e5813 100644
--- a/src/fakerw/fake.cpp
+++ b/src/fakerw/fake.cpp
@@ -294,32 +294,13 @@ RwTextureAddressMode RwTextureGetAddressingV(const RwTexture *texture);
// TODO
void _rwD3D8TexDictionaryEnableRasterFormatConversion(bool enable) { }
-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->unpalettize();
- ras = Raster::createFromImage(img);
- img->destroy();
- return ras;
-}
// hack for reading native textures
RwBool rwNativeTextureHackRead(RwStream *stream, RwTexture **tex, RwInt32 size)
{
*tex = Texture::streamReadNative(stream);
#ifdef LIBRW
- (*tex)->raster = ConvertTexRaster((*tex)->raster);
+ (*tex)->raster = rw::Raster::convertTexToCurrentPlatform((*tex)->raster);
#endif
return *tex != nil;
}
@@ -796,6 +777,9 @@ RwBool RpWorldPluginAttach(void) {
registerNativeDataPlugin();
registerAtomicRightsPlugin();
registerMaterialRightsPlugin();
+
+ // not sure if this goes here
+ rw::xbox::registerVertexFormatPlugin();
return true;
}