Advertisement

cannot clip the NPC

Started by July 18, 2001 04:23 AM
0 comments, last by VanVan 23 years, 5 months ago
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);
Just a guess, shouldn''t "rcSrc.top -=" actually be "rcSrc.top +="?

This topic is closed to new replies.

Advertisement