06-26-2019, 03:17 AM
Basic Width and Height
"Scripting Tool"
This snippet or scriptlet should be placed above Main and any other custom script that might depend on the window width and height. The scriptlet should detect which version of RGSS you are currently running so you can safely play XP or VX games. VX Ace does not need this.
Code:
unless Graphics.respond_to?(:width)
module Graphics
found = Object.constants.respond_to?('Sound')
@width = found ? 544 : 640
@height = found ? 416 : 480
def self.width
@width
end
def self.height
@height
end
end
module RPG::Cache
def self.face(name)
load_bitmap('Graphics/Faces/', name).dup
end
end
end
Terms
You should not credit me for this simple snippet. Use it as much as you need to or simply ignore it.
