0
0
mirror of https://github.com/Nimac0/SDL_Minigame synced 2026-01-12 15:53:42 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Benedikt Galbavy
0179a27aaf
Merge pull request #77 from VEGO-Engine/#69-delete-gameobject
refactor: remove obsolete code
2024-10-17 19:21:21 +02:00
d3a1daf383 refactor: remove obsolete code 2024-10-14 20:47:11 +02:00
2 changed files with 0 additions and 57 deletions

View File

@ -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;
};

View File

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