A lot of FPS agnosticism, added def lerp

This commit is contained in:
Maruno17
2023-05-20 18:37:54 +01:00
parent 62e372f4d7
commit d112e2361a
38 changed files with 619 additions and 628 deletions

View File

@@ -812,14 +812,15 @@ end
def pbMessageWaitForInput(msgwindow, frames, showPause = false)
return if !frames || frames <= 0
msgwindow.startPause if msgwindow && showPause
frames = frames * Graphics.frame_rate / 20
frames.times do
timer_start = System.uptime
loop do
Graphics.update
Input.update
msgwindow&.update
pbUpdateSceneMap
break if Input.trigger?(Input::USE) || Input.trigger?(Input::BACK)
yield if block_given?
break if Input.trigger?(Input::USE) || Input.trigger?(Input::BACK)
break if System.uptime - timer_start >= frames / 20.0
end
msgwindow.stopPause if msgwindow && showPause
end