void OSystem_IPHONE::hideOverlay() { //printf("hideOverlay()\n"); _overlayVisible = false; _dirtyOverlayRects.clear(); dirtyFullScreen(); iPhone_enableOverlay(false); }
void OSystem_IPHONE::handleEvent_orientationChanged(int orientation) { //printf("Orientation: %i\n", orientation); ScreenOrientation newOrientation; switch (orientation) { case 1: newOrientation = kScreenOrientationPortrait; break; case 3: newOrientation = kScreenOrientationLandscape; break; case 4: newOrientation = kScreenOrientationFlippedLandscape; break; default: return; } if (_screenOrientation != newOrientation) { _screenOrientation = newOrientation; updateOutputSurface(); dirtyFullScreen(); if (_videoContext->overlayVisible) dirtyFullOverlayScreen(); updateScreen(); } }
void OSystem_IPHONE::initSize(uint width, uint height) { //printf("initSize(%i, %i)\n", width, height); _screenWidth = width; _screenHeight = height; free(_offscreen); _offscreen = (byte *)malloc(width * height); bzero(_offscreen, width * height); free(_overlayBuffer); int fullSize = _screenWidth * _screenHeight * sizeof(OverlayColor); _overlayBuffer = (OverlayColor *)malloc(fullSize); clearOverlay(); free(_fullscreen); _fullscreen = (uint16 *)malloc(fullSize); bzero(_fullscreen, fullSize); iPhone_initSurface(width, height); _fullScreenIsDirty = false; dirtyFullScreen(); _mouseVisible = false; _screenChangeCount++; updateScreen(); }
void OSystem_IPHONE::setPalette(const byte *colors, uint start, uint num) { assert(start + num <= 256); const byte *b = colors; for (uint i = start; i < start + num; ++i) { _palette[i] = Graphics::RGBToColor<Graphics::ColorMasks<565> >(b[0], b[1], b[2]); b += 4; } dirtyFullScreen(); }
void OSystem_IPHONE::initSize(uint width, uint height, const Graphics::PixelFormat *format) { //printf("initSize(%i, %i)\n", width, height); _screenWidth = width; _screenHeight = height; free(_offscreen); _offscreen = (byte *)malloc(width * height); bzero(_offscreen, width * height); //free(_overlayBuffer); int fullSize = _screenWidth * _screenHeight * sizeof(OverlayColor); //_overlayBuffer = (OverlayColor *)malloc(fullSize); clearOverlay(); free(_fullscreen); _fullscreen = (uint16 *)malloc(fullSize); bzero(_fullscreen, fullSize); iPhone_initSurface(width, height); if (_overlayBuffer == NULL) { _overlayHeight = iPhone_getScreenHeight(); _overlayWidth = iPhone_getScreenWidth(); printf("Overlay: (%u x %u)\n", _overlayWidth, _overlayHeight); _overlayBuffer = new OverlayColor[_overlayHeight * _overlayWidth]; } _fullScreenIsDirty = false; dirtyFullScreen(); _mouseVisible = false; _screenChangeCount++; updateScreen(); }
void OSystem_IPHONE::unlockScreen() { //printf("unlockScreen()\n"); dirtyFullScreen(); }