mirror of
https://github.com/open-goal/jak-project
synced 2026-06-22 09:05:44 -04:00
108 lines
2.2 KiB
Common Lisp
108 lines
2.2 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
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
;; pc enum for languages. this is the game's languages + custom ones.
|
|
(defenum pc-language
|
|
:type uint16
|
|
(english 0)
|
|
(french 1)
|
|
(german 2)
|
|
(spanish 3)
|
|
(italian 4)
|
|
(japanese 5)
|
|
(korean 6)
|
|
(uk-english 7)
|
|
;; custom
|
|
(portuguese 8)
|
|
(finnish 9)
|
|
(swedish 10)
|
|
(danish 11)
|
|
(norwegian 12)
|
|
(dutch 13)
|
|
(br-portuguese 14)
|
|
(hungarian 15)
|
|
(catalan 16)
|
|
(icelandic 17)
|
|
(russian 18)
|
|
|
|
(custom 999) ;; temp
|
|
)
|
|
|
|
;; The Jak 2 version of the pc-settings object.
|
|
(deftype pc-settings-jak2 (pc-settings)
|
|
(
|
|
(fast-airlock? symbol)
|
|
(fast-elevator? symbol)
|
|
(text-language pc-language) ;; language for game text
|
|
|
|
;; debug
|
|
(jetboard-trick-text? symbol) ;; enable rendering jetboard trick combo during minigame
|
|
)
|
|
|
|
(:methods
|
|
(eligible-for-fast-elevator? (_type_ process) symbol)
|
|
(get-airlock-speed (_type_) float)
|
|
)
|
|
)
|
|
|
|
(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) (call-handlers symbol))
|
|
"Set the default misc settings"
|
|
|
|
((method-of-type pc-settings reset-misc) obj call-handlers)
|
|
(set! (-> obj jetboard-trick-text?) #t)
|
|
|
|
(set! (-> obj fast-airlock?) #t)
|
|
(set! (-> obj fast-elevator?) #t)
|
|
0)
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;;;; other
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
(defun get-video-params () *video-params*)
|
|
|
|
|
|
|