XP 스크립트

사용법은 아랫글을 참조하세요.  이 스크립트는 여러 형식의 사운드파일을 함께 지원하도록 수정되었습니다.

# Combo and improvement of Squall and Andreas21 WimAmp plugins, by Guillaume777 ( 2005 )
# Script allows you to play unusual formats ( .psf, .gym, .spc ) if there is a winamp dll for it
# Script works with multiple format/dlls and doesn't require a "call script" ( just make it play like any BGM )
# Script won't give error unless you try to play a music file requiring dll and dll is not there
# Version 2, fixes battle music bug and "fade music" now stops winamp music

# Intructions
#
# Make sure Winamp.dll, out_wave.dll and the music dlls are in a folder called "DLL" in your game folder
# Copy your music files to the BGM folder ( you can't import them via RPG XP )
# If you use .minipsf don't forget to include the psflib !!
# Just use an event to play the music like any regular BGM
# The music files won't play in Sound Test, only in the real game
# If you want loop music files you need to edit dlls in winamp and copy the configure files to the DLL folder
#
#
#
#
#
#
# Credits for Winamp class and Winamp.dll to Andreas21 (C) 2004
# Credits to Squall for Audio module and Game_system functions.
# squall@loeher.zzn.com
#
# Script und WinAmp.dll by Andreas21 © 2004
# Roh PureBasic Code by GPI © 2004
# Beta Tester -
# http://www.rpgfantasy.de (Page)
# http://www.forum.rpgfantasy.de (Forum)

module Audio

@winamp = nil #stores audio player

def self.wina_play(filename, volume = 255)
dll = nil
self.wina_quit #stops winamp to start anew

#Check playstation format
for extension in ['.psf', '.minipsf', '.psf2', '.minipsf2'] #check extensions
if FileTest.exist?(filename + extension) #if it found extension
filename = filename + extension #add extension to name of music
dll = "/in_psf.dll" #store name of related dll
break
end
end

#check genesis format
for extension in ['.gym', '.cym']
if FileTest.exist?(filename + extension)
filename = filename + extension
dll = "/in_ym.dll"
break
end
end

#check snes format
for extension in ['.spc']
if FileTest.exist?(filename + extension)
filename = filename + extension
dll = "/in_snes.dll"
break
end
end

if dll != nil #if it found a format with a dll
@winamp=WinAmp_Plugin_System.new(dll)
@winamp.play(filename)
@winamp.setvolume(volume)
end


end #end of def

def self.wina_quit
if @winamp != nil then @winamp.quit end #quit winamp
end





class WinAmp_Plugin_System #This part was done by Andreas21
def initialize(in_dll)
# DLL Pfaht festlegen
in_dll = "DLL" + in_dll
out_dll = 'DLLout_wave.dll'
winamp_dll = 'DLLWinAmp.dll'
# 2 API Funktionen die gebraucht werden für das Fenster Handel
@ReadIni = Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l'
@FindWindow = Win32API.new 'user32', 'FindWindowA', %w(p p), 'l'
# Benötigte DLL Funktionen Laden
@Init_Winamp = Win32API.new winamp_dll, 'Init_Winamp', %w(p p l), 'l'
@Quit_Winamp = Win32API.new winamp_dll, 'Quit_Winamp', '', ''
@Winamp_Play = Win32API.new winamp_dll, 'Winamp_Play', 'p', 'l'
@Winamp_Pause = Win32API.new winamp_dll, 'Winamp_Pause', '', ''
@Winamp_Stop = Win32API.new winamp_dll, 'Winamp_Stop', '', 'l'
@Winamp_OnlyExtensions = Win32API.new winamp_dll, 'Winamp_OnlyExtensions', '', 'p'
@Winamp_OutName = Win32API.new winamp_dll, 'Winamp_OutName', '', 'p'
@Winamp_OutConfig = Win32API.new winamp_dll, 'Winamp_OutConfig', 'l', ''
@Winamp_OutAbout = Win32API.new winamp_dll, 'Winamp_OutAbout', 'l', ''
@Winamp_IsPlaying = Win32API.new winamp_dll, 'Winamp_IsPlaying', '', 'l'
@Winamp_InName = Win32API.new winamp_dll, 'Winamp_InName', '', 'p'
@Winamp_Extensions = Win32API.new winamp_dll, 'Winamp_Extensions', '', 'p'
@Winamp_InConfig = Win32API.new winamp_dll, 'Winamp_InConfig', 'l', ''
@Winamp_InAbout = Win32API.new winamp_dll, 'Winamp_InAbout', 'l', ''
@Winamp_GetFileInfo = Win32API.new winamp_dll, 'Winamp_GetFileInfo', %w(p l), 'p'
@Winamp_InfoBox = Win32API.new winamp_dll, 'Winamp_InfoBox', %w(p l), 'l'
@Winamp_GetLength = Win32API.new winamp_dll, 'Winamp_GetLength', '', 'l'
@Winamp_LengthStr = Win32API.new winamp_dll, 'Winamp_LengthStr', 'l', 'p'
@Winamp_GetOutputTime = Win32API.new winamp_dll, 'Winamp_GetOutputTime', '', 'l'
@Winamp_SetVolume = Win32API.new winamp_dll, 'Winamp_SetVolume', 'l', ''
@Winamp_SetPan = Win32API.new winamp_dll, 'Winamp_SetPan', 'l', ''
@winamp_setoutputtime = Win32API.new winamp_dll, 'winamp_setoutputtime', 'l', ''
@Winamp_IsPaused = Win32API.new winamp_dll, 'Winamp_IsPaused', '', 'l'
# Winamp Plugin Systen Starten
@Init_Winamp.call(in_dll, out_dll, handel)
end
# Eine Datei Wiedergeben
def play(file)
return @Winamp_Play.call(file)
end
# Datei in Pause oder Resum versetzen
def pause
@Winamp_Pause.call()
end
# Datei Stopen
def stop
return @Winamp_Stop.call()
end
# WinAmp Plugin System Beenden
def quit
@Quit_Winamp.call()
end
# Mögliche File format von diesem in Plugin
def onlyextensions
return @Winamp_OnlyExtensions.call()
end
# Out_DLL Infos
def outname
return @Winamp_OutName.call()
end
# Öffnet das einstell Fenster der Out DLL
def outconfig
@Winamp_OutConfig.call(handel)
end
# Öffnet das info Fenster der Out DLL
def outabout
@Winamp_OutAbout.call(handel)
end
# Wenn eine datei abgespielt wirt = 1 wenn nicht = 0
def isplaying
return @Winamp_IsPlaying.call()
end
# In DLL infos
def inname
return @Winamp_InName.call()
end
# Infos über das Datei Format der Datei die gerade wiedergegeben wirt
def extensions
return @Winamp_Extensions.call()
end
# Öffnet das einstell Fenster der In DLL
def inconfig
@Winamp_InConfig.call(handel)
end
# Öffnet das info Fenster der In DLL
def inabout
@Winamp_InAbout.call(handel)
end
# Damit bekommt man infos über eine Datei.
def getfileinfo(playfile,length_adr)
return @Winamp_GetFileInfo.call(playfile,length_adr)
end
# Den Tag einer Datei ändern.
def infobox(playfile)
return @Winamp_InfoBox.call(playfile,handel)
end
# Die Länge der gerade lauffenden Datei in Milli.sec.
def getlength
return @Winamp_GetLength.call()
end
# Gibt Milli. sec. in HH:MM:SS Format aus.
def lengthstr(length)
return @Winamp_LengthStr.call(length)
end
# Gibt die aktuelle Zeit der wiedergegebende Datei zurück im Milli. sec..
def getoutputtime
return @Winamp_GetOutputTime.call()
end
# Setzt die Wiedergabe Volumen neu. 0~255
def setvolume(volume)
@Winamp_SetVolume.call(volume)
end
# Setzt bei Modulen Wiedergabe die Pan neu.
def setpan(pan)
@Winamp_SetPan.call(pan)
end
# Setzt die Aktuelle Wiedergabe Position neu in Milli. sec.
def setoutputtime(time)
@winamp_setoutputtime.call(time)
end
# Wenn die Datei in Pause ist = 1 wenn nicht dann = 0
def ispaused
return @Winamp_IsPaused.call()
end
def handel
game_name = 0.chr * 255
zeichen = @ReadIni.call('Game','Title','',game_name,255,".\Game.ini")
return @FindWindow.call('RGSS Player',game_name.slice!(0,zeichen))
end #end of init
end #end of class
end #end of module




#==============================================================================
# ■ Game_System
#------------------------------------------------------------------------------
# Changes added to the bgm_play and bgm_stop functions.
#==============================================================================

class Game_System
#--------------------------------------------------------------------------
# ● Play Back Ground Music
#--------------------------------------------------------------------------
def bgm_play(bgm)
@playing_bgm = bgm
if bgm != nil and bgm.name != ""

Audio.bgm_play("Audio/BGM/" + bgm.name, bgm.volume, bgm.pitch)
Audio.wina_play("Audio/BGM/" + bgm.name, bgm.volume) #Play the new audio format
else
Audio.bgm_stop
Audio.wina_quit
end
Graphics.frame_reset
end

def bgm_fade(time)
@playing_bgm = nil
Audio.bgm_fade(time * 1000)
Audio.wina_quit #stops winamp if you fade music
end

def bgm_stop
Audio.bgm_stop
Audio.wina_quit
end
end

Who's 백호

?

이상혁입니다.

http://elab.kr


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
61 기타 Near Fantastica's SDK Test Bed 3 file 백호 2009.02.22 885
60 메뉴 Customizable Ring Menu by SephirothSpawn 백호 2009.02.22 884
59 기타 SG_Settings Control by sandgolem 백호 2009.02.22 884
58 기타 [XP/VX/VXA] Drago Core Engine Alkaid 2014.02.13 883
57 아이템 Easy Item & Gold Gain by SephirothSpawn (SDK호환) 백호 2009.02.22 880
» 기타 아래 스크립트에 대한 Guillaume777님의 개량판입니다. 백호 2009.02.22 880
55 기타 Dynamic Stores by Astro_mech@rmxp.net 1 file 백호 2009.02.22 878
54 온라인 인터넷 웹 상에서의 시간을 취득하는 스크립트 1 이우 2016.05.24 872
53 메뉴 1-Scene CMS 1.03 by LegACy@rmxp.org (SDK호환) file 백호 2009.02.22 871
52 기타 Difficulty Options by SephirothSpawn 백호 2009.02.22 869
51 기타 RM2K Facesets, Inn & Windowskin Colors by DerVVulfman@rmxp.org 1 file 백호 2009.02.22 866
50 스킬 [KGC] Skill Grouping 백호 2009.02.21 861
49 이동 및 탈것 SG_Wait for Move Completion Fix by sandgolem (SDK호환) 백호 2009.02.22 860
48 기타 Introduction & optional Splash 2.1 by SephirothSpawn (SDK호환) 1 백호 2009.02.22 860
47 기타 Quick Animations by SephirothSpawn (SDK호환) 백호 2009.02.22 851
46 기타 [XP/VX/VXA] Map Screenshot by LiTTleDRAgo 1 Alkaid 2014.02.13 850
45 아이템 SG_Escape Only Items by sandgolem (SDK호환) 백호 2009.02.22 850
44 이동 및 탈것 Memorize Location R2 by dubealex file 백호 2009.02.22 846
43 기타 Sized Events 0.1 by Toby@rmxp.org file 백호 2009.02.22 845
42 스킬 Grouping and Detail (Items/Skills) 1 file 백호 2009.02.21 839
Board Pagination Prev 1 ... 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 Next
/ 52