CAM: apply precommit

This commit is contained in:
Adrian Insaurralde Avalos
2024-09-03 14:54:36 -04:00
parent 261ef09348
commit a17a3cf6d7
337 changed files with 26842 additions and 25585 deletions

View File

@@ -46,7 +46,9 @@ TextureItem texItems[] = {
int sssize = -1;
TextureLoader::TextureLoader(std::string imgFolder, std::vector<std::string> fileNames, int textureSize)
TextureLoader::TextureLoader(std::string imgFolder,
std::vector<std::string> fileNames,
int textureSize)
: mImageFolder(imgFolder)
{
int buffsize = textureSize * textureSize * sizeof(unsigned int);
@@ -63,15 +65,15 @@ TextureLoader::TextureLoader(std::string imgFolder, std::vector<std::string> fil
// parse compressed image into a texture buffer
bool TextureLoader::AddImage(TextureItem* texItem,
QImage& pixmap,
unsigned int* buffPos,
int stride)
QImage& pixmap,
unsigned int* buffPos,
int stride)
{
int width = pixmap.width();
int height = pixmap.height();
buffPos += stride * texItem->ty + texItem->tx;
for (int i = 0; i < height; i++) {
unsigned int* line = reinterpret_cast<unsigned int *>(pixmap.scanLine(i));
unsigned int* line = reinterpret_cast<unsigned int*>(pixmap.scanLine(i));
for (int j = 0; j < width; j++) {
buffPos[j] = line[j];
}