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 타이틀/게임오버 타이틀 화면 커스터마이즈 (타이틀 메뉴 바꾸는 스크립트) 9 file №1 2012.08.04 4391
60 메뉴 메뉴를 바꾸는 스크립트 14 №1 2012.08.04 4208
59 전투 Minkoff's Animated Battlers - Enhanced 13.8 by DerVVulfman 1 Alkaid 2012.08.26 1832
58 스킬 Miriam's Handicrafts! 1.3 by DerVVulfman Alkaid 2012.08.26 1204
57 그래픽 Composite Window Skins by PK8 (XP/VX/VXA) Alkaid 2012.08.26 1559
56 전투 Mr.Mo's ABS Ultimate 7.0 by DerVVulfman 4 Alkaid 2012.08.26 2587
55 전투 Etude87_Custom_Slip_Damage_XP ver.1.0 5 습작 2012.08.26 1856
54 그래픽 Event Transparency by DerVVulfman (XP/VX/VXA) Alkaid 2012.09.01 1485
53 그래픽 Pictures below Characters by PK8 (XP/VXA) Alkaid 2012.09.07 1640
52 메뉴 Leidy's Ring Command Window 1.2 by DerVVulfman Alkaid 2012.09.09 1430
51 장비 Auto Equipment Optimization for Guillaume777's Multi Slot Script by DerVVulfman Alkaid 2012.09.09 1497
50 맵/타일 Editor Tiles by PK8 (XP/VX/VXA) Alkaid 2012.09.11 1868
49 그래픽 부드럽게 화면이 움직이는 스크립트 입니다. 16 GangSin 2012.09.12 4590
48 변수/스위치 The Self Data Suite by PK8 (XP/VX/VXA) Alkaid 2012.09.14 1232
47 변수/스위치 Initial Switches and Variables by PK8 (XP/VX/VXA) Alkaid 2012.09.14 1296
46 변수/스위치 Switchless Common Events by PK8(XP/VX/VXA) Alkaid 2012.09.15 1199
45 스킬 Trickster's Bag of Skill Effects (SDK 필요) Alkaid 2012.09.17 1289
44 전투 Trickster씨의 전투 시스템 (SDK 필수?) Alkaid 2012.09.18 3257
43 오디오 Audio Module Rewrite mciSendString 1.1 by DerVVulfman Alkaid 2012.09.18 1367
42 그래픽 WhiteFlute - BitmapEX 4 file JACKY 2012.12.10 2951
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