aboutsummaryrefslogtreecommitdiff
path: root/gob/gob.h
diff options
context:
space:
mode:
Diffstat (limited to 'gob/gob.h')
-rw-r--r--gob/gob.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/gob/gob.h b/gob/gob.h
index cfa38384c6..48dc95517d 100644
--- a/gob/gob.h
+++ b/gob/gob.h
@@ -29,6 +29,13 @@
#include "base/engine.h"
+#define VAR_OFFSET(offs) (*(uint32 *)(inter_variables + (offs)))
+#define VAR(var) VAR_OFFSET((var << 2))
+#define VAR_ADDRESS(var) (&VAR(var))
+
+#define WRITE_VAR_OFFSET(offs, val) (VAR_OFFSET(offs) = val)
+#define WRITE_VAR(var, val) WRITE_VAR_OFFSET((var << 2), val)
+
namespace Gob {
class GobEngine : public Engine {