-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscreen.h
More file actions
53 lines (45 loc) · 1.21 KB
/
screen.h
File metadata and controls
53 lines (45 loc) · 1.21 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
52
53
#ifndef __SCREEN_H__
#define __SCREEN_H__
#include "SDL.h"
#include "SDL_render.h"
#include "SDL_video.h"
#include <cassert>
#include <vector>
#include <list>
class Screen
{
private:
SDL_Surface *screen;
SDL_Texture *texture;
SDL_Renderer *renderer;
SDL_Window *window;
bool fullScreen;
SDL_Surface *mouseImage;
SDL_Surface *mouseSave;
bool mouseVisible;
int maxRegionsList;
int saveX, saveY;
bool niceCursor;
SDL_Cursor *cursor, *emptyCursor;
public:
Screen();
~Screen();
public:
int getWidth() const;
int getHeight() const;
void setFullScreen(bool enable);
void centerMouse();
void setMouseImage(SDL_Surface *image);
void hideMouse();
void showMouse();
void updateMouse();
void flush();
void setPixel(int x, int y, int r, int g, int b);
SDL_Surface* getSurface() { return screen; };
void draw(int x, int y, SDL_Surface *surface);
void setCursor(bool nice);
void initCursors();
void doneCursors();
SDL_Surface* createSubimage(int x, int y, int width, int height);
};
#endif