本文整理汇总了C++中CTileBank::getTileSetCount方法的典型用法代码示例。如果您正苦于以下问题:C++ CTileBank::getTileSetCount方法的具体用法?C++ CTileBank::getTileSetCount怎么用?C++ CTileBank::getTileSetCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTileBank
的用法示例。
在下文中一共展示了CTileBank::getTileSetCount方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CTextureMem
CBankCont::CBankCont (CTileBank& bank, HINSTANCE hInstance)
{
// Allocate bitmaps
_smallBitmap = new CTextureMem ((uint8*)_small, _smallSize, false);
mediumBitmap = new CTextureMem ((uint8*)medium, mediumSize, false);
largeBitmap = new CTextureMem ((uint8*)large, largeSize, false);
_256Bitmap = new CTextureMem ((uint8*)_256, _256Size, false);
_128Bitmap = new CTextureMem ((uint8*)_128, _128Size, false);
_0Bitmap = new CTextureMem ((uint8*)_0, _0Size, false);
_1Bitmap = new CTextureMem ((uint8*)_1, _1Size, false);
_2Bitmap = new CTextureMem ((uint8*)_2, _2Size, false);
_3Bitmap = new CTextureMem ((uint8*)_3, _3Size, false);
_4Bitmap = new CTextureMem ((uint8*)_4, _4Size, false);
_5Bitmap = new CTextureMem ((uint8*)_5, _5Size, false);
_6Bitmap = new CTextureMem ((uint8*)_6, _6Size, false);
_7Bitmap = new CTextureMem ((uint8*)_7, _7Size, false);
_8Bitmap = new CTextureMem ((uint8*)_8, _8Size, false);
_9Bitmap = new CTextureMem ((uint8*)_9, _9Size, false);
_10Bitmap = new CTextureMem ((uint8*)_10, _10Size, false);
_11Bitmap = new CTextureMem ((uint8*)_11, _11Size, false);
allBitmap = new CTextureMem ((uint8*)all, allSize, false);
lightBitmap = new CTextureMem ((uint8*)light, lightSize, false);
lockBitmap = new CTextureMem ((uint8*)lock, lockSize, false);
orientedBitmap = new CTextureMem ((uint8*)oriented, orientedSize, false);
nothingBitmap = new CTextureMem ((uint8*)nothing, nothingSize, false);
regularBitmap = new CTextureMem ((uint8*)regular, regularSize, false);
goofyBitmap = new CTextureMem ((uint8*)goofy, goofySize, false);
// Resize the tileset array
TileSet.resize (bank.getTileSetCount());
// For each tileSet, build the cont
for (int tileSet=0; tileSet<bank.getTileSetCount(); tileSet++)
TileSet[tileSet].build (bank, tileSet);
// Load cursors
HInspect = LoadCursor(hInstance, MAKEINTRESOURCE(IDC_INSPECT));
HCur = LoadCursor(hInstance, MAKEINTRESOURCE(IDC_PICK_COLOR));
HFill = LoadCursor(hInstance, MAKEINTRESOURCE(IDC_FILL));
HTrick = LoadCursor(hInstance, MAKEINTRESOURCE(IDC_TRICK));
}
示例2: on_editLandPushButton_clicked
void CTile_edit_dlg::on_editLandPushButton_clicked()
{
int nindex = ui.landListWidget->currentRow();
if (nindex != -1)
{
QStringList availableTileSetList;
QStringList landTileSetList;
for (int i=0; i<tileBank.getTileSetCount(); i++)
{
if (tileBank.getLand(nindex)->isTileSet (tileBank.getTileSet(i)->getName()))
landTileSetList.append( QString( tileBank.getTileSet(i)->getName().c_str() ) );
else
availableTileSetList.append( QString( tileBank.getTileSet(i)->getName().c_str() ) );
}
bool ok = false;
QStringList items = CItems_edit_dlg::getItems(this, tr("Edit Land"), ui.landListWidget->item(nindex)->text(), availableTileSetList, landTileSetList, &ok);
if (ok)
{
for (int i=0; i<tileBank.getTileSetCount(); i++)
{
// remove tile set
tileBank.getLand(nindex)->removeTileSet (tileBank.getTileSet(i)->getName());
}
for (int i=0; i<items.count(); i++)
{
QString rString = items[i];
tileBank.getLand(nindex)->addTileSet( rString.toUtf8().constData() );
}
}
}
else
{
QMessageBox::information( this, tr("No Land Selected"), tr("Please, select the Land to edit first ...") );
}
}
示例3: on_loadPushButton_clicked
void CTile_edit_dlg::on_loadPushButton_clicked()
{
QFileDialog::Options options;
QString selectedFilter;
QString fileName = QFileDialog::getOpenFileName(this, tr("Open Bank"), ui.absolutePathPushButton->text() , tr("NeL tile bank files (*.bank);;All Files (*.*);;"), &selectedFilter, options);
if (!fileName.isEmpty())
{
CIFile stream;
if ( stream.open( fileName.toUtf8().constData() ) )
{
ui.landListWidget->clear();
ui.tileSetListWidget->clear();
tileBank.clear();
tileBank.serial (stream);
}
int i;
QStringList lands;
for (i=0; i<tileBank.getLandCount(); i++)
{
// Add to the list
lands.append( QString(tileBank.getLand(i)->getName().c_str()) );
}
ui.landListWidget->addItems(lands);
QStringList tileSets;
for (i=0; i<tileBank.getTileSetCount(); i++)
{
// Add to the list
tileSets.append( QString( tileBank.getTileSet(i)->getName().c_str() ) );
}
ui.tileSetListWidget->addItems(tileSets);
// Set MainFile
mainFile = QFileInfo(fileName);
ui.savePushButton->setEnabled(true);
ui.absolutePathPushButton->setText( QString( tileBank.getAbsPath().c_str() ) );
}
}