Files
jak-project/test/decompiler/reference/jak2/engine/debug/debug-h_REF.gc
T
Ethan Lafrenais 22982d2750 [decomp] jak2: debug, debug-sphere (#1846)
I wasn't able to 100% complete `debug` due to a bunch of level boundary
debug stuff I couldn't figure out. But, I added a ref test and
documented/copied over everything else into goal_src.

Most of the functions that existed in Jak 1 are identical, others got an
extra param or 2 and some now make copies of arguments instead of
modifying them. There's a bunch of new functions, including all of the
debug functions that used to be in `level-boundary` are now in `debug`.
At the very end of `debug` there's also some weird asm functions
checking for some EE memory controller bug (not sure what's up with
that)?
2022-09-07 18:14:34 -04:00

156 lines
5.1 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type pos-history
(deftype pos-history (structure)
((points (inline-array vector) :offset-assert 0)
(num-points int32 :offset-assert 4)
(h-first int32 :offset-assert 8)
(h-last int32 :offset-assert 12)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
;; definition for method 3 of type pos-history
(defmethod inspect pos-history ((obj pos-history))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" obj 'pos-history)
(format #t "~1Tpoints: #x~X~%" (-> obj points))
(format #t "~1Tnum-points: ~D~%" (-> obj num-points))
(format #t "~1Th-first: ~D~%" (-> obj h-first))
(format #t "~1Th-last: ~D~%" (-> obj h-last))
(label cfg-4)
obj
)
;; definition of type debug-vertex
(deftype debug-vertex (structure)
((trans vector4w :inline :offset-assert 0)
(normal vector3h :inline :offset-assert 16)
(st vector2h :inline :offset-assert 22)
(color uint32 :offset-assert 28)
)
:method-count-assert 9
:size-assert #x20
:flag-assert #x900000020
)
;; definition for method 3 of type debug-vertex
(defmethod inspect debug-vertex ((obj debug-vertex))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" obj 'debug-vertex)
(format #t "~1Ttrans: ~`vector4w`P~%" (-> obj trans))
(format #t "~1Tnormal: ~`vector3h`P~%" (-> obj normal))
(format #t "~1Tst: ~`vector2h`P~%" (-> obj st))
(format #t "~1Tcolor: #x~X~%" (-> obj color))
(label cfg-4)
obj
)
;; definition of type debug-vertex-stats
(deftype debug-vertex-stats (basic)
((length int32 :offset-assert 4)
(pos-count int32 :offset-assert 8)
(vertex debug-vertex 600 :inline :offset-assert 16)
)
:method-count-assert 9
:size-assert #x4b10
:flag-assert #x900004b10
)
;; definition for method 3 of type debug-vertex-stats
;; INFO: this function exists in multiple non-identical object files
(defmethod inspect debug-vertex-stats ((obj debug-vertex-stats))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~1Tlength: ~D~%" (-> obj length))
(format #t "~1Tpos-count: ~D~%" (-> obj pos-count))
(format #t "~1Tvertex[600] @ #x~X~%" (-> obj vertex))
(label cfg-4)
obj
)
;; definition for symbol *color-black*, type rgba
(define *color-black* (new 'static 'rgba :a #x80))
;; definition for symbol *color-white*, type rgba
(define *color-white* (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80))
;; definition for symbol *color-gray*, type rgba
(define *color-gray* (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80))
;; definition for symbol *color-red*, type rgba
(define *color-red* (new 'static 'rgba :r #xff :a #x80))
;; definition for symbol *color-green*, type rgba
(define *color-green* (new 'static 'rgba :g #xff :a #x80))
;; definition for symbol *color-blue*, type rgba
(define *color-blue* (new 'static 'rgba :b #xff :a #x80))
;; definition for symbol *color-cyan*, type rgba
(define *color-cyan* (new 'static 'rgba :g #xff :b #xff :a #x80))
;; definition for symbol *color-magenta*, type rgba
(define *color-magenta* (new 'static 'rgba :r #xff :b #xff :a #x80))
;; definition for symbol *color-yellow*, type rgba
(define *color-yellow* (new 'static 'rgba :r #xff :g #xff :a #x80))
;; definition for symbol *color-light-red*, type rgba
(define *color-light-red* (new 'static 'rgba :r #xff :g #x80 :b #x80 :a #x80))
;; definition for symbol *color-light-green*, type rgba
(define *color-light-green* (new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80))
;; definition for symbol *color-light-blue*, type rgba
(define *color-light-blue* (new 'static 'rgba :r #x80 :g #x80 :b #xff :a #x80))
;; definition for symbol *color-light-cyan*, type rgba
(define *color-light-cyan* (new 'static 'rgba :r #x80 :g #xff :b #xff :a #x80))
;; definition for symbol *color-light-magenta*, type rgba
(define *color-light-magenta* (new 'static 'rgba :r #xff :g #x80 :b #xff :a #x80))
;; definition for symbol *color-light-yellow*, type rgba
(define *color-light-yellow* (new 'static 'rgba :r #xff :g #xff :b #x80 :a #x80))
;; definition for symbol *color-dark-red*, type rgba
(define *color-dark-red* (new 'static 'rgba :r #x80 :a #x80))
;; definition for symbol *color-dark-green*, type rgba
(define *color-dark-green* (new 'static 'rgba :g #x80 :a #x80))
;; definition for symbol *color-dark-blue*, type rgba
(define *color-dark-blue* (new 'static 'rgba :b #x80 :a #x80))
;; definition for symbol *color-dark-cyan*, type rgba
(define *color-dark-cyan* (new 'static 'rgba :g #x80 :b #x80 :a #x80))
;; definition for symbol *color-dark-magenta*, type rgba
(define *color-dark-magenta* (new 'static 'rgba :r #x80 :b #x80 :a #x80))
;; definition for symbol *color-dark-yellow*, type rgba
(define *color-dark-yellow* (new 'static 'rgba :r #x80 :g #x80 :a #x80))
;; definition for symbol *color-orange*, type rgba
(define *color-orange* (new 'static 'rgba :r #xff :g #x80 :a #x80))
;; failed to figure out what this is:
0