jak-project/test/goalc/source_templates/variables/integer-enums.gc
water111 060b125324
[Compiler/Decompiler] Better support for Bitfield and Enum types (#374)
* compiler fixes, a decent amount of decompiler stuff is working too

* more support in decompiler, fix some casts

* decompile static data too
2021-04-22 19:08:58 -04:00

20 lines
382 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 test-int-enum)
(thing2 test-int-enum)
)
)
(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))
)