Skip to content

Commit

Permalink
Fix of mask detection
Browse files Browse the repository at this point in the history
Now it works!
  • Loading branch information
Wohlstand committed Feb 4, 2015
1 parent bbc8b78 commit e2f201c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion LunaDll/HardcodedGraphics/HardcodedGraphicsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ void HardcodedGraphicsManager::loadIniImage(unsigned int hex, unsigned int hex_m
{
std::string imageFile = ini.Get(sct, value, "");
if(imageFile.empty()) return;
std::string imageFile_src = imageFile;
imageFile = root+"graphics\\common\\"+imageFile;

const char *str = imageFile.c_str();
Expand All @@ -79,10 +80,11 @@ void HardcodedGraphicsManager::loadIniImage(unsigned int hex, unsigned int hex_m
if(hex_m==0) return;

//get filename of mask
imageFile = imageFile_src;
for(int i=imageFile.size()-1; i>0; i--)
if(imageFile[i]=='.')
{
imageFile.insert(imageFile.begin()+i, 'm');
imageFile.insert(i, "m");
break;
}

Expand Down

0 comments on commit e2f201c

Please sign in to comment.