mirror of
https://github.com/open-goal/jak-project
synced 2026-06-25 18:14:34 -04:00
3355df809a
* add array * support static arrays
13 lines
321 B
Common Lisp
13 lines
321 B
Common Lisp
(let ((arr (new 'global 'boxed-array int16 12)))
|
|
(dotimes (i 12)
|
|
(set! (-> arr i) (* i 2))
|
|
)
|
|
(dotimes (i 12)
|
|
(format #t "~D ~D " i (-> arr i))
|
|
)
|
|
(format #t "~D ~D ~D~%" (length arr) (asize-of arr) (&- (&-> arr 4) (&-> arr 1)))
|
|
)
|
|
|
|
;; asize should be...
|
|
;; 16 + 12 * 2 = 40
|
|
;; ptr diff is 3 * 2 = 6 |