芯☆淡茹水 发表于 2014-9-10 17:23
色相只修改战斗图的色相,其他的就跟着一起改变。
至于称谓颜色,你把地图显示的颜色和窗口显示的颜色改成 ...
嗯,我那里还2个地方还要改色相,你帮我改下
1。
def refresh_sprite(actor, x, y, kind) facename = "Graphics/Pictures/图片显示/人物头像/队伍图片/#{actor.id}_R" bitmap = Bitmap.new(facename) w = bitmap.width / 8 src_rect = Rect.new(kind * w, 0, w, bitmap.height) self.contents.blt(x, y, bitmap, src_rect) end end
def refresh_sprite(actor, x, y, kind)
facename = "Graphics/Pictures/图片显示/人物头像/队伍图片/#{actor.id}_R"
bitmap = Bitmap.new(facename)
w = bitmap.width / 8
src_rect = Rect.new(kind * w, 0, w, bitmap.height)
self.contents.blt(x, y, bitmap, src_rect)
end
end
2:
class Window_F_Graph < Window_Base attr_accessor :type def initialize(file_index) @file_index = file_index @actors_graph = Sprite.new @filename = "Save#{@file_index + 1}.rxdata" super(0, 0, 0, 0) @file_exist = FileTest.exist?(@filename) if @file_exist file = File.open(@filename, "r") @a = Marshal.load(file) @s = Marshal.load(file) @game_system = Marshal.load(file) @game_switches = Marshal.load(file) @game_variables = Marshal.load(file) @game_self_switches = Marshal.load(file) @game_screen = Marshal.load(file) @game_actors = Marshal.load(file) @game_party = Marshal.load(file) @game_troop = Marshal.load(file) @game_map = Marshal.load(file) [url=home.php?mod=space&uid=14736]@game_player[/url] = Marshal.load(file) file.close end @actor = @game_party refresh end def dispose @actors_graph.dispose if !@actors_graph.nil? super end def refresh if @file_exist case @file_index when 0 ix = 60 iy = 40-30-2 when 1 ix = -29+7 iy = 39-70-3 when 2 ix = -107-3 iy = 12-16-3 when 3 ix = -206-4 iy = 14-19-3 when 4 ix = -288-13 iy = 46-75-4 when 5 ix = -379-4 iy = 22-9-2 else # 例外 iy = 0 iw = 128 ih = 352 end @actors_graph.bitmap = Bitmap.new("Graphics/Pictures/图片显示/人物头像/存档图片/" + @actor.actors[0].id.to_s + "_Q") #@actors_graph.x = 128 * @file_index - 100+100 @actors_graph.x = 10 - ix-5 @actors_graph.y = 80 + iy+3 @actors_graph.z = 80000 cw = @actors_graph.bitmap.width / 8 ch = @actors_graph.bitmap.height @actors_graph.src_rect.set(0, 0, cw, ch) end end def refresh_actor if @file_exist cx = (Graphics.frame_count / 6) % 8 * (@actors_graph.bitmap.width / 8) @actors_graph.src_rect.x = cx end end def update super refresh_actor end end
class Window_F_Graph < Window_Base
attr_accessor :type
def initialize(file_index)
@file_index = file_index
@actors_graph = Sprite.new
@filename = "Save#{@file_index + 1}.rxdata"
super(0, 0, 0, 0)
@file_exist = FileTest.exist?(@filename)
if @file_exist
file = File.open(@filename, "r")
@a = Marshal.load(file)
@s = Marshal.load(file)
@game_system = Marshal.load(file)
@game_switches = Marshal.load(file)
@game_variables = Marshal.load(file)
@game_self_switches = Marshal.load(file)
@game_screen = Marshal.load(file)
@game_actors = Marshal.load(file)
@game_party = Marshal.load(file)
@game_troop = Marshal.load(file)
@game_map = Marshal.load(file)
[url=home.php?mod=space&uid=14736]@game_player[/url] = Marshal.load(file)
file.close
end
@actor = @game_party
refresh
end
def dispose
@actors_graph.dispose if !@actors_graph.nil?
super
end
def refresh
if @file_exist
case @file_index
when 0
ix = 60
iy = 40-30-2
when 1
ix = -29+7
iy = 39-70-3
when 2
ix = -107-3
iy = 12-16-3
when 3
ix = -206-4
iy = 14-19-3
when 4
ix = -288-13
iy = 46-75-4
when 5
ix = -379-4
iy = 22-9-2
else # 例外
iy = 0
iw = 128
ih = 352
end
@actors_graph.bitmap = Bitmap.new("Graphics/Pictures/图片显示/人物头像/存档图片/" + @actor.actors[0].id.to_s + "_Q")
#@actors_graph.x = 128 * @file_index - 100+100
@actors_graph.x = 10 - ix-5
@actors_graph.y = 80 + iy+3
@actors_graph.z = 80000
cw = @actors_graph.bitmap.width / 8
ch = @actors_graph.bitmap.height
@actors_graph.src_rect.set(0, 0, cw, ch)
end
end
def refresh_actor
if @file_exist
cx = (Graphics.frame_count / 6) % 8 * (@actors_graph.bitmap.width / 8)
@actors_graph.src_rect.x = cx
end
end
def update
super
refresh_actor
end
end
|