Â
class Scene_Title
 # ---------------------------------------------- #
 #  Change title-screen if a switch is ON     #
 #  * Set the switch ID & name of title below !  #
 # ---------------------------------------------- #
 def set_title_pic
  switch_ID = 1
  new_title_name = "001-Title05"
  switch_is_on = false
  for i in 0..3
   file = "Save#{i+1}.rxdata"
   if FileTest.exist?(file)
    temp_load_data(file)
    if $game_switches[switch_ID]
     switch_is_on = true
    end
   end
  end
  if switch_is_on
   @sprite.bitmap = RPG::Cache.title( new_title_name )
  else
   @sprite.bitmap = RPG::Cache.title($data_system.title_name)
  end
 Â
 end # method end
Â
 def temp_load_data(file)
  # loading the file, copied from Scene_Load
  file = File.open(file, "rb")
  # Data in the file must be loaded in this order :
  characters = Marshal.load(file)
  Graphics.frame_count = Marshal.load(file)
  $game_system     = Marshal.load(file)
  $game_switches    = Marshal.load(file)
  #p "switch[1] = #{$game_switches[1]}"
  file.close
 end
Â
 def main
    # If battle test
  if $BTEST
   battle_test
   return
  end
  # Load database
  $data_actors     = load_data("Data/Actors.rxdata")
  $data_classes    = load_data("Data/Classes.rxdata")
  $data_skills     = load_data("Data/Skills.rxdata")
  $data_items     = load_data("Data/Items.rxdata")
  $data_weapons    = load_data("Data/Weapons.rxdata")
  $data_armors     = load_data("Data/Armors.rxdata")
  $data_enemies    = load_data("Data/Enemies.rxdata")
  $data_troops     = load_data("Data/Troops.rxdata")
  $data_states     = load_data("Data/States.rxdata")
  $data_animations   = load_data("Data/Animations.rxdata")
  $data_tilesets    = load_data("Data/Tilesets.rxdata")
  $data_common_events = load_data("Data/CommonEvents.rxdata")
  $data_system     = load_data("Data/System.rxdata")
  # Make system object
  $game_system = Game_System.new
  # Make title graphic
  @sprite = Sprite.new
  #-------edit---------#
  set_title_pic
  #@sprite.bitmap = RPG::Cache.title($data_system.title_name)
  #---------------------#
  # Make command window
  s1 = "New Game"
  s2 = "Continue"
  s3 = "Shutdown"
  @command_window = Window_Command.new(192, [s1, s2, s3])
  @command_window.back_opacity = 160
  @command_window.x = 320 - @command_window.width / 2
  @command_window.y = 288
  # Continue enabled determinant
  # Check if at least one save file exists
  # If enabled, make @continue_enabled true; if disabled, make it false
  @continue_enabled = false
  for i in 0..3
   if FileTest.exist?("Save#{i+1}.rxdata")
    @continue_enabled = true
   end
  end
  # If continue is enabled, move cursor to "Continue"
  # If disabled, display "Continue" text in gray
  if @continue_enabled
   @command_window.index = 1
  else
   @command_window.disable_item(1)
  end
  # Play title BGM
  $game_system.bgm_play($data_system.title_bgm)
  # Stop playing ME and BGS
  Audio.me_stop
  Audio.bgs_stop
  # Execute transition
  Graphics.transition
  # Main loop
  loop do
   # Update game screen
   Graphics.update
   # Update input information
   Input.update
   # Frame update
   update
   # Abort loop if screen is changed
   if $scene != self
    break
   end
  end
  # Prepare for transition
  Graphics.freeze
  # Dispose of command window
  @command_window.dispose
  # Dispose of title graphic
  @sprite.bitmap.dispose
  @sprite.dispose
 end
Â
Â
end