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
wyykak
ygopro
Commits
a72ed5a4
Commit
a72ed5a4
authored
Aug 16, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ask-set'
parents
005c6f0f
657fc248
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
3 deletions
+36
-3
gframe/client_field.h
gframe/client_field.h
+2
-1
gframe/event_handler.cpp
gframe/event_handler.cpp
+22
-2
gframe/game.cpp
gframe/game.cpp
+7
-0
gframe/game.h
gframe/game.h
+3
-0
system.conf
system.conf
+2
-0
No files found.
gframe/client_field.h
View file @
a72ed5a4
...
...
@@ -63,7 +63,8 @@ public:
int
announce_count
;
int
select_counter_count
;
int
select_counter_type
;
std
::
vector
<
ClientCard
*>
selectable_cards
;
int
current_mset_param
;
std
::
vector
<
ClientCard
*>
selectable_cards
;
std
::
vector
<
ClientCard
*>
selected_cards
;
std
::
set
<
ClientCard
*>
selectsum_cards
;
std
::
vector
<
ClientCard
*>
selectsum_all
;
...
...
gframe/event_handler.cpp
View file @
a72ed5a4
...
...
@@ -219,6 +219,13 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
break
;
}
case
MSG_SELECT_IDLECMD
:
{
mainGame
->
HideElement
(
mainGame
->
wQuery
);
if
(
current_mset_param
)
{
DuelClient
::
SetResponseI
(
current_mset_param
);
DuelClient
::
SendResponse
();
}
}
default:
{
mainGame
->
HideElement
(
mainGame
->
wQuery
);
break
;
...
...
@@ -505,8 +512,16 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
for
(
size_t
i
=
0
;
i
<
msetable_cards
.
size
();
++
i
)
{
if
(
msetable_cards
[
i
]
==
clicked_card
)
{
DuelClient
::
SetResponseI
((
i
<<
16
)
+
3
);
DuelClient
::
SendResponse
();
current_mset_param
=
(
i
<<
16
)
+
3
;
if
(
mainGame
->
gameConf
.
ask_mset
)
{
wchar_t
wbuf
[
256
];
myswprintf
(
wbuf
,
dataManager
.
GetSysString
(
1355
),
dataManager
.
GetName
(
clicked_card
->
code
));
mainGame
->
stQMessage
->
setText
(
wbuf
);
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
}
else
{
DuelClient
::
SetResponseI
(
current_mset_param
);
DuelClient
::
SendResponse
();
}
break
;
}
}
...
...
@@ -1915,6 +1930,11 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
return
true
;
break
;
}
case
CHECKBOX_ASK_MSET
:
{
mainGame
->
gameConf
.
ask_mset
=
mainGame
->
chkAskMSet
->
isChecked
()
?
1
:
0
;
return
true
;
break
;
}
}
break
;
}
...
...
gframe/game.cpp
View file @
a72ed5a4
...
...
@@ -314,6 +314,9 @@ bool Game::Initialize() {
chkDrawSingleChain
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabHelper
,
CHECKBOX_DRAW_SINGLE_CHAIN
,
dataManager
.
GetSysString
(
1287
));
chkDrawSingleChain
->
setChecked
(
gameConf
.
draw_single_chain
!=
0
);
posY
+=
30
;
chkAskMSet
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabHelper
,
CHECKBOX_ASK_MSET
,
dataManager
.
GetSysString
(
1268
));
chkAskMSet
->
setChecked
(
gameConf
.
ask_mset
!=
0
);
posY
+=
30
;
chkAutoSaveReplay
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
posX
,
posY
,
posX
+
260
,
posY
+
25
),
tabHelper
,
-
1
,
dataManager
.
GetSysString
(
1366
));
chkAutoSaveReplay
->
setChecked
(
gameConf
.
auto_save_replay
!=
0
);
elmTabHelperLast
=
chkAutoSaveReplay
;
...
...
@@ -1313,6 +1316,8 @@ bool Game::LoadConfigFromFile(const char* file) {
gameConf
.
draw_single_chain
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"prefer_expansion_script"
))
{
gameConf
.
prefer_expansion_script
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"ask_mset"
))
{
gameConf
.
ask_mset
=
atoi
(
valbuf
);
}
else
if
(
!
strcmp
(
strbuf
,
"window_maximized"
))
{
gameConf
.
window_maximized
=
atoi
(
valbuf
)
>
0
;
}
else
if
(
!
strcmp
(
strbuf
,
"window_width"
))
{
...
...
@@ -1403,6 +1408,7 @@ void Game::LoadConfig() {
gameConf
.
auto_save_replay
=
0
;
gameConf
.
draw_single_chain
=
0
;
gameConf
.
prefer_expansion_script
=
0
;
gameConf
.
ask_mset
=
0
;
gameConf
.
enable_sound
=
true
;
gameConf
.
sound_volume
=
0.5
;
gameConf
.
enable_music
=
true
;
...
...
@@ -1539,6 +1545,7 @@ void Game::SaveConfig() {
fprintf
(
fp
,
"auto_save_replay = %d
\n
"
,
(
chkAutoSaveReplay
->
isChecked
()
?
1
:
0
));
fprintf
(
fp
,
"draw_single_chain = %d
\n
"
,
gameConf
.
draw_single_chain
);
fprintf
(
fp
,
"prefer_expansion_script = %d
\n
"
,
gameConf
.
prefer_expansion_script
);
fprintf
(
fp
,
"ask_mset = %d
\n
"
,
gameConf
.
ask_mset
);
fprintf
(
fp
,
"window_maximized = %d
\n
"
,
(
gameConf
.
window_maximized
?
1
:
0
));
fprintf
(
fp
,
"window_width = %d
\n
"
,
gameConf
.
window_width
);
fprintf
(
fp
,
"window_height = %d
\n
"
,
gameConf
.
window_height
);
...
...
gframe/game.h
View file @
a72ed5a4
...
...
@@ -57,6 +57,7 @@ struct Config {
int
auto_save_replay
;
int
draw_single_chain
;
int
prefer_expansion_script
;
int
ask_mset
;
bool
enable_sound
;
bool
enable_music
;
double
sound_volume
;
...
...
@@ -320,6 +321,7 @@ public:
irr
::
gui
::
IGUICheckBox
*
chkQuickAnimation
;
irr
::
gui
::
IGUICheckBox
*
chkAutoSaveReplay
;
irr
::
gui
::
IGUICheckBox
*
chkDrawSingleChain
;
irr
::
gui
::
IGUICheckBox
*
chkAskMSet
;
irr
::
gui
::
IGUIWindow
*
tabSystem
;
irr
::
gui
::
IGUIElement
*
elmTabSystemLast
;
irr
::
gui
::
IGUIScrollBar
*
scrTabSystem
;
...
...
@@ -828,6 +830,7 @@ extern Game* mainGame;
#define CHECKBOX_DRAW_SINGLE_CHAIN 374
#define CHECKBOX_REGEX 375
#define COMBOBOX_LOCALE 376
#define CHECKBOX_ASK_MSET 377
#define BUTTON_BIG_CARD_CLOSE 380
#define BUTTON_BIG_CARD_ZOOM_IN 381
...
...
system.conf
View file @
a72ed5a4
...
...
@@ -39,6 +39,8 @@ bot_deck_path = ./windbot/Decks
quick_animation
=
1
auto_save_replay
=
1
draw_single_chain
=
0
prefer_expansion_script
=
1
ask_mset
=
0
window_maximized
=
0
window_width
=
1024
window_height
=
640
...
...
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