mirror of
https://github.com/open-goal/jak-project
synced 2026-07-01 04:10:32 -04:00
d8cca2bf83
The Discord RPC code has been cleaned up and split up between game versions. For Jak 2, the Discord integration now shows large images for all levels (with corresponding day and nighttime variants if required) and small images for time of day and various states like being on the jetboard, driving a zoomer, playing as Daxter, etc. TODO: - [x] mission specific images and detection - [x] detect side missions properly - [x] `onin-game` detection    --------- Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
109 lines
2.3 KiB
Common Lisp
109 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: 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 float)
|
|
(gem-count float)
|
|
(death-count int32)
|
|
(status string)
|
|
(level string)
|
|
(cutscene? symbol)
|
|
(time-of-day float)
|
|
(percent-complete float)
|
|
(focus-status uint32)
|
|
(task string) ;; currenly active game-task used for mission specific images
|
|
)
|
|
)
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
;;;; 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*)
|
|
|
|
|
|
|