forked from ManalHasan/OOP-Project-Manal-Moiz-Naaseh
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObject.hpp
More file actions
25 lines (22 loc) · 677 Bytes
/
Object.hpp
File metadata and controls
25 lines (22 loc) · 677 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once
#include <SDL.h>
#include <SDL_image.h>
#include <iostream>
//Abstract class and parent of background, obstacle, player
class Object{
private:
SDL_Rect src,dest;
SDL_Texture* Tex;
public:
Object();
//mutators for SDL_Rects
void setSource(int x, int y, int w, int h);
void setDest(int x, int y, int w, int h);
//Accessors of SDL_Rects
SDL_Texture* getTexture();
SDL_Rect& getSrc();
SDL_Rect& getDest();
void CreateTexture(const char* address, SDL_Renderer* ren);
virtual void Render(SDL_Renderer* ren)=0;
virtual ~Object();
};