mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-11 01:40:13 +00:00
Set all images by default.
This commit is contained in:
parent
066743bea0
commit
7912cbe7dc
4 changed files with 9 additions and 32 deletions
|
@ -300,24 +300,17 @@ private:
|
||||||
TileConstants::TTileChannel TileItemNode::s_displayChannel = TileConstants::TileDiffuse;
|
TileConstants::TTileChannel TileItemNode::s_displayChannel = TileConstants::TileDiffuse;
|
||||||
int TileItemNode::s_alphaRot = 0;
|
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 )
|
TileItemNode::TileItemNode( TileConstants::TNodeTileType type, int tileId, Node *parent )
|
||||||
{
|
{
|
||||||
m_id = tileId;
|
m_id = tileId;
|
||||||
m_parentItem = parent;
|
m_parentItem = parent;
|
||||||
pvt = new TileItemNodePvt();
|
pvt = new TileItemNodePvt();
|
||||||
m_hasError = false;
|
m_hasError = false;
|
||||||
|
|
||||||
|
for( int i = 0; i < TileConstants::TileChannelCount; i++ )
|
||||||
|
{
|
||||||
|
setTileFilename( TileConstants::TTileChannel( i ), "" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TileItemNode::~TileItemNode()
|
TileItemNode::~TileItemNode()
|
||||||
|
|
|
@ -106,7 +106,6 @@ class TileItemNodePvt;
|
||||||
class TileItemNode : public Node
|
class TileItemNode : public Node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TileItemNode( TileConstants::TNodeTileType type, int tileId, TileConstants::TTileChannel channel, QString filename, Node *parent=0);
|
|
||||||
TileItemNode( TileConstants::TNodeTileType type, int tileId, Node *parent=0);
|
TileItemNode( TileConstants::TNodeTileType type, int tileId, Node *parent=0);
|
||||||
virtual ~TileItemNode();
|
virtual ~TileItemNode();
|
||||||
QVariant data(int column, int role) const;
|
QVariant data(int column, int role) const;
|
||||||
|
|
|
@ -200,7 +200,7 @@ TileSetNode *TileModel::createTileSetNode(QString tileSetName)
|
||||||
// TODO tie this to CTileSet::count from NeL
|
// TODO tie this to CTileSet::count from NeL
|
||||||
for(int transPos=0; transPos<48; transPos++)
|
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);
|
tileTrans->appendRow(transTile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ TileSetNode *TileModel::createTileSetNode(QString tileSetName)
|
||||||
// TODO tie this to CTileSet::CountDisplace from NeL
|
// TODO tie this to CTileSet::CountDisplace from NeL
|
||||||
for(int dispPos=0; dispPos<16; dispPos++)
|
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);
|
tileDisp->appendRow(dispTile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,20 +222,6 @@ TileSetNode *TileModel::createTileSetNode(QString tileSetName)
|
||||||
return tileSet;
|
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)
|
const char *TileModel::getTileTypeName(TileConstants::TNodeTileType type)
|
||||||
{
|
{
|
||||||
switch(type)
|
switch(type)
|
||||||
|
@ -370,7 +356,8 @@ bool TileModel::addTile( int ts, int type, const QString &fileName, TileConstant
|
||||||
|
|
||||||
TileConstants::TNodeTileType t = TileConstants::TNodeTileType( type );
|
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 );
|
bool b = m_tileBank->addTile( ts, fileName, item->pixmap( channel ), channel, t );
|
||||||
if( !b )
|
if( !b )
|
||||||
|
|
|
@ -79,8 +79,6 @@ public:
|
||||||
|
|
||||||
void swapRows( int a, int b );
|
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 const char *getTileTypeName(TileConstants::TNodeTileType type);
|
||||||
static uint32 getTileTypeSize(TileConstants::TNodeTileType type);
|
static uint32 getTileTypeSize(TileConstants::TNodeTileType type);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue