Commit ed757ec5 authored by DailyShana's avatar DailyShana

allow read jpg field textures

parent 03b986cb
......@@ -103,6 +103,9 @@ irr::video::ITexture* ImageManager::GetTextureField(int code) {
char file[256];
sprintf(file, "pics/field/%d.png", code);
irr::video::ITexture* img = driver->getTexture(file);
if(img == NULL) {
sprintf(file, "pics/field/%d.jpg", code);
irr::video::ITexture* img = driver->getTexture(file);
if(img == NULL) {
tFields[code] = NULL;
return NULL;
......@@ -110,6 +113,10 @@ irr::video::ITexture* ImageManager::GetTextureField(int code) {
tFields[code] = img;
return img;
}
} else {
tFields[code] = img;
return img;
}
}
if(tit->second)
return tit->second;
......
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