diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-02-12 04:31:38 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-02-12 04:31:38 +0100 |
commit | a3a5e5b824c234011b76deaa2daf014402bada75 (patch) | |
tree | 231106453aa31f1924af43fc1c0687615e478559 /src/fakerw/fake.cpp | |
parent | Merge branch 'master' of https://github.com/IlDucci/re3 (diff) | |
parent | Merge branch 'master' of github.com:GTAmodding/re3 (diff) | |
download | re3-a3a5e5b824c234011b76deaa2daf014402bada75.tar re3-a3a5e5b824c234011b76deaa2daf014402bada75.tar.gz re3-a3a5e5b824c234011b76deaa2daf014402bada75.tar.bz2 re3-a3a5e5b824c234011b76deaa2daf014402bada75.tar.lz re3-a3a5e5b824c234011b76deaa2daf014402bada75.tar.xz re3-a3a5e5b824c234011b76deaa2daf014402bada75.tar.zst re3-a3a5e5b824c234011b76deaa2daf014402bada75.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); } |