mirror of
https://github.com/open-goal/jak-project
synced 2026-06-07 20:11:39 -04:00
a6d5c4eda3
* change * recognize vector float product and update tests
187 lines
6.8 KiB
Common Lisp
Vendored
187 lines
6.8 KiB
Common Lisp
Vendored
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type hud-icon
|
|
(deftype hud-icon (basic)
|
|
((icon uint32 :offset-assert 4)
|
|
(icon-y int32 :offset-assert 8)
|
|
(icon-x int32 :offset-assert 12)
|
|
(icon-z int32 :offset-assert 16)
|
|
(scale-x float :offset-assert 20)
|
|
(scale-y float :offset-assert 24)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x1c
|
|
:flag-assert #x90000001c
|
|
)
|
|
|
|
;; definition for method 3 of type hud-icon
|
|
(defmethod inspect hud-icon ((obj hud-icon))
|
|
(format #t "[~8x] ~A~%" obj (-> obj type))
|
|
(format #t "~Ticon: #x~X~%" (-> obj icon))
|
|
(format #t "~Ticon-y: ~D~%" (-> obj icon-y))
|
|
(format #t "~Ticon-x: ~D~%" (-> obj icon-x))
|
|
(format #t "~Ticon-z: ~D~%" (-> obj icon-z))
|
|
(format #t "~Tscale-x: ~f~%" (-> obj scale-x))
|
|
(format #t "~Tscale-y: ~f~%" (-> obj scale-y))
|
|
obj
|
|
)
|
|
|
|
;; definition of type hud-particle
|
|
(deftype hud-particle (basic)
|
|
((part basic :offset-assert 4)
|
|
(init-pos vector :inline :offset-assert 16)
|
|
(pos vector :inline :offset-assert 32)
|
|
(prev-pos vector :inline :offset-assert 48)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x40
|
|
:flag-assert #x900000040
|
|
)
|
|
|
|
;; definition for method 3 of type hud-particle
|
|
(defmethod inspect hud-particle ((obj hud-particle))
|
|
(format #t "[~8x] ~A~%" obj (-> obj type))
|
|
(format #t "~Tpart: ~A~%" (-> obj part))
|
|
(format #t "~Tinit-pos: #<vector @ #x~X>~%" (-> obj init-pos))
|
|
(format #t "~Tpos: #<vector @ #x~X>~%" (-> obj pos))
|
|
(format #t "~Tprev-pos: #<vector @ #x~X>~%" (-> obj prev-pos))
|
|
obj
|
|
)
|
|
|
|
;; definition of type hud
|
|
(deftype hud (process)
|
|
((value int32 :offset-assert 112)
|
|
(value2 int32 :offset-assert 116)
|
|
(target-value int32 :offset-assert 120)
|
|
(last-increment-time uint64 :offset-assert 128)
|
|
(last-target-equal-time uint64 :offset-assert 136)
|
|
(offset int32 :offset-assert 144)
|
|
(y-offset int32 :offset-assert 148)
|
|
(next-y-offset int32 :offset-assert 152)
|
|
(x-sgn int32 :offset-assert 156)
|
|
(y-sgn int32 :offset-assert 160)
|
|
(text-x int32 :offset-assert 164)
|
|
(text-y int32 :offset-assert 168)
|
|
(friend int32 :offset-assert 172)
|
|
(first-init basic :offset-assert 176)
|
|
(increment-on-event basic :offset-assert 180)
|
|
(skip-particle int32 :offset-assert 184)
|
|
(disable basic :offset-assert 188)
|
|
(force-on-screen basic :offset-assert 192)
|
|
(deactivate-when-hidden basic :offset-assert 196)
|
|
(trigger-time uint64 :offset-assert 200)
|
|
(last-hide-time uint64 :offset-assert 208)
|
|
(nb-of-icons int32 :offset-assert 216)
|
|
(icons hud-icon 6 :offset-assert 220)
|
|
(max-nb-of-particles int32 :offset-assert 244)
|
|
(nb-of-particles int32 :offset-assert 248)
|
|
(particles hud-particle 7 :offset-assert 252)
|
|
)
|
|
:heap-base #xb0
|
|
:method-count-assert 27
|
|
:size-assert #x118
|
|
:flag-assert #x1b00b00118
|
|
(:methods
|
|
(dummy-14 () none 14)
|
|
(dummy-15 () none 15)
|
|
(dummy-16 () none 16)
|
|
(dummy-17 () none 17)
|
|
(dummy-18 () none 18)
|
|
(dummy-19 () none 19)
|
|
(dummy-20 () none 20)
|
|
(dummy-21 () none 21)
|
|
(dummy-22 () none 22)
|
|
(dummy-23 () none 23)
|
|
(dummy-24 () none 24)
|
|
(dummy-25 () none 25)
|
|
(dummy-26 () none 26)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type hud
|
|
(defmethod inspect hud ((obj hud))
|
|
(let ((t9-0 (method-of-type process inspect)))
|
|
(t9-0 obj)
|
|
)
|
|
(format #t "~T~Tvalue: ~D~%" (-> obj value))
|
|
(format #t "~T~Tvalue2: ~D~%" (-> obj value2))
|
|
(format #t "~T~Ttarget-value: ~D~%" (-> obj target-value))
|
|
(format #t "~T~Tlast-increment-time: ~D~%" (-> obj last-increment-time))
|
|
(format #t "~T~Tlast-target-equal-time: ~D~%" (-> obj last-target-equal-time))
|
|
(format #t "~T~Toffset: ~D~%" (-> obj offset))
|
|
(format #t "~T~Ty-offset: ~D~%" (-> obj y-offset))
|
|
(format #t "~T~Tnext-y-offset: ~D~%" (-> obj next-y-offset))
|
|
(format #t "~T~Tx-sgn: ~D~%" (-> obj x-sgn))
|
|
(format #t "~T~Ty-sgn: ~D~%" (-> obj y-sgn))
|
|
(format #t "~T~Ttext-x: ~D~%" (-> obj text-x))
|
|
(format #t "~T~Ttext-y: ~D~%" (-> obj text-y))
|
|
(format #t "~T~Tfriend: ~D~%" (-> obj friend))
|
|
(format #t "~T~Tfirst-init: ~A~%" (-> obj first-init))
|
|
(format #t "~T~Tincrement-on-event: ~A~%" (-> obj increment-on-event))
|
|
(format #t "~T~Tskip-particle: ~D~%" (-> obj skip-particle))
|
|
(format #t "~T~Tdisable: ~A~%" (-> obj disable))
|
|
(format #t "~T~Tforce-on-screen: ~A~%" (-> obj force-on-screen))
|
|
(format #t "~T~Tdeactivate-when-hidden: ~A~%" (-> obj deactivate-when-hidden))
|
|
(format #t "~T~Ttrigger-time: ~D~%" (-> obj trigger-time))
|
|
(format #t "~T~Tlast-hide-time: ~D~%" (-> obj last-hide-time))
|
|
(format #t "~T~Tnb-of-icons: ~D~%" (-> obj nb-of-icons))
|
|
(format #t "~T~Ticons[6] @ #x~X~%" (-> obj icons))
|
|
(format #t "~T~Tmax-nb-of-particles: ~D~%" (-> obj max-nb-of-particles))
|
|
(format #t "~T~Tnb-of-particles: ~D~%" (-> obj nb-of-particles))
|
|
(format #t "~T~Tparticles[7] @ #x~X~%" (-> obj particles))
|
|
obj
|
|
)
|
|
|
|
;; definition of type hud-parts
|
|
(deftype hud-parts (structure)
|
|
((pickups basic :offset-assert 0)
|
|
(money basic :offset-assert 4)
|
|
(fuel-cell basic :offset-assert 8)
|
|
(health basic :offset-assert 12)
|
|
(buzzers basic :offset-assert 16)
|
|
(power basic :offset-assert 20)
|
|
(bike-speed basic :offset-assert 24)
|
|
(bike-heat basic :offset-assert 28)
|
|
(money-all basic :offset-assert 32)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x24
|
|
:flag-assert #x900000024
|
|
)
|
|
|
|
;; definition for method 3 of type hud-parts
|
|
(defmethod inspect hud-parts ((obj hud-parts))
|
|
(format #t "[~8x] ~A~%" obj 'hud-parts)
|
|
(format #t "~Tdata[9] @ #x~X~%" (&-> obj pickups))
|
|
(format #t "~Tpickups: #x~X~%" (-> obj pickups))
|
|
(format #t "~Tmoney: #x~X~%" (-> obj money))
|
|
(format #t "~Tfuel-cell: #x~X~%" (-> obj fuel-cell))
|
|
(format #t "~Thealth: #x~X~%" (-> obj health))
|
|
(format #t "~Tbuzzers: #x~X~%" (-> obj buzzers))
|
|
(format #t "~Tpower: #x~X~%" (-> obj power))
|
|
(format #t "~Tbike-speed: #x~X~%" (-> obj bike-speed))
|
|
(format #t "~Tbike-heat: #x~X~%" (-> obj bike-heat))
|
|
(format #t "~Tmoney-all: #x~X~%" (-> obj money-all))
|
|
obj
|
|
)
|
|
|
|
;; definition for symbol *hud-parts*, type hud-parts
|
|
(define
|
|
*hud-parts*
|
|
(new 'static 'hud-parts
|
|
:pickups #f
|
|
:money #f
|
|
:fuel-cell #f
|
|
:health #f
|
|
:buzzers #f
|
|
:power #f
|
|
:bike-speed #f
|
|
:bike-heat #f
|
|
:money-all #f
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
0
|