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 전투 XAS Hero Edition v3.82 19 아방스 2010.12.27 4346
60 미니맵 미니맵 만들기~! 14 file 블리치캐릭셋원함 2010.11.24 4350
59 타이틀/게임오버 타이틀 화면 커스터마이즈 (타이틀 메뉴 바꾸는 스크립트) 9 file №1 2012.08.04 4390
58 온라인 온라인 스크립트입니다^^(예제파일) 7 캉쿤 2011.09.24 4390
57 전투 XAS 여러가지버전. 9 §포뇨§ 2010.02.23 4395
56 퀘스트 퀘스트 다이어리 15 백호 2009.02.21 4406
55 메뉴 메뉴에 그림넣기 4 file 백호 2009.02.22 4411
54 게이지바 만들기 [헬악이님 제공] 12 file 아방스 2007.11.09 4416
53 이름입력 한글 이름 입력 15 ok하승헌 2010.02.18 4487
52 HUD HP과 SP 바 19 Man... 2008.11.04 4534
51 전투 ABP 액알 (Action Battle Player) 14 file 백호 2009.02.22 4556
50 그래픽 부드럽게 화면이 움직이는 스크립트 입니다. 16 GangSin 2012.09.12 4589
49 HUD 새로운방법의 맵이름 표시 31 file 백호 2009.02.21 4617
48 전투 사이드뷰 방식 스크립트. 8 file 백호 2009.02.21 4637
47 메시지 메세지 표시 업그레이드 11 file 백호 2009.02.21 4728
46 전투 사이드뷰 배틀 (2003 형식으 전투)| 12 file 아방스 2007.11.09 4744
45 이동 및 탈것 아하! 그렇구나의 3D 신기술 체험 30 아하!잘봤어요. 2010.02.28 4772
44 메뉴 1인 캐릭터 메뉴 스크립트 27 file - 하늘 - 2009.08.06 4789
43 윈도우_게이지 (HP, SP, 경험치<소수점포함>… 12 WMN 2008.04.06 4859
42 메시지 메세지플러스3.1v스크립트(얼굴표시,메세지색상,속도등정하는스크립트) 8 백호 2009.02.21 4879
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