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
YGOPRO-520DIY
ygopro
Commits
eb9f6cb1
Commit
eb9f6cb1
authored
Oct 05, 2024
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update FormatAttribute, FormatRace
parent
6bdff452
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
13 deletions
+14
-13
gframe/drawing.cpp
gframe/drawing.cpp
+4
-3
gframe/duelclient.cpp
gframe/duelclient.cpp
+2
-2
gframe/event_handler.cpp
gframe/event_handler.cpp
+3
-3
gframe/game.cpp
gframe/game.cpp
+5
-5
No files found.
gframe/drawing.cpp
View file @
eb9f6cb1
...
@@ -1279,8 +1279,9 @@ void Game::DrawDeckBd() {
...
@@ -1279,8 +1279,9 @@ void Game::DrawDeckBd() {
DrawShadowText
(
textFont
,
textBuffer
,
Resize
(
860
,
165
+
i
*
66
,
955
,
185
+
i
*
66
),
Resize
(
1
,
1
,
0
,
0
));
DrawShadowText
(
textFont
,
textBuffer
,
Resize
(
860
,
165
+
i
*
66
,
955
,
185
+
i
*
66
),
Resize
(
1
,
1
,
0
,
0
));
if
(
!
(
ptr
->
second
.
type
&
TYPE_LINK
))
{
if
(
!
(
ptr
->
second
.
type
&
TYPE_LINK
))
{
const
wchar_t
*
form
=
L"\u2605"
;
const
wchar_t
*
form
=
L"\u2605"
;
if
(
ptr
->
second
.
type
&
TYPE_XYZ
)
form
=
L"\u2606"
;
if
(
ptr
->
second
.
type
&
TYPE_XYZ
)
myswprintf
(
textBuffer
,
L"%ls/%ls %ls%d"
,
dataManager
.
FormatAttribute
(
ptr
->
second
.
attribute
),
dataManager
.
FormatRace
(
ptr
->
second
.
race
),
form
,
ptr
->
second
.
level
);
form
=
L"\u2606"
;
myswprintf
(
textBuffer
,
L"%ls/%ls %ls%d"
,
dataManager
.
FormatAttribute
(
ptr
->
second
.
attribute
).
c_str
(),
dataManager
.
FormatRace
(
ptr
->
second
.
race
).
c_str
(),
form
,
ptr
->
second
.
level
);
DrawShadowText
(
textFont
,
textBuffer
,
Resize
(
860
,
187
+
i
*
66
,
955
,
207
+
i
*
66
),
Resize
(
1
,
1
,
0
,
0
));
DrawShadowText
(
textFont
,
textBuffer
,
Resize
(
860
,
187
+
i
*
66
,
955
,
207
+
i
*
66
),
Resize
(
1
,
1
,
0
,
0
));
if
(
ptr
->
second
.
attack
<
0
&&
ptr
->
second
.
defense
<
0
)
if
(
ptr
->
second
.
attack
<
0
&&
ptr
->
second
.
defense
<
0
)
myswprintf
(
textBuffer
,
L"?/?"
);
myswprintf
(
textBuffer
,
L"?/?"
);
...
@@ -1290,7 +1291,7 @@ void Game::DrawDeckBd() {
...
@@ -1290,7 +1291,7 @@ void Game::DrawDeckBd() {
myswprintf
(
textBuffer
,
L"%d/?"
,
ptr
->
second
.
attack
);
myswprintf
(
textBuffer
,
L"%d/?"
,
ptr
->
second
.
attack
);
else
myswprintf
(
textBuffer
,
L"%d/%d"
,
ptr
->
second
.
attack
,
ptr
->
second
.
defense
);
else
myswprintf
(
textBuffer
,
L"%d/%d"
,
ptr
->
second
.
attack
,
ptr
->
second
.
defense
);
}
else
{
}
else
{
myswprintf
(
textBuffer
,
L"%ls/%ls LINK-%d"
,
dataManager
.
FormatAttribute
(
ptr
->
second
.
attribute
)
,
dataManager
.
FormatRace
(
ptr
->
second
.
race
),
ptr
->
second
.
level
);
myswprintf
(
textBuffer
,
L"%ls/%ls LINK-%d"
,
dataManager
.
FormatAttribute
(
ptr
->
second
.
attribute
)
.
c_str
(),
dataManager
.
FormatRace
(
ptr
->
second
.
race
).
c_str
(
),
ptr
->
second
.
level
);
DrawShadowText
(
textFont
,
textBuffer
,
Resize
(
860
,
187
+
i
*
66
,
955
,
207
+
i
*
66
),
Resize
(
1
,
1
,
0
,
0
));
DrawShadowText
(
textFont
,
textBuffer
,
Resize
(
860
,
187
+
i
*
66
,
955
,
207
+
i
*
66
),
Resize
(
1
,
1
,
0
,
0
));
if
(
ptr
->
second
.
attack
<
0
)
if
(
ptr
->
second
.
attack
<
0
)
myswprintf
(
textBuffer
,
L"?/-"
);
myswprintf
(
textBuffer
,
L"?/-"
);
...
...
gframe/duelclient.cpp
View file @
eb9f6cb1
...
@@ -1104,7 +1104,7 @@ int DuelClient::ClientAnalyze(unsigned char* msg, unsigned int len) {
...
@@ -1104,7 +1104,7 @@ int DuelClient::ClientAnalyze(unsigned char* msg, unsigned int len) {
break
;
break
;
}
}
case
HINT_RACE
:
{
case
HINT_RACE
:
{
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
FormatRace
(
data
));
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
FormatRace
(
data
)
.
c_str
()
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
gMutex
.
lock
();
mainGame
->
gMutex
.
lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
...
@@ -1114,7 +1114,7 @@ int DuelClient::ClientAnalyze(unsigned char* msg, unsigned int len) {
...
@@ -1114,7 +1114,7 @@ int DuelClient::ClientAnalyze(unsigned char* msg, unsigned int len) {
break
;
break
;
}
}
case
HINT_ATTRIB
:
{
case
HINT_ATTRIB
:
{
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
FormatAttribute
(
data
));
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
FormatAttribute
(
data
)
.
c_str
()
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
gMutex
.
lock
();
mainGame
->
gMutex
.
lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
...
...
gframe/event_handler.cpp
View file @
eb9f6cb1
...
@@ -1600,7 +1600,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1600,7 +1600,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
myswprintf
(
formatBuffer
,
L"
\n
LINK-%d"
,
mcard
->
link
);
myswprintf
(
formatBuffer
,
L"
\n
LINK-%d"
,
mcard
->
link
);
str
.
append
(
formatBuffer
);
str
.
append
(
formatBuffer
);
}
}
myswprintf
(
formatBuffer
,
L" %ls/%ls"
,
dataManager
.
FormatRace
(
mcard
->
race
)
,
dataManager
.
FormatAttribute
(
mcard
->
attribute
));
myswprintf
(
formatBuffer
,
L" %ls/%ls"
,
dataManager
.
FormatRace
(
mcard
->
race
)
.
c_str
(),
dataManager
.
FormatAttribute
(
mcard
->
attribute
).
c_str
(
));
str
.
append
(
formatBuffer
);
str
.
append
(
formatBuffer
);
if
(
mcard
->
location
==
LOCATION_HAND
&&
(
mcard
->
type
&
TYPE_PENDULUM
))
{
if
(
mcard
->
location
==
LOCATION_HAND
&&
(
mcard
->
type
&
TYPE_PENDULUM
))
{
myswprintf
(
formatBuffer
,
L"
\n
%d/%d"
,
mcard
->
lscale
,
mcard
->
rscale
);
myswprintf
(
formatBuffer
,
L"
\n
%d/%d"
,
mcard
->
lscale
,
mcard
->
rscale
);
...
@@ -1626,9 +1626,9 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1626,9 +1626,9 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
else
if
(
mcard
->
cHint
==
CHINT_CARD
)
else
if
(
mcard
->
cHint
==
CHINT_CARD
)
myswprintf
(
formatBuffer
,
L"
\n
%ls%ls"
,
dataManager
.
GetSysString
(
212
),
dataManager
.
GetName
(
mcard
->
chValue
));
myswprintf
(
formatBuffer
,
L"
\n
%ls%ls"
,
dataManager
.
GetSysString
(
212
),
dataManager
.
GetName
(
mcard
->
chValue
));
else
if
(
mcard
->
cHint
==
CHINT_RACE
)
else
if
(
mcard
->
cHint
==
CHINT_RACE
)
myswprintf
(
formatBuffer
,
L"
\n
%ls%ls"
,
dataManager
.
GetSysString
(
213
),
dataManager
.
FormatRace
(
mcard
->
chValue
));
myswprintf
(
formatBuffer
,
L"
\n
%ls%ls"
,
dataManager
.
GetSysString
(
213
),
dataManager
.
FormatRace
(
mcard
->
chValue
)
.
c_str
()
);
else
if
(
mcard
->
cHint
==
CHINT_ATTRIBUTE
)
else
if
(
mcard
->
cHint
==
CHINT_ATTRIBUTE
)
myswprintf
(
formatBuffer
,
L"
\n
%ls%ls"
,
dataManager
.
GetSysString
(
214
),
dataManager
.
FormatAttribute
(
mcard
->
chValue
));
myswprintf
(
formatBuffer
,
L"
\n
%ls%ls"
,
dataManager
.
GetSysString
(
214
),
dataManager
.
FormatAttribute
(
mcard
->
chValue
)
.
c_str
()
);
else
if
(
mcard
->
cHint
==
CHINT_NUMBER
)
else
if
(
mcard
->
cHint
==
CHINT_NUMBER
)
myswprintf
(
formatBuffer
,
L"
\n
%ls%d"
,
dataManager
.
GetSysString
(
215
),
mcard
->
chValue
);
myswprintf
(
formatBuffer
,
L"
\n
%ls%d"
,
dataManager
.
GetSysString
(
215
),
mcard
->
chValue
);
str
.
append
(
formatBuffer
);
str
.
append
(
formatBuffer
);
...
...
gframe/game.cpp
View file @
eb9f6cb1
...
@@ -613,14 +613,14 @@ bool Game::Initialize() {
...
@@ -613,14 +613,14 @@ bool Game::Initialize() {
wANAttribute
->
setVisible
(
false
);
wANAttribute
->
setVisible
(
false
);
for
(
int
filter
=
0x1
,
i
=
0
;
i
<
7
;
filter
<<=
1
,
++
i
)
for
(
int
filter
=
0x1
,
i
=
0
;
i
<
7
;
filter
<<=
1
,
++
i
)
chkAttribute
[
i
]
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
10
+
(
i
%
4
)
*
80
,
25
+
(
i
/
4
)
*
25
,
90
+
(
i
%
4
)
*
80
,
50
+
(
i
/
4
)
*
25
),
chkAttribute
[
i
]
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
10
+
(
i
%
4
)
*
80
,
25
+
(
i
/
4
)
*
25
,
90
+
(
i
%
4
)
*
80
,
50
+
(
i
/
4
)
*
25
),
wANAttribute
,
CHECK_ATTRIBUTE
,
dataManager
.
FormatAttribute
(
filter
));
wANAttribute
,
CHECK_ATTRIBUTE
,
dataManager
.
FormatAttribute
(
filter
)
.
c_str
()
);
//announce race
//announce race
wANRace
=
env
->
addWindow
(
rect
<
s32
>
(
480
,
200
,
850
,
410
),
false
,
dataManager
.
GetSysString
(
563
));
wANRace
=
env
->
addWindow
(
rect
<
s32
>
(
480
,
200
,
850
,
410
),
false
,
dataManager
.
GetSysString
(
563
));
wANRace
->
getCloseButton
()
->
setVisible
(
false
);
wANRace
->
getCloseButton
()
->
setVisible
(
false
);
wANRace
->
setVisible
(
false
);
wANRace
->
setVisible
(
false
);
for
(
int
filter
=
0x1
,
i
=
0
;
i
<
RACES_COUNT
;
filter
<<=
1
,
++
i
)
for
(
int
filter
=
0x1
,
i
=
0
;
i
<
RACES_COUNT
;
filter
<<=
1
,
++
i
)
chkRace
[
i
]
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
10
+
(
i
%
4
)
*
90
,
25
+
(
i
/
4
)
*
25
,
100
+
(
i
%
4
)
*
90
,
50
+
(
i
/
4
)
*
25
),
chkRace
[
i
]
=
env
->
addCheckBox
(
false
,
rect
<
s32
>
(
10
+
(
i
%
4
)
*
90
,
25
+
(
i
/
4
)
*
25
,
100
+
(
i
%
4
)
*
90
,
50
+
(
i
/
4
)
*
25
),
wANRace
,
CHECK_RACE
,
dataManager
.
FormatRace
(
filter
));
wANRace
,
CHECK_RACE
,
dataManager
.
FormatRace
(
filter
)
.
c_str
()
);
//selection hint
//selection hint
stHintMsg
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
500
,
60
,
820
,
90
),
true
,
false
,
0
,
-
1
,
false
);
stHintMsg
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
500
,
60
,
820
,
90
),
true
,
false
,
0
,
-
1
,
false
);
stHintMsg
->
setBackgroundColor
(
0xc0ffffff
);
stHintMsg
->
setBackgroundColor
(
0xc0ffffff
);
...
@@ -750,13 +750,13 @@ bool Game::Initialize() {
...
@@ -750,13 +750,13 @@ bool Game::Initialize() {
cbAttribute
->
setMaxSelectionRows
(
10
);
cbAttribute
->
setMaxSelectionRows
(
10
);
cbAttribute
->
addItem
(
dataManager
.
GetSysString
(
1310
),
0
);
cbAttribute
->
addItem
(
dataManager
.
GetSysString
(
1310
),
0
);
for
(
int
filter
=
0x1
;
filter
!=
0x80
;
filter
<<=
1
)
for
(
int
filter
=
0x1
;
filter
!=
0x80
;
filter
<<=
1
)
cbAttribute
->
addItem
(
dataManager
.
FormatAttribute
(
filter
),
filter
);
cbAttribute
->
addItem
(
dataManager
.
FormatAttribute
(
filter
)
.
c_str
()
,
filter
);
stRace
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1321
),
rect
<
s32
>
(
10
,
42
+
75
/
6
,
70
,
62
+
75
/
6
),
false
,
false
,
wFilter
);
stRace
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1321
),
rect
<
s32
>
(
10
,
42
+
75
/
6
,
70
,
62
+
75
/
6
),
false
,
false
,
wFilter
);
cbRace
=
env
->
addComboBox
(
rect
<
s32
>
(
60
,
40
+
75
/
6
,
195
,
60
+
75
/
6
),
wFilter
,
COMBOBOX_RACE
);
cbRace
=
env
->
addComboBox
(
rect
<
s32
>
(
60
,
40
+
75
/
6
,
195
,
60
+
75
/
6
),
wFilter
,
COMBOBOX_RACE
);
cbRace
->
setMaxSelectionRows
(
10
);
cbRace
->
setMaxSelectionRows
(
10
);
cbRace
->
addItem
(
dataManager
.
GetSysString
(
1310
),
0
);
cbRace
->
addItem
(
dataManager
.
GetSysString
(
1310
),
0
);
for
(
int
filter
=
0x1
;
filter
<
(
1
<<
RACES_COUNT
);
filter
<<=
1
)
for
(
int
filter
=
0x1
;
filter
<
(
1
<<
RACES_COUNT
);
filter
<<=
1
)
cbRace
->
addItem
(
dataManager
.
FormatRace
(
filter
),
filter
);
cbRace
->
addItem
(
dataManager
.
FormatRace
(
filter
)
.
c_str
()
,
filter
);
stAttack
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1322
),
rect
<
s32
>
(
205
,
22
+
50
/
6
,
280
,
42
+
50
/
6
),
false
,
false
,
wFilter
);
stAttack
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1322
),
rect
<
s32
>
(
205
,
22
+
50
/
6
,
280
,
42
+
50
/
6
),
false
,
false
,
wFilter
);
ebAttack
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
260
,
20
+
50
/
6
,
340
,
40
+
50
/
6
),
true
,
wFilter
,
EDITBOX_INPUTS
);
ebAttack
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
260
,
20
+
50
/
6
,
340
,
40
+
50
/
6
),
true
,
wFilter
,
EDITBOX_INPUTS
);
ebAttack
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
ebAttack
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
...
@@ -1574,7 +1574,7 @@ void Game::ShowCardInfo(int code, bool resize) {
...
@@ -1574,7 +1574,7 @@ void Game::ShowCardInfo(int code, bool resize) {
}
}
if
(
is_valid
&&
cit
->
second
.
type
&
TYPE_MONSTER
)
{
if
(
is_valid
&&
cit
->
second
.
type
&
TYPE_MONSTER
)
{
auto
&
cd
=
cit
->
second
;
auto
&
cd
=
cit
->
second
;
myswprintf
(
formatBuffer
,
L"[%ls] %ls/%ls"
,
dataManager
.
FormatType
(
cd
.
type
),
dataManager
.
FormatRace
(
cd
.
race
)
,
dataManager
.
FormatAttribute
(
cd
.
attribute
));
myswprintf
(
formatBuffer
,
L"[%ls] %ls/%ls"
,
dataManager
.
FormatType
(
cd
.
type
),
dataManager
.
FormatRace
(
cd
.
race
)
.
c_str
(),
dataManager
.
FormatAttribute
(
cd
.
attribute
).
c_str
(
));
stInfo
->
setText
(
formatBuffer
);
stInfo
->
setText
(
formatBuffer
);
int
offset_info
=
0
;
int
offset_info
=
0
;
irr
::
core
::
dimension2d
<
unsigned
int
>
dtxt
=
guiFont
->
getDimension
(
formatBuffer
);
irr
::
core
::
dimension2d
<
unsigned
int
>
dtxt
=
guiFont
->
getDimension
(
formatBuffer
);
...
...
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