Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
MobiusMei
ygopro
Commits
4a861544
Commit
4a861544
authored
Dec 06, 2015
by
salix5
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'patch-win' of
https://github.com/Tianchenglipu/ygopro
into Tianchenglipu-patch-win
parents
e3283e01
7ca36267
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
28 deletions
+74
-28
gframe/duelclient.cpp
gframe/duelclient.cpp
+2
-2
gframe/game.cpp
gframe/game.cpp
+53
-13
gframe/game.h
gframe/game.h
+9
-0
strings.conf
strings.conf
+3
-13
system.conf
system.conf
+7
-0
No files found.
gframe/duelclient.cpp
View file @
4a861544
...
...
@@ -826,7 +826,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
else
if
(
type
<
0x10
)
myswprintf
(
vic_buf
,
L"[%ls] %ls"
,
mainGame
->
dInfo
.
clientname
,
dataManager
.
GetVictoryString
(
type
));
else
myswprintf
(
vic_buf
,
L"%ls"
,
dataManager
.
GetVictoryString
(
type
));
myswprintf
(
vic_buf
,
dataManager
.
GetVictoryString
(
0x10
),
dataManager
.
GetName
(
BufferIO
::
ReadInt32
(
pbuf
)
));
mainGame
->
dInfo
.
vic_string
=
vic_buf
;
}
else
{
mainGame
->
showcardcode
=
2
;
...
...
@@ -835,7 +835,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
else
if
(
type
<
0x10
)
myswprintf
(
vic_buf
,
L"[%ls] %ls"
,
mainGame
->
dInfo
.
hostname
,
dataManager
.
GetVictoryString
(
type
));
else
myswprintf
(
vic_buf
,
L"%ls"
,
dataManager
.
GetVictoryString
(
type
));
myswprintf
(
vic_buf
,
dataManager
.
GetVictoryString
(
0x10
),
dataManager
.
GetName
(
BufferIO
::
ReadInt32
(
pbuf
)
));
mainGame
->
dInfo
.
vic_string
=
vic_buf
;
}
mainGame
->
showcard
=
101
;
...
...
gframe/game.cpp
View file @
4a861544
...
...
@@ -259,13 +259,19 @@ bool Game::Initialize() {
//system
irr
::
gui
::
IGUITab
*
tabSystem
=
wInfos
->
addTab
(
dataManager
.
GetSysString
(
1273
));
chkAutoPos
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
20
,
280
,
45
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1274
));
chkAutoPos
->
setChecked
(
true
);
chkAutoPos
->
setChecked
(
gameConf
.
chkAutoPos
>=
1
);
chkRandomPos
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
40
,
50
,
300
,
75
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1275
));
chkRandomPos
->
setChecked
(
gameConf
.
chkRandomPos
>=
1
);
chkAutoChain
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
80
,
280
,
105
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1276
));
chkAutoChain
->
setChecked
(
gameConf
.
chkAutoChain
>=
1
);
chkWaitChain
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
110
,
280
,
135
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1277
));
chkWaitChain
->
setChecked
(
gameConf
.
chkWaitChain
>=
1
);
chkIgnore1
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
170
,
280
,
195
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1290
));
chkIgnore1
->
setChecked
(
gameConf
.
chkIgnore1
>=
1
);
chkIgnore2
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
200
,
280
,
225
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1291
));
chkIgnore2
->
setChecked
(
false
);
chkIgnore2
->
setChecked
(
gameConf
.
chkIgnore2
>=
1
);
chkHideSetname
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
200
,
280
,
285
),
tabSystem
,
-
1
,
dataManager
.
GetSysString
(
1354
));
chkHideSetname
->
setChecked
(
gameConf
.
chkHideSetname
>=
1
);
//
wHand
=
env
->
addWindow
(
rect
<
s32
>
(
500
,
450
,
825
,
605
),
false
,
L""
);
wHand
->
getCloseButton
()
->
setVisible
(
false
);
...
...
@@ -800,6 +806,14 @@ void Game::LoadConfig() {
gameConf
.
lastip
[
0
]
=
0
;
gameConf
.
lastport
[
0
]
=
0
;
gameConf
.
roompass
[
0
]
=
0
;
//settings
gameConf
.
chkAutoPos
=
1
;
gameConf
.
chkRandomPos
=
0
;
gameConf
.
chkAutoChain
=
0
;
gameConf
.
chkWaitChain
=
0
;
gameConf
.
chkIgnore1
=
0
;
gameConf
.
chkIgnore2
=
0
;
gameConf
.
chkHideSetname
=
0
;
fseek
(
fp
,
0
,
SEEK_END
);
int
fsize
=
ftell
(
fp
);
fseek
(
fp
,
0
,
SEEK_SET
);
...
...
@@ -832,6 +846,20 @@ void Game::LoadConfig() {
}
else
if
(
!
strcmp
(
strbuf
,
"roompass"
))
{
BufferIO
::
DecodeUTF8
(
valbuf
,
wstr
);
BufferIO
::
CopyWStr
(
wstr
,
gameConf
.
roompass
,
20
);
}
else
if
(
!
strcmp
(
strbuf
,
"chkAutoPos"
))
{
gameConf
.
chkAutoPos
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"chkRandomPos"
))
{
gameConf
.
chkRandomPos
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"chkAutoChain"
))
{
gameConf
.
chkAutoChain
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"chkWaitChain"
))
{
gameConf
.
chkWaitChain
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"chkIgnore1"
))
{
gameConf
.
chkIgnore1
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"chkIgnore2"
))
{
gameConf
.
chkIgnore2
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"chkHideSetname"
))
{
gameConf
.
chkHideSetname
=
atoi
(
valbuf
);
}
else
{
// options allowing multiple words
sscanf
(
linebuf
,
"%s = %240[^
\n
]"
,
strbuf
,
valbuf
);
...
...
@@ -874,6 +902,14 @@ void Game::SaveConfig() {
fprintf
(
fp
,
"lastip = %s
\n
"
,
linebuf
);
BufferIO
::
EncodeUTF8
(
gameConf
.
lastport
,
linebuf
);
fprintf
(
fp
,
"lastport = %s
\n
"
,
linebuf
);
//settings
fprintf
(
fp
,
"chkAutoPos = %d
\n
"
,
((
mainGame
->
chkAutoPos
->
isChecked
())
?
1
:
0
));
fprintf
(
fp
,
"chkRandomPos = %d
\n
"
,
((
mainGame
->
chkRandomPos
->
isChecked
())
?
1
:
0
));
fprintf
(
fp
,
"chkAutoChain = %d
\n
"
,
((
mainGame
->
chkAutoChain
->
isChecked
())
?
1
:
0
));
fprintf
(
fp
,
"chkWaitChain = %d
\n
"
,
((
mainGame
->
chkWaitChain
->
isChecked
())
?
1
:
0
));
fprintf
(
fp
,
"chkIgnore1 = %d
\n
"
,
((
mainGame
->
chkIgnore1
->
isChecked
())
?
1
:
0
));
fprintf
(
fp
,
"chkIgnore2 = %d
\n
"
,
((
mainGame
->
chkIgnore2
->
isChecked
())
?
1
:
0
));
fprintf
(
fp
,
"chkHideSetname = %d
\n
"
,
((
mainGame
->
chkHideSetname
->
isChecked
())
?
1
:
0
));
fclose
(
fp
);
}
void
Game
::
ShowCardInfo
(
int
code
)
{
...
...
@@ -888,18 +924,22 @@ void Game::ShowCardInfo(int code) {
else
myswprintf
(
formatBuffer
,
L"%ls[%08d]"
,
dataManager
.
GetName
(
code
),
code
);
stName
->
setText
(
formatBuffer
);
int
offset
=
0
;
unsigned
long
long
sc
=
cd
.
setcode
;
if
(
cd
.
alias
)
{
auto
aptr
=
dataManager
.
_datas
.
find
(
cd
.
alias
);
if
(
aptr
!=
dataManager
.
_datas
.
end
())
sc
=
aptr
->
second
.
setcode
;
}
if
(
sc
)
{
offset
=
23
;
myswprintf
(
formatBuffer
,
L"%ls%ls"
,
dataManager
.
GetSysString
(
1329
),
dataManager
.
FormatSetName
(
sc
));
stSetName
->
setText
(
formatBuffer
);
}
else
if
(
!
mainGame
->
chkHideSetname
->
isChecked
())
{
unsigned
long
long
sc
=
cd
.
setcode
;
if
(
cd
.
alias
)
{
auto
aptr
=
dataManager
.
_datas
.
find
(
cd
.
alias
);
if
(
aptr
!=
dataManager
.
_datas
.
end
())
sc
=
aptr
->
second
.
setcode
;
}
if
(
sc
)
{
offset
=
23
;
myswprintf
(
formatBuffer
,
L"%ls%ls"
,
dataManager
.
GetSysString
(
1329
),
dataManager
.
FormatSetName
(
sc
));
stSetName
->
setText
(
formatBuffer
);
}
else
stSetName
->
setText
(
L""
);
}
else
{
stSetName
->
setText
(
L""
);
}
if
(
cd
.
type
&
TYPE_MONSTER
)
{
myswprintf
(
formatBuffer
,
L"[%ls] %ls/%ls"
,
dataManager
.
FormatType
(
cd
.
type
),
dataManager
.
FormatRace
(
cd
.
race
),
dataManager
.
FormatAttribute
(
cd
.
attribute
));
stInfo
->
setText
(
formatBuffer
);
...
...
gframe/game.h
View file @
4a861544
...
...
@@ -24,6 +24,14 @@ struct Config {
wchar_t
textfont
[
256
];
wchar_t
numfont
[
256
];
wchar_t
roompass
[
20
];
//settings
int
chkAutoPos
;
int
chkRandomPos
;
int
chkAutoChain
;
int
chkWaitChain
;
int
chkIgnore1
;
int
chkIgnore2
;
int
chkHideSetname
;
};
struct
DuelInfo
{
...
...
@@ -179,6 +187,7 @@ public:
irr
::
gui
::
IGUICheckBox
*
chkRandomPos
;
irr
::
gui
::
IGUICheckBox
*
chkAutoChain
;
irr
::
gui
::
IGUICheckBox
*
chkWaitChain
;
irr
::
gui
::
IGUICheckBox
*
chkHideSetname
;
irr
::
gui
::
IGUIListBox
*
lstLog
;
irr
::
gui
::
IGUIButton
*
btnClearLog
;
irr
::
gui
::
IGUIButton
*
btnSaveLog
;
...
...
strings.conf
View file @
4a861544
#The first line is used for comment
#The first line is used for comment
#line doesn't start with '!' is also neglected
#called by DataManager::GetSysString(), DataManager::GetDesc()
#system
...
...
@@ -325,6 +325,7 @@
!
system
1351
投降
!
system
1352
主要信息:
!
system
1353
播放起始于回合:
!
system
1354
不显示卡片系列
!
system
1390
等待行动中...
!
system
1391
等待行动中....
!
system
1392
等待行动中.....
...
...
@@ -377,18 +378,7 @@
!
victory
0
x2
没有卡可抽
!
victory
0
x3
超时
!
victory
0
x4
失去连接
!
victory
0
x10
「被封印的艾克佐迪亚」效果胜利
!
victory
0
x11
「终焉的倒计时」效果胜利
!
victory
0
x12
「毒蛇神 维诺米纳迦」效果胜利
!
victory
0
x13
「光之创造神 哈拉克提」效果胜利
!
victory
0
x14
「究极封印神 艾克佐迪奥斯」效果胜利
!
victory
0
x15
「通灵盘」效果胜利
!
victory
0
x16
「最终一战!」效果胜利
!
victory
0
x17
「
No
.
88
机关傀儡-命运狮子」效果胜利
!
victory
0
x18
「混沌
No
.
88
机关傀儡-灾厄狮子」效果胜利
!
victory
0
x19
「头奖壶
7
」效果胜利
!
victory
0
x1a
「魂之接力」效果胜利
!
victory
0
x1b
「鬼计惰天使」效果胜利
!
victory
0
x10
「%
ls
」效果胜利
!
victory
0
x20
由于「%
ls
」的效果获得比赛胜利
#counters
!
counter
0
x3001
魔力指示物
...
...
system.conf
View file @
4a861544
...
...
@@ -11,3 +11,10 @@ numfont = c:/windows/fonts/arialbd.ttf
serverport
=
7911
lastip
=
127
.
0
.
0
.
1
lastport
=
7911
chkAutoPos
=
1
chkRandomPos
=
0
chkAutoChain
=
0
chkWaitChain
=
0
chkIgnore1
=
0
chkIgnore2
=
0
chkHideSetname
=
0
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