mirror of
https://github.com/open-goal/jak-project
synced 2026-06-16 06:46:07 -04:00
4b8b2abbed
Adds the `pckernel` system to Jak 2, allowing you to do the PC-specific things that Jak 1 lets you do like change game resolution, etc. In other to reduce the amount of code duplication for something that we're gonna be changing a lot over time, I split it into a few more code files. In this new system, `pckernel-h.gc`, `pckernel-common.gc` (previously `pckernel.gc`) and `pc-debug-common.gc` are the files that should be shared across all games (I hacked the Jak 2 project to pull these files from the Jak 1 folder), while `pckernel-impl.gc`, `pckernel.gc` and `pc-debug-methods.gc` are their respective game-specific counterparts that should be loaded after. I'm not fully happy with this, I think it's slightly messy, but it cleanly separates code that should be game-specific and not accidentally copied around and code that should be the same for all games anyway.
804 lines
31 KiB
Common Lisp
Vendored
Generated
804 lines
31 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type profile-work
|
|
(deftype profile-work (structure)
|
|
((sprite-tmpl dma-gif-packet :inline :offset-assert 0)
|
|
(line-tmpl dma-gif-packet :inline :offset-assert 32)
|
|
(last-index int32 :offset-assert 64)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x44
|
|
:flag-assert #x900000044
|
|
)
|
|
|
|
;; definition for method 3 of type profile-work
|
|
(defmethod inspect profile-work ((obj profile-work))
|
|
(when (not obj)
|
|
(set! obj obj)
|
|
(goto cfg-4)
|
|
)
|
|
(format #t "[~8x] ~A~%" obj 'profile-work)
|
|
(format #t "~1Tsprite-tmpl: #<dma-gif-packet @ #x~X>~%" (-> obj sprite-tmpl))
|
|
(format #t "~1Tline-tmpl: #<dma-gif-packet @ #x~X>~%" (-> obj line-tmpl))
|
|
(format #t "~1Tlast-index: ~D~%" (-> obj last-index))
|
|
(label cfg-4)
|
|
obj
|
|
)
|
|
|
|
;; definition for symbol *profile-work*, type profile-work
|
|
(define *profile-work*
|
|
(new 'static 'profile-work
|
|
:sprite-tmpl (new 'static 'dma-gif-packet
|
|
:dma-vif (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :qwc #x4 :id (dma-tag-id cnt))
|
|
:vif1 (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd direct) :msk #x1)
|
|
)
|
|
:gif0 (new 'static 'gif-tag64
|
|
:nloop #x1
|
|
:eop #x1
|
|
:pre #x1
|
|
:prim (new 'static 'gs-prim :prim (gs-prim-type sprite) :abe #x1)
|
|
:nreg #x3
|
|
)
|
|
:gif1 (new 'static 'gif-tag-regs :regs0 (gif-reg-id rgbaq) :regs1 (gif-reg-id xyz2) :regs2 (gif-reg-id xyz2))
|
|
)
|
|
:line-tmpl (new 'static 'dma-gif-packet
|
|
:dma-vif (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :qwc #x4 :id (dma-tag-id cnt))
|
|
:vif1 (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd direct) :msk #x1)
|
|
)
|
|
:gif0 (new 'static 'gif-tag64
|
|
:nloop #x1
|
|
:eop #x1
|
|
:pre #x1
|
|
:prim (new 'static 'gs-prim :prim (gs-prim-type line) :abe #x1)
|
|
:nreg #x3
|
|
)
|
|
:gif1 (new 'static 'gif-tag-regs :regs0 (gif-reg-id rgbaq) :regs1 (gif-reg-id xyz2) :regs2 (gif-reg-id xyz2))
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for symbol *profile-x*, type int
|
|
(define *profile-x* 1808)
|
|
|
|
;; definition for symbol *profile-y*, type int
|
|
(define *profile-y* 1848)
|
|
|
|
;; definition for symbol *profile-w*, type int
|
|
(define *profile-w* 416)
|
|
|
|
;; definition for symbol *profile-h*, type int
|
|
(define *profile-h* 8)
|
|
|
|
;; definition for symbol *profile-ticks*, type symbol
|
|
(define *profile-ticks* #f)
|
|
|
|
;; definition for method 10 of type profile-segment-array
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod start-frame! profile-segment-array ((obj profile-segment-array))
|
|
(set! (-> obj count) 0)
|
|
(set! (-> obj depth) 0)
|
|
(set! (-> obj max-depth) 0)
|
|
(set! (-> obj base-time) (the-as int (timer-count (the-as timer-bank #x10000800))))
|
|
(start-segment! obj 'all *profile-all-color*)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 11 of type profile-segment-array
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod start-segment! profile-segment-array ((obj profile-segment-array) (arg0 symbol) (arg1 rgba))
|
|
(when (and *dproc* *debug-segment*)
|
|
(let ((s4-0 (-> obj data (-> obj count))))
|
|
(let ((s3-0 (-> obj base-time)))
|
|
(set! (-> s4-0 name) arg0)
|
|
(set! (-> s4-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-0))))
|
|
)
|
|
(set! (-> s4-0 depth) (the-as uint (-> obj depth)))
|
|
(set! (-> s4-0 color) arg1)
|
|
(set! (-> obj segment (-> obj depth)) s4-0)
|
|
)
|
|
(+! (-> obj count) 1)
|
|
(+! (-> obj depth) 1)
|
|
(set! (-> obj max-depth) (max (-> obj max-depth) (-> obj depth)))
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 12 of type profile-segment-array
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod end-segment! profile-segment-array ((obj profile-segment-array))
|
|
(when (and *dproc* *debug-segment*)
|
|
(let* ((v1-4 (+ (-> obj depth) -1))
|
|
(s5-0 (-> obj segment v1-4))
|
|
(s4-0 (-> obj base-time))
|
|
)
|
|
(when (>= v1-4 0)
|
|
(set! (-> s5-0 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-0))))
|
|
(+! (-> obj depth) -1)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for function profile-texture-test
|
|
(defun profile-texture-test ((arg0 bucket-id))
|
|
(or (= arg0 (bucket-id tex-lcom-sky-pre))
|
|
(= arg0 (bucket-id tex-l0-tfrag))
|
|
(= arg0 (bucket-id tex-l1-tfrag))
|
|
(= arg0 (bucket-id tex-l2-tfrag))
|
|
(= arg0 (bucket-id tex-l3-tfrag))
|
|
(= arg0 (bucket-id tex-l4-tfrag))
|
|
(= arg0 (bucket-id tex-l5-tfrag))
|
|
(= arg0 (bucket-id tex-l0-shrub))
|
|
(= arg0 (bucket-id tex-l1-shrub))
|
|
(= arg0 (bucket-id tex-l2-shrub))
|
|
(= arg0 (bucket-id tex-l3-shrub))
|
|
(= arg0 (bucket-id tex-l4-shrub))
|
|
(= arg0 (bucket-id tex-l5-shrub))
|
|
(= arg0 (bucket-id tex-l0-alpha))
|
|
(= arg0 (bucket-id tex-l1-alpha))
|
|
(= arg0 (bucket-id tex-l2-alpha))
|
|
(= arg0 (bucket-id tex-l3-alpha))
|
|
(= arg0 (bucket-id tex-l4-alpha))
|
|
(= arg0 (bucket-id tex-l5-alpha))
|
|
(= arg0 (bucket-id tex-lcom-tfrag))
|
|
(= arg0 (bucket-id tex-l0-pris))
|
|
(= arg0 (bucket-id tex-l1-pris))
|
|
(= arg0 (bucket-id tex-l2-pris))
|
|
(= arg0 (bucket-id tex-l3-pris))
|
|
(= arg0 (bucket-id tex-l4-pris))
|
|
(= arg0 (bucket-id tex-l5-pris))
|
|
(= arg0 (bucket-id tex-lcom-pris))
|
|
(= arg0 (bucket-id tex-l0-water))
|
|
(= arg0 (bucket-id tex-l1-water))
|
|
(= arg0 (bucket-id tex-l2-water))
|
|
(= arg0 (bucket-id tex-l3-water))
|
|
(= arg0 (bucket-id tex-l4-water))
|
|
(= arg0 (bucket-id tex-l5-water))
|
|
(= arg0 (bucket-id tex-lcom-water))
|
|
(= arg0 (bucket-id tex-all-sprite))
|
|
(= arg0 (bucket-id tex-all-warp))
|
|
(= arg0 (bucket-id tex-all-map))
|
|
)
|
|
)
|
|
|
|
;; definition for function profile-tfrag-test
|
|
(defun profile-tfrag-test ((arg0 bucket-id))
|
|
(or (= arg0 (bucket-id tfrag-l0-tfrag))
|
|
(= arg0 (bucket-id tfrag-l1-tfrag))
|
|
(= arg0 (bucket-id tfrag-l2-tfrag))
|
|
(= arg0 (bucket-id tfrag-l3-tfrag))
|
|
(= arg0 (bucket-id tfrag-l4-tfrag))
|
|
(= arg0 (bucket-id tfrag-l5-tfrag))
|
|
(= arg0 (bucket-id tfrag-s-l0-tfrag))
|
|
(= arg0 (bucket-id tfrag-s-l1-tfrag))
|
|
(= arg0 (bucket-id tfrag-s-l2-tfrag))
|
|
(= arg0 (bucket-id tfrag-s-l3-tfrag))
|
|
(= arg0 (bucket-id tfrag-s-l4-tfrag))
|
|
(= arg0 (bucket-id tfrag-s-l5-tfrag))
|
|
(= arg0 (bucket-id tfrag-t-l0-alpha))
|
|
(= arg0 (bucket-id tfrag-t-l1-alpha))
|
|
(= arg0 (bucket-id tfrag-t-l2-alpha))
|
|
(= arg0 (bucket-id tfrag-t-l3-alpha))
|
|
(= arg0 (bucket-id tfrag-t-l4-alpha))
|
|
(= arg0 (bucket-id tfrag-t-l5-alpha))
|
|
(= arg0 (bucket-id tfrag-w-l0-water))
|
|
(= arg0 (bucket-id tfrag-w-l1-water))
|
|
(= arg0 (bucket-id tfrag-w-l2-water))
|
|
(= arg0 (bucket-id tfrag-w-l3-water))
|
|
(= arg0 (bucket-id tfrag-w-l4-water))
|
|
(= arg0 (bucket-id tfrag-w-l5-water))
|
|
(= arg0 (bucket-id tfrag-st-l0-alpha))
|
|
(= arg0 (bucket-id tfrag-st-l1-alpha))
|
|
(= arg0 (bucket-id tfrag-st-l2-alpha))
|
|
(= arg0 (bucket-id tfrag-st-l3-alpha))
|
|
(= arg0 (bucket-id tfrag-st-l4-alpha))
|
|
(= arg0 (bucket-id tfrag-st-l5-alpha))
|
|
(= arg0 (bucket-id tfrag-ws-l0-water))
|
|
(= arg0 (bucket-id tfrag-ws-l1-water))
|
|
(= arg0 (bucket-id tfrag-ws-l2-water))
|
|
(= arg0 (bucket-id tfrag-ws-l3-water))
|
|
(= arg0 (bucket-id tfrag-ws-l4-water))
|
|
(= arg0 (bucket-id tfrag-ws-l5-water))
|
|
)
|
|
)
|
|
|
|
;; definition for function profile-tie-test
|
|
(defun profile-tie-test ((arg0 bucket-id))
|
|
(or (= arg0 (bucket-id tie-l0-tfrag))
|
|
(= arg0 (bucket-id tie-l1-tfrag))
|
|
(= arg0 (bucket-id tie-l2-tfrag))
|
|
(= arg0 (bucket-id tie-l3-tfrag))
|
|
(= arg0 (bucket-id tie-l4-tfrag))
|
|
(= arg0 (bucket-id tie-l5-tfrag))
|
|
(= arg0 (bucket-id etie-l0-tfrag))
|
|
(= arg0 (bucket-id etie-l1-tfrag))
|
|
(= arg0 (bucket-id etie-l2-tfrag))
|
|
(= arg0 (bucket-id etie-l3-tfrag))
|
|
(= arg0 (bucket-id etie-l4-tfrag))
|
|
(= arg0 (bucket-id etie-l5-tfrag))
|
|
(= arg0 (bucket-id tie-s-l0-tfrag))
|
|
(= arg0 (bucket-id tie-s-l1-tfrag))
|
|
(= arg0 (bucket-id tie-s-l2-tfrag))
|
|
(= arg0 (bucket-id tie-s-l3-tfrag))
|
|
(= arg0 (bucket-id tie-s-l4-tfrag))
|
|
(= arg0 (bucket-id tie-s-l5-tfrag))
|
|
(= arg0 (bucket-id etie-s-l0-tfrag))
|
|
(= arg0 (bucket-id etie-s-l1-tfrag))
|
|
(= arg0 (bucket-id etie-s-l2-tfrag))
|
|
(= arg0 (bucket-id etie-s-l3-tfrag))
|
|
(= arg0 (bucket-id etie-s-l4-tfrag))
|
|
(= arg0 (bucket-id etie-s-l5-tfrag))
|
|
(= arg0 (bucket-id tie-v-l0-tfrag))
|
|
(= arg0 (bucket-id tie-v-l1-tfrag))
|
|
(= arg0 (bucket-id tie-v-l2-tfrag))
|
|
(= arg0 (bucket-id tie-v-l3-tfrag))
|
|
(= arg0 (bucket-id tie-v-l4-tfrag))
|
|
(= arg0 (bucket-id tie-v-l5-tfrag))
|
|
(= arg0 (bucket-id tie-t-l0-alpha))
|
|
(= arg0 (bucket-id tie-t-l1-alpha))
|
|
(= arg0 (bucket-id tie-t-l2-alpha))
|
|
(= arg0 (bucket-id tie-t-l3-alpha))
|
|
(= arg0 (bucket-id tie-t-l4-alpha))
|
|
(= arg0 (bucket-id tie-t-l5-alpha))
|
|
(= arg0 (bucket-id etie-t-l0-alpha))
|
|
(= arg0 (bucket-id etie-t-l1-alpha))
|
|
(= arg0 (bucket-id etie-t-l2-alpha))
|
|
(= arg0 (bucket-id etie-t-l3-alpha))
|
|
(= arg0 (bucket-id etie-t-l4-alpha))
|
|
(= arg0 (bucket-id etie-t-l5-alpha))
|
|
(= arg0 (bucket-id tie-st-l0-alpha))
|
|
(= arg0 (bucket-id tie-st-l1-alpha))
|
|
(= arg0 (bucket-id tie-st-l2-alpha))
|
|
(= arg0 (bucket-id tie-st-l3-alpha))
|
|
(= arg0 (bucket-id tie-st-l4-alpha))
|
|
(= arg0 (bucket-id tie-st-l5-alpha))
|
|
(= arg0 (bucket-id etie-st-l0-alpha))
|
|
(= arg0 (bucket-id etie-st-l1-alpha))
|
|
(= arg0 (bucket-id etie-st-l2-alpha))
|
|
(= arg0 (bucket-id etie-st-l3-alpha))
|
|
(= arg0 (bucket-id etie-st-l4-alpha))
|
|
(= arg0 (bucket-id etie-st-l5-alpha))
|
|
)
|
|
)
|
|
|
|
;; definition for function profile-merc-test
|
|
(defun profile-merc-test ((arg0 bucket-id))
|
|
(or (= arg0 (bucket-id merc-l0-tfrag))
|
|
(= arg0 (bucket-id merc-l1-tfrag))
|
|
(= arg0 (bucket-id merc-l2-tfrag))
|
|
(= arg0 (bucket-id merc-l3-tfrag))
|
|
(= arg0 (bucket-id merc-l4-tfrag))
|
|
(= arg0 (bucket-id merc-l5-tfrag))
|
|
(= arg0 (bucket-id merc-l0-shrub))
|
|
(= arg0 (bucket-id merc-l1-shrub))
|
|
(= arg0 (bucket-id merc-l2-shrub))
|
|
(= arg0 (bucket-id merc-l3-shrub))
|
|
(= arg0 (bucket-id merc-l4-shrub))
|
|
(= arg0 (bucket-id merc-l5-shrub))
|
|
(= arg0 (bucket-id merc-l0-alpha))
|
|
(= arg0 (bucket-id merc-l1-alpha))
|
|
(= arg0 (bucket-id merc-l2-alpha))
|
|
(= arg0 (bucket-id merc-l3-alpha))
|
|
(= arg0 (bucket-id merc-l4-alpha))
|
|
(= arg0 (bucket-id merc-l5-alpha))
|
|
(= arg0 (bucket-id merc-lcom-tfrag))
|
|
(= arg0 (bucket-id merc-lcom-shrub))
|
|
(= arg0 (bucket-id merc-l0-pris))
|
|
(= arg0 (bucket-id merc-l1-pris))
|
|
(= arg0 (bucket-id merc-l2-pris))
|
|
(= arg0 (bucket-id merc-l3-pris))
|
|
(= arg0 (bucket-id merc-l4-pris))
|
|
(= arg0 (bucket-id merc-l5-pris))
|
|
(= arg0 (bucket-id merc-lcom-pris))
|
|
(= arg0 (bucket-id merc-l0-pris2))
|
|
(= arg0 (bucket-id merc-l1-pris2))
|
|
(= arg0 (bucket-id merc-l2-pris2))
|
|
(= arg0 (bucket-id merc-l3-pris2))
|
|
(= arg0 (bucket-id merc-l4-pris2))
|
|
(= arg0 (bucket-id merc-l5-pris2))
|
|
(= arg0 (bucket-id merc-lcom-pris2))
|
|
(= arg0 (bucket-id merc-l0-water))
|
|
(= arg0 (bucket-id merc-l1-water))
|
|
(= arg0 (bucket-id merc-l2-water))
|
|
(= arg0 (bucket-id merc-l3-water))
|
|
(= arg0 (bucket-id merc-l4-water))
|
|
(= arg0 (bucket-id merc-l5-water))
|
|
(= arg0 (bucket-id merc-lcom-water))
|
|
)
|
|
)
|
|
|
|
;; definition for function profile-emerc-test
|
|
(defun profile-emerc-test ((arg0 bucket-id))
|
|
(or (= arg0 (bucket-id emerc-l0-tfrag))
|
|
(= arg0 (bucket-id emerc-l1-tfrag))
|
|
(= arg0 (bucket-id emerc-l2-tfrag))
|
|
(= arg0 (bucket-id emerc-l3-tfrag))
|
|
(= arg0 (bucket-id emerc-l4-tfrag))
|
|
(= arg0 (bucket-id emerc-l5-tfrag))
|
|
(= arg0 (bucket-id emerc-l0-shrub))
|
|
(= arg0 (bucket-id emerc-l1-shrub))
|
|
(= arg0 (bucket-id emerc-l2-shrub))
|
|
(= arg0 (bucket-id emerc-l3-shrub))
|
|
(= arg0 (bucket-id emerc-l4-shrub))
|
|
(= arg0 (bucket-id emerc-l5-shrub))
|
|
(= arg0 (bucket-id emerc-l0-alpha))
|
|
(= arg0 (bucket-id emerc-l1-alpha))
|
|
(= arg0 (bucket-id emerc-l2-alpha))
|
|
(= arg0 (bucket-id emerc-l3-alpha))
|
|
(= arg0 (bucket-id emerc-l4-alpha))
|
|
(= arg0 (bucket-id emerc-l5-alpha))
|
|
(= arg0 (bucket-id emerc-lcom-tfrag))
|
|
(= arg0 (bucket-id emerc-lcom-shrub))
|
|
(= arg0 (bucket-id emerc-l0-pris))
|
|
(= arg0 (bucket-id emerc-l1-pris))
|
|
(= arg0 (bucket-id emerc-l2-pris))
|
|
(= arg0 (bucket-id emerc-l3-pris))
|
|
(= arg0 (bucket-id emerc-l4-pris))
|
|
(= arg0 (bucket-id emerc-l5-pris))
|
|
(= arg0 (bucket-id emerc-lcom-pris))
|
|
(= arg0 (bucket-id emerc-l0-pris2))
|
|
(= arg0 (bucket-id emerc-l1-pris2))
|
|
(= arg0 (bucket-id emerc-l2-pris2))
|
|
(= arg0 (bucket-id emerc-l3-pris2))
|
|
(= arg0 (bucket-id emerc-l4-pris2))
|
|
(= arg0 (bucket-id emerc-l5-pris2))
|
|
(= arg0 (bucket-id emerc-lcom-pris2))
|
|
)
|
|
)
|
|
|
|
;; definition for function profile-mercneric-test
|
|
(defun profile-mercneric-test ((arg0 bucket-id))
|
|
(or (= arg0 (bucket-id gmerc-l0-tfrag))
|
|
(= arg0 (bucket-id gmerc-l1-tfrag))
|
|
(= arg0 (bucket-id gmerc-l2-tfrag))
|
|
(= arg0 (bucket-id gmerc-l3-tfrag))
|
|
(= arg0 (bucket-id gmerc-l4-tfrag))
|
|
(= arg0 (bucket-id gmerc-l5-tfrag))
|
|
(= arg0 (bucket-id gmerc-l0-shrub))
|
|
(= arg0 (bucket-id gmerc-l1-shrub))
|
|
(= arg0 (bucket-id gmerc-l2-shrub))
|
|
(= arg0 (bucket-id gmerc-l3-shrub))
|
|
(= arg0 (bucket-id gmerc-l4-shrub))
|
|
(= arg0 (bucket-id gmerc-l5-shrub))
|
|
(= arg0 (bucket-id gmerc-l0-alpha))
|
|
(= arg0 (bucket-id gmerc-l1-alpha))
|
|
(= arg0 (bucket-id gmerc-l2-alpha))
|
|
(= arg0 (bucket-id gmerc-l3-alpha))
|
|
(= arg0 (bucket-id gmerc-l4-alpha))
|
|
(= arg0 (bucket-id gmerc-l5-alpha))
|
|
(= arg0 (bucket-id gmerc-lcom-tfrag))
|
|
(= arg0 (bucket-id gmerc-lcom-shrub))
|
|
(= arg0 (bucket-id gmerc-l0-pris))
|
|
(= arg0 (bucket-id gmerc-l1-pris))
|
|
(= arg0 (bucket-id gmerc-l2-pris))
|
|
(= arg0 (bucket-id gmerc-l3-pris))
|
|
(= arg0 (bucket-id gmerc-l4-pris))
|
|
(= arg0 (bucket-id gmerc-l5-pris))
|
|
(= arg0 (bucket-id gmerc-lcom-pris))
|
|
(= arg0 (bucket-id gmerc-l0-pris2))
|
|
(= arg0 (bucket-id gmerc-l1-pris2))
|
|
(= arg0 (bucket-id gmerc-l2-pris2))
|
|
(= arg0 (bucket-id gmerc-l3-pris2))
|
|
(= arg0 (bucket-id gmerc-l4-pris2))
|
|
(= arg0 (bucket-id gmerc-l5-pris2))
|
|
(= arg0 (bucket-id gmerc-lcom-pris2))
|
|
(= arg0 (bucket-id gmerc-l0-water))
|
|
(= arg0 (bucket-id gmerc-l1-water))
|
|
(= arg0 (bucket-id gmerc-l2-water))
|
|
(= arg0 (bucket-id gmerc-l3-water))
|
|
(= arg0 (bucket-id gmerc-l4-water))
|
|
(= arg0 (bucket-id gmerc-l5-water))
|
|
(= arg0 (bucket-id gmerc-lcom-water))
|
|
(= arg0 (bucket-id gmerc-warp))
|
|
)
|
|
)
|
|
|
|
;; definition for method 9 of type profile-array
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod setup-categories! profile-array ((obj profile-array))
|
|
(dotimes (s5-0 2)
|
|
(let ((s3-0 (-> *profile-array* data s5-0))
|
|
(s4-0 *profile-collapse*)
|
|
)
|
|
(mem-copy! (&-> s3-0 type) (&-> (-> obj data s5-0) type) 8240)
|
|
(cond
|
|
((zero? s5-0)
|
|
((lambda ((arg0 profile-segment-array) (arg1 profile-collapse))
|
|
(let ((v0-0 0))
|
|
(dotimes (v1-0 48)
|
|
(set! (-> arg1 data v1-0 name) #f)
|
|
(set! (-> arg1 data v1-0 count) (the-as uint 0))
|
|
(set! (-> arg1 data v1-0 vu-count) (the-as uint 0))
|
|
(set! (-> arg1 data v1-0 depth) (the-as uint 0))
|
|
(set! (-> arg1 data v1-0 start-time) 0)
|
|
(set! (-> arg1 data v1-0 end-time) 0)
|
|
)
|
|
(dotimes (v1-3 (-> arg0 count))
|
|
(let ((a2-15 (- (-> arg0 data v1-3 end-time) (-> arg0 data v1-3 start-time))))
|
|
(let ((t0-0 (-> arg0 data v1-3 name)))
|
|
(dotimes (a3-5 v0-0)
|
|
(when (= (-> arg1 data a3-5 name) t0-0)
|
|
(+! (-> arg1 data a3-5 count) 1)
|
|
(set! (-> arg1 data a3-5 start-time) (the-as int (+ (-> arg1 data a3-5 code-time) a2-15)))
|
|
(goto cfg-11)
|
|
)
|
|
)
|
|
(set! (-> arg1 data v0-0 name) t0-0)
|
|
)
|
|
(set! (-> arg1 data v0-0 count) (the-as uint 1))
|
|
(set! (-> arg1 data v0-0 depth) (-> arg0 data v1-3 depth))
|
|
(set! (-> arg1 data v0-0 start-time) a2-15)
|
|
)
|
|
(set! (-> arg1 data v0-0 color) (-> arg0 data v1-3 color))
|
|
(set! v0-0 (min 47 (+ v0-0 1)))
|
|
(label cfg-11)
|
|
)
|
|
(set! (-> arg1 count) v0-0)
|
|
)
|
|
(none)
|
|
)
|
|
s3-0
|
|
s4-0
|
|
)
|
|
)
|
|
(else
|
|
(let ((s2-0 3)
|
|
(s1-0 (+ (-> s3-0 count) -1))
|
|
)
|
|
(while (>= s1-0 s2-0)
|
|
(let ((s0-0 (-> s3-0 data s2-0)))
|
|
(cond
|
|
((= s2-0 3)
|
|
(set! (-> s0-0 name) 'blit-displays)
|
|
(set! (-> s0-0 color) *profile-blit-color*)
|
|
)
|
|
((= s2-0 5)
|
|
(set! (-> s0-0 name) 'sky)
|
|
(set! (-> s0-0 color) *profile-sky-color*)
|
|
)
|
|
((or (= s2-0 6) (= s2-0 310))
|
|
(set! (-> s0-0 name) 'ocean)
|
|
(set! (-> s0-0 color) *profile-ocean-color*)
|
|
)
|
|
((profile-texture-test (the-as bucket-id s2-0))
|
|
(set! (-> s0-0 name) 'texture)
|
|
(set! (-> s0-0 color) *profile-texture-color*)
|
|
)
|
|
((profile-tfrag-test (the-as bucket-id s2-0))
|
|
(set! (-> s0-0 name) 'tfrag)
|
|
(set! (-> s0-0 color) *profile-tfrag-color*)
|
|
)
|
|
((profile-tie-test (the-as bucket-id s2-0))
|
|
(set! (-> s0-0 name) 'instance-tie)
|
|
(set! (-> s0-0 color) *profile-instance-tie-color*)
|
|
)
|
|
((profile-merc-test (the-as bucket-id s2-0))
|
|
(set! (-> s0-0 name) 'merc)
|
|
(set! (-> s0-0 color) *profile-merc-color*)
|
|
)
|
|
((profile-emerc-test (the-as bucket-id s2-0))
|
|
(set! (-> s0-0 name) 'emerc)
|
|
(set! (-> s0-0 color) *profile-emerc-color*)
|
|
)
|
|
((profile-mercneric-test (the-as bucket-id s2-0))
|
|
(set! (-> s0-0 name) 'generic-merc)
|
|
(set! (-> s0-0 color) *profile-generic-merc-color*)
|
|
)
|
|
((or (and (>= s2-0 74) (>= 78 s2-0))
|
|
(and (>= s2-0 83) (>= 87 s2-0))
|
|
(and (>= s2-0 92) (>= 96 s2-0))
|
|
(and (>= s2-0 101) (>= 105 s2-0))
|
|
(and (>= s2-0 110) (>= 114 s2-0))
|
|
(and (>= s2-0 119) (>= 123 s2-0))
|
|
)
|
|
(set! (-> s0-0 name) 'instance-shrubbery)
|
|
(set! (-> s0-0 color) *profile-instance-shrubbery-color*)
|
|
)
|
|
((or (= s2-0 195) (= s2-0 314))
|
|
(set! (-> s0-0 name) 'shadow)
|
|
(set! (-> s0-0 color) *profile-shadow-color*)
|
|
)
|
|
((= s2-0 313)
|
|
(set! (-> s0-0 name) 'particles)
|
|
(set! (-> s0-0 color) *profile-particles-color*)
|
|
)
|
|
((or (= s2-0 324) (= s2-0 325) (= s2-0 318) (= s2-0 326))
|
|
(set! (-> s0-0 name) 'debug)
|
|
(set! (-> s0-0 color) *profile-debug-color*)
|
|
)
|
|
((= s2-0 311)
|
|
(set! (-> s0-0 name) 'depth-cue)
|
|
(set! (-> s0-0 color) *profile-blit-color*)
|
|
)
|
|
((= s2-0 315)
|
|
(set! (-> s0-0 name) 'effects)
|
|
(set! (-> s0-0 color) *profile-effects-color*)
|
|
)
|
|
((or (= s2-0 320) (= s2-0 321) (= s2-0 322) (= s2-0 323))
|
|
(set! (-> s0-0 name) 'hud)
|
|
(set! (-> s0-0 color) *profile-hud-color*)
|
|
)
|
|
)
|
|
(let ((v1-87 (- (-> s0-0 end-time) (-> s0-0 start-time)))
|
|
(a1-2 (-> s0-0 name))
|
|
)
|
|
(dotimes (a0-29 (-> s4-0 count))
|
|
(when (= (-> s4-0 data a0-29 name) a1-2)
|
|
(+! (-> s4-0 data a0-29 vu-count) 1)
|
|
(set! (-> s4-0 data a0-29 end-time) (the-as int (+ (-> s4-0 data a0-29 vu-time) v1-87)))
|
|
(goto cfg-91)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-91)
|
|
(+! s2-0 1)
|
|
)
|
|
)
|
|
(countdown (v1-94 (-> s3-0 count))
|
|
(when (nonzero? (-> s3-0 data v1-94 end-time))
|
|
(set! (-> s4-0 data 0 vu-count) (the-as uint 1))
|
|
(set! (-> s4-0 data 0 end-time) (- (-> s3-0 data v1-94 end-time) (-> s3-0 data 0 start-time)))
|
|
(goto cfg-99)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-99)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 10 of type profile-array
|
|
;; INFO: Used lq/sq
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod draw-bars! profile-array ((obj profile-array) (arg0 dma-buffer) (arg1 int))
|
|
(local-vars (sv-16 (function _varargs_ object)) (sv-32 (function _varargs_ object)))
|
|
(let* ((v1-0 arg0)
|
|
(a0-1 (the-as object (-> v1-0 base)))
|
|
)
|
|
(set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :qwc #xa :id (dma-tag-id cnt)))
|
|
(set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :imm #xa :cmd (vif-cmd direct) :msk #x1))
|
|
(set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16))
|
|
)
|
|
(let* ((v1-1 arg0)
|
|
(a0-3 (the-as object (-> v1-1 base)))
|
|
)
|
|
(set! (-> (the-as gs-gif-tag a0-3) tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x9))
|
|
(set! (-> (the-as gs-gif-tag a0-3) regs) GIF_REGS_ALL_AD)
|
|
(set! (-> v1-1 base) (&+ (the-as pointer a0-3) 16))
|
|
)
|
|
(let* ((v1-2 arg0)
|
|
(a0-5 (-> v1-2 base))
|
|
)
|
|
(set! (-> (the-as (pointer gs-alpha) a0-5) 0) (new 'static 'gs-alpha :b #x1 :d #x1))
|
|
(set! (-> (the-as (pointer gs-reg64) a0-5) 1) (gs-reg64 alpha-1))
|
|
(set! (-> (the-as (pointer gs-zbuf) a0-5) 2) (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24) :zmsk #x1))
|
|
(set! (-> (the-as (pointer gs-reg64) a0-5) 3) (gs-reg64 zbuf-1))
|
|
(set! (-> (the-as (pointer gs-test) a0-5) 4) (new 'static 'gs-test :zte #x1 :ztst (gs-ztest always)))
|
|
(set! (-> (the-as (pointer gs-reg64) a0-5) 5) (gs-reg64 test-1))
|
|
(set! (-> (the-as (pointer uint64) a0-5) 6) (the-as uint 0))
|
|
(set! (-> (the-as (pointer gs-reg64) a0-5) 7) (gs-reg64 pabe))
|
|
(set! (-> (the-as (pointer gs-clamp) a0-5) 8)
|
|
(new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))
|
|
)
|
|
(set! (-> (the-as (pointer gs-reg64) a0-5) 9) (gs-reg64 clamp-1))
|
|
(set! (-> (the-as (pointer gs-tex1) a0-5) 10) (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
|
(set! (-> (the-as (pointer gs-reg64) a0-5) 11) (gs-reg64 tex1-1))
|
|
(set! (-> (the-as (pointer gs-texa) a0-5) 12) (new 'static 'gs-texa :ta1 #x80))
|
|
(set! (-> (the-as (pointer gs-reg64) a0-5) 13) (gs-reg64 texa))
|
|
(set! (-> (the-as (pointer gs-texclut) a0-5) 14) (new 'static 'gs-texclut :cbw #x4))
|
|
(set! (-> (the-as (pointer gs-reg64) a0-5) 15) (gs-reg64 texclut))
|
|
(set! (-> (the-as (pointer uint64) a0-5) 16) (the-as uint *fog-color*))
|
|
(set! (-> (the-as (pointer gs-reg64) a0-5) 17) (gs-reg64 fogcol))
|
|
(set! (-> v1-2 base) (&+ a0-5 144))
|
|
)
|
|
(let ((v1-5 (* (+ *profile-x* (/ *profile-w* 2)) 16))
|
|
(a0-9 (-> arg0 base))
|
|
)
|
|
(set! (-> (the-as (pointer uint128) a0-9) 0) (-> *profile-work* line-tmpl dma-vif quad))
|
|
(set! (-> (the-as (pointer uint128) a0-9) 1) (-> *profile-work* line-tmpl quad 1))
|
|
(set-vector! (the-as vector4w (&+ a0-9 32)) 64 64 64 64)
|
|
(set-vector! (the-as vector4w (&+ a0-9 48)) v1-5 #x7340 #xffffff 0)
|
|
(set-vector! (the-as vector4w (&+ a0-9 64)) v1-5 #x7580 #xffffff 0)
|
|
)
|
|
(&+! (-> arg0 base) 80)
|
|
(dotimes (s3-0 2)
|
|
(let* ((v1-12 (-> obj data s3-0))
|
|
(a0-11 (-> v1-12 max-depth))
|
|
(s2-1 (max 14 (* a0-11 2)))
|
|
)
|
|
(set! *profile-y* (+ arg1 1840))
|
|
(let ((a1-32 (-> arg0 base)))
|
|
(set! (-> (the-as (pointer uint128) a1-32) 0) (-> *profile-work* sprite-tmpl dma-vif quad))
|
|
(set! (-> (the-as (pointer uint128) a1-32) 1) (-> *profile-work* sprite-tmpl quad 1))
|
|
(set-vector! (the-as vector4w (&+ a1-32 32)) 64 64 64 64)
|
|
(set-vector! (the-as vector4w (&+ a1-32 48)) (* *profile-x* 16) (* *profile-y* 16) #xffffff 0)
|
|
(set-vector!
|
|
(the-as vector4w (&+ a1-32 64))
|
|
(* (+ *profile-x* *profile-w*) 16)
|
|
(* (+ *profile-y* s2-1) 16)
|
|
#xffffff
|
|
0
|
|
)
|
|
)
|
|
(&+! (-> arg0 base) 80)
|
|
(let ((a0-12 (/ s2-1 a0-11)))
|
|
(dotimes (a1-36 (+ (-> v1-12 count) -1))
|
|
(let ((a2-22 (-> v1-12 data a1-36)))
|
|
(when (< (-> a2-22 start-time) (-> a2-22 end-time))
|
|
(let* ((t0-1 (* *ticks-per-frame* 2))
|
|
(a3-15 (* (+ *profile-x* (/ (* (-> a2-22 start-time) *profile-w*) t0-1)) 16))
|
|
(t0-4 (* (+ *profile-x* (/ (* (-> a2-22 end-time) *profile-w*) t0-1)) 16))
|
|
(t3-1 (* (+ arg1 1840 (* (-> a2-22 depth) (the-as uint a0-12))) 16))
|
|
(t1-7 (+ t3-1 (* a0-12 16)))
|
|
(t2-5 (-> arg0 base))
|
|
)
|
|
(set! (-> (the-as (pointer int128) t2-5) 0) (the-as int128 (-> *profile-work* sprite-tmpl dma-vif quad)))
|
|
(set! (-> (the-as (pointer int128) t2-5) 1) (the-as int128 (-> *profile-work* sprite-tmpl quad 1)))
|
|
(set-vector!
|
|
(the-as vector4w (&+ t2-5 32))
|
|
(the int (* 1.9921875 (the float (-> a2-22 color r))))
|
|
(the int (* 1.9921875 (the float (-> a2-22 color g))))
|
|
(the int (* 1.9921875 (the float (-> a2-22 color b))))
|
|
(the-as int (-> a2-22 color a))
|
|
)
|
|
(set-vector! (the-as vector4w (&+ t2-5 48)) a3-15 t3-1 #xffffff 0)
|
|
(set-vector! (the-as vector4w (&+ t2-5 64)) t0-4 t1-7 #xffffff 0)
|
|
)
|
|
(&+! (-> arg0 base) 80)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(cond
|
|
((zero? s3-0)
|
|
(let* ((s1-0 (-> v1-12 data 0 end-time))
|
|
(f30-0 (* 100.0 (/ (the float s1-0) (the float *ticks-per-frame*))))
|
|
)
|
|
(cond
|
|
(*profile-ticks*
|
|
(let ((s0-0 draw-string-xy))
|
|
(set! sv-16 format)
|
|
(let ((a0-16 (clear *temp-string*))
|
|
(a1-37 "~5D")
|
|
)
|
|
(sv-16 a0-16 a1-37 s1-0)
|
|
)
|
|
(s0-0
|
|
*temp-string*
|
|
arg0
|
|
488
|
|
arg1
|
|
(if (>= f30-0 100.0)
|
|
(font-color red)
|
|
(font-color default)
|
|
)
|
|
(font-flags shadow right)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(let ((s1-1 draw-string-xy))
|
|
(format (clear *temp-string*) "~5,,2f" f30-0)
|
|
(s1-1
|
|
*temp-string*
|
|
arg0
|
|
488
|
|
arg1
|
|
(if (>= f30-0 100.0)
|
|
(font-color red)
|
|
(font-color default)
|
|
)
|
|
(font-flags shadow right)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(let ((s1-2 0))
|
|
(countdown (a0-21 (-> v1-12 count))
|
|
(when (nonzero? (-> v1-12 data a0-21 end-time))
|
|
(set! s1-2 (- (-> v1-12 data a0-21 end-time) (-> v1-12 data 0 start-time)))
|
|
(goto cfg-23)
|
|
)
|
|
)
|
|
(label cfg-23)
|
|
(let ((f30-1 (* 100.0 (/ (the float s1-2) (the float *ticks-per-frame*)))))
|
|
(cond
|
|
(*profile-ticks*
|
|
(let ((s0-2 draw-string-xy))
|
|
(set! sv-32 format)
|
|
(let ((a0-26 (clear *temp-string*))
|
|
(a1-45 "~5D")
|
|
)
|
|
(sv-32 a0-26 a1-45 s1-2)
|
|
)
|
|
(s0-2
|
|
*temp-string*
|
|
arg0
|
|
488
|
|
arg1
|
|
(if (>= f30-1 100.0)
|
|
(font-color red)
|
|
(font-color default)
|
|
)
|
|
(font-flags shadow right)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(let ((s1-3 draw-string-xy))
|
|
(format (clear *temp-string*) "~5,,2f" f30-1)
|
|
(s1-3
|
|
*temp-string*
|
|
arg0
|
|
488
|
|
arg1
|
|
(if (>= f30-1 100.0)
|
|
(font-color red)
|
|
(font-color default)
|
|
)
|
|
(font-flags shadow right)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! arg1 (+ s2-1 2 arg1))
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 11 of type profile-array
|
|
;; WARN: Return type mismatch int vs none.
|
|
(defmethod draw-text! profile-array ((obj profile-array))
|
|
(let ((gp-0 *profile-collapse*))
|
|
(dotimes (s5-0 (-> gp-0 count))
|
|
(when (or (nonzero? (-> gp-0 data s5-0 count)) (nonzero? (-> gp-0 data s5-0 vu-count)))
|
|
(dotimes (s4-0 (the-as int (-> gp-0 data s5-0 depth)))
|
|
(format *stdcon* " ")
|
|
)
|
|
(format *stdcon* "~o~s~0k" (-> gp-0 data s5-0 color) (symbol->string (-> gp-0 data s5-0 name)))
|
|
(if (nonzero? (-> gp-0 data s5-0 count))
|
|
(format
|
|
*stdcon*
|
|
"~170h~5d~220h~5d~280h~5,,2f"
|
|
(-> gp-0 data s5-0 count)
|
|
(-> gp-0 data s5-0 code-time)
|
|
(* 100.0 (/ (the float (-> gp-0 data s5-0 code-time)) (the float *ticks-per-frame*)))
|
|
)
|
|
)
|
|
(if (nonzero? (-> gp-0 data s5-0 vu-count))
|
|
(format
|
|
*stdcon*
|
|
"~338h~5d~388h~5d~448h~5,,2f"
|
|
(-> gp-0 data s5-0 vu-count)
|
|
(-> gp-0 data s5-0 vu-time)
|
|
(* 100.0 (/ (the float (-> gp-0 data s5-0 vu-time)) (the float *ticks-per-frame*)))
|
|
)
|
|
)
|
|
(format *stdcon* "~1k~%")
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|