+++ /dev/null
-#ifndef INTERFACE
-#define INTERFACE
-#endif
-
-#ifdef IMPLEMENTATION
-#undef IMPLEMENTATION
-#endif
-
-#ifdef CLASS
-#undef CLASS
-#undef EXTENDS
-#undef METHOD
-#undef ATTRIB
-#undef ATTRIBARRAY
-#undef ENDCLASS
-#undef SUPER
-#endif
-
-#define CLASS(cname) entity spawn##cname(); entity cname##_vtbl;
-#define EXTENDS(base)
-#define METHOD(cname,name,prototype) prototype cname##_##name; .prototype name;
-#define ATTRIB(cname,name,type,val) .type name;
-#define ATTRIBARRAY(cname,name,type,cnt) .type name[cnt];
-#define ENDCLASS(cname) .float instanceOf##cname;
-#define SUPER(cname)
+++ /dev/null
-#ifndef INTERFACE
-#define INTERFACE
-#endif
-
-#ifdef IMPLEMENTATION
-#undef IMPLEMENTATION
-#endif
-
-#ifdef CLASS
-#undef CLASS
-#undef EXTENDS
-#undef METHOD
-#undef ATTRIB
-#undef ATTRIBARRAY
-#undef ENDCLASS
-#undef SUPER
-#endif
-
-#define CLASS(cname) entity spawn##cname() { entity me;
-#define EXTENDS(base) me = spawn##base (); entity basevtbl; basevtbl = base##_vtbl;
-#define METHOD(cname,name,prototype) me.name = cname##_##name;
-#define ATTRIB(cname,name,type,val) me.name = val;
-#define ATTRIBARRAY(cname,name,type,cnt) me.name = me.name;
-#define ENDCLASS(cname) me.instanceOf##cname = 1; me.classname = #cname; if(!cname##_vtbl) cname##_vtbl = spawnVtbl(me, basevtbl); return me; }
-#define SUPER(cname)
-#ifdef INTERFACE
-#undef INTERFACE
+#ifndef INTERFACE
+#define INTERFACE
#endif
#ifndef IMPLEMENTATION
#undef SUPER
#endif
+// for the constructor
+#define CLASS(cname) entity spawn##cname() { entity me;
+#define EXTENDS(base) me = spawn##base (); entity basevtbl; basevtbl = base##_vtbl;
+#define METHOD(cname,name,prototype) me.name = cname##_##name;
+#define ATTRIB(cname,name,type,val) me.name = val;
+#define ATTRIBARRAY(cname,name,type,cnt) me.name = me.name;
+#define ENDCLASS(cname) me.instanceOf##cname = 1; me.classname = #cname; if(!cname##_vtbl) cname##_vtbl = spawnVtbl(me, basevtbl); return me; }
+
+// for the implementation
#define SUPER(cname) (cname##_vtbl.vtblbase)
--- /dev/null
+#ifndef INTERFACE
+#define INTERFACE
+#endif
+
+#ifdef IMPLEMENTATION
+#undef IMPLEMENTATION
+#endif
+
+#ifdef CLASS
+#undef CLASS
+#undef EXTENDS
+#undef METHOD
+#undef ATTRIB
+#undef ATTRIBARRAY
+#undef ENDCLASS
+#undef SUPER
+#endif
+
+#define CLASS(cname) entity spawn##cname(); entity cname##_vtbl;
+#define EXTENDS(base)
+#define METHOD(cname,name,prototype) prototype cname##_##name; .prototype name;
+#define ATTRIB(cname,name,type,val) .type name;
+#define ATTRIBARRAY(cname,name,type,cnt) .type name[cnt];
+#define ENDCLASS(cname) .float instanceOf##cname;
+#define SUPER(cname)
skin.qh
xonotic/util.qh
-oo/classdefs.h
- classes.c
-
-oo/constructors.h
+oo/interface.h
classes.c
oo/implementation.h
classes.c