Removed more RMVX compatibility

This commit is contained in:
Maruno17
2021-11-15 21:31:52 +00:00
parent 99b6d86962
commit 06493fecbb
3 changed files with 19 additions and 131 deletions

View File

@@ -53,7 +53,7 @@ def pbBGMPlay(param,volume=nil,pitch=nil)
return if !param
param=pbResolveAudioFile(param,volume,pitch)
if param.name && param.name!=""
if $game_system && $game_system.respond_to?("bgm_play")
if $game_system
$game_system.bgm_play(param)
return
elsif (RPG.const_defined?(:BGM) rescue false)
@@ -72,10 +72,10 @@ def pbBGMFade(x=0.0); pbBGMStop(x); end
# Fades out or stops BGM playback. 'x' is the time in seconds to fade out.
def pbBGMStop(timeInSeconds=0.0)
if $game_system && timeInSeconds>0.0 && $game_system.respond_to?("bgm_fade")
if $game_system && timeInSeconds > 0.0
$game_system.bgm_fade(timeInSeconds)
return
elsif $game_system && $game_system.respond_to?("bgm_stop")
elsif $game_system
$game_system.bgm_stop
return
elsif (RPG.const_defined?(:BGM) rescue false)
@@ -103,7 +103,7 @@ def pbMEPlay(param,volume=nil,pitch=nil)
return if !param
param=pbResolveAudioFile(param,volume,pitch)
if param.name && param.name!=""
if $game_system && $game_system.respond_to?("me_play")
if $game_system
$game_system.me_play(param)
return
elsif (RPG.const_defined?(:ME) rescue false)
@@ -153,7 +153,7 @@ def pbBGSPlay(param,volume=nil,pitch=nil)
return if !param
param=pbResolveAudioFile(param,volume,pitch)
if param.name && param.name!=""
if $game_system && $game_system.respond_to?("bgs_play")
if $game_system
$game_system.bgs_play(param)
return
elsif (RPG.const_defined?(:BGS) rescue false)
@@ -172,10 +172,10 @@ def pbBGSFade(x=0.0); pbBGSStop(x); end
# Fades out or stops BGS playback. 'x' is the time in seconds to fade out.
def pbBGSStop(timeInSeconds=0.0)
if $game_system && timeInSeconds>0.0 && $game_system.respond_to?("bgs_fade")
if $game_system && timeInSeconds > 0.0
$game_system.bgs_fade(timeInSeconds)
return
elsif $game_system && $game_system.respond_to?("bgs_play")
elsif $game_system
$game_system.bgs_play(nil)
return
elsif (RPG.const_defined?(:BGS) rescue false)
@@ -203,7 +203,7 @@ def pbSEPlay(param,volume=nil,pitch=nil)
return if !param
param = pbResolveAudioFile(param,volume,pitch)
if param.name && param.name!=""
if $game_system && $game_system.respond_to?("se_play")
if $game_system
$game_system.se_play(param)
return
end
@@ -236,12 +236,8 @@ end
# Plays a sound effect that plays when the player moves the cursor.
def pbPlayCursorSE
if $data_system && $data_system.respond_to?("cursor_se") &&
$data_system.cursor_se && $data_system.cursor_se.name!=""
if !nil_or_empty?($data_system&.cursor_se&.name)
pbSEPlay($data_system.cursor_se)
elsif $data_system && $data_system.respond_to?("sounds") &&
$data_system.sounds && $data_system.sounds[0] && $data_system.sounds[0].name!=""
pbSEPlay($data_system.sounds[0])
elsif FileTest.audio_exist?("Audio/SE/GUI sel cursor")
pbSEPlay("GUI sel cursor",80)
end
@@ -249,12 +245,8 @@ end
# Plays a sound effect that plays when a decision is confirmed or a choice is made.
def pbPlayDecisionSE
if $data_system && $data_system.respond_to?("decision_se") &&
$data_system.decision_se && $data_system.decision_se.name!=""
if !nil_or_empty?($data_system&.decision_se&.name)
pbSEPlay($data_system.decision_se)
elsif $data_system && $data_system.respond_to?("sounds") &&
$data_system.sounds && $data_system.sounds[1] && $data_system.sounds[1].name!=""
pbSEPlay($data_system.sounds[1])
elsif FileTest.audio_exist?("Audio/SE/GUI sel decision")
pbSEPlay("GUI sel decision",80)
end
@@ -262,12 +254,8 @@ end
# Plays a sound effect that plays when a choice is canceled.
def pbPlayCancelSE
if $data_system && $data_system.respond_to?("cancel_se") &&
$data_system.cancel_se && $data_system.cancel_se.name!=""
if !nil_or_empty?($data_system&.cancel_se&.name)
pbSEPlay($data_system.cancel_se)
elsif $data_system && $data_system.respond_to?("sounds") &&
$data_system.sounds && $data_system.sounds[2] && $data_system.sounds[2].name!=""
pbSEPlay($data_system.sounds[2])
elsif FileTest.audio_exist?("Audio/SE/GUI sel cancel")
pbSEPlay("GUI sel cancel",80)
end
@@ -275,12 +263,8 @@ end
# Plays a buzzer sound effect.
def pbPlayBuzzerSE
if $data_system && $data_system.respond_to?("buzzer_se") &&
$data_system.buzzer_se && $data_system.buzzer_se.name!=""
if !nil_or_empty?($data_system&.buzzer_se&.name)
pbSEPlay($data_system.buzzer_se)
elsif $data_system && $data_system.respond_to?("sounds") &&
$data_system.sounds && $data_system.sounds[3] && $data_system.sounds[3].name!=""
pbSEPlay($data_system.sounds[3])
elsif FileTest.audio_exist?("Audio/SE/GUI sel buzzer")
pbSEPlay("GUI sel buzzer",80)
end