mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
meow
This commit is contained in:
parent
2425301611
commit
197c1ae9ba
4 changed files with 10 additions and 17 deletions
|
|
@ -472,9 +472,6 @@ static void runRMXPScripts(BacktraceData &btData){
|
|||
|
||||
fname = newStringUTF8(buf, len);
|
||||
btData.scriptNames.insert(buf, scriptName);
|
||||
|
||||
printf("%s\n", scriptName);
|
||||
|
||||
int state;
|
||||
evalString(string, fname, &state);
|
||||
if (state)
|
||||
|
|
|
|||
|
|
@ -176,7 +176,6 @@ RB_METHOD(_marshalLoad){
|
|||
RB_UNUSED_PARAM;
|
||||
VALUE port, proc = Qnil;
|
||||
rb_scan_args(argc, argv, "01", &port, &proc);
|
||||
rb_p(proc);
|
||||
VALUE utf8Proc;
|
||||
if (NIL_P(proc)) {
|
||||
utf8Proc = rb_proc_new(RUBY_METHOD_FUNC(stringForceUTF8), Qnil);
|
||||
|
|
|
|||
|
|
@ -65,3 +65,5 @@ supported gamepads can now change LED color based on map
|
|||
sigc is wrapped in signal.h, added the ability to move window from ruby
|
||||
main viewport resize, main window resize and move signals bindings for ruby
|
||||
Dynamic resolution support (WIP)
|
||||
Rewrited to use SDL3 libc methods instead default
|
||||
Removed useless debug logs
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class Language
|
|||
lastLineWasMsgId = false
|
||||
lastLineWasMsgStr = false
|
||||
if FileTest.exist?(path)
|
||||
File.readlines(path).each do |line|
|
||||
File.readlines(path, encoding: "UTF-8").each do |line|
|
||||
if line.start_with?("msgid ")
|
||||
line = line[6..-1]
|
||||
#unescape the string
|
||||
|
|
@ -129,16 +129,10 @@ class Language
|
|||
|
||||
# Translate some text
|
||||
def tr(string)
|
||||
if @data
|
||||
rv = @data[Oneshot::crc32(string)] || string
|
||||
else
|
||||
rv = string
|
||||
end
|
||||
|
||||
if rv.nil?
|
||||
rv = "NULL"
|
||||
end
|
||||
return String.new(rv)
|
||||
return string unless @data
|
||||
s = string.to_s.encode("UTF-8")
|
||||
rv = @data[Oneshot::crc32(s)] || s
|
||||
rv.nil? ? "NULL" : String.new(rv)
|
||||
end
|
||||
|
||||
def loadFontMap
|
||||
|
|
@ -146,8 +140,9 @@ class Language
|
|||
@languageFontMap = Hash.new
|
||||
path = "Languages/language_fonts.ini"
|
||||
if FileTest.exist?(path)
|
||||
File.readlines(path).each do |line|
|
||||
File.readlines(path, encoding: "UTF-8").each do |line|
|
||||
parts = line.split("=", 2)
|
||||
#print(parts[0].inspect)
|
||||
if parts.length == 2
|
||||
LANGUAGES.push(parts[0])
|
||||
@languageFontMap[parts[0]] = parts[1].strip
|
||||
|
|
|
|||
Loading…
Reference in a new issue