mirror of
https://github.com/Nimac0/SDL_Minigame
synced 2026-01-12 10:13:42 +00:00
refactor: remove obsolete code
This commit is contained in:
parent
a5123b866c
commit
d3a1daf383
@ -1,21 +0,0 @@
|
||||
#pragma once
|
||||
#include <SDL.h>
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
@ -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);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user