aboutsummaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2020-03-29 11:17:39 -0500
committerJeffrey Armstrong <jeff@approximatrix.com>2020-03-29 11:17:39 -0500
commit4e1571bda9c6a85db4bd7a43f3044d855b091ec3 (patch)
treea87feec94ae2f0dcc47bd5ae888fcf306acf86a1 /util.h
parentbc3676fd53cff5bc0ff131ba887061703ebde192 (diff)
downloadgemworm-4e1571bda9c6a85db4bd7a43f3044d855b091ec3.zip
gemworm-4e1571bda9c6a85db4bd7a43f3044d855b091ec3.tar.gz
Initial work on support for high scores. Transitioned project to modern AHCC and fixed tons of warnings. PC-GEM probably broken at the moment.
Diffstat (limited to 'util.h')
-rw-r--r--util.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/util.h b/util.h
index db82c04..ef2f749 100644
--- a/util.h
+++ b/util.h
@@ -3,6 +3,8 @@
/* Mostly compatability stuff */
+#include <string.h>
+
#ifdef __GNUC__
#include <gem.h>
@@ -19,16 +21,12 @@
#endif /* __GNUC__ */
#ifndef WF_WXYWH
-#ifdef WF_WORKXYWH
#define WF_WXYWH WF_WORKXYWH
#endif
-#endif
#ifndef WF_CXYWH
-#ifdef WF_CURRXYWH
#define WF_CXYWH WF_CURRXYWH
#endif
-#endif
#define max(x,y) x>y ? x : y
#define min(x,y) x<y ? x : y
@@ -50,5 +48,13 @@ WORD tx,ty,tw,th;
}
#endif
+static void set_resource_string(OBJECT *tree, short obj, const char *string)
+{
+long addr;
+
+ /* What a freakin' nightmare... */
+ addr = tree[obj].ob_spec.index;
+ strcpy((char *)addr, string);
+}
#endif /* UTIL_WORM_HEADERS */