|
virtual void | initBackend () |
|
virtual void | engineInit () |
|
virtual void | engineDone () |
|
virtual bool | hasFeature (Feature f) |
|
virtual void | setFeatureState (Feature f, bool enable) |
|
virtual bool | getFeatureState (Feature f) |
|
virtual void | initSize (uint width, uint height, const Graphics::PixelFormat *format) |
|
virtual void | beginGFXTransaction () |
|
virtual TransactionError | endGFXTransaction () |
|
virtual int16 | getHeight () |
|
virtual int16 | getWidth () |
|
virtual PaletteManager * | getPaletteManager () |
|
virtual void | copyRectToScreen (const void *buf, int pitch, int x, int y, int w, int h) |
|
virtual void | updateScreen () |
|
virtual Graphics::Surface * | lockScreen () |
|
virtual void | unlockScreen () |
|
virtual void | setShakePos (int shakeXOffset, int shakeYOffset) |
|
virtual void | showOverlay () |
|
virtual void | hideOverlay () |
|
virtual bool | isOverlayVisible () const |
|
virtual void | clearOverlay () |
|
virtual void | grabOverlay (Graphics::Surface &surface) |
|
virtual void | copyRectToOverlay (const void *buf, int pitch, int x, int y, int w, int h) |
|
virtual int16 | getOverlayHeight () |
|
virtual int16 | getOverlayWidth () |
|
virtual Graphics::PixelFormat | getOverlayFormat () const |
|
virtual bool | showMouse (bool visible) |
|
virtual void | warpMouse (int x, int y) |
|
virtual void | setMouseCursor (const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor=255, bool dontScale=false, const Graphics::PixelFormat *format=NULL) |
|
virtual void | setCursorPalette (const byte *colors, uint start, uint num) |
|
virtual bool | pollEvent (Common::Event &event) |
|
virtual uint32 | getMillis (bool skipRecord=false) |
|
virtual void | delayMillis (uint msecs) |
|
virtual Common::MutexInternal * | createMutex () |
|
virtual void | setupMixer (void) |
|
virtual void | setTimerCallback (TimerProc callback, int interval) |
|
virtual int | getScreenChangeID () const |
|
virtual void | quit () |
|
virtual void | addSysArchivesToSearchSet (Common::SearchSet &s, int priority=0) |
|
virtual void | getTimeAndDate (TimeDate &td, bool skipRecord=false) const |
|
virtual Audio::Mixer * | getMixer () |
|
void | startSoundsystem () |
|
void | stopSoundsystem () |
|
virtual Common::String | getDefaultConfigFileName () |
|
virtual void | logMessage (LogMessageType::Type type, const char *message) |
|
bool | setScaler (const char *name, int factor) override final |
|
void | displayMessageOnOSD (const Common::U32String &msg) override |
|
void | displayActivityIconOnOSD (const Graphics::Surface *icon) override |
|
void | fillScreen (uint32 col) override |
|
void | destroy () |
|
virtual void | init () |
|
bool | backendInitialized () const |
|
virtual const GraphicsMode * | getSupportedGraphicsModes () const |
|
virtual int | getDefaultGraphicsMode () const |
|
virtual bool | setGraphicsMode (int mode, uint flags=kGfxModeNoFlags) |
|
bool | setGraphicsMode (const char *name) |
|
virtual int | getGraphicsMode () const |
|
Graphics::PixelFormat | getScreenFormat () const |
|
Common::List< Graphics::PixelFormat > | getSupportedFormats () const |
|
virtual Common::Array< uint > | getSupportedAntiAliasingLevels () const |
|
virtual OpenGL::ContextType | getOpenGLType () const |
|
virtual const GraphicsMode * | getSupportedShaders () const |
|
virtual int | getDefaultShader () const |
|
virtual bool | setShader (int id) |
|
bool | setShader (const char *name) |
|
virtual int | getShader () const |
|
virtual const GraphicsMode * | getSupportedStretchModes () const |
|
virtual int | getDefaultStretchMode () const |
|
virtual bool | setStretchMode (int mode) |
|
bool | setStretchMode (const char *name) |
|
virtual int | getStretchMode () 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 | initSizeHint (const Graphics::ModeList &modes) |
|
virtual float | getHiDPIScreenFactor () const |
|
virtual void | setFocusRectangle (const Common::Rect &rect) |
|
virtual void | clearFocusRectangle () |
|
virtual void | saveScreenshot () |
|
virtual bool | lockMouse (bool lock) |
|
virtual Common::TimerManager * | getTimerManager () |
|
Common::EventManager * | getEventManager () |
|
virtual Common::HardwareInputSet * | getHardwareInputSet () |
|
virtual Common::KeymapArray | getGlobalKeymaps () |
|
virtual Common::KeymapperDefaultBindings * | getKeymapperDefaultBindings () |
|
AudioCDManager * | getAudioCDManager () |
|
virtual void | fatalError () |
|
virtual void | setWindowCaption (const Common::U32String &caption) |
|
virtual Common::SaveFileManager * | getSavefileManager () |
|
virtual Common::TextToSpeechManager * | getTextToSpeechManager () |
|
virtual Common::DialogManager * | getDialogManager () |
|
virtual FilesystemFactory * | getFilesystemFactory () |
|
virtual Common::SeekableReadStream * | createConfigReadStream () |
|
virtual Common::WriteStream * | createConfigWriteStream () |
|
virtual void | registerDefaultSettings (const Common::String &target) const |
|
virtual GUI::OptionsContainerWidget * | buildBackendOptionsWidget (GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const |
|
virtual void | applyBackendSettings () |
|
virtual void | messageBox (LogMessageType::Type type, const char *message) |
|
virtual bool | displayLogFile () |
|
virtual bool | hasTextInClipboard () |
|
virtual Common::U32String | getTextFromClipboard () |
|
virtual bool | setTextInClipboard (const Common::U32String &text) |
|
virtual bool | openUrl (const Common::String &url) |
|
virtual Common::String | getSystemLanguage () const |
|
virtual bool | isConnectionLimited () |
|
|
virtual void | setPalette (const byte *colors, uint start, uint num) |
|
virtual void | grabPalette (byte *colors, uint start, uint num) const |
|
void | initVideoContext () |
|
void | updateOutputSurface () |
|
void | internUpdateScreen () |
|
void | dirtyFullScreen () |
|
void | dirtyFullOverlayScreen () |
|
void | suspendLoop () |
|
void | drawDirtyRect (const Common::Rect &dirtyRect) |
|
void | updateMouseTexture () |
|
bool | handleEvent_swipe (Common::Event &event, int direction) |
|
void | handleEvent_keyPressed (Common::Event &event, int keyPressed) |
|
void | handleEvent_orientationChanged (int orientation) |
|
bool | handleEvent_mouseDown (Common::Event &event, int x, int y) |
|
bool | handleEvent_mouseUp (Common::Event &event, int x, int y) |
|
bool | handleEvent_secondMouseDown (Common::Event &event, int x, int y) |
|
bool | handleEvent_secondMouseUp (Common::Event &event, int x, int y) |
|
bool | handleEvent_mouseDragged (Common::Event &event, int x, int y) |
|
bool | handleEvent_mouseSecondDragged (Common::Event &event, int x, int y) |
|
Set the size and color format of the virtual screen.
Typical sizes include:
- 320x200 (e.g. for most SCUMM games, and Simon)
- 320x240 (e.g. for FM-TOWN SCUMM games)
- 640x480 (e.g. for Curse of Monkey Island)
This is the resolution for which the client code generates data. This is not necessarily equal to the actual display size. For example, a backend may magnify the graphics to fit on the screen (see also the GraphicsMode), stretch the data to perform aspect ratio correction, or shrink it to fit on small screens (in cell phones).
Typical formats include:
- CLUT8 (e.g. 256 color, for most games)
- RGB555 (e.g. 16-bit color, for later SCUMM HE games)
- RGB565 (e.g. 16-bit color, for Urban Runner)
This is the pixel format for which the client code generates data. It is not necessarily equal to the hardware pixel format. For example, a backend may perform color lookup of 8-bit graphics before pushing a screen to hardware, or correct the ARGB color order.
- Parameters
-
width | New virtual screen width. |
height | New virtual screen height. |
format | New virtual screen pixel format. |
Implements OSystem.
virtual void OSystem_IPHONE::beginGFXTransaction |
( |
| ) |
|
|
virtual |
Begin a new GFX transaction, which is a sequence of GFX mode changes.
The idea behind GFX transactions is to make it possible to activate several different GFX changes at once as a "batch" operation. For example, assume we are running in 320x200 with a 2x scaler (thus using 640x400 pixels in total). Now, we want to switch to 640x400 with the 1x scaler. Without transactions, we have to choose whether we want to first switch the scaler mode, or first to 640x400 mode. In either case, depending on the backend implementation, problems may occur. For example, the window might briefly switch to 320x200 or 1280x800. Using transactions, this can be avoided.
- Note
- Transaction support is optional, and the default implementations of the relevant methods simply do nothing.
- See also
- endGFXTransaction
Reimplemented from OSystem.
virtual void OSystem_IPHONE::setPalette |
( |
const byte * |
colors, |
|
|
uint |
start, |
|
|
uint |
num |
|
) |
| |
|
protectedvirtual |
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-...
- Parameters
-
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 |
- Note
- It is an error if start+num exceeds 256, behavior is undefined in that case (the backend may ignore it silently or assert).
-
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 PaletteManager.
virtual void OSystem_IPHONE::grabPalette |
( |
byte * |
colors, |
|
|
uint |
start, |
|
|
uint |
num |
|
) |
| const |
|
protectedvirtual |
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 PaletteManager.
virtual void OSystem_IPHONE::copyRectToScreen |
( |
const void * |
buf, |
|
|
int |
pitch, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
w, |
|
|
int |
h |
|
) |
| |
|
virtual |
Blit a bitmap to the virtual screen.
The real screen will not immediately be updated to reflect the changes. Client code must call updateScreen to ensure any changes are visible to the user. This can be used to optimize drawing and reduce flicker.
If the current pixel format has one byte per pixel, the graphics data uses 8 bits per pixel, using the palette specified via setPalette. If more than one byte per pixel is in use, the graphics data uses the pixel format returned by getScreenFormat.
- Parameters
-
buf | Buffer containing the graphics data source. |
pitch | Pitch of the buffer (number of bytes in a scanline). |
x | x coordinate of the destination rectangle. |
y | y coordinate of the destination rectangle. |
w | Width of the destination rectangle. |
h | Height of the destination rectangle. |
- Note
- The specified destination rectangle must be completly contained in the visible screen space, and must be non-empty. If not, a backend may or may not perform clipping, trigger an assert, or silently corrupt memory.
- See also
- updateScreen
-
getScreenFormat
Implements OSystem.