This commit is contained in:
DepressedTWM 2026-06-22 23:51:56 +04:00
parent 0be019eec5
commit fce8f40dac
3 changed files with 2 additions and 18 deletions

View File

@ -37,7 +37,7 @@ class Game_Event < Game_Character
end end
# Add special event data if it exists # Add special event data if it exists
/!([a-z]+)/.match(event.name) do |name| /!([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) @custom_flags.concat(special.flags)
@collision = special.collision @collision = special.collision
end end

View File

@ -52,7 +52,7 @@ class Window_NameInput < Window_Base
end end
def init def init
# Create dimension information # Create dimension information
@table_size = @character_tables.values.first.size @table_size = @character_tables[0].first.size
@table_width = @table_size / @table_height @table_width = @table_size / @table_height
@start_x = ((width - 32) - @table_width * @char_w) / 2 @start_x = ((width - 32) - @table_width * @char_w) / 2
@start_y = ((height - 32) - (@table_height + 1) * @char_h + BUTTON_BUFFER) / 2 @start_y = ((height - 32) - (@table_height + 1) * @char_h + BUTTON_BUFFER) / 2

View File

@ -10,19 +10,16 @@ class Language
LANGUAGES = [] LANGUAGES = []
class << self class << self
def set(lc) def set(lc)
dbg_print(lc.lang)
@data = nil @data = nil
@tr = nil @tr = nil
script = nil script = nil
[lc.full.to_s, lc.lang.to_s].each do |name| [lc.full.to_s, lc.lang.to_s].each do |name|
path = "Languages/#{name}.po" path = "Languages/#{name}.po"
dbg_print(path)
if FileTest.exist?(path) if FileTest.exist?(path)
load_pot(path) load_pot(path)
loadFontMap loadFontMap
Font.default_name = @languageFontMap[name] Font.default_name = @languageFontMap[name]
Journal.setLang(name) Journal.setLang(name)
dbg_print(Font.default_name)
break break
end end
end end
@ -132,7 +129,6 @@ class Language
# Translate some text # Translate some text
def tr(string) def tr(string)
#dbg_print(caller_locations(1, 1).first.tap{|loc| puts "#{loc.path}:#{loc.lineno}"})
if @data if @data
rv = @data[Oneshot::crc32(string)] || string rv = @data[Oneshot::crc32(string)] || string
else else
@ -142,7 +138,6 @@ class Language
if rv.nil? if rv.nil?
rv = "NULL" rv = "NULL"
end end
#dbg_print(string + " -> " + rv)
return String.new(rv) return String.new(rv)
end end
@ -176,18 +171,7 @@ class Language
end end
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) def register_text_sprite(key, spr)
dbg_print(key)
if @text_sprites.nil? if @text_sprites.nil?
@text_sprites = Hash.new() @text_sprites = Hash.new()
end end