-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrendermanager.h
More file actions
executable file
·52 lines (34 loc) · 1.01 KB
/
rendermanager.h
File metadata and controls
executable file
·52 lines (34 loc) · 1.01 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include "kiss_sdl/kiss_sdl.h"
//#include <stdio.h>
#include <iostream>
#include <memory>
class RenderManager
{
private:
SDL_Renderer* renderer;
int width;
int height;
int cellWidth;
kiss_window window1;
kiss_array objects;
public:
RenderManager();
void Cleanup();
void Update();
void Delay();
SDL_Renderer* GetSDLRenderer();
kiss_window* GetWindow(){ return &window1; };
int GetWidth(){ return width; };
int GetHeight(){ return height; };
int GetCellWidth(){ return cellWidth; };
std::shared_ptr<SDL_Texture> createTexture(std::string image);
void DrawSprite(int x, int y, int width, int height, SDL_Surface* sprite);
void DrawRectangle(int x, int y, int width, int height, SDL_Surface* rectangle);
void DrawTexture(SDL_Texture* texture, int x, int y);//, SDL_Rect rect);
void DrawTexture(SDL_Texture* texture, int x, int y, int w, int
h);
void DrawTextureReal(SDL_Texture* texture, int x, int y, int w, int
h);
};