Fixing broken code

This commit is contained in:
Maruno17
2020-09-06 19:10:25 +01:00
parent 6252407160
commit f035200484
7 changed files with 13 additions and 13 deletions

View File

@@ -131,9 +131,9 @@ def getKnownFolder(guid)
packedGuid = guid.pack("VvvC*")
shGetKnownFolderPath = Win32API.new("shell32.dll","SHGetKnownFolderPath","pllp","i") rescue nil
coTaskMemFree = Win32API.new("ole32.dll","CoTaskMemFree","i","") rescue nil
return "" if !(shGetKnownFolderPath && coTaskMemFree)
return "" if !shGetKnownFolderPath || !coTaskMemFree
path = "\0"*4
path = shGetKnownFolderPath.call(packedGuid,0,0,path)
ret = shGetKnownFolderPath.call(packedGuid,0,0,path)
path = path.unpack("V")[0]
ret = getUnicodeString(path)
coTaskMemFree.call(path)

View File

@@ -17,7 +17,7 @@ class IntroEventScene < EventScene
openPic(self,nil)
end
def openPic(_scene,_args)
def openPic(_scene,*args)
onCTrigger.clear
@pic.name = "Graphics/Titles/"+@pics[@index]
# fade to opacity 255 in FADE_TICKS ticks after waiting 0 frames
@@ -49,7 +49,7 @@ class IntroEventScene < EventScene
end
end
def openSplash(_scene,_args)
def openSplash(_scene,*args)
onUpdate.clear
onCTrigger.clear
@pic.name = "Graphics/Titles/"+@splash
@@ -63,7 +63,7 @@ class IntroEventScene < EventScene
onCTrigger.set(method(:closeSplash)) # call closeSplash when C key is pressed
end
def closeSplash(scene,_args)
def closeSplash(scene,*args)
onUpdate.clear
onCTrigger.clear
# Play random cry
@@ -83,7 +83,7 @@ class IntroEventScene < EventScene
sscreen.pbStartLoadScreen
end
def closeSplashDelete(scene,_args)
def closeSplashDelete(scene,*args)
onUpdate.clear
onCTrigger.clear
# Play random cry

View File

@@ -37,7 +37,7 @@ class ButtonEventScene < EventScene
onCTrigger.set(method(:pbOnScreen1))
end
def pbOnScreen1(scene,_args)
def pbOnScreen1(scene,*args)
# End scene
Graphics.freeze
scene.dispose

View File

@@ -97,7 +97,7 @@ module PBDayNight
# Internal function
def getToneInternal
def self.getToneInternal
# Calculates the tone for the current frame, used for day/night effects
realMinutes = pbGetDayNightMinutes
hour = realMinutes/60

View File

@@ -902,7 +902,7 @@ end
#===============================================================================
# Choose an item from the Bag
#===============================================================================
def pbChooseItem(var=0,_args)
def pbChooseItem(var=0,*args)
ret = 0
pbFadeOutIn {
scene = PokemonBag_Scene.new

View File

@@ -52,7 +52,7 @@ end
Events.onMapChange += proc { |_sender,_args|
Events.onMapChange += proc { |_sender,*args|
pbSafariState.pbEnd if !pbInSafari?
}

View File

@@ -1,7 +1,7 @@
#===============================================================================
# Pokémon Organized Battle
#===============================================================================
def pbHasEligible?(_arg)
def pbHasEligible?(*arg)
return pbBattleChallenge.rules.ruleset.hasValidTeam?($Trainer.party)
end
@@ -483,7 +483,7 @@ class BattleChallenge
pbWriteCup(id,rules)
end
def start(_args)
def start(*args)
ensureType(@id)
@currentChallenge=@id # must appear before pbStart
@bc.pbStart(t,@numRounds)
@@ -716,7 +716,7 @@ def pbBattleChallengeBeginSpeech
end
end
def pbEntryScreen(_arg)
def pbEntryScreen(*arg)
retval = false
pbFadeOutIn {
scene = PokemonParty_Scene.new