mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 21:54:58 +00:00
Added support for large events, allowed field move-related event names to have other text in their names
This commit is contained in:
@@ -60,17 +60,17 @@ module RPG
|
||||
return ret2
|
||||
end
|
||||
|
||||
def self.tileEx(filename, tile_id, hue)
|
||||
key = [filename, tile_id, hue]
|
||||
def self.tileEx(filename, tile_id, hue, width = 1, height = 1)
|
||||
key = [filename, tile_id, hue, width, height]
|
||||
ret = fromCache(key)
|
||||
if ret
|
||||
ret.addRef
|
||||
else
|
||||
ret = BitmapWrapper.new(32, 32)
|
||||
ret = BitmapWrapper.new(32 * width, 32 * height)
|
||||
x = (tile_id - 384) % 8 * 32
|
||||
y = (tile_id - 384) / 8 * 32
|
||||
y = (((tile_id - 384) / 8) - height + 1) * 32
|
||||
tileset = yield(filename)
|
||||
ret.blt(0, 0, tileset, Rect.new(x, y, 32, 32))
|
||||
ret.blt(0, 0, tileset, Rect.new(x, y, 32 * width, 32 * height))
|
||||
tileset.dispose
|
||||
ret.hue_change(hue) if hue != 0
|
||||
@cache[key] = ret
|
||||
|
||||
@@ -350,8 +350,8 @@ end
|
||||
|
||||
|
||||
|
||||
def pbGetTileBitmap(filename, tile_id, hue)
|
||||
return RPG::Cache.tileEx(filename, tile_id, hue) { |f|
|
||||
def pbGetTileBitmap(filename, tile_id, hue, width = 1, height = 1)
|
||||
return RPG::Cache.tileEx(filename, tile_id, hue, width, height) { |f|
|
||||
AnimatedBitmap.new("Graphics/Tilesets/"+filename).deanimate
|
||||
}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user