#==============================================================================
# ** Sprite
#==============================================================================
class Sprite
#--------------------------------------------------------------------------
# * Aliased methods
#--------------------------------------------------------------------------
unless @already_aliased_mgc_m7a
alias initialize_mgc_m7a initialize
alias zoom_x_mgc_m7a= zoom_x=
alias zoom_y_mgc_m7a= zoom_y=
alias zoom_x_mgc_m7a zoom_x
alias zoom_y_mgc_m7a zoom_y
@already_aliased_mgc_m7a = true
end
#--------------------------------------------------------------------------
# * Initialisation
#--------------------------------------------------------------------------
def initialize(*args)
initialize_mgc_m7a(*args)
@phase_mode7 = false
self.zoom_x = 1.0
self.zoom_y = 1.0
end
#--------------------------------------------------------------------------
# * Setter pour l'attribut zoom_x
#--------------------------------------------------------------------------
def zoom_x=(new_zoom_x)
unless @phase_mode7
@base_zoom_x = new_zoom_x
end
self.zoom_x_mgc_m7a = new_zoom_x
end
#--------------------------------------------------------------------------
# * Setter pour l'attribut zoom_y
#--------------------------------------------------------------------------
def zoom_y=(new_zoom_y)
unless @phase_mode7
@base_zoom_y = new_zoom_y
end
self.zoom_y_mgc_m7a = new_zoom_y
end
#--------------------------------------------------------------------------
# * Getter pour l'attribut zoom_x
#--------------------------------------------------------------------------
def zoom_x
return @base_zoom_x
end
#--------------------------------------------------------------------------
# * Getter pour l'attribut zoom_y
#--------------------------------------------------------------------------
def zoom_y
return @base_zoom_y
end
#--------------------------------------------------------------------------
# * Valeur réelle du zoom_x en prenant en compte le zoom de la carte
#--------------------------------------------------------------------------
def zoom_x_real
return zoom_x_mgc_m7a
end
#--------------------------------------------------------------------------
# * Valeur réelle du zoom_y en prenant en compte le zoom de la carte
#--------------------------------------------------------------------------
def zoom_y_real
return zoom_y_mgc_m7a
end
end
#==============================================================================
# ** Sprite_Character
#==============================================================================
class Sprite_Character < Sprite_Base
#--------------------------------------------------------------------------
# * Aliased methods
#--------------------------------------------------------------------------
unless @already_aliased_mgc_m7a
alias initialize_mgc_m7a_aprite_character initialize
alias update_position_mgc_m7a_aprite_character update_position
alias update_other_mgc_m7a_aprite_character update_other
alias update_balloon_mgc_m7a_aprite_character update_balloon
@already_aliased_mgc_m7a = true
end
#--------------------------------------------------------------------------
# * Object Initialization
# character : Game_Character
#--------------------------------------------------------------------------
def initialize(viewport, character = nil)
initialize_mgc_m7a_aprite_character(viewport, character)
character.sprite = self
end
#--------------------------------------------------------------------------
# * Update Position
#--------------------------------------------------------------------------
def update_position
if MGC.mode7_active
old_x = x
old_y = y
update_mode7
self.z = @character.screen_z
move_animation(x - old_x, y - old_y)
else
update_position_mgc_m7a_aprite_character
end
end
#--------------------------------------------------------------------------
# * Update Other
#--------------------------------------------------------------------------
def update_other
update_other_mgc_m7a_aprite_character
if MGC.mode7_active && visible
if !@force_mode7_invisible &&
y >= MGC.mode7_data[8] &&
(y - height * zoom_y_real) < Graphics.height
then
self.visible = true
if y < Graphics.height
dat = MGC.mode7_data[9]
self.opacity += dat[5, y]
self.tone.set(dat[2, y], dat[3, y], dat[4, y])
end
else
self.visible = false
end
end
end
#--------------------------------------------------------------------------
# * Update Position In Mode7
#--------------------------------------------------------------------------
def update_mode7
y_screen = character.screen_y +
(character.is_a?(Game_Vehicle) ? character.altitude : 0)
y_init = MGC.mode7_data[2] * (y_screen - MGC.mode7_data[0])
if y_init < - (MGC::MODE7_VIEW_LIMIT << 5) - MGC.mode7_data[0] ||
y_init > Graphics.height
then
@force_mode7_invisible = true
return
else
@force_mode7_invisible = false
end
x_init = MGC.mode7_data[2] * (character.screen_x - (Graphics.width >> 1))
self.y = (MGC.mode7_data[0] + (MGC.mode7_data[5] * y_init *
MGC.mode7_data[3]) / (MGC.mode7_data[5] - y_init * MGC.mode7_data[4])).to_i
zx = MGC.mode7_data[6] * y + MGC.mode7_data[7]
self.x = ((Graphics.width >> 1) + zx * x_init).to_i
@phase_mode7 = true
self.zoom_x = MGC.mode7_data[2] * zx
self.zoom_y = zoom_x_real
@phase_mode7 = false
if character.is_a?(Game_Vehicle)
self.y -= character.altitude * zoom_y_real
end
end
#--------------------------------------------------------------------------
# * Update Balloon Icon
#--------------------------------------------------------------------------
def update_balloon
update_balloon_mgc_m7a_aprite_character
if MGC.mode7_active && @balloon_duration > 0
@balloon_sprite.y = y - height * zoom_y_real
@balloon_sprite.zoom_x = zoom_x_real
@balloon_sprite.zoom_y = zoom_y_real
end
end
end
#==============================================================================
# ** Spriteset_Map
#==============================================================================
class Spriteset_Map
#--------------------------------------------------------------------------
# * Aliased methods
#--------------------------------------------------------------------------
unless @already_aliased_mgc_m7a
alias initialize_mgc_m7a initialize
alias create_tilemap_mgc_m7a create_tilemap
alias update_mgc_m7a update
alias update_shadow_mgc_m7a update_shadow
@already_aliased_mgc_m7a = true
end
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
MGC.spriteset = self
initialize_mgc_m7a
end
#--------------------------------------------------------------------------
# * Lance le mode 7
#--------------------------------------------------------------------------
def start_mode7
unless @tilemap_mode7
MGC.initialize_mode7
@tilemap_classic = @tilemap
@tilemap_mode7 = MGC::Mode7_Map.new(@viewport1)
@tilemap_mode7.map_data = $game_map.data
@tilemap = @tilemap_mode7
load_tileset
end
@tilemap_mode7.visible = true
@tilemap_classic.visible = false
@tilemap = @tilemap_mode7
MGC.mode7_active = true
end
#--------------------------------------------------------------------------
# * Met fin au mode 7
#--------------------------------------------------------------------------
def end_mode7
if @tilemap_mode7
@tilemap_mode7.visible = false
@tilemap_classic.visible = true
@tilemap = @tilemap_classic
end
MGC.mode7_active = false
end
#--------------------------------------------------------------------------
# * Create Tilemap
#--------------------------------------------------------------------------
def create_tilemap
create_tilemap_mgc_m7a
unless $game_system.mode7_active
MGC.mode7_active = false
end
if $game_map.is_mode7? || $game_system.mode7_active
start_mode7
end
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
MGC.update_mode7
if $game_map.start_mode7
start_mode7
$game_map.start_mode7 = false
elsif $game_map.end_mode7
end_mode7
$game_map.end_mode7 = false
end
update_mgc_m7a
end
#--------------------------------------------------------------------------
# * Update Airship Shadow Sprite
#--------------------------------------------------------------------------
def update_shadow
if MGC.mode7_active
airship_sprite = $game_map.airship.sprite
@shadow_sprite.x = airship_sprite.x
@shadow_sprite.y = airship_sprite.y + $game_map.airship.altitude *
airship_sprite.zoom_y_real
@shadow_sprite.opacity = $game_map.airship.altitude * 8 *
airship_sprite.opacity
@shadow_sprite.zoom_x = airship_sprite.zoom_x_real
@shadow_sprite.zoom_y = airship_sprite.zoom_y_real
@shadow_sprite.update
else
update_shadow_mgc_m7a
end
end
end
#==============================================================================
# ** Scene_Map
#==============================================================================
class Scene_Map < Scene_Base
#--------------------------------------------------------------------------
# * Aliased methods
#--------------------------------------------------------------------------
unless @already_aliased_mgc_m7a
alias update_call_menu_mgc_m7a update_call_menu
@already_aliased_mgc_m7a = true
end
#--------------------------------------------------------------------------
# * Determine if Menu is Called due to Cancel Button
#--------------------------------------------------------------------------
def update_call_menu
unless MGC.effect?
update_call_menu_mgc_m7a
end
end
end
#============================================================================
# ** RPG::MapInfo
#============================================================================
class RPG::MapInfo
# defines the map name as the name without anything within brackets,
# including brackets
def name
return @name.gsub(/\[.*\]/) {''}
end
#--------------------------------------------------------------------------
# the original name with the codes
def full_name
return @name
end
end 作者: 345912390 时间: 2013-9-7 17:26
缺少MGC_Mode7_Ace.dll文件,这个要你自己想办法了~!
只能找脚本的原出处看看有没有 工程或Dll文件 提供