• Advertisement

Archived

This topic is now archived and is closed to further replies.

cannot clip the NPC

This topic is 6033 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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);

Share this post


Link to post
Share on other sites
Advertisement
Just a guess, shouldn''t "rcSrc.top -=" actually be "rcSrc.top +="?

Share this post


Link to post
Share on other sites

  • Advertisement