Project1
标题:
应求发布:反色
[打印本页]
作者:
zh99998
时间:
2009-6-10 15:20
标题:
应求发布:反色
module AntiColor
module_function
def start
return if @active
@foreground = Sprite.new
@foreground.z = 501
@foreground.blend_type = 2
@foreground.bitmap = Graphics.snap_to_bitmap
@background = Sprite.new
@background.z = 500
@background.bitmap = Bitmap.new(Graphics.width, Graphics.height)
@background.bitmap.fill_rect(0, 0, Graphics.width, Graphics.height,Color.new(255,255,255))
@active = true
end
def update
return unless @active
@background.visible = false
@foreground.visible = false
@foreground.bitmap.dispose
@foreground.bitmap = Graphics.snap_to_bitmap
@background.visible = true
@foreground.visible = true
end
def terminate
return unless @active
@foreground.dispose
@background.dispose
@active = false
GC.start
end
end
class <<Graphics
alias update_zh99998_anticolor update
def update
AntiColor.update
update_zh99998_anticolor
end
end
复制代码
范例:http://rpg.blue/upload_program/d/zh99998_Project87_125056344.rar
在这晒两天然后转发布区……
作者:
雪流星
时间:
2009-6-10 17:36
好像N久以前我就写了一个....
不过是静止的
Anticolor.start调用第二字就会死机
最好作个限制
作者:
zh99998
时间:
2009-6-10 17:40
谢,已经修正
作者:
雪流星
时间:
2009-6-10 17:42
BUG回报
start调用一阵之後会掉祯
terminate之後不会完全恢复
按F12回Scene_Title会出错
作者:
zh99998
时间:
2009-6-10 17:51
F12错误我到现在都不太清楚是什么原因……不过这么短的脚本都出错的话大概就是在alias了……嗯……那玩意怎么修复
吃内存的问题解决了
作者:
hitlerson
时间:
2009-6-10 22:08
重定义的函数名号变态,吐了 吐了!
作者:
zh99998
时间:
2009-6-10 22:13
咋了……我一直是这么定义的啊
原函数名_zh99998_脚本名
作者:
tommay
时间:
2009-6-10 23:28
既然考虑这些问题了,请教下:“去色”的算法,谢谢!
作者:
zh99998
时间:
2009-6-10 23:39
什么叫【去色】
作者:
tommay
时间:
2009-6-10 23:56
应该是变成黑白的图吧,具体参考PS菜单中的图像——>调整——>去色
作者:
八云紫
时间:
2009-6-11 01:23
精灵颜色合成么??
作者:
hide秀
时间:
2009-6-11 01:53
alias update_zh99998_anticolor update unless method_defined? :update
这样试试看 {/wx}
作者:
zh99998
时间:
2009-6-11 03:52
这不就是所谓的去色吗
作者:
tommay
时间:
2009-6-11 04:55
多谢zh{/wx}
作者:
紫苏
时间:
2009-6-11 07:06
F12 的问题用秀秀的方法,或者把整段脚本用这个包围起来都行:
unless $XXXXX
# ....
# 脚本
# ....
$XXXXX = 1; end
作者:
越前リョーマ
时间:
2009-6-11 07:41
去色?
对黑白线稿用过一次……然后白底就变透明了。(好吧,这是sai里用的…… - -)
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1