diff options
author | Fire_Head <Fire-Head@users.noreply.github.com> | 2019-06-13 03:47:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-13 03:47:13 +0300 |
commit | 9689def6a59bd8a1d05860c7d23f1837cf3b4a80 (patch) | |
tree | cbd5cdfcb16bb993ca4b75552a48eab641541b77 /src/RwHelper.cpp | |
parent | 35ea1765e2a601c3f28c44a988d563a65ff7e024 (diff) | |
parent | e9e62660fba8ded3a57678b4629fccafce579c65 (diff) |
Merge branch 'master' into master
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 |