Unfortunately, the project was not welcomed by the community, therefore I finish the work on it.
In the meantime I wrote idle animation system from scratch, I added possibility to edit outfit properties from the notepad, like bars position, flying animation, centered outfit, example:
Code:
outfit
715
bars-offset-y: 15
idle-animation-frames: 2
center: true
I worked also on APNGLoader and upgraded it to APNG Disassembler 2.5 from 2.3.
If you want it, there it is:
APNG Disassembler - Browse /2.5 at SourceForge.net (https://sourceforge.net/projects/apngdis/files/2.5/)
I cached LuaObject::getClassName().
Thank you for helping those who helped.
I am also sending you the first point from the Edubart's list:
In map.h under:
C++:
bool isCovered(const Position& pos, int firstFloor = 0);
Paste:
C++:
bool posIsInRange(const Position& pos);
In map.cpp under a function:
C++:
bool Map::isCovered(const Position& pos, int firstFloor)
Paste:
C++:
bool Map::posIsInRange(const Position& pos)
{
bool inRange = true;
LocalPlayerPtr localPlayer = g_game.getLocalPlayer();
if(localPlayer){
Position localPos = localPlayer->getPosition();
int dz = pos.z - localPos.z;
Position checkPos = pos.translated(dz, dz);
const TilePtr& borderTile = getTile(pos);
bool outOfRangeY = false;
if(abs(checkPos.y - localPos.y) > Otc::RANGE_TOP){
outOfRangeY = true;
}
bool outOfRangeX = false;
if(abs(checkPos.x - localPos.x) > Otc::RANGE_LEFT){
outOfRangeX = true;
}
if(!localPlayer->isWalking()){
if(outOfRangeY || outOfRangeX){
if((((checkPos.y > localPos.y) && !outOfRangeX) || checkPos.x > localPos.x)){
if(borderTile->isSingleDimension()){
inRange = false;
}
}
else
{
inRange = false;
}
}
}
else
{
Otc::Direction dir = localPlayer->getDirection();
switch(dir) {
case Otc::North:
if(outOfRangeX){
if(checkPos.x > localPos.x){
if(borderTile->isSingleDimension()){
inRange = false;
}
}
else
{
inRange = false;
}
}
else if(((checkPos.y - localPos.y) > Otc::RANGE_TOP) && borderTile->isSingleDimension()){
inRange = false;
}
break;
case Otc::South:
if(outOfRangeX){
if(checkPos.x > localPos.x){
if(borderTile->isSingleDimension()){
inRange = false;
}
}
else
{
inRange = false;
}
}
else if((localPos.y - checkPos.y) > Otc::RANGE_TOP){
inRange = false;
}
break;
case Otc::West:
if(outOfRangeY){
if(((checkPos.y > localPos.y) && !outOfRangeX)){
if(borderTile->isSingleDimension()){
inRange = false;
}
}
else
{
inRange = false;
}
}
else if(((checkPos.x - localPos.x) > Otc::RANGE_LEFT) && borderTile->isSingleDimension()){
inRange = false;
}
break;
case Otc::East:
if(outOfRangeY){
if(((checkPos.y > localPos.y) && !outOfRangeX)){
if(borderTile->isSingleDimension()){
inRange = false;
}
}
else
{
inRange = false;
}
}
else if((localPos.x - checkPos.x) > Otc::RANGE_LEFT){
inRange = false;
}
break;
case Otc::NorthEast:
if(((checkPos.y - localPos.y) > Otc::RANGE_TOP) && borderTile->isSingleDimension()){
inRange = false;
}
else if((localPos.x - checkPos.x) > Otc::RANGE_LEFT){
inRange = false;
}
break;
case Otc::SouthEast:
if((localPos.y - checkPos.y) > Otc::RANGE_TOP){
inRange = false;
}
else if((localPos.x - checkPos.x) > Otc::RANGE_LEFT){
inRange = false;
}
break;
case Otc::SouthWest:
if((localPos.y - checkPos.y) > Otc::RANGE_TOP){
inRange = false;
}
else if(((checkPos.x - localPos.x) > Otc::RANGE_LEFT) && borderTile->isSingleDimension()){
inRange = false;
}
break;
case Otc::NorthWest:
if(((checkPos.y - localPos.y) > Otc::RANGE_TOP) && borderTile->isSingleDimension()){
inRange = false;
}
else if(((checkPos.x - localPos.x) > Otc::RANGE_LEFT) && borderTile->isSingleDimension()){
inRange = false;
}
break;
case Otc::InvalidDirection:
inRange = false;
break;
}
}
}
return inRange;
}
In mapview.cpp under:
C++:
// skip tiles that have nothing
if(!tile->isDrawable())
continue;
Paste:
C++:
// skip tiles that are not in our range
if(!g_map.posIsInRange(tilePos))
continue;
In const.h under:
C++:
TILE_PIXELS = 32,
MAX_ELEVATION = 24,
Paste:
C++:
RANGE_LEFT = 8,
RANGE_TOP = 6,
In map.cpp the function:
C++:
void Map::resetAwareRange()
Change to:
C++:
void Map::resetAwareRange()
{
AwareRange range;
range.left = Otc::RANGE_LEFT;
range.top = Otc::RANGE_TOP;
range.bottom = range.top + 1;
range.right = range.left + 1;
setAwareRange(range);
}
Best regards,
Adrik