summaryrefslogtreecommitdiffstats
path: root/src/RwHelper.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-06-26 22:34:14 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-06-26 22:34:14 +0200
commit08b053a568e15dd318dcfc46eaa6393af4a5f8c4 (patch)
tree7e6a0bc15376f347c13029b99f2f0ec1427bf2c1 /src/RwHelper.cpp
parentMore replay stuff (diff)
parentbla (diff)
downloadre3-08b053a568e15dd318dcfc46eaa6393af4a5f8c4.tar
re3-08b053a568e15dd318dcfc46eaa6393af4a5f8c4.tar.gz
re3-08b053a568e15dd318dcfc46eaa6393af4a5f8c4.tar.bz2
re3-08b053a568e15dd318dcfc46eaa6393af4a5f8c4.tar.lz
re3-08b053a568e15dd318dcfc46eaa6393af4a5f8c4.tar.xz
re3-08b053a568e15dd318dcfc46eaa6393af4a5f8c4.tar.zst
re3-08b053a568e15dd318dcfc46eaa6393af4a5f8c4.zip
Diffstat (limited to 'src/RwHelper.cpp')
-rw-r--r--src/RwHelper.cpp17
1 files changed, 17 insertions, 0 deletions
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)