From 3ad6587d537bd9f9e1edd134ba7bd2e062b7c581 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Wed, 30 Jul 2014 15:29:50 +0200 Subject: [PATCH] 128 and 256 tiles don't have alpha, so no need to load/save them. --- code/studio/src/plugins/tile_editor/tilebank_loader.cpp | 4 ++-- code/studio/src/plugins/tile_editor/tilebank_saver.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/studio/src/plugins/tile_editor/tilebank_loader.cpp b/code/studio/src/plugins/tile_editor/tilebank_loader.cpp index b8ab201e8..238a41a52 100644 --- a/code/studio/src/plugins/tile_editor/tilebank_loader.cpp +++ b/code/studio/src/plugins/tile_editor/tilebank_loader.cpp @@ -77,7 +77,7 @@ public: 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() ); } @@ -96,7 +96,7 @@ public: 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() ); } diff --git a/code/studio/src/plugins/tile_editor/tilebank_saver.cpp b/code/studio/src/plugins/tile_editor/tilebank_saver.cpp index faec90bc4..bca62533d 100644 --- a/code/studio/src/plugins/tile_editor/tilebank_saver.cpp +++ b/code/studio/src/plugins/tile_editor/tilebank_saver.cpp @@ -76,7 +76,7 @@ public: for( int i = 0; i < node->childCount(); 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 ) );