Files
infinitefusion-e18/Data/Scripts/999_Main/999_Main.rb
2021-02-28 21:26:16 +00:00

55 lines
1.1 KiB
Ruby

class Scene_DebugIntro
def main
Graphics.transition(0)
sscene = PokemonLoad_Scene.new
sscreen = PokemonLoadScreen.new(sscene)
sscreen.pbStartLoadScreen
Graphics.freeze
end
end
def pbCallTitle
return Scene_DebugIntro.new if $DEBUG
# First parameter is an array of images in the Titles directory without a file
# extension, to show before the actual title screen. Second parameter is the
# actual title screen filename, also in Titles with no extension.
return Scene_Intro.new(['intro1'], 'splash')
end
def mainFunction
if $DEBUG
pbCriticalCode { mainFunctionDebug }
else
mainFunctionDebug
end
return 1
end
def mainFunctionDebug
begin
Compiler.main
Game.initialize
Game.set_up_system
Graphics.update
Graphics.freeze
$scene = pbCallTitle
$scene.main until $scene.nil?
Graphics.transition(20)
rescue Hangup
pbPrintException($!) if !$DEBUG
pbEmergencySave
raise
end
end
loop do
retval = mainFunction
if retval == 0 # failed
loop do
Graphics.update
end
elsif retval == 1 # ended successfully
break
end
end