mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
Remove unnecessary utilities (#99)
- Comparable.clamp is already defined - Boolean class does not exist - String#start_with? already exists - String#end_with? already exists - String#bytesize already exists - String#capitalize already exists - Integer#digits already exists - Array#first and Array#last already exist - Array#shuffle already exists Ruby's own Integer#digits returns an array with the least significant digit as the first array element. That means that the method's only usage has to be appended with a call to Array#reverse.
This commit is contained in:
@@ -191,7 +191,8 @@ class PokemonDataBox < SpriteWrapper
|
||||
end
|
||||
|
||||
def pbDrawNumber(number,btmp,startX,startY,align=0)
|
||||
n = (number==-1) ? [10] : number.to_i.digits # -1 means draw the / character
|
||||
# -1 means draw the / character
|
||||
n = (number == -1) ? [10] : number.to_i.digits.reverse
|
||||
charWidth = @numbersBitmap.width/11
|
||||
charHeight = @numbersBitmap.height
|
||||
startX -= charWidth*n.length if align==1
|
||||
|
||||
Reference in New Issue
Block a user