jak-project/test/goalc/source_templates/variables/integer-enums.gc
water111 ea479bee98
Add enums and some cleanup (#148)
* support enums

* better compiler warnings

* tweaks to build with clang
2020-12-02 19:51:42 -05:00

20 lines
366 B
Common Lisp

(defenum test-int-enum :bitfield #f
(four 4)
(one 1)
(seven 7)
(two 2)
)
(deftype type-with-bitfield2 (basic)
((name basic)
(thing1 int32)
(thing2 int32)
)
)
(let ((obj (new 'global 'type-with-bitfield2)))
(set! (-> obj thing1) (test-int-enum four))
(set! (-> obj thing2) (test-int-enum seven))
(+ (-> obj thing1) (-> obj thing2))
)