Klokreations

You are not connected. Please login or register

Splash Screen stuff

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Splash Screen stuff on Wed Feb 06, 2013 4:01 pm

Klokinator

avatar
Admin
This is the default FEXP title screen script. This makes the humming noise, then the screen flash, then the title screen.

Code:
#------------------------------------------------------------------------------
#  This class shows a splash screen before the title.
#==============================================================================
class Scene_Title_Load < SDK::Scene_Base
  def main_variable
    Graphics.frame_rate = 60
    @timer = 0
    @action = 0
  end
  #--------------------------------------------------------------------------
  # * Main Processing : Sprite Initialization
  #--------------------------------------------------------------------------
  def main_sprite
    super
    @sword = Sprite.new
    ###@sword.bitmap = RPG::Cache.picture('Title Sword')
    @sword.x = FE_Config::SCREEN_WIDTH / 2
    @sword.y = -44
    @sword.oy = 272
    ###@sword.ox = @sword.bitmap.width / 2
    @fe_logo = Sprite.new
    ###@fe_logo.bitmap = RPG::Cache.picture('Fire Emblem Logo')
    @fe_logo.x = 44 + 52
    @fe_logo.y = 56 - 8 + 8
    @fe_logo.opacity = 0
    audiofile = RPG::AudioFile.new('Chapter Transition Humming',
          50, 100, 0)
    $game_system.bgm_play(audiofile, true)
  end
 
  def update
    if Input.trigger?(Input::A) or Input.trigger?(Input::C)
      $scene = Scene_Title.new
    else
      case @action
      # Pause
      when 0
        @timer += 1
        if @timer > 60
          @timer = 0
          @action = 1
        end
      # FE Logo appears
      when 1
        @fe_logo.y += 1
        @fe_logo.opacity += 32
        if @fe_logo.opacity >= 255
          @action = 2
        end
      # Pause again
      when 2
        @timer += 1
        if @timer > 60
          @timer = 0
          @action = 3
        end
      # Slide logo
      when 3
        @fe_logo.x -= 4
        if @fe_logo.x <= 36
          @action = 4
        end
      # Pause again
      when 4
        @timer += 1
        if @timer > 6
          @timer = 0
          @action = 5
        end
      # Sword moves down
      when 5
        @sword.oy -= 16
        if @sword.oy <= 0
          @action = 6
        end
      # Screen flash
      when 6
        case @timer
        when 0
          @flash = Sprite.new
          @flash.bitmap = Bitmap.new(
              FE_Config::SCREEN_WIDTH,FE_Config::SCREEN_HEIGHT)
          @flash.bitmap.full_fill(Color.new(255,255,255))
        when 2
          @flash.bitmap.full_fill(Color.new(0,0,0))
          $scene = Scene_Title.new
        end
        @timer += 1
      end
    end
  end

My desire is to cut out the humming noise, add this image as the splash screen for zoom 2 and a half sized version for zoom 1, display it for 2.5 seconds with no option to skip, then cut to the main title screen.

Yeti's zoom code:

Code:

  def set_background
    @sprite = Sprite.new
    if $zoom >= 2
      begin
        @sprite.bitmap = RPG::Cache.title($data_system.title_name + "_2")
        @sprite.zoom_x = @sprite.zoom_y = 0.5
      rescue Errno::ENOENT
        @sprite.bitmap = RPG::Cache.title($data_system.title_name)
        @sprite.zoom_x = @sprite.zoom_y = 1
      end
    else
      @sprite.bitmap = RPG::Cache.title($data_system.title_name)
      @sprite.zoom_x = @sprite.zoom_y = 1
    end
  end

I need to somehow mash Yeti's zoom code into the title screen code. From there I can edit as needed, that's the easy part, but integrating is the hard part for me.


___________________________________
http://klokreations.forumotion.com

2 Re: Splash Screen stuff on Wed Feb 06, 2013 4:20 pm

Guest


Guest
Replace @fe_logo.bitmap = RPG::Cache.picture('Fire Emblem Logo')
with
@fe_logo.bitmap = RPG::Cache.picture('YOURIMAGEFILENAME')

Then, directly below that, add:

if $zoom >= 2
@fe_logo.zoom_x = @fe_logo.zoom_y = 0.5
end

Make sure the @fe_logo.zoom_x = @fe_logo.zoom_y = 0.5 is indented forwards for proper formatting, if that wasn't obvious. Forum won't let me include the spacing in this post.

3 Re: Splash Screen stuff on Wed Feb 06, 2013 4:22 pm

Klokinator

avatar
Admin
Use code tags, btw. It's ['code'] and [/'code'] minus the apostraphes.

Alright thanks I'll try doing this.


___________________________________
http://klokreations.forumotion.com

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum