aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2012-09-21 21:05:19 +1000
committerPaul Gilbert2012-09-21 21:05:19 +1000
commit507af7e8a5933903131fa1d9c1ac65ae9e31cfa0 (patch)
tree1de5c005e645e9075f5e83143aa3a76e67a8c5fc
parentfc5d6bfb9976d24147d2e8c073c9ca9e9cc5b8fa (diff)
downloadscummvm-rg350-507af7e8a5933903131fa1d9c1ac65ae9e31cfa0.tar.gz
scummvm-rg350-507af7e8a5933903131fa1d9c1ac65ae9e31cfa0.tar.bz2
scummvm-rg350-507af7e8a5933903131fa1d9c1ac65ae9e31cfa0.zip
HOPKINS: Moved VBL method from EventsManager to GraphicsManager
-rw-r--r--engines/hopkins/events.cpp244
-rw-r--r--engines/hopkins/events.h1
-rw-r--r--engines/hopkins/graphics.cpp244
-rw-r--r--engines/hopkins/graphics.h1
-rw-r--r--engines/hopkins/hopkins.cpp38
-rw-r--r--engines/hopkins/menu.cpp12
6 files changed, 268 insertions, 272 deletions
diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp
index 53f1fe9d73..f3c1740d17 100644
--- a/engines/hopkins/events.cpp
+++ b/engines/hopkins/events.cpp
@@ -177,248 +177,4 @@ void EventsManager::pollEvents() {
}
}
-void EventsManager::VBL() {
- int a1 = 0;
- 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 (_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)
- _vm->_graphicsManager.m_scroll(_vm->_graphicsManager.VESA_BUFFER, _vm->_graphicsManager.ofscroll, 50, SCREEN_WIDTH, 340, 0, 50);
- else
- _vm->_graphicsManager.m_scroll(_vm->_graphicsManager.VESA_BUFFER, _vm->_graphicsManager.ofscroll, 20, SCREEN_WIDTH, 440, 0, 20);
- FileManager::DMESS();
- --_vm->_graphicsManager.REDRAW;
- }
- _vm->_graphicsManager.DD_Unlock();
- }
-
- if (souris_flag) {
- v1 = 20;
- if (!mouse_linux)
- v1 = 10;
- v2 = 20;
- if (!mouse_linux)
- v2 = 15;
-
- v15 = souris_x - v1;
- a1 = souris_y;
- v14 = souris_sizex;
- v13 = souris_sizey;
- if (btsouris == 23) {
- v14 = _vm->_globals.OBJL;
- v13 = _vm->_globals.OBJH;
- goto LABEL_35;
- }
-
- if (CASSE) {
- if (v15 < _vm->_graphicsManager.min_x)
- v15 = _vm->_graphicsManager.min_x;
- if (souris_y < _vm->_graphicsManager.min_y)
- a1 = _vm->_graphicsManager.min_y;
-
- if (souris_sizex + v15 >= _vm->_graphicsManager.max_x)
- v14 = souris_sizex - (souris_sizex + v15 - _vm->_graphicsManager.max_x);
- if (a1 + souris_sizey < _vm->_graphicsManager.max_y)
- goto LABEL_34;
-
- v3 = a1 + souris_sizey - _vm->_graphicsManager.max_y;
- } else {
- 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)
- a1 = _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 (a1 + souris_sizey < v2 + _vm->_graphicsManager.max_y)
- goto LABEL_34;
-
- v3 = v2 + a1 + souris_sizey - _vm->_graphicsManager.max_y;
- }
-
- v13 = souris_sizey - v3;
-LABEL_34:
- v12 = v14 + v15;
- v11 = a1 + v13;
- }
-LABEL_35:
-
- if (!_vm->_globals.PUBEXIT)
- _vm->_graphicsManager.AFF_SPRITES();
- if (souris_flag != 1)
- goto LABEL_54;
- if (btsouris == 23)
- goto LABEL_45;
-
- if (a1 >= _vm->_graphicsManager.max_y || v15 >= _vm->_graphicsManager.max_x || (signed int)v14 <= 1 || v13 <= 1) {
- if (btsouris != 23)
- goto LABEL_54;
-
-LABEL_45:
- if (a1 < _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 (a1 + v13 > _vm->_graphicsManager.max_y)
- v13 -= a1 + v13 - _vm->_graphicsManager.max_y;
-
- if ((signed int)v14 > 1 && v13 > 1) {
- _vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.cache_souris, v15, a1, v14, v13);
- _vm->_graphicsManager.Affiche_Perfect(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.Bufferobjet, v15 + 300, a1 + 300, 0, 0, 0, 0);
- _vm->_graphicsManager.Ajoute_Segment_Vesa(v15, a1, v14 + v15, a1 + v13);
- }
- }
- goto LABEL_54;
- }
-
- _vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.cache_souris, v15, a1, v14, v13);
- _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, pointeur_souris, v15 + 300, a1 + 300, souris_n);
- _vm->_graphicsManager.Ajoute_Segment_Vesa(v15, a1, v12, v11);
-
-LABEL_54:
- _vm->_globals.vitesse = 2;
-
- do {
- for (;;) {
- while (CASSE || _vm->_globals.iRegul != 1) {
- if (CASSE != 1)
- goto LABEL_63;
-
- if (lItCounter > 1)
- goto LABEL_65;
- }
-
- if (_vm->_globals.vitesse != 2)
- break;
-
- if (lItCounter > 9)
- goto LABEL_65;
- }
-LABEL_63:
- ;
- } while (_vm->_globals.iRegul == 3 && lItCounter <= 15);
-
-LABEL_65:
- _vm->_globals.vitesse = 2;
- lItCounter = 0;
-
- if (_vm->_graphicsManager.DOUBLE_ECRAN != 1 || _vm->_graphicsManager.no_scroll == 1) {
- _vm->_graphicsManager.Affiche_Segment_Vesa();
- } else {
- 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;
- }
-
- if (_vm->_graphicsManager.SCROLL < 0)
- _vm->_graphicsManager.SCROLL = 0;
-
- if (_vm->_graphicsManager.SCROLL > SCREEN_WIDTH)
- _vm->_graphicsManager.SCROLL = SCREEN_WIDTH;
-
- if (_vm->_graphicsManager.SDL_ECHELLE)
- v4 = _vm->_graphicsManager.Magic_Number(_vm->_graphicsManager.SCROLL);
- else
- v4 = _vm->_graphicsManager.SCROLL;
-
- if (_vm->_graphicsManager.OLD_SCROLL == v4) {
- _vm->_graphicsManager.Affiche_Segment_Vesa();
- } else {
- _vm->_fontManager.TEXTE_OFF(9);
- _vm->_graphicsManager.DD_Lock();
- if (_vm->_graphicsManager.SDL_ECHELLE) {
- if (_vm->_graphicsManager.Winbpp == 2) {
- v5 = _vm->_graphicsManager.Reel_Zoom(20, _vm->_graphicsManager.SDL_ECHELLE);
- _vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, v4, 20, 640, 440, 0, v5);
- } else {
- v6 = _vm->_graphicsManager.Reel_Zoom(20, _vm->_graphicsManager.SDL_ECHELLE);
- _vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_BUFFER, v4, 20, 640, 440, 0, v6);
- }
-
- _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(20, _vm->_graphicsManager.SDL_ECHELLE);
- _vm->_graphicsManager.dstrect[0].setWidth(_vm->_graphicsManager.Reel_Zoom(SCREEN_WIDTH, _vm->_graphicsManager.SDL_ECHELLE));
- _vm->_graphicsManager.dstrect[0].setHeight(_vm->_graphicsManager.Reel_Zoom(440, _vm->_graphicsManager.SDL_ECHELLE));
- } else {
- if (_vm->_graphicsManager.Winbpp == 2)
- _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, v4, 20, 640, 440, 0, 20);
- else
- _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, SCREEN_WIDTH, SCREEN_HEIGHT - 40);
- }
-
- 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;
- start_x = v4;
- _vm->_graphicsManager.ofscroll = v4;
- _vm->_graphicsManager.SCROLL = v4;
- }
-
- _vm->_graphicsManager.OLD_SCROLL = v4;
- start_x = v4;
- _vm->_graphicsManager.ofscroll = v4;
- }
-
- souris_bb = souris_b;
- souris_b = 0;
- if (souris_flag == 1) {
- if (btsouris != 23) {
- if (a1 < _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, a1, v14, v13);
- _vm->_graphicsManager.Ajoute_Segment_Vesa(v15, a1, v12, v11);
- goto LABEL_113;
- }
-
- if (btsouris != 23)
- goto LABEL_113;
- }
-
- if (a1 < _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, a1, v14, v13);
- _vm->_graphicsManager.Ajoute_Segment_Vesa(v15, a1, v14 + v15, a1 + v13);
- }
- }
-
-LABEL_113:
-
- _vm->_soundManager.VERIF_SOUND();
- return CONTROLE_MES();
-}
-
} // End of namespace Hopkins
diff --git a/engines/hopkins/events.h b/engines/hopkins/events.h
index d58b602735..b5c0ade35f 100644
--- a/engines/hopkins/events.h
+++ b/engines/hopkins/events.h
@@ -70,7 +70,6 @@ public:
void MOUSE_ON();
void MOUSE_OFF();
void CHANGE_MOUSE(int id);
- void VBL();
void CONTROLE_MES();
void delay(int delay);
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
index 788af5a801..50c33dddaf 100644
--- a/engines/hopkins/graphics.cpp
+++ b/engines/hopkins/graphics.cpp
@@ -1401,8 +1401,8 @@ void GraphicsManager::FIN_VISU() {
_vm->_objectsManager.BOB_OFF(idx);
}
- _vm->_eventsManager.VBL();
- _vm->_eventsManager.VBL();
+ _vm->_graphicsManager.VBL();
+ _vm->_graphicsManager.VBL();
for (int idx = 1; idx <= 20; ++idx) {
if (_vm->_globals.Bqe_Anim[idx].field4 == 1)
@@ -2145,4 +2145,244 @@ Aff_Zoom_Larg_Cont1:
}
}
+void GraphicsManager::VBL() {
+ int a1 = 0;
+ 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;
+ } else {
+ if (_vm->_globals.iRegul == 3)
+ m_scroll(VESA_BUFFER, ofscroll, 50, SCREEN_WIDTH, 340, 0, 50);
+ else
+ m_scroll(VESA_BUFFER, ofscroll, 20, SCREEN_WIDTH, 440, 0, 20);
+ FileManager::DMESS();
+ --REDRAW;
+ }
+ DD_Unlock();
+ }
+
+ if (_vm->_eventsManager.souris_flag) {
+ v1 = 20;
+ if (!_vm->_eventsManager.mouse_linux)
+ v1 = 10;
+ v2 = 20;
+ if (!_vm->_eventsManager.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) {
+ 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)
+ goto LABEL_34;
+
+ v3 = a1 + _vm->_eventsManager.souris_sizey - max_y;
+ } else {
+ if (v15 < min_x)
+ v15 = min_x - v1;
+ v2 = (signed __int16)v2;
+ if (_vm->_eventsManager.souris_y < min_y - (signed __int16)v2)
+ a1 = min_y - (signed __int16)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)
+ goto LABEL_34;
+
+ v3 = v2 + a1 + _vm->_eventsManager.souris_sizey - max_y;
+ }
+
+ v13 = _vm->_eventsManager.souris_sizey - v3;
+LABEL_34:
+ v12 = v14 + v15;
+ v11 = a1 + v13;
+ }
+LABEL_35:
+
+ if (!_vm->_globals.PUBEXIT)
+ AFF_SPRITES();
+ if (_vm->_eventsManager.souris_flag != 1)
+ goto LABEL_54;
+ if (_vm->_eventsManager.btsouris == 23)
+ goto LABEL_45;
+
+ if (a1 >= max_y || v15 >= max_x || (signed int)v14 <= 1 || v13 <= 1) {
+ if (_vm->_eventsManager.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);
+ }
+ }
+ 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);
+
+LABEL_54:
+ _vm->_globals.vitesse = 2;
+
+ do {
+ for (;;) {
+ while (_vm->_eventsManager.CASSE || _vm->_globals.iRegul != 1) {
+ if (_vm->_eventsManager.CASSE != 1)
+ goto LABEL_63;
+
+ if (_vm->_eventsManager.lItCounter > 1)
+ goto LABEL_65;
+ }
+
+ if (_vm->_globals.vitesse != 2)
+ break;
+
+ if (_vm->_eventsManager.lItCounter > 9)
+ goto LABEL_65;
+ }
+LABEL_63:
+ ;
+ } while (_vm->_globals.iRegul == 3 && _vm->_eventsManager.lItCounter <= 15);
+
+LABEL_65:
+ _vm->_globals.vitesse = 2;
+ _vm->_eventsManager.lItCounter = 0;
+
+ if (DOUBLE_ECRAN != 1 || no_scroll == 1) {
+ 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;
+ }
+
+ SCROLL = CLIP(SCROLL, 0, SCREEN_WIDTH);
+
+ if (SDL_ECHELLE)
+ v4 = Magic_Number(SCROLL);
+ else
+ v4 = SCROLL;
+
+ if (OLD_SCROLL == v4) {
+ 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);
+ } else {
+ v6 = Reel_Zoom(20, SDL_ECHELLE);
+ m_scroll2A(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));
+ } else {
+ if (Winbpp == 2)
+ m_scroll16(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);
+ }
+
+ 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;
+ start_x = v4;
+ ofscroll = v4;
+ SCROLL = v4;
+ }
+
+ OLD_SCROLL = v4;
+ start_x = v4;
+ 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);
+ goto LABEL_113;
+ }
+
+ if (_vm->_eventsManager.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);
+ }
+ }
+
+LABEL_113:
+
+ _vm->_soundManager.VERIF_SOUND();
+ return _vm->_eventsManager.CONTROLE_MES();
+}
+
} // End of namespace Hopkins
diff --git a/engines/hopkins/graphics.h b/engines/hopkins/graphics.h
index e02343132c..a3a6e81624 100644
--- a/engines/hopkins/graphics.h
+++ b/engines/hopkins/graphics.h
@@ -155,6 +155,7 @@ public:
int Reel_Reduc(int v, int percentage);
void AFF_SPRITES();
void Affiche_Perfect(byte *destSurface, const byte *srcData, int a3, int a4, int a5, int a6, int a7, int a8);
+ void VBL();
};
} // End of namespace Hopkins
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index 0b41bf16aa..68c580c77b 100644
--- a/engines/hopkins/hopkins.cpp
+++ b/engines/hopkins/hopkins.cpp
@@ -588,10 +588,10 @@ void HopkinsEngine::INTRORUN() {
byte paletteData2[PALETTE_EXT_BLOCK_SIZE];
memset(&paletteData, 0, PALETTE_EXT_BLOCK_SIZE);
- _eventsManager.VBL();
+ _graphicsManager.VBL();
_eventsManager.souris_flag = 0;
_globals.iRegul = 1;
- _eventsManager.VBL();
+ _graphicsManager.VBL();
_soundManager.WSOUND(16);
_animationManager.CLS_ANM = 1;
_animationManager.PLAY_ANM("J1.anm", 12, 12, 50);
@@ -621,7 +621,7 @@ void HopkinsEngine::INTRORUN() {
_globals.BPP_NOAFF = 1;
v2 = 0;
do {
- _eventsManager.VBL();
+ _graphicsManager.VBL();
++v2;
} while (v2 <= 4);
@@ -644,10 +644,10 @@ void HopkinsEngine::INTRORUN() {
v4 = _eventsManager.YMOUSE();
_eventsManager.souris_xy(_eventsManager.souris_x + 4, v4);
}
- _eventsManager.VBL();
+ _graphicsManager.VBL();
} while (v3 != 1 && _graphicsManager.SCROLL != SCREEN_WIDTH);
- _eventsManager.VBL();
+ _graphicsManager.VBL();
_graphicsManager.no_scroll = 0;
}
@@ -670,7 +670,7 @@ void HopkinsEngine::INTRORUN() {
v5 = 0;
do {
- _eventsManager.VBL();
+ _graphicsManager.VBL();
++v5;
} while (v5 <= 4);
@@ -678,12 +678,12 @@ void HopkinsEngine::INTRORUN() {
_globals.iRegul = 1;
_graphicsManager.FADE_INW();
for (i = 0; i < 200 / _globals.vitesse; ++i)
- _eventsManager.VBL();
+ _graphicsManager.VBL();
_animationManager.BOBANIM_ON(3);
_soundManager.VOICE_MIX(5, 3);
_animationManager.BOBANIM_OFF(3);
- _eventsManager.VBL();
+ _graphicsManager.VBL();
memcpy(&paletteData2, _graphicsManager.Palette, 796);
v21 = *(uint16 *)&_graphicsManager.Palette[796];
v22 = _graphicsManager.Palette[798];
@@ -713,7 +713,7 @@ void HopkinsEngine::INTRORUN() {
v8 = 0;
do {
- _eventsManager.VBL();
+ _graphicsManager.VBL();
++v8;
} while (v8 <= 3);
@@ -725,9 +725,9 @@ void HopkinsEngine::INTRORUN() {
while (!_eventsManager.ESC_KEY) {
if (v9 == 12) {
_animationManager.BOBANIM_ON(3);
- _eventsManager.VBL();
+ _graphicsManager.VBL();
_soundManager.VOICE_MIX(6, 3);
- _eventsManager.VBL();
+ _graphicsManager.VBL();
_animationManager.BOBANIM_OFF(3);
}
@@ -748,7 +748,7 @@ void HopkinsEngine::INTRORUN() {
v7 = 2 * v9;
do {
- _eventsManager.VBL();
+ _graphicsManager.VBL();
++v13;
} while (v13 < v7);
}
@@ -759,7 +759,7 @@ void HopkinsEngine::INTRORUN() {
v7 = 20 - v9;
do {
- _eventsManager.VBL();
+ _graphicsManager.VBL();
++v14;
} while (v14 < v7);
}
@@ -768,17 +768,17 @@ void HopkinsEngine::INTRORUN() {
if (v9 > 15) {
_graphicsManager.setpal_vga256_linux(paletteData, _graphicsManager.VESA_BUFFER);
for (j = 1; j < 100 / _globals.vitesse; ++j)
- _eventsManager.VBL();
+ _graphicsManager.VBL();
_animationManager.BOBANIM_ON(3);
_soundManager.VOICE_MIX(7, 3);
_animationManager.BOBANIM_OFF(3);
for (k = 1; k < 60 / _globals.vitesse; ++k)
- _eventsManager.VBL();
+ _graphicsManager.VBL();
_animationManager.BOBANIM_ON(5);
for (l = 0; l < 20 / _globals.vitesse; ++l)
- _eventsManager.VBL();
+ _graphicsManager.VBL();
Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsManager.Palette[0]);
_graphicsManager.setpal_vga256_linux(_graphicsManager.Palette, _graphicsManager.VESA_BUFFER);
@@ -790,7 +790,7 @@ void HopkinsEngine::INTRORUN() {
_animationManager.BOBANIM_OFF(3);
}
- _eventsManager.VBL();
+ _graphicsManager.VBL();
}
_graphicsManager.FADE_OUTW();
@@ -867,7 +867,7 @@ void HopkinsEngine::PUBQUIT() {
do {
xp = _eventsManager.XMOUSE();
yp = _eventsManager.YMOUSE();
- _eventsManager.VBL();
+ _graphicsManager.VBL();
if (_eventsManager.BMOUSE() == 1)
mouseClicked = true;
@@ -880,7 +880,7 @@ void HopkinsEngine::PUBQUIT() {
while (1) {
_globals.iRegul = 10;
- _eventsManager.VBL();
+ _graphicsManager.VBL();
}
}
return _graphicsManager.FADE_OUTW();
diff --git a/engines/hopkins/menu.cpp b/engines/hopkins/menu.cpp
index 93d30f96a9..d25f642be2 100644
--- a/engines/hopkins/menu.cpp
+++ b/engines/hopkins/menu.cpp
@@ -168,7 +168,7 @@ int MenuManager::MENU() {
AFFICHE_SPEED(v1, 230, 322, v9 + 4);
AFFICHE_SPEED(v1, 230, 354, v8 + 6);
AFFICHE_SPEED(v1, 230, 386, v7 + 8);
- _vm->_eventsManager.VBL();
+ _vm->_graphicsManager.VBL();
if (_vm->_eventsManager.BMOUSE() == 1 && v2 > 0)
v12 = 1;
@@ -176,7 +176,7 @@ int MenuManager::MENU() {
if (v2 == 1) {
AFFICHE_SPEED(v1, 230, 259, 10);
- _vm->_eventsManager.VBL();
+ _vm->_graphicsManager.VBL();
_vm->_eventsManager.delay(200);
v6 = 1;
}
@@ -184,7 +184,7 @@ int MenuManager::MENU() {
break;
AFFICHE_SPEED(v1, 230, 291, 11);
- _vm->_eventsManager.VBL();
+ _vm->_graphicsManager.VBL();
_vm->_eventsManager.delay(200);
_vm->_globals.SORTIE = -1;
@@ -201,14 +201,14 @@ int MenuManager::MENU() {
break;
AFFICHE_SPEED(v1, 230, 322, 12);
- _vm->_eventsManager.VBL();
+ _vm->_graphicsManager.VBL();
_vm->_eventsManager.delay(200);
CHOICE_OPTION();
}
if (v2 == 4) {
AFFICHE_SPEED(v1, 230, 354, 13);
- _vm->_eventsManager.VBL();
+ _vm->_graphicsManager.VBL();
_vm->_eventsManager.delay(200);
_vm->INTRORUN();
continue;
@@ -216,7 +216,7 @@ int MenuManager::MENU() {
if ( v2 == 5 ) {
AFFICHE_SPEED(v1, 230, 386, 14);
- _vm->_eventsManager.VBL();
+ _vm->_graphicsManager.VBL();
_vm->_eventsManager.delay(200);
v6 = -1;
}