Skip to content

Commit

Permalink
more things
Browse files Browse the repository at this point in the history
  • Loading branch information
dallmeyer committed Nov 11, 2023
1 parent d2c7a65 commit c6187cd
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 18 deletions.
6 changes: 3 additions & 3 deletions goal_src/jak2/engine/game/game-info.gc
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,9 @@
(('game)
(+! (-> this task-counter) 1)
(reset! (-> *display* total-game-clock))
(set! (-> this features) (game-feature sidekick))
(set! (-> this debug-features) (game-feature))
(set! (-> this secrets) (game-secrets))
(set! (-> this features) (game-feature sidekick gun gun-yellow gun-red gun-blue gun-dark board darkjak darkjak-bomb0 darkjak-bomb1 darkjak-invinc darkjak-giant))
(set! (-> this debug-features) (game-feature sidekick gun gun-yellow gun-red gun-blue gun-dark board darkjak darkjak-bomb0 darkjak-bomb1 darkjak-invinc darkjak-giant))
(set! (-> this secrets) (game-secrets endless-dark))
(set! (-> this purchase-secrets) (game-secrets))
(set-continue!
this
Expand Down
2 changes: 1 addition & 1 deletion goal_src/jak2/engine/target/board/board-h.gc
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
)
(-> self board latch?)
)
(not (focus-test? self dead hit grabbed in-head edge-grab pole board pilot mech dark))
(not (focus-test? self dead hit grabbed in-head edge-grab pole board pilot mech))
(or (zero? (-> self board)) (time-elapsed? (-> self board board-time) (seconds 0.5)))
(not (logtest? (state-flags prevent-board) (-> self state-flags)))
(< (-> self board board-time) (-> self control list-time-on-ground))
Expand Down
2 changes: 1 addition & 1 deletion goal_src/jak2/engine/target/gun/gun-h.gc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
(local-vars (v1-36 symbol))
(and (logtest? (-> arg0 game features) (game-feature gun))
(time-elapsed? (-> arg0 gun gun-time) (seconds 0.1))
(not (focus-test? arg0 dead hit board mech dark teleporting))
(not (focus-test? arg0 dead hit board mech teleporting))
(not (logtest? (surface-flag gun-inactive gun-hide gun-off) (-> arg0 control current-surface flags)))
(not (logtest? (state-flags prevent-gun) (-> arg0 state-flags)))
(logtest? (logand (-> *setting-control* user-current features) (game-feature gun-yellow gun-red gun-blue gun-dark))
Expand Down
25 changes: 16 additions & 9 deletions goal_src/jak2/engine/target/target-darkjak.gc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
;; dgos: ENGINE, GAME

(define-extern *darkjak-trans-mods* surface)
(define *giant-scale* 0.0)

;; DECOMP BEGINS

Expand Down Expand Up @@ -61,11 +62,11 @@
)
)
(and (and (focus-test? self dark) (nonzero? (-> self darkjak)))
(not (and (focus-test? self dark)
(nonzero? (-> self darkjak))
(logtest? (-> self darkjak stage) (darkjak-stage giant))
)
)
;; (not (and (focus-test? self dark)
;; (nonzero? (-> self darkjak))
;; (logtest? (-> self darkjak stage) (darkjak-stage giant))
;; )
;; )
(logtest? (game-feature darkjak-giant) (-> self game features))
)
)
Expand Down Expand Up @@ -96,6 +97,7 @@
(none)
)

(define *l2-start-hold* 0)
(defbehavior target-darkjak-process target ()
(local-vars (gp-0 vector))
(cond
Expand Down Expand Up @@ -124,7 +126,10 @@
;; )
;; (go target-darkjak-get-off)
;; )
(when (and (focus-test? self dark) (nonzero? (-> self darkjak)) (cpad-hold? 0 r2))
(if (cpad-pressed? 0 l2)
(set! *l2-start-hold* (current-time))
)
(when (and (focus-test? self dark) (nonzero? (-> self darkjak)) (cpad-hold? 0 l2) (> (- (current-time) *l2-start-hold*) (seconds 1.0)))
(go target-darkjak-get-off)
)
)
Expand Down Expand Up @@ -154,9 +159,9 @@
(logtest? (-> self darkjak stage) (darkjak-stage giant))
)
(set! gp-0 (new 'stack-no-clear 'vector))
(set! (-> gp-0 x) (/ f28-0 (* f28-0 f26-1 (lerp-scale 1.0 1.3 f30-0 0.0 1.0))))
(set! (-> gp-0 y) (/ f28-0 (* f28-0 (lerp-scale 1.0 1.4 f30-0 0.0 1.0))))
(set! (-> gp-0 z) (/ f28-0 (* f28-0 f26-1 (lerp-scale 1.0 1.3 f30-0 0.0 1.0))))
(set! (-> gp-0 x) (/ (* f28-0 *giant-scale*) (* f28-0 f26-1 (lerp-scale 1.0 1.3 f30-0 0.0 1.0))))
(set! (-> gp-0 y) (/ (* f28-0 *giant-scale*) (* f28-0 (lerp-scale 1.0 1.4 f30-0 0.0 1.0))))
(set! (-> gp-0 z) (/ (* f28-0 *giant-scale*) (* f28-0 f26-1 (lerp-scale 1.0 1.3 f30-0 0.0 1.0))))
(set! (-> gp-0 w) 1.0)
)
(else
Expand Down Expand Up @@ -312,6 +317,7 @@
(set! (-> self darkjak-giant-interp) 1.0)
(set-setting! 'sound-flava #f 30.0 4)
(logior! (-> self focus-status) (focus-status dark))
(set! *giant-scale* 0.0)
(set-time! (-> (the-as fact-info-target (-> self fact)) darkjak-start-time))
(set! (-> (the-as fact-info-target (-> self fact)) darkjak-effect-time) (seconds 20))
(if (logtest? (-> self darkjak stage) (darkjak-stage invinc))
Expand Down Expand Up @@ -1872,6 +1878,7 @@
(set! (-> self neck flex-blend) 0.0)
(set! (-> self control mod-surface) *darkjak-trans-mods*)
(logior! (-> self darkjak stage) (darkjak-stage giant))
(+! *giant-scale* 1.0)
(set! (-> self darkjak want-stage) (-> self darkjak stage))
(sound-play "djak-transform")
(let ((gp-1 (new 'stack-no-clear 'collide-query)))
Expand Down
8 changes: 4 additions & 4 deletions goal_src/jak2/engine/target/target-gun.gc
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@

(defun target-gun-marking-menu ((arg0 target))
(when (and (not (paused?))
(not (and (focus-test? arg0 dark) (nonzero? (-> arg0 darkjak))))
;; (not (and (focus-test? arg0 dark) (nonzero? (-> arg0 darkjak))))
(not (logtest? (-> arg0 focus-status) (focus-status grabbed)))
)
(let ((s5-0 (the-as int (-> arg0 gun using-gun-type))))
Expand Down Expand Up @@ -1141,7 +1141,7 @@
(-> (the-as vector (if (and (or (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0)
(logtest? (surface-flag gun-strafe) (-> self control current-surface flags))
)
(not (and (focus-test? self dark) (nonzero? (-> self darkjak))))
;; (not (and (focus-test? self dark) (nonzero? (-> self darkjak))))
)
(-> self gun fire-dir)
(-> self control to-target-pt-xz)
Expand Down Expand Up @@ -1516,7 +1516,7 @@
(cond
((and (cpad-pressed? (-> self control cpad number) r1)
(not (time-elapsed? (-> self gun combo-window-start) (seconds 0.7)))
(not (focus-test? self mech dark))
(not (focus-test? self mech))
(not (logtest? (surface-flag gun-off) (-> self control current-surface flags)))
(not (logtest? (state-flags prevent-gun) (-> self state-flags)))
(zero? (-> self gun track-target-hold-time))
Expand Down Expand Up @@ -2271,7 +2271,7 @@
(logand (-> self game features) (-> *setting-control* user-current features))
)
)
(focus-test? self dead dark)
(focus-test? self dead)
(-> self board latch?)
)
)
Expand Down

0 comments on commit c6187cd

Please sign in to comment.