summaryrefslogtreecommitdiffstats
path: root/src/fakerw
diff options
context:
space:
mode:
Diffstat (limited to 'src/fakerw')
-rw-r--r--src/fakerw/fake.cpp13
-rw-r--r--src/fakerw/rpanisot.h6
-rw-r--r--src/fakerw/rwplcore.h4
3 files changed, 19 insertions, 4 deletions
diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp
index a3b9258b..366dcf3e 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 <rwcore.h>
#include <rpworld.h>
#include <rpmatfx.h>
@@ -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) {
@@ -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 <rpanisot.h>
+
+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);
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