mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Resolved many Rubocop warnings
This commit is contained in:
@@ -385,7 +385,6 @@ class RandomStripeTransition
|
||||
rect = Rect.new(0,0,(dir==0) ? size : Graphics.width,(dir==0) ? Graphics.height : size)
|
||||
buffer = @buffer
|
||||
sprite = @sprite
|
||||
phase = @numframes-@duration
|
||||
count = (bands-bands*@duration/@numframes)-@rand_stripe_deleted_count
|
||||
while count > 0
|
||||
@rand_stripe_deleted[@rand_stripe_index_array.pop] = true
|
||||
|
||||
@@ -53,7 +53,6 @@ end
|
||||
|
||||
|
||||
def pbTextBitmap(text, maxwidth=Graphics.width)
|
||||
dims = []
|
||||
tmp = Bitmap.new(maxwidth,Graphics.height)
|
||||
pbSetSystemFont(tmp)
|
||||
drawFormattedTextEx(tmp,0,0,maxwidth,text,Color.new(248,248,248),Color.new(168,184,184))
|
||||
|
||||
@@ -3,7 +3,7 @@ class IntroEventScene < EventScene
|
||||
TICKS_PER_ENTER_FLASH = 40
|
||||
FADE_TICKS = 8
|
||||
|
||||
def initialize(pics,splash,viewport=nil)
|
||||
def initialize(pics,splash,_viewport=nil)
|
||||
super(nil)
|
||||
@pics = pics
|
||||
@splash = splash
|
||||
@@ -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
|
||||
|
||||
@@ -6,30 +6,30 @@
|
||||
# pbEventScreen(ButtonEventScene)
|
||||
#==============================================================================
|
||||
class ButtonEventScene < EventScene
|
||||
def initialize(viewport=nil)
|
||||
def initialize(viewport = nil)
|
||||
super
|
||||
Graphics.freeze
|
||||
addImage(0,0,"Graphics/Pictures/helpbg")
|
||||
@labels=[
|
||||
addLabel(52*2,13*2,Graphics.width*3/4,_INTL("Moves the main character. Also used to scroll through list entries.")),
|
||||
addLabel(52*2,53*2,Graphics.width*3/4,_INTL("Used to confirm a choice, check things, and talk to people.")),
|
||||
addLabel(52*2,93*2,Graphics.width*3/4,_INTL("Used to exit, cancel a choice or mode, and open the pause menu.")),
|
||||
addLabel(52*2,133*2,Graphics.width*3/4,_INTL("Hold down while walking to run.")),
|
||||
addLabel(52*2,157*2,Graphics.width*3/4,_INTL("Press to use a registered Key Item."))
|
||||
addImage(0, 0, "Graphics/Pictures/helpbg")
|
||||
@labels = [
|
||||
addLabel(52 * 2, 13 * 2, Graphics.width * 3 / 4, _INTL("Moves the main character. Also used to scroll through list entries.")),
|
||||
addLabel(52 * 2, 53 * 2, Graphics.width * 3 / 4, _INTL("Used to confirm a choice, check things, and talk to people.")),
|
||||
addLabel(52 * 2, 93 * 2, Graphics.width * 3 / 4, _INTL("Used to exit, cancel a choice or mode, and open the pause menu.")),
|
||||
addLabel(52 * 2, 133 * 2, Graphics.width * 3 / 4, _INTL("Hold down while walking to run.")),
|
||||
addLabel(52 * 2, 157 * 2, Graphics.width * 3 / 4, _INTL("Press to use a registered Key Item."))
|
||||
]
|
||||
@keys=[
|
||||
addImage(26*2,18*2,"Graphics/Pictures/helpArrowKeys"),
|
||||
addImage(26*2,59*2,"Graphics/Pictures/helpCkey"),
|
||||
addImage(26*2,99*2,"Graphics/Pictures/helpXkey"),
|
||||
addImage(26*2,130*2,"Graphics/Pictures/helpZkey"),
|
||||
addImage(26*2,154*2,"Graphics/Pictures/helpFkey")
|
||||
@keys = [
|
||||
addImage(26 * 2, 18 * 2, "Graphics/Pictures/helpArrowKeys"),
|
||||
addImage(26 * 2, 59 * 2, "Graphics/Pictures/helpCkey"),
|
||||
addImage(26 * 2, 99 * 2, "Graphics/Pictures/helpXkey"),
|
||||
addImage(26 * 2, 130 * 2, "Graphics/Pictures/helpZkey"),
|
||||
addImage(26 * 2, 154 * 2, "Graphics/Pictures/helpFkey")
|
||||
]
|
||||
for key in @keys
|
||||
key.origin=PictureOrigin::Top
|
||||
key.origin = PictureOrigin::Top
|
||||
end
|
||||
for i in 0...5 # Make everything show (almost) immediately
|
||||
@keys[i].setOrigin(0,PictureOrigin::Top)
|
||||
@keys[i].setOpacity(0,255)
|
||||
@keys[i].setOrigin(0, PictureOrigin::Top)
|
||||
@keys[i].setOpacity(0, 255)
|
||||
end
|
||||
pictureWait # Update event scene with the changes
|
||||
Graphics.transition(20)
|
||||
@@ -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
|
||||
|
||||
@@ -135,7 +135,6 @@ _END_
|
||||
line = line.split("<s>")
|
||||
# LINE ADDED: If you use in your own game, you should remove this line
|
||||
pbSetSystemFont(credit_bitmap) # <--- This line was added
|
||||
x = 0
|
||||
xpos = 0
|
||||
align = 1 # Centre align
|
||||
linewidth = Graphics.width
|
||||
|
||||
@@ -15,7 +15,7 @@ class Scene_Movie
|
||||
def main
|
||||
@temp = Win32API.pbFindRgssWindow.to_s
|
||||
movie = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','V')
|
||||
x=movie.call("open \""+@movie_name+
|
||||
movie.call("open \""+@movie_name+
|
||||
"\" alias FILE style 1073741824 parent " + @temp.to_s,0,0,0)
|
||||
@message = Win32API.new('user32','SendMessage','%w(l,l,l,l)','V')
|
||||
@detector = Win32API.new('user32','GetSystemMetrics','%w(l)','L')
|
||||
@@ -31,7 +31,7 @@ class Scene_Movie
|
||||
#fullscreen
|
||||
end
|
||||
status = " " * 255
|
||||
x=movie.call("play FILE",0,0,0)
|
||||
movie.call("play FILE",0,0,0)
|
||||
loop do
|
||||
sleep(0.1)
|
||||
@message.call(@temp.to_i,11,0,0)
|
||||
|
||||
Reference in New Issue
Block a user