summaryrefslogtreecommitdiff
path: root/kon/konsector.h
diff options
context:
space:
mode:
Diffstat (limited to 'kon/konsector.h')
-rw-r--r--kon/konsector.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/kon/konsector.h b/kon/konsector.h
index c7a71e3..fa65a0e 100644
--- a/kon/konsector.h
+++ b/kon/konsector.h
@@ -24,7 +24,8 @@
*/
/* a map made of rooms: loading, saving, looking things up, building a mesh and drawing it. it needs konsofren.h and konmath.h next to it
- * and nothing else, so it is copy and paste like the other single header libs. in exactly one .c file:
+ * and nothing else, so it is copy and paste like the other single header libs. it turns on the 3D part of konsofren, so include it
+ * before konsofren.h or define KONSOFREN_3D yourself. in exactly one .c file:
*
* #define KONSOFREN_IMPLEMENTATION (once, wherever konsofren is)
* #define KONSECTOR_IMPLEMENTATION
@@ -37,9 +38,17 @@
#include <stddef.h>
+#ifndef KONSOFREN_3D
+#define KONSOFREN_3D
+#endif
+
#include "konmath.h"
#include "konsofren.h"
+#ifndef KONSOFREN_HAS_3D
+#error "this needs the 3D part of konsofren, define KONSOFREN_3D before the first include of konsofren.h (build.sh does it for -m 3d, model and sector)"
+#endif
+
/*** definition ***/
/* a map is rooms seen from above. every room (sector) is a polygon of vertices with a floor and a ceiling height, and every