From 4d84d94166772adf112652becf90f07f38e47ff4 Mon Sep 17 00:00:00 2001 From: aap Date: Sun, 23 Jun 2019 19:59:58 +0200 Subject: more Radar code --- src/RwHelper.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/RwHelper.cpp') diff --git a/src/RwHelper.cpp b/src/RwHelper.cpp index 5aa31e92..3c198272 100644 --- a/src/RwHelper.cpp +++ b/src/RwHelper.cpp @@ -108,6 +108,23 @@ GetFirstAtomic(RpClump *clump) return atm; } +RwTexture* +GetFirstTextureCallback(RwTexture *tex, void *data) +{ + *(RwTexture**)data = tex; + return nil; +} + +RwTexture* +GetFirstTexture(RwTexDictionary *txd) +{ + RwTexture *tex; + + tex = nil; + RwTexDictionaryForAllTextures(txd, GetFirstTextureCallback, &tex); + return tex; +} + void CameraSize(RwCamera * camera, RwRect * rect, RwReal viewWindow, RwReal aspectRatio) -- cgit v1.2.3