summaryrefslogtreecommitdiffstats
path: root/src/RwHelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/RwHelper.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/RwHelper.cpp b/src/RwHelper.cpp
new file mode 100644
index 00000000..c8782f9e
--- /dev/null
+++ b/src/RwHelper.cpp
@@ -0,0 +1,19 @@
+#include "common.h"
+
+
+RwObject*
+GetFirstObjectCallback(RwObject *object, void *data)
+{
+ *(RwObject**)data = object;
+ return nil;
+}
+
+RwObject*
+GetFirstObject(RwFrame *frame)
+{
+ RwObject *obj;
+
+ obj = nil;
+ RwFrameForAllObjects(frame, GetFirstObjectCallback, &obj);
+ return obj;
+}