#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Game_Film II - reloaded ^^
# par berka
#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Rgss 1&2 v 1.0
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# -utilizaçao-
# escreva em um evento um script#058
#
# #requerimento minimu;
# [film] # obrigatorio !
# film = monfilm.avi # ou mpg... nome do arquivo e livre
#
# #configuraçao opicional, a ordem e importante
# poe as 4 cordenadas !
# x = 12 # posiçao horizontal
# y = 1 # posiçao vertical
# w = 150 # dimenssao do filme: largura
# h = 150 # dimenssao do filme: altura
#
# full = true # ativa o modo fullscreen
# vol = 750 # entre 0 e 1000 volume sonoro do filme
# bass = 999 # entre 0 e 1000 volume dos bass
# aig = 250 # entre 0 e 1000 volume dos aigus
# #comandos:
# dependendo de como esta as teclas de seu teclado sao os basicos parar video e voltar
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# este novo script de video nao tem o problema de nao passar o video ou ficar piscando
# e surporta varios formatos de arquivos e ele detecta automaticamente o tipo de video
# o encontrei por que o "scenemovie no vx" nao estava muito bom e zarpiando por ai
# consegui encontrar este script que testei e deu tudo certo ele e muito facil de se lidar
# na demo vem dizendo tudo direitinho.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
class Game_Film
def initialize(hash)
hash.has_key?(:film) ? film=hash[:film] : return
hash.has_key?(:x) ? @x=hash[:x]+" " : @x="0"
hash.has_key?(:y) ? @y=hash[:y]+" " : @y="0"
hash.has_key?(:w) ? @w=hash[:w]+" " : @w=""
hash.has_key?(:h) ? @h=hash[:h]+" " : @h=""
hash.has_key?(:vol) ? @vol=hash[:vol]+" " : @vol="1000"
hash.has_key?(:bass) ? @bass=hash[:bass]+" " : @bass="1000"
hash.has_key?(:aig) ? @aig=hash[:aig]+" " : @aig="1000"
hash.has_key?(:pos) ? @pos="at pos #{hash[:pos].to_i*1000} " : @pos="at pos 0 "
@full=hash[:full] if hash.has_key?(:full)
@full&&dim_ecran !=[640,480] ? @plee="fullscreen " : @plee=""
@type=" "
@type=" type mpegvideo" if File.extname(film)==(".mpg"||".mpeg")
@type=" type avivideo" if File.extname(film)==".avi"
@nom='./Films/'+film
(p "fichier #{@nom} non trouvé";return) if !FileTest.exist?(@nom)
@film=Win32API.new('winmm','mciSendString','ppll','v')
lecture
end
def handle
jeu="\0"*256
ini=Win32API.new('kernel32','GetPrivateProfileStringA','pppplp', 'l')
ini.call('Game','','',jeu,255,".\\Game.ini")
return Win32API.new('user32','FindWindowEx','llpp','l').call(0,0,nil,jeu.delete!("\0"))
end
def lecture
v,t,status,pause=version,Time.now," "*255,false
@film.call("open #{@nom} alias FILE#{@type} style child parent "+handle.to_s,0,0,0)
@film.call("put FILE window at #{@x}#{@y}#{@w}#{@h}",status,255,0)
@film.call("setaudio File volume to #{@vol}",status,255,0)
@film.call("setaudio File bass to #{@bass}",status,255,0)
@film.call("setaudio File trebble to #{@bass}",status,255,0)
@film.call("play FILE #{@plee} notify",status,255,handle)
loop{sleep(0.1)
Input.update
@film.call("status FILE mode notify",status,255,0)
break if status.unpack("aaaa")=="stop".split(//)||Input.trigger?(Input::B)
if Input.trigger?(Input::C)
if !pause;@film.call("pause FILE notify",status,255,handle);pause=true
else;@film.call("play FILE #{@plee} notify",status,255,handle);pause=false
end
end
(t=maj(t))if v=='xp'}
@film.call("close FILE notify",0,0,handle)
$scene=Scene_Map.new
end
def dim_ecran
lw=Win32API.new('user32','GetSystemMetrics','i','i')
return lw.call(0),lw.call(1)
end
def maj(t)
(Graphics.update;return Time.now)if t.sec<=Time.now.sec-9||t.min !=Time.now.min
return t
end
def version;FileTest.exist?('./Data/scripts.rvdata') ? 'vx': 'xp';end
end
Dir.open("./Films") rescue Dir::mkdir("./Films",0777)
class Game_Interpreter;def eval(script);cmd_eval(script);end;end#rmvx
class Interpreter;def eval(script);cmd_eval(script);end;end#rmxp
def cmd_eval(script)
if script.include?("[film]")
hash={}
script.gsub!("[film]"){}
list=script.split("\n")
list.each{|e|e.gsub!(" "){};f=e.split("=");hash[f[0].to_sym]=f[1] if !f[1].nil?}
Game_Film.new(hash)
else;return Kernel.eval(script)
end
end
23:16
FANGAME

![Collapse [English]](http://gamestorrents.com/torrents_img/t5845.collapsepc.jpeg)







![Dark Void [MULTI10][DEMO]](http://gamestorrents.com/torrents_img/t5873.darkvoidemopc.jpg)
![Borderlands v.1.2 + DLCs [English]](http://gamestorrents.com/torrents_img/t5862.borderlandspackpc.jpeg)
![Crysis Wars DreamGold Edition [English]](http://gamestorrents.com/torrents_img/t5836.crysiswarspc.jpg)
![Command And Conquer 4 Tiberian Twilight [English][BETA]](http://gamestorrents.com/torrents_img/t5837.command4betapc.jpg)
![Trainz Simulator 2010 Engineers Edition [English][2DVDs]](http://gamestorrents.com/torrents_img/t5827.trainzsimulatorpc.jpg)
![Arthur And The Revenge Of Maltazard [MULTI6]](http://gamestorrents.com/torrents_img/t5826.arthurpc.jpg)
![Boiling Point Road To Hell [MULTI5]](http://gamestorrents.com/torrents_img/t5828.boilingpc.jpg)
![Zombilution [English]](http://gamestorrents.com/torrents_img/t5816.zombilutionpc.jpg)
![Chronicles Of Mystery The Tree Of Life [English]](http://gamestorrents.com/torrents_img/t5786.chroniclesmysterypc.jpg)
![Borderlands The Zombie Island Of Dr Ned DLC [English]](http://gamestorrents.com/torrents_img/t5777.borderlandspc.jpg)
![The Saboteur [MULTI3]](http://gamestorrents.com/torrents_img/t5707.thesaboteurpc.jpg)
![Dirt 2 [Spanish]](http://gamestorrents.com/torrents_img/t5715.dirt2pc.jpg)
![Crash Time III [English]](http://gamestorrents.com/torrents_img/t5693.crashtime3pc.jpg)
![Vampire Hunters [English]](http://gamestorrents.com/torrents_img/t5667.vampirehiunterpc.jpg)
![City Bus Simulator 2010 New York [English]](http://gamestorrents.com/torrents_img/t5680.citybusnewyork2010pc.jpg)
![Serious Sam HD The First Encounter [English]](http://gamestorrents.com/torrents_img/t5689.serioussamHDpc.jpg)
![Hugo Magic In The Trollwoods [MULTI4]](http://gamestorrents.com/torrents_img/t5681.hugotrollwoodspc.jpg)























