imrove readme; enable screenshots with F12

This commit is contained in:
aap
2021-02-11 20:51:13 +01:00
parent a6b56e6b7a
commit f3bfdd7857
7 changed files with 143 additions and 31 deletions

View File

@ -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); }

4
src/fakerw/rtpng.h Normal file
View File

@ -0,0 +1,4 @@
#pragma once
RwImage *RtPNGImageWrite(RwImage * image, const RwChar * imageName);
RwImage *RtPNGImageRead(const RwChar * imageName);