Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[high fps] fix blinking in all games #3759

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions goal_src/jak1/engine/gfx/foreground/eye.gc
Original file line number Diff line number Diff line change
Expand Up @@ -688,17 +688,18 @@
(cond
((and (>= (-> s5-3 left lid) 0.0) (>= (-> s5-3 right lid) 0.0))
(set! (-> s5-3 random-time)
(the int
(* (/ 1.0 (-> *display* time-adjust-ratio)) ;; og:preserve-this changed for high fps
(the-as uint 60))))
(the int (* (1/ DISPLAY_FPS_RATIO) ;; og:preserve-this changed for high fps
(the-as uint 60))))
(set! (-> s5-3 blink) 0.0))
(else
(+! (-> s5-3 random-time) -1)
(let ((v1-54 (-> s5-3 random-time)))
(let ((v1-54 (the int (* DISPLAY_FPS_RATIO (-> s5-3 random-time))))) ;; og:preserve-this changed for high fps
(when (< v1-54 (the-as uint 10))
(set! (-> s5-3 blink) (-> *eye-work* blink-table v1-54))
(if (zero? v1-54)
(set! (-> s5-3 random-time) (the-as uint (the int (* (1/ DISPLAY_FPS_RATIO) (rand-vu-float-range 60.0 240.0)))))))))))
(set! (-> s5-3 random-time) (the-as uint (the int
(* (1/ DISPLAY_FPS_RATIO) ;; og:preserve-this changed for high fps
(rand-vu-float-range 60.0 240.0)))))))))))
;; pick between level and common eyes
(cond
((>= (the-as uint 1) (-> s5-3 level))
Expand Down
12 changes: 9 additions & 3 deletions goal_src/jak2/engine/gfx/foreground/eye.gc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
;; name in dgo: eye
;; dgos: ENGINE, GAME

;; note: changed for high fps

;; DECOMP BEGINS

(define *eye-work* (new 'static 'eye-work
Expand Down Expand Up @@ -1029,16 +1031,20 @@
(when (not (paused?))
(cond
((and (>= (-> s4-0 left lid) 0.0) (>= (-> s4-0 right lid) 0.0))
(set! (-> s4-0 random-time) (the-as uint 60))
(set! (-> s4-0 random-time)
(the int (* (1/ DISPLAY_FPS_RATIO) ;; og:preserve-this changed for high fps
(the-as uint 60))))
(set! (-> s4-0 blink) 0.0)
)
(else
(+! (-> s4-0 random-time) -1)
(let ((v1-22 (-> s4-0 random-time)))
(let ((v1-22 (the int (* DISPLAY_FPS_RATIO (-> s4-0 random-time))))) ;; og:preserve-this changed for high fps
(when (< v1-22 (the-as uint 10))
(set! (-> s4-0 blink) (-> *eye-work* blink-table v1-22))
(if (zero? v1-22)
(set! (-> s4-0 random-time) (the-as uint (the int (rand-vu-float-range 60.0 240.0))))
(set! (-> s4-0 random-time) (the-as uint (the int
(* (1/ DISPLAY_FPS_RATIO) ;; og:preserve-this changed for high fps
(rand-vu-float-range 60.0 240.0)))))
)
)
)
Expand Down
12 changes: 9 additions & 3 deletions goal_src/jak3/engine/gfx/foreground/eye.gc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
;; name in dgo: eye
;; dgos: GAME

;; note: changed for high fps

;; DECOMP BEGINS

;; og:preserve-this
Expand Down Expand Up @@ -717,16 +719,20 @@
(when (not (paused?))
(cond
((and (>= (-> s5-0 left lid) 0.0) (>= (-> s5-0 right lid) 0.0))
(set! (-> s5-0 random-time) (the-as uint 60))
(set! (-> s5-0 random-time)
(the int (* (1/ DISPLAY_FPS_RATIO) ;; og:preserve-this changed for high fps
(the-as uint 60))))
(set! (-> s5-0 blink) 0.0)
)
(else
(+! (-> s5-0 random-time) -1)
(let ((v1-19 (-> s5-0 random-time)))
(let ((v1-19 (the int (* DISPLAY_FPS_RATIO (-> s5-0 random-time))))) ;; og:preserve-this changed for high fps
(when (< v1-19 (the-as uint 10))
(set! (-> s5-0 blink) (-> *eye-work* blink-table v1-19))
(if (zero? v1-19)
(set! (-> s5-0 random-time) (the-as uint (the int (rand-vu-float-range 60.0 240.0))))
(set! (-> s5-0 random-time) (the-as uint (the int
(* (1/ DISPLAY_FPS_RATIO) ;; og:preserve-this changed for high fps
(rand-vu-float-range 60.0 240.0)))))
)
)
)
Expand Down
Loading