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.
82 lines
2.3 KiB
Common Lisp
82 lines
2.3 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: 1.10.3.1
|
|
(defconstant PC_KERNEL_VERSION (static-pckernel-version 1 10 3 1))
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;;;; types and enums
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
;; The Jak 1 version of the pc-settings object.
|
|
(deftype pc-settings-jak1 (pc-settings)
|
|
(
|
|
(skip-movies? symbol) ;; if on, enable cutscene skipping
|
|
(subtitles? symbol) ;; if on, cutscene subtitles will show up
|
|
(subtitle-language pc-subtitle-lang) ;; language for subtitles
|
|
(money-starburst? symbol) ;; add a starburst to the money
|
|
(extra-hud? symbol) ;; extra hud elements.
|
|
)
|
|
)
|
|
|
|
(define *pc-settings* (the pc-settings-jak1 #f))
|
|
|
|
|
|
;; jak 1 discord rpc structure
|
|
(deftype discord-info (structure)
|
|
((fuel (pointer float))
|
|
(money-total (pointer float))
|
|
(buzzer-total (pointer float))
|
|
(deaths (pointer int32))
|
|
(status string)
|
|
(level string)
|
|
(cutscene? symbol)
|
|
(ogreboss? symbol)
|
|
(plant-boss? symbol)
|
|
(racer? symbol)
|
|
(flutflut? symbol)
|
|
(time-of-day (pointer float))
|
|
)
|
|
)
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;;;; resets
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
(defmethod reset-misc pc-settings-jak1 ((obj pc-settings-jak1))
|
|
"Set the default misc settings"
|
|
|
|
((method-of-type pc-settings reset-misc) obj)
|
|
(set! (-> obj text-language) (case *jak1-territory*
|
|
((GAME_TERRITORY_SCEE) (pc-subtitle-lang uk-english))
|
|
(else (pc-subtitle-lang english))))
|
|
(set! (-> obj skip-movies?) #t)
|
|
(set! (-> obj subtitles?) *debug-segment*)
|
|
(set! (-> obj subtitle-language) (case *jak1-territory*
|
|
((GAME_TERRITORY_SCEE) (pc-subtitle-lang uk-english))
|
|
(else (pc-subtitle-lang english))))
|
|
(set! (-> obj money-starburst?) #f)
|
|
(set! (-> obj extra-hud?) #f)
|
|
(none))
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;;;; other
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
(defun get-video-params () *video-parms*)
|
|
|
|
|