summaryrefslogtreecommitdiffstats
path: root/src/fakerw/fake.cpp
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2020-07-25 22:04:59 +0200
committerFilip Gawin <filip.gawin@zoho.com>2020-07-25 22:04:59 +0200
commitb0414c84b9f6afb90626cf8088d7162d27b3bf4f (patch)
treefb940dc86c81467ab6911ef00a859f19b56fa39e /src/fakerw/fake.cpp
parentDisable cache for openal for now (diff)
downloadre3-b0414c84b9f6afb90626cf8088d7162d27b3bf4f.tar
re3-b0414c84b9f6afb90626cf8088d7162d27b3bf4f.tar.gz
re3-b0414c84b9f6afb90626cf8088d7162d27b3bf4f.tar.bz2
re3-b0414c84b9f6afb90626cf8088d7162d27b3bf4f.tar.lz
re3-b0414c84b9f6afb90626cf8088d7162d27b3bf4f.tar.xz
re3-b0414c84b9f6afb90626cf8088d7162d27b3bf4f.tar.zst
re3-b0414c84b9f6afb90626cf8088d7162d27b3bf4f.zip
Diffstat (limited to '')
-rw-r--r--src/fakerw/fake.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp
index ef5f361f..457a6b51 100644
--- a/src/fakerw/fake.cpp
+++ b/src/fakerw/fake.cpp
@@ -855,12 +855,23 @@ RpSkin *RpSkinGeometryGetSkin( RpGeometry *geometry ) { return Skin::get(geometr
RpAtomic *RpSkinAtomicSetHAnimHierarchy( RpAtomic *atomic, RpHAnimHierarchy *hierarchy ) { Skin::setHierarchy(atomic, hierarchy); return atomic; }
RpHAnimHierarchy *RpSkinAtomicGetHAnimHierarchy( const RpAtomic *atomic ) { return Skin::getHierarchy(atomic); }
-
-
-
-
-RwImage *RtBMPImageWrite(RwImage * image, const RwChar * imageName) { rw::writeBMP(image, imageName); return image; }
-RwImage *RtBMPImageRead(const RwChar * imageName) { return rw::readBMP(imageName); }
+RwImage *
+RtBMPImageWrite(RwImage *image, const RwChar *imageName)
+{
+ char *r = (char *)alloca(strlen((char *)imageName) + 2);
+ // Use default path(and pass error handling to librw) if we can't find any match
+ if(!casepath((char *)imageName, r)) r = (char *)imageName;
+ rw::writeBMP(image, r);
+ return image;
+}
+RwImage *
+RtBMPImageRead(const RwChar *imageName)
+{
+ char *r = (char *)alloca(strlen((char *)imageName) + 2);
+ // Use default path(and pass error handling to librw) if we can't find any match
+ if(!casepath((char *)imageName, r)) r = (char *)imageName;
+ return rw::readBMP(r);
+}
#include "rtquat.h"