赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | -2365 |
最后登录 | 2019-3-18 |
在线时间 | 89 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 55
- 在线时间
- 89 小时
- 注册时间
- 2011-2-9
- 帖子
- 80
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 mirumo1234 于 2011-5-23 10:48 编辑
不知道为什么。。出现了最主要的东西错误。。使用了光的圆周率那个脚本。。
http://rpg.blue/forum.php?mod=vi ... 6%2D22+15%3A10%3A07
然后出现这个错误
不知道是出现了什么问题。。出现错误的部分以红色标了。。
请大家一定要帮忙解决啊。。。T T- #==============================================================================
- # ** Cache
- #------------------------------------------------------------------------------
- # This module loads each of graphics, creates a Bitmap object, and retains it.
- # To speed up load times and conserve memory, this module holds the created
- # Bitmap object in the internal hash, allowing the program to return
- # preexisting objects when the same bitmap is requested again.
- #==============================================================================
- module Cache
- #--------------------------------------------------------------------------
- # * Get Animation Graphic
- # filename : Filename
- # hue : Hue change value
- #--------------------------------------------------------------------------
- def self.animation(filename, hue)
- load_bitmap("Graphics/Animations/", filename, hue)
- end
- #--------------------------------------------------------------------------
- # * Get Battler Graphic
- # filename : Filename
- # hue : Hue change value
- #--------------------------------------------------------------------------
- def self.battler(filename, hue)
- load_bitmap("Graphics/Battlers/", filename, hue)
- end
- #--------------------------------------------------------------------------
- # * Get Character Graphic
- # filename : Filename
- #--------------------------------------------------------------------------
- def self.character(filename)
- load_bitmap("Graphics/Characters/", filename)
- end
- #--------------------------------------------------------------------------
- # * Get Face Graphic
- # filename : Filename
- #--------------------------------------------------------------------------
- def self.face(filename)
- load_bitmap("Graphics/Faces/", filename)
- end
- #--------------------------------------------------------------------------
- # * Get Parallax Background Graphic
- # filename : Filename
- #--------------------------------------------------------------------------
- def self.parallax(filename)
- load_bitmap("Graphics/Parallaxes/", filename)
- end
- #--------------------------------------------------------------------------
- # * Get Picture Graphic
- # filename : Filename
- #--------------------------------------------------------------------------
- def self.picture(filename)
- load_bitmap("Graphics/Pictures/", filename)
- end
- #--------------------------------------------------------------------------
- # * Get System Graphic
- # filename : Filename
- #--------------------------------------------------------------------------
- def self.system(filename)
- load_bitmap("Graphics/System/", filename)
- end
- #--------------------------------------------------------------------------
- # * Clear Cache
- #--------------------------------------------------------------------------
- def self.clear
- @cache = {} if @cache == nil
- @cache.clear
- GC.start
- end
- #--------------------------------------------------------------------------
- # * 读取图块
- #--------------------------------------------------------------------------
- def self.load_bitmap(folder_name, filename, hue = 0)
- @cache = {} if @cache == nil
- path = folder_name + filename
- if not @cache.include?(path) or @cache[path].disposed?
- if filename.empty?
- @cache[path] = Bitmap.new(32, 32)
- else
- @cache[path] = Bitmap.new(path)
- end
- end
- if hue == 0
- return @cache[path]
- else
- key = [path, hue]
- if not @cache.include?(key) or @cache[key].disposed?
- @cache[key] = @cache[path].clone
- @cache[key].hue_change(hue)
- end
- return @cache[key]
- end
- end
- end
复制代码 |
|