title screen

This commit is contained in:
infinitefusion
2021-07-02 21:48:03 -04:00
parent 500edeca7d
commit 8cae8fb8da
6 changed files with 675 additions and 0 deletions

View File

@@ -31,6 +31,8 @@ module RPG
return obj
end
def self.load_bitmap(folder_name, filename, hue = 0)
path = folder_name + filename
cached = true
@@ -60,6 +62,34 @@ module RPG
return ret2
end
def self.load_bitmap_path(path, hue = 0)
cached = true
ret = fromCache(path)
if !ret
if path == ""
ret = BitmapWrapper.new(32, 32)
else
ret = BitmapWrapper.new(path)
end
@cache[path] = ret
cached = false
end
if hue == 0
ret.addRef if cached
return ret
end
key = [path, hue]
ret2 = fromCache(key)
if ret2
ret2.addRef
else
ret2 = ret.copy
ret2.hue_change(hue)
@cache[key] = ret2
end
return ret2
end
def self.tileEx(filename, tile_id, hue, width = 1, height = 1)
key = [filename, tile_id, hue, width, height]
ret = fromCache(key)