summaryrefslogtreecommitdiffstats
path: root/src/fakerw/fake.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-27 23:59:03 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-27 23:59:03 +0200
commit7e4ef2162a027f2df96eddddc8d3fca7d5082df8 (patch)
tree6c7078b119efcedc89b1e7f08e344ed087cb89b1 /src/fakerw/fake.cpp
parentMerge remote-tracking branch 'upstream/master' (diff)
parentbla (diff)
downloadre3-7e4ef2162a027f2df96eddddc8d3fca7d5082df8.tar
re3-7e4ef2162a027f2df96eddddc8d3fca7d5082df8.tar.gz
re3-7e4ef2162a027f2df96eddddc8d3fca7d5082df8.tar.bz2
re3-7e4ef2162a027f2df96eddddc8d3fca7d5082df8.tar.lz
re3-7e4ef2162a027f2df96eddddc8d3fca7d5082df8.tar.xz
re3-7e4ef2162a027f2df96eddddc8d3fca7d5082df8.tar.zst
re3-7e4ef2162a027f2df96eddddc8d3fca7d5082df8.zip
Diffstat (limited to 'src/fakerw/fake.cpp')
-rw-r--r--src/fakerw/fake.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp
index 71646020..f95845a8 100644
--- a/src/fakerw/fake.cpp
+++ b/src/fakerw/fake.cpp
@@ -152,7 +152,7 @@ RwReal RwCameraGetNearClipPlane(const RwCamera *camera) { return camera->n
RwReal RwCameraGetFarClipPlane(const RwCamera *camera) { return camera->farPlane; }
RwCamera *RwCameraSetFogDistance(RwCamera *camera, RwReal fogDistance) { camera->fogPlane = fogDistance; return camera; }
RwReal RwCameraGetFogDistance(const RwCamera *camera) { return camera->fogPlane; }
-RwCamera *RwCameraGetCurrentCamera(void);
+RwCamera *RwCameraGetCurrentCamera(void) { return rw::engine->currentCamera; }
RwCameraProjection RwCameraGetProjection(const RwCamera *camera);
const RwV2d *RwCameraGetViewWindow(const RwCamera *camera) { return &camera->viewWindow; }
RwMatrix *RwCameraGetViewMatrix(RwCamera *camera) { return &camera->viewMatrix; }
@@ -615,8 +615,8 @@ RpGeometry *RpGeometryCreateSpace(RwReal radius);
RpMorphTarget *RpMorphTargetSetBoundingSphere(RpMorphTarget *morphTarget, const RwSphere *boundingSphere) { morphTarget->boundingSphere = *boundingSphere; return morphTarget; }
RwSphere *RpMorphTargetGetBoundingSphere(RpMorphTarget *morphTarget) { return &morphTarget->boundingSphere; }
const RpMorphTarget *RpMorphTargetCalcBoundingSphere(const RpMorphTarget *morphTarget, RwSphere *boundingSphere) { *boundingSphere = morphTarget->calculateBoundingSphere(); return morphTarget; }
-RwInt32 RpGeometryAddMorphTargets(RpGeometry *geometry, RwInt32 mtcount);
-RwInt32 RpGeometryAddMorphTarget(RpGeometry *geometry);
+RwInt32 RpGeometryAddMorphTargets(RpGeometry *geometry, RwInt32 mtcount) { RwInt32 n = geometry->numMorphTargets; geometry->addMorphTargets(mtcount); return n; }
+RwInt32 RpGeometryAddMorphTarget(RpGeometry *geometry) { return RpGeometryAddMorphTargets(geometry, 1); }
RpGeometry *RpGeometryRemoveMorphTarget(RpGeometry *geometry, RwInt32 morphTarget);
RwInt32 RpGeometryGetNumMorphTargets(const RpGeometry *geometry);
RpMorphTarget *RpGeometryGetMorphTarget(const RpGeometry *geometry, RwInt32 morphTarget) { return &geometry->morphTargets[morphTarget]; }
@@ -790,6 +790,12 @@ RpMaterial *RpMatFXMaterialSetEnvMapFrame( RpMaterial *material, RwFrame *frame
mfx->setEnvFrame(frame);
return material;
}
+RpMaterial *RpMatFXMaterialSetEnvMapFrameBufferAlpha( RpMaterial *material, RwBool useFrameBufferAlpha )
+{
+ MatFX *mfx = MatFX::get(material);
+ mfx->setEnvFBAlpha(useFrameBufferAlpha);
+ return material;
+}
RpMaterial *RpMatFXMaterialSetEnvMapCoefficient( RpMaterial *material, RwReal coef )
{
MatFX *mfx = MatFX::get(material);