mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 21:39:57 +00:00
NIGAEGIA
This commit is contained in:
parent
0be019eec5
commit
fce8f40dac
3 changed files with 2 additions and 18 deletions
|
|
@ -37,7 +37,7 @@ class Game_Event < Game_Character
|
|||
end
|
||||
# Add special event data if it exists
|
||||
/!([a-z]+)/.match(event.name) do |name|
|
||||
special = SpecialEventData.get(name.captures.first.to_sym)
|
||||
special = SpecialEventData.get(name.captures[0].to_sym)
|
||||
@custom_flags.concat(special.flags)
|
||||
@collision = special.collision
|
||||
end
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class Window_NameInput < Window_Base
|
|||
end
|
||||
def init
|
||||
# Create dimension information
|
||||
@table_size = @character_tables.values.first.size
|
||||
@table_size = @character_tables[0].first.size
|
||||
@table_width = @table_size / @table_height
|
||||
@start_x = ((width - 32) - @table_width * @char_w) / 2
|
||||
@start_y = ((height - 32) - (@table_height + 1) * @char_h + BUTTON_BUFFER) / 2
|
||||
|
|
|
|||
|
|
@ -10,19 +10,16 @@ class Language
|
|||
LANGUAGES = []
|
||||
class << self
|
||||
def set(lc)
|
||||
dbg_print(lc.lang)
|
||||
@data = nil
|
||||
@tr = nil
|
||||
script = nil
|
||||
[lc.full.to_s, lc.lang.to_s].each do |name|
|
||||
path = "Languages/#{name}.po"
|
||||
dbg_print(path)
|
||||
if FileTest.exist?(path)
|
||||
load_pot(path)
|
||||
loadFontMap
|
||||
Font.default_name = @languageFontMap[name]
|
||||
Journal.setLang(name)
|
||||
dbg_print(Font.default_name)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
|
@ -132,7 +129,6 @@ class Language
|
|||
|
||||
# Translate some text
|
||||
def tr(string)
|
||||
#dbg_print(caller_locations(1, 1).first.tap{|loc| puts "#{loc.path}:#{loc.lineno}"})
|
||||
if @data
|
||||
rv = @data[Oneshot::crc32(string)] || string
|
||||
else
|
||||
|
|
@ -142,7 +138,6 @@ class Language
|
|||
if rv.nil?
|
||||
rv = "NULL"
|
||||
end
|
||||
#dbg_print(string + " -> " + rv)
|
||||
return String.new(rv)
|
||||
end
|
||||
|
||||
|
|
@ -176,18 +171,7 @@ class Language
|
|||
end
|
||||
end
|
||||
|
||||
def dbg_print(str)
|
||||
# dbg = IO.new(STDERR.fileno)
|
||||
# if str.nil?
|
||||
# dbg.write("null\n")
|
||||
# else
|
||||
# dbg.write(str.to_s + "\n")
|
||||
# end
|
||||
# dbg.close()
|
||||
end
|
||||
|
||||
def register_text_sprite(key, spr)
|
||||
dbg_print(key)
|
||||
if @text_sprites.nil?
|
||||
@text_sprites = Hash.new()
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue