diff options
author | Fire_Head <Fire-Head@users.noreply.github.com> | 2019-06-13 02:47:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-13 02:47:13 +0200 |
commit | 9689def6a59bd8a1d05860c7d23f1837cf3b4a80 (patch) | |
tree | cbd5cdfcb16bb993ca4b75552a48eab641541b77 /src/RwHelper.cpp | |
parent | Update Replay.h (diff) | |
parent | silly mistake (diff) | |
download | re3-9689def6a59bd8a1d05860c7d23f1837cf3b4a80.tar re3-9689def6a59bd8a1d05860c7d23f1837cf3b4a80.tar.gz re3-9689def6a59bd8a1d05860c7d23f1837cf3b4a80.tar.bz2 re3-9689def6a59bd8a1d05860c7d23f1837cf3b4a80.tar.lz re3-9689def6a59bd8a1d05860c7d23f1837cf3b4a80.tar.xz re3-9689def6a59bd8a1d05860c7d23f1837cf3b4a80.tar.zst re3-9689def6a59bd8a1d05860c7d23f1837cf3b4a80.zip |
Diffstat (limited to 'src/RwHelper.cpp')
-rw-r--r-- | src/RwHelper.cpp | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/src/RwHelper.cpp b/src/RwHelper.cpp index cb0c1a4e..2ff58393 100644 --- a/src/RwHelper.cpp +++ b/src/RwHelper.cpp @@ -29,6 +29,23 @@ DefinedState(void) RwD3D8SetRenderState(D3DRS_ALPHAREF, 2); } +RwFrame* +GetFirstFrameCallback(RwFrame *child, void *data) +{ + *(RwFrame**)data = child; + return nil; +} + +RwFrame* +GetFirstChild(RwFrame *frame) +{ + RwFrame *child; + + child = nil; + RwFrameForAllChildren(frame, GetFirstFrameCallback, &child); + return child; +} + RwObject* GetFirstObjectCallback(RwObject *object, void *data) { @@ -46,6 +63,23 @@ GetFirstObject(RwFrame *frame) return obj; } +RpAtomic* +GetFirstAtomicCallback(RpAtomic *atm, void *data) +{ + *(RpAtomic**)data = atm; + return nil; +} + +RpAtomic* +GetFirstAtomic(RpClump *clump) +{ + RpAtomic *atm; + + atm = nil; + RpClumpForAllAtomics(clump, GetFirstAtomicCallback, &atm); + return atm; +} + void CameraSize(RwCamera * camera, RwRect * rect, RwReal viewWindow, RwReal aspectRatio) @@ -135,7 +169,7 @@ CameraSize(RwCamera * camera, RwRect * rect, rect->x = origSize.x; rect->y = origSize.y; - rect->w = origSize.w; + rect->w = origSize.w; rect->h = origSize.h; /* @@ -274,4 +308,4 @@ STARTPATCHES InjectHook(0x527170, CameraSize, PATCH_JUMP); InjectHook(0x527340, CameraDestroy, PATCH_JUMP); InjectHook(0x5273B0, CameraCreate, PATCH_JUMP); -ENDPATCHES
\ No newline at end of file +ENDPATCHES |