1 Efeito de pulo na letra de dano Seg 08 Out 2012, 16:42
Halt
Administrador
Este script faz com que a letra do dano dê um pulinho.
- Código:
##################################################################
###################### KGC_2000StyleSave #########################
##################################################################
# Modifica a janela do save
##################################################################
module KGC
# Defina aqui o numero maximo de saves
SAVEFILE_NUMBER = 15
# Numero de imagens dos battlers por save.
SAVEFILE_ACTORS = 5
end
$imported["2000StyleSave"] = true
#==============================================================================
# ¦ Window_SaveFile
#==============================================================================
class Window_SaveFile < Window_Base
def initialize(file_index, filename)
super(0, 64 file_index % KGC::SAVEFILE_NUMBER * 138, 640, 138)
self.contents = Bitmap.new(width - 32, height - 32)
@file_index = file_index
@filename = "Save#{@file_index 1}.rxdata"
@time_stamp = Time.at(0)
@file_exist = FileTest.exist?(@filename)
if @file_exist
file = File.open(@filename, "r")
@time_stamp = file.mtime
@characters = Marshal.load(file)
@frame_count = 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)
@total_sec = @frame_count / Graphics.frame_rate
file.close
end
refresh
@selected = false
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def refresh
# MapInfo.rxdata ????
mapinfo = load_data("Data/MapInfos.rxdata")
self.contents.clear
# ?????????
self.contents.font.color = normal_color
name = "Save #{@file_index 1}"
self.contents.draw_text(4, 0, 600, 32, name)
@name_width = contents.text_size(name).width
# ??????????????
if @file_exist
# ?????????
x = 116
actor = @characters[0]
if actor != nil && actor.is_a?(Game_Actor)
self.contents.font.size = 20
draw_actor_name(actor, x, -4)
draw_actor_level(actor, x, 20)
draw_actor_hp(actor, x, 44)
self.contents.font.size = 22
end
x = 256
for i in [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
actor = @characters[i]
next if !actor.is_a?(Game_Actor) || actor == nil
bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
cw = bitmap.rect.width
ch = bitmap.rect.height
src_rect = Rect.new(0, 0, cw, ch)
dest_rect = Rect.new(x, 0, cw / 2, ch / 2)
x = dest_rect.width
self.contents.stretch_blt(dest_rect, bitmap, src_rect)
end
# ????????
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
time_string = sprintf("d:d:d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_frame_text(4, 0, 600, 32, time_string, 2)
# ??????????
self.contents.font.color = normal_color
time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
self.contents.draw_frame_text(4, 32, 600, 32, time_string, 2)
if $imported["PlaceMission"]
# ?????????
if @game_system.place == nil || @game_system.place == ""
# ???????
place = mapinfo[@game_map.map_id].name
else
place = @game_system.place
end
self.contents.font.color = system_color
cx = self.contents.text_size("Local").width
self.contents.draw_shadow_text(4, 80, cx, 32, "Local")
self.contents.font.color = normal_color
self.contents.draw_shadow_text(8 cx, 80, 596 - cx, 32, place)
end
end
end
end
#???????????????????????????????????????
#==============================================================================
# ¦ Scene_Title
#==============================================================================
class Scene_Title
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
alias update_KGC_2000StyleSave update
def update
# ?????????
unless @continue_checked
for i in 0...KGC::SAVEFILE_NUMBER
if FileTest.exist?("Save#{i 1}.rxdata")
found = true
break
end
end
# ???????????????