Implemented the OSystem framebuffer API, as discussed on scummvm-devel. All changes are just fine, and won't cause any compile problems or regressions, despite the fact that I can't test most of the non-SDL backend changes, at an improbability level of two to the power of two hundred and seventy-six thousand to one against - possibly much higher. Anything you still can't cope with is therefore your own problem. Please relax.

svn-id: r27548
This commit is contained in:
Max Horn 2007-06-19 22:39:59 +00:00
parent ab9b9a1bf3
commit b51f2f3212
26 changed files with 217 additions and 144 deletions

View file

@ -209,14 +209,18 @@ void OSystem_GP32::copyRectToScreen(const byte *src, int pitch, int x, int y, in
}
}
bool OSystem_GP32::grabRawScreen(Graphics::Surface *surf) {
assert(surf);
Graphics::Surface *OSystem_GP32::lockScreen() {
_framebuffer.pixels = _gameScreen;
_framebuffer.w = _screenWidth;
_framebuffer.h = _screenHeight;
_framebuffer.pitch = _screenWidth;
_framebuffer.bytesPerPixel = 1;
surf->create(_screenWidth, _screenHeight, 1);
return &_framebuffer;
}
memcpy(surf->pixels, _gameScreen, _screenWidth * _screenHeight);
return true;
void OSystem_GP32::unlockScreen() {
// The screen is always completely update anyway, so we don't have to force a full update here.
}
//TODO: Implement Dirty rect?