128 and 256 tiles don't have alpha, so no need to load/save them.

This commit is contained in:
dfighter1985 2014-07-30 15:29:50 +02:00
parent 7b36ce2e85
commit 3ad6587d53
2 changed files with 3 additions and 3 deletions

View file

@ -77,7 +77,7 @@ public:
TileItemNode *tin = new TileItemNode( i, TileModel::TileDiffuse, "" ); TileItemNode *tin = new TileItemNode( i, TileModel::TileDiffuse, "" );
for( int i = TileModel::TileDiffuse; i <= TileModel::TileAlpha; i++ ) for( int i = TileModel::TileDiffuse; i < TileModel::TileAlpha; i++ )
{ {
tin->setTileFilename( TileModel::TTileChannel( i ), tile->getRelativeFileName( channelToTBitmap( TileModel::TTileChannel( i ) ) ).c_str() ); tin->setTileFilename( TileModel::TTileChannel( i ), tile->getRelativeFileName( channelToTBitmap( TileModel::TTileChannel( i ) ) ).c_str() );
} }
@ -96,7 +96,7 @@ public:
TileItemNode *tin = new TileItemNode( i, TileModel::TileDiffuse, "" ); TileItemNode *tin = new TileItemNode( i, TileModel::TileDiffuse, "" );
for( int i = TileModel::TileDiffuse; i <= TileModel::TileAlpha; i++ ) for( int i = TileModel::TileDiffuse; i < TileModel::TileAlpha; i++ )
{ {
tin->setTileFilename( TileModel::TTileChannel( i ), tile->getRelativeFileName( channelToTBitmap( TileModel::TTileChannel( i ) ) ).c_str() ); tin->setTileFilename( TileModel::TTileChannel( i ), tile->getRelativeFileName( channelToTBitmap( TileModel::TTileChannel( i ) ) ).c_str() );
} }

View file

@ -76,7 +76,7 @@ public:
for( int i = 0; i < node->childCount(); i++ ) for( int i = 0; i < node->childCount(); i++ )
{ {
TileItemNode *tin = static_cast< TileItemNode* >( node->child( i ) ); TileItemNode *tin = static_cast< TileItemNode* >( node->child( i ) );
for( int j = TileModel::TileDiffuse; j <= TileModel::TileAlpha; j++ ) for( int j = TileModel::TileDiffuse; j < TileModel::TileAlpha; j++ )
{ {
QString fn = tin->getTileFilename( TileModel::TTileChannel( j ) ); QString fn = tin->getTileFilename( TileModel::TTileChannel( j ) );