diff options
author | aap <aap@papnet.eu> | 2019-06-12 20:07:37 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2019-06-12 20:11:17 +0200 |
commit | a9517c01afad50d90c3afdee0fdc6238158378f2 (patch) | |
tree | 9226e392b0869576faccd8a3d66d68490d648417 /src/RwHelper.cpp | |
parent | Merge branch 'master' into master (diff) | |
download | re3-a9517c01afad50d90c3afdee0fdc6238158378f2.tar re3-a9517c01afad50d90c3afdee0fdc6238158378f2.tar.gz re3-a9517c01afad50d90c3afdee0fdc6238158378f2.tar.bz2 re3-a9517c01afad50d90c3afdee0fdc6238158378f2.tar.lz re3-a9517c01afad50d90c3afdee0fdc6238158378f2.tar.xz re3-a9517c01afad50d90c3afdee0fdc6238158378f2.tar.zst re3-a9517c01afad50d90c3afdee0fdc6238158378f2.zip |
Diffstat (limited to '')
-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 |