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
d46ce21a
Commit
d46ce21a
authored
Oct 03, 2024
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add number version of Game::DrawShadowText
parent
a08631db
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
16 deletions
+21
-16
gframe/drawing.cpp
gframe/drawing.cpp
+20
-16
gframe/game.h
gframe/game.h
+1
-0
No files found.
gframe/drawing.cpp
View file @
d46ce21a
...
...
@@ -418,6 +418,10 @@ void Game::DrawShadowText(CGUITTFont * font, const core::stringw & text, const c
font
->
draw
(
text
,
shadowposition
,
shadowcolor
,
hcenter
,
vcenter
,
clip
);
font
->
draw
(
text
,
position
,
color
,
hcenter
,
vcenter
,
clip
);
}
void
Game
::
DrawShadowText
(
irr
::
gui
::
CGUITTFont
*
font
,
int
number
,
const
core
::
rect
<
s32
>&
position
,
const
core
::
rect
<
s32
>&
padding
,
video
::
SColor
color
,
video
::
SColor
shadowcolor
,
bool
hcenter
,
bool
vcenter
,
const
core
::
rect
<
s32
>*
clip
)
{
core
::
stringw
text
(
number
);
DrawShadowText
(
font
,
text
,
position
,
padding
,
color
,
shadowcolor
,
hcenter
,
vcenter
,
clip
);
}
void
Game
::
DrawMisc
()
{
static
irr
::
core
::
vector3df
act_rot
(
0
,
0
,
0
);
int
rule
=
(
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
...
...
@@ -598,7 +602,7 @@ void Game::DrawMisc() {
}
driver
->
draw2DRectangle
(
Resize
(
632
,
10
,
688
,
30
),
0x00000000
,
0x00000000
,
0xffffffff
,
0xffffffff
);
driver
->
draw2DRectangle
(
Resize
(
632
,
30
,
688
,
50
),
0xffffffff
,
0xffffffff
,
0x00000000
,
0x00000000
);
DrawShadowText
(
lpcFont
,
d
ataManager
.
GetNumString
(
dInfo
.
turn
)
,
Resize
(
635
,
5
,
687
,
40
),
Resize
(
0
,
0
,
2
,
0
),
0x8000ffff
,
0x80000000
,
true
,
false
,
0
);
DrawShadowText
(
lpcFont
,
d
Info
.
turn
,
Resize
(
635
,
5
,
687
,
40
),
Resize
(
0
,
0
,
2
,
0
),
0x8000ffff
,
0x80000000
,
true
,
false
,
0
);
ClientCard
*
pcard
;
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
pcard
=
dField
.
mzone
[
0
][
i
];
...
...
@@ -659,48 +663,48 @@ void Game::DrawMisc() {
}
if
(
dField
.
extra
[
0
].
size
())
{
int
offset
=
(
dField
.
extra
[
0
].
size
()
>=
10
)
?
0
:
numFont
->
getDimension
(
dataManager
.
GetNumString
(
1
)).
Width
;
DrawShadowText
(
numFont
,
d
ataManager
.
GetNumString
(
dField
.
extra
[
0
].
size
()
),
Resize
(
320
,
563
,
373
,
553
,
offset
,
0
,
0
,
0
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
DrawShadowText
(
numFont
,
d
Field
.
extra
[
0
].
size
(
),
Resize
(
320
,
563
,
373
,
553
,
offset
,
0
,
0
,
0
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
DrawShadowText
(
numFont
,
dataManager
.
GetNumString
(
dField
.
extra_p_count
[
0
],
true
),
Resize
(
340
,
563
,
393
,
553
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
}
if
(
dField
.
deck
[
0
].
size
())
{
DrawShadowText
(
numFont
,
d
ataManager
.
GetNumString
(
dField
.
deck
[
0
].
size
()
),
Resize
(
908
,
563
,
1023
,
553
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
DrawShadowText
(
numFont
,
d
Field
.
deck
[
0
].
size
(
),
Resize
(
908
,
563
,
1023
,
553
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
}
if
(
rule
==
0
)
{
if
(
dField
.
grave
[
0
].
size
())
{
DrawShadowText
(
numFont
,
d
ataManager
.
GetNumString
(
dField
.
grave
[
0
].
size
()
),
Resize
(
837
,
376
,
986
,
381
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
DrawShadowText
(
numFont
,
d
Field
.
grave
[
0
].
size
(
),
Resize
(
837
,
376
,
986
,
381
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
}
if
(
dField
.
remove
[
0
].
size
())
{
DrawShadowText
(
numFont
,
d
ataManager
.
GetNumString
(
dField
.
remove
[
0
].
size
()
),
Resize
(
1015
,
376
,
959
,
381
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
DrawShadowText
(
numFont
,
d
Field
.
remove
[
0
].
size
(
),
Resize
(
1015
,
376
,
959
,
381
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
}
}
else
{
if
(
dField
.
grave
[
0
].
size
())
{
DrawShadowText
(
numFont
,
d
ataManager
.
GetNumString
(
dField
.
grave
[
0
].
size
()
),
Resize
(
870
,
457
,
1004
,
462
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
DrawShadowText
(
numFont
,
d
Field
.
grave
[
0
].
size
(
),
Resize
(
870
,
457
,
1004
,
462
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
}
if
(
dField
.
remove
[
0
].
size
())
{
DrawShadowText
(
numFont
,
d
ataManager
.
GetNumString
(
dField
.
remove
[
0
].
size
()
),
Resize
(
837
,
376
,
986
,
381
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
DrawShadowText
(
numFont
,
d
Field
.
remove
[
0
].
size
(
),
Resize
(
837
,
376
,
986
,
381
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
}
}
if
(
dField
.
extra
[
1
].
size
())
{
int
offset
=
(
dField
.
extra
[
1
].
size
()
>=
10
)
?
0
:
numFont
->
getDimension
(
dataManager
.
GetNumString
(
1
)).
Width
;
DrawShadowText
(
numFont
,
d
ataManager
.
GetNumString
(
dField
.
extra
[
1
].
size
()
),
Resize
(
808
,
208
,
900
,
233
,
offset
,
0
,
0
,
0
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
DrawShadowText
(
numFont
,
d
Field
.
extra
[
1
].
size
(
),
Resize
(
808
,
208
,
900
,
233
,
offset
,
0
,
0
,
0
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
DrawShadowText
(
numFont
,
dataManager
.
GetNumString
(
dField
.
extra_p_count
[
1
],
true
),
Resize
(
828
,
208
,
920
,
233
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
}
if
(
dField
.
deck
[
1
].
size
())
{
DrawShadowText
(
numFont
,
d
ataManager
.
GetNumString
(
dField
.
deck
[
1
].
size
()
),
Resize
(
465
,
208
,
483
,
233
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
DrawShadowText
(
numFont
,
d
Field
.
deck
[
1
].
size
(
),
Resize
(
465
,
208
,
483
,
233
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
}
if
(
rule
==
0
)
{
if
(
dField
.
grave
[
1
].
size
())
{
DrawShadowText
(
numFont
,
d
ataManager
.
GetNumString
(
dField
.
grave
[
1
].
size
()
),
Resize
(
420
,
311
,
464
,
282
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
DrawShadowText
(
numFont
,
d
Field
.
grave
[
1
].
size
(
),
Resize
(
420
,
311
,
464
,
282
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
}
if
(
dField
.
remove
[
1
].
size
())
{
DrawShadowText
(
numFont
,
d
ataManager
.
GetNumString
(
dField
.
remove
[
1
].
size
()
),
Resize
(
300
,
311
,
445
,
341
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
DrawShadowText
(
numFont
,
d
Field
.
remove
[
1
].
size
(
),
Resize
(
300
,
311
,
445
,
341
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
}
}
else
{
if
(
dField
.
grave
[
1
].
size
())
{
DrawShadowText
(
numFont
,
d
ataManager
.
GetNumString
(
dField
.
grave
[
1
].
size
()
),
Resize
(
455
,
250
,
464
,
300
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
DrawShadowText
(
numFont
,
d
Field
.
grave
[
1
].
size
(
),
Resize
(
455
,
250
,
464
,
300
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
}
if
(
dField
.
remove
[
1
].
size
())
{
DrawShadowText
(
numFont
,
d
ataManager
.
GetNumString
(
dField
.
remove
[
1
].
size
()
),
Resize
(
420
,
311
,
464
,
282
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
DrawShadowText
(
numFont
,
d
Field
.
remove
[
1
].
size
(
),
Resize
(
420
,
311
,
464
,
282
),
Resize
(
0
,
1
,
2
,
1
),
0xffffff00
,
0xff000000
,
true
,
false
,
0
);
}
}
}
...
...
@@ -1190,7 +1194,7 @@ void Game::DrawDeckBd() {
driver
->
draw2DRectangle
(
Resize
(
310
,
137
,
410
,
157
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
Resize
(
309
,
136
,
410
,
157
));
DrawShadowText
(
textFont
,
dataManager
.
GetSysString
(
deckBuilder
.
showing_pack
?
1477
:
1330
),
Resize
(
315
,
137
,
410
,
157
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
mainsize
]
,
Resize
(
380
,
138
,
440
,
158
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
DrawShadowText
(
numFont
,
mainsize
,
Resize
(
380
,
138
,
440
,
158
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
driver
->
draw2DRectangle
(
Resize
(
310
,
160
,
797
,
deckBuilder
.
showing_pack
?
630
:
436
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
Resize
(
309
,
159
,
797
,
deckBuilder
.
showing_pack
?
630
:
436
));
int
lx
;
...
...
@@ -1224,7 +1228,7 @@ void Game::DrawDeckBd() {
driver
->
draw2DRectangle
(
Resize
(
310
,
440
,
410
,
460
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
Resize
(
309
,
439
,
410
,
460
));
DrawShadowText
(
textFont
,
dataManager
.
GetSysString
(
1331
),
Resize
(
315
,
440
,
410
,
460
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
DrawShadowText
(
numFont
,
d
ataManager
.
numStrings
[
deckManager
.
current_deck
.
extra
.
size
()]
,
Resize
(
380
,
441
,
440
,
461
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
DrawShadowText
(
numFont
,
d
eckManager
.
current_deck
.
extra
.
size
()
,
Resize
(
380
,
441
,
440
,
461
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
driver
->
draw2DRectangle
(
Resize
(
310
,
463
,
797
,
533
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
Resize
(
309
,
462
,
797
,
533
));
if
(
deckManager
.
current_deck
.
extra
.
size
()
<=
10
)
...
...
@@ -1239,7 +1243,7 @@ void Game::DrawDeckBd() {
driver
->
draw2DRectangle
(
Resize
(
310
,
537
,
410
,
557
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
Resize
(
309
,
536
,
410
,
557
));
DrawShadowText
(
textFont
,
dataManager
.
GetSysString
(
1332
),
Resize
(
315
,
537
,
410
,
557
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
DrawShadowText
(
numFont
,
d
ataManager
.
numStrings
[
deckManager
.
current_deck
.
side
.
size
()]
,
Resize
(
380
,
538
,
440
,
558
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
DrawShadowText
(
numFont
,
d
eckManager
.
current_deck
.
side
.
size
()
,
Resize
(
380
,
538
,
440
,
558
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
driver
->
draw2DRectangle
(
Resize
(
310
,
560
,
797
,
630
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
Resize
(
309
,
559
,
797
,
630
));
if
(
deckManager
.
current_deck
.
side
.
size
()
<=
10
)
...
...
gframe/game.h
View file @
d46ce21a
...
...
@@ -156,6 +156,7 @@ public:
void
DrawCards
();
void
DrawCard
(
ClientCard
*
pcard
);
void
DrawShadowText
(
irr
::
gui
::
CGUITTFont
*
font
,
const
core
::
stringw
&
text
,
const
core
::
rect
<
s32
>&
position
,
const
core
::
rect
<
s32
>&
padding
,
video
::
SColor
color
=
0xffffffff
,
video
::
SColor
shadowcolor
=
0xff000000
,
bool
hcenter
=
false
,
bool
vcenter
=
false
,
const
core
::
rect
<
s32
>*
clip
=
0
);
void
DrawShadowText
(
irr
::
gui
::
CGUITTFont
*
font
,
int
number
,
const
core
::
rect
<
s32
>&
position
,
const
core
::
rect
<
s32
>&
padding
,
video
::
SColor
color
=
0xffffffff
,
video
::
SColor
shadowcolor
=
0xff000000
,
bool
hcenter
=
false
,
bool
vcenter
=
false
,
const
core
::
rect
<
s32
>*
clip
=
0
);
void
DrawMisc
();
void
DrawStatus
(
ClientCard
*
pcard
,
int
x1
,
int
y1
,
int
x2
,
int
y2
);
void
DrawGUI
();
...
...
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