mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -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.
66 lines
1.5 KiB
Common Lisp
66 lines
1.5 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
#|
|
|
This file has the game-specific implementation of the pckernel (see pckernel-h.gc and pckernel.gc).
|
|
|#
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;;;; constants
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
;; version: 0.1.0.2
|
|
(defconstant PC_KERNEL_VERSION (static-pckernel-version 0 1 0 2))
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;;;; types and enums
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
;; The Jak 2 version of the pc-settings object.
|
|
(deftype pc-settings-jak2 (pc-settings)
|
|
(
|
|
(jetboard-trick-text? symbol) ;; enable rendering jetboard trick combo during minigame
|
|
)
|
|
)
|
|
|
|
(define *pc-settings* (the pc-settings-jak2 #f))
|
|
|
|
|
|
;; jak 2 discord rpc structure
|
|
(deftype discord-info (structure)
|
|
((orb-count (pointer float))
|
|
(gem-count (pointer float))
|
|
(death-count (pointer int32))
|
|
(status string)
|
|
(level string)
|
|
(cutscene? symbol)
|
|
(time-of-day (pointer float))
|
|
(percent-complete float)
|
|
)
|
|
)
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;;;; resets
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
(defmethod reset-misc pc-settings-jak2 ((obj pc-settings-jak2))
|
|
"Set the default misc settings"
|
|
|
|
((method-of-type pc-settings reset-misc) obj)
|
|
(set! (-> obj jetboard-trick-text?) #t)
|
|
(none))
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;;;; other
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
(defun get-video-params () *video-params*)
|
|
|
|
|
|
|