Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
ffed0e00
Commit
ffed0e00
authored
Jul 31, 2014
by
Gavin Bisesi
Browse files
Merge pull request #214 from pliu037/master
Added better support for custom card images
parents
ca6bd669
c3a68fcb
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/carddatabase.cpp
View file @
ffed0e00
...
...
@@ -129,21 +129,22 @@ void PictureLoader::processLoadQueue()
QString
setName
=
ptl
.
getSetName
();
QImage
image
;
if
(
!
image
.
load
(
QString
(
"%1/%2/%3.full.jpg"
).
arg
(
picsPath
).
arg
(
setName
).
arg
(
correctedName
)))
if
(
!
image
.
load
(
QString
(
"%1/%2/%3%4.full.jpg"
).
arg
(
picsPath
).
arg
(
setName
).
arg
(
correctedName
).
arg
(
1
)))
if
(
!
image
.
load
(
QString
(
"%1/%2/%3/%4.full.jpg"
).
arg
(
picsPath
).
arg
(
"downloadedPics"
).
arg
(
setName
).
arg
(
correctedName
)))
{
if
(
picDownload
)
{
cardsToDownload
.
append
(
ptl
);
if
(
!
downloadRunning
)
startNextPicDownload
();
}
else
{
if
(
ptl
.
nextSet
())
loadQueue
.
prepend
(
ptl
);
else
emit
imageLoaded
(
ptl
.
getCard
(),
QImage
());
if
(
!
image
.
load
(
QString
(
"%1/%2/%3.full.jpg"
).
arg
(
picsPath
).
arg
(
"CUSTOM"
).
arg
(
correctedName
)))
{
if
(
!
image
.
load
(
QString
(
"%1/%2/%3.full.jpg"
).
arg
(
picsPath
).
arg
(
setName
).
arg
(
correctedName
)))
//if (!image.load(QString("%1/%2/%3%4.full.jpg").arg(picsPath).arg(setName).arg(correctedName).arg(1)))
if
(
!
image
.
load
(
QString
(
"%1/%2/%3/%4.full.jpg"
).
arg
(
picsPath
).
arg
(
"downloadedPics"
).
arg
(
setName
).
arg
(
correctedName
)))
{
if
(
picDownload
)
{
cardsToDownload
.
append
(
ptl
);
if
(
!
downloadRunning
)
startNextPicDownload
();
}
else
{
if
(
ptl
.
nextSet
())
loadQueue
.
prepend
(
ptl
);
else
emit
imageLoaded
(
ptl
.
getCard
(),
QImage
());
}
}
continue
;
}
}
emit
imageLoaded
(
ptl
.
getCard
(),
image
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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