2020-01-01 21:29:24 +01:00
|
|
|
#ifndef SCREEN_H
|
|
|
|
#define SCREEN_H
|
|
|
|
|
|
|
|
#include <SDL.h>
|
|
|
|
|
2020-11-13 01:29:11 +01:00
|
|
|
#include "ScreenSettings.h"
|
|
|
|
|
2020-01-01 21:29:24 +01:00
|
|
|
class Screen
|
|
|
|
{
|
|
|
|
public:
|
2021-09-07 03:56:39 +02:00
|
|
|
void init(const ScreenSettings& settings);
|
|
|
|
void destroy(void);
|
2020-01-01 21:29:24 +01:00
|
|
|
|
2021-09-07 03:56:39 +02:00
|
|
|
void GetSettings(ScreenSettings* settings);
|
2020-12-22 01:34:16 +01:00
|
|
|
|
2021-09-07 03:56:39 +02:00
|
|
|
void LoadIcon(void);
|
2020-11-01 04:25:27 +01:00
|
|
|
|
2021-09-07 03:56:39 +02:00
|
|
|
void ResizeScreen(int x, int y);
|
|
|
|
void ResizeToNearestMultiple(void);
|
|
|
|
void GetWindowSize(int* x, int* y);
|
2020-01-01 21:29:24 +01:00
|
|
|
|
2021-09-07 03:56:39 +02:00
|
|
|
void UpdateScreen(SDL_Surface* buffer, SDL_Rect* rect);
|
|
|
|
void FlipScreen(bool flipmode);
|
2020-01-01 21:29:24 +01:00
|
|
|
|
2021-09-07 03:56:39 +02:00
|
|
|
const SDL_PixelFormat* GetFormat(void);
|
2020-01-01 21:29:24 +01:00
|
|
|
|
2021-09-07 03:56:39 +02:00
|
|
|
void toggleFullScreen(void);
|
2021-12-23 04:54:59 +01:00
|
|
|
void toggleScalingMode(void);
|
2021-09-07 03:56:39 +02:00
|
|
|
void toggleLinearFilter(void);
|
2021-09-15 05:23:22 +02:00
|
|
|
void toggleVSync(void);
|
2020-01-01 21:29:24 +01:00
|
|
|
|
2021-09-07 03:56:39 +02:00
|
|
|
bool isWindowed;
|
|
|
|
bool isFiltered;
|
|
|
|
bool badSignalEffect;
|
2021-12-23 04:54:59 +01:00
|
|
|
int scalingMode;
|
2021-09-07 03:56:39 +02:00
|
|
|
bool vsync;
|
2020-01-01 21:29:24 +01:00
|
|
|
|
2021-09-07 03:56:39 +02:00
|
|
|
SDL_Window *m_window;
|
|
|
|
SDL_Renderer *m_renderer;
|
|
|
|
SDL_Texture *m_screenTexture;
|
|
|
|
SDL_Surface* m_screen;
|
2020-01-01 21:29:24 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* SCREEN_H */
|