#==========================================================================#
# ■ 真?地震 BY 亿万星辰@2005#
#==========================================================================#
# ■ Spriteset_Map
#--------------------------------------------------------------------------#
# 处理地图画面活动块和元件的类。本类在
# Scene_Map 类的内部使用。
#==========================================================================#
class Spriteset_Map
#--------------------------------------------------------------------------#
# ● 刷新画面
#--------------------------------------------------------------------------#
def update
# 如果远景与当前情况不同
if @panorama_name != $game_map.panorama_name or
@panorama_hue != $game_map.panorama_hue
@panorama_name = $game_map.panorama_name
@panorama_hue = $game_map.panorama_hue
if @panorama.bitmap != nil
@panorama.bitmap.dispose
@panorama.bitmap = nil
end
if @panorama_name != ""
@panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
end
Graphics.frame_reset
end
# 如果雾与当前的情况不同
if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue
@fog_name = $game_map.fog_name
@fog_hue = $game_map.fog_hue
if @fog.bitmap != nil
@fog.bitmap.dispose
@fog.bitmap = nil
end
if @fog_name != ""
@fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)
end
Graphics.frame_reset
end
# 刷新元件地图
@tilemap.ox = $game_map.display_x / 4
@tilemap.oy = $game_map.display_y / 4
@tilemap.update
# 刷新远景平面
@panorama.ox = $game_map.display_x / 8
@panorama.oy = $game_map.display_y / 8
# 刷新雾平面
@fog.zoom_x = $game_map.fog_zoom / 100.0
@fog.zoom_y = $game_map.fog_zoom / 100.0
@fog.opacity = $game_map.fog_opacity
@fog.blend_type = $game_map.fog_blend_type
@fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
@fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
@fog.tone = $game_map.fog_tone
# 刷新角色精灵光标
for sprite in @character_sprites
sprite.update
end
# 刷新天候图形
@weather.type = $game_screen.weather_type
@weather.max = $game_screen.weather_max
@weather.ox = $game_map.display_x / 4
@weather.oy = $game_map.display_y / 4
@weather.update
# 刷新图片
for sprite in @picture_sprites
sprite.update
end
# 刷新计时器精灵光标
@timer_sprite.update
# 设置画面的色调与震动位置
# @viewport1.tone = $game_screen.tone
# @viewport1.ox = (-1) ** rand(2) * $game_screen.shake
# @viewport1.oy = (-1) ** rand(2) * $game_screen.shake
#让图片也可以震动
@viewport2.tone = $game_screen.tone
@viewport2.ox = (-1) ** rand(2) * $game_screen.shake
@viewport2.oy = (-1) ** rand(2) * $game_screen.shake
# 设置画面的闪烁色
@viewport3.color = $game_screen.flash_color
# 刷新视图
@viewport1.update
@viewport2.update
@viewport3.update
end
end
#==============================================================================
# ■ Spriteset_Battle
#------------------------------------------------------------------------------
# 处理战斗画面的活动块的类。本类在 Scene_Battle 类
# 的内部使用。
#==============================================================================
class Spriteset_Battle
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
# 刷新角色的活动块 (对应角色的替换)
@actor_sprites[0].battler = $game_party.actors[0]
@actor_sprites[1].battler = $game_party.actors[1]
@actor_sprites[2].battler = $game_party.actors[2]
@actor_sprites[3].battler = $game_party.actors[3]
# 如果战斗背景文件名与当下不同
if @battleback_name != $game_temp.battleback_name
@battleback_name = $game_temp.battleback_name
if @battleback_sprite.bitmap != nil
@battleback_sprite.bitmap.dispose
end
@battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name)
@battleback_sprite.src_rect.set(0, 0, 640, 320)
end
# 刷新战斗者的精灵光标
for sprite in @enemy_sprites + @actor_sprites
sprite.update
end
# 刷新天气图形
@weather.type = $game_screen.weather_type
@weather.max = $game_screen.weather_max
@weather.update
# 刷新图片精灵光标
for sprite in @picture_sprites
sprite.update
end
# 刷新计时器精灵光标
@timer_sprite.update
# 设置画面的色调与震动位置
# @viewport1.tone = $game_screen.tone
# @viewport1.ox = (-1) ** rand(2) * $game_screen.shake
# @viewport1.oy = (-1) ** rand(2) * $game_screen.shake
#让图片也可以震动
@viewport2.tone = $game_screen.tone
@viewport2.ox = (-1) ** rand(2) * $game_screen.shake
@viewport2.oy = (-1) ** rand(2) * $game_screen.shake
# 设置画面的闪烁色
@viewport4.color = $game_screen.flash_color
# 刷新视图
@viewport1.update
@viewport2.update
@viewport4.update
end
end