diff options
Diffstat (limited to 'src/fakerw')
-rw-r--r-- | src/fakerw/fake.cpp | 5 | ||||
-rw-r--r-- | src/fakerw/rpworld.h | 1 | ||||
-rw-r--r-- | src/fakerw/rwcore.h | 3 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp index ee779788..f2232e99 100644 --- a/src/fakerw/fake.cpp +++ b/src/fakerw/fake.cpp @@ -393,7 +393,7 @@ RwStream *RwStreamOpen(RwStreamType type, RwStreamAccessType accessType, const v return nil; } } -RwBool RwStreamClose(RwStream * stream, void *pData) { stream->close(); rwFree(stream); return true; } +RwBool RwStreamClose(RwStream * stream, void *pData) { if (!stream) return false; stream->close(); rwFree(stream); return true; } RwUInt32 RwStreamRead(RwStream * stream, void *buffer, RwUInt32 length) { return stream->read8(buffer, length); } RwStream *RwStreamWrite(RwStream * stream, const void *buffer, RwUInt32 length) { stream->write8(buffer, length); return stream; } RwStream *RwStreamSkip(RwStream * stream, RwUInt32 offset) { stream->seek(offset); return stream; } @@ -410,6 +410,9 @@ void RwIm2DVertexSetRecipCameraZ(RwIm2DVertex *vert, RwReal recipz) { vert->setR void RwIm2DVertexSetScreenX(RwIm2DVertex *vert, RwReal scrnx) { vert->setScreenX(scrnx); } void RwIm2DVertexSetScreenY(RwIm2DVertex *vert, RwReal scrny) { vert->setScreenY(scrny); } void RwIm2DVertexSetScreenZ(RwIm2DVertex *vert, RwReal scrnz) { vert->setScreenZ(scrnz); } +float RwIm2DVertexGetScreenX(RwIm2DVertex *vert) { return vert->getScreenX(); } +float RwIm2DVertexGetScreenY(RwIm2DVertex *vert) { return vert->getScreenY(); } +float RwIm2DVertexGetScreenZ(RwIm2DVertex *vert) { return vert->getScreenZ(); } void RwIm2DVertexSetU(RwIm2DVertex *vert, RwReal texU, RwReal recipz) { vert->setU(texU, recipz); } void RwIm2DVertexSetV(RwIm2DVertex *vert, RwReal texV, RwReal recipz) { vert->setV(texV, recipz); } void RwIm2DVertexSetIntRGBA(RwIm2DVertex *vert, RwUInt8 red, RwUInt8 green, RwUInt8 blue, RwUInt8 alpha) { vert->setColor(red, green, blue, alpha); } diff --git a/src/fakerw/rpworld.h b/src/fakerw/rpworld.h index f10a3754..8e3b09f0 100644 --- a/src/fakerw/rpworld.h +++ b/src/fakerw/rpworld.h @@ -13,6 +13,7 @@ //struct RpMaterial; typedef rw::Material RpMaterial; +typedef rw::MaterialList RpMaterialList; typedef RpMaterial *(*RpMaterialCallBack)(RpMaterial *material, void *data); diff --git a/src/fakerw/rwcore.h b/src/fakerw/rwcore.h index ab0a719f..4f690fd3 100644 --- a/src/fakerw/rwcore.h +++ b/src/fakerw/rwcore.h @@ -34,6 +34,9 @@ void RwIm2DVertexSetRecipCameraZ(RwIm2DVertex *vert, RwReal recipz); void RwIm2DVertexSetScreenX(RwIm2DVertex *vert, RwReal scrnx); void RwIm2DVertexSetScreenY(RwIm2DVertex *vert, RwReal scrny); void RwIm2DVertexSetScreenZ(RwIm2DVertex *vert, RwReal scrnz); +float RwIm2DVertexGetScreenX(RwIm2DVertex *vert); +float RwIm2DVertexGetScreenY(RwIm2DVertex *vert); +float RwIm2DVertexGetScreenZ(RwIm2DVertex *vert); void RwIm2DVertexSetU(RwIm2DVertex *vert, RwReal texU, RwReal recipz); void RwIm2DVertexSetV(RwIm2DVertex *vert, RwReal texV, RwReal recipz); void RwIm2DVertexSetIntRGBA(RwIm2DVertex *vert, RwUInt8 red, RwUInt8 green, RwUInt8 blue, RwUInt8 alpha); |