Add spanish to language options

Make MapText not crash when trying to create negative-width bitmaps

Add special rules to mklang
This commit is contained in:
tdixon 2017-05-04 22:01:00 -03:00
parent cff99c2dd9
commit 96f1c43ac1
3 changed files with 18 additions and 8 deletions

View File

@ -15,6 +15,12 @@ po = GetPomo::PoFile.parse(File.read(src_file))
File.open(dst_file, 'wb') do |file| File.open(dst_file, 'wb') do |file|
file.write(Marshal.dump(po.map do |t| file.write(Marshal.dump(po.map do |t|
[Zlib.crc32(t.msgid), t.msgstr] id = t.msgid
msg = t.msgstr
id = id.gsub("\\\\","\\")
id = id.gsub("\\\"", "\"")
msg = msg.gsub("\\\\","\\")
msg = msg.gsub("\\\"", "\"")
[Zlib.crc32(id), msg]
end.to_h)) end.to_h))
end end

View File

@ -23,6 +23,10 @@ class Sprite_MapText < Sprite
end end
width -= spacewidth width -= spacewidth
if width <= 0
width = 1
end
self.bitmap.dispose self.bitmap.dispose
self.bitmap = Bitmap.new(width, 24) self.bitmap = Bitmap.new(width, 24)
self.bitmap.font.color = Color.new(81, 33, 129, 255) self.bitmap.font.color = Color.new(81, 33, 129, 255)

View File

@ -9,7 +9,7 @@ class Language
FONT_WESTERN = 'Terminus (TTF)' FONT_WESTERN = 'Terminus (TTF)'
FONT_CJK = 'WenQuanYi Micro Hei' FONT_CJK = 'WenQuanYi Micro Hei'
LANG_WESTERN = [ LANG_WESTERN = [
'en', 'fr', 'pt_BR' 'en', 'fr', 'pt_BR', 'es'
] ]
LANG_CJK = [ LANG_CJK = [
'ja', 'ko', 'zh_CN' 'ja', 'ko', 'zh_CN'