implement grabRawScreen()

svn-id: r23385
This commit is contained in:
Joost Peters 2006-07-07 10:38:56 +00:00
parent 240acc427a
commit 2b0c4e9bf3
2 changed files with 16 additions and 0 deletions

View File

@ -26,6 +26,7 @@
#include "common/stdafx.h"
#include "common/scummsys.h"
#include "graphics/surface.h"
#include "common/rect.h"
#include "osys_psp.h"
@ -186,6 +187,15 @@ void OSystem_PSP::copyRectToScreen(const byte *buf, int pitch, int x, int y, int
}
}
bool OSystem_PSP::grabRawScreen(Graphics::Surface *surf) {
assert(surf);
surf->create(_screenWidth, _screenHeight, 1);
memcpy(surf->pixels, _offscreen, _screenWidth * _screenHeight);
return true;
}
void OSystem_PSP::updateScreen() {
unsigned short *temp;

View File

@ -37,6 +37,11 @@ enum GraphicModeID {
CENTERED_362X272
};
namespace Graphics {
struct Surface;
}
class OSystem_PSP : public OSystem {
public:
static const OSystem::GraphicsMode s_supportedGraphicsModes[];
@ -86,6 +91,7 @@ public:
virtual int16 getHeight();
virtual void setPalette(const byte *colors, uint start, uint num);
virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h);
virtual bool grabRawScreen(Graphics::Surface *surf);
virtual void updateScreen();
virtual void setShakePos(int shakeOffset);