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
e53cb65b
Commit
e53cb65b
authored
Apr 22, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add png pic support
parent
ecfa8c88
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
3 deletions
+27
-3
gframe/image_manager.cpp
gframe/image_manager.cpp
+27
-3
No files found.
gframe/image_manager.cpp
View file @
e53cb65b
...
...
@@ -274,8 +274,16 @@ irr::video::ITexture* ImageManager::GetTexture(int code, bool fit) {
auto
tit
=
tMap
[
fit
?
1
:
0
].
find
(
code
);
if
(
tit
==
tMap
[
fit
?
1
:
0
].
end
())
{
char
file
[
256
];
sprintf
(
file
,
"expansions/pics/%d.
jp
g"
,
code
);
sprintf
(
file
,
"expansions/pics/%d.
pn
g"
,
code
);
irr
::
video
::
ITexture
*
img
=
GetTextureFromFile
(
file
,
width
,
height
);
if
(
img
==
NULL
)
{
sprintf
(
file
,
"expansions/pics/%d.jpg"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
}
if
(
img
==
NULL
)
{
sprintf
(
file
,
"pics/%d.png"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
}
if
(
img
==
NULL
)
{
sprintf
(
file
,
"pics/%d.jpg"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
...
...
@@ -300,15 +308,31 @@ irr::video::ITexture* ImageManager::GetTextureThumb(int code) {
int
height
=
CARD_THUMB_HEIGHT
*
mainGame
->
yScale
;
if
(
tit
==
tThumb
.
end
())
{
char
file
[
256
];
sprintf
(
file
,
"expansions/pics/thumbnail/%d.
jp
g"
,
code
);
sprintf
(
file
,
"expansions/pics/thumbnail/%d.
pn
g"
,
code
);
irr
::
video
::
ITexture
*
img
=
GetTextureFromFile
(
file
,
width
,
height
);
if
(
img
==
NULL
)
{
sprintf
(
file
,
"expansions/pics/thumbnail/%d.jpg"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
}
if
(
img
==
NULL
)
{
sprintf
(
file
,
"pics/thumbnail/%d.png"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
}
if
(
img
==
NULL
)
{
sprintf
(
file
,
"pics/thumbnail/%d.jpg"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
}
if
(
img
==
NULL
&&
mainGame
->
gameConf
.
use_image_scale
)
{
sprintf
(
file
,
"expansions/pics/%d.png"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
if
(
img
==
NULL
)
{
sprintf
(
file
,
"expansions/pics/%d.jpg"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
}
if
(
img
==
NULL
)
{
sprintf
(
file
,
"pics/%d.png"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
}
if
(
img
==
NULL
)
{
sprintf
(
file
,
"pics/%d.jpg"
,
code
);
img
=
GetTextureFromFile
(
file
,
width
,
height
);
...
...
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