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
b5e7bc61
Commit
b5e7bc61
authored
Dec 09, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
0e73e109
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
57 deletions
+22
-57
gframe/client_field.h
gframe/client_field.h
+1
-0
gframe/event_handler.cpp
gframe/event_handler.cpp
+19
-55
ocgcore
ocgcore
+1
-1
script
script
+1
-1
No files found.
gframe/client_field.h
View file @
b5e7bc61
...
...
@@ -118,6 +118,7 @@ public:
virtual
bool
OnEvent
(
const
irr
::
SEvent
&
event
);
void
GetHoverField
(
int
x
,
int
y
);
void
ShowMenu
(
int
flag
,
int
x
,
int
y
);
void
SetResponseSelectedCards
()
const
;
};
}
...
...
gframe/event_handler.cpp
View file @
b5e7bc61
...
...
@@ -168,11 +168,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case
MSG_SELECT_CARD
:
case
MSG_SELECT_TRIBUTE
:
case
MSG_SELECT_SUM
:
{
unsigned
char
respbuf
[
64
];
respbuf
[
0
]
=
selected_cards
.
size
();
for
(
size_t
i
=
0
;
i
<
selected_cards
.
size
();
++
i
)
respbuf
[
i
+
1
]
=
selected_cards
[
i
]
->
select_seq
;
DuelClient
::
SetResponseB
(
respbuf
,
selected_cards
.
size
()
+
1
);
SetResponseSelectedCards
();
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
...
...
@@ -566,11 +562,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
int
sel
=
selected_cards
.
size
();
if
(
sel
>=
select_max
)
{
unsigned
char
respbuf
[
64
];
respbuf
[
0
]
=
selected_cards
.
size
();
for
(
size_t
i
=
0
;
i
<
selected_cards
.
size
();
++
i
)
respbuf
[
i
+
1
]
=
selected_cards
[
i
]
->
select_seq
;
DuelClient
::
SetResponseB
(
respbuf
,
selected_cards
.
size
()
+
1
);
SetResponseSelectedCards
();
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
}
else
if
(
sel
>=
select_min
)
{
select_ready
=
true
;
...
...
@@ -585,11 +577,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
command_card
=
selectable_cards
[
id
-
BUTTON_CARD_0
+
mainGame
->
scrCardList
->
getPos
()
/
10
];
selected_cards
.
push_back
(
command_card
);
if
(
CheckSelectSum
())
{
unsigned
char
respbuf
[
64
];
respbuf
[
0
]
=
selected_cards
.
size
();
for
(
size_t
i
=
0
;
i
<
selected_cards
.
size
();
++
i
)
respbuf
[
i
+
1
]
=
selected_cards
[
i
]
->
select_seq
;
DuelClient
::
SetResponseB
(
respbuf
,
selected_cards
.
size
()
+
1
);
SetResponseSelectedCards
();
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
}
else
{
mainGame
->
wCardSelect
->
setVisible
(
false
);
...
...
@@ -642,11 +630,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
if
(
mainGame
->
dInfo
.
curMsg
==
MSG_SELECT_CARD
)
{
if
(
select_ready
)
{
unsigned
char
respbuf
[
64
];
respbuf
[
0
]
=
selected_cards
.
size
();
for
(
size_t
i
=
0
;
i
<
selected_cards
.
size
();
++
i
)
respbuf
[
i
+
1
]
=
selected_cards
[
i
]
->
select_seq
;
DuelClient
::
SetResponseB
(
respbuf
,
selected_cards
.
size
()
+
1
);
SetResponseSelectedCards
();
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
}
break
;
...
...
@@ -1228,19 +1212,11 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
max
+=
selected_cards
[
i
]
->
opParam
;
}
if
(
min
>=
select_max
)
{
unsigned
char
respbuf
[
64
];
respbuf
[
0
]
=
selected_cards
.
size
();
for
(
size_t
i
=
0
;
i
<
selected_cards
.
size
();
++
i
)
respbuf
[
i
+
1
]
=
selected_cards
[
i
]
->
select_seq
;
DuelClient
::
SetResponseB
(
respbuf
,
selected_cards
.
size
()
+
1
);
SetResponseSelectedCards
();
DuelClient
::
SendResponse
();
}
else
if
(
max
>=
select_min
)
{
if
(
selected_cards
.
size
()
==
selectable_cards
.
size
())
{
unsigned
char
respbuf
[
64
];
respbuf
[
0
]
=
selected_cards
.
size
();
for
(
size_t
i
=
0
;
i
<
selected_cards
.
size
();
++
i
)
respbuf
[
i
+
1
]
=
selected_cards
[
i
]
->
select_seq
;
DuelClient
::
SetResponseB
(
respbuf
,
selected_cards
.
size
()
+
1
);
SetResponseSelectedCards
();
DuelClient
::
SendResponse
();
}
else
{
select_ready
=
true
;
...
...
@@ -1291,11 +1267,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
else
break
;
if
(
CheckSelectSum
())
{
if
(
selectsum_cards
.
size
()
==
0
||
selectable_cards
.
size
()
==
0
)
{
unsigned
char
respbuf
[
64
];
respbuf
[
0
]
=
selected_cards
.
size
();
for
(
size_t
i
=
0
;
i
<
selected_cards
.
size
();
++
i
)
respbuf
[
i
+
1
]
=
selected_cards
[
i
]
->
select_seq
;
DuelClient
::
SetResponseB
(
respbuf
,
selected_cards
.
size
()
+
1
);
SetResponseSelectedCards
();
DuelClient
::
SendResponse
();
}
else
{
select_ready
=
true
;
...
...
@@ -1365,20 +1337,12 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
unsigned
char
respbuf
[
64
];
respbuf
[
0
]
=
selected_cards
.
size
();
for
(
size_t
i
=
0
;
i
<
selected_cards
.
size
();
++
i
)
respbuf
[
i
+
1
]
=
selected_cards
[
i
]
->
select_seq
;
DuelClient
::
SetResponseB
(
respbuf
,
selected_cards
.
size
()
+
1
);
SetResponseSelectedCards
();
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
if
(
select_ready
)
{
unsigned
char
respbuf
[
64
];
respbuf
[
0
]
=
selected_cards
.
size
();
for
(
size_t
i
=
0
;
i
<
selected_cards
.
size
();
++
i
)
respbuf
[
i
+
1
]
=
selected_cards
[
i
]
->
select_seq
;
DuelClient
::
SetResponseB
(
respbuf
,
selected_cards
.
size
()
+
1
);
SetResponseSelectedCards
();
if
(
mainGame
->
wCardSelect
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
else
...
...
@@ -1398,11 +1362,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
unsigned
char
respbuf
[
64
];
respbuf
[
0
]
=
selected_cards
.
size
();
for
(
size_t
i
=
0
;
i
<
selected_cards
.
size
();
++
i
)
respbuf
[
i
+
1
]
=
selected_cards
[
i
]
->
select_seq
;
DuelClient
::
SetResponseB
(
respbuf
,
selected_cards
.
size
()
+
1
);
SetResponseSelectedCards
();
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
...
...
@@ -1410,11 +1370,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
case
MSG_SELECT_SUM
:
{
if
(
mainGame
->
wQuery
->
isVisible
())
{
unsigned
char
respbuf
[
64
];
respbuf
[
0
]
=
selected_cards
.
size
();
for
(
size_t
i
=
0
;
i
<
selected_cards
.
size
();
++
i
)
respbuf
[
i
+
1
]
=
selected_cards
[
i
]
->
select_seq
;
DuelClient
::
SetResponseB
(
respbuf
,
selected_cards
.
size
()
+
1
);
SetResponseSelectedCards
();
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
...
...
@@ -1938,4 +1894,12 @@ void ClientField::ShowMenu(int flag, int x, int y) {
mainGame
->
wCmdMenu
->
setVisible
(
true
);
mainGame
->
wCmdMenu
->
setRelativePosition
(
irr
::
core
::
recti
(
x
-
20
,
y
-
20
-
height
,
x
+
80
,
y
-
20
));
}
void
ClientField
::
SetResponseSelectedCards
()
const
{
unsigned
char
respbuf
[
64
];
respbuf
[
0
]
=
selected_cards
.
size
();
for
(
size_t
i
=
0
;
i
<
selected_cards
.
size
();
++
i
)
respbuf
[
i
+
1
]
=
selected_cards
[
i
]
->
select_seq
;
DuelClient
::
SetResponseB
(
respbuf
,
selected_cards
.
size
()
+
1
);
}
}
ocgcore
@
dcde72e4
Subproject commit
4e0295fab88326b216e54b6da644676b42a609c4
Subproject commit
dcde72e410c233b44a71cf2dd4112d036cc2d25e
script
@
9f8bf9e4
Subproject commit
025e884fb70d0776610ce1301e367b9b331bdf79
Subproject commit
9f8bf9e40dfb023a2c95a14f708cd52c7e7d9521
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