diff options
author | Paul Gilbert | 2012-10-13 18:27:14 +1100 |
---|---|---|
committer | Paul Gilbert | 2012-10-13 18:27:14 +1100 |
commit | 756dc956b54ac645feee3427d129789b7b3a3aa5 (patch) | |
tree | 71d7cea0a81f1e5597dbbbec8b408c55bb4cc44b | |
parent | 1ee3c572f2920c2d334424a68ba1122b4eda3145 (diff) | |
download | scummvm-rg350-756dc956b54ac645feee3427d129789b7b3a3aa5.tar.gz scummvm-rg350-756dc956b54ac645feee3427d129789b7b3a3aa5.tar.bz2 scummvm-rg350-756dc956b54ac645feee3427d129789b7b3a3aa5.zip |
HOPKINS: Finally implemented VBL cursor method properly
-rw-r--r-- | engines/hopkins/events.cpp | 306 | ||||
-rw-r--r-- | engines/hopkins/events.h | 1 | ||||
-rw-r--r-- | engines/hopkins/graphics.cpp | 46 |
3 files changed, 171 insertions, 182 deletions
diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp index 0b5bdb1e7f..bdea8af67d 100644 --- a/engines/hopkins/events.cpp +++ b/engines/hopkins/events.cpp @@ -44,8 +44,10 @@ EventsManager::EventsManager() { pointeur_souris = NULL; lItCounter = 0; ESC_KEY = false; - _priorFrameTime = 0; btsouris = 0; + + _priorCounterTime = 0; + _priorFrameTime = 0; } void EventsManager::setParent(HopkinsEngine *vm) { @@ -182,11 +184,16 @@ void EventsManager::CONTROLE_MES() { } void EventsManager::checkForNextFrameCounter() { + // Check for whether to increment the game counter uint32 milli = g_system->getMillis(); - if ((milli - _priorFrameTime) >= 10) { - _priorFrameTime = milli; + while ((milli - _priorCounterTime) >= 10) { + _priorCounterTime += 10; lItCounter += 3; + } + // Check for next game frame + if ((milli - _priorFrameTime) >= GAME_FRAME_TIME) { + _priorFrameTime = milli; g_system->updateScreen(); } } @@ -232,256 +239,213 @@ void EventsManager::pollEvents() { } void EventsManager::VBL() { - // Bulk of method currently disabled - - // Move any button press status into the active button status state - souris_bb = souris_b; - souris_b = false; - - if (!_vm->_globals.PUBEXIT) - _vm->_objectsManager.AFF_SPRITES(); -/* - int a1 = 0; - signed int v1; - int v2; - int v3; - int v4; - int v5; - int v6; - signed int v7; - int v10; + signed __int16 v1; + int v2; + int v3; + int v4; + int v5; + int v6; + signed __int16 v7; + int v10; signed int v11 = 0; signed int v12 = 0; int v13 = 0; - unsigned int v14 = 0; - int v15 = 0; - - if (REDRAW) { - DD_Lock(); - if (_vm->_eventsManager.CASSE) { - CopyAsm(VESA_BUFFER); - REDRAW = 0; + unsigned int v14 = 0; + int v15 = 0; + int yp = 0; + + if (_vm->_graphicsManager.REDRAW) { + _vm->_graphicsManager.DD_Lock(); + if (CASSE) { + _vm->_graphicsManager.CopyAsm(_vm->_graphicsManager.VESA_BUFFER); + _vm->_graphicsManager.REDRAW = 0; } else { if (_vm->_globals.iRegul == 3) - m_scroll(VESA_BUFFER, ofscroll, 50, SCREEN_WIDTH, 340, 0, 50); + _vm->_graphicsManager.m_scroll(_vm->_graphicsManager.VESA_BUFFER, _vm->_graphicsManager.ofscroll, 50, 0x280u, 340, 0, 50); else - m_scroll(VESA_BUFFER, ofscroll, 20, SCREEN_WIDTH, 440, 0, 20); + _vm->_graphicsManager.m_scroll(_vm->_graphicsManager.VESA_BUFFER, _vm->_graphicsManager.ofscroll, 20, 0x280u, 440, 0, 20); _vm->_fileManager.DMESS(); - --REDRAW; + --_vm->_graphicsManager.REDRAW; } - DD_Unlock(); + _vm->_graphicsManager.DD_Unlock(); } - - if (_vm->_eventsManager.souris_flag) { + if (souris_flag == 1) { v1 = 20; - if (!_vm->_eventsManager.mouse_linux) + if (!mouse_linux) v1 = 10; v2 = 20; - if (!_vm->_eventsManager.mouse_linux) + if (!mouse_linux) v2 = 15; - - v15 = _vm->_eventsManager.souris_x - v1; - a1 = _vm->_eventsManager.souris_y; - v14 = _vm->_eventsManager.souris_sizex; - v13 = _vm->_eventsManager.souris_sizey; - if (_vm->_eventsManager.btsouris == 23) { + v15 = souris_x - v1; + yp = souris_y; + v14 = souris_sizex; + v13 = souris_sizey; + if (btsouris == 23) { v14 = _vm->_globals.OBJL; v13 = _vm->_globals.OBJH; goto LABEL_35; } - - if (_vm->_eventsManager.CASSE) { - if (v15 < min_x) - v15 = min_x; - if (_vm->_eventsManager.souris_y < min_y) - a1 = min_y; - - if (_vm->_eventsManager.souris_sizex + v15 >= max_x) - v14 = _vm->_eventsManager.souris_sizex - (_vm->_eventsManager.souris_sizex + v15 - max_x); - if (a1 + _vm->_eventsManager.souris_sizey < max_y) + if (CASSE) { + if (v15 < _vm->_graphicsManager.min_x) + v15 = _vm->_graphicsManager.min_x; + if (souris_y < _vm->_graphicsManager.min_y) + yp = _vm->_graphicsManager.min_y; + if (souris_sizex + v15 >= _vm->_graphicsManager.max_x) + v14 = souris_sizex - (souris_sizex + v15 - _vm->_graphicsManager.max_x); + if (yp + souris_sizey < _vm->_graphicsManager.max_y) goto LABEL_34; - - v3 = a1 + _vm->_eventsManager.souris_sizey - max_y; + v3 = yp + souris_sizey - _vm->_graphicsManager.max_y; } else { - if (v15 < min_x) - v15 = min_x - v1; - //v2 = v2; - if (_vm->_eventsManager.souris_y < min_y - v2) - a1 = min_y - v2; - if (_vm->_eventsManager.souris_sizex + v15 >= max_x) - v14 = _vm->_eventsManager.souris_sizex - (_vm->_eventsManager.souris_sizex + v15 - max_x - v1); - if (a1 + _vm->_eventsManager.souris_sizey < v2 + max_y) + if (v15 < _vm->_graphicsManager.min_x) + v15 = _vm->_graphicsManager.min_x - v1; + v2 = (signed __int16)v2; + if (souris_y < _vm->_graphicsManager.min_y - (signed __int16)v2) + yp = _vm->_graphicsManager.min_y - (signed __int16)v2; + if (souris_sizex + v15 >= _vm->_graphicsManager.max_x) + v14 = souris_sizex - (souris_sizex + v15 - _vm->_graphicsManager.max_x - v1); + if (yp + souris_sizey < v2 + _vm->_graphicsManager.max_y) goto LABEL_34; - - v3 = v2 + a1 + _vm->_eventsManager.souris_sizey - max_y; + v3 = v2 + yp + souris_sizey - _vm->_graphicsManager.max_y; } - - v13 = _vm->_eventsManager.souris_sizey - v3; + v13 = souris_sizey - v3; LABEL_34: v12 = v14 + v15; - v11 = a1 + v13; + v11 = yp + v13; } LABEL_35: - if (!_vm->_globals.PUBEXIT) - AFF_SPRITES(); - if (_vm->_eventsManager.souris_flag != 1) + _vm->_objectsManager.AFF_SPRITES(); + if (souris_flag != 1) goto LABEL_54; - if (_vm->_eventsManager.btsouris == 23) + if (btsouris == 23) goto LABEL_45; - - if (a1 >= max_y || v15 >= max_x || (signed int)v14 <= 1 || v13 <= 1) { - if (_vm->_eventsManager.btsouris != 23) + if (yp >= _vm->_graphicsManager.max_y || v15 >= _vm->_graphicsManager.max_x || v14 <= 1 || v13 <= 1) { + if (btsouris != 23) goto LABEL_54; - LABEL_45: - if (a1 < max_y && v15 < max_x) { - if ((signed int)(v14 + v15) > max_x) - v14 -= v14 + v15 - max_x; - if (a1 + v13 > max_y) - v13 -= a1 + v13 - max_y; - - if ((signed int)v14 > 1 && v13 > 1) { - Capture_Mem(VESA_BUFFER, _vm->_globals.cache_souris, v15, a1, v14, v13); - Affiche_Perfect(VESA_BUFFER, _vm->_globals.Bufferobjet, v15 + 300, a1 + 300, 0, 0, 0, 0); - Ajoute_Segment_Vesa(v15, a1, v14 + v15, a1 + v13); + if (yp < _vm->_graphicsManager.max_y && v15 < _vm->_graphicsManager.max_x) { + if ((signed int)(v14 + v15) > _vm->_graphicsManager.max_x) + v14 -= v14 + v15 - _vm->_graphicsManager.max_x; + if (yp + v13 > _vm->_graphicsManager.max_y) + v13 -= yp + v13 - _vm->_graphicsManager.max_y; + if (v14 > 1 && v13 > 1) { + _vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.cache_souris, v15, yp, v14, v13); + _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.Bufferobjet, v15 + 300, yp + 300, 0, 0, 0, 0); + _vm->_graphicsManager.Ajoute_Segment_Vesa(v15, yp, v14 + v15, yp + v13); } } goto LABEL_54; } - - Capture_Mem(VESA_BUFFER, _vm->_globals.cache_souris, v15, a1, v14, v13); - Sprite_Vesa(VESA_BUFFER, _vm->_eventsManager.pointeur_souris, v15 + 300, a1 + 300, _vm->_eventsManager.souris_n); - Ajoute_Segment_Vesa(v15, a1, v12, v11); - + _vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.cache_souris, v15, yp, v14, v13); + _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, pointeur_souris, v15 + 300, yp + 300, souris_n); + _vm->_graphicsManager.Ajoute_Segment_Vesa(v15, yp, v12, v11); LABEL_54: _vm->_globals.vitesse = 2; - do { - for (;;) { - // TODO: Figure out the purpose of this loop waiting on lItCounter.. - // maybe it's for cursor animatoin? - _vm->_eventsManager.delay(10); + while (!_vm->shouldQuit()) { + checkForNextFrameCounter(); - while (_vm->_eventsManager.CASSE || _vm->_globals.iRegul != 1) { - if (_vm->_eventsManager.CASSE != 1) + while (CASSE || _vm->_globals.iRegul != 1) { + if (CASSE != 1) goto LABEL_63; - - if (_vm->_eventsManager.lItCounter > 1) + if (lItCounter > 1) goto LABEL_65; } - if (_vm->_globals.vitesse != 2) break; - - if (_vm->_eventsManager.lItCounter > 9) + if (lItCounter > 9) goto LABEL_65; } LABEL_63: ; - } while (_vm->_globals.iRegul == 3 && _vm->_eventsManager.lItCounter <= 15); - + } while (!_vm->shouldQuit() && _vm->_globals.iRegul == 3 && lItCounter <= 15); LABEL_65: _vm->_globals.vitesse = 2; - _vm->_eventsManager.lItCounter = 0; - - if (DOUBLE_ECRAN != 1 || no_scroll == 1) { - Affiche_Segment_Vesa(); + lItCounter = 0; + if (_vm->_graphicsManager.DOUBLE_ECRAN != 1 || _vm->_graphicsManager.no_scroll == 1) { + _vm->_graphicsManager.Affiche_Segment_Vesa(); } else { - if (no_scroll != 2) { - if (_vm->_eventsManager.XMOUSE() > SCROLL + 620) - SCROLL += SPEED_SCROLL; - - if (_vm->_eventsManager.XMOUSE() < SCROLL + 10) - SCROLL -= SPEED_SCROLL; + if (_vm->_graphicsManager.no_scroll != 2) { + if (XMOUSE() > _vm->_graphicsManager.SCROLL + 620) + _vm->_graphicsManager.SCROLL += _vm->_graphicsManager.SPEED_SCROLL; + if (XMOUSE() < _vm->_graphicsManager.SCROLL + 10) + _vm->_graphicsManager.SCROLL -= _vm->_graphicsManager.SPEED_SCROLL; } - - SCROLL = CLIP(SCROLL, 0, SCREEN_WIDTH); - - if (SDL_ECHELLE) - v4 = Magic_Number(SCROLL); + if (_vm->_graphicsManager.SCROLL < 0) + _vm->_graphicsManager.SCROLL = 0; + if (_vm->_graphicsManager.SCROLL > 640) + _vm->_graphicsManager.SCROLL = 640; + if (_vm->_graphicsManager.SDL_ECHELLE) + v4 = _vm->_graphicsManager.Magic_Number(_vm->_graphicsManager.SCROLL); else - v4 = SCROLL; - - if (OLD_SCROLL == v4) { - Affiche_Segment_Vesa(); + v4 = _vm->_graphicsManager.SCROLL; + if (_vm->_graphicsManager.OLD_SCROLL == v4) { + _vm->_graphicsManager.Affiche_Segment_Vesa(); } else { _vm->_fontManager.TEXTE_OFF(9); - DD_Lock(); - if (SDL_ECHELLE) { - if (Winbpp == 2) { - v5 = Reel_Zoom(20, SDL_ECHELLE); - m_scroll16A(VESA_BUFFER, v4, 20, 640, 440, 0, v5); + _vm->_graphicsManager.DD_Lock(); + if (_vm->_graphicsManager.SDL_ECHELLE) { + if (_vm->_graphicsManager.Winbpp == 2) { + v5 = _vm->_graphicsManager.Reel_Zoom(0x14u, _vm->_graphicsManager.SDL_ECHELLE); + _vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, v4, 20, 640, 440, 0, v5); } else { - v6 = Reel_Zoom(20, SDL_ECHELLE); - m_scroll2A(VESA_BUFFER, v4, 20, 640, 440, 0, v6); + v6 = _vm->_graphicsManager.Reel_Zoom(0x14u, _vm->_graphicsManager.SDL_ECHELLE); + _vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_BUFFER, v4, 20, 640, 440, 0, v6); } - - DD_Unlock(); - dstrect[0].left = Reel_Zoom(0, SDL_ECHELLE); - dstrect[0].top = Reel_Zoom(20, SDL_ECHELLE); - dstrect[0].setWidth(Reel_Zoom(SCREEN_WIDTH, SDL_ECHELLE)); - dstrect[0].setHeight(Reel_Zoom(440, SDL_ECHELLE)); + _vm->_graphicsManager.DD_Unlock(); + _vm->_graphicsManager.dstrect[0].left = _vm->_graphicsManager.Reel_Zoom(0, _vm->_graphicsManager.SDL_ECHELLE); + _vm->_graphicsManager.dstrect[0].top = _vm->_graphicsManager.Reel_Zoom(0x14u, _vm->_graphicsManager.SDL_ECHELLE); + _vm->_graphicsManager.dstrect[0].setWidth(_vm->_graphicsManager.Reel_Zoom(0x280u, _vm->_graphicsManager.SDL_ECHELLE)); + _vm->_graphicsManager.dstrect[0].setHeight(_vm->_graphicsManager.Reel_Zoom(0x1B8u, _vm->_graphicsManager.SDL_ECHELLE)); } else { - if (Winbpp == 2) - m_scroll16(VESA_BUFFER, v4, 20, 640, 440, 0, 20); + if (_vm->_graphicsManager.Winbpp == 2) + _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, v4, 20, 640, 440, 0, 20); else - m_scroll2(VESA_BUFFER, v4, 20, 640, 440, 0, 20); - - DD_Unlock(); - dstrect[0] = Common::Rect(0, 20, SCREEN_WIDTH, SCREEN_HEIGHT - 40); + _vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_BUFFER, v4, 20, 640, 440, 0, 20); + _vm->_graphicsManager.DD_Unlock(); + _vm->_graphicsManager.dstrect[0] = Common::Rect(0, 20, 640, 460); } - if (!_vm->_globals.BPP_NOAFF) { - // TODO: Useful for future dirty rect processing? // SDL_UpdateRects(LinuxScr, 1, dstrect); } if (_vm->_globals.NBBLOC) { v7 = 1; v10 = _vm->_globals.NBBLOC + 1; - do { if (_vm->_globals.BLOC[v7].field0 == 1) _vm->_globals.BLOC[v7].field0 = 0; ++v7; } while (v10 != v7); } - _vm->_globals.NBBLOC = 0; - _vm->_eventsManager.start_x = v4; - ofscroll = v4; - SCROLL = v4; + start_x = v4; + _vm->_graphicsManager.ofscroll = v4; + _vm->_graphicsManager.SCROLL = v4; } - - OLD_SCROLL = v4; - _vm->_eventsManager.start_x = v4; - ofscroll = v4; + _vm->_graphicsManager.OLD_SCROLL = v4; + start_x = v4; + _vm->_graphicsManager.ofscroll = v4; } - - _vm->_eventsManager.souris_bb = _vm->_eventsManager.souris_b; - _vm->_eventsManager.souris_b = 0; - if (_vm->_eventsManager.souris_flag == 1) { - if (_vm->_eventsManager.btsouris != 23) { - if (a1 < max_y && v15 < max_x && v14 > 1 && v13 > 1) { - Restore_Mem(VESA_BUFFER, _vm->_globals.cache_souris, v15, a1, v14, v13); - Ajoute_Segment_Vesa(v15, a1, v12, v11); + souris_bb = souris_b; + souris_b = 0; + if (souris_flag == 1) { + if (btsouris != 23) { + if (yp < _vm->_graphicsManager.max_y && v15 < _vm->_graphicsManager.max_x && v14 > 1 && v13 > 1) { + _vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.cache_souris, v15, yp, v14, v13); + _vm->_graphicsManager.Ajoute_Segment_Vesa(v15, yp, v12, v11); goto LABEL_113; } - - if (_vm->_eventsManager.btsouris != 23) + if (btsouris != 23) goto LABEL_113; } - - if (a1 < max_y && v15 < max_x && v14 > 1 && v13 > 1) { - Restore_Mem(VESA_BUFFER, _vm->_globals.cache_souris, v15, a1, v14, v13); - Ajoute_Segment_Vesa(v15, a1, v14 + v15, a1 + v13); + if (yp < _vm->_graphicsManager.max_y && v15 < _vm->_graphicsManager.max_x && v14 > 1 && v13 > 1) { + _vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.cache_souris, v15, yp, v14, v13); + _vm->_graphicsManager.Ajoute_Segment_Vesa(v15, yp, v14 + v15, yp + v13); } } - LABEL_113: - */ _vm->_soundManager.VERIF_SOUND(); - return _vm->_eventsManager.CONTROLE_MES(); + CONTROLE_MES(); } } // End of namespace Hopkins diff --git a/engines/hopkins/events.h b/engines/hopkins/events.h index a4b5bd9afd..835a9d95c3 100644 --- a/engines/hopkins/events.h +++ b/engines/hopkins/events.h @@ -53,6 +53,7 @@ public: int souris_b; byte *pointeur_souris; uint32 lItCounter; + uint32 _priorCounterTime; uint32 _priorFrameTime; bool ESC_KEY; bool NOESC; diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index a5086201a8..4e240902d2 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -1294,16 +1294,16 @@ Video_Cont_Vbe16a: void GraphicsManager::Capture_Mem(const byte *srcSurface, byte *destSurface, int xs, int ys, unsigned int width, int height) { const byte *srcP; byte *destP; - int yCtr; + int rowCount; unsigned int i; - int yTemp; + int rowCount2; - srcP = srcSurface + xs + nbrligne2 * ys; + assert(xs <= SCREEN_WIDTH && ys <= SCREEN_HEIGHT); + srcP = xs + nbrligne2 * ys + srcSurface; destP = destSurface; - - yCtr = height; + rowCount = height; do { - yTemp = yCtr; + rowCount2 = rowCount; if (width & 1) { memcpy(destP, srcP, width); srcP += width; @@ -1312,16 +1312,16 @@ void GraphicsManager::Capture_Mem(const byte *srcSurface, byte *destSurface, int for (i = width >> 1; i; --i) { *(uint16 *)destP = *(uint16 *)srcP; srcP += 2; - destP = (byte *)destP + 2; + destP += 2; } } else { memcpy(destP, srcP, 4 * (width >> 2)); srcP += 4 * (width >> 2); - destP = (byte *)destP + 4 * (width >> 2); + destP += 4 * (width >> 2); } srcP = nbrligne2 + srcP - width; - yCtr = yTemp - 1; - } while (yTemp != 1); + rowCount = rowCount2 - 1; + } while (rowCount2 != 1); } void GraphicsManager::Sprite_Vesa(byte *surface, const byte *spriteData, int xp, int yp, int spriteIndex) { @@ -1528,6 +1528,7 @@ void GraphicsManager::Ajoute_Segment_Vesa(int x1, int y1, int x2, int y2) { } if (v10 == 1) { + assert(_vm->_globals.NBBLOC < 50); BlocItem &bloc = _vm->_globals.BLOC[++_vm->_globals.NBBLOC]; bloc.field0 = 1; @@ -1556,6 +1557,7 @@ void GraphicsManager::Affiche_Segment_Vesa() { return; SDL_NBLOCS = _vm->_globals.NBBLOC; + DD_Lock(); for (int idx = 1; idx <= _vm->_globals.NBBLOC; ++idx) { BlocItem &bloc = _vm->_globals.BLOC[idx]; @@ -1580,7 +1582,7 @@ void GraphicsManager::Affiche_Segment_Vesa() { if (bloc.x2 > (_vm->_eventsManager.start_x + SCREEN_WIDTH)) bloc.x2 = _vm->_eventsManager.start_x + SCREEN_WIDTH; - if (!SDL_ECHELLE) { + if (SDL_ECHELLE) { // Calculate the bounds int xp = Magic_Number(bloc.x1) - 4; if (xp < _vm->_eventsManager.start_x) @@ -1600,6 +1602,9 @@ void GraphicsManager::Affiche_Segment_Vesa() { if ((height - yp) > (SCREEN_HEIGHT - 40)) yp -= 4; + // WORKAROUND: Original didn't lock the screen for access + DD_Lock(); + if (Winbpp == 2) { m_scroll16A(VESA_BUFFER, xp, yp, width, height, Reel_Zoom(xp - _vm->_eventsManager.start_x, SDL_ECHELLE), Reel_Zoom(yp, SDL_ECHELLE)); @@ -1608,11 +1613,16 @@ void GraphicsManager::Affiche_Segment_Vesa() { Reel_Zoom(xp - _vm->_eventsManager.start_x, SDL_ECHELLE), Reel_Zoom(yp, SDL_ECHELLE)); } + DD_Unlock(); + dstRect.left = Reel_Zoom(xp - _vm->_eventsManager.start_x, SDL_ECHELLE); dstRect.top = Reel_Zoom(yp, SDL_ECHELLE); dstRect.setWidth(Reel_Zoom(width, SDL_ECHELLE)); dstRect.setHeight(Reel_Zoom(height, SDL_ECHELLE)); } else { + // WORKAROUND: Original didn't lock the screen for access + DD_Lock(); + if (Winbpp == 2) { m_scroll16(VESA_BUFFER, bloc.x1, bloc.y1, bloc.x2 - bloc.x1, bloc.y2 - bloc.y1, bloc.x1 - _vm->_eventsManager.start_x, bloc.y1); @@ -1620,11 +1630,25 @@ void GraphicsManager::Affiche_Segment_Vesa() { m_scroll(VESA_BUFFER, bloc.x1, bloc.y1, bloc.x2 - bloc.x1, bloc.y2 - bloc.y1, bloc.x1 - _vm->_eventsManager.start_x, bloc.y1); } + + dstRect.left = bloc.x1 - _vm->_eventsManager.start_x; + dstRect.top = bloc.y1; + dstRect.setWidth(bloc.x2 - bloc.x1); + dstRect.setHeight(bloc.y2 - bloc.y1); + + DD_Unlock(); } } _vm->_globals.BLOC[idx].field0 = 0; } + + _vm->_globals.NBBLOC = 0; + DD_Unlock(); + if (!_vm->_globals.BPP_NOAFF) { +// SDL_UpdateRects(LinuxScr, SDL_NBLOCS, dstrect); + } + SDL_NBLOCS = 0; } void GraphicsManager::CopyAsm(const byte *surface) { |