43 int _baseWidth, _baseHeight;
44 double _scaleX, _scaleY;
45 int _topBlackBand, _bottomBlackBand, _leftBlackBand, _rightBlackBand, _cursorTopBlackBand, _cursorLeftBlackBand;
47 SDL_Color deferredPalette[256];
48 int _numColors, _firstColor;
54 void makeVideoFlags();
56 static const int ORIGINAL_WIDTH;
57 static const int ORIGINAL_HEIGHT;
76 void setPalette(SDL_Color *colors,
int firstcolor = 0,
int ncolors = 256,
bool immediately =
false);
94 void screenshot(
const std::string &filename)
const;
100 static void updateScale(
int type,
int &width,
int &height,
bool change);
Container for all the information associated with a given user action, like mouse clicks...
Definition: Action.h:32
void clear()
Clears the screen.
Definition: Screen.cpp:214
Screen()
Creates a new display screen.
Definition: Screen.cpp:107
int getWidth() const
Gets the screen's width.
Definition: Screen.cpp:283
int getHeight() const
Gets the screen's height.
Definition: Screen.cpp:292
int getCursorTopBlackBand() const
Gets the screen's top black forbidden to cursor band's height.
Definition: Screen.cpp:492
int getCursorLeftBlackBand() const
Gets the screen's left black forbidden to cursor band's width.
Definition: Screen.cpp:501
~Screen()
Cleans up the display screen.
Definition: Screen.cpp:117
int getDY() const
Get vertical offset.
Definition: Screen.cpp:598
void handle(Action *action)
Handles keyboard events.
Definition: Screen.cpp:137
static bool use32bitScaler()
Checks whether a 32bit scaler is requested and works for the selected resolution. ...
Definition: Screen.cpp:545
int getDX() const
Get horizontal offset.
Definition: Screen.cpp:589
static bool useOpenGL()
Checks whether OpenGL output is requested.
Definition: Screen.cpp:576
double getXScale() const
Gets the screen's X scale.
Definition: Screen.cpp:474
Element that is blit (rendered) onto the screen.
Definition: Surface.h:38
static void updateScale(int type, int &width, int &height, bool change)
update the game scale as required.
Definition: Screen.cpp:610
double getYScale() const
Gets the screen's Y scale.
Definition: Screen.cpp:483
void setPalette(SDL_Color *colors, int firstcolor=0, int ncolors=256, bool immediately=false)
Sets the screen's 8bpp palette.
Definition: Screen.cpp:228
Surface * getSurface()
Gets the internal buffer.
Definition: Screen.cpp:127
A display screen, handles rendering onto the game window.
Definition: Screen.h:38
void screenshot(const std::string &filename) const
Takes a screenshot.
Definition: Screen.cpp:510
SDL_Color * getPalette() const
Gets the screen's 8bpp palette.
Definition: Screen.cpp:274
void flip()
Renders the screen onto the game window.
Definition: Screen.cpp:181
Definition: BaseInfoState.cpp:40
void resetDisplay(bool resetVideo=true)
Resets the screen display.
Definition: Screen.cpp:302