summaryrefslogtreecommitdiffstats
path: root/src/fakerw/fake.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-11-11 09:42:30 +0100
committeraap <aap@papnet.eu>2020-11-11 09:42:30 +0100
commit546ed0ff07cad63cb07612d8aff8d63213f71ecd (patch)
tree3d17be9b2b3767a663d73046477fdf4da4e42dc8 /src/fakerw/fake.cpp
parentFrontend: Scroll for All, some care for PS2-like menu (diff)
downloadre3-546ed0ff07cad63cb07612d8aff8d63213f71ecd.tar
re3-546ed0ff07cad63cb07612d8aff8d63213f71ecd.tar.gz
re3-546ed0ff07cad63cb07612d8aff8d63213f71ecd.tar.bz2
re3-546ed0ff07cad63cb07612d8aff8d63213f71ecd.tar.lz
re3-546ed0ff07cad63cb07612d8aff8d63213f71ecd.tar.xz
re3-546ed0ff07cad63cb07612d8aff8d63213f71ecd.tar.zst
re3-546ed0ff07cad63cb07612d8aff8d63213f71ecd.zip
Diffstat (limited to '')
-rw-r--r--src/fakerw/fake.cpp25
1 files changed, 4 insertions, 21 deletions
diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp
index 58b3277a..64e59375 100644
--- a/src/fakerw/fake.cpp
+++ b/src/fakerw/fake.cpp
@@ -294,32 +294,12 @@ 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 +776,9 @@ RwBool RpWorldPluginAttach(void) {
registerNativeDataPlugin();
registerAtomicRightsPlugin();
registerMaterialRightsPlugin();
+
+ // not sure if this goes here
+ rw::xbox::registerVertexFormatPlugin();
return true;
}