Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
R
rd-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
苍蓝
rd-ygopro
Commits
e86953be
Commit
e86953be
authored
Jun 11, 2024
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sideins
parent
57f42254
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
24 deletions
+62
-24
gframe/single_duel.cpp
gframe/single_duel.cpp
+21
-8
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+41
-16
No files found.
gframe/single_duel.cpp
View file @
e86953be
...
@@ -590,20 +590,33 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
...
@@ -590,20 +590,33 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
new_card
(
pduel
,
pdeck
[
0
].
main
[
i
]
->
first
,
0
,
0
,
LOCATION_DECK
,
0
,
POS_FACEDOWN_DEFENSE
);
new_card
(
pduel
,
pdeck
[
0
].
main
[
i
]
->
first
,
0
,
0
,
LOCATION_DECK
,
0
,
POS_FACEDOWN_DEFENSE
);
last_replay
.
WriteInt32
(
pdeck
[
0
].
main
[
i
]
->
first
,
false
);
last_replay
.
WriteInt32
(
pdeck
[
0
].
main
[
i
]
->
first
,
false
);
}
}
last_replay
.
WriteInt32
(
pdeck
[
0
].
extra
.
size
(),
false
);
std
::
vector
<
ygo
::
code_pointer
>
extra_cards
;
for
(
int32
i
=
(
int32
)
pdeck
[
0
].
extra
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
extra_cards
.
clear
();
new_card
(
pduel
,
pdeck
[
0
].
extra
[
i
]
->
first
,
0
,
0
,
LOCATION_EXTRA
,
0
,
POS_FACEDOWN_DEFENSE
);
for
(
auto
cit
:
pdeck
[
0
].
extra
)
last_replay
.
WriteInt32
(
pdeck
[
0
].
extra
[
i
]
->
first
,
false
);
extra_cards
.
push_back
(
cit
);
for
(
auto
cit
:
pdeck
[
0
].
side
)
if
(
cit
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
))
extra_cards
.
push_back
(
cit
);
last_replay
.
WriteInt32
(
extra_cards
.
size
(),
false
);
for
(
int32
i
=
(
int32
)
extra_cards
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
new_card
(
pduel
,
extra_cards
[
i
]
->
first
,
0
,
0
,
LOCATION_EXTRA
,
0
,
POS_FACEDOWN_DEFENSE
);
last_replay
.
WriteInt32
(
extra_cards
[
i
]
->
first
,
false
);
}
}
last_replay
.
WriteInt32
(
pdeck
[
1
].
main
.
size
(),
false
);
last_replay
.
WriteInt32
(
pdeck
[
1
].
main
.
size
(),
false
);
for
(
int32
i
=
(
int32
)
pdeck
[
1
].
main
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
for
(
int32
i
=
(
int32
)
pdeck
[
1
].
main
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
new_card
(
pduel
,
pdeck
[
1
].
main
[
i
]
->
first
,
1
,
1
,
LOCATION_DECK
,
0
,
POS_FACEDOWN_DEFENSE
);
new_card
(
pduel
,
pdeck
[
1
].
main
[
i
]
->
first
,
1
,
1
,
LOCATION_DECK
,
0
,
POS_FACEDOWN_DEFENSE
);
last_replay
.
WriteInt32
(
pdeck
[
1
].
main
[
i
]
->
first
,
false
);
last_replay
.
WriteInt32
(
pdeck
[
1
].
main
[
i
]
->
first
,
false
);
}
}
last_replay
.
WriteInt32
(
pdeck
[
1
].
extra
.
size
(),
false
);
extra_cards
.
clear
();
for
(
int32
i
=
(
int32
)
pdeck
[
1
].
extra
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
for
(
auto
cit
:
pdeck
[
1
].
extra
)
new_card
(
pduel
,
pdeck
[
1
].
extra
[
i
]
->
first
,
1
,
1
,
LOCATION_EXTRA
,
0
,
POS_FACEDOWN_DEFENSE
);
extra_cards
.
push_back
(
cit
);
last_replay
.
WriteInt32
(
pdeck
[
1
].
extra
[
i
]
->
first
,
false
);
for
(
auto
cit
:
pdeck
[
1
].
side
)
if
(
cit
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
))
extra_cards
.
push_back
(
cit
);
last_replay
.
WriteInt32
(
extra_cards
.
size
(),
false
);
for
(
int32
i
=
(
int32
)
extra_cards
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
new_card
(
pduel
,
extra_cards
[
i
]
->
first
,
1
,
1
,
LOCATION_EXTRA
,
0
,
POS_FACEDOWN_DEFENSE
);
last_replay
.
WriteInt32
(
extra_cards
[
i
]
->
first
,
false
);
}
}
last_replay
.
Flush
();
last_replay
.
Flush
();
unsigned
char
startbuf
[
32
];
unsigned
char
startbuf
[
32
];
...
...
gframe/tag_duel.cpp
View file @
e86953be
...
@@ -572,10 +572,17 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
...
@@ -572,10 +572,17 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
new_card
(
pduel
,
pdeck
[
0
].
main
[
i
]
->
first
,
0
,
0
,
LOCATION_DECK
,
0
,
POS_FACEDOWN_DEFENSE
);
new_card
(
pduel
,
pdeck
[
0
].
main
[
i
]
->
first
,
0
,
0
,
LOCATION_DECK
,
0
,
POS_FACEDOWN_DEFENSE
);
last_replay
.
WriteInt32
(
pdeck
[
0
].
main
[
i
]
->
first
,
false
);
last_replay
.
WriteInt32
(
pdeck
[
0
].
main
[
i
]
->
first
,
false
);
}
}
last_replay
.
WriteInt32
(
pdeck
[
0
].
extra
.
size
(),
false
);
std
::
vector
<
ygo
::
code_pointer
>
extra_cards
;
for
(
int32
i
=
(
int32
)
pdeck
[
0
].
extra
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
extra_cards
.
clear
();
new_card
(
pduel
,
pdeck
[
0
].
extra
[
i
]
->
first
,
0
,
0
,
LOCATION_EXTRA
,
0
,
POS_FACEDOWN_DEFENSE
);
for
(
auto
cit
:
pdeck
[
0
].
extra
)
last_replay
.
WriteInt32
(
pdeck
[
0
].
extra
[
i
]
->
first
,
false
);
extra_cards
.
push_back
(
cit
);
for
(
auto
cit
:
pdeck
[
0
].
side
)
if
(
cit
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
))
extra_cards
.
push_back
(
cit
);
last_replay
.
WriteInt32
(
extra_cards
.
size
(),
false
);
for
(
int32
i
=
(
int32
)
extra_cards
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
new_card
(
pduel
,
extra_cards
[
i
]
->
first
,
0
,
0
,
LOCATION_EXTRA
,
0
,
POS_FACEDOWN_DEFENSE
);
last_replay
.
WriteInt32
(
extra_cards
[
i
]
->
first
,
false
);
}
}
//
//
last_replay
.
WriteInt32
(
pdeck
[
1
].
main
.
size
(),
false
);
last_replay
.
WriteInt32
(
pdeck
[
1
].
main
.
size
(),
false
);
...
@@ -583,10 +590,16 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
...
@@ -583,10 +590,16 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
new_tag_card
(
pduel
,
pdeck
[
1
].
main
[
i
]
->
first
,
0
,
LOCATION_DECK
);
new_tag_card
(
pduel
,
pdeck
[
1
].
main
[
i
]
->
first
,
0
,
LOCATION_DECK
);
last_replay
.
WriteInt32
(
pdeck
[
1
].
main
[
i
]
->
first
,
false
);
last_replay
.
WriteInt32
(
pdeck
[
1
].
main
[
i
]
->
first
,
false
);
}
}
last_replay
.
WriteInt32
(
pdeck
[
1
].
extra
.
size
(),
false
);
extra_cards
.
clear
();
for
(
int32
i
=
(
int32
)
pdeck
[
1
].
extra
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
for
(
auto
cit
:
pdeck
[
1
].
extra
)
new_tag_card
(
pduel
,
pdeck
[
1
].
extra
[
i
]
->
first
,
0
,
LOCATION_EXTRA
);
extra_cards
.
push_back
(
cit
);
last_replay
.
WriteInt32
(
pdeck
[
1
].
extra
[
i
]
->
first
,
false
);
for
(
auto
cit
:
pdeck
[
1
].
side
)
if
(
cit
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
))
extra_cards
.
push_back
(
cit
);
last_replay
.
WriteInt32
(
extra_cards
.
size
(),
false
);
for
(
int32
i
=
(
int32
)
extra_cards
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
new_tag_card
(
pduel
,
extra_cards
[
i
]
->
first
,
0
,
LOCATION_EXTRA
);
last_replay
.
WriteInt32
(
extra_cards
[
i
]
->
first
,
false
);
}
}
//
//
last_replay
.
WriteInt32
(
pdeck
[
3
].
main
.
size
(),
false
);
last_replay
.
WriteInt32
(
pdeck
[
3
].
main
.
size
(),
false
);
...
@@ -594,10 +607,16 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
...
@@ -594,10 +607,16 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
new_card
(
pduel
,
pdeck
[
3
].
main
[
i
]
->
first
,
1
,
1
,
LOCATION_DECK
,
0
,
POS_FACEDOWN_DEFENSE
);
new_card
(
pduel
,
pdeck
[
3
].
main
[
i
]
->
first
,
1
,
1
,
LOCATION_DECK
,
0
,
POS_FACEDOWN_DEFENSE
);
last_replay
.
WriteInt32
(
pdeck
[
3
].
main
[
i
]
->
first
,
false
);
last_replay
.
WriteInt32
(
pdeck
[
3
].
main
[
i
]
->
first
,
false
);
}
}
last_replay
.
WriteInt32
(
pdeck
[
3
].
extra
.
size
(),
false
);
extra_cards
.
clear
();
for
(
int32
i
=
(
int32
)
pdeck
[
3
].
extra
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
for
(
auto
cit
:
pdeck
[
3
].
extra
)
new_card
(
pduel
,
pdeck
[
3
].
extra
[
i
]
->
first
,
1
,
1
,
LOCATION_EXTRA
,
0
,
POS_FACEDOWN_DEFENSE
);
extra_cards
.
push_back
(
cit
);
last_replay
.
WriteInt32
(
pdeck
[
3
].
extra
[
i
]
->
first
,
false
);
for
(
auto
cit
:
pdeck
[
3
].
side
)
if
(
cit
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
))
extra_cards
.
push_back
(
cit
);
last_replay
.
WriteInt32
(
extra_cards
.
size
(),
false
);
for
(
int32
i
=
(
int32
)
extra_cards
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
new_card
(
pduel
,
extra_cards
[
i
]
->
first
,
1
,
1
,
LOCATION_EXTRA
,
0
,
POS_FACEDOWN_DEFENSE
);
last_replay
.
WriteInt32
(
extra_cards
[
i
]
->
first
,
false
);
}
}
//
//
last_replay
.
WriteInt32
(
pdeck
[
2
].
main
.
size
(),
false
);
last_replay
.
WriteInt32
(
pdeck
[
2
].
main
.
size
(),
false
);
...
@@ -605,10 +624,16 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
...
@@ -605,10 +624,16 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
new_tag_card
(
pduel
,
pdeck
[
2
].
main
[
i
]
->
first
,
1
,
LOCATION_DECK
);
new_tag_card
(
pduel
,
pdeck
[
2
].
main
[
i
]
->
first
,
1
,
LOCATION_DECK
);
last_replay
.
WriteInt32
(
pdeck
[
2
].
main
[
i
]
->
first
,
false
);
last_replay
.
WriteInt32
(
pdeck
[
2
].
main
[
i
]
->
first
,
false
);
}
}
last_replay
.
WriteInt32
(
pdeck
[
2
].
extra
.
size
(),
false
);
extra_cards
.
clear
();
for
(
int32
i
=
(
int32
)
pdeck
[
2
].
extra
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
for
(
auto
cit
:
pdeck
[
2
].
extra
)
new_tag_card
(
pduel
,
pdeck
[
2
].
extra
[
i
]
->
first
,
1
,
LOCATION_EXTRA
);
extra_cards
.
push_back
(
cit
);
last_replay
.
WriteInt32
(
pdeck
[
2
].
extra
[
i
]
->
first
,
false
);
for
(
auto
cit
:
pdeck
[
2
].
side
)
if
(
cit
->
second
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
))
extra_cards
.
push_back
(
cit
);
last_replay
.
WriteInt32
(
extra_cards
.
size
(),
false
);
for
(
int32
i
=
(
int32
)
extra_cards
.
size
()
-
1
;
i
>=
0
;
--
i
)
{
new_tag_card
(
pduel
,
extra_cards
[
i
]
->
first
,
1
,
LOCATION_EXTRA
);
last_replay
.
WriteInt32
(
extra_cards
[
i
]
->
first
,
false
);
}
}
last_replay
.
Flush
();
last_replay
.
Flush
();
unsigned
char
startbuf
[
32
];
unsigned
char
startbuf
[
32
];
...
...
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