jak-project/goal_src/jak2/pc/pckernel-impl.gc
ManDude 4b8b2abbed
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.
2023-02-25 10:19:32 -05:00

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*)