#==============================================================================
# Splash Screen Script + Auto Full Screen v2.0
# + Movie Intro!
# by Nabu (huntoxic@gmail.com)
#
#
# Original Script Homepage:
#
http://www.rpgrevolution.com/forums/index....showtopic=34238#
# Used up trebor777's Avi player script. Dont forget to credit him!
#==============================================================================
#
# ****Changelog****
#
# v2.0
# - New form
# [+]Easier to install, plug 'n play
# [+]Everything in modules
# - Ability to SHOW MOVIES !!!
# v1.1b
# - Another bugfix -.-
# - Organized comments
# v1.1
# - Added sound effects
# - Small bugfix
# v1.0 (first published version)
# - Fully configurable
# - Auto Full Screen
# - Added transition
# ???? (not published)
# - Showing pictures w/o transition and config
# - Auto full screen
#------------------------------------------------------------------------------
# ***********************
# * Config Section! *
# ***********************
module SplashConfig
# When true: automatic full screen at game start
AutoFullScreen = true
# Amount of the splash screens showd at game start. Max 9!
NumOfScreens = 2
# Amount of the Movie intros at the game start. Max 9! (why?? o,O)
NumOfMovies = 1
#Length of the transition in frames
TransitionLen = 100
#Length of the fadeout / fadein in frames
FadeoutLen = 180
# Now add your splash screen filenames
# Don't forget the comma after each line (except last)!!!
# Put the files into <game folder>\Graphics\Pictures
# Best resolution: 544 x 416 pixels.
FileNames =
[
"Splash1.png",
"Splash2.png" #,
#"WhatYouWant.png,
#"AnotheRsPLashScrEEn^_^.png,
#.......... etc
] # don't remove this
# Now set the wait time after each screen. (in frames - 60 frames = 1 sec)
# Use the same form as by the fileNames
WaitTime =
[
120,
150 #,
#200,
#100,
#etc
] # don't remove this
# Now add the sound effects
# Specify full path plz...
# . -> Game Folder
SplashBGM =
[
"./Audio/BGM/video_NEW.mp3",
"./Audio/BGM/video_NEW.mp3" #,
#"MoreSplashSoundsHere.ogg",
#".......mp3"
] # don't remove this
# Last part: define your video files.
# Please read the instructions on the forum carefully
# DO NOT WRITE .avi (the extension). It will be added automatically!
IntroMovie =
[
"StoryX",
#"More",
#"...."
] # don't remove this
# ******************************
# * End of config section! *
# ******************************
end
#==============================================================================
# Do not modify the script without permission. Please!
# - - - - - - - - - - - - - - - - - - - - - - - - - -
module Nabu_Splash_Script
NumOfScreens = SplashConfig::NumOfScreens
NumOfMovies = SplashConfig::NumOfMovies
FadeoutLen = SplashConfig::FadeoutLen
TransitionLen = SplashConfig::TransitionLen
FileNames = []
WaitTime = []
SplashBGM = []
IntroMovie = []
FadeOut = FadeoutLen / 60 # 1, Frame to sec
FadeOut = FadeOut * 1000 # 2, Sec to millisec
def self.Activate_1
if SplashConfig::AutoFullScreen then
$showm = Win32API.new 'user32', 'keybd_event', %w(l l l l), ''
$showm.call(18,0,0,0)
$showm.call(13,0,0,0)
$showm.call(13,0,2,0)
$showm.call(18,0,2,0)
Graphics.freeze
end
end
def self.Activate_2
nx = 0
if NumOfScreens > 0
while nx < (NumOfScreens)
FileNames[nx] = SplashConfig::FileNames[nx]
WaitTime[nx] = SplashConfig::WaitTime[nx]
SplashBGM[nx] = SplashConfig::SplashBGM[nx]
if FileNames[nx] != ""
if FileNames[nx] != nil
@image = Sprite.new # Creating sprite object
Audio.bgm_play(SplashBGM[nx])
@image.bitmap = Cache.picture(FileNames[nx])
Graphics.transition(TransitionLen)
if WaitTime[nx] < 1 then WaitTime[nx] = 60 end
Graphics.wait(WaitTime[nx])
Graphics.fadeout(FadeoutLen)
Audio.bgm_fade(FadeOut)
@image.bitmap.dispose
@image.dispose
Graphics.fadein(FadeoutLen)
end
end
nx = nx + 1
end
end
end
def self.Activate_3
nnx = 0
while nnx < (NumOfMovies)
IntroMovie[nnx] = SplashConfig::IntroMovie[nnx]
Graphics.fadein(10)
Movie.play(IntroMovie[nnx])
Graphics.fadeout(10)
nnx = nnx + 1
end
end
end