加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 c248611 于 2013-1-7 18:26 编辑
Q:是反色,不是黑白色。
@英顺的马甲 A:
class Bitmap PROC = ["8b4424048b4400108b40088b40108b5424088d149039d074108d76008130ffffff0083c00439c275f331c0c21000"].pack("H*") CWP = Win32API.new("user32", "CallWindowProc", "piiii", "i") def inverse! CWP.call PROC, object_id, width*height, 0, 0 end def inverse b = self.clone b.inverse! return b end end class Scene_Map def inverse_color @spriteset.inverse_color end end class Spriteset_Map def inverse_color @tilemap.tileset = @tilemap.tileset.inverse for i in 0..6 @tilemap.autotiles[i] = @tilemap.autotiles[i].inverse end @character_sprites.each{|s|s.bitmap = s.bitmap.inverse} end end
class Bitmap
PROC = ["8b4424048b4400108b40088b40108b5424088d149039d074108d76008130ffffff0083c00439c275f331c0c21000"].pack("H*")
CWP = Win32API.new("user32", "CallWindowProc", "piiii", "i")
def inverse!
CWP.call PROC, object_id, width*height, 0, 0
end
def inverse
b = self.clone
b.inverse!
return b
end
end
class Scene_Map
def inverse_color
@spriteset.inverse_color
end
end
class Spriteset_Map
def inverse_color
@tilemap.tileset = @tilemap.tileset.inverse
for i in 0..6
@tilemap.autotiles[i] = @tilemap.autotiles[i].inverse
end
@character_sprites.each{|s|s.bitmap = s.bitmap.inverse}
end
end
事件调用脚本$scene.inverse_color就行了==
|