mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-29 20:30:54 +00:00
Set all images by default.
--HG-- branch : gsoc2014-dfighter
This commit is contained in:
parent
84fc5f27b6
commit
e2a579c03e
4 changed files with 9 additions and 32 deletions
|
@ -300,24 +300,17 @@ private:
|
|||
TileConstants::TTileChannel TileItemNode::s_displayChannel = TileConstants::TileDiffuse;
|
||||
int TileItemNode::s_alphaRot = 0;
|
||||
|
||||
TileItemNode::TileItemNode( TileConstants::TNodeTileType type, int tileId, TileConstants::TTileChannel channel, QString filename, Node *parent)
|
||||
{
|
||||
m_id = tileId;
|
||||
m_parentItem = parent;
|
||||
//nlinfo("dispalying tile %d - %s", m_tileId, m_tileFilename[TileModel::TileDiffuse].toAscii().data());
|
||||
|
||||
pvt = new TileItemNodePvt();
|
||||
m_hasError = false;
|
||||
|
||||
setTileFilename( channel, filename );
|
||||
}
|
||||
|
||||
TileItemNode::TileItemNode( TileConstants::TNodeTileType type, int tileId, Node *parent )
|
||||
{
|
||||
m_id = tileId;
|
||||
m_parentItem = parent;
|
||||
pvt = new TileItemNodePvt();
|
||||
m_hasError = false;
|
||||
|
||||
for( int i = 0; i < TileConstants::TileChannelCount; i++ )
|
||||
{
|
||||
setTileFilename( TileConstants::TTileChannel( i ), "" );
|
||||
}
|
||||
}
|
||||
|
||||
TileItemNode::~TileItemNode()
|
||||
|
|
|
@ -106,7 +106,6 @@ class TileItemNodePvt;
|
|||
class TileItemNode : public Node
|
||||
{
|
||||
public:
|
||||
TileItemNode( TileConstants::TNodeTileType type, int tileId, TileConstants::TTileChannel channel, QString filename, Node *parent=0);
|
||||
TileItemNode( TileConstants::TNodeTileType type, int tileId, Node *parent=0);
|
||||
virtual ~TileItemNode();
|
||||
QVariant data(int column, int role) const;
|
||||
|
|
|
@ -200,7 +200,7 @@ TileSetNode *TileModel::createTileSetNode(QString tileSetName)
|
|||
// TODO tie this to CTileSet::count from NeL
|
||||
for(int transPos=0; transPos<48; transPos++)
|
||||
{
|
||||
TileItemNode *transTile= new TileItemNode( TileConstants::TileTransition, transPos, TileConstants::TileDiffuse, QString("empty"));
|
||||
TileItemNode *transTile= new TileItemNode( TileConstants::TileTransition, transPos );
|
||||
tileTrans->appendRow(transTile);
|
||||
}
|
||||
|
||||
|
@ -212,7 +212,7 @@ TileSetNode *TileModel::createTileSetNode(QString tileSetName)
|
|||
// TODO tie this to CTileSet::CountDisplace from NeL
|
||||
for(int dispPos=0; dispPos<16; dispPos++)
|
||||
{
|
||||
TileItemNode *dispTile= new TileItemNode( TileConstants::TileDisplacement, dispPos, TileConstants::TileDiffuse, QString("empty"));
|
||||
TileItemNode *dispTile= new TileItemNode( TileConstants::TileDisplacement, dispPos );
|
||||
tileDisp->appendRow(dispTile);
|
||||
}
|
||||
|
||||
|
@ -222,20 +222,6 @@ TileSetNode *TileModel::createTileSetNode(QString tileSetName)
|
|||
return tileSet;
|
||||
}
|
||||
|
||||
TileItemNode *TileModel::createItemNode( int idx, TileConstants::TNodeTileType type, int id, TileConstants::TTileChannel channel, const QString &fileName )
|
||||
{
|
||||
TileItemNode *n = new TileItemNode( type, id, channel, fileName );
|
||||
|
||||
bool b = m_tileBank->addTile( idx, fileName, n->pixmap( channel ), channel, type );
|
||||
if( !b )
|
||||
{
|
||||
delete n;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
const char *TileModel::getTileTypeName(TileConstants::TNodeTileType type)
|
||||
{
|
||||
switch(type)
|
||||
|
@ -370,7 +356,8 @@ bool TileModel::addTile( int ts, int type, const QString &fileName, TileConstant
|
|||
|
||||
TileConstants::TNodeTileType t = TileConstants::TNodeTileType( type );
|
||||
|
||||
TileItemNode *item = new TileItemNode( t, tile, channel, fileName );
|
||||
TileItemNode *item = new TileItemNode( t, tile );
|
||||
item->setTileFilename( channel, fileName );
|
||||
|
||||
bool b = m_tileBank->addTile( ts, fileName, item->pixmap( channel ), channel, t );
|
||||
if( !b )
|
||||
|
|
|
@ -79,8 +79,6 @@ public:
|
|||
|
||||
void swapRows( int a, int b );
|
||||
|
||||
TileItemNode *createItemNode( int idx, TileConstants::TNodeTileType type, int id, TileConstants::TTileChannel channel, const QString &fileName );
|
||||
|
||||
static const char *getTileTypeName(TileConstants::TNodeTileType type);
|
||||
static uint32 getTileTypeSize(TileConstants::TNodeTileType type);
|
||||
|
||||
|
|
Loading…
Reference in a new issue