Skip to content

Commit

Permalink
ecere/gfx/Bitmap: Added CubeMap::LoadFromFiles()
Browse files Browse the repository at this point in the history
  • Loading branch information
jerstlouis committed Nov 6, 2022
1 parent 1edefd5 commit 1028167
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions ecere/src/gfx/Bitmap.ec
Original file line number Diff line number Diff line change
Expand Up @@ -1267,4 +1267,27 @@ public:
}
return result;
}

bool LoadFromFiles(DisplaySystem displaySystem, File files[6], const String extension, bool oldStyle)
{
int i;
bool result = true;
for(i = 0; result && i < 6; i++)
{
Bitmap face = i > 0 ? { sRGB2Linear = sRGB2Linear } : this;
if(face.LoadFromFile(files[i], extension, null))
{
face.driverData = driverData;
result = displaySystem.driver.MakeDDBitmap(displaySystem, face, true, (i + 1) | (oldStyle << 3));
}
else
result = false;
if(i > 0)
{
face.driverData = 0;
delete face;
}
}
return result;
}
};

0 comments on commit 1028167

Please sign in to comment.