Commit 217861a9 authored by 神楽坂玲奈's avatar 神楽坂玲奈

一些中文修正,不确定可用

parent 94abfebd
...@@ -69,12 +69,20 @@ class Ygocore < Game ...@@ -69,12 +69,20 @@ class Ygocore < Game
Dir.chdir(File.dirname($config['ygocore']['path'])) do Dir.chdir(File.dirname($config['ygocore']['path'])) do
$log.debug('当前目录'){Dir.pwd.encode("UTF-8")} $log.debug('当前目录'){Dir.pwd.encode("UTF-8")}
system_conf = {} system_conf = {}
begin
IO.readlines('system.conf').each do |line| IO.readlines('system.conf').each do |line|
line.force_encoding "UTF-8" line.force_encoding "UTF-8"
next if line[0,1] == '#' next if line[0,1] == '#'
field, contents = line.chomp.split(' = ',2) field, contents = line.chomp.split(' = ',2)
system_conf[field] = contents system_conf[field] = contents
end end
rescue
system_conf['antialias'] = 2
system_conf['textfont'] = 'c:/windows/fonts/simsun.ttc 14'
system_conf['numfont'] = 'c:/windows/fonts/arialbd.ttf'
$log.error('找不到system.conf')
$log.debug(Dir.foreach('.').to_a.inspect)
end
system_conf['nickname'] = "#{@user.name}#{"$" unless @password.empty?}#{@password}" system_conf['nickname'] = "#{@user.name}#{"$" unless @password.empty?}#{@password}"
system_conf['lastip'] = Server system_conf['lastip'] = Server
system_conf['lastport'] = Port.to_s system_conf['lastport'] = Port.to_s
...@@ -88,8 +96,8 @@ class Ygocore < Game ...@@ -88,8 +96,8 @@ class Ygocore < Game
@@SendMessage = Win32API.new('user32', 'SendMessage', ["L", "L", "L", "L"], "L") @@SendMessage = Win32API.new('user32', 'SendMessage', ["L", "L", "L", "L"], "L")
@@SetForegroundWindow = Win32API.new('user32', 'SetForegroundWindow', 'l', 'v') @@SetForegroundWindow = Win32API.new('user32', 'SetForegroundWindow', 'l', 'v')
@@keybd_event = Win32API.new('user32', 'keybd_event', 'llll', 'v') @@keybd_event = Win32API.new('user32', 'keybd_event', 'llll', 'v')
@@lstrcpy = Win32API.new('kernel32', 'lstrcpy', ['I', 'P'], 'P'); @@lstrcpy = Win32API.new('kernel32', 'lstrcpyA', ['I', 'P'], 'P');
@@lstrlen = Win32API.new('kernel32', 'lstrlen', ['P'], 'I'); @@lstrlen = Win32API.new('kernel32', 'lstrlenA', ['P'], 'I');
@@OpenClipboard = Win32API.new('user32', 'OpenClipboard', ['I'], 'I'); @@OpenClipboard = Win32API.new('user32', 'OpenClipboard', ['I'], 'I');
@@CloseClipboard = Win32API.new('user32', 'CloseClipboard', [], 'I'); @@CloseClipboard = Win32API.new('user32', 'CloseClipboard', [], 'I');
@@EmptyClipboard = Win32API.new('user32', 'EmptyClipboard', [], 'I'); @@EmptyClipboard = Win32API.new('user32', 'EmptyClipboard', [], 'I');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment