diff options
author | aap <aap@papnet.eu> | 2021-02-11 20:51:13 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2021-02-12 00:06:54 +0100 |
commit | f3bfdd78571f9335f2274b047b127747457a8e79 (patch) | |
tree | f81772ce8d40f5956bb2677c1dd6e0826eb11e3f /src/fakerw/fake.cpp | |
parent | Merge remote-tracking branch 'origin/master' (diff) | |
download | re3-f3bfdd78571f9335f2274b047b127747457a8e79.tar re3-f3bfdd78571f9335f2274b047b127747457a8e79.tar.gz re3-f3bfdd78571f9335f2274b047b127747457a8e79.tar.bz2 re3-f3bfdd78571f9335f2274b047b127747457a8e79.tar.lz re3-f3bfdd78571f9335f2274b047b127747457a8e79.tar.xz re3-f3bfdd78571f9335f2274b047b127747457a8e79.tar.zst re3-f3bfdd78571f9335f2274b047b127747457a8e79.zip |
Diffstat (limited to 'src/fakerw/fake.cpp')
-rw-r--r-- | src/fakerw/fake.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp index 366dcf3e..1d4c881f 100644 --- a/src/fakerw/fake.cpp +++ b/src/fakerw/fake.cpp @@ -945,6 +945,43 @@ RtBMPImageRead(const RwChar *imageName) #endif } + +RwImage * +RtPNGImageWrite(RwImage *image, const RwChar *imageName) +{ +#ifndef _WIN32 + char *r = casepath(imageName); + if (r) { + rw::writePNG(image, r); + free(r); + } else { + rw::writePNG(image, imageName); + } + +#else + rw::writePNG(image, imageName); +#endif + return image; +} +RwImage * +RtPNGImageRead(const RwChar *imageName) +{ +#ifndef _WIN32 + RwImage *image; + char *r = casepath(imageName); + if (r) { + image = rw::readPNG(r); + free(r); + } else { + image = rw::readPNG(imageName); + } + return image; + +#else + return rw::readPNG(imageName); +#endif +} + #include "rtquat.h" RtQuat *RtQuatRotate(RtQuat * quat, const RwV3d * axis, RwReal angle, RwOpCombineType combineOp) { return (RtQuat*)((rw::Quat*)quat)->rotate(axis, angle/180.0f*3.14159f, (CombineOp)combineOp); } |