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
1
Merge Requests
1
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
nanahira
ygopro
Commits
b25022e7
Commit
b25022e7
authored
Jan 04, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into another
parents
e1567e82
3795bc66
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
88 additions
and
25 deletions
+88
-25
.travis.yml
.travis.yml
+1
-1
gframe/client_card.cpp
gframe/client_card.cpp
+2
-0
gframe/duelclient.cpp
gframe/duelclient.cpp
+49
-14
gframe/game.cpp
gframe/game.cpp
+22
-4
gframe/game.h
gframe/game.h
+4
-2
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+6
-1
ocgcore
ocgcore
+1
-1
script
script
+1
-1
strings.conf
strings.conf
+1
-1
system.conf
system.conf
+1
-0
No files found.
.travis.yml
View file @
b25022e7
...
@@ -22,7 +22,7 @@ before_install:
...
@@ -22,7 +22,7 @@ before_install:
-
git submodule update --init --recursive
-
git submodule update --init --recursive
-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
brew update;
brew install freetype libevent sqlite dylibbundler;
brew install freetype libevent sqlite dylibbundler
p7zip
;
sudo cp -r /usr/local/include/freetype2 ./freetype2;
sudo cp -r /usr/local/include/freetype2 ./freetype2;
sudo cp -r /usr/local/include/event2 ./event2;
sudo cp -r /usr/local/include/event2 ./event2;
sudo rm -rf /usr/local/include/*;
sudo rm -rf /usr/local/include/*;
...
...
gframe/client_card.cpp
View file @
b25022e7
...
@@ -199,6 +199,8 @@ void ClientCard::ClearTarget() {
...
@@ -199,6 +199,8 @@ void ClientCard::ClearTarget() {
ownerTarget
.
clear
();
ownerTarget
.
clear
();
}
}
bool
ClientCard
::
client_card_sort
(
ClientCard
*
c1
,
ClientCard
*
c2
)
{
bool
ClientCard
::
client_card_sort
(
ClientCard
*
c1
,
ClientCard
*
c2
)
{
if
(
c1
->
is_selected
!=
c2
->
is_selected
)
return
c1
->
is_selected
<
c2
->
is_selected
;
int32
cp1
=
c1
->
overlayTarget
?
c1
->
overlayTarget
->
controler
:
c1
->
controler
;
int32
cp1
=
c1
->
overlayTarget
?
c1
->
overlayTarget
->
controler
:
c1
->
controler
;
int32
cp2
=
c2
->
overlayTarget
?
c2
->
overlayTarget
->
controler
:
c2
->
controler
;
int32
cp2
=
c2
->
overlayTarget
?
c2
->
overlayTarget
->
controler
:
c2
->
controler
;
if
(
cp1
!=
cp2
)
if
(
cp1
!=
cp2
)
...
...
gframe/duelclient.cpp
View file @
b25022e7
...
@@ -141,7 +141,7 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) {
...
@@ -141,7 +141,7 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) {
cscg
.
info
.
draw_count
=
1
;
cscg
.
info
.
draw_count
=
1
;
cscg
.
info
.
time_limit
=
0
;
cscg
.
info
.
time_limit
=
0
;
cscg
.
info
.
lflist
=
0
;
cscg
.
info
.
lflist
=
0
;
cscg
.
info
.
duel_rule
=
mainGame
->
c
hkBotOldRule
->
isChecked
()
?
DEFAULT_DUEL_RULE
-
1
:
DEFAULT_DUEL_RULE
;
cscg
.
info
.
duel_rule
=
mainGame
->
c
bBotRule
->
getSelected
()
+
3
;
cscg
.
info
.
no_check_deck
=
mainGame
->
chkBotNoCheckDeck
->
isChecked
();
cscg
.
info
.
no_check_deck
=
mainGame
->
chkBotNoCheckDeck
->
isChecked
();
cscg
.
info
.
no_shuffle_deck
=
mainGame
->
chkBotNoShuffleDeck
->
isChecked
();
cscg
.
info
.
no_shuffle_deck
=
mainGame
->
chkBotNoShuffleDeck
->
isChecked
();
}
}
...
@@ -810,11 +810,13 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -810,11 +810,13 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
wcsftime
(
timetext
,
40
,
L"%Y-%m-%d %H-%M-%S"
,
localedtime
);
wcsftime
(
timetext
,
40
,
L"%Y-%m-%d %H-%M-%S"
,
localedtime
);
mainGame
->
ebRSName
->
setText
(
timetext
);
mainGame
->
ebRSName
->
setText
(
timetext
);
if
(
!
mainGame
->
chkAutoSaveReplay
->
isChecked
())
{
if
(
!
mainGame
->
chkAutoSaveReplay
->
isChecked
())
{
mainGame
->
wReplaySave
->
setText
(
dataManager
.
GetSysString
(
1340
));
if
(
!
auto_watch_mode
)
{
mainGame
->
PopupElement
(
mainGame
->
wReplaySave
);
mainGame
->
wReplaySave
->
setText
(
dataManager
.
GetSysString
(
1340
));
mainGame
->
gMutex
.
unlock
();
mainGame
->
PopupElement
(
mainGame
->
wReplaySave
);
mainGame
->
replaySignal
.
Reset
();
mainGame
->
gMutex
.
unlock
();
mainGame
->
replaySignal
.
Wait
();
mainGame
->
replaySignal
.
Reset
();
mainGame
->
replaySignal
.
Wait
();
}
}
}
else
{
else
{
mainGame
->
actionParam
=
1
;
mainGame
->
actionParam
=
1
;
...
@@ -3083,6 +3085,18 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3083,6 +3085,18 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int
ct
=
BufferIO
::
ReadInt8
(
pbuf
);
int
ct
=
BufferIO
::
ReadInt8
(
pbuf
);
if
(
mainGame
->
dInfo
.
isReplaySkiping
)
if
(
mainGame
->
dInfo
.
isReplaySkiping
)
return
true
;
return
true
;
if
(
auto_watch_mode
&&
mainGame
->
dField
.
chains
.
size
()
>
1
)
{
int
code
=
mainGame
->
dField
.
chains
[
ct
-
1
].
chain_card
->
code
;
if
(
code
>
0
)
{
mainGame
->
showcardcode
=
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
1
;
mainGame
->
WaitFrameSignal
(
30
);
mainGame
->
showcard
=
0
;
mainGame
->
WaitFrameSignal
(
11
);
}
}
if
(
mainGame
->
dField
.
chains
.
size
()
>
1
)
{
if
(
mainGame
->
dField
.
chains
.
size
()
>
1
)
{
if
(
mainGame
->
dField
.
last_chain
)
if
(
mainGame
->
dField
.
last_chain
)
mainGame
->
WaitFrameSignal
(
11
);
mainGame
->
WaitFrameSignal
(
11
);
...
@@ -3093,10 +3107,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3093,10 +3107,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
WaitFrameSignal
(
3
);
mainGame
->
WaitFrameSignal
(
3
);
}
}
}
}
if
(
auto_watch_mode
)
{
int
code
=
mainGame
->
dField
.
chains
[
ct
-
1
].
chain_card
->
code
;
mainGame
->
ShowCardInfo
(
code
);
}
mainGame
->
dField
.
last_chain
=
false
;
mainGame
->
dField
.
last_chain
=
false
;
return
true
;
return
true
;
}
}
...
@@ -3167,8 +3177,11 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3167,8 +3177,11 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int
s
=
BufferIO
::
ReadInt8
(
pbuf
);
int
s
=
BufferIO
::
ReadInt8
(
pbuf
);
/*int ss = */
BufferIO
::
ReadInt8
(
pbuf
);
/*int ss = */
BufferIO
::
ReadInt8
(
pbuf
);
ClientCard
*
pcard
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
ClientCard
*
pcard
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
if
(
auto_watch_mode
&&
i
==
0
&&
(
pcard
->
position
&
POS_FACEUP
)
&&
(
pcard
->
location
&
LOCATION_ONFIELD
))
{
if
(
auto_watch_mode
&&
pcard
->
code
>
0
)
{
mainGame
->
ShowCardInfo
(
pcard
->
code
);
mainGame
->
showcardcode
=
pcard
->
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
4
;
}
}
pcard
->
is_highlighting
=
true
;
pcard
->
is_highlighting
=
true
;
mainGame
->
dField
.
current_chain
.
target
.
insert
(
pcard
);
mainGame
->
dField
.
current_chain
.
target
.
insert
(
pcard
);
...
@@ -3190,6 +3203,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3190,6 +3203,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
dField
.
MoveCard
(
pcard
,
5
);
mainGame
->
dField
.
MoveCard
(
pcard
,
5
);
}
else
}
else
mainGame
->
WaitFrameSignal
(
30
);
mainGame
->
WaitFrameSignal
(
30
);
if
(
auto_watch_mode
&&
pcard
->
code
>
0
)
{
mainGame
->
showcard
=
0
;
}
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1610
),
dataManager
.
GetName
(
pcard
->
code
),
dataManager
.
FormatLocation
(
l
,
s
),
s
+
1
);
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1610
),
dataManager
.
GetName
(
pcard
->
code
),
dataManager
.
FormatLocation
(
l
,
s
),
s
+
1
);
mainGame
->
AddLog
(
textBuffer
,
pcard
->
code
);
mainGame
->
AddLog
(
textBuffer
,
pcard
->
code
);
pcard
->
is_highlighting
=
false
;
pcard
->
is_highlighting
=
false
;
...
@@ -3449,6 +3465,16 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3449,6 +3465,16 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int
s
=
BufferIO
::
ReadInt8
(
pbuf
);
int
s
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
ReadInt16
(
pbuf
);
int
count
=
BufferIO
::
ReadInt16
(
pbuf
);
ClientCard
*
pc
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
ClientCard
*
pc
=
mainGame
->
dField
.
GetCard
(
c
,
l
,
s
);
if
(
auto_watch_mode
&&
pc
->
code
>
0
)
{
myswprintf
(
event_string
,
dataManager
.
GetSysString
(
1610
),
dataManager
.
GetName
(
pc
->
code
));
mainGame
->
showcardcode
=
pc
->
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
5
;
mainGame
->
WaitFrameSignal
(
30
);
mainGame
->
showcard
=
0
;
mainGame
->
WaitFrameSignal
(
11
);
}
if
(
pc
->
counters
.
count
(
type
))
if
(
pc
->
counters
.
count
(
type
))
pc
->
counters
[
type
]
+=
count
;
pc
->
counters
[
type
]
+=
count
;
else
pc
->
counters
[
type
]
=
count
;
else
pc
->
counters
[
type
]
=
count
;
...
@@ -3532,13 +3558,22 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3532,13 +3558,22 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
else
else
mainGame
->
atk_r
=
vector3df
(
0
,
0
,
3.1415926
-
atan
((
xd
-
xa
)
/
(
yd
-
ya
)));
mainGame
->
atk_r
=
vector3df
(
0
,
0
,
3.1415926
-
atan
((
xd
-
xa
)
/
(
yd
-
ya
)));
}
}
matManager
.
GenArrow
(
sy
);
if
(
auto_watch_mode
)
{
if
(
auto_watch_mode
)
{
mainGame
->
ShowCardInfo
(
mainGame
->
dField
.
attacker
->
code
);
int
code
=
mainGame
->
dField
.
attacker
->
code
;
if
(
code
>
0
)
{
mainGame
->
showcardcode
=
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
2
;
}
}
}
matManager
.
GenArrow
(
sy
);
mainGame
->
attack_sv
=
0
;
mainGame
->
attack_sv
=
0
;
mainGame
->
is_attacking
=
true
;
mainGame
->
is_attacking
=
true
;
mainGame
->
WaitFrameSignal
(
40
);
mainGame
->
WaitFrameSignal
(
40
);
if
(
auto_watch_mode
)
{
mainGame
->
showcard
=
0
;
}
mainGame
->
is_attacking
=
false
;
mainGame
->
is_attacking
=
false
;
return
true
;
return
true
;
}
}
...
...
gframe/game.cpp
View file @
b25022e7
...
@@ -178,7 +178,8 @@ bool Game::Initialize() {
...
@@ -178,7 +178,8 @@ bool Game::Initialize() {
cbDuelRule
->
addItem
(
dataManager
.
GetSysString
(
1261
));
cbDuelRule
->
addItem
(
dataManager
.
GetSysString
(
1261
));
cbDuelRule
->
addItem
(
dataManager
.
GetSysString
(
1262
));
cbDuelRule
->
addItem
(
dataManager
.
GetSysString
(
1262
));
cbDuelRule
->
addItem
(
dataManager
.
GetSysString
(
1263
));
cbDuelRule
->
addItem
(
dataManager
.
GetSysString
(
1263
));
cbDuelRule
->
setSelected
(
DEFAULT_DUEL_RULE
-
1
);
cbDuelRule
->
addItem
(
dataManager
.
GetSysString
(
1264
));
cbDuelRule
->
setSelected
(
gameConf
.
default_rule
-
1
);
chkNoCheckDeck
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
210
,
170
,
230
),
wCreateHost
,
-
1
,
dataManager
.
GetSysString
(
1229
));
chkNoCheckDeck
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
20
,
210
,
170
,
230
),
wCreateHost
,
-
1
,
dataManager
.
GetSysString
(
1229
));
chkNoShuffleDeck
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
180
,
210
,
360
,
230
),
wCreateHost
,
-
1
,
dataManager
.
GetSysString
(
1230
));
chkNoShuffleDeck
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
180
,
210
,
360
,
230
),
wCreateHost
,
-
1
,
dataManager
.
GetSysString
(
1230
));
env
->
addStaticText
(
dataManager
.
GetSysString
(
1231
),
rect
<
s32
>
(
20
,
240
,
320
,
260
),
false
,
false
,
wCreateHost
);
env
->
addStaticText
(
dataManager
.
GetSysString
(
1231
),
rect
<
s32
>
(
20
,
240
,
320
,
260
),
false
,
false
,
wCreateHost
);
...
@@ -750,7 +751,11 @@ bool Game::Initialize() {
...
@@ -750,7 +751,11 @@ bool Game::Initialize() {
btnBotCancel
=
env
->
addButton
(
rect
<
s32
>
(
459
,
331
,
569
,
356
),
tabBot
,
BUTTON_CANCEL_SINGLEPLAY
,
dataManager
.
GetSysString
(
1210
));
btnBotCancel
=
env
->
addButton
(
rect
<
s32
>
(
459
,
331
,
569
,
356
),
tabBot
,
BUTTON_CANCEL_SINGLEPLAY
,
dataManager
.
GetSysString
(
1210
));
env
->
addStaticText
(
dataManager
.
GetSysString
(
1382
),
rect
<
s32
>
(
360
,
10
,
550
,
30
),
false
,
true
,
tabBot
);
env
->
addStaticText
(
dataManager
.
GetSysString
(
1382
),
rect
<
s32
>
(
360
,
10
,
550
,
30
),
false
,
true
,
tabBot
);
stBotInfo
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
360
,
40
,
560
,
160
),
false
,
true
,
tabBot
);
stBotInfo
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
360
,
40
,
560
,
160
),
false
,
true
,
tabBot
);
chkBotOldRule
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
360
,
170
,
560
,
190
),
tabBot
,
CHECKBOX_BOT_OLD_RULE
,
dataManager
.
GetSysString
(
1383
));
cbBotRule
=
env
->
addComboBox
(
rect
<
s32
>
(
360
,
165
,
560
,
190
),
tabBot
,
COMBOBOX_BOT_RULE
);
cbBotRule
->
addItem
(
dataManager
.
GetSysString
(
1262
));
cbBotRule
->
addItem
(
dataManager
.
GetSysString
(
1263
));
cbBotRule
->
addItem
(
dataManager
.
GetSysString
(
1264
));
cbBotRule
->
setSelected
(
gameConf
.
default_rule
-
3
);
chkBotHand
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
360
,
200
,
560
,
220
),
tabBot
,
-
1
,
dataManager
.
GetSysString
(
1384
));
chkBotHand
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
360
,
200
,
560
,
220
),
tabBot
,
-
1
,
dataManager
.
GetSysString
(
1384
));
chkBotNoCheckDeck
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
360
,
230
,
560
,
250
),
tabBot
,
-
1
,
dataManager
.
GetSysString
(
1229
));
chkBotNoCheckDeck
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
360
,
230
,
560
,
250
),
tabBot
,
-
1
,
dataManager
.
GetSysString
(
1229
));
chkBotNoShuffleDeck
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
360
,
260
,
560
,
280
),
tabBot
,
-
1
,
dataManager
.
GetSysString
(
1230
));
chkBotNoShuffleDeck
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
360
,
260
,
560
,
280
),
tabBot
,
-
1
,
dataManager
.
GetSysString
(
1230
));
...
@@ -1178,8 +1183,11 @@ void Game::RefreshBot() {
...
@@ -1178,8 +1183,11 @@ void Game::RefreshBot() {
fgets
(
linebuf
,
256
,
fp
);
fgets
(
linebuf
,
256
,
fp
);
newinfo
.
support_master_rule_3
=
!!
strstr
(
linebuf
,
"SUPPORT_MASTER_RULE_3"
);
newinfo
.
support_master_rule_3
=
!!
strstr
(
linebuf
,
"SUPPORT_MASTER_RULE_3"
);
newinfo
.
support_new_master_rule
=
!!
strstr
(
linebuf
,
"SUPPORT_NEW_MASTER_RULE"
);
newinfo
.
support_new_master_rule
=
!!
strstr
(
linebuf
,
"SUPPORT_NEW_MASTER_RULE"
);
if
((
chkBotOldRule
->
isChecked
()
&&
newinfo
.
support_master_rule_3
)
newinfo
.
support_master_rule_2020
=
!!
strstr
(
linebuf
,
"SUPPORT_MASTER_RULE_2020"
);
||
(
!
chkBotOldRule
->
isChecked
()
&&
newinfo
.
support_new_master_rule
))
int
rule
=
cbBotRule
->
getSelected
()
+
3
;
if
((
rule
==
3
&&
newinfo
.
support_master_rule_3
)
||
(
rule
==
4
&&
newinfo
.
support_new_master_rule
)
||
(
rule
==
5
&&
newinfo
.
support_master_rule_2020
))
botInfo
.
push_back
(
newinfo
);
botInfo
.
push_back
(
newinfo
);
continue
;
continue
;
}
}
...
@@ -1226,6 +1234,7 @@ void Game::LoadConfig() {
...
@@ -1226,6 +1234,7 @@ void Game::LoadConfig() {
gameConf
.
chkWaitChain
=
0
;
gameConf
.
chkWaitChain
=
0
;
gameConf
.
chkIgnore1
=
0
;
gameConf
.
chkIgnore1
=
0
;
gameConf
.
chkIgnore2
=
0
;
gameConf
.
chkIgnore2
=
0
;
gameConf
.
default_rule
=
DEFAULT_DUEL_RULE
;
gameConf
.
hide_setname
=
0
;
gameConf
.
hide_setname
=
0
;
gameConf
.
hide_hint_button
=
0
;
gameConf
.
hide_hint_button
=
0
;
gameConf
.
control_mode
=
0
;
gameConf
.
control_mode
=
0
;
...
@@ -1298,6 +1307,10 @@ void Game::LoadConfig() {
...
@@ -1298,6 +1307,10 @@ void Game::LoadConfig() {
gameConf
.
chkIgnore1
=
atoi
(
valbuf
);
gameConf
.
chkIgnore1
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"mute_spectators"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"mute_spectators"
))
{
gameConf
.
chkIgnore2
=
atoi
(
valbuf
);
gameConf
.
chkIgnore2
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"default_rule"
))
{
gameConf
.
default_rule
=
atoi
(
valbuf
);
if
(
gameConf
.
default_rule
<=
0
)
gameConf
.
default_rule
=
DEFAULT_DUEL_RULE
;
}
else
if
(
!
strcmp
(
strbuf
,
"hide_setname"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"hide_setname"
))
{
gameConf
.
hide_setname
=
atoi
(
valbuf
);
gameConf
.
hide_setname
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"hide_hint_button"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"hide_hint_button"
))
{
...
@@ -1424,6 +1437,10 @@ void Game::LoadConfig() {
...
@@ -1424,6 +1437,10 @@ void Game::LoadConfig() {
gameConf
.
chkIgnore1
=
atoi
(
valbuf
);
gameConf
.
chkIgnore1
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"mute_spectators"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"mute_spectators"
))
{
gameConf
.
chkIgnore2
=
atoi
(
valbuf
);
gameConf
.
chkIgnore2
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"default_rule"
))
{
gameConf
.
default_rule
=
atoi
(
valbuf
);
if
(
gameConf
.
default_rule
<=
0
)
gameConf
.
default_rule
=
DEFAULT_DUEL_RULE
;
}
else
if
(
!
strcmp
(
strbuf
,
"hide_setname"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"hide_setname"
))
{
gameConf
.
hide_setname
=
atoi
(
valbuf
);
gameConf
.
hide_setname
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"hide_hint_button"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"hide_hint_button"
))
{
...
@@ -1598,6 +1615,7 @@ void Game::SaveConfig() {
...
@@ -1598,6 +1615,7 @@ void Game::SaveConfig() {
fprintf
(
fp
,
"waitchain = %d
\n
"
,
(
chkWaitChain
->
isChecked
()
?
1
:
0
));
fprintf
(
fp
,
"waitchain = %d
\n
"
,
(
chkWaitChain
->
isChecked
()
?
1
:
0
));
fprintf
(
fp
,
"mute_opponent = %d
\n
"
,
(
chkIgnore1
->
isChecked
()
?
1
:
0
));
fprintf
(
fp
,
"mute_opponent = %d
\n
"
,
(
chkIgnore1
->
isChecked
()
?
1
:
0
));
fprintf
(
fp
,
"mute_spectators = %d
\n
"
,
(
chkIgnore2
->
isChecked
()
?
1
:
0
));
fprintf
(
fp
,
"mute_spectators = %d
\n
"
,
(
chkIgnore2
->
isChecked
()
?
1
:
0
));
fprintf
(
fp
,
"default_rule = %d
\n
"
,
gameConf
.
default_rule
==
DEFAULT_DUEL_RULE
?
0
:
gameConf
.
default_rule
);
fprintf
(
fp
,
"hide_setname = %d
\n
"
,
gameConf
.
hide_setname
);
fprintf
(
fp
,
"hide_setname = %d
\n
"
,
gameConf
.
hide_setname
);
fprintf
(
fp
,
"hide_hint_button = %d
\n
"
,
gameConf
.
hide_hint_button
);
fprintf
(
fp
,
"hide_hint_button = %d
\n
"
,
gameConf
.
hide_hint_button
);
fprintf
(
fp
,
"#control_mode = 0: Key A/S/D/R Chain Buttons. control_mode = 1: MouseLeft/MouseRight/NULL/F9 Without Chain Buttons
\n
"
);
fprintf
(
fp
,
"#control_mode = 0: Key A/S/D/R Chain Buttons. control_mode = 1: MouseLeft/MouseRight/NULL/F9 Without Chain Buttons
\n
"
);
...
...
gframe/game.h
View file @
b25022e7
...
@@ -37,6 +37,7 @@ struct Config {
...
@@ -37,6 +37,7 @@ struct Config {
int
chkWaitChain
;
int
chkWaitChain
;
int
chkIgnore1
;
int
chkIgnore1
;
int
chkIgnore2
;
int
chkIgnore2
;
int
default_rule
;
int
hide_setname
;
int
hide_setname
;
int
hide_hint_button
;
int
hide_hint_button
;
int
control_mode
;
int
control_mode
;
...
@@ -109,6 +110,7 @@ struct BotInfo {
...
@@ -109,6 +110,7 @@ struct BotInfo {
wchar_t
desc
[
256
];
wchar_t
desc
[
256
];
bool
support_master_rule_3
;
bool
support_master_rule_3
;
bool
support_new_master_rule
;
bool
support_new_master_rule
;
bool
support_master_rule_2020
;
};
};
struct
FadingUnit
{
struct
FadingUnit
{
...
@@ -398,7 +400,7 @@ public:
...
@@ -398,7 +400,7 @@ public:
irr
::
gui
::
IGUIStaticText
*
stBotInfo
;
irr
::
gui
::
IGUIStaticText
*
stBotInfo
;
irr
::
gui
::
IGUIButton
*
btnStartBot
;
irr
::
gui
::
IGUIButton
*
btnStartBot
;
irr
::
gui
::
IGUIButton
*
btnBotCancel
;
irr
::
gui
::
IGUIButton
*
btnBotCancel
;
irr
::
gui
::
IGUIC
heckBox
*
chkBotOld
Rule
;
irr
::
gui
::
IGUIC
omboBox
*
cbBot
Rule
;
irr
::
gui
::
IGUICheckBox
*
chkBotHand
;
irr
::
gui
::
IGUICheckBox
*
chkBotHand
;
irr
::
gui
::
IGUICheckBox
*
chkBotNoCheckDeck
;
irr
::
gui
::
IGUICheckBox
*
chkBotNoCheckDeck
;
irr
::
gui
::
IGUICheckBox
*
chkBotNoShuffleDeck
;
irr
::
gui
::
IGUICheckBox
*
chkBotNoShuffleDeck
;
...
@@ -673,7 +675,7 @@ extern Game* mainGame;
...
@@ -673,7 +675,7 @@ extern Game* mainGame;
#define BUTTON_CANCEL_SINGLEPLAY 152
#define BUTTON_CANCEL_SINGLEPLAY 152
#define LISTBOX_BOT_LIST 153
#define LISTBOX_BOT_LIST 153
#define BUTTON_BOT_START 154
#define BUTTON_BOT_START 154
#define C
HECKBOX_BOT_OLD_RULE
155
#define C
OMBOBOX_BOT_RULE
155
#define EDITBOX_CHAT 199
#define EDITBOX_CHAT 199
#define BUTTON_MSG_OK 200
#define BUTTON_MSG_OK 200
...
...
gframe/menu_handler.cpp
View file @
b25022e7
...
@@ -606,7 +606,12 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -606,7 +606,12 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
}
}
break
;
break
;
}
}
case
CHECKBOX_BOT_OLD_RULE
:
{
}
break
;
}
case
irr
:
:
gui
::
EGET_COMBO_BOX_CHANGED
:
{
switch
(
id
)
{
case
COMBOBOX_BOT_RULE
:
{
mainGame
->
RefreshBot
();
mainGame
->
RefreshBot
();
break
;
break
;
}
}
...
...
ocgcore
@
619209b0
Subproject commit
eb2739d92a629f477a77c6ec2fc5f71535b315d9
Subproject commit
619209b086897d3995324bb4c4ae9743a470ab88
script
@
a9ab2c75
Subproject commit a
15e0304ffa16cb1c7547df2d3c8c08b31c58398
Subproject commit a
9ab2c75c09d13898900a0814f761d760853b8fc
strings.conf
View file @
b25022e7
...
@@ -311,6 +311,7 @@
...
@@ -311,6 +311,7 @@
!
system
1261
大师规则2
!
system
1261
大师规则2
!
system
1262
大师规则3
!
system
1262
大师规则3
!
system
1263
新大师规则
!
system
1263
新大师规则
!
system
1264
大师规则
2020
!
system
1270
卡片信息
!
system
1270
卡片信息
!
system
1271
消息记录
!
system
1271
消息记录
!
system
1272
清除记录
!
system
1272
清除记录
...
@@ -417,7 +418,6 @@
...
@@ -417,7 +418,6 @@
!
system
1380
人机模式
!
system
1380
人机模式
!
system
1381
残局模式
!
system
1381
残局模式
!
system
1382
人机信息:
!
system
1382
人机信息:
!
system
1383
使用旧规则(大师规则3)
!
system
1384
电脑锁定出剪刀
!
system
1384
电脑锁定出剪刀
!
system
1385
列表为空,可能未安装合适的人机
!
system
1385
列表为空,可能未安装合适的人机
!
system
1386
使用正则表达式搜索卡片
!
system
1386
使用正则表达式搜索卡片
...
...
system.conf
View file @
b25022e7
...
@@ -20,6 +20,7 @@ autochain = 0
...
@@ -20,6 +20,7 @@ autochain = 0
waitchain
=
0
waitchain
=
0
mute_opponent
=
0
mute_opponent
=
0
mute_spectators
=
0
mute_spectators
=
0
default_rule
=
0
hide_setname
=
0
hide_setname
=
0
hide_hint_button
=
0
hide_hint_button
=
0
#control_mode = 0: Key A/S/D/R Chain Buttons. control_mode = 1: MouseLeft/MouseRight/NULL/F9 Without Chain Buttons
#control_mode = 0: Key A/S/D/R Chain Buttons. control_mode = 1: MouseLeft/MouseRight/NULL/F9 Without Chain Buttons
...
...
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