mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +00:00
Removed last possible usages of Graphics.frame_rate and Graphics.frame_count, improved screen scrolling code, player now animates walking into a wall
This commit is contained in:
@@ -479,7 +479,6 @@ class PokemonEntryScene2
|
||||
@sprites["controls"].x = 16
|
||||
@sprites["controls"].y = 96
|
||||
@sprites["controls"].setBitmap(_INTL("Graphics/UI/Naming/overlay_controls"))
|
||||
@init = true
|
||||
@sprites["overlay"] = BitmapSprite.new(Graphics.width, Graphics.height, @viewport)
|
||||
pbDoUpdateOverlay2
|
||||
@sprites["cursor"] = NameEntryCursor.new(@viewport)
|
||||
@@ -556,15 +555,12 @@ class PokemonEntryScene2
|
||||
@@Characters.length.times do |i|
|
||||
@bitmaps[i].update
|
||||
end
|
||||
if @init || Graphics.frame_count % 5 == 0
|
||||
@init = false
|
||||
cursorpos = @helper.cursor
|
||||
cursorpos = @maxlength - 1 if cursorpos >= @maxlength
|
||||
cursorpos = 0 if cursorpos < 0
|
||||
@maxlength.times do |i|
|
||||
@blanks[i] = (i == cursorpos) ? 1 : 0
|
||||
@sprites["blank#{i}"].y = [78, 82][@blanks[i]]
|
||||
end
|
||||
# Update which inputted text's character's underline is lowered to indicate
|
||||
# which character is selected
|
||||
cursorpos = @helper.cursor.clamp(0, @maxlength - 1)
|
||||
@maxlength.times do |i|
|
||||
@blanks[i] = (i == cursorpos) ? 1 : 0
|
||||
@sprites["blank#{i}"].y = [78, 82][@blanks[i]]
|
||||
end
|
||||
pbDoUpdateOverlay
|
||||
pbUpdateSpriteHash(@sprites)
|
||||
|
||||
Reference in New Issue
Block a user