jak-project/goal_src/engine/target/pat-h.gc
water111 9d3b056b7a
Fix asize bug, decompile a few files (#293)
* fix bug in asize of basic

* more decomp
2021-02-28 18:05:07 -05:00

125 lines
3.4 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: pat-h.gc
;; name in dgo: pat-h
;; dgos: GAME, ENGINE
(deftype pat-surface (uint32)
()
:method-count-assert 9
:size-assert #x4
:flag-assert #x900000004
)
(defmethod inspect pat-surface ((obj pat-surface))
(format #t "[~8x] ~A~%" obj 'pat-surface)
(format #t "~Tskip: ~D~%" (shr (shl (the-as int obj) 61) 61))
(format #t "~Tmode: ~D~%" (shr (shl (the-as int obj) 58) 61))
(format #t "~Tmaterial: ~D~%" (shr (shl (the-as int obj) 52) 58))
(format #t "~Tcamera: ~D~%" (shr (shl (the-as int obj) 50) 62))
(format #t "~Tevent: ~D~%" (shr (shl (the-as int obj) 44) 58))
(format #t "~Tnoentity: ~D~%" (shr (shl (the-as int obj) 63) 63))
(format #t "~Tnocamera: ~D~%" (shr (shl (the-as int obj) 62) 63))
(format #t "~Tnoedge: ~D~%" (shr (shl (the-as int obj) 61) 63))
(format #t "~Tnolineofsight: ~D~%" (shr (shl (the-as int obj) 51) 63))
obj
)
(defun-debug pat-material->string ((arg0 pat-surface))
(local-vars (v1-1 int))
(set! v1-1 (shr (shl (the-as int arg0) 52) 58))
(cond
((= v1-1 22) "neutral")
((= v1-1 21) "rotate")
((= v1-1 20) "stopproj")
((= v1-1 19) "swamp")
((= v1-1 18) "tube")
((= v1-1 17) "straw")
((= v1-1 16) "metal")
((= v1-1 15) "dirt")
((= v1-1 14) "gravel")
((= v1-1 13) "crwood")
((= v1-1 12) "lava")
((= v1-1 11) "hotcoals")
((= v1-1 10) "deepsnow")
((= v1-1 9) "snow")
((= v1-1 8) "pcmetal")
((= v1-1 7) "grass")
((= v1-1 6) "wood")
((= v1-1 5) "sand")
((= v1-1 4) "tar")
((= v1-1 3) "waterbottom")
((= v1-1 2) "quicksand")
((= v1-1 1) "ice")
((zero? v1-1) "stone")
(else "*unknown*")
)
)
(defun-debug pat-mode->string ((arg0 pat-surface))
(local-vars (v1-1 int))
(set! v1-1 (shr (shl (the-as int arg0) 58) 61))
(cond
((= v1-1 2) "obstacle")
((= v1-1 1) "wall")
((zero? v1-1) "ground")
(else "*unknown*")
)
)
(defun pat-event->string ((arg0 pat-surface))
(local-vars (v1-1 int))
(set! v1-1 (shr (shl (the-as int arg0) 44) 58))
(cond
((= v1-1 6) "melt")
((= v1-1 5) "burnup")
((= v1-1 4) "deadlyup")
((= v1-1 3) "burn")
((= v1-1 2) "endlessfall")
((= v1-1 1) "deadly")
((zero? v1-1) "none")
(else "*unknown*")
)
)
(deftype pat-mode-info (structure)
((name basic :offset-assert 0)
(wall-angle float :offset-assert 4)
(color uint32 :offset-assert 8)
(hilite-color uint32 :offset-assert 12)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
(define *pat-mode-info*
(new 'static 'inline-array pat-mode-info 4
(new 'static 'pat-mode-info
:name "ground"
:wall-angle (the-as float #x3e4ccccd)
:color #x4000007f
:hilite-color #x800000ff
)
(new 'static 'pat-mode-info
:name "wall"
:wall-angle 2.000000
:color #x407f0000
:hilite-color #x80ff0000
)
(new 'static 'pat-mode-info
:name "obstacle"
:wall-angle (the-as float #x3f51eb85)
:color #x407f007f
:hilite-color #x80ff00ff
)
(new 'static 'pat-mode-info
:name "pole"
:wall-angle 2.000000
:color #x40007f7f
:hilite-color #x8000ffff
)
)
)