Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
db0d3ee7
Commit
db0d3ee7
authored
May 09, 2019
by
mercury233
Committed by
nanahira
May 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update adding log (#2194)
parent
8494f1b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
30 deletions
+23
-30
gframe/duelclient.cpp
gframe/duelclient.cpp
+15
-30
gframe/game.cpp
gframe/game.cpp
+7
-0
gframe/game.h
gframe/game.h
+1
-0
No files found.
gframe/duelclient.cpp
View file @
db0d3ee7
...
...
@@ -939,8 +939,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
case
HINT_OPSELECTED
:
{
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1510
),
dataManager
.
GetDesc
(
data
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
...
...
@@ -957,8 +956,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
case
HINT_RACE
:
{
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
FormatRace
(
data
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
...
...
@@ -968,8 +966,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
case
HINT_ATTRIB
:
{
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
FormatAttribute
(
data
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
...
...
@@ -979,8 +976,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
case
HINT_CODE
:
{
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
GetName
(
data
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
data
);
mainGame
->
AddLog
(
textBuffer
,
data
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
...
...
@@ -990,8 +986,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
case
HINT_NUMBER
:
{
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1512
),
data
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
...
...
@@ -1871,14 +1866,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return
true
;
soundManager
.
PlaySoundEffect
(
SOUND_REVEAL
);
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
207
),
count
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
AddLog
(
textBuffer
);
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
pcard
=
*
(
mainGame
->
dField
.
deck
[
player
].
rbegin
()
+
i
);
mainGame
->
gMutex
.
Lock
();
myswprintf
(
textBuffer
,
L"*[%ls]"
,
dataManager
.
GetName
(
pcard
->
code
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
pcard
->
code
);
mainGame
->
AddLog
(
textBuffer
,
pcard
->
code
);
mainGame
->
gMutex
.
Unlock
();
float
shift
=
-
0.15
f
;
if
(
player
==
1
)
shift
=
0.15
f
;
...
...
@@ -1911,14 +1904,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return
true
;
soundManager
.
PlaySoundEffect
(
SOUND_REVEAL
);
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
207
),
count
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
AddLog
(
textBuffer
);
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
pcard
=
*
(
mainGame
->
dField
.
extra
[
player
].
rbegin
()
+
i
+
mainGame
->
dField
.
extra_p_count
[
player
]);
mainGame
->
gMutex
.
Lock
();
myswprintf
(
textBuffer
,
L"*[%ls]"
,
dataManager
.
GetName
(
pcard
->
code
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
pcard
->
code
);
mainGame
->
AddLog
(
textBuffer
,
pcard
->
code
);
mainGame
->
gMutex
.
Unlock
();
if
(
player
==
0
)
pcard
->
dPos
=
irr
::
core
::
vector3df
(
0
,
-
0.20
f
,
0
);
...
...
@@ -1946,8 +1937,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
soundManager
.
PlaySoundEffect
(
SOUND_REVEAL
);
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
208
),
count
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
AddLog
(
textBuffer
);
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
code
=
BufferIO
::
ReadInt32
(
pbuf
);
c
=
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
...
...
@@ -1958,8 +1948,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
->
SetCode
(
code
);
mainGame
->
gMutex
.
Lock
();
myswprintf
(
textBuffer
,
L"*[%ls]"
,
dataManager
.
GetName
(
code
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
code
);
mainGame
->
AddLog
(
textBuffer
,
code
);
mainGame
->
gMutex
.
Unlock
();
if
(
l
&
0x41
)
{
if
(
count
==
1
)
{
...
...
@@ -2890,8 +2879,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
else
mainGame
->
WaitFrameSignal
(
30
);
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1610
),
dataManager
.
GetName
(
pcard
->
code
),
dataManager
.
FormatLocation
(
l
,
s
),
s
+
1
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
pcard
->
code
);
mainGame
->
AddLog
(
textBuffer
,
pcard
->
code
);
pcard
->
is_highlighting
=
false
;
}
return
true
;
...
...
@@ -3294,8 +3282,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
BufferIO
::
ReadInt32
(
pbuf
);
unsigned
int
code
=
(
unsigned
int
)
BufferIO
::
ReadInt32
(
pbuf
);
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1622
),
dataManager
.
GetName
(
code
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
code
);
mainGame
->
AddLog
(
textBuffer
,
code
);
return
true
;
}
case
MSG_TOSS_COIN
:
{
...
...
@@ -3314,8 +3301,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return
true
;
soundManager
.
PlaySoundEffect
(
SOUND_COIN
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
stACMessage
->
setText
(
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
gMutex
.
Unlock
();
...
...
@@ -3338,8 +3324,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return
true
;
soundManager
.
PlaySoundEffect
(
SOUND_DICE
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
stACMessage
->
setText
(
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
gMutex
.
Unlock
();
...
...
gframe/game.cpp
View file @
db0d3ee7
...
...
@@ -1364,6 +1364,13 @@ void Game::ClearCardInfo(int player) {
stText
->
setText
(
L""
);
scrCardText
->
setVisible
(
false
);
}
void
Game
::
AddLog
(
const
wchar_t
*
msg
,
int
param
)
{
logParam
.
push_back
(
param
);
lstLog
->
addItem
(
msg
);
if
(
!
env
->
hasFocus
(
lstLog
))
{
lstLog
->
setSelected
(
-
1
);
}
}
void
Game
::
AddChatMsg
(
const
wchar_t
*
msg
,
int
player
)
{
for
(
int
i
=
7
;
i
>
0
;
--
i
)
{
chatMsg
[
i
]
=
chatMsg
[
i
-
1
];
...
...
gframe/game.h
View file @
db0d3ee7
...
...
@@ -140,6 +140,7 @@ public:
void
SaveConfig
();
void
ShowCardInfo
(
int
code
,
bool
resize
=
false
);
void
ClearCardInfo
(
int
player
=
0
);
void
AddLog
(
const
wchar_t
*
msg
,
int
param
=
0
);
void
AddChatMsg
(
const
wchar_t
*
msg
,
int
player
);
void
ClearChatMsg
();
void
AddDebugMsg
(
const
char
*
msgbuf
);
...
...
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