Commit 102d516a authored by 独孤朲's avatar 独孤朲 Committed by GitHub

Merge pull request #1781 from Tianchenglipu/patch-1

load bitmap from expansions/pics/
parents d03eed06 7c6526df
...@@ -59,8 +59,12 @@ irr::video::ITexture* ImageManager::GetTexture(int code) { ...@@ -59,8 +59,12 @@ irr::video::ITexture* ImageManager::GetTexture(int code) {
auto tit = tMap.find(code); auto tit = tMap.find(code);
if(tit == tMap.end()) { if(tit == tMap.end()) {
char file[256]; char file[256];
sprintf(file, "pics/%d.jpg", code); sprintf(file, "expansions/pics/%d.jpg", code);
irr::video::ITexture* img = driver->getTexture(file); irr::video::ITexture* img = driver->getTexture(file);
if(img == NULL) {
sprintf(file, "pics/%d.jpg", code);
img = driver->getTexture(file);
}
if(img == NULL) { if(img == NULL) {
tMap[code] = NULL; tMap[code] = NULL;
return GetTextureThumb(code); return GetTextureThumb(code);
...@@ -80,8 +84,12 @@ irr::video::ITexture* ImageManager::GetTextureThumb(int code) { ...@@ -80,8 +84,12 @@ irr::video::ITexture* ImageManager::GetTextureThumb(int code) {
auto tit = tThumb.find(code); auto tit = tThumb.find(code);
if(tit == tThumb.end()) { if(tit == tThumb.end()) {
char file[256]; char file[256];
sprintf(file, "pics/thumbnail/%d.jpg", code); sprintf(file, "expansions/pics/thumbnail/%d.jpg", code);
irr::video::ITexture* img = driver->getTexture(file); irr::video::ITexture* img = driver->getTexture(file);
if(img == NULL) {
sprintf(file, "pics/thumbnail/%d.jpg", code);
img = driver->getTexture(file);
}
if(img == NULL) { if(img == NULL) {
tThumb[code] = NULL; tThumb[code] = NULL;
return tUnknown; return tUnknown;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment