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 오디오 Audio Module Rewrite mciSendString 1.1 by DerVVulfman Alkaid 2012.09.18 1367
60 기타 ATS-Advanced Time System 1 file 백호 2009.02.21 964
59 전투 ATB전투 형식 스크랩트 [ 어디서 퍼왔는..] 7 WMN 2008.03.17 2545
58 전투 ATB전투 5 백호 2009.02.22 3369
57 전투 ATB시스템 입니다. [스샷 첨부] 17 백호 2009.02.22 4182
56 저장 ASM - Advanced Save Menu 3 file 백호 2009.02.21 1639
55 기타 appletree님 요청) 화면 명암 주기 3 file 뮤바보 2013.01.31 2724
54 메뉴 AP 올리기 8 알피지GM 2010.02.15 1490
53 기타 Anti Event Lag Script 3 백호 2009.02.21 1057
52 메시지 Animated Window Skin by Tana 1 백호 2009.02.22 1338
51 장비 Angie's Equipment Sets 2.3 by DerVVulfman 7 Alkaid 2010.12.31 1869
50 기타 AMS___Advanced_Message_Script 1 file 백호 2009.02.22 889
49 기타 AMS-Advanced Message Script Edited by Dubleax 3 file 백호 2009.02.21 765
48 키입력 Aleworks Input Module 1.21 by vgvgf (SDK호환) 8 WMN 2008.04.06 2145
47 키입력 AInput Module 3.10 by vgvgf (전체키, 마우스 입력) 6 file Alkaid 2010.09.01 3029
46 기타 Advanced Weather System (AWS) 3 file 백호 2009.02.22 1272
45 상점 Advanced Shop System by Alexis Hiemis 1 file Alkaid 2010.10.08 1872
44 저장 Advanced Save System Edit (현재 맵을 보여주지 않음) file 백호 2009.02.22 1557
43 저장 Advanced Save Menu 편집한 것. (SDK2용) Alkaid 2010.09.11 1219
42 저장 Advanced Save Menu 편집 20101006 Edition (SDK2용) 1 Alkaid 2010.10.06 1217
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