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
REIKAI
ygopro
Commits
6dd9a52f
Commit
6dd9a52f
authored
Nov 27, 2017
by
edo9300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lua64 bit replay mode
parent
b8e1d14d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
14 deletions
+16
-14
gframe/replay.h
gframe/replay.h
+1
-0
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+12
-11
gframe/single_duel.cpp
gframe/single_duel.cpp
+1
-1
gframe/single_mode.cpp
gframe/single_mode.cpp
+1
-1
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-1
No files found.
gframe/replay.h
View file @
6dd9a52f
...
@@ -10,6 +10,7 @@ namespace ygo {
...
@@ -10,6 +10,7 @@ namespace ygo {
#define REPLAY_TAG 0x2
#define REPLAY_TAG 0x2
#define REPLAY_DECODED 0x4
#define REPLAY_DECODED 0x4
#define REPLAY_SINGLE_MODE 0x8
#define REPLAY_SINGLE_MODE 0x8
#define REPLAY_LUA64 0x10
struct
ReplayHeader
{
struct
ReplayHeader
{
unsigned
int
id
;
unsigned
int
id
;
...
...
gframe/replay_mode.cpp
View file @
6dd9a52f
...
@@ -87,6 +87,7 @@ int ReplayMode::ReplayThread(void* param) {
...
@@ -87,6 +87,7 @@ int ReplayMode::ReplayThread(void* param) {
set_message_handler
((
message_handler
)
MessageHandler
);
set_message_handler
((
message_handler
)
MessageHandler
);
mainGame
->
dInfo
.
isSingleMode
=
false
;
mainGame
->
dInfo
.
isSingleMode
=
false
;
}
}
mainGame
->
dInfo
.
lua64
=
(
rh
.
flag
&
REPLAY_LUA64
)
?
1
:
0
;
pduel
=
create_duel
(
rnd
.
rand
());
pduel
=
create_duel
(
rnd
.
rand
());
int
start_lp
=
cur_replay
.
ReadInt32
();
int
start_lp
=
cur_replay
.
ReadInt32
();
int
start_hand
=
cur_replay
.
ReadInt32
();
int
start_hand
=
cur_replay
.
ReadInt32
();
...
@@ -436,7 +437,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
...
@@ -436,7 +437,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
return
false
;
return
false
;
}
}
case
MSG_HINT
:
{
case
MSG_HINT
:
{
pbuf
+=
6
;
pbuf
+=
(
mainGame
->
dInfo
.
lua64
)
?
10
:
6
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
break
;
}
}
...
@@ -453,7 +454,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
...
@@ -453,7 +454,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
case
MSG_SELECT_BATTLECMD
:
{
case
MSG_SELECT_BATTLECMD
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
11
;
pbuf
+=
count
*
(
mainGame
->
dInfo
.
lua64
)
?
15
:
11
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
8
+
2
;
pbuf
+=
count
*
8
+
2
;
ReplayRefresh
();
ReplayRefresh
();
...
@@ -472,24 +473,24 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
...
@@ -472,24 +473,24 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
7
;
pbuf
+=
count
*
7
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
11
+
3
;
pbuf
+=
count
*
(
mainGame
->
dInfo
.
lua64
)
?
15
:
11
+
3
;
ReplayRefresh
();
ReplayRefresh
();
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_SELECT_EFFECTYN
:
{
case
MSG_SELECT_EFFECTYN
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
12
;
pbuf
+=
(
mainGame
->
dInfo
.
lua64
)
?
16
:
12
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_SELECT_YESNO
:
{
case
MSG_SELECT_YESNO
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
4
;
pbuf
+=
(
mainGame
->
dInfo
.
lua64
)
?
8
:
4
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_SELECT_OPTION
:
{
case
MSG_SELECT_OPTION
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
count
*
4
;
pbuf
+=
count
*
(
mainGame
->
dInfo
.
lua64
)
?
8
:
4
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_SELECT_CARD
:
case
MSG_SELECT_CARD
:
...
@@ -512,7 +513,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
...
@@ -512,7 +513,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
case
MSG_SELECT_CHAIN
:
{
case
MSG_SELECT_CHAIN
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
10
+
count
*
13
;
pbuf
+=
10
+
count
*
(
mainGame
->
dInfo
.
lua64
)
?
17
:
13
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_SELECT_PLACE
:
case
MSG_SELECT_PLACE
:
...
@@ -709,7 +710,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
...
@@ -709,7 +710,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
break
;
break
;
}
}
case
MSG_CHAINING
:
{
case
MSG_CHAINING
:
{
pbuf
+=
16
;
pbuf
+=
(
mainGame
->
dInfo
.
lua64
)
?
20
:
16
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
break
;
}
}
...
@@ -899,16 +900,16 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
...
@@ -899,16 +900,16 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
case
MSG_ANNOUNCE_CARD_FILTER
:
{
case
MSG_ANNOUNCE_CARD_FILTER
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
pbuf
+=
4
*
count
;
pbuf
+=
(
mainGame
->
dInfo
.
lua64
)
?
8
:
4
*
count
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_CARD_HINT
:
{
case
MSG_CARD_HINT
:
{
pbuf
+=
9
;
pbuf
+=
(
mainGame
->
dInfo
.
lua64
)
?
13
:
9
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
break
;
}
}
case
MSG_PLAYER_HINT
:
{
case
MSG_PLAYER_HINT
:
{
pbuf
+=
6
;
pbuf
+=
(
mainGame
->
dInfo
.
lua64
)
?
10
:
6
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
break
;
}
}
...
...
gframe/single_duel.cpp
View file @
6dd9a52f
...
@@ -393,7 +393,7 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
...
@@ -393,7 +393,7 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
ReplayHeader
rh
;
ReplayHeader
rh
;
rh
.
id
=
0x31707279
;
rh
.
id
=
0x31707279
;
rh
.
version
=
PRO_VERSION
;
rh
.
version
=
PRO_VERSION
;
rh
.
flag
=
0
;
rh
.
flag
=
REPLAY_LUA64
;
time_t
seed
=
time
(
0
);
time_t
seed
=
time
(
0
);
rh
.
seed
=
seed
;
rh
.
seed
=
seed
;
last_replay
.
BeginRecord
();
last_replay
.
BeginRecord
();
...
...
gframe/single_mode.cpp
View file @
6dd9a52f
...
@@ -81,7 +81,7 @@ int SingleMode::SinglePlayThread(void* param) {
...
@@ -81,7 +81,7 @@ int SingleMode::SinglePlayThread(void* param) {
ReplayHeader
rh
;
ReplayHeader
rh
;
rh
.
id
=
0x31707279
;
rh
.
id
=
0x31707279
;
rh
.
version
=
PRO_VERSION
;
rh
.
version
=
PRO_VERSION
;
rh
.
flag
=
REPLAY_SINGLE_MODE
;
rh
.
flag
=
REPLAY_SINGLE_MODE
+
REPLAY_LUA64
;
rh
.
seed
=
seed
;
rh
.
seed
=
seed
;
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
HideElement
(
mainGame
->
wSinglePlay
);
mainGame
->
HideElement
(
mainGame
->
wSinglePlay
);
...
...
gframe/tag_duel.cpp
View file @
6dd9a52f
...
@@ -352,7 +352,7 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
...
@@ -352,7 +352,7 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
ReplayHeader
rh
;
ReplayHeader
rh
;
rh
.
id
=
0x31707279
;
rh
.
id
=
0x31707279
;
rh
.
version
=
PRO_VERSION
;
rh
.
version
=
PRO_VERSION
;
rh
.
flag
=
REPLAY_TAG
;
rh
.
flag
=
REPLAY_TAG
+
REPLAY_LUA64
;
time_t
seed
=
time
(
0
);
time_t
seed
=
time
(
0
);
rh
.
seed
=
seed
;
rh
.
seed
=
seed
;
last_replay
.
BeginRecord
();
last_replay
.
BeginRecord
();
...
...
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