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
1ff39351
Commit
1ff39351
authored
Oct 19, 2024
by
Chen Bill
Committed by
GitHub
Oct 19, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DuelMode change: fix the declaration of Analyze (#2609)
parent
cc9497b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
56 deletions
+55
-56
gframe/network.h
gframe/network.h
+19
-20
gframe/single_duel.h
gframe/single_duel.h
+18
-18
gframe/tag_duel.h
gframe/tag_duel.h
+18
-18
No files found.
gframe/network.h
View file @
1ff39351
...
...
@@ -208,26 +208,25 @@ inline unsigned int GetPosition(unsigned char* qbuf, int offset) {
class
DuelMode
{
public:
virtual
~
DuelMode
()
{}
virtual
void
Chat
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
int
len
)
{}
virtual
void
JoinGame
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
bool
is_creater
)
{}
virtual
void
LeaveGame
(
DuelPlayer
*
dp
)
{}
virtual
void
ToDuelist
(
DuelPlayer
*
dp
)
{}
virtual
void
ToObserver
(
DuelPlayer
*
dp
)
{}
virtual
void
PlayerReady
(
DuelPlayer
*
dp
,
bool
is_ready
)
{}
virtual
void
PlayerKick
(
DuelPlayer
*
dp
,
unsigned
char
pos
)
{}
virtual
void
UpdateDeck
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
int
len
)
{}
virtual
void
StartDuel
(
DuelPlayer
*
dp
)
{}
virtual
void
HandResult
(
DuelPlayer
*
dp
,
unsigned
char
res
)
{}
virtual
void
TPResult
(
DuelPlayer
*
dp
,
unsigned
char
tp
)
{}
virtual
void
Process
()
{}
virtual
int
Analyze
(
char
*
msgbuffer
,
unsigned
int
len
)
{
return
0
;
}
virtual
void
Surrender
(
DuelPlayer
*
dp
)
{}
virtual
void
GetResponse
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
unsigned
int
len
)
{}
virtual
void
TimeConfirm
(
DuelPlayer
*
dp
)
{}
virtual
void
EndDuel
()
{}
DuelMode
()
=
default
;
virtual
~
DuelMode
()
=
default
;
virtual
void
Chat
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
int
len
)
=
0
;
virtual
void
JoinGame
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
bool
is_creater
)
=
0
;
virtual
void
LeaveGame
(
DuelPlayer
*
dp
)
=
0
;
virtual
void
ToDuelist
(
DuelPlayer
*
dp
)
=
0
;
virtual
void
ToObserver
(
DuelPlayer
*
dp
)
=
0
;
virtual
void
PlayerReady
(
DuelPlayer
*
dp
,
bool
is_ready
)
=
0
;
virtual
void
PlayerKick
(
DuelPlayer
*
dp
,
unsigned
char
pos
)
=
0
;
virtual
void
UpdateDeck
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
int
len
)
=
0
;
virtual
void
StartDuel
(
DuelPlayer
*
dp
)
=
0
;
virtual
void
HandResult
(
DuelPlayer
*
dp
,
unsigned
char
res
)
=
0
;
virtual
void
TPResult
(
DuelPlayer
*
dp
,
unsigned
char
tp
)
=
0
;
virtual
void
Process
()
=
0
;
virtual
int
Analyze
(
unsigned
char
*
msgbuffer
,
unsigned
int
len
)
=
0
;
virtual
void
Surrender
(
DuelPlayer
*
dp
)
=
0
;
virtual
void
GetResponse
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
unsigned
int
len
)
=
0
;
virtual
void
TimeConfirm
(
DuelPlayer
*
dp
)
=
0
;
virtual
void
EndDuel
()
=
0
;
public:
event
*
etimer
{
nullptr
};
...
...
gframe/single_duel.h
View file @
1ff39351
...
...
@@ -10,24 +10,24 @@ namespace ygo {
class
SingleDuel
:
public
DuelMode
{
public:
SingleDuel
(
bool
is_match
);
virtual
~
SingleDuel
()
;
v
irtual
void
Chat
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
int
len
)
;
v
irtual
void
JoinGame
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
bool
is_creater
)
;
v
irtual
void
LeaveGame
(
DuelPlayer
*
dp
)
;
v
irtual
void
ToDuelist
(
DuelPlayer
*
dp
)
;
v
irtual
void
ToObserver
(
DuelPlayer
*
dp
)
;
v
irtual
void
PlayerReady
(
DuelPlayer
*
dp
,
bool
ready
)
;
v
irtual
void
PlayerKick
(
DuelPlayer
*
dp
,
unsigned
char
pos
)
;
v
irtual
void
UpdateDeck
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
int
len
)
;
v
irtual
void
StartDuel
(
DuelPlayer
*
dp
)
;
v
irtual
void
HandResult
(
DuelPlayer
*
dp
,
unsigned
char
res
)
;
v
irtual
void
TPResult
(
DuelPlayer
*
dp
,
unsigned
char
tp
)
;
v
irtual
void
Process
()
;
v
irtual
void
Surrender
(
DuelPlayer
*
dp
)
;
virtual
int
Analyze
(
unsigned
char
*
msgbuffer
,
unsigned
int
len
)
;
v
irtual
void
GetResponse
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
unsigned
int
len
)
;
v
irtual
void
TimeConfirm
(
DuelPlayer
*
dp
)
;
v
irtual
void
EndDuel
()
;
~
SingleDuel
()
override
;
v
oid
Chat
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
int
len
)
override
;
v
oid
JoinGame
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
bool
is_creater
)
override
;
v
oid
LeaveGame
(
DuelPlayer
*
dp
)
override
;
v
oid
ToDuelist
(
DuelPlayer
*
dp
)
override
;
v
oid
ToObserver
(
DuelPlayer
*
dp
)
override
;
v
oid
PlayerReady
(
DuelPlayer
*
dp
,
bool
ready
)
override
;
v
oid
PlayerKick
(
DuelPlayer
*
dp
,
unsigned
char
pos
)
override
;
v
oid
UpdateDeck
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
int
len
)
override
;
v
oid
StartDuel
(
DuelPlayer
*
dp
)
override
;
v
oid
HandResult
(
DuelPlayer
*
dp
,
unsigned
char
res
)
override
;
v
oid
TPResult
(
DuelPlayer
*
dp
,
unsigned
char
tp
)
override
;
v
oid
Process
()
override
;
v
oid
Surrender
(
DuelPlayer
*
dp
)
override
;
int
Analyze
(
unsigned
char
*
msgbuffer
,
unsigned
int
len
)
override
;
v
oid
GetResponse
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
unsigned
int
len
)
override
;
v
oid
TimeConfirm
(
DuelPlayer
*
dp
)
override
;
v
oid
EndDuel
()
override
;
void
DuelEndProc
();
void
WaitforResponse
(
int
playerid
);
...
...
gframe/tag_duel.h
View file @
1ff39351
...
...
@@ -10,24 +10,24 @@ namespace ygo {
class
TagDuel
:
public
DuelMode
{
public:
TagDuel
();
virtual
~
TagDuel
()
;
v
irtual
void
Chat
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
int
len
)
;
v
irtual
void
JoinGame
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
bool
is_creater
)
;
v
irtual
void
LeaveGame
(
DuelPlayer
*
dp
)
;
v
irtual
void
ToDuelist
(
DuelPlayer
*
dp
)
;
v
irtual
void
ToObserver
(
DuelPlayer
*
dp
)
;
v
irtual
void
PlayerReady
(
DuelPlayer
*
dp
,
bool
ready
)
;
v
irtual
void
PlayerKick
(
DuelPlayer
*
dp
,
unsigned
char
pos
)
;
v
irtual
void
UpdateDeck
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
int
len
)
;
v
irtual
void
StartDuel
(
DuelPlayer
*
dp
)
;
v
irtual
void
HandResult
(
DuelPlayer
*
dp
,
unsigned
char
res
)
;
v
irtual
void
TPResult
(
DuelPlayer
*
dp
,
unsigned
char
tp
)
;
v
irtual
void
Process
()
;
v
irtual
void
Surrender
(
DuelPlayer
*
dp
)
;
virtual
int
Analyze
(
unsigned
char
*
msgbuffer
,
unsigned
int
len
)
;
v
irtual
void
GetResponse
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
unsigned
int
len
)
;
v
irtual
void
TimeConfirm
(
DuelPlayer
*
dp
)
;
v
irtual
void
EndDuel
()
;
~
TagDuel
()
override
;
v
oid
Chat
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
int
len
)
override
;
v
oid
JoinGame
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
bool
is_creater
)
override
;
v
oid
LeaveGame
(
DuelPlayer
*
dp
)
override
;
v
oid
ToDuelist
(
DuelPlayer
*
dp
)
override
;
v
oid
ToObserver
(
DuelPlayer
*
dp
)
override
;
v
oid
PlayerReady
(
DuelPlayer
*
dp
,
bool
ready
)
override
;
v
oid
PlayerKick
(
DuelPlayer
*
dp
,
unsigned
char
pos
)
override
;
v
oid
UpdateDeck
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
int
len
)
override
;
v
oid
StartDuel
(
DuelPlayer
*
dp
)
override
;
v
oid
HandResult
(
DuelPlayer
*
dp
,
unsigned
char
res
)
override
;
v
oid
TPResult
(
DuelPlayer
*
dp
,
unsigned
char
tp
)
override
;
v
oid
Process
()
override
;
v
oid
Surrender
(
DuelPlayer
*
dp
)
override
;
int
Analyze
(
unsigned
char
*
msgbuffer
,
unsigned
int
len
)
override
;
v
oid
GetResponse
(
DuelPlayer
*
dp
,
unsigned
char
*
pdata
,
unsigned
int
len
)
override
;
v
oid
TimeConfirm
(
DuelPlayer
*
dp
)
override
;
v
oid
EndDuel
()
override
;
void
DuelEndProc
();
void
WaitforResponse
(
int
playerid
);
...
...
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