#include <graphics.h>
Public Member Functions | |
virtual bool | hasFeature (OSystem::Feature f) const =0 |
virtual void | setFeatureState (OSystem::Feature f, bool enable)=0 |
virtual bool | getFeatureState (OSystem::Feature f) const =0 |
virtual const OSystem::GraphicsMode * | getSupportedGraphicsModes () const |
virtual int | getDefaultGraphicsMode () const |
virtual bool | setGraphicsMode (int mode, uint flags=OSystem::kGfxModeNoFlags) |
virtual int | getGraphicsMode () 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 Common::RotationMode | getRotationMode () const |
virtual uint | getDefaultScaler () const |
virtual uint | getDefaultScaleFactor () const |
virtual bool | setScaler (uint mode, int factor) |
virtual uint | getScaler () const |
virtual uint | getScaleFactor () const |
virtual void | initSize (uint width, uint height, const Graphics::PixelFormat *format=NULL)=0 |
virtual void | initSizeHint (const Graphics::ModeList &modes) |
virtual int | getScreenChangeID () const =0 |
virtual void | beginGFXTransaction ()=0 |
virtual OSystem::TransactionError | endGFXTransaction ()=0 |
virtual int16 | getHeight () const =0 |
virtual int16 | getWidth () const =0 |
virtual void | setPalette (const byte *colors, uint start, uint num)=0 |
virtual void | grabPalette (byte *colors, uint start, uint num) const =0 |
virtual void | copyRectToScreen (const void *buf, int pitch, int x, int y, int w, int h)=0 |
virtual Graphics::Surface * | lockScreen ()=0 |
virtual void | unlockScreen ()=0 |
virtual void | fillScreen (uint32 col)=0 |
virtual void | fillScreen (const Common::Rect &r, uint32 col)=0 |
virtual void | updateScreen ()=0 |
virtual void | setShakePos (int shakeXOffset, int shakeYOffset)=0 |
virtual void | setFocusRectangle (const Common::Rect &rect)=0 |
virtual void | clearFocusRectangle ()=0 |
virtual void | showOverlay (bool inGUI)=0 |
virtual void | hideOverlay ()=0 |
virtual bool | isOverlayVisible () const =0 |
virtual Graphics::PixelFormat | getOverlayFormat () const =0 |
virtual void | clearOverlay ()=0 |
virtual void | grabOverlay (Graphics::Surface &surface) const =0 |
virtual void | copyRectToOverlay (const void *buf, int pitch, int x, int y, int w, int h)=0 |
virtual int16 | getOverlayHeight () const =0 |
virtual int16 | getOverlayWidth () const =0 |
virtual float | getHiDPIScreenFactor () const |
virtual bool | showMouse (bool visible)=0 |
virtual void | warpMouse (int x, int y)=0 |
virtual void | setMouseCursor (const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale=false, const Graphics::PixelFormat *format=nullptr, const byte *mask=nullptr)=0 |
virtual void | setCursorPalette (const byte *colors, uint start, uint num)=0 |
virtual void | displayMessageOnOSD (const Common::U32String &msg) |
virtual void | displayActivityIconOnOSD (const Graphics::Surface *icon) |
virtual void | saveScreenshot () |
virtual bool | lockMouse (bool lock) |
Public Member Functions inherited from PaletteManager | |
void | setPalette (const Graphics::Palette &pal, uint start=0) |
Graphics::Palette | grabPalette (uint start, uint num) |
Abstract class for graphics manager. Subclasses implement the real functionality.
|
pure virtual |
Replace the specified range of the palette with new colors. The palette entries from 'start' till (start+num-1) will be replaced - so a full palette update is accomplished via start=0, num=256.
The palette data is specified in interleaved RGB format. That is, the first byte of the memory block 'colors' points at is the red component of the first new color; the second byte the green component of the first new color; the third byte the blue component, the last byte to the alpha (transparency) value. Then the second color starts, and so on. So memory looks like this: R1-G1-B1-R2-G2-B2-R3-...
colors | the new palette data, in interleaved RGB format |
start | the first palette entry to be updated |
num | the number of palette entries to be updated |
Implements PaletteManager.
Implemented in OpenGL::OpenGLGraphicsManager, LibretroGraphics, AndroidGraphics3dManager, SurfaceSdlGraphicsManager, AtariGraphicsManager, and NullGraphicsManager.
|
pure virtual |
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
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 |
Implements PaletteManager.
Implemented in OpenGL::OpenGLGraphicsManager, LibretroGraphics, AndroidGraphics3dManager, SurfaceSdlGraphicsManager, AtariGraphicsManager, and NullGraphicsManager.