|
| SurfaceSdlGraphicsManager (SdlEventSource *sdlEventSource, SdlWindow *window) |
|
bool | hasFeature (OSystem::Feature f) const override |
|
void | setFeatureState (OSystem::Feature f, bool enable) override |
|
bool | getFeatureState (OSystem::Feature f) const override |
|
const OSystem::GraphicsMode * | getSupportedGraphicsModes () const override |
|
int | getDefaultGraphicsMode () const override |
|
bool | setGraphicsMode (int mode, uint flags=OSystem::kGfxModeNoFlags) override |
|
int | getGraphicsMode () const override |
|
uint | getDefaultScaler () const override |
|
uint | getDefaultScaleFactor () const override |
|
bool | setScaler (uint mode, int factor) override |
|
uint | getScaler () const override |
|
uint | getScaleFactor () const override |
|
void | initSize (uint w, uint h, const Graphics::PixelFormat *format=NULL) override |
|
int | getScreenChangeID () const override |
|
void | beginGFXTransaction () override |
|
OSystem::TransactionError | endGFXTransaction () override |
|
int16 | getHeight () const override |
|
int16 | getWidth () const override |
|
void | copyRectToScreen (const void *buf, int pitch, int x, int y, int w, int h) override |
|
Graphics::Surface * | lockScreen () override |
|
void | unlockScreen () override |
|
void | fillScreen (uint32 col) override |
|
void | fillScreen (const Common::Rect &r, uint32 col) override |
|
void | updateScreen () override |
|
void | setFocusRectangle (const Common::Rect &rect) override |
|
void | clearFocusRectangle () override |
|
Graphics::PixelFormat | getOverlayFormat () const override |
|
void | clearOverlay () override |
|
void | grabOverlay (Graphics::Surface &surface) const override |
|
void | copyRectToOverlay (const void *buf, int pitch, int x, int y, int w, int h) override |
|
int16 | getOverlayHeight () const override |
|
int16 | getOverlayWidth () const override |
|
void | setMouseCursor (const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale=false, const Graphics::PixelFormat *format=NULL, const byte *mask=NULL) override |
|
void | setMouseCursor (const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format, const byte *mask, bool disableKeyColor) |
|
void | setCursorPalette (const byte *colors, uint start, uint num) override |
|
bool | notifyEvent (const Common::Event &event) override |
|
void | notifyVideoExpose () override |
|
void | notifyResize (const int width, const int height) override |
|
| SdlGraphicsManager (SdlEventSource *source, SdlWindow *window) |
|
virtual void | activateManager () |
|
virtual void | deactivateManager () |
|
virtual bool | notifyMousePosition (Common::Point &mouse) |
|
Common::RotationMode | getRotationMode () const override |
|
virtual bool | showMouse (bool visible) override |
|
bool | lockMouse (bool lock) override |
|
void | saveScreenshot () override |
|
State | getState () const |
|
bool | setState (const State &state) |
|
SdlWindow * | getWindow () const |
|
void | initSizeHint (const Graphics::ModeList &modes) override |
|
Common::Keymap * | getKeymap () |
|
void | showOverlay (bool inGUI) override |
|
void | hideOverlay () override |
|
bool | isOverlayVisible () const override |
|
void | setShakePos (int shakeXOffset, int shakeYOffset) override |
|
int | getWindowWidth () const |
|
int | getWindowHeight () const |
|
virtual bool | setShader (const Common::Path &fileName) |
|
virtual const OSystem::GraphicsMode * | getSupportedStretchModes () const |
|
virtual int | getDefaultStretchMode () const |
|
virtual bool | setStretchMode (int mode) |
|
virtual int | getStretchMode () const |
|
virtual float | getHiDPIScreenFactor () const |
|
virtual void | displayMessageOnOSD (const Common::U32String &msg) |
|
virtual void | displayActivityIconOnOSD (const Graphics::Surface *icon) |
|
void | setPalette (const Graphics::Palette &pal, uint start=0) |
|
Graphics::Palette | grabPalette (uint start, uint num) |
|
virtual void | notifyPoll () |
|
|
void | setPalette (const byte *colors, uint start, uint num) override |
|
void | grabPalette (byte *colors, uint start, uint num) const override |
|
virtual void | initGraphicsSurface () |
|
Graphics::PixelFormat | convertSDLPixelFormat (SDL_PixelFormat *in) const |
|
bool | gameNeedsAspectRatioCorrection () const override |
|
int | getGameRenderScale () const override |
|
void | handleResizeImpl (const int width, const int height) override |
|
virtual void | setupHardwareSize () |
|
void | fixupResolutionForAspectRatio (AspectRatio desiredAspectRatio, int &width, int &height) const |
|
virtual void | addDirtyRect (int x, int y, int w, int h, bool inOverlay, bool realCoordinates=false) |
|
virtual void | drawMouse () |
|
virtual void | undrawMouse () |
|
virtual void | blitCursor () |
|
virtual void | internUpdateScreen () |
|
virtual void | updateScreen (SDL_Rect *dirtyRectList, int actualDirtyRects) |
|
virtual bool | loadGFXMode () |
|
virtual void | unloadGFXMode () |
|
virtual bool | hotswapGFXMode () |
|
virtual void | setAspectRatioCorrection (bool enable) |
|
void | setFilteringMode (bool enable) |
|
void | setVSync (bool enable) |
|
bool | saveScreenshot (const Common::Path &filename) const override |
|
virtual void | setGraphicsModeIntern () |
|
virtual void | getDefaultResolution (uint &w, uint &h) |
|
Common::Rect | getPreferredFullscreenResolution () |
|
bool | defaultGraphicsModeConfig () const |
|
void | getWindowSizeFromSdl (int *width, int *height) const |
|
virtual void | showSystemMouseCursor (bool visible) |
|
void | setSystemMousePosition (const int x, const int y) override |
|
void | notifyActiveAreaChanged () override |
|
Common::Point | convertVirtualToWindow (const int x, const int y) const |
|
Common::Point | convertWindowToVirtual (int x, int y) const |
|
frac_t | getDesiredGameAspectRatio () const |
|
void | handleResize (const int width, const int height) |
|
virtual void | recalculateDisplayAreas () |
|
bool | showMouse (bool visible) override |
|
void | warpMouse (int x, int y) override |
|
void | setMousePosition (int x, int y) |
|
void SurfaceSdlGraphicsManager::grabPalette |
( |
byte * |
colors, |
|
|
uint |
start, |
|
|
uint |
num |
|
) |
| const |
|
overrideprotectedvirtual |
Grabs a specified part of the currently active palette. The format is the same as for setPalette.
This should return exactly the same RGB data as was setup via previous setPalette calls.
For example, for every valid value of start and num of the following code:
byte origPal[num*3]; // Setup origPal's data however you like g_system->setPalette(origPal, start, num); byte obtainedPal[num*3]; g_system->grabPalette(obtainedPal, start, num);
the following should be true:
memcmp(origPal, obtainedPal, num*3) == 0
- See also
- setPalette
- Parameters
-
colors | the palette data, in interleaved RGB format |
start | the first platte entry to be read |
num | the number of palette entries to be read |
- Note
- It is an error if this function gets called when the pixel format in use (the return value of getScreenFormat) has more than one byte per pixel.
- See also
- getScreenFormat
Implements GraphicsManager.