mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
A lot of FPS agnosticism, added def lerp
This commit is contained in:
@@ -26,12 +26,13 @@ class Interpreter
|
||||
|
||||
def clear
|
||||
@map_id = 0 # map ID when starting up
|
||||
@event_id = 0 # event ID
|
||||
@event_id = 0
|
||||
@message_waiting = false # waiting for message to end
|
||||
@move_route_waiting = false # waiting for move completion
|
||||
@wait_count = 0 # wait count
|
||||
@child_interpreter = nil # child interpreter
|
||||
@branch = {} # branch data
|
||||
@wait_count = 0
|
||||
@wait_start = nil
|
||||
@child_interpreter = nil
|
||||
@branch = {}
|
||||
@buttonInput = false
|
||||
@hidden_choices = []
|
||||
@renamed_choices = []
|
||||
@@ -114,8 +115,9 @@ class Interpreter
|
||||
end
|
||||
# Do nothing while waiting
|
||||
if @wait_count > 0
|
||||
@wait_count -= 1
|
||||
return
|
||||
return if System.uptime - @wait_start < @wait_count
|
||||
@wait_count = 0
|
||||
@wait_start = nil
|
||||
end
|
||||
# Do nothing if the pause menu is going to open
|
||||
return if $game_temp.menu_calling
|
||||
|
||||
@@ -349,21 +349,16 @@ class Interpreter
|
||||
#-----------------------------------------------------------------------------
|
||||
def pbButtonInputProcessing(variable_number = 0, timeout_frames = 0)
|
||||
ret = 0
|
||||
timer = timeout_frames * Graphics.frame_rate / 20
|
||||
timer_start = System.uptime
|
||||
loop do
|
||||
Graphics.update
|
||||
Input.update
|
||||
pbUpdateSceneMap
|
||||
# Check for input and break if there is one
|
||||
(1..18).each do |i|
|
||||
ret = i if Input.trigger?(i)
|
||||
end
|
||||
(1..18).each { |i| ret = i if Input.trigger?(i) }
|
||||
break if ret != 0
|
||||
# Count down the timer and break if it runs out
|
||||
if timeout_frames > 0
|
||||
timer -= 1
|
||||
break if timer <= 0
|
||||
end
|
||||
# Break if the timer runs out
|
||||
break if timeout_frames > 0 && System.uptime - timer_start >= timeout_frames / 20.0
|
||||
end
|
||||
Input.update
|
||||
if variable_number && variable_number > 0
|
||||
@@ -386,7 +381,8 @@ class Interpreter
|
||||
# * Wait
|
||||
#-----------------------------------------------------------------------------
|
||||
def command_106
|
||||
@wait_count = @parameters[0] * Graphics.frame_rate / 20
|
||||
@wait_count = @parameters[0] / 20.0
|
||||
@wait_start = System.uptime
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user