Sistema para poder colocar tapetes nas paredes,balões,etc...
em cylinder.h apos outras frag add :
FLAG_FROMSOUTH = 8, FLAG_FROMEAST = 16,
em game.cpp troque :
ret = internalMoveItem(fromCylinder, toCylinder, index, item, count);
por:
int flags = 0; if(playerPos.x >= toPos.x) flags |= FLAG_FROMEAST; if(playerPos.y >= toPos.y) flags |= FLAG_FROMSOUTH; ret = internalMoveItem(fromCylinder, toCylinder, index, item, count, flags);
em tile.cpp antes de:
for(uint32_t i = 0; i < getThingCount(); ++i){
add :
bool supportsHangableItems = false; bool hasHangable = false;
embaixo de:
const ItemType& iiType = Item::items[iitem->getID()];
add :
if(item->isHangable() && iiType.isHangable){ hasHangable = true; }
depois de :
if(iiType.blockSolid){
add:
if(item->isHangable() && iiType.blockProjectile && (iiType.isHorizontal || iiType.isVertical)){ supportsHangableItems = true; if(iiType.isHorizontal && !(flags & FLAG_FROMSOUTH)) return RET_NOTPOSSIBLE; else if(iiType.isVertical && !(flags & FLAG_FROMEAST)) return RET_NOTPOSSIBLE; else continue; }
e depois do loop
add
if(item->isHangable() && supportsHangableItems && hasHangable){ return RET_NOTENOUGHROOM; }
é isso
flws :hi: