Remove Qt style forloop
This commit is contained in:
parent
f3def32461
commit
fbf02cf2ce
|
@ -627,8 +627,8 @@ struct TilemapPrivate
|
||||||
|
|
||||||
updateAutotileInfo();
|
updateAutotileInfo();
|
||||||
|
|
||||||
Q_FOREACH (uint8_t i, atlas.usableATs)
|
for (size_t i = 0; i < atlas.usableATs.size(); ++i)
|
||||||
autotiles[i]->flush();
|
autotiles[atlas.usableATs[i]]->flush();
|
||||||
|
|
||||||
TileAtlas::BlitList blits = TileAtlas::calcBlits(atlas.efTilesetH, atlas.size);
|
TileAtlas::BlitList blits = TileAtlas::calcBlits(atlas.efTilesetH, atlas.size);
|
||||||
|
|
||||||
|
@ -643,13 +643,16 @@ struct TilemapPrivate
|
||||||
glState.clearColor.pop();
|
glState.clearColor.pop();
|
||||||
|
|
||||||
/* Blit autotiles */
|
/* Blit autotiles */
|
||||||
Q_FOREACH (uint8_t i, atlas.usableATs)
|
for (size_t i = 0; i < atlas.usableATs.size(); ++i)
|
||||||
{
|
{
|
||||||
int blitW = std::min(autotiles[i]->width(), atAreaW);
|
const uint8_t atInd = atlas.usableATs[i];
|
||||||
int blitH = std::min(autotiles[i]->height(), atAreaH);
|
Bitmap *autotile = autotiles[atInd];
|
||||||
|
|
||||||
FBO::bind(autotiles[i]->getGLTypes().fbo, FBO::Read);
|
int blitW = std::min(autotile->width(), atAreaW);
|
||||||
FBO::blit(0, 0, 0, i*autotileH, blitW, blitH);
|
int blitH = std::min(autotile->height(), atAreaH);
|
||||||
|
|
||||||
|
FBO::bind(autotile->getGLTypes().fbo, FBO::Read);
|
||||||
|
FBO::blit(0, 0, 0, atInd*autotileH, blitW, blitH);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Blit tileset */
|
/* Blit tileset */
|
||||||
|
|
Loading…
Reference in New Issue