cannot clip the NPC
Sorry, can anyone tell me that i can only clip the bottom side of tile while i move the tile down, but i cannot clip the top side of tile while i move the tile up
thanks regard!!!
//*** D key
if (GetAsyncKeyState(0x44))
{
SPosY += 1;
}
//*** E key
if (GetAsyncKeyState(0x45))
{
SPosY -= 1;
}
RECT rcSrc {0, 0, 32, 32};
//If this tile is off the top of the screen...
if (SPosY < 0)
{
rcSrc.top -= SPosY;
}
//If this tile is off the bottom of the screen...
if ((SPRITE_DIAMETER + SPosY ) > SCREEN_HEIGHT)
rcSrc.bottom -= SPosY + SPRITE_DIAMETER - SCREEN_HEIGHT;
g_pDisplay->Blt( SPosX,SPosY, g_pAnimationSurface, &rcSrc);
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement