mirror of
https://github.com/open-goal/jak-project
synced 2026-09-02 02:02:51 -04:00
[decomp] flags for continue points (#1303)
* make flags! * finish flags * refs * Update game.gp * fix target decomp * Update target.gc
This commit is contained in:
@@ -86,11 +86,29 @@
|
||||
|
||||
(define-extern *load-state* load-state)
|
||||
|
||||
;; a game checkpoint
|
||||
|
||||
(defenum continue-flags
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(contf00)
|
||||
(contf01)
|
||||
(warp)
|
||||
(demo)
|
||||
(intro)
|
||||
(sage-intro)
|
||||
(sage-demo-convo)
|
||||
(title)
|
||||
(contf08)
|
||||
(contf09)
|
||||
(game-start)
|
||||
(sage-ecorocks)
|
||||
)
|
||||
|
||||
;; static data for a continue point
|
||||
(deftype continue-point (basic)
|
||||
((name string :offset-assert 4)
|
||||
(level symbol :offset-assert 8)
|
||||
(flags uint32 :offset-assert 12)
|
||||
(flags continue-flags :offset-assert 12)
|
||||
(trans vector :inline :offset-assert 16)
|
||||
(quat quaternion :inline :offset-assert 32)
|
||||
(camera-trans vector :inline :offset-assert 48)
|
||||
|
||||
+2350
-2049
File diff suppressed because it is too large
Load Diff
@@ -49,7 +49,7 @@
|
||||
(set! (-> *load-boundary-target* 1 quad) (-> (target-pos 0) quad))
|
||||
(set! (-> *load-boundary-target* 2 quad) (-> *load-boundary-target* 0 quad))
|
||||
(set! (-> *load-boundary-target* 3 quad) (-> *load-boundary-target* 1 quad))
|
||||
(when (zero? (logand (-> *game-info* current-continue flags) 176))
|
||||
(when (zero? (logand (-> *game-info* current-continue flags) (continue-flags intro sage-intro title)))
|
||||
(set! (-> *level* border?) (-> *level* play?))
|
||||
(set! (-> *setting-control* default border-mode) (-> *level* play?))
|
||||
)
|
||||
@@ -119,7 +119,7 @@
|
||||
(let ((v1-52 (lookup-level-info (-> arg0 level))))
|
||||
(if (and v1-52
|
||||
(= (-> *setting-control* current music) (-> v1-52 music-bank))
|
||||
(zero? (logand (-> arg0 flags) 160))
|
||||
(zero? (logand (-> arg0 flags) (continue-flags sage-intro title)))
|
||||
)
|
||||
(clear-pending-settings-from-process *setting-control* self 'music-volume)
|
||||
)
|
||||
@@ -196,13 +196,13 @@
|
||||
(set! (-> *ACTOR-bank* birth-max) 1000)
|
||||
(set-blackout-frames (seconds 0.1))
|
||||
(cond
|
||||
((logtest? (-> arg0 flags) 128)
|
||||
((logtest? (-> arg0 flags) (continue-flags title))
|
||||
(go target-title)
|
||||
)
|
||||
((logtest? (-> arg0 flags) 16)
|
||||
((logtest? (-> arg0 flags) (continue-flags intro))
|
||||
(start-sequence-a)
|
||||
)
|
||||
((logtest? (-> arg0 flags) 32)
|
||||
((logtest? (-> arg0 flags) (continue-flags sage-intro))
|
||||
(let ((s5-3 (entity-by-name "sage-23")))
|
||||
(when s5-3
|
||||
(set-blackout-frames (seconds 100))
|
||||
@@ -217,7 +217,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((and (logtest? (-> arg0 flags) 2048)
|
||||
((and (logtest? (-> arg0 flags) (continue-flags sage-ecorocks))
|
||||
(or (= (get-task-status (game-task beach-ecorocks)) (task-status need-hint))
|
||||
(= (get-task-status (game-task beach-ecorocks)) (task-status need-introduction))
|
||||
)
|
||||
@@ -237,10 +237,10 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((logtest? (-> arg0 flags) 8)
|
||||
((logtest? (-> arg0 flags) (continue-flags demo))
|
||||
(go target-demo)
|
||||
)
|
||||
((logtest? (-> arg0 flags) 64)
|
||||
((logtest? (-> arg0 flags) (continue-flags sage-demo-convo))
|
||||
(set-blackout-frames (seconds 1))
|
||||
(let ((s5-5 (get-process *default-dead-pool* process #x4000)))
|
||||
(when s5-5
|
||||
@@ -283,7 +283,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((logtest? (-> arg0 flags) 4)
|
||||
((logtest? (-> arg0 flags) (continue-flags warp))
|
||||
(let ((s5-6 (new 'static 'vector)))
|
||||
(cond
|
||||
((string= (-> arg0 name) "village1-warp")
|
||||
@@ -322,7 +322,7 @@
|
||||
(set-continue! *game-info* "village1-hut")
|
||||
)
|
||||
((or (string= (-> arg0 name) "training-warp") (string= (-> arg0 name) "game-start"))
|
||||
(if (logtest? (-> arg0 flags) 1024)
|
||||
(if (logtest? (-> arg0 flags) (continue-flags game-start))
|
||||
(close-specific-task! (game-task intro) (task-status need-resolution))
|
||||
)
|
||||
(set! (-> s5-6 quad) (-> (entity-by-name "training-part-1") extra trans quad))
|
||||
|
||||
+219
-287
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user