Commit 7c6526df authored by Tianchenglipu's avatar Tianchenglipu Committed by GitHub

Update image_manager.cpp

parent 1dc1e961
...@@ -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