module Movie_Subtitles
def movie_start
Graphics.freeze
@sprite_pic = Sprite.new
@sprite_pic.bitmap = RPG::Cache.picture("School-Back.jpg")
@sprite_pic.z = 800
@sprite_widescreen = Sprite.new
@sprite_widescreen.bitmap = RPG::Cache.picture("Wide-Screen.png")
@sprite_widescreen.z = 1000
@sprite_texts = Sprite.new
@sprite_texts.bitmap = Bitmap.new(640, 96)
@sprite_texts.bitmap.font.size = 18
@sprite_texts.y = 480 - 96
@sprite_texts.z = 1005
Graphics.transition(40)
end
def show_lines(text)
Graphics.freeze
@sprite_texts.bitmap.clear
text_arr = text.split("\n")
text_arr.each_with_index do |line, i|
@sprite_texts.bitmap.draw_text(0, 16 + 32 * i, 640, 32, line, 1)
end
Graphics.transition(30)
end
def clear_texts
Graphics.freeze
@sprite_texts.bitmap.clear
Graphics.transition(30)
end
def show_pic(pic_name)
Graphics.freeze
if pic_name == ""
@sprite_pic.bitmap.dispose if @sprite_pic.bitmap != nil
@sprite_pic.bitmap = nil
else
@sprite_pic.bitmap = RPG::Cache.picture(pic_name)
end
Graphics.transition(40)
end
def movie_end
Graphics.freeze
@sprite_pic.dispose
@sprite_widescreen.bitmap.dispose
@sprite_widescreen.dispose
@sprite_texts.bitmap.dispose
@sprite_texts.dispose
Graphics.transition(40)
end
end
class Scene_Map
include Movie_Subtitles
end