Changed functionality of running key, added compatibility with old Mystery Gifts

This commit is contained in:
Maruno17
2021-03-07 19:16:05 +00:00
parent 3a1b9b6dc6
commit 3ca08f27b8
15 changed files with 38 additions and 38 deletions

View File

@@ -114,7 +114,7 @@ class BitmapWrapper < Bitmap
def dispose
return if self.disposed?
@refcount -= 1
super if @refcount == 0
super if @refcount <= 0
end
def initialize(*arg)
@@ -265,8 +265,8 @@ module BitmapCache
objKey = fromCache(key)
if !objKey
bitmap = BitmapWrapper.new(Game_Map::TILE_WIDTH, Game_Map::TILE_HEIGHT)
x = (tile_id - 384) % 8 * 32
y = (tile_id - 384) / 8 * 32
x = (tile_id - 384) % 8 * Game_Map::TILE_WIDTH
y = (tile_id - 384) / 8 * Game_Map::TILE_HEIGHT
rect = Rect.new(x, y, Game_Map::TILE_WIDTH, Game_Map::TILE_HEIGHT)
tileset = yield(filename)
bitmap.blt(0, 0, tileset, rect)

View File

@@ -296,7 +296,7 @@ class GifBitmap
end
def totalFrames
@totalframes/2 # Due to frame count being incremented by 2
@totalframes/2 # Due to frame count being incremented by 2
end
def disposed?
@@ -311,7 +311,7 @@ class GifBitmap
@gifbitmaps.length==0 ? 0 : @gifbitmaps[0].height
end
# This function must be called in order to animate the GIF image.
# This function must be called in order to animate the GIF image.
def update
return if disposed?
if @gifbitmaps.length>0

View File

@@ -592,7 +592,7 @@ def getFormattedText(bitmap,xDst,yDst,widthDst,heightDst,text,lineheight=32,
alignstack.push(0)
nextline=1 if x>0 && nextline==0
else
alignstack.pop;
alignstack.pop
nextline=1 if x>0 && nextline==0
end
elsif control=="ac" # Center align
@@ -600,7 +600,7 @@ def getFormattedText(bitmap,xDst,yDst,widthDst,heightDst,text,lineheight=32,
alignstack.push(2)
nextline=1 if x>0 && nextline==0
else
alignstack.pop;
alignstack.pop
nextline=1 if x>0 && nextline==0
end
elsif control=="icon" # Icon