From d3a1daf3833df9b1a3b996166b5e6a03140e7e40 Mon Sep 17 00:00:00 2001 From: Nimac0 Date: Mon, 14 Oct 2024 20:47:11 +0200 Subject: [PATCH] refactor: remove obsolete code --- include/GameObject.h | 21 --------------------- src/GameObject.cpp | 36 ------------------------------------ 2 files changed, 57 deletions(-) delete mode 100644 include/GameObject.h delete mode 100644 src/GameObject.cpp diff --git a/include/GameObject.h b/include/GameObject.h deleted file mode 100644 index 1c209ae..0000000 --- a/include/GameObject.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once -#include - -class GameObject -{ -public: - GameObject(const char* texturesheet, int x, int y); - ~GameObject() = default; - - void update(); - void render(); - -private: - int xPos; - int yPos; - - SDL_Texture* objTexture; - SDL_Rect srcRect; - SDL_Rect destRect; -}; - diff --git a/src/GameObject.cpp b/src/GameObject.cpp deleted file mode 100644 index 24a4665..0000000 --- a/src/GameObject.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "GameObject.h" - -#include "SDL_error.h" -#include "TextureManager.h" -#include "GameInternal.h" - -GameObject::GameObject(const char* texturesheet, int x, int y) -{ - // seems not to be used, and was using deprecated functionality - SDL_SetError("GameObject not implemented"); - - this->xPos = x; - this->yPos = y; -} - -void GameObject::update() -{ - xPos++; - yPos++; - - srcRect.h = 32; - srcRect.w = 32; - srcRect.x = 0; - srcRect.y = 0; - - destRect.h = srcRect.h *2; - destRect.w = srcRect.w *2; - destRect.x = xPos; - destRect.y = yPos; -} - -void GameObject::render() -{ - SDL_SetError("GameObject not implemented"); - // SDL_RenderCopy(Game::renderer, objTexture, &srcRect, &destRect); -}