Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
syntax_j
mycard
Commits
217861a9
Commit
217861a9
authored
Mar 12, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
一些中文修正,不确定可用
parent
94abfebd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
lib/ygocore/game.rb
lib/ygocore/game.rb
+15
-7
No files found.
lib/ygocore/game.rb
View file @
217861a9
...
@@ -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'
,
'lstrcpy
A
'
,
[
'I'
,
'P'
],
'P'
);
@@lstrlen
=
Win32API
.
new
(
'kernel32'
,
'lstrlen'
,
[
'P'
],
'I'
);
@@lstrlen
=
Win32API
.
new
(
'kernel32'
,
'lstrlen
A
'
,
[
'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'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment