summaryrefslogtreecommitdiffstats
path: root/src/fakerw/fake.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-02-12 04:31:38 +0100
committerSergeanur <s.anureev@yandex.ua>2021-02-12 04:31:38 +0100
commita3a5e5b824c234011b76deaa2daf014402bada75 (patch)
tree231106453aa31f1924af43fc1c0687615e478559 /src/fakerw/fake.cpp
parentMerge branch 'master' of https://github.com/IlDucci/re3 (diff)
parentMerge branch 'master' of github.com:GTAmodding/re3 (diff)
downloadre3-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.cpp37
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); }