From 584cbcdd0ebc53506d64980a30dd4b697cb1b6cc Mon Sep 17 00:00:00 2001 From: Brent Hickey Date: Sat, 25 Jun 2022 08:03:14 -0700 Subject: [PATCH] [game][150fps] more high fps fixes (#1518) * jak ambient wind, first person cam speed, cleanup * fix seagulls! * fix intro speed, mood, projectile collision, wind * fix flying lurker and add comments * oops didn't convert this back * more comments * Revert "more comments" This reverts commit 9a211c594c703f7b1a67af2951b765e94dd59826. * more comments * yep * missed 1 line * more than 1 lol * paren * revert ripple for now, casting broke 60fps and didn't seem right --- goal_src/engine/ambient/mood.gc | 13 ++++----- goal_src/engine/anim/bones.gc | 3 ++- goal_src/engine/camera/cam-states.gc | 22 ++++++++------- goal_src/engine/draw/drawable.gc | 7 +---- goal_src/engine/game/projectiles.gc | 6 +++-- goal_src/engine/gfx/eye.gc | 8 ++---- goal_src/engine/gfx/hw/display.gc | 2 +- goal_src/engine/gfx/ocean/ocean.gc | 3 ++- goal_src/engine/gfx/wind.gc | 11 ++++---- goal_src/engine/load/load-dgo.gc | 4 +-- goal_src/engine/load/loader.gc | 5 +++- goal_src/engine/target/logic-target.gc | 4 ++- goal_src/engine/target/target.gc | 16 +++++------ goal_src/levels/beach/seagull.gc | 33 ++++++++++++----------- goal_src/levels/rolling/rolling-robber.gc | 5 ++-- 15 files changed, 71 insertions(+), 71 deletions(-) diff --git a/goal_src/engine/ambient/mood.gc b/goal_src/engine/ambient/mood.gc index 13ffd7a3b1..b0ac11e4dc 100644 --- a/goal_src/engine/ambient/mood.gc +++ b/goal_src/engine/ambient/mood.gc @@ -4,6 +4,7 @@ ;; name: mood.gc ;; name in dgo: mood ;; dgos: GAME, ENGINE +;; note: modified for high fps ;; DECOMP BEGINS @@ -1537,9 +1538,9 @@ (let ((s3-2 (new 'stack-no-clear 'vector)) (s4-3 (new 'stack-no-clear 'vector)) (f26-3 (+ 0.75 - (* 0.0625 (cos (the float (* 4000 (-> *display* integral-frame-counter))))) - (* 0.0625 (cos (the float (shl (-> *display* integral-frame-counter) 11)))) - (* 0.125 (cos (the float (* 1500 (-> *display* integral-frame-counter))))) + (* 0.0625 (cos (the float (* 4000 (-> *display* time-adjust-ratio) (-> *display* integral-frame-counter))))) ;; changed for high fps + (* 0.0625 (cos (the float (shl (the int (* (-> *display* time-adjust-ratio) (-> *display* integral-frame-counter))) 11)))) ;; changed for high fps + (* 0.125 (cos (the float (* 1500 (-> *display* time-adjust-ratio) (-> *display* integral-frame-counter))))) ;; changed for high fps ) ) ) @@ -2695,9 +2696,9 @@ (let* ((f2-5 (* 0.000012207031 (+ -409600.0 f0-41))) (f30-2 (- 1.0 (fmax 0.0 (fmin 1.0 f2-5)))) (f28-4 (+ 0.5 - (* 0.125 (cos (the float (* 4000 (-> *display* integral-frame-counter))))) - (* 0.125 (cos (the float (shl (-> *display* integral-frame-counter) 11)))) - (* 0.25 (cos (the float (* 1500 (-> *display* integral-frame-counter))))) + (* 0.125 (cos (the float (* 4000 (-> *display* time-adjust-ratio) (-> *display* integral-frame-counter))))) ;; changed for high fps + (* 0.125 (cos (the float (shl (the int (* (-> *display* time-adjust-ratio) (-> *display* integral-frame-counter))) 11)))) ;; changed for high fps + (* 0.25 (cos (the float (* 1500 (-> *display* time-adjust-ratio) (-> *display* integral-frame-counter))))) ;; changed for high fps ) ) (s3-1 (new 'stack-no-clear 'vector)) diff --git a/goal_src/engine/anim/bones.gc b/goal_src/engine/anim/bones.gc index 82f643ac99..9d2b766580 100644 --- a/goal_src/engine/anim/bones.gc +++ b/goal_src/engine/anim/bones.gc @@ -4,6 +4,7 @@ ;; name: bones.gc ;; name in dgo: bones ;; dgos: GAME, ENGINE +;; note: changed for high fps ;; Bones. ;; There are 4 main functions used by the outside world: @@ -114,7 +115,7 @@ (a1-1 (the-as mei-texture-scroll (+ (the-as uint a1-0) (* (-> a1-0 texture-scroll-offset) 16)))) ) (when (< v1-1 32) - (let* ((a3-1 (-> *display* integral-frame-counter)) + (let* ((a3-1 (the int (* (-> *display* time-adjust-ratio) (-> *display* integral-frame-counter)))) ;; changed for high fps (a2-3 (-> a1-1 time-factor)) (t0-2 (+ (ash 1 a2-3) -1)) ) diff --git a/goal_src/engine/camera/cam-states.gc b/goal_src/engine/camera/cam-states.gc index 6e466bd585..a9838de381 100644 --- a/goal_src/engine/camera/cam-states.gc +++ b/goal_src/engine/camera/cam-states.gc @@ -4,6 +4,7 @@ ;; name: cam-states.gc ;; name in dgo: cam-states ;; dgos: GAME, ENGINE +;; note: changed for high fps ;; DECOMP BEGINS @@ -409,6 +410,7 @@ ) ;; main first-person camera +;; note: modified for high fps (defstate cam-eye (camera-slave) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (case arg2 @@ -472,24 +474,24 @@ ) ) ) - (set! (-> s4-0 y) (- (-> s4-0 y) (* (- f30-0) (-> *CAM_EYE-bank* rot-speed)))) - (set! (-> s4-0 x) (- (-> s4-0 x) (* (- f0-0) (-> *CAM_EYE-bank* rot-speed)))) + (set! (-> s4-0 y) (- (-> s4-0 y) (* (- f30-0) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))))) ;; changed for high fps + (set! (-> s4-0 x) (- (-> s4-0 x) (* (- f0-0) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))))) ;; changed for high fps ) ) (cond - ((< (-> *CAM_EYE-bank* rot-speed) (-> s4-0 x)) - (set! (-> s4-0 x) (-> *CAM_EYE-bank* rot-speed)) + ((< (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)) (-> s4-0 x)) ;; changed for high fps + (set! (-> s4-0 x) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))) ;; changed for high fps ) - ((< (-> s4-0 x) (- (-> *CAM_EYE-bank* rot-speed))) - (set! (-> s4-0 x) (- (-> *CAM_EYE-bank* rot-speed))) + ((< (-> s4-0 x) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; changed for high fps + (set! (-> s4-0 x) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; changed for high fps ) ) (cond - ((< (-> *CAM_EYE-bank* rot-speed) (-> s4-0 y)) - (set! (-> s4-0 y) (-> *CAM_EYE-bank* rot-speed)) + ((< (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)) (-> s4-0 y)) ;; changed for high fps + (set! (-> s4-0 y) (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed))) ;; changed for high fps ) - ((< (-> s4-0 y) (- (-> *CAM_EYE-bank* rot-speed))) - (set! (-> s4-0 y) (- (-> *CAM_EYE-bank* rot-speed))) + ((< (-> s4-0 y) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; changed for high fps + (set! (-> s4-0 y) (- (* (-> *display* time-adjust-ratio) (-> *CAM_EYE-bank* rot-speed)))) ;; changed for high fps ) ) (cond diff --git a/goal_src/engine/draw/drawable.gc b/goal_src/engine/draw/drawable.gc index ccf9200421..b50bb2e9b3 100644 --- a/goal_src/engine/draw/drawable.gc +++ b/goal_src/engine/draw/drawable.gc @@ -1335,12 +1335,7 @@ (+! (-> disp base-frame-counter) scaled-seconds) (+! (-> disp part-frame-counter) scaled-seconds) ;; this counts actual frames, not seconds. Will count 2 frames if we lag - ;; When counting frames while running at > 60fps we need to scale it, but always count at least 1 frame - (+! (-> disp integral-frame-counter) (if (= (-> *setting-control* current video-mode) '150fps) - (max 1 (the int (* 0.4 time-ratio))) - (if (= (-> *setting-control* current video-mode) '100fps) - (max 1 (the int (* 0.6 time-ratio))) - (the int time-ratio)))) + (+! (-> disp integral-frame-counter) (the int time-ratio)) ;; this counts actual frames, not doubling for lag. Will count 1 per frame drawn (+! (-> disp actual-frame-counter) 1) ;; game counter will count seconds that we're not in a movie diff --git a/goal_src/engine/game/projectiles.gc b/goal_src/engine/game/projectiles.gc index 46b633b1f8..2b02743888 100644 --- a/goal_src/engine/game/projectiles.gc +++ b/goal_src/engine/game/projectiles.gc @@ -4,6 +4,7 @@ ;; name: projectiles.gc ;; name in dgo: projectiles ;; dgos: GAME, ENGINE +;; note: changed for high fps ;; DECOMP BEGINS @@ -688,8 +689,9 @@ (countdown (v1-35 16) (+! f0-16 (-> self old-dist v1-35)) ) - (if (or (and (logtest? (-> self root-override status) (cshape-moving-flags twall)) (< f0-16 2048.0)) - (< f0-16 204.8) + ;; changed for high fps. This fixes projectile collision issues + (if (or (and (logtest? (-> self root-override status) (cshape-moving-flags twall)) (< f0-16 (* (-> *display* time-adjust-ratio) 2048.0))) + (< f0-16 (* (-> *display* time-adjust-ratio) 204.8)) ) (set! gp-0 #t) ) diff --git a/goal_src/engine/gfx/eye.gc b/goal_src/engine/gfx/eye.gc index bf8a135f23..2446d6216f 100644 --- a/goal_src/engine/gfx/eye.gc +++ b/goal_src/engine/gfx/eye.gc @@ -4,6 +4,7 @@ ;; name: eye.gc ;; name in dgo: eye ;; dgos: GAME, ENGINE +;; note: changed for high fps ;; DECOMP BEGINS @@ -832,12 +833,7 @@ (when (not (paused?)) (cond ((and (>= (-> s5-3 left lid) 0.0) (>= (-> s5-3 right lid) 0.0)) - (set! (-> s5-3 random-time) (the int (* (if (or (= (-> *setting-control* current video-mode) '150fps) - (= (-> *setting-control* current video-mode) '100fps)) - (if (= (-> *setting-control* current video-mode) '150fps) - 2.5 - 1.6667) - 1.0) + (set! (-> s5-3 random-time) (the int (* (/ 1.0 (-> *display* time-adjust-ratio)) ;; changed for high fps (the-as uint 60)))) (set! (-> s5-3 blink) 0.0) ) diff --git a/goal_src/engine/gfx/hw/display.gc b/goal_src/engine/gfx/hw/display.gc index 1e44cec4e2..1f066495b3 100644 --- a/goal_src/engine/gfx/hw/display.gc +++ b/goal_src/engine/gfx/hw/display.gc @@ -61,7 +61,7 @@ ) (('150fps) (set! (-> obj time-adjust-ratio) (* 0.4 ratio)) - (set! (-> obj seconds-per-frame) (* 0.006666667 ratio)) + (set! (-> obj seconds-per-frame) (* (1/ 150.0) ratio)) (set! (-> obj frames-per-second) (* 150.0 (/ 1.0 ratio))) ;; 2 "ticks" per frame * 150 fps = 300 ticks per second. (set! (-> obj time-factor) 2.0) diff --git a/goal_src/engine/gfx/ocean/ocean.gc b/goal_src/engine/gfx/ocean/ocean.gc index 1f4342e766..df2a991ca9 100644 --- a/goal_src/engine/gfx/ocean/ocean.gc +++ b/goal_src/engine/gfx/ocean/ocean.gc @@ -4,6 +4,7 @@ ;; name: ocean.gc ;; name in dgo: ocean ;; dgos: GAME, ENGINE +;; note: changed for high fps ;; TODO - for ocean-transition (define-extern *ocean-map* ocean-map) @@ -615,7 +616,7 @@ (set! *ocean-verts* (the-as (inline-array vector) #f)) (let ((gp-0 (-> *display* frames (-> *display* on-screen) frame global-buf))) (set! *ocean-heights* (the-as ocean-wave-info (-> gp-0 base))) - (ocean-interp-wave *ocean-heights* (the-as uint (-> *display* integral-frame-counter))) + (ocean-interp-wave *ocean-heights* (the uint (* (-> *display* time-adjust-ratio) (-> *display* integral-frame-counter)))) ;; changed for high fps (&+! (-> gp-0 base) 4096) (set! *ocean-verts* (the-as (inline-array vector) (-> gp-0 base))) (ocean-generate-verts *ocean-verts* *ocean-heights*) diff --git a/goal_src/engine/gfx/wind.gc b/goal_src/engine/gfx/wind.gc index acef24b799..bf9be4d966 100644 --- a/goal_src/engine/gfx/wind.gc +++ b/goal_src/engine/gfx/wind.gc @@ -4,6 +4,7 @@ ;; name: wind.gc ;; name in dgo: wind ;; dgos: GAME, ENGINE +;; note: modified for high fps ;; definition for symbol *wind-work*, type wind-work (define *wind-work* (new 'global 'wind-work)) @@ -19,11 +20,11 @@ (set! (-> arg0 wind-normal z) (sin f30-1)) ) (set! (-> arg0 wind-time) (+ (-> arg0 wind-time) 1)) - (let* ((s4-0 (logand (-> arg0 wind-time) 63)) + (let* ((s4-0 (logand (the int (* (-> *display* time-adjust-ratio) (-> arg0 wind-time))) 63)) ;; changed for high fps (f0-4 (rand-vu-float-range 0.0 100.0)) - (v1-5 (/ (if (or (eq? (-> *setting-control* current video-mode) '150fps) (eq? (-> *setting-control* current video-mode) '100fps)) (the uint (min 1.0 (* (if (eq? (-> *setting-control* current video-mode) '150fps) 0.4 0.6) (-> arg0 wind-time)))) (-> arg0 wind-time)) (the-as uint 120))) + (v1-5 (/ (* (-> *display* time-adjust-ratio) (-> arg0 wind-time)) (the-as uint 120))) ;; changed for high fps (f1-6 (* 0.008333334 - (the float (mod (if (or (eq? (-> *setting-control* current video-mode) '150fps) (eq? (-> *setting-control* current video-mode) '100fps)) (the uint (min 1.0 (* (if (eq? (-> *setting-control* current video-mode) '150fps) 0.4 0.6) (-> arg0 wind-time)))) (-> arg0 wind-time)) (the-as uint 120))) + (the float (mod (the uint (* (-> *display* time-adjust-ratio) (-> arg0 wind-time))) (the-as uint 120))) ;; changed for high fps ) ) (f2-4 (* 0.0625 @@ -44,8 +45,8 @@ ) ) ) - (set! (-> *wind-work* wind-force s4-0) f0-5) - (vector-float*! (-> *wind-work* wind-array s4-0) (-> arg0 wind-normal) f0-5) + (set! (-> *wind-work* wind-force s4-0) (* (-> *display* time-adjust-ratio) f0-5)) ;; changed for high fps + (vector-float*! (-> *wind-work* wind-array s4-0) (-> arg0 wind-normal) (* (-> *display* time-adjust-ratio) f0-5)) ;; changed for high fps ) 0 (none) diff --git a/goal_src/engine/load/load-dgo.gc b/goal_src/engine/load/load-dgo.gc index 87adffbcb0..7a3f5387a4 100644 --- a/goal_src/engine/load/load-dgo.gc +++ b/goal_src/engine/load/load-dgo.gc @@ -320,9 +320,9 @@ struct DgoHeader { ;; note that this does not include linking/setup of the ;; final object in the level which may take a significant amount of time (if (= (-> response result) (load-msg-result done)) - ;; this assumes 60 fps! + ;; this assumes it was stable at the target fps! (format 0 "Elapsed time for level = ~Fs~%" - (* 0.016666668 (the float (- (-> *display* real-integral-frame-counter) *dgo-time*))) + (* (-> *display* seconds-per-frame) (the float (- (-> *display* real-integral-frame-counter) *dgo-time*))) ) ) ) diff --git a/goal_src/engine/load/loader.gc b/goal_src/engine/load/loader.gc index 68b1c635ee..c570c6faf5 100644 --- a/goal_src/engine/load/loader.gc +++ b/goal_src/engine/load/loader.gc @@ -4,6 +4,7 @@ ;; name: loader.gc ;; name in dgo: loader ;; dgos: GAME, ENGINE +;; note: changed for high fps (defmethod inspect load-dir ((obj load-dir)) @@ -977,9 +978,11 @@ (string= (-> arg0 name) "fishermans-boat-ride-to-misty") (string= (-> arg0 name) "gondola-ride-up") (string= (-> arg0 name) "gondola-ride-down") + (string= (-> arg0 name) "logo-loop") + (string= (-> arg0 name) "logo-intro-2") ) ) - (if (= (-> *setting-control* current video-mode) '150fps) 0.4 0.6) + (-> *display* time-adjust-ratio) 1.0 ) 0.05859375 (-> s2-4 speed))) diff --git a/goal_src/engine/target/logic-target.gc b/goal_src/engine/target/logic-target.gc index d6d5f68512..ae7059172c 100644 --- a/goal_src/engine/target/logic-target.gc +++ b/goal_src/engine/target/logic-target.gc @@ -4,6 +4,7 @@ ;; name: logic-target.gc ;; name in dgo: logic-target ;; dgos: GAME, ENGINE +;; note: changed for high fps ;; target-start is modified due to changing the size of the stack in gkernel.gc @@ -1134,7 +1135,8 @@ (set! (-> self control unknown-dword20) (-> *display* base-frame-counter)) ) (when (logtest? (-> self state-flags) (state-flags timed-invulnerable)) - (if (< (logand (- (-> *display* base-frame-counter) (-> self control unknown-dword80)) 3) 1) + ;; changed for high fps. This fixes the flicker speed when damaged + (if (< (logand (- (-> *display* base-frame-counter) (-> self control unknown-dword80)) 3) (/ 1.0 (-> *display* time-adjust-ratio))) (logior! (-> self draw status) (draw-status hidden)) (logclear! (-> self draw status) (draw-status hidden)) ) diff --git a/goal_src/engine/target/target.gc b/goal_src/engine/target/target.gc index 2f051ba5aa..4cf267028e 100644 --- a/goal_src/engine/target/target.gc +++ b/goal_src/engine/target/target.gc @@ -4,6 +4,7 @@ ;; name: target.gc ;; name in dgo: target ;; dgos: GAME, ENGINE +;; note: changed for high fps ;; TODO - almost all of these are in target-handler or target2, temporary @@ -568,7 +569,7 @@ (loop (ground-tween-update gp-0 (-> self control unknown-float61) (-> self control unknown-float62)) (suspend) - (ja :num! (loop!)) + (ja :num! (loop! (-> *display* time-adjust-ratio))) ;; changed for high fps, fixes ambient wind on jak (ja :chan 1 :num! (chan 0)) (ja :chan 2 :num! (chan 0)) (if (can-play-stance-amibent?) @@ -884,11 +885,7 @@ (set! f30-0 (seek f30-0 (fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -16384.0 (-> self control unknown-float01))))) - ;; Jaks' walk animation felt sped up in > 60fps. I'm thinking it shouldn't be tied to seconds-per-frame but I'm not positive - (* 2.0 (if (or (= (-> *setting-control* current video-mode) '150fps) - (= (-> *setting-control* current video-mode) '100fps)) - 0.016666668 - (-> *display* seconds-per-frame))) + (* 2.0 (-> *display* seconds-per-frame)) ) ) (let ((v1-317 (-> self skel effect))) @@ -2756,10 +2753,9 @@ (or (= v1-6 eichar-flop-down-loop-ja) (= v1-6 eichar-moving-flop-down-ja)) ) ) - (when (and (or (< (target-move-dist (if (or (= (-> *setting-control* current video-mode) '150fps) (= (-> *setting-control* current video-mode) '150fps)) - (if (= (-> *setting-control* current video-mode) '150ps) (seconds 0.04) (seconds 0.06)) - (seconds 0.1))) - (if (or (= (-> *setting-control* current video-mode) '150fps) (= (-> *setting-control* current video-mode) '100fps)) (if (= (-> *setting-control* current video-mode) '150fps) 655.36 983.04) 1638.4) + ;; changed for high fps. This fixes the invisible wall when flopping + (when (and (or (< (target-move-dist (the time-frame (* (-> *display* time-adjust-ratio) (seconds 0.1)))) + (* (-> *display* time-adjust-ratio) 1638.4) ) (and (logtest? (-> self control status) (cshape-moving-flags twall)) (< 0.7 (-> self control poly-angle))) ) diff --git a/goal_src/levels/beach/seagull.gc b/goal_src/levels/beach/seagull.gc index e493877f4c..0ed5cb74a4 100644 --- a/goal_src/levels/beach/seagull.gc +++ b/goal_src/levels/beach/seagull.gc @@ -4,6 +4,7 @@ ;; name: seagull.gc ;; name in dgo: seagull ;; dgos: BEA, L1 +;; note: modified for high fps (declare-type seagullflock process) @@ -306,7 +307,7 @@ ) (let ((f0-28 (+ (* (-> s5-0 x) (-> s5-0 x)) (* (-> s5-0 z) (-> s5-0 z))))) (set! (-> obj angletan) (/ (- (-> s5-0 y)) (sqrtf f0-28))) - (set! (-> obj target-dist) (sqrtf (+ f0-28 (* (-> s5-0 y) (-> s5-0 y))))) + (set! (-> obj target-dist) (* (-> *display* time-adjust-ratio) (sqrtf (+ f0-28 (* (-> s5-0 y) (-> s5-0 y)))))) ;; changed for high fps ) ) 0 @@ -469,7 +470,7 @@ ) ) ) - (set! (-> obj root-override transv y) f0-0) + (set! (-> obj root-override transv y) (* (-> *display* time-adjust-ratio) f0-0)) ;; changed for high fps ) 0 (none) @@ -504,8 +505,8 @@ (let ((f30-1 (* arg0 (sin (-> obj heading)))) (f0-4 (* arg0 (cos (-> obj heading)))) ) - (set! (-> obj root-override transv x) (+ (* 0.8 (-> obj root-override transv x)) (* 0.2 f30-1))) - (set! (-> obj root-override transv z) (+ (* 0.8 (-> obj root-override transv z)) (* 0.2 f0-4))) + (set! (-> obj root-override transv x) (* (-> *display* time-adjust-ratio) (+ (* 0.8 (-> obj root-override transv x)) (* 0.2 f30-1)))) ;; changed for high fps + (set! (-> obj root-override transv z) (* (-> *display* time-adjust-ratio) (+ (* 0.8 (-> obj root-override transv z)) (* 0.2 f0-4)))) ;; changed for high fps ) 0 (none) @@ -515,8 +516,8 @@ (let ((f30-1 (* arg0 (sin (-> obj heading)))) (f0-4 (* arg0 (cos (-> obj heading)))) ) - (set! (-> obj root-override transv x) f30-1) - (set! (-> obj root-override transv z) f0-4) + (set! (-> obj root-override transv x) (* (-> *display* time-adjust-ratio) f30-1)) ;; changed for high fps + (set! (-> obj root-override transv z) (* (-> *display* time-adjust-ratio) f0-4)) ;; changed for high fps ) 0 (none) @@ -589,7 +590,7 @@ ) ) ) - (set! (-> v1-13 root-override transv y) f0-5) + (set! (-> v1-13 root-override transv y) (* (-> *display* time-adjust-ratio) f0-5)) ;; changed for high fps ) 0 (let* ((gp-1 self) @@ -597,8 +598,8 @@ (f30-2 (* f28-0 (sin (-> gp-1 heading)))) (f0-10 (* f28-0 (cos (-> gp-1 heading)))) ) - (set! (-> gp-1 root-override transv x) (+ (* 0.8 (-> gp-1 root-override transv x)) (* 0.2 f30-2))) - (set! (-> gp-1 root-override transv z) (+ (* 0.8 (-> gp-1 root-override transv z)) (* 0.2 f0-10))) + (set! (-> gp-1 root-override transv x) (* (-> *display* time-adjust-ratio) (+ (* 0.8 (-> gp-1 root-override transv x)) (* 0.2 f30-2)))) ;; changed for high fps + (set! (-> gp-1 root-override transv z) (* (-> *display* time-adjust-ratio) (+ (* 0.8 (-> gp-1 root-override transv z)) (* 0.2 f0-10)))) ;; changed for high fps ) 0 ) @@ -718,7 +719,7 @@ ) (let ((f0-33 (+ (* (-> s4-0 x) (-> s4-0 x)) (* (-> s4-0 z) (-> s4-0 z))))) (set! (-> s5-0 angletan) (/ (- (-> s4-0 y)) (sqrtf f0-33))) - (set! (-> s5-0 target-dist) (sqrtf (+ f0-33 (* (-> s4-0 y) (-> s4-0 y))))) + (set! (-> s5-0 target-dist) (* (-> *display* time-adjust-ratio) (sqrtf (+ f0-33 (* (-> s4-0 y) (-> s4-0 y)))))) ;; changed for high fps ) ) 0 @@ -741,7 +742,7 @@ ) ) ) - (set! (-> v1-44 root-override transv y) f0-38) + (set! (-> v1-44 root-override transv y) (* (-> *display* time-adjust-ratio) f0-38)) ;; changed for high fps ) 0 ) @@ -762,7 +763,7 @@ ) ) ) - (set! (-> v1-48 root-override transv y) f0-39) + (set! (-> v1-48 root-override transv y) (* (-> *display* time-adjust-ratio) f0-39)) ;; changed for high fps ) 0 ) @@ -910,7 +911,7 @@ ) (let ((f0-33 (+ (* (-> s5-0 x) (-> s5-0 x)) (* (-> s5-0 z) (-> s5-0 z))))) (set! (-> gp-0 angletan) (/ (- (-> s5-0 y)) (sqrtf f0-33))) - (set! (-> gp-0 target-dist) (sqrtf (+ f0-33 (* (-> s5-0 y) (-> s5-0 y))))) + (set! (-> gp-0 target-dist) (* (-> *display* time-adjust-ratio) (sqrtf (+ f0-33 (* (-> s5-0 y) (-> s5-0 y)))))) ;; changed for high fps ) ) 0 @@ -923,8 +924,8 @@ (f30-0 (* f28-0 (sin (-> gp-1 heading)))) (f0-41 (* f28-0 (cos (-> gp-1 heading)))) ) - (set! (-> gp-1 root-override transv x) (+ (* 0.8 (-> gp-1 root-override transv x)) (* 0.2 f30-0))) - (set! (-> gp-1 root-override transv z) (+ (* 0.8 (-> gp-1 root-override transv z)) (* 0.2 f0-41))) + (set! (-> gp-1 root-override transv x) (* (-> *display* time-adjust-ratio) (+ (* 0.8 (-> gp-1 root-override transv x)) (* 0.2 f30-0)))) ;; changed for high fps + (set! (-> gp-1 root-override transv z) (* (-> *display* time-adjust-ratio) (+ (* 0.8 (-> gp-1 root-override transv z)) (* 0.2 f0-41)))) ;; changed for high fps ) 0 (dummy-27 self) @@ -1137,7 +1138,7 @@ (s4-1 (-> arg0 process)) ) (set! (-> (the-as seagull s4-1) temp-heading) (atan (-> v1-7 x) (-> v1-7 z))) - (set! (-> (the-as seagull s4-1) temp-heading-time) 300) + (set! (-> (the-as seagull s4-1) temp-heading-time) (seconds 1)) ) (let ((v0-2 (logior s5-0 3))) (set! (-> arg0 status) (the-as cshape-moving-flags v0-2)) diff --git a/goal_src/levels/rolling/rolling-robber.gc b/goal_src/levels/rolling/rolling-robber.gc index 80b5c40d63..46679b3ebb 100644 --- a/goal_src/levels/rolling/rolling-robber.gc +++ b/goal_src/levels/rolling/rolling-robber.gc @@ -4,6 +4,7 @@ ;; name: rolling-robber.gc ;; name in dgo: rolling-robber ;; dgos: L1, ROL +;; note: changed for high fps ;; DECOMP BEGINS @@ -24,9 +25,7 @@ (set! (-> *camera-other-root* quad) (-> *math-camera* trans quad)) (set! (-> self state-time) (-> *display* base-frame-counter)) (loop - (dotimes (v1-14 (the int (-> *display* time-adjust-ratio))) - (set! arg2 (* 0.95 arg2)) - ) + (*! arg2 (- 1.0 (* 0.05 (-> *display* time-adjust-ratio)))) ;; changed for high fps (when (and (< (fabs arg2) 13.653334) (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 1.5))) (if *target* (process-release? *target*)