- improved animatedtiles function especially for hint message boxes

- tile animation bugs in some levels of ep2 have been fixed


git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@196 4df4b0f3-56ce-47cb-b001-ed939b7d65a6
This commit is contained in:
gerstrong
2009-07-31 17:08:49 +00:00
parent caa7fd2244
commit ee00c0f49b
8 changed files with 31 additions and 104 deletions

View File

@@ -125,34 +125,38 @@ bool CTileLoader::load()
}
int value;
for( j=0 ; j < numtiles ; j++ )
for( j=0 ; j < numtiles ;)
{
value = TileProperty[j][0];
// stuff for animated tiles
if(value == 1)
{
tiles[j].animOffset = 0; // starting offset from the base frame
tiles[j++].animOffset = 0; // starting offset from the base frame
}
else if( value == 2 )
{
tiles[j++].animOffset = 0; // starting offset from the base frame
tiles[j].animOffset = 1; // starting offset from the base frame
tiles[j++].animOffset = 1; // starting offset from the base frame
}
else
{
tiles[j++].animOffset = 0; // starting offset from the base frame
tiles[j++].animOffset = 1; // starting offset from the base frame
tiles[j++].animOffset = 2; // starting offset from the base frame
tiles[j].animOffset = 3; // starting offset from the base frame
tiles[j++].animOffset = 3; // starting offset from the base frame
}
}
for(i=0 ; i<numtiles ; i++)
{
printf("tile %d: %d\n",i,TileProperty[i][0]);
}
// This function assigns the correct tiles that have to be changed
assignChangeTileAttribute(tiles);
return true;
return true;
}
void CTileLoader::assignChangeTileAttribute(stTile *tile)