mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 07:53:12 +00:00
SAGA: Take advantage of Sufrace::getPixels.
This commit is contained in:
parent
aca802bd70
commit
e30cb84210
@ -501,7 +501,7 @@ void Anim::play(uint16 animId, int vectorTime, bool playing) {
|
||||
}
|
||||
|
||||
anim = getAnimation(animId);
|
||||
displayBuffer = (byte *)_vm->_render->getBackGroundSurface()->getBasePtr(0, 0);
|
||||
displayBuffer = (byte *)_vm->_render->getBackGroundSurface()->getPixels();
|
||||
|
||||
if (playing) {
|
||||
anim->state = ANIM_PLAYING;
|
||||
|
@ -201,7 +201,7 @@ public:
|
||||
// Whenever it gets called, the corresponding caller must take care
|
||||
// to add the corresponding dirty rectangle itself
|
||||
byte *getBackBufferPixels() {
|
||||
return (byte *)_backBuffer.getBasePtr(0, 0);
|
||||
return (byte *)_backBuffer.getPixels();
|
||||
}
|
||||
|
||||
uint16 getBackBufferWidth() {
|
||||
|
@ -212,7 +212,7 @@ bool Scene::playTitle(int title, int time, int mode) {
|
||||
break;
|
||||
|
||||
case 2: // display background
|
||||
_vm->_system->copyRectToScreen(backBufferSurface->getBasePtr(0, 0), backBufferSurface->w, 0, 0,
|
||||
_vm->_system->copyRectToScreen(backBufferSurface->getPixels(), backBufferSurface->w, 0, 0,
|
||||
backBufferSurface->w, backBufferSurface->h);
|
||||
phase++;
|
||||
startTime = curTime;
|
||||
@ -247,7 +247,7 @@ bool Scene::playTitle(int title, int time, int mode) {
|
||||
|
||||
frameTime = curTime;
|
||||
|
||||
_vm->_system->copyRectToScreen(backBufferSurface->getBasePtr(0, 0), backBufferSurface->w, 0, 0,
|
||||
_vm->_system->copyRectToScreen(backBufferSurface->getPixels(), backBufferSurface->w, 0, 0,
|
||||
backBufferSurface->w, backBufferSurface->h);
|
||||
}
|
||||
|
||||
@ -273,8 +273,8 @@ bool Scene::playTitle(int title, int time, int mode) {
|
||||
|
||||
_vm->_anim->endVideo();
|
||||
|
||||
memset((byte *)backBufferSurface->getBasePtr(0, 0), 0, backBufferSurface->w * backBufferSurface->h);
|
||||
_vm->_system->copyRectToScreen(backBufferSurface->getBasePtr(0, 0), backBufferSurface->w, 0, 0,
|
||||
memset((byte *)backBufferSurface->getPixels(), 0, backBufferSurface->w * backBufferSurface->h);
|
||||
_vm->_system->copyRectToScreen(backBufferSurface->getPixels(), backBufferSurface->w, 0, 0,
|
||||
backBufferSurface->w, backBufferSurface->h);
|
||||
|
||||
return interrupted;
|
||||
|
@ -108,7 +108,7 @@ void Scene::playMovie(const char *filename) {
|
||||
if (smkDecoder->needsUpdate()) {
|
||||
const Graphics::Surface *frame = smkDecoder->decodeNextFrame();
|
||||
if (frame) {
|
||||
_vm->_system->copyRectToScreen(frame->getBasePtr(0, 0), frame->pitch, x, y, frame->w, frame->h);
|
||||
_vm->_system->copyRectToScreen(frame->getPixels(), frame->pitch, x, y, frame->w, frame->h);
|
||||
|
||||
if (smkDecoder->hasDirtyPalette())
|
||||
_vm->_system->getPaletteManager()->setPalette(smkDecoder->getPalette(), 0, 256);
|
||||
|
@ -468,7 +468,7 @@ void Scene::changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionTy
|
||||
pal = decoder.getPalette();
|
||||
rect.setWidth(decoder.getSurface()->w);
|
||||
rect.setHeight(decoder.getSurface()->h);
|
||||
_vm->_gfx->drawRegion(rect, (const byte *)decoder.getSurface()->getBasePtr(0, 0));
|
||||
_vm->_gfx->drawRegion(rect, (const byte *)decoder.getSurface()->getPixels());
|
||||
for (int j = 0; j < PAL_ENTRIES; j++) {
|
||||
cPal[j].red = *pal++;
|
||||
cPal[j].green = *pal++;
|
||||
@ -1120,9 +1120,9 @@ void Scene::draw() {
|
||||
_vm->_render->getBackGroundSurface()->getRect(rect);
|
||||
rect.bottom = (_sceneClip.bottom < rect.bottom) ? getHeight() : rect.bottom;
|
||||
if (_vm->_render->isFullRefresh())
|
||||
_vm->_gfx->drawRegion(rect, (const byte *)_vm->_render->getBackGroundSurface()->getBasePtr(0, 0));
|
||||
_vm->_gfx->drawRegion(rect, (const byte *)_vm->_render->getBackGroundSurface()->getPixels());
|
||||
else
|
||||
_vm->_gfx->drawBgRegion(rect, (const byte *)_vm->_render->getBackGroundSurface()->getBasePtr(0, 0));
|
||||
_vm->_gfx->drawBgRegion(rect, (const byte *)_vm->_render->getBackGroundSurface()->getPixels());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user