class Scene_Pictures
def initialize(p, d, h, i = true, f = nil, s = Scene_
Map.new)
$game_system = Game_
System.new if $game_system == nil
@names, @delay, @hold, @int, @file, @next_scene = p, d, h, i, f, s
end
def main
$scene, @next_scene = @next_scene, nil
Graphics.transition
Graphics.freeze
delaying(true)
Audio.bgm_stop
if @file != nil
Audio.bgm_play("Audio/BGM/#{@file}", 100, 100)
@file = nil
end
i = 1
loop do
break if there_are_no_more_files(@names + i.to_s)
@pic = RPG::Sprite.new
@pic.bitmap = RPG::Cache.picture("Scene/#{@names}#{i}")
@pic.x, @pic.y = 320 - @pic.bitmap.width/2, 240 - @pic.bitmap.height/2
Graphics.transition(12)
break if delaying
Graphics.freeze
@pic.dispose
@pic = nil
Graphics.transition(12)
break if delaying(true)
Graphics.freeze
i += 1
end
unless @pic == nil || @pic.disposed?
@pic.dispose
Graphics.transition(12)
else
Graphics.transition(4)
end
delaying(true)
Audio.bgm_fade(800)
Graphics.freeze
end
def delaying(just_hold = false)
(0...(just_hold ? @hold : @delay)*40).each {|i|
Graphics.update
if @int
Input.update
return true if
Input.press?(Input::C) ||
Input.press?(Input::B)
end}
return false
end
def there_are_no_more_files(name)
return (!FileTest.exist?("Graphics/Pictures/Scene/#{name}.png") &&
!FileTest.exist?("Graphics/Pictures/Scene/#{name}.jpg"))
end
end