mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-06-26 14:38:30 +02:00
This includes: - Removing the constructor in favor of actually being able to see that there's an actual function called being made initializing the struct - Removing the use of a reference in Screen::init() in favor of using a pointer - Adding the struct qualifier everywhere (it's not much typing), although technically you could typedef it in C, but I'd rather much not typedef just to remove a tag qualifier
49 lines
970 B
C++
49 lines
970 B
C++
#ifndef SCREEN_H
|
|
#define SCREEN_H
|
|
|
|
#include <SDL.h>
|
|
|
|
#include "ScreenSettings.h"
|
|
|
|
class Screen
|
|
{
|
|
public:
|
|
void init(const struct ScreenSettings* settings);
|
|
void destroy(void);
|
|
|
|
void GetSettings(struct ScreenSettings* settings);
|
|
|
|
void LoadIcon(void);
|
|
|
|
void ResizeScreen(int x, int y);
|
|
void ResizeToNearestMultiple(void);
|
|
void GetWindowSize(int* x, int* y);
|
|
|
|
void UpdateScreen(SDL_Surface* buffer, SDL_Rect* rect);
|
|
void FlipScreen(bool flipmode);
|
|
|
|
const SDL_PixelFormat* GetFormat(void);
|
|
|
|
void toggleFullScreen(void);
|
|
void toggleScalingMode(void);
|
|
void toggleLinearFilter(void);
|
|
void toggleVSync(void);
|
|
|
|
bool isWindowed;
|
|
bool isFiltered;
|
|
bool badSignalEffect;
|
|
int scalingMode;
|
|
bool vsync;
|
|
|
|
SDL_Window *m_window;
|
|
SDL_Renderer *m_renderer;
|
|
SDL_Texture *m_screenTexture;
|
|
SDL_Surface* m_screen;
|
|
};
|
|
|
|
#ifndef GAMESCREEN_DEFINITION
|
|
extern Screen gameScreen;
|
|
#endif
|
|
|
|
#endif /* SCREEN_H */
|