From 3b1400eaed86f2a89f85f6d9802505a0e2e88985 Mon Sep 17 00:00:00 2001 From: erorcun Date: Mon, 4 Jan 2021 16:28:30 +0300 Subject: Fixes from miami Entity/Physical proof-read 1 --- src/fakerw/fake.cpp | 2 +- src/fakerw/rwplcore.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/fakerw') diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp index a3b9258b..6585032b 100644 --- a/src/fakerw/fake.cpp +++ b/src/fakerw/fake.cpp @@ -14,7 +14,7 @@ using namespace rw; RwUInt8 RwObjectGetType(const RwObject *obj) { return obj->type; } - +RwFrame* rwObjectGetParent(const RwObject *obj) { return (RwFrame*)obj->parent; } void *RwMalloc(size_t size) { return engine->memfuncs.rwmalloc(size, 0); } void *RwCalloc(size_t numObj, size_t sizeObj) { diff --git a/src/fakerw/rwplcore.h b/src/fakerw/rwplcore.h index 511f7678..69c921cc 100644 --- a/src/fakerw/rwplcore.h +++ b/src/fakerw/rwplcore.h @@ -108,12 +108,12 @@ enum RwCorePluginID //struct RwObject; typedef rw::Object RwObject; +typedef rw::Frame RwFrame; typedef RwObject *(*RwObjectCallBack)(RwObject *object, void *data); RwUInt8 RwObjectGetType(const RwObject *obj); - - +RwFrame* rwObjectGetParent(const RwObject *obj); #define rwsprintf sprintf #define rwvsprintf vsprintf -- cgit v1.2.3 From 5a47379bf5f011a65c1d0f88a0cb5f2130feb9db Mon Sep 17 00:00:00 2001 From: erorcun Date: Sat, 16 Jan 2021 16:44:59 +0300 Subject: Includes overhaul, fix some compiler warnings --- src/fakerw/fake.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/fakerw') diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp index 6585032b..c1150931 100644 --- a/src/fakerw/fake.cpp +++ b/src/fakerw/fake.cpp @@ -1,5 +1,5 @@ #define _CRT_SECURE_NO_WARNINGS -#define WITH_D3D +#define WITH_D3D // not WITHD3D, so it's librw define #include #include #include -- cgit v1.2.3 From c67273e92a60e50d67d8146f6a150a5b39a2a641 Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 21 Jan 2021 22:30:20 +0100 Subject: fixed anisotropic filtering; updated librw --- src/fakerw/fake.cpp | 9 +++++++++ src/fakerw/rpanisot.h | 6 ++++++ 2 files changed, 15 insertions(+) create mode 100644 src/fakerw/rpanisot.h (limited to 'src/fakerw') diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp index c1150931..366dcf3e 100644 --- a/src/fakerw/fake.cpp +++ b/src/fakerw/fake.cpp @@ -962,3 +962,12 @@ RtCharset *RtCharsetSetColors(RtCharset * charSet, const RwRGBA * foreGround, RtCharset *RtCharsetGetDesc(RtCharset * charset, RtCharsetDesc * desc) { *desc = charset->desc; return charset; } RtCharset *RtCharsetCreate(const RwRGBA * foreGround, const RwRGBA * backGround) { return Charset::create(foreGround, backGround); } RwBool RtCharsetDestroy(RtCharset * charSet) { charSet->destroy(); return true; } + + + +#include + +RwInt8 RpAnisotGetMaxSupportedMaxAnisotropy(void) { return rw::getMaxSupportedMaxAnisotropy(); } +RwTexture *RpAnisotTextureSetMaxAnisotropy(RwTexture *tex, RwInt8 val) { tex->setMaxAnisotropy(val); return tex; } +RwInt8 RpAnisotTextureGetMaxAnisotropy(RwTexture *tex) { return tex->getMaxAnisotropy(); } +RwBool RpAnisotPluginAttach(void) { rw::registerAnisotropyPlugin(); return true; } diff --git a/src/fakerw/rpanisot.h b/src/fakerw/rpanisot.h new file mode 100644 index 00000000..a886512f --- /dev/null +++ b/src/fakerw/rpanisot.h @@ -0,0 +1,6 @@ +#pragma once + +RwInt8 RpAnisotGetMaxSupportedMaxAnisotropy(void); +RwTexture *RpAnisotTextureSetMaxAnisotropy(RwTexture *tex, RwInt8 val); +RwInt8 RpAnisotTextureGetMaxAnisotropy(RwTexture *tex); +RwBool RpAnisotPluginAttach(void); -- cgit v1.2.3 From f3bfdd78571f9335f2274b047b127747457a8e79 Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 11 Feb 2021 20:51:13 +0100 Subject: imrove readme; enable screenshots with F12 --- src/fakerw/fake.cpp | 37 +++++++++++++++++++++++++++++++++++++ src/fakerw/rtpng.h | 4 ++++ 2 files changed, 41 insertions(+) create mode 100644 src/fakerw/rtpng.h (limited to 'src/fakerw') 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); } diff --git a/src/fakerw/rtpng.h b/src/fakerw/rtpng.h new file mode 100644 index 00000000..80f29020 --- /dev/null +++ b/src/fakerw/rtpng.h @@ -0,0 +1,4 @@ +#pragma once + +RwImage *RtPNGImageWrite(RwImage * image, const RwChar * imageName); +RwImage *RtPNGImageRead(const RwChar * imageName); -- cgit v1.2.3