diff options
author | Fire_Head <Fire-Head@users.noreply.github.com> | 2020-06-29 08:37:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-29 08:37:53 +0200 |
commit | 860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb (patch) | |
tree | 6a8f83b0d46e97b198f095b7624deecca75051e7 /src/fakerw | |
parent | restore Text.cpp (diff) | |
parent | Merge remote-tracking branch 'upstream/master' (diff) | |
download | re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.tar re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.tar.gz re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.tar.bz2 re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.tar.lz re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.tar.xz re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.tar.zst re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.zip |
Diffstat (limited to 'src/fakerw')
-rw-r--r-- | src/fakerw/fake.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp index 50d12b2f..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; } @@ -470,7 +470,7 @@ RwBool RwRenderStateSet(RwRenderState state, void *value) uint32 uival = (uintptr)value; uint32 fog; switch(state){ - case rwRENDERSTATETEXTURERASTER: SetRenderState(TEXTURERASTER, uival); return true; + case rwRENDERSTATETEXTURERASTER: SetRenderStatePtr(TEXTURERASTER, value); return true; case rwRENDERSTATETEXTUREADDRESS: SetRenderState(TEXTUREADDRESS, uival); return true; case rwRENDERSTATETEXTUREADDRESSU: SetRenderState(TEXTUREADDRESSU, uival); return true; case rwRENDERSTATETEXTUREADDRESSV: SetRenderState(TEXTUREADDRESSV, uival); return true; @@ -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); |