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
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
Commits
e3264fff
Commit
e3264fff
authored
Oct 08, 2024
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove wcscat
parent
26c2446f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
36 deletions
+32
-36
gframe/drawing.cpp
gframe/drawing.cpp
+25
-27
gframe/game.cpp
gframe/game.cpp
+7
-9
No files found.
gframe/drawing.cpp
View file @
e3264fff
...
...
@@ -1274,52 +1274,50 @@ void Game::DrawDeckBd() {
if
(
deckBuilder
.
hovered_pos
==
4
&&
deckBuilder
.
hovered_seq
==
(
int
)
i
)
driver
->
draw2DRectangle
(
0x80000000
,
Resize
(
806
,
164
+
i
*
66
,
1019
,
230
+
i
*
66
));
DrawThumb
(
ptr
,
position2di
(
810
,
165
+
i
*
66
),
deckBuilder
.
filterList
);
const
wchar_t
*
availBuffer
=
L""
;
if
((
ptr
->
second
.
ot
&
AVAIL_OCGTCG
)
==
AVAIL_OCG
)
availBuffer
=
L" [OCG]"
;
else
if
((
ptr
->
second
.
ot
&
AVAIL_OCGTCG
)
==
AVAIL_TCG
)
availBuffer
=
L" [TCG]"
;
else
if
((
ptr
->
second
.
ot
&
AVAIL_CUSTOM
)
==
AVAIL_CUSTOM
)
availBuffer
=
L" [Custom]"
;
if
(
ptr
->
second
.
type
&
TYPE_MONSTER
)
{
myswprintf
(
textBuffer
,
L"%ls"
,
dataManager
.
GetName
(
ptr
->
first
));
DrawShadowText
(
textFont
,
textBuffer
,
Resize
(
860
,
165
+
i
*
66
,
955
,
185
+
i
*
66
),
Resize
(
1
,
1
,
0
,
0
));
const
wchar_t
*
form
=
L"\u2605"
;
wchar_t
adBuffer
[
32
]{};
wchar_t
scaleBuffer
[
16
]{};
if
(
!
(
ptr
->
second
.
type
&
TYPE_LINK
))
{
const
wchar_t
*
form
=
L"\u2605"
;
if
(
ptr
->
second
.
type
&
TYPE_XYZ
)
form
=
L"\u2606"
;
myswprintf
(
textBuffer
,
L"%ls/%ls %ls%d"
,
dataManager
.
FormatAttribute
(
ptr
->
second
.
attribute
),
dataManager
.
FormatRace
(
ptr
->
second
.
race
),
form
,
ptr
->
second
.
level
);
DrawShadowText
(
textFont
,
textBuffer
,
Resize
(
860
,
187
+
i
*
66
,
955
,
207
+
i
*
66
),
Resize
(
1
,
1
,
0
,
0
));
if
(
ptr
->
second
.
type
&
TYPE_XYZ
)
form
=
L"\u2606"
;
if
(
ptr
->
second
.
attack
<
0
&&
ptr
->
second
.
defense
<
0
)
myswprintf
(
text
Buffer
,
L"?/?"
);
myswprintf
(
ad
Buffer
,
L"?/?"
);
else
if
(
ptr
->
second
.
attack
<
0
)
myswprintf
(
text
Buffer
,
L"?/%d"
,
ptr
->
second
.
defense
);
myswprintf
(
ad
Buffer
,
L"?/%d"
,
ptr
->
second
.
defense
);
else
if
(
ptr
->
second
.
defense
<
0
)
myswprintf
(
textBuffer
,
L"%d/?"
,
ptr
->
second
.
attack
);
else
myswprintf
(
textBuffer
,
L"%d/%d"
,
ptr
->
second
.
attack
,
ptr
->
second
.
defense
);
myswprintf
(
adBuffer
,
L"%d/?"
,
ptr
->
second
.
attack
);
else
myswprintf
(
adBuffer
,
L"%d/%d"
,
ptr
->
second
.
attack
,
ptr
->
second
.
defense
);
}
else
{
myswprintf
(
textBuffer
,
L"%ls/%ls LINK-%d"
,
dataManager
.
FormatAttribute
(
ptr
->
second
.
attribute
),
dataManager
.
FormatRace
(
ptr
->
second
.
race
),
ptr
->
second
.
level
);
DrawShadowText
(
textFont
,
textBuffer
,
Resize
(
860
,
187
+
i
*
66
,
955
,
207
+
i
*
66
),
Resize
(
1
,
1
,
0
,
0
));
form
=
L"LINK-"
;
if
(
ptr
->
second
.
attack
<
0
)
myswprintf
(
textBuffer
,
L"?/-"
);
else
myswprintf
(
textBuffer
,
L"%d/-"
,
ptr
->
second
.
attack
);
myswprintf
(
adBuffer
,
L"?/-"
);
else
myswprintf
(
adBuffer
,
L"%d/-"
,
ptr
->
second
.
attack
);
}
myswprintf
(
textBuffer
,
L"%ls/%ls %ls%d"
,
dataManager
.
FormatAttribute
(
ptr
->
second
.
attribute
),
dataManager
.
FormatRace
(
ptr
->
second
.
race
),
form
,
ptr
->
second
.
level
);
DrawShadowText
(
textFont
,
textBuffer
,
Resize
(
860
,
187
+
i
*
66
,
955
,
207
+
i
*
66
),
Resize
(
1
,
1
,
0
,
0
));
if
(
ptr
->
second
.
type
&
TYPE_PENDULUM
)
{
wchar_t
scaleBuffer
[
16
];
myswprintf
(
scaleBuffer
,
L" %d/%d"
,
ptr
->
second
.
lscale
,
ptr
->
second
.
rscale
);
wcscat
(
textBuffer
,
scaleBuffer
);
}
if
((
ptr
->
second
.
ot
&
AVAIL_OCGTCG
)
==
AVAIL_OCG
)
wcscat
(
textBuffer
,
L" [OCG]"
);
else
if
((
ptr
->
second
.
ot
&
AVAIL_OCGTCG
)
==
AVAIL_TCG
)
wcscat
(
textBuffer
,
L" [TCG]"
);
else
if
((
ptr
->
second
.
ot
&
AVAIL_CUSTOM
)
==
AVAIL_CUSTOM
)
wcscat
(
textBuffer
,
L" [Custom]"
);
myswprintf
(
textBuffer
,
L"%ls%ls%ls"
,
adBuffer
,
scaleBuffer
,
availBuffer
);
DrawShadowText
(
textFont
,
textBuffer
,
Resize
(
860
,
209
+
i
*
66
,
955
,
229
+
i
*
66
),
Resize
(
1
,
1
,
0
,
0
));
}
else
{
myswprintf
(
textBuffer
,
L"%ls"
,
dataManager
.
GetName
(
ptr
->
first
));
DrawShadowText
(
textFont
,
textBuffer
,
Resize
(
860
,
165
+
i
*
66
,
955
,
185
+
i
*
66
),
Resize
(
1
,
1
,
0
,
0
));
const
wchar_t
*
ptype
=
dataManager
.
FormatType
(
ptr
->
second
.
type
);
DrawShadowText
(
textFont
,
ptype
,
Resize
(
860
,
187
+
i
*
66
,
955
,
207
+
i
*
66
),
Resize
(
1
,
1
,
0
,
0
));
textBuffer
[
0
]
=
0
;
if
((
ptr
->
second
.
ot
&
AVAIL_OCGTCG
)
==
AVAIL_OCG
)
wcscat
(
textBuffer
,
L"[OCG]"
);
else
if
((
ptr
->
second
.
ot
&
AVAIL_OCGTCG
)
==
AVAIL_TCG
)
wcscat
(
textBuffer
,
L"[TCG]"
);
else
if
((
ptr
->
second
.
ot
&
AVAIL_CUSTOM
)
==
AVAIL_CUSTOM
)
wcscat
(
textBuffer
,
L"[Custom]"
);
myswprintf
(
textBuffer
,
L"%ls"
,
availBuffer
);
DrawShadowText
(
textFont
,
textBuffer
,
Resize
(
860
,
209
+
i
*
66
,
955
,
229
+
i
*
66
),
Resize
(
1
,
1
,
0
,
0
));
}
}
...
...
gframe/game.cpp
View file @
e3264fff
...
...
@@ -1580,11 +1580,12 @@ void Game::ShowCardInfo(int code, bool resize) {
irr
::
core
::
dimension2d
<
unsigned
int
>
dtxt
=
guiFont
->
getDimension
(
formatBuffer
);
if
(
dtxt
.
Width
>
(
300
*
xScale
-
13
)
-
15
)
offset_info
=
15
;
const
wchar_t
*
form
=
L"\u2605"
;
wchar_t
adBuffer
[
64
]{};
wchar_t
scaleBuffer
[
16
]{};
if
(
!
(
cd
.
type
&
TYPE_LINK
))
{
const
wchar_t
*
form
=
L"\u2605"
;
if
(
cd
.
type
&
TYPE_XYZ
)
form
=
L"\u2606"
;
wchar_t
adBuffer
[
16
];
if
(
cd
.
attack
<
0
&&
cd
.
defense
<
0
)
myswprintf
(
adBuffer
,
L"?/?"
);
else
if
(
cd
.
attack
<
0
)
...
...
@@ -1593,20 +1594,17 @@ void Game::ShowCardInfo(int code, bool resize) {
myswprintf
(
adBuffer
,
L"%d/?"
,
cd
.
attack
);
else
myswprintf
(
adBuffer
,
L"%d/%d"
,
cd
.
attack
,
cd
.
defense
);
myswprintf
(
formatBuffer
,
L"[%ls%d] %ls"
,
form
,
cd
.
level
,
adBuffer
);
}
else
{
wchar_t
adBuffer
[
16
]
;
form
=
L"LINK-"
;
if
(
cd
.
attack
<
0
)
myswprintf
(
adBuffer
,
L"?/-
"
);
myswprintf
(
adBuffer
,
L"?/-
%ls"
,
dataManager
.
FormatLinkMarker
(
cd
.
link_marker
)
);
else
myswprintf
(
adBuffer
,
L"%d/- "
,
cd
.
attack
);
myswprintf
(
formatBuffer
,
L"[LINK-%d] %ls%ls"
,
cd
.
level
,
adBuffer
,
dataManager
.
FormatLinkMarker
(
cd
.
link_marker
));
myswprintf
(
adBuffer
,
L"%d/- %ls"
,
cd
.
attack
,
dataManager
.
FormatLinkMarker
(
cd
.
link_marker
));
}
if
(
cd
.
type
&
TYPE_PENDULUM
)
{
wchar_t
scaleBuffer
[
16
];
myswprintf
(
scaleBuffer
,
L" %d/%d"
,
cd
.
lscale
,
cd
.
rscale
);
wcscat
(
formatBuffer
,
scaleBuffer
);
}
myswprintf
(
formatBuffer
,
L"[%ls%d] %ls%ls"
,
form
,
cd
.
level
,
adBuffer
,
scaleBuffer
);
stDataInfo
->
setText
(
formatBuffer
);
int
offset_arrows
=
offset_info
;
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