Skip to content

Commit

Permalink
modbase merge
Browse files Browse the repository at this point in the history
  • Loading branch information
dallmeyer committed Sep 2, 2024
1 parent cff4b9a commit 074a53f
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 25 deletions.
8 changes: 5 additions & 3 deletions goal_src/jak1/engine/mods/mod-custom-code.gc
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@

(defun runs-every-frame ()
;;(increase-power-cell-by-one) This is a call to increase-power-cell-by-one defined in mod-common-functions.gc
(if *show-input-display* (input-display-on) (input-display-off))
;; ensure orb-placer is spawned/killed as requested, debug menu is updated
(if (-> *speedrun-info* show-input-display?)
(input-display-on)
(input-display-off))

(when *debug-segment*
;; (orb-placer-maintenance) ;; ensure orb-placer is spawned/killed as requested, debug menu is updated
;; (debug-maybe-draw-bottom-height)
Expand All @@ -36,7 +38,7 @@
(defun draw-plant-deload-info ()
(when (and (-> *speedrun-info* should-display-plant-deload-info?)
(not (paused?)))
(let ((y-offset (if (-> *speedrun-info* should-display?) 7 3))
(let ((y-offset (if (-> *speedrun-info* should-display?) 7 4))
(hp (the happy-plant (process-by-ename "happy-plant-1")))
)
(with-dma-buffer-add-bucket ((buf (-> (current-frame) global-buf))
Expand Down
35 changes: 17 additions & 18 deletions goal_src/jak1/levels/racer_common/racer.gc
Original file line number Diff line number Diff line change
Expand Up @@ -175,24 +175,23 @@
(let ((v1-24 gp-0)) (set! (-> v1-24 width) (the float 440)))
(let ((v1-25 gp-0)) (set! (-> v1-25 height) (the float 80)))
(set! (-> gp-0 flags) (font-flags shadow kerning large))
(print-game-text (lookup-text! *common-text* (text-id press-to-use) #f) gp-0 #f 128 22))
(cond
((and (= (-> *speedrun-info* category) (speedrun-category low-collect-prac))
(= (-> (level-get-target-inside *level*) name) 'firecanyon)
(!= (-> *game-info* current-continue) (get-continue-by-name *game-info* "firecanyon-end")))
;; skip FCS for low-collect-prac
(print-game-text (lookup-text! *common-text* (text-id press-to-warp) #f) gp-0 #f 128 22)
(if (cpad-pressed? 0 circle)
(send-event *target* 'continue (get-continue-by-name *game-info* "firecanyon-end"))))
(*allow-zoomer-anywhere* ;; if "self" is passed instead of #f, deloading level/zoomer will crash
(print-game-text (lookup-text! *common-text* (text-id press-to-use) #f) gp-0 #f 128 22)
(if (and (or (cpad-pressed? 0 circle) (= (-> self condition) 4)) (send-event *target* 'change-mode 'racing #f))
(go-virtual pickup (the-as (state collectable) (method-of-object self wait-for-return)))))
(else
;; vanilla
(print-game-text (lookup-text! *common-text* (text-id press-to-use) #f) gp-0 #f 128 22)
(if (and (or (cpad-pressed? 0 circle) (= (-> self condition) 4)) (send-event *target* 'change-mode 'racing self))
(go-virtual pickup (the-as (state collectable) (method-of-object self wait-for-return))))))))
(cond
((and (= (-> *speedrun-info* category) (speedrun-category low-collect-prac))
(= (-> (level-get-target-inside *level*) name) 'firecanyon)
(!= (-> *game-info* current-continue) (get-continue-by-name *game-info* "firecanyon-end")))
;; skip FCS for low-collect-prac
(print-game-text (lookup-text! *common-text* (text-id press-to-warp) #f) gp-0 #f 128 22)
(if (cpad-pressed? 0 circle)
(send-event *target* 'continue (get-continue-by-name *game-info* "firecanyon-end"))))
(*allow-zoomer-anywhere* ;; if "self" is passed instead of #f, deloading level/zoomer will crash
(print-game-text (lookup-text! *common-text* (text-id press-to-use) #f) gp-0 #f 128 22)
(if (and (or (cpad-pressed? 0 circle) (= (-> self condition) 4)) (send-event *target* 'change-mode 'racing #f))
(go-virtual pickup (the-as (state collectable) (method-of-object self wait-for-return)))))
(else
;; vanilla
(print-game-text (lookup-text! *common-text* (text-id press-to-use) #f) gp-0 #f 128 22)
(if (and (or (cpad-pressed? 0 circle) (= (-> self condition) 4)) (send-event *target* 'change-mode 'racing self))
(go-virtual pickup (the-as (state collectable) (method-of-object self wait-for-return)))))))))
(racer-effect)
(suspend))))
:post ja-post)
Expand Down
6 changes: 5 additions & 1 deletion goal_src/jak1/pc/features/speedruns.gc
Original file line number Diff line number Diff line change
Expand Up @@ -680,14 +680,18 @@
(define-extern *mod-version-text* string)
(defun speedrun-draw-settings ()
"Draw speedrun related settings in the bottom left corner"
;; hide speedrun verification text if some other helper text is turned on
(when (or (-> *speedrun-info* should-display-plant-deload-info?)
(-> *speedrun-info* should-display-idle-deload-info?))
(hide-speedrun-display))
(when (and (-> *pc-settings* speedrunner-mode?) (not (paused?)) (-> *speedrun-info* should-display?))
;; check if we've landed (either we're on ground/surface/water, or about to target-hit-ground)
(when (and *target*
(or (logtest? (-> *target* control status) (cshape-moving-flags onground onsurf on-water))
(= (-> *target* next-state name) 'target-hit-ground)))
(true! *has-landed?*))
(with-dma-buffer-add-bucket ((buf (-> (current-frame) global-buf)) (bucket-id subtitle))
(draw-string-xy (string-format "Speedrunner Mode ~%PRACTICE MOD ~S ~%Category: ~S ~%Cutscene Skips ~A~%Has Landed? ~A"
(draw-string-xy (string-format "Speedrun PRACTICE MOD~%~S ~%Category: ~S ~%Cutscene Skips ~A~%Has Landed? ~A"
*mod-version-text*
(enum->string speedrun-category (-> *speedrun-info* category))
(-> *pc-settings* skip-movies?)
Expand Down
4 changes: 2 additions & 2 deletions goal_src/jak1/pc/pckernel-impl.gc
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@
(set! (-> obj memcard-volume-sfx) 50.0)
(set! (-> obj memcard-volume-music) 40.0)
(set! (-> obj memcard-volume-dialog) 75.0)
(set! (-> obj memcard-vibration?) #t)
(set! (-> obj memcard-play-hints?) #t)
(set! (-> obj memcard-vibration?) #f)
(set! (-> obj memcard-play-hints?) #f)
0)

(defmethod reset-extra ((obj pc-settings-jak1) (call-handlers symbol))
Expand Down
2 changes: 1 addition & 1 deletion goal_src/jak2/pc/pckernel-impl.gc
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
(set! (-> obj memcard-volume-sfx) 0.5)
(set! (-> obj memcard-volume-music) 0.4)
(set! (-> obj memcard-volume-dialog) 0.75)
(set! (-> obj memcard-vibration?) #t)
(set! (-> obj memcard-vibration?) #f)
(set! (-> obj memcard-subtitles?) #f)
0)

Expand Down
Binary file modified out/build/Release/bin/decompiler.exe
Binary file not shown.
Binary file modified out/build/Release/bin/extractor.exe
Binary file not shown.
Binary file modified out/build/Release/bin/gk.exe
Binary file not shown.
Binary file modified out/build/Release/bin/goalc.exe
Binary file not shown.

0 comments on commit 074a53f

Please sign in to comment.