mirror of
https://github.com/open-goal/jak-project
synced 2026-09-12 12:55:22 -04:00
d/jak2: update related gsrc code as well
This commit is contained in:
@@ -14,13 +14,16 @@
|
||||
(define-extern add-debug-x (function symbol bucket-id vector rgba symbol))
|
||||
(define-extern add-debug-vector (function symbol bucket-id vector vector meters rgba symbol))
|
||||
|
||||
(define-extern add-debug-line2d (function symbol bucket-id vector vector vector symbol))
|
||||
(define-extern add-debug-line2d (function symbol bucket-id vector4w vector4w vector4w symbol))
|
||||
(define-extern add-debug-text-3d (function symbol bucket-id string vector font-color vector2h symbol))
|
||||
(define-extern add-debug-text-sphere (function symbol bucket-id vector meters string rgba symbol))
|
||||
|
||||
;; NOTE - for debug
|
||||
(define-extern add-debug-sphere (function symbol bucket-id vector meters rgba symbol))
|
||||
|
||||
;; NOTE - for joint-mod-h
|
||||
(define-extern add-debug-matrix (function symbol bucket-id matrix meters matrix))
|
||||
|
||||
;; NOTE - for menu
|
||||
;; +++debug-menu-msg
|
||||
(defenum debug-menu-msg
|
||||
@@ -65,6 +68,7 @@
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
|
||||
(deftype debug-vertex (structure)
|
||||
((trans vector4w :inline :offset-assert 0)
|
||||
(normal vector3h :inline :offset-assert 16)
|
||||
@@ -87,27 +91,47 @@
|
||||
:flag-assert #x900004b10
|
||||
)
|
||||
|
||||
(define *color-black* (new 'static 'rgba :a #x80))
|
||||
(define *color-white* (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80))
|
||||
(define *color-gray* (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80))
|
||||
(define *color-red* (new 'static 'rgba :r #xff :a #x80))
|
||||
(define *color-green* (new 'static 'rgba :g #xff :a #x80))
|
||||
(define *color-blue* (new 'static 'rgba :b #xff :a #x80))
|
||||
(define *color-cyan* (new 'static 'rgba :g #xff :b #xff :a #x80))
|
||||
(define *color-magenta* (new 'static 'rgba :r #xff :b #xff :a #x80))
|
||||
(define *color-yellow* (new 'static 'rgba :r #xff :g #xff :a #x80))
|
||||
(define *color-light-red* (new 'static 'rgba :r #xff :g #x80 :b #x80 :a #x80))
|
||||
(define *color-light-green* (new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80))
|
||||
(define *color-light-blue* (new 'static 'rgba :r #x80 :g #x80 :b #xff :a #x80))
|
||||
(define *color-light-cyan* (new 'static 'rgba :r #x80 :g #xff :b #xff :a #x80))
|
||||
(define *color-light-magenta* (new 'static 'rgba :r #xff :g #x80 :b #xff :a #x80))
|
||||
(define *color-light-yellow* (new 'static 'rgba :r #xff :g #xff :b #x80 :a #x80))
|
||||
(define *color-dark-red* (new 'static 'rgba :r #x80 :a #x80))
|
||||
(define *color-dark-green* (new 'static 'rgba :g #x80 :a #x80))
|
||||
(define *color-dark-blue* (new 'static 'rgba :b #x80 :a #x80))
|
||||
(define *color-dark-cyan* (new 'static 'rgba :g #x80 :b #x80 :a #x80))
|
||||
(define *color-dark-magenta* (new 'static 'rgba :r #x80 :b #x80 :a #x80))
|
||||
(define *color-dark-yellow* (new 'static 'rgba :r #x80 :g #x80 :a #x80))
|
||||
(define *color-orange* (new 'static 'rgba :r #xff :g #x80 :a #x80))
|
||||
|
||||
(define-extern add-debug-matrix (function symbol bucket-id matrix meters matrix))
|
||||
(define *color-black* (new 'static 'rgba :a #x80))
|
||||
|
||||
(define *color-white* (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80))
|
||||
|
||||
(define *color-gray* (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80))
|
||||
|
||||
(define *color-red* (new 'static 'rgba :r #xff :a #x80))
|
||||
|
||||
(define *color-green* (new 'static 'rgba :g #xff :a #x80))
|
||||
|
||||
(define *color-blue* (new 'static 'rgba :b #xff :a #x80))
|
||||
|
||||
(define *color-cyan* (new 'static 'rgba :g #xff :b #xff :a #x80))
|
||||
|
||||
(define *color-magenta* (new 'static 'rgba :r #xff :b #xff :a #x80))
|
||||
|
||||
(define *color-yellow* (new 'static 'rgba :r #xff :g #xff :a #x80))
|
||||
|
||||
(define *color-light-red* (new 'static 'rgba :r #xff :g #x80 :b #x80 :a #x80))
|
||||
|
||||
(define *color-light-green* (new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80))
|
||||
|
||||
(define *color-light-blue* (new 'static 'rgba :r #x80 :g #x80 :b #xff :a #x80))
|
||||
|
||||
(define *color-light-cyan* (new 'static 'rgba :r #x80 :g #xff :b #xff :a #x80))
|
||||
|
||||
(define *color-light-magenta* (new 'static 'rgba :r #xff :g #x80 :b #xff :a #x80))
|
||||
|
||||
(define *color-light-yellow* (new 'static 'rgba :r #xff :g #xff :b #x80 :a #x80))
|
||||
|
||||
(define *color-dark-red* (new 'static 'rgba :r #x80 :a #x80))
|
||||
|
||||
(define *color-dark-green* (new 'static 'rgba :g #x80 :a #x80))
|
||||
|
||||
(define *color-dark-blue* (new 'static 'rgba :b #x80 :a #x80))
|
||||
|
||||
(define *color-dark-cyan* (new 'static 'rgba :g #x80 :b #x80 :a #x80))
|
||||
|
||||
(define *color-dark-magenta* (new 'static 'rgba :r #x80 :b #x80 :a #x80))
|
||||
|
||||
(define *color-dark-yellow* (new 'static 'rgba :r #x80 :g #x80 :a #x80))
|
||||
|
||||
(define *color-orange* (new 'static 'rgba :r #xff :g #x80 :a #x80))
|
||||
|
||||
@@ -670,8 +670,7 @@
|
||||
#f
|
||||
)
|
||||
|
||||
(defun-debug add-debug-line2d ((enable symbol) (bucket bucket-id) (start vector) (end vector) (color vector))
|
||||
"Draw a line in screen coordinates"
|
||||
(defun-debug add-debug-line2d ((enable symbol) (bucket bucket-id) (start vector4w) (end vector4w) (color vector4w))
|
||||
(if (not enable)
|
||||
(return #f)
|
||||
)
|
||||
@@ -683,11 +682,11 @@
|
||||
)
|
||||
(set! (-> p0 quad) (-> start quad))
|
||||
(set! (-> p1 quad) (-> end quad))
|
||||
(set! (-> p0 x) (* (+ (-> p0 x) 2048) 16))
|
||||
(set! (-> p0 y) (* -16 (- 2048 (-> p0 y))))
|
||||
(set! (-> p0 x) (the-as int (* (+ (-> p0 x) 2048) 16)))
|
||||
(set! (-> p0 y) (* -16 (the-as int (- 2048 (the-as int (-> p0 y))))))
|
||||
(set! (-> p0 z) #x7fffff)
|
||||
(set! (-> p1 x) (* (+ (-> p1 x) 2048) 16))
|
||||
(set! (-> p1 y) (* -16 (- 2048 (-> p1 y))))
|
||||
(set! (-> p1 x) (the-as int (* (+ (-> p1 x) 2048) 16)))
|
||||
(set! (-> p1 y) (* -16 (the-as int (- 2048 (the-as int (-> p1 y))))))
|
||||
(set! (-> p1 z) #x7fffff)
|
||||
(let ((a0-18 (the-as (pointer uint64) (-> buf base))))
|
||||
(let* ((a1-7 buf)
|
||||
@@ -701,22 +700,20 @@
|
||||
(let* ((a1-8 buf)
|
||||
(giftag (the-as gs-gif-tag (-> a1-8 base)))
|
||||
)
|
||||
(set! (-> giftag tag)
|
||||
(new 'static 'gif-tag64
|
||||
:nloop #x1
|
||||
:eop #x1
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type line) :iip #x1 :abe #x1)
|
||||
:nreg #x4
|
||||
)
|
||||
(set! (-> giftag tag) (new 'static 'gif-tag64
|
||||
:nloop #x1
|
||||
:eop #x1
|
||||
:pre #x1
|
||||
:prim (new 'static 'gs-prim :prim (gs-prim-type line) :iip #x1 :abe #x1)
|
||||
:nreg #x4
|
||||
)
|
||||
)
|
||||
(set! (-> giftag regs)
|
||||
(new 'static 'gif-tag-regs
|
||||
:regs0 (gif-reg-id rgbaq)
|
||||
:regs1 (gif-reg-id xyzf2)
|
||||
:regs2 (gif-reg-id rgbaq)
|
||||
:regs3 (gif-reg-id xyzf2)
|
||||
)
|
||||
(set! (-> giftag regs) (new 'static 'gif-tag-regs
|
||||
:regs0 (gif-reg-id rgbaq)
|
||||
:regs1 (gif-reg-id xyzf2)
|
||||
:regs2 (gif-reg-id rgbaq)
|
||||
:regs3 (gif-reg-id xyzf2)
|
||||
)
|
||||
)
|
||||
(set! (-> a1-8 base) (&+ (the-as pointer giftag) 16))
|
||||
)
|
||||
@@ -1943,4 +1940,4 @@
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user