Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # Options
- #===============================================================================
- module Options
- #===============================================================================
- #Jet's Splash Config
- #===============================================================================
- # These are the pictures that will be cycled through in the splash scene
- SPLASH_PICTURES = ["Logo"]
- # These are SE that will be played for each picture. The SE will play
- # with the same picture that shares the index.
- # If you don't want an SE to play with a picture, fill the index with ""
- SPLASH_SOUNDS = ["Heal2"]
- # Do you want to skip the splash scene in testing mode?
- SPLASH_DISABLED_IN_DEBUG = true
- # Do you want the splash screen skippable in the actual game as well?
- SPLASH_SKIPPABLE = true
- # If SPLASH_SKIPPABLE is true, what button should be pressed to skip it?
- # Note: Input::C is the enter button
- SPLASH_SKIP_BUTTON = Input::C
- # Harder Config (For those who know how to configure well)
- #==========================================================================
- # Enabling this ignore the SPLASH_PICTURES and SPLASH_SOUNDS config above
- ENABLE_HARDER_CONFIG = true
- # This is the config for a cooler looking splash scene.
- # It follows this format:
- # picture_name => [se_name, anim_id, fadein_time, fadeout_time, frame_time]
- # se_name is the SE to be played with the picture. Use "" for no SE
- # anim_id is the animation to be played ontop of the picture. Use 0 for none
- # fadein_time is how many frames it takes to fade into the picture
- # fadeout_time is how many frames it takes to fadeout to the next picture
- # frame_time is how long the picture stays on the screen before fading out
- SUPER_SPLASH = {
- "Logo" => ["Heal2", 0, 60, 60, 180]
- }
- # End Jet's Splash Config
- #===============================================================================
- #===============================================================================
- # Zerbu's Title Options
- #===============================================================================
- ZE_TSWO = {
- #------------------------------------------------------------------------
- # What font should be used on the title screen?
- #------------------------------------------------------------------------
- :FONT_FACE => ["VL Gothic", "Verdana", "Arial", "Courier"],
- #------------------------------------------------------------------------
- # What size should the text be?
- #------------------------------------------------------------------------
- :FONT_SIZE => 24,
- #------------------------------------------------------------------------
- # Should the text on the title screen be bold?
- #------------------------------------------------------------------------
- :FONT_BOLD => false,
- #------------------------------------------------------------------------
- # Should the text on the title screen be italic?
- #------------------------------------------------------------------------
- :FONT_ITALIC => false,
- #------------------------------------------------------------------------
- # Should the text on the title screen have a shadow?
- #------------------------------------------------------------------------
- :FONT_SHADOW => false,
- #------------------------------------------------------------------------
- # Should the text on the title screen have an outline?
- #------------------------------------------------------------------------
- :FONT_OUTLINE => true,
- #------------------------------------------------------------------------
- # What colour should the outline be? The format to use is:
- # [red, green, blue, opacity]
- #------------------------------------------------------------------------
- :FONT_OUT_COL => [0, 0, 0],
- #------------------------------------------------------------------------
- # This is the Windowskin used on the title screen.
- #------------------------------------------------------------------------
- :WINDOWSKIN => "TitleWindow",
- #------------------------------------------------------------------------
- # This is the width of the title window. If this is set to 0, the
- # default width will be used.
- #------------------------------------------------------------------------
- :WINDOW_WIDTH => 500,
- #------------------------------------------------------------------------
- # This is the X position of the title window. If this is set to -1, the
- # default position will be used.
- #------------------------------------------------------------------------
- :WINDOW_X => 20,
- #------------------------------------------------------------------------
- # This is the Y position of the title window. If this is set to -1, the
- # default position will be used.
- #------------------------------------------------------------------------
- :WINDOW_Y => 275,
- #------------------------------------------------------------------------
- # This is the opacity of the window.
- #------------------------------------------------------------------------
- :OPACITY => 0,
- #------------------------------------------------------------------------
- # This is the back opacity of the window.
- #------------------------------------------------------------------------
- :BACK_OPACITY => 200,
- #------------------------------------------------------------------------
- #This is the background picture.
- #------------------------------------------------------------------------
- :BACK_PIC => "Plane1"
- }
- # End Zerbu's Title Options
- #===============================================================================
- end
- #===============================================================================
- # Jet's Splash Screen
- #===============================================================================
- class Scene_Title < Scene_Base
- include Options
- def start
- if ENABLE_HARDER_CONFIG
- do_super_splash
- else
- create_sprites
- create_sounds
- do_splash
- end
- end
- def terminate
- return if @sprites.nil?
- for sprite in @sprites
- sprite.dispose
- sprite = nil
- end
- end
- def create_sprites
- @sprites = []
- for pic in SPLASH_PICTURES
- f = Cache.picture(pic)
- g = Sprite_Base.new
- g.bitmap = f
- g.visible = false
- @sprites << g
- end
- end
- def create_sounds
- @sounds = []
- for sound in SPLASH_SOUNDS
- @sounds << RPG::SE.new(sound, 80, 100)
- end
- end
- def do_splash
- Graphics.transition
- Graphics.fadeout(60)
- for sprite in @sprites
- sprite.visible = true
- Graphics.fadein(60)
- begin
- @sounds[@sprites.index(sprite)].play
- rescue
- end
- 180.times do
- Input.update if SPLASH_SKIPPABLE
- if Input.trigger?(SPLASH_SKIP_BUTTON)
- $scene = Scene_Title2.new
- break
- end
- Graphics.wait(1)
- end
- Graphics.fadeout(60)
- sprite.visible = false
- end
- $jet6667876666765 = true
- SceneManager.call(Scene_Title2)
- end
- def do_super_splash
- Graphics.transition
- Graphics.fadeout(1)
- for sprite in SUPER_SPLASH.keys
- q = Sprite_Base.new
- q.bitmap = Cache.picture(sprite)
- Graphics.fadein(SUPER_SPLASH[sprite][2])
- begin
- RPG::SE.new(SUPER_SPLASH[sprite][0], 80, 100).play
- rescue
- end
- anim = load_data("Data/Animations.rvdata2")[SUPER_SPLASH[sprite][1]]
- if SUPER_SPLASH[sprite][1] != 0
- q.start_animation(anim)
- end
- SUPER_SPLASH[sprite][4].times do
- Input.update if SPLASH_SKIPPABLE
- if Input.trigger?(SPLASH_SKIP_BUTTON)
- $scene = Scene_Title2.new
- break
- end
- q.update
- Graphics.update
- end
- Graphics.fadeout(SUPER_SPLASH[sprite][3])
- end
- $jet6667876666765 = true
- SceneManager.call(Scene_Title2)
- end
- end
- #==============================================================================
- # �–� Scene_Title
- #------------------------------------------------------------------------------
- # �€€�‚��‚��ƒˆ�ƒ��”�面の�‡���†�‚’��Œ��†�‚��ƒ��‚�で��™�€‚
- #==============================================================================
- class Scene_Title2 < Scene_Base
- include Options
- #--------------------------------------------------------------------------
- # �—� �–‹��‹�‡���†
- #--------------------------------------------------------------------------
- def start
- super
- SceneManager.clear
- Graphics.freeze
- create_background
- create_foreground
- create_command_window
- play_title_music
- end
- #--------------------------------------------------------------------------
- # �—� �ƒˆ�ƒ��ƒ��‚��‚��ƒ��ƒ��€Ÿ度の��–��—
- #--------------------------------------------------------------------------
- def transition_speed
- return 20
- end
- #--------------------------------------------------------------------------
- # �—� ��‚��†�‡���†
- #--------------------------------------------------------------------------
- def terminate
- super
- SceneManager.snapshot_for_background
- dispose_background
- dispose_foreground
- end
- #--------------------------------------------------------------------------
- # �—� �ƒŒ�™�の��œ�ˆ�
- #--------------------------------------------------------------------------
- def create_background
- @sprite1 = Sprite.new
- @sprite1.bitmap = Cache.picture(ZE_TSWO[:BACK_PIC])
- center_sprite(@sprite1)
- end
- #--------------------------------------------------------------------------
- # �—� �‰��™�の��œ�ˆ�
- #--------------------------------------------------------------------------
- def create_foreground
- @foreground_sprite = Sprite.new
- @foreground_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height)
- @foreground_sprite.z = 100
- end
- #--------------------------------------------------------------------------
- # �—� �ƒŒ�™�の解�”�
- #--------------------------------------------------------------------------
- def dispose_background
- @sprite1.bitmap.dispose
- @sprite1.dispose
- end
- #--------------------------------------------------------------------------
- # �—� �‰��™�の解�”�
- #--------------------------------------------------------------------------
- def dispose_foreground
- @foreground_sprite.bitmap.dispose
- @foreground_sprite.dispose
- end
- #--------------------------------------------------------------------------
- # �—� �‚��ƒ—�ƒ��‚��ƒˆ�‚’�”�面中央に移�‹•
- #--------------------------------------------------------------------------
- def center_sprite(sprite)
- sprite.ox = sprite.bitmap.width / 2
- sprite.oy = sprite.bitmap.height / 2
- sprite.x = Graphics.width / 2
- sprite.y = Graphics.height / 2
- end
- #--------------------------------------------------------------------------
- # �—� �‚��ƒž�ƒ��ƒ‰�‚��‚��ƒ��ƒ‰�‚�の��œ�ˆ�
- #--------------------------------------------------------------------------
- def create_command_window
- @command_window = Window_TitleCommand.new
- @command_window.set_handler(:new_game, method(:command_new_game))
- @command_window.set_handler(:continue, method(:command_continue))
- @command_window.set_handler(:shutdown, method(:command_shutdown))
- end
- #--------------------------------------------------------------------------
- # �—� �‚��ƒž�ƒ��ƒ‰�‚��‚��ƒ��ƒ‰�‚��‚’�–‰��˜�‚‹
- #--------------------------------------------------------------------------
- def close_command_window
- @command_window.close
- update until @command_window.close?
- end
- #--------------------------------------------------------------------------
- # �—� �‚��ƒž�ƒ��ƒ‰[�ƒ‹�ƒ��ƒ��‚��ƒ��ƒ�]
- #--------------------------------------------------------------------------
- def command_new_game
- DataManager.setup_new_game
- close_command_window
- fadeout_all
- $game_map.autoplay
- SceneManager.goto(Scene_Map)
- end
- #--------------------------------------------------------------------------
- # �—� �‚��ƒž�ƒ��ƒ‰[�‚��ƒ��ƒ†�‚��ƒ‹�ƒ��ƒ�]
- #--------------------------------------------------------------------------
- def command_continue
- close_command_window
- SceneManager.call(Scene_Load)
- end
- #--------------------------------------------------------------------------
- # �—� �‚��ƒž�ƒ��ƒ‰[�‚��ƒ��ƒƒ�ƒˆ�ƒ€�‚��ƒ�]
- #--------------------------------------------------------------------------
- def command_shutdown
- close_command_window
- fadeout_all
- SceneManager.exit
- end
- #--------------------------------------------------------------------------
- # �—� �‚��‚��ƒˆ�ƒ��”�面の�Ÿ�楽��”奏
- #--------------------------------------------------------------------------
- def play_title_music
- $data_system.title_bgm.play
- RPG::BGS.stop
- RPG::ME.stop
- end
- end
- #============================================================================
- # Zerbu Engine - Title Screen Window Options
- #----------------------------------------------------------------------------
- # This script allows you to set window options specifically for the title
- # screen to customize its appearance.
- #============================================================================
- #============================================================================
- # Window_TitleCommand
- #============================================================================
- class Window_TitleCommand < Window_Command
- include Options
- #--------------------------------------------------------------------------
- # alias method: initialize
- #--------------------------------------------------------------------------
- alias ze_tsto_initialize initialize
- def initialize
- #---
- ze_tsto_initialize
- #---
- self.windowskin = Cache.system(ZE_TSWO[:WINDOWSKIN])
- self.opacity = ZE_TSWO[:OPACITY]
- self.back_opacity = ZE_TSWO[:BACK_OPACITY]
- #---
- end
- #--------------------------------------------------------------------------
- # alias method: window_width
- #--------------------------------------------------------------------------
- alias ze_tswo_window_width window_width
- def window_width
- #---
- if ZE_TSWO[:WINDOW_WIDTH] != 0
- return ZE_TSWO[:WINDOW_WIDTH]
- else
- ze_tswo_window_width
- end
- #---
- end
- #--------------------------------------------------------------------------
- # alias method: draw_item
- #--------------------------------------------------------------------------
- alias ze_tswo_draw_item draw_item
- def draw_item(index)
- #---
- contents.font.name = ZE_TSWO[:FONT_FACE]
- contents.font.size = ZE_TSWO[:FONT_SIZE]
- contents.font.bold = ZE_TSWO[:FONT_BOLD]
- contents.font.italic = ZE_TSWO[:FONT_ITALIC]
- contents.font.shadow = ZE_TSWO[:FONT_SHADOW]
- contents.font.outline = ZE_TSWO[:FONT_OUTLINE]
- contents.font.out_color = Color.new(ZE_TSWO[:FONT_OUT_COL][0], ZE_TSWO[:FONT_OUT_COL][1], ZE_TSWO[:FONT_OUT_COL][2])
- #---
- ze_tswo_draw_item(index)
- #---
- end
- #--------------------------------------------------------------------------
- # overwrite method: update_placement
- #--------------------------------------------------------------------------
- def update_placement
- #---
- if ZE_TSWO[:WINDOW_X] != -1
- self.x = ZE_TSWO[:WINDOW_X]
- else
- self.x = (Graphics.width - width) / 2
- end
- #---
- if ZE_TSWO[:WINDOW_Y] != -1
- self.y = ZE_TSWO[:WINDOW_Y]
- else
- self.y = (Graphics.height * 1.6 - height) / 2
- end
- #---
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment