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);
|
fname = newStringUTF8(buf, len);
|
||||||
btData.scriptNames.insert(buf, scriptName);
|
btData.scriptNames.insert(buf, scriptName);
|
||||||
|
|
||||||
printf("%s\n", scriptName);
|
|
||||||
|
|
||||||
int state;
|
int state;
|
||||||
evalString(string, fname, &state);
|
evalString(string, fname, &state);
|
||||||
if (state)
|
if (state)
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,6 @@ RB_METHOD(_marshalLoad){
|
||||||
RB_UNUSED_PARAM;
|
RB_UNUSED_PARAM;
|
||||||
VALUE port, proc = Qnil;
|
VALUE port, proc = Qnil;
|
||||||
rb_scan_args(argc, argv, "01", &port, &proc);
|
rb_scan_args(argc, argv, "01", &port, &proc);
|
||||||
rb_p(proc);
|
|
||||||
VALUE utf8Proc;
|
VALUE utf8Proc;
|
||||||
if (NIL_P(proc)) {
|
if (NIL_P(proc)) {
|
||||||
utf8Proc = rb_proc_new(RUBY_METHOD_FUNC(stringForceUTF8), Qnil);
|
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
|
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
|
main viewport resize, main window resize and move signals bindings for ruby
|
||||||
Dynamic resolution support (WIP)
|
Dynamic resolution support (WIP)
|
||||||
|
Rewrited to use SDL3 libc methods instead default
|
||||||
|
Removed useless debug logs
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ class Language
|
||||||
lastLineWasMsgId = false
|
lastLineWasMsgId = false
|
||||||
lastLineWasMsgStr = false
|
lastLineWasMsgStr = false
|
||||||
if FileTest.exist?(path)
|
if FileTest.exist?(path)
|
||||||
File.readlines(path).each do |line|
|
File.readlines(path, encoding: "UTF-8").each do |line|
|
||||||
if line.start_with?("msgid ")
|
if line.start_with?("msgid ")
|
||||||
line = line[6..-1]
|
line = line[6..-1]
|
||||||
#unescape the string
|
#unescape the string
|
||||||
|
|
@ -129,16 +129,10 @@ class Language
|
||||||
|
|
||||||
# Translate some text
|
# Translate some text
|
||||||
def tr(string)
|
def tr(string)
|
||||||
if @data
|
return string unless @data
|
||||||
rv = @data[Oneshot::crc32(string)] || string
|
s = string.to_s.encode("UTF-8")
|
||||||
else
|
rv = @data[Oneshot::crc32(s)] || s
|
||||||
rv = string
|
rv.nil? ? "NULL" : String.new(rv)
|
||||||
end
|
|
||||||
|
|
||||||
if rv.nil?
|
|
||||||
rv = "NULL"
|
|
||||||
end
|
|
||||||
return String.new(rv)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def loadFontMap
|
def loadFontMap
|
||||||
|
|
@ -146,8 +140,9 @@ class Language
|
||||||
@languageFontMap = Hash.new
|
@languageFontMap = Hash.new
|
||||||
path = "Languages/language_fonts.ini"
|
path = "Languages/language_fonts.ini"
|
||||||
if FileTest.exist?(path)
|
if FileTest.exist?(path)
|
||||||
File.readlines(path).each do |line|
|
File.readlines(path, encoding: "UTF-8").each do |line|
|
||||||
parts = line.split("=", 2)
|
parts = line.split("=", 2)
|
||||||
|
#print(parts[0].inspect)
|
||||||
if parts.length == 2
|
if parts.length == 2
|
||||||
LANGUAGES.push(parts[0])
|
LANGUAGES.push(parts[0])
|
||||||
@languageFontMap[parts[0]] = parts[1].strip
|
@languageFontMap[parts[0]] = parts[1].strip
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue