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
wind2009
ygopro
Commits
13c2d7a9
Commit
13c2d7a9
authored
May 04, 2024
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix after change side chat reverse
parent
3d8c3621
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
3 deletions
+15
-3
gframe/duelclient.cpp
gframe/duelclient.cpp
+7
-2
gframe/event_handler.cpp
gframe/event_handler.cpp
+1
-0
gframe/game.cpp
gframe/game.cpp
+1
-0
gframe/game.h
gframe/game.h
+2
-1
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+3
-0
gframe/single_mode.cpp
gframe/single_mode.cpp
+1
-0
No files found.
gframe/duelclient.cpp
View file @
13c2d7a9
...
...
@@ -210,6 +210,7 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) {
mainGame
->
closeDoneSignal
.
Wait
();
mainGame
->
gMutex
.
lock
();
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isInDuel
=
false
;
mainGame
->
dInfo
.
isFinished
=
false
;
mainGame
->
is_building
=
false
;
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
menuHandler
);
...
...
@@ -371,6 +372,7 @@ void DuelClient::HandleSTOCPacketLan(unsigned char* data, unsigned int len) {
case
STOC_CHANGE_SIDE
:
{
mainGame
->
gMutex
.
lock
();
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isInDuel
=
false
;
mainGame
->
dField
.
Clear
();
mainGame
->
is_building
=
true
;
mainGame
->
is_siding
=
true
;
...
...
@@ -663,6 +665,7 @@ void DuelClient::HandleSTOCPacketLan(unsigned char* data, unsigned int len) {
mainGame
->
closeDoneSignal
.
Wait
();
mainGame
->
gMutex
.
lock
();
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isInDuel
=
false
;
mainGame
->
dInfo
.
isFinished
=
true
;
mainGame
->
is_building
=
false
;
mainGame
->
wDeckEdit
->
setVisible
(
false
);
...
...
@@ -745,10 +748,10 @@ void DuelClient::HandleSTOCPacketLan(unsigned char* data, unsigned int len) {
if
(
mainGame
->
chkIgnore1
->
isChecked
())
break
;
if
(
!
mainGame
->
dInfo
.
isTag
)
{
if
(
mainGame
->
dInfo
.
is
Started
)
if
(
mainGame
->
dInfo
.
is
InDuel
)
player
=
mainGame
->
LocalPlayer
(
player
);
}
else
{
if
(
mainGame
->
dInfo
.
is
Started
&&
!
mainGame
->
dInfo
.
isFirst
)
if
(
mainGame
->
dInfo
.
is
InDuel
&&
!
mainGame
->
dInfo
.
isFirst
)
player
^=
2
;
if
(
player
==
0
)
player
=
0
;
...
...
@@ -984,6 +987,7 @@ int DuelClient::ClientAnalyze(unsigned char* msg, unsigned int len) {
mainGame
->
closeDoneSignal
.
Wait
();
mainGame
->
gMutex
.
lock
();
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isInDuel
=
false
;
mainGame
->
dInfo
.
isFinished
=
false
;
mainGame
->
btnCreateHost
->
setEnabled
(
true
);
mainGame
->
btnJoinHost
->
setEnabled
(
true
);
...
...
@@ -1190,6 +1194,7 @@ int DuelClient::ClientAnalyze(unsigned char* msg, unsigned int len) {
mainGame
->
showcard
=
0
;
mainGame
->
gMutex
.
lock
();
mainGame
->
dField
.
Clear
();
mainGame
->
dInfo
.
isInDuel
=
true
;
int
playertype
=
BufferIO
::
ReadUInt8
(
pbuf
);
mainGame
->
dInfo
.
isFirst
=
(
playertype
&
0xf
)
?
false
:
true
;
if
(
playertype
&
0xf0
)
...
...
gframe/event_handler.cpp
View file @
13c2d7a9
...
...
@@ -127,6 +127,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if
(
mainGame
->
dInfo
.
player_type
==
7
)
{
DuelClient
::
StopClient
();
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isInDuel
=
false
;
mainGame
->
dInfo
.
isFinished
=
false
;
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
menuHandler
);
mainGame
->
CloseDuelWindow
();
...
...
gframe/game.cpp
View file @
13c2d7a9
...
...
@@ -18,6 +18,7 @@ Game* mainGame;
void
DuelInfo
::
Clear
()
{
isStarted
=
false
;
isInDuel
=
false
;
isFinished
=
false
;
isReplay
=
false
;
isReplaySkiping
=
false
;
...
...
gframe/game.h
View file @
13c2d7a9
...
...
@@ -69,7 +69,8 @@ struct Config {
struct
DuelInfo
{
bool
isStarted
{
false
};
bool
isFinished
{
false
};
bool
isInDuel
{
false
};
bool
isFinished
{
false
};
bool
isReplay
{
false
};
bool
isReplaySkiping
{
false
};
bool
isFirst
{
false
};
...
...
gframe/replay_mode.cpp
View file @
13c2d7a9
...
...
@@ -254,6 +254,7 @@ void ReplayMode::EndDuel() {
mainGame
->
actionSignal
.
Wait
();
mainGame
->
gMutex
.
lock
();
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isInDuel
=
false
;
mainGame
->
dInfo
.
isFinished
=
true
;
mainGame
->
dInfo
.
isReplay
=
false
;
mainGame
->
dInfo
.
isSingleMode
=
false
;
...
...
@@ -272,7 +273,9 @@ void ReplayMode::EndDuel() {
}
void
ReplayMode
::
Restart
(
bool
refresh
)
{
end_duel
(
pduel
);
mainGame
->
dInfo
.
isInDuel
=
false
;
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isInDuel
=
false
;
mainGame
->
dInfo
.
isFinished
=
true
;
mainGame
->
dField
.
Clear
();
//mainGame->device->setEventReceiver(&mainGame->dField);
...
...
gframe/single_mode.cpp
View file @
13c2d7a9
...
...
@@ -159,6 +159,7 @@ int SingleMode::SinglePlayThread() {
if
(
!
is_closing
)
{
mainGame
->
gMutex
.
lock
();
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isInDuel
=
false
;
mainGame
->
dInfo
.
isFinished
=
true
;
mainGame
->
dInfo
.
isSingleMode
=
false
;
mainGame
->
gMutex
.
unlock
();
...
...
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