mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-06-26 14:38:30 +02:00
Instead of passing the error codes out of the function, just handle the errors directly as they happen, and fail gracefully if something goes wrong instead of continuing.
41 lines
642 B
C++
41 lines
642 B
C++
#ifndef SCREEN_H
|
|
#define SCREEN_H
|
|
|
|
#include <SDL.h>
|
|
|
|
class Screen
|
|
{
|
|
public:
|
|
Screen();
|
|
|
|
void ResizeScreen(int x, int y);
|
|
void GetWindowSize(int* x, int* y);
|
|
|
|
void UpdateScreen(SDL_Surface* buffer, SDL_Rect* rect);
|
|
void ClearScreen(int colour);
|
|
void FlipScreen();
|
|
|
|
const SDL_PixelFormat* GetFormat();
|
|
|
|
void toggleFullScreen();
|
|
void toggleStretchMode();
|
|
void toggleLinearFilter();
|
|
|
|
bool isWindowed;
|
|
bool isFiltered;
|
|
bool badSignalEffect;
|
|
bool glScreen;
|
|
int stretchMode;
|
|
|
|
SDL_Window *m_window;
|
|
SDL_Renderer *m_renderer;
|
|
SDL_Texture *m_screenTexture;
|
|
SDL_Surface* m_screen;
|
|
|
|
SDL_Rect filterSubrect;
|
|
};
|
|
|
|
|
|
|
|
#endif /* SCREEN_H */
|