Testing
This commit is contained in:
@@ -74,26 +74,26 @@ inline void adjustRect(SDL_Rect *rect, SDL_Rect playerRect) {
|
||||
// return x > 0 && y > 0 && x < DISPLAY_WIDTH && y < DISPLAY_HEIGHT;
|
||||
//}
|
||||
|
||||
//bool isInboundsRect(SDL_Rect rect) {
|
||||
// if (isInbounds(rect.x, rect.y)) {
|
||||
//bool isInboundsRect(SDL_Rect tileRect) {
|
||||
// if (isInbounds(tileRect.x, tileRect.y)) {
|
||||
// return true;
|
||||
// }
|
||||
// if (rect.x < 0) {
|
||||
// rect.x += rect.w;
|
||||
// if (tileRect.x < 0) {
|
||||
// tileRect.x += tileRect.w;
|
||||
// }
|
||||
// if (rect.y < 0) {
|
||||
// rect.y += rect.h;
|
||||
// if (tileRect.y < 0) {
|
||||
// tileRect.y += tileRect.h;
|
||||
// }
|
||||
// if (isInbounds(rect.x, rect.y)) {
|
||||
// if (isInbounds(tileRect.x, tileRect.y)) {
|
||||
// return true;
|
||||
// }
|
||||
// if (rect.x > DISPLAY_WIDTH) {
|
||||
// rect.x -= rect.w;
|
||||
// if (tileRect.x > DISPLAY_WIDTH) {
|
||||
// tileRect.x -= tileRect.w;
|
||||
// }
|
||||
// if (rect.y > DISPLAY_HEIGHT) {
|
||||
// rect.y -= rect.h;
|
||||
// if (tileRect.y > DISPLAY_HEIGHT) {
|
||||
// tileRect.y -= tileRect.h;
|
||||
// }
|
||||
// return isInbounds(rect.x, rect.y);
|
||||
// return isInbounds(tileRect.x, tileRect.y);
|
||||
//}
|
||||
|
||||
void initPlayer(Player *plr) {
|
||||
@@ -163,7 +163,6 @@ void renderPlayer(Player *plr) {
|
||||
SDL_SetRenderDrawColor(mainRenderer, 0, 0, 0, 0);
|
||||
|
||||
SDL_SetRenderTarget(mainRenderer, entityTexture);
|
||||
SDL_RenderClear(mainRenderer);
|
||||
SDL_RenderCopy(mainRenderer, atlasTexture, &playerTextureRect, &PlayerRect);
|
||||
//SDL_RenderCopy(mainRenderer, PlayerTexture, NULL, &PlayerRect);
|
||||
SDL_SetRenderTarget(mainRenderer, hudTexture);
|
||||
|
Reference in New Issue
Block a user