2020-01-01 21:29:24 +01:00
|
|
|
#ifndef SCREEN_H
|
|
|
|
#define SCREEN_H
|
|
|
|
|
|
|
|
#include <SDL.h>
|
|
|
|
|
|
|
|
class Screen
|
|
|
|
{
|
|
|
|
public:
|
2020-06-13 20:44:01 +02:00
|
|
|
void init();
|
2020-01-01 21:29:24 +01:00
|
|
|
|
2020-03-13 23:22:37 +01:00
|
|
|
void ResizeScreen(int x, int y);
|
2020-01-01 21:29:24 +01:00
|
|
|
void GetWindowSize(int* x, int* y);
|
|
|
|
|
|
|
|
void UpdateScreen(SDL_Surface* buffer, SDL_Rect* rect);
|
|
|
|
void FlipScreen();
|
|
|
|
|
|
|
|
const SDL_PixelFormat* GetFormat();
|
|
|
|
|
2020-03-13 23:22:37 +01:00
|
|
|
void toggleFullScreen();
|
2020-01-01 21:29:24 +01:00
|
|
|
void toggleStretchMode();
|
|
|
|
void toggleLinearFilter();
|
|
|
|
|
|
|
|
bool isWindowed;
|
|
|
|
bool isFiltered;
|
|
|
|
bool badSignalEffect;
|
|
|
|
int stretchMode;
|
|
|
|
|
|
|
|
SDL_Window *m_window;
|
|
|
|
SDL_Renderer *m_renderer;
|
|
|
|
SDL_Texture *m_screenTexture;
|
|
|
|
SDL_Surface* m_screen;
|
|
|
|
|
|
|
|
SDL_Rect filterSubrect;
|
|
|
|
};
|
|
|
|
|
2020-06-13 20:44:01 +02:00
|
|
|
extern Screen gameScreen;
|
2020-01-01 21:29:24 +01:00
|
|
|
|
|
|
|
#endif /* SCREEN_H */
|