Original Post
Okay I made a few changes to my program, but it still doesnt work. I was just wondering if maybe someone else had a similiar tile engine and could maybe spot a problem with my code. The tiles move one tile at a time, but not smoothly. Anyone see anything wrong?
for(int y=0;y<numtilesy+1;y++)
{
for(int x=0;x<numtilesx+1;x++)
{
//mapspritedraw();
int scrollx=worldx/tiledimx;
int scrolly=worldy/tiledimy;
offsety=scrolly % tiledimy;
offsetx=scrollx % tiledimx;
tilecoord.x=(x*tiledimx)-offsetx;
tilecoord.y=(y*tiledimy)-offsety;
TileLookUp(97,32,32,map[scrolly+y][scrollx+x],rect);
mapsprite.Draw(anobject->pTexture,▭,NULL, NULL, 0.0f,&tilecoord,0xffffffff);
}
}