title change
This commit is contained in:
parent
56bc2539b1
commit
251a85ce16
|
|
@ -238,7 +238,6 @@ class Window_Settings
|
||||||
{
|
{
|
||||||
:type => :enum,
|
:type => :enum,
|
||||||
:name => "Main menu background",
|
:name => "Main menu background",
|
||||||
:icon => [3, 0],
|
|
||||||
:parameter => :mainmenu_background,
|
:parameter => :mainmenu_background,
|
||||||
:values => ["Original", "Badend", "Title Black"]
|
:values => ["Original", "Badend", "Title Black"]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -14,26 +14,6 @@ class Scene_Title
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# * Main Processing
|
# * Main Processing
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
def setbg
|
|
||||||
current_wallpaper = Settings[:mainmenu_background]
|
|
||||||
@sprite = Sprite.new(@viewport)
|
|
||||||
case Settings[:mainmenu_background]
|
|
||||||
when 0 then @sprite.bitmap = RPG::Cache.title($data_system.title_name)
|
|
||||||
when 1 then @sprite.bitmap = RPG::Cache.title("badend")
|
|
||||||
when 2 then @sprite.bitmap = RPG::Cache.picture("title_black")
|
|
||||||
else @sprite.bitmap = RPG::Cache.title($data_system.title_name)
|
|
||||||
end
|
|
||||||
@sprite.x = Graphics.width / 2
|
|
||||||
@sprite.y = Graphics.height / 2
|
|
||||||
px = (Graphics.width / 1920.0)
|
|
||||||
py = (Graphics.height / 1080.0)
|
|
||||||
@sprite.zoom_x = 2.0
|
|
||||||
@sprite.zoom_y = 2.0
|
|
||||||
@sprite.ox = @sprite.bitmap.width / 2 * (0.5 * (1.0 - px) + px)
|
|
||||||
@sprite.oy = @sprite.bitmap.height / 2 * (1.3 * (1.0 - py) + py)
|
|
||||||
@sprite.update
|
|
||||||
end
|
|
||||||
|
|
||||||
def main
|
def main
|
||||||
# Load database
|
# Load database
|
||||||
$data_actors = load_data("Data/Actors.rxdata")
|
$data_actors = load_data("Data/Actors.rxdata")
|
||||||
|
|
@ -43,6 +23,7 @@ class Scene_Title
|
||||||
$data_tilesets = load_data("Data/Tilesets.rxdata")
|
$data_tilesets = load_data("Data/Tilesets.rxdata")
|
||||||
$data_common_events = load_data("Data/CommonEvents.rxdata")
|
$data_common_events = load_data("Data/CommonEvents.rxdata")
|
||||||
$data_system = load_data("Data/System.rxdata")
|
$data_system = load_data("Data/System.rxdata")
|
||||||
|
|
||||||
Language.initialize_database
|
Language.initialize_database
|
||||||
|
|
||||||
$game_temp = Game_Temp.new
|
$game_temp = Game_Temp.new
|
||||||
|
|
@ -57,14 +38,21 @@ class Scene_Title
|
||||||
@window_settings_title = Window_Settings.new
|
@window_settings_title = Window_Settings.new
|
||||||
|
|
||||||
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
||||||
|
|
||||||
# Make title graphic
|
# Make title graphic
|
||||||
|
@old_setting = Settings[:mainmenu_background]
|
||||||
|
|
||||||
@sprite = Sprite.new(@viewport)
|
@sprite = Sprite.new(@viewport)
|
||||||
if File.exist?("badend.lock")
|
@badend_sprite = Sprite.new(@viewport)
|
||||||
@sprite.bitmap = RPG::Cache.title("badend")
|
|
||||||
|
# chinese has its own special title screen so check for it
|
||||||
|
translation_name = "#{$persistent.langcode}/#{$data_system.title_name}"
|
||||||
|
if File.exist?("Graphics/Titles/#{translation_name}.png")
|
||||||
|
@sprite.bitmap = RPG::Cache.title(translation_name)
|
||||||
else
|
else
|
||||||
current_wallpaper = Settings[:mainmenu_background]
|
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
|
||||||
setbg
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@sprite.x = Graphics.width / 2
|
@sprite.x = Graphics.width / 2
|
||||||
@sprite.y = Graphics.height / 2
|
@sprite.y = Graphics.height / 2
|
||||||
px = (Graphics.width / 1920.0)
|
px = (Graphics.width / 1920.0)
|
||||||
|
|
@ -79,8 +67,12 @@ class Scene_Title
|
||||||
$game_party.gain_item(81, 1) # George reroler
|
$game_party.gain_item(81, 1) # George reroler
|
||||||
end
|
end
|
||||||
|
|
||||||
@sprite.zoom_x = 2.0
|
@sprite.zoom_x = @sprite.zoom_y =
|
||||||
@sprite.zoom_y = 2.0
|
@badend_sprite.zoom_x = @badend_sprite.zoom_y = 2.0
|
||||||
|
|
||||||
|
redraw_bgs
|
||||||
|
update_visibility
|
||||||
|
|
||||||
# Create/render menu options
|
# Create/render menu options
|
||||||
@menu = Sprite.new(@viewport)
|
@menu = Sprite.new(@viewport)
|
||||||
@menu.z += 1
|
@menu.z += 1
|
||||||
|
|
@ -126,14 +118,11 @@ class Scene_Title
|
||||||
py = (Graphics.height / 1080.0)
|
py = (Graphics.height / 1080.0)
|
||||||
@sprite.ox = @sprite.bitmap.width / 2 * (0.5 * (1.0 - px) + px)
|
@sprite.ox = @sprite.bitmap.width / 2 * (0.5 * (1.0 - px) + px)
|
||||||
@sprite.oy = @sprite.bitmap.height / 2 * (1.3 * (1.0 - py) + py)
|
@sprite.oy = @sprite.bitmap.height / 2 * (1.3 * (1.0 - py) + py)
|
||||||
|
|
||||||
|
redraw_bgs
|
||||||
|
update_visibility
|
||||||
end
|
end
|
||||||
|
|
||||||
# Play title BGM
|
|
||||||
if File.exist?("badend.lock")
|
|
||||||
Audio.bgm_play("Audio/BGM/MyBurdenIsDead.ogg", Audio.bgm_volume, 100)
|
|
||||||
else
|
|
||||||
$game_system.bgm_play($data_system.title_bgm)
|
|
||||||
end
|
|
||||||
# Stop playing ME and BGS
|
# Stop playing ME and BGS
|
||||||
Audio.me_stop
|
Audio.me_stop
|
||||||
Audio.bgs_stop
|
Audio.bgs_stop
|
||||||
|
|
@ -142,12 +131,6 @@ class Scene_Title
|
||||||
Graphics.transition(40)
|
Graphics.transition(40)
|
||||||
# Main loop
|
# Main loop
|
||||||
while true
|
while true
|
||||||
# check if wallpaper changed
|
|
||||||
if current_wallpaper =! Settings[:mainmenu_background]
|
|
||||||
@sprite.bitmap.dispose
|
|
||||||
@sprite.dispose
|
|
||||||
setbg
|
|
||||||
end
|
|
||||||
# Update game screen
|
# Update game screen
|
||||||
Graphics.update
|
Graphics.update
|
||||||
# Update input information
|
# Update input information
|
||||||
|
|
@ -166,6 +149,8 @@ class Scene_Title
|
||||||
@update_connection.disconnect
|
@update_connection.disconnect
|
||||||
@sprite.bitmap.dispose
|
@sprite.bitmap.dispose
|
||||||
@sprite.dispose
|
@sprite.dispose
|
||||||
|
@badend_sprite.bitmap.dispose
|
||||||
|
@badend_sprite.dispose
|
||||||
@menu.bitmap.dispose
|
@menu.bitmap.dispose
|
||||||
@menu.dispose
|
@menu.dispose
|
||||||
@cursor.bitmap.dispose
|
@cursor.bitmap.dispose
|
||||||
|
|
@ -208,11 +193,52 @@ class Scene_Title
|
||||||
@debug.bitmap.draw_text(0, ENTRY_HEIGHT * 5, 200, ENTRY_HEIGHT, tr("Mods loaded:") + " " + ModLoader::COUNT.to_s)
|
@debug.bitmap.draw_text(0, ENTRY_HEIGHT * 5, 200, ENTRY_HEIGHT, tr("Mods loaded:") + " " + ModLoader::COUNT.to_s)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def redraw_bgs
|
||||||
|
if @badend_sprite.bitmap
|
||||||
|
@badend_sprite.bitmap.dispose
|
||||||
|
end
|
||||||
|
@badend_sprite.bitmap = RPG::Cache.title("badend")
|
||||||
|
|
||||||
|
@badend_sprite.ox = @badend_sprite.bitmap.width / 2
|
||||||
|
@badend_sprite.oy = @badend_sprite.bitmap.height / 2
|
||||||
|
@badend_sprite.x = Graphics.width / 2
|
||||||
|
@badend_sprite.y = Graphics.height / 2
|
||||||
|
end
|
||||||
|
|
||||||
|
def update_visibility
|
||||||
|
if File.exist?("badend.lock")
|
||||||
|
@sprite.visible = false
|
||||||
|
@badend_sprite.visible = true
|
||||||
|
Audio.bgm_play("Audio/BGM/MyBurdenIsDead.ogg", Audio.bgm_volume, 100)
|
||||||
|
else
|
||||||
|
case Settings[:mainmenu_background]
|
||||||
|
when 0
|
||||||
|
@sprite.visible = true
|
||||||
|
@badend_sprite.visible = false
|
||||||
|
$game_system.bgm_play($data_system.title_bgm)
|
||||||
|
when 1
|
||||||
|
@sprite.visible = false
|
||||||
|
@badend_sprite.visible = true
|
||||||
|
Audio.bgm_play("Audio/BGM/MyBurdenIsDead.ogg", Audio.bgm_volume, 100)
|
||||||
|
when 2
|
||||||
|
@sprite.visible = false
|
||||||
|
@badend_sprite.visible = false
|
||||||
|
Audio.bgm_stop
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# * Frame Update
|
# * Frame Update
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
def update
|
def update
|
||||||
|
if @old_setting != Settings[:mainmenu_background]
|
||||||
|
@old_setting = Settings[:mainmenu_background]
|
||||||
|
update_visibility
|
||||||
|
end
|
||||||
|
|
||||||
@debug.visible = Settings[:debug_text_scene_title] || false # if undefined don't render
|
@debug.visible = Settings[:debug_text_scene_title] || false # if undefined don't render
|
||||||
|
|
||||||
if Input.trigger?(Input::F8)
|
if Input.trigger?(Input::F8)
|
||||||
Graphics.fullscreen = $console = !Settings[:fullscreen]
|
Graphics.fullscreen = $console = !Settings[:fullscreen]
|
||||||
Settings[:fullscreen] = !Settings[:fullscreen]
|
Settings[:fullscreen] = !Settings[:fullscreen]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue