mirror of
https://github.com/open-goal/jak-project
synced 2026-06-13 22:15:54 -04:00
fix invincibility cheat codes + some japan-specific changes (#1750)
* fix invincibility cheat not working properly and fixed requirement * typo * added YMD for japan version of the game * remove language cheat * use language checks instead of territory checks in title logo * forgot this call
This commit is contained in:
@@ -399,7 +399,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; language cheat
|
||||
;; language cheat, REMOVED IN PC PORT because it's literally useless
|
||||
#|
|
||||
(case (scf-get-territory)
|
||||
;; japan-only
|
||||
((GAME_TERRITORY_SCEI)
|
||||
@@ -413,7 +414,7 @@
|
||||
(cheats-sound-play *progress-cheat*)
|
||||
)
|
||||
)
|
||||
)
|
||||
)|#
|
||||
|
||||
|
||||
;; debug only PAL cheat
|
||||
|
||||
@@ -856,39 +856,26 @@
|
||||
(let ((v1-133 arg0))
|
||||
(set! (-> v1-133 width) (the float 350))
|
||||
)
|
||||
(cond
|
||||
((= (scf-get-territory) GAME_TERRITORY_SCEE)
|
||||
(let ((s0-10 print-game-text))
|
||||
(set! sv-128 format)
|
||||
(let ((a0-69 (clear *temp-string*))
|
||||
(a1-27 "~X/~X/20~2X ~2X:~2X")
|
||||
(a2-23 (-> s3-3 file s1-0 day))
|
||||
(a3-10 (-> s3-3 file s1-0 month))
|
||||
(t0-10 (-> s3-3 file s1-0 year))
|
||||
(t1-0 (-> s3-3 file s1-0 hour))
|
||||
(t2-0 (-> s3-3 file s1-0 minute))
|
||||
)
|
||||
(sv-128 a0-69 a1-27 a2-23 a3-10 t0-10 t1-0 t2-0)
|
||||
)
|
||||
(s0-10 *temp-string* arg0 #f s4-1 22)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((s0-11 print-game-text))
|
||||
(set! sv-144 format)
|
||||
(let ((a0-72 (clear *temp-string*))
|
||||
(a1-29 "~X/~X/20~2X ~2X:~2X")
|
||||
(a2-25 (-> s3-3 file s1-0 month))
|
||||
(a3-12 (-> s3-3 file s1-0 day))
|
||||
(t0-12 (-> s3-3 file s1-0 year))
|
||||
(t1-1 (-> s3-3 file s1-0 hour))
|
||||
(t2-1 (-> s3-3 file s1-0 minute))
|
||||
)
|
||||
(sv-144 a0-72 a1-29 a2-25 a3-12 t0-12 t1-1 t2-1)
|
||||
)
|
||||
(s0-11 *temp-string* arg0 #f s4-1 22)
|
||||
)
|
||||
;; pc port stuff here, added YMD
|
||||
(case (scf-get-territory)
|
||||
((GAME_TERRITORY_SCEA)
|
||||
(print-game-text (string-format "~X/~X/20~2X ~2X:~2X"
|
||||
(-> s3-3 file s1-0 month) (-> s3-3 file s1-0 day) (-> s3-3 file s1-0 year)
|
||||
(-> s3-3 file s1-0 hour) (-> s3-3 file s1-0 minute))
|
||||
arg0 #f s4-1 22)
|
||||
)
|
||||
((GAME_TERRITORY_SCEI)
|
||||
(print-game-text (string-format "20~2X/~X/~X ~2X:~2X"
|
||||
(-> s3-3 file s1-0 year) (-> s3-3 file s1-0 month) (-> s3-3 file s1-0 day)
|
||||
(-> s3-3 file s1-0 hour) (-> s3-3 file s1-0 minute))
|
||||
arg0 #f s4-1 22)
|
||||
)
|
||||
(else
|
||||
(print-game-text (string-format "~X/~X/20~2X ~2X:~2X"
|
||||
(-> s3-3 file s1-0 day) (-> s3-3 file s1-0 month) (-> s3-3 file s1-0 year)
|
||||
(-> s3-3 file s1-0 hour) (-> s3-3 file s1-0 minute))
|
||||
arg0 #f s4-1 22)
|
||||
)
|
||||
)
|
||||
(set! (-> obj particles s2-0 init-pos x) -320.0)
|
||||
(set! (-> arg0 origin y) (+ 23.0 (-> arg0 origin y)))
|
||||
|
||||
@@ -241,17 +241,24 @@
|
||||
)
|
||||
)
|
||||
(send-event (handle->process (-> self camera)) 'mask 0)
|
||||
(case (scf-get-territory)
|
||||
((GAME_TERRITORY_SCEI)
|
||||
(set! (-> self volumes)
|
||||
(ppointer->handle (process-spawn logo-slave (-> self entity) *logo-volumes-japan-sg* :to self))
|
||||
)
|
||||
)
|
||||
(else
|
||||
;; check language instead of territory here
|
||||
(#if PC_PORT
|
||||
(if (= (-> *setting-control* default language) (language-enum japanese))
|
||||
(set! (-> self volumes) (ppointer->handle (process-spawn logo-slave (-> self entity) *logo-volumes-japan-sg* :to self)))
|
||||
(set! (-> self volumes) (ppointer->handle (process-spawn logo-slave (-> self entity) *logo-volumes-sg* :to self)))
|
||||
)
|
||||
(case (scf-get-territory)
|
||||
((GAME_TERRITORY_SCEI)
|
||||
(set! (-> self volumes)
|
||||
(ppointer->handle (process-spawn logo-slave (-> self entity) *logo-volumes-sg* :to self))
|
||||
(ppointer->handle (process-spawn logo-slave (-> self entity) *logo-volumes-japan-sg* :to self))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> self volumes)
|
||||
(ppointer->handle (process-spawn logo-slave (-> self entity) *logo-volumes-sg* :to self))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event (handle->process (-> self volumes)) 'origin-joint-index 3)
|
||||
(set! (-> self black) (ppointer->handle (process-spawn logo-slave (-> self entity) *logo-black-sg* :to self)))
|
||||
@@ -576,12 +583,19 @@
|
||||
(('logo)
|
||||
(set! (-> *time-of-day-context* title-light-group dir1 levels x) 0.0)
|
||||
(set! (-> *time-of-day-context* title-light-group ambi levels x) 0.444)
|
||||
(case (scf-get-territory)
|
||||
((GAME_TERRITORY_SCEI)
|
||||
(initialize-skeleton self *logo-japan-sg* '())
|
||||
)
|
||||
(else
|
||||
(initialize-skeleton self *logo-sg* '())
|
||||
;; check language instead of territory here
|
||||
(#if PC_PORT
|
||||
(if (= (-> *setting-control* default language) (language-enum japanese))
|
||||
(initialize-skeleton self *logo-japan-sg* '())
|
||||
(initialize-skeleton self *logo-sg* '())
|
||||
)
|
||||
(case (scf-get-territory)
|
||||
((GAME_TERRITORY_SCEI)
|
||||
(initialize-skeleton self *logo-japan-sg* '())
|
||||
)
|
||||
(else
|
||||
(initialize-skeleton self *logo-sg* '())
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self main-joint) (new 'process 'joint-mod (joint-mod-handler-mode joint-set*) self 3))
|
||||
|
||||
@@ -640,9 +640,9 @@
|
||||
|
||||
;; give cheats
|
||||
(when (task-closed? (game-task finalboss-movies) (task-status need-reminder))
|
||||
(logior! (-> *pc-settings* cheats-known) (pc-cheats sidekick-blue invinc tunes sky))
|
||||
(logior! (-> *pc-settings* cheats-known) (pc-cheats sidekick-blue tunes sky))
|
||||
(when (>= (calculate-completion (the progress #f)) 100.0)
|
||||
(logior! (-> *pc-settings* cheats-known) (pc-cheats eco-blue eco-red eco-green eco-yellow))))
|
||||
(logior! (-> *pc-settings* cheats-known) (pc-cheats invinc eco-blue eco-red eco-green eco-yellow))))
|
||||
|
||||
;; set up options for each screen
|
||||
(set! (-> *options-remap* (progress-screen settings)) (if (or *cheat-mode* (nonzero? (-> *pc-settings* cheats-known)))
|
||||
@@ -1081,11 +1081,6 @@
|
||||
(set! (-> (the-as (pointer symbol) (-> options (-> obj option-index) value-to-modify)))
|
||||
(-> *progress-state* on-off-backup))
|
||||
)
|
||||
(((game-option-type cheat-toggle))
|
||||
(if (-> *progress-state* on-off-backup)
|
||||
(logior! (-> *pc-settings* cheats) (ash 1 (the int (-> options (-> obj option-index) param1))))
|
||||
(logclear! (-> *pc-settings* cheats) (ash 1 (the int (-> options (-> obj option-index) param1)))))
|
||||
)
|
||||
)
|
||||
;; ding
|
||||
(sound-play "cursor-options")
|
||||
@@ -1364,9 +1359,15 @@
|
||||
(set! (-> obj selected-option) #f)
|
||||
(case (-> options (-> obj option-index) option-type)
|
||||
(((game-option-type cheat-toggle))
|
||||
(if (-> (the (pointer symbol) (-> options (-> obj option-index) value-to-modify)))
|
||||
(logior! (-> *pc-settings* cheats) (ash 1 (the int (-> options (-> obj option-index) param1))))
|
||||
(logclear! (-> *pc-settings* cheats) (ash 1 (the int (-> options (-> obj option-index) param1)))))
|
||||
(let ((the-cheat (ash 1 (the int (-> options (-> obj option-index) param1)))))
|
||||
(cond
|
||||
((-> (the (pointer symbol) (-> options (-> obj option-index) value-to-modify)))
|
||||
(logior! (-> *pc-settings* cheats) the-cheat))
|
||||
(else
|
||||
(logclear! (-> *pc-settings* cheats) the-cheat)
|
||||
(when (and *target* (= the-cheat (pc-cheats invinc)))
|
||||
(logclear! (-> *target* state-flags) (state-flags invulnerable)))))
|
||||
)
|
||||
)
|
||||
(((game-option-type aspect-ratio))
|
||||
;; aspect ratio is first written to the backup. so this is for applying the change if we went through with it.
|
||||
@@ -1945,12 +1946,12 @@
|
||||
(((pc-cheats eco-blue)
|
||||
(pc-cheats eco-green)
|
||||
(pc-cheats eco-red)
|
||||
(pc-cheats eco-yellow))
|
||||
(pc-cheats eco-yellow)
|
||||
(pc-cheats invinc))
|
||||
(set! option-str (lookup-text! *common-text* (game-text-id cheat-req-100-percent) #f)))
|
||||
(((pc-cheats sky)
|
||||
(pc-cheats sidekick-blue)
|
||||
(pc-cheats tunes)
|
||||
(pc-cheats invinc))
|
||||
(pc-cheats tunes))
|
||||
(set! option-str (lookup-text! *common-text* (game-text-id cheat-req-beat-game) #f)))
|
||||
(else
|
||||
(set! option-str locked-str))
|
||||
|
||||
Reference in New Issue
Block a user