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
nanahira
ygopro
Commits
e94a2e03
Commit
e94a2e03
authored
Dec 16, 2023
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update class SingleMode, ReplayMode
parent
36e4dfe5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
32 deletions
+32
-32
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+14
-14
gframe/replay_mode.h
gframe/replay_mode.h
+2
-2
gframe/single_mode.cpp
gframe/single_mode.cpp
+14
-14
gframe/single_mode.h
gframe/single_mode.h
+2
-2
No files found.
gframe/replay_mode.cpp
View file @
e94a2e03
...
...
@@ -873,15 +873,10 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
}
return
true
;
}
void
ReplayMode
::
ReloadLocation
(
int
player
,
int
location
,
int
flag
,
std
::
vector
<
unsigned
char
>&
queryBuffer
)
{
inline
void
ReplayMode
::
ReloadLocation
(
int
player
,
int
location
,
int
flag
,
std
::
vector
<
unsigned
char
>&
queryBuffer
)
{
query_field_card
(
pduel
,
player
,
location
,
flag
,
queryBuffer
.
data
(),
0
);
mainGame
->
dField
.
UpdateFieldCard
(
mainGame
->
LocalPlayer
(
player
),
location
,
queryBuffer
.
data
());
}
void
ReplayMode
::
RefreshLocation
(
int
player
,
int
location
,
int
flag
)
{
std
::
vector
<
unsigned
char
>
queryBuffer
;
queryBuffer
.
resize
(
SIZE_QUERY_BUFFER
);
ReloadLocation
(
player
,
location
,
flag
,
queryBuffer
);
}
void
ReplayMode
::
ReplayRefresh
(
int
flag
)
{
std
::
vector
<
byte
>
queryBuffer
;
queryBuffer
.
resize
(
SIZE_QUERY_BUFFER
);
...
...
@@ -892,17 +887,22 @@ void ReplayMode::ReplayRefresh(int flag) {
ReloadLocation
(
0
,
LOCATION_HAND
,
flag
,
queryBuffer
);
ReloadLocation
(
1
,
LOCATION_HAND
,
flag
,
queryBuffer
);
}
void
ReplayMode
::
ReplayRefreshHand
(
int
player
,
int
flag
)
{
RefreshLocation
(
player
,
LOCATION_HAND
,
flag
);
void
ReplayMode
::
ReplayRefreshLocation
(
int
player
,
int
location
,
int
flag
)
{
std
::
vector
<
unsigned
char
>
queryBuffer
;
queryBuffer
.
resize
(
SIZE_QUERY_BUFFER
);
ReloadLocation
(
player
,
location
,
flag
,
queryBuffer
);
}
inline
void
ReplayMode
::
ReplayRefreshHand
(
int
player
,
int
flag
)
{
ReplayRefreshLocation
(
player
,
LOCATION_HAND
,
flag
);
}
void
ReplayMode
::
ReplayRefreshGrave
(
int
player
,
int
flag
)
{
RefreshLocation
(
player
,
LOCATION_GRAVE
,
flag
);
inline
void
ReplayMode
::
ReplayRefreshGrave
(
int
player
,
int
flag
)
{
Re
playRe
freshLocation
(
player
,
LOCATION_GRAVE
,
flag
);
}
void
ReplayMode
::
ReplayRefreshDeck
(
int
player
,
int
flag
)
{
RefreshLocation
(
player
,
LOCATION_DECK
,
flag
);
inline
void
ReplayMode
::
ReplayRefreshDeck
(
int
player
,
int
flag
)
{
Re
playRe
freshLocation
(
player
,
LOCATION_DECK
,
flag
);
}
void
ReplayMode
::
ReplayRefreshExtra
(
int
player
,
int
flag
)
{
RefreshLocation
(
player
,
LOCATION_EXTRA
,
flag
);
inline
void
ReplayMode
::
ReplayRefreshExtra
(
int
player
,
int
flag
)
{
Re
playRe
freshLocation
(
player
,
LOCATION_EXTRA
,
flag
);
}
void
ReplayMode
::
ReplayRefreshSingle
(
int
player
,
int
location
,
int
sequence
,
int
flag
)
{
unsigned
char
queryBuffer
[
0x1000
];
...
...
gframe/replay_mode.h
View file @
e94a2e03
...
...
@@ -20,6 +20,7 @@ private:
static
int
skip_turn
;
static
int
current_step
;
static
int
skip_step
;
static
void
ReloadLocation
(
int
player
,
int
location
,
int
flag
,
std
::
vector
<
unsigned
char
>&
queryBuffer
);
public:
static
Replay
cur_replay
;
...
...
@@ -37,9 +38,8 @@ public:
static
void
Undo
();
static
bool
ReplayAnalyze
(
unsigned
char
*
msg
,
unsigned
int
len
);
inline
static
void
ReloadLocation
(
int
player
,
int
location
,
int
flag
,
std
::
vector
<
unsigned
char
>&
queryBuffer
);
inline
static
void
RefreshLocation
(
int
player
,
int
location
,
int
flag
);
static
void
ReplayRefresh
(
int
flag
=
0xf81fff
);
static
void
ReplayRefreshLocation
(
int
player
,
int
location
,
int
flag
);
static
void
ReplayRefreshHand
(
int
player
,
int
flag
=
0x781fff
);
static
void
ReplayRefreshGrave
(
int
player
,
int
flag
=
0x181fff
);
static
void
ReplayRefreshDeck
(
int
player
,
int
flag
=
0x181fff
);
...
...
gframe/single_mode.cpp
View file @
e94a2e03
...
...
@@ -774,15 +774,10 @@ bool SingleMode::SinglePlayAnalyze(unsigned char* msg, unsigned int len) {
}
return
is_continuing
;
}
void
SingleMode
::
ReloadLocation
(
int
player
,
int
location
,
int
flag
,
std
::
vector
<
unsigned
char
>&
queryBuffer
)
{
inline
void
SingleMode
::
ReloadLocation
(
int
player
,
int
location
,
int
flag
,
std
::
vector
<
unsigned
char
>&
queryBuffer
)
{
query_field_card
(
pduel
,
player
,
location
,
flag
,
queryBuffer
.
data
(),
0
);
mainGame
->
dField
.
UpdateFieldCard
(
mainGame
->
LocalPlayer
(
player
),
location
,
queryBuffer
.
data
());
}
void
SingleMode
::
RefreshLocation
(
int
player
,
int
location
,
int
flag
)
{
std
::
vector
<
unsigned
char
>
queryBuffer
;
queryBuffer
.
resize
(
SIZE_QUERY_BUFFER
);
ReloadLocation
(
player
,
location
,
flag
,
queryBuffer
);
}
void
SingleMode
::
SinglePlayRefresh
(
int
flag
)
{
std
::
vector
<
unsigned
char
>
queryBuffer
;
queryBuffer
.
resize
(
SIZE_QUERY_BUFFER
);
...
...
@@ -793,17 +788,22 @@ void SingleMode::SinglePlayRefresh(int flag) {
ReloadLocation
(
0
,
LOCATION_HAND
,
flag
,
queryBuffer
);
ReloadLocation
(
1
,
LOCATION_HAND
,
flag
,
queryBuffer
);
}
void
SingleMode
::
SinglePlayRefreshHand
(
int
player
,
int
flag
)
{
RefreshLocation
(
player
,
LOCATION_HAND
,
flag
);
void
SingleMode
::
SingleRefreshLocation
(
int
player
,
int
location
,
int
flag
)
{
std
::
vector
<
unsigned
char
>
queryBuffer
;
queryBuffer
.
resize
(
SIZE_QUERY_BUFFER
);
ReloadLocation
(
player
,
location
,
flag
,
queryBuffer
);
}
inline
void
SingleMode
::
SinglePlayRefreshHand
(
int
player
,
int
flag
)
{
SingleRefreshLocation
(
player
,
LOCATION_HAND
,
flag
);
}
void
SingleMode
::
SinglePlayRefreshGrave
(
int
player
,
int
flag
)
{
RefreshLocation
(
player
,
LOCATION_GRAVE
,
flag
);
inline
void
SingleMode
::
SinglePlayRefreshGrave
(
int
player
,
int
flag
)
{
Single
RefreshLocation
(
player
,
LOCATION_GRAVE
,
flag
);
}
void
SingleMode
::
SinglePlayRefreshDeck
(
int
player
,
int
flag
)
{
RefreshLocation
(
player
,
LOCATION_DECK
,
flag
);
inline
void
SingleMode
::
SinglePlayRefreshDeck
(
int
player
,
int
flag
)
{
Single
RefreshLocation
(
player
,
LOCATION_DECK
,
flag
);
}
void
SingleMode
::
SinglePlayRefreshExtra
(
int
player
,
int
flag
)
{
RefreshLocation
(
player
,
LOCATION_EXTRA
,
flag
);
inline
void
SingleMode
::
SinglePlayRefreshExtra
(
int
player
,
int
flag
)
{
Single
RefreshLocation
(
player
,
LOCATION_EXTRA
,
flag
);
}
void
SingleMode
::
SinglePlayRefreshSingle
(
int
player
,
int
location
,
int
sequence
,
int
flag
)
{
unsigned
char
queryBuffer
[
0x1000
];
...
...
gframe/single_mode.h
View file @
e94a2e03
...
...
@@ -12,6 +12,7 @@ private:
static
intptr_t
pduel
;
static
bool
is_closing
;
static
bool
is_continuing
;
static
void
ReloadLocation
(
int
player
,
int
location
,
int
flag
,
std
::
vector
<
unsigned
char
>&
queryBuffer
);
public:
static
bool
StartPlay
();
...
...
@@ -20,9 +21,8 @@ public:
static
int
SinglePlayThread
();
static
bool
SinglePlayAnalyze
(
unsigned
char
*
msg
,
unsigned
int
len
);
inline
static
void
ReloadLocation
(
int
player
,
int
location
,
int
flag
,
std
::
vector
<
unsigned
char
>&
queryBuffer
);
inline
static
void
RefreshLocation
(
int
player
,
int
location
,
int
flag
);
static
void
SinglePlayRefresh
(
int
flag
=
0xf81fff
);
static
void
SingleRefreshLocation
(
int
player
,
int
location
,
int
flag
);
static
void
SinglePlayRefreshHand
(
int
player
,
int
flag
=
0x781fff
);
static
void
SinglePlayRefreshGrave
(
int
player
,
int
flag
=
0x181fff
);
static
void
SinglePlayRefreshDeck
(
int
player
,
int
flag
=
0x181fff
);
...
...
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