diff options
| author | KonAki <konaki@anokonaki.org> | 2026-10-11 21:57:22 +0800 |
|---|---|---|
| committer | KonAki <konaki@anokonaki.org> | 2026-10-11 21:57:22 +0800 |
| commit | 95bd48a7b0556adab5250cae766ee9dd9c6b2cde (patch) | |
| tree | a29b83a4f436d6c58321a44977e4eb6d30f7c8d8 /kon/konsector.h | |
| parent | 42630ebee76996a37f5104e6e11b860f31634dab (diff) | |
konsofren: 3D is opt-in with KONSOFREN_3D, build.sh sets it for 3d, model and sector
Diffstat (limited to 'kon/konsector.h')
| -rw-r--r-- | kon/konsector.h | 11 |
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 |
