mirror of
https://github.com/open-goal/jak-project
synced 2026-09-10 20:29:51 -04:00
port pckernel to Jak 2 (#2248)
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.
This commit is contained in:
+13
-21
@@ -42,8 +42,7 @@
|
||||
|
||||
;; definition (debug) for function add-debug-point
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Failed store: (s.w! (+ a0-6 8) 0) at op 152
|
||||
;; WARN: Failed store: (s.w! (+ a0-6 12) 0) at op 153
|
||||
;; ERROR: Failed store: (s.w! (+ a0-6 8) 0) at op 152
|
||||
(defun-debug add-debug-point ((enable-draw symbol) (bucket bucket-id) (pt vector))
|
||||
(if (not enable-draw)
|
||||
(return #f)
|
||||
@@ -157,8 +156,7 @@
|
||||
|
||||
;; definition (debug) for function internal-draw-debug-line
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Failed store: (s.w! (+ a0-29 8) 0) at op 271
|
||||
;; WARN: Failed store: (s.w! (+ a0-29 12) 0) at op 272
|
||||
;; ERROR: Failed store: (s.w! (+ a0-29 8) 0) at op 271
|
||||
(defun-debug internal-draw-debug-line ((bucket bucket-id) (start vector) (end vector) (start-color rgba) (mode symbol) (end-color rgba))
|
||||
(local-vars (var-end vector) (sv-128 vector) (sv-144 vector))
|
||||
(set! var-end end)
|
||||
@@ -292,8 +290,7 @@
|
||||
|
||||
;; definition (debug) for function internal-draw-debug-text-3d
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Failed store: (s.w! (+ v1-12 8) 0) at op 54
|
||||
;; WARN: Failed store: (s.w! (+ v1-12 12) 0) at op 55
|
||||
;; ERROR: Failed store: (s.w! (+ v1-12 8) 0) at op 54
|
||||
(defun-debug internal-draw-debug-text-3d ((bucket bucket-id) (text string) (position vector) (color font-color) (screen-offset vector2h))
|
||||
(let ((screen-pos (new 'stack-no-clear 'vector4w)))
|
||||
(set! (-> screen-pos quad) (the-as uint128 0))
|
||||
@@ -352,8 +349,7 @@
|
||||
|
||||
;; definition (debug) for function add-debug-flat-triangle
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Failed store: (s.w! (+ a0-13 8) 0) at op 153
|
||||
;; WARN: Failed store: (s.w! (+ a0-13 12) 0) at op 154
|
||||
;; ERROR: Failed store: (s.w! (+ a0-13 8) 0) at op 153
|
||||
(defun-debug add-debug-flat-triangle ((enable symbol) (bucket bucket-id) (p0 vector) (p1 vector) (p2 vector) (color rgba))
|
||||
(local-vars (sv-160 vector) (sv-176 vector))
|
||||
(set! sv-160 p0)
|
||||
@@ -660,8 +656,7 @@
|
||||
|
||||
;; definition (debug) for function add-debug-line2d
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Failed store: (s.w! (+ v1-12 8) 0) at op 115
|
||||
;; WARN: Failed store: (s.w! (+ v1-12 12) 0) at op 116
|
||||
;; ERROR: Failed store: (s.w! (+ v1-12 8) 0) at op 115
|
||||
(defun-debug add-debug-line2d ((enable symbol) (bucket bucket-id) (start vector4w) (end vector4w) (color vector4w))
|
||||
(if (not enable)
|
||||
(return #f)
|
||||
@@ -1025,7 +1020,7 @@
|
||||
;; definition (debug) for function add-debug-text-sphere
|
||||
(defun-debug add-debug-text-sphere ((enable symbol) (bucket bucket-id) (position vector) (radius meters) (text string) (color rgba))
|
||||
(add-debug-sphere enable bucket position radius color)
|
||||
(add-debug-text-3d enable bucket text position (font-color default-#cddbcd) (the-as vector2h #f))
|
||||
(add-debug-text-3d enable bucket text position (font-color default) (the-as vector2h #f))
|
||||
#f
|
||||
)
|
||||
|
||||
@@ -1443,8 +1438,7 @@
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Stack slot offset 32 signed mismatch
|
||||
;; WARN: Stack slot offset 32 signed mismatch
|
||||
;; WARN: Failed store: (s.w! (+ v1-9 8) 0) at op 47
|
||||
;; WARN: Failed store: (s.w! (+ v1-9 12) 0) at op 48
|
||||
;; ERROR: Failed store: (s.w! (+ v1-9 8) 0) at op 47
|
||||
(defun-debug debug-percent-bar ((enable symbol) (bucket bucket-id) (x int) (y int) (percentage float) (color rgba) (width int) (height int))
|
||||
(local-vars (sv-16 int) (sv-32 float))
|
||||
(set! sv-16 y)
|
||||
@@ -1468,8 +1462,7 @@
|
||||
|
||||
;; definition (debug) for function debug-pad-display
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Failed store: (s.w! (+ v1-16 8) 0) at op 75
|
||||
;; WARN: Failed store: (s.w! (+ v1-16 12) 0) at op 76
|
||||
;; ERROR: Failed store: (s.w! (+ v1-16 8) 0) at op 75
|
||||
(defun-debug debug-pad-display ((pad cpad-info))
|
||||
(let ((stick-history (new 'static 'inline-array vector 32
|
||||
(new 'static 'vector)
|
||||
@@ -1619,6 +1612,7 @@
|
||||
)
|
||||
|
||||
;; 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))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tlength: ~D~%" (-> obj length))
|
||||
@@ -1741,8 +1735,7 @@
|
||||
;; definition (debug) for function add-debug-cursor
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
;; WARN: Failed store: (s.w! (+ v1-9 8) 0) at op 38
|
||||
;; WARN: Failed store: (s.w! (+ v1-9 12) 0) at op 39
|
||||
;; ERROR: Failed store: (s.w! (+ v1-9 8) 0) at op 38
|
||||
(defun-debug add-debug-cursor ((enable symbol) (bucket bucket-id) (x int) (y int) (arg4 int))
|
||||
(when enable
|
||||
(with-dma-buffer-add-bucket ((buf (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
@@ -1757,7 +1750,7 @@
|
||||
(+ y -4)
|
||||
(cond
|
||||
((= v1-7 1)
|
||||
(font-color precursor-#ec3b00)
|
||||
(font-color red)
|
||||
)
|
||||
((= v1-7 2)
|
||||
(font-color yellow-#f3f300)
|
||||
@@ -1766,7 +1759,7 @@
|
||||
(font-color green-#3df23d)
|
||||
)
|
||||
(else
|
||||
(font-color default-#cddbcd)
|
||||
(font-color default)
|
||||
)
|
||||
)
|
||||
(font-flags shadow)
|
||||
@@ -1901,8 +1894,7 @@
|
||||
;; definition (debug) for function add-debug-bound
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
;; WARN: Failed store: (s.w! (+ v1-29 8) 0) at op 110
|
||||
;; WARN: Failed store: (s.w! (+ v1-29 12) 0) at op 111
|
||||
;; ERROR: Failed store: (s.w! (+ v1-29 8) 0) at op 110
|
||||
;; WARN: Function add-debug-bound has a return type of none, but the expression builder found a return statement.
|
||||
(defun-debug add-debug-bound ((buf bucket-id) (pts (inline-array vector)) (c0 int) (c1 rgba) (flash rgba) (arg5 int))
|
||||
(local-vars (sv-16 pointer) (sv-32 int))
|
||||
|
||||
Reference in New Issue
Block a user