diff options
author | Paul Gilbert | 2012-09-22 10:36:18 +1000 |
---|---|---|
committer | Paul Gilbert | 2012-09-22 10:36:18 +1000 |
commit | 460b4eb17b02dd1bc5653d8f4c7732654bad77ed (patch) | |
tree | ed7012097804a2bf0e060e49ef5ba839a5ffe83f | |
parent | 1a639302782e35307ee82d4961f7f784fb2fd917 (diff) | |
download | scummvm-rg350-460b4eb17b02dd1bc5653d8f4c7732654bad77ed.tar.gz scummvm-rg350-460b4eb17b02dd1bc5653d8f4c7732654bad77ed.tar.bz2 scummvm-rg350-460b4eb17b02dd1bc5653d8f4c7732654bad77ed.zip |
HOPKINS: Implemented AFFICHE_SPEED method
-rw-r--r-- | engines/hopkins/globals.cpp | 1 | ||||
-rw-r--r-- | engines/hopkins/globals.h | 1 | ||||
-rw-r--r-- | engines/hopkins/graphics.cpp | 16 | ||||
-rw-r--r-- | engines/hopkins/graphics.h | 1 | ||||
-rw-r--r-- | engines/hopkins/menu.cpp | 30 | ||||
-rw-r--r-- | engines/hopkins/menu.h | 1 |
6 files changed, 32 insertions, 18 deletions
diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp index 55c943baa2..0a5bd707c1 100644 --- a/engines/hopkins/globals.cpp +++ b/engines/hopkins/globals.cpp @@ -119,6 +119,7 @@ Globals::Globals() { FLAG_VISIBLE = false; netscape = false; NOMARCHE = false; + NO_VISU = false; } Globals::~Globals() { diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h index 40ddc85c53..18aca79f25 100644 --- a/engines/hopkins/globals.h +++ b/engines/hopkins/globals.h @@ -273,6 +273,7 @@ public: bool netscape; bool NOMARCHE; int NBBLOC; + bool NO_VISU; Globals(); ~Globals(); diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index aa6f54529c..b7eb48937c 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -2375,4 +2375,20 @@ LABEL_113: return _vm->_eventsManager.CONTROLE_MES(); } +void GraphicsManager::AFFICHE_SPEED(const byte *spriteData, int xp, int yp, int spriteIndex) { + int width, height; + + width = _vm->_objectsManager.Get_Largeur(spriteData, spriteIndex); + height = _vm->_objectsManager.Get_Hauteur(spriteData, spriteIndex); + if (*spriteData == 78) { + Affiche_Perfect(VESA_SCREEN, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, 0); + Affiche_Perfect(VESA_BUFFER, spriteData, xp + 300, yp + 300, spriteIndex, 0, 0, 0); + } else { + Sprite_Vesa(VESA_BUFFER, spriteData, xp + 300, yp + 300, spriteIndex); + Sprite_Vesa(VESA_SCREEN, spriteData, xp + 300, yp + 300, spriteIndex); + } + if (!_vm->_globals.NO_VISU) + Ajoute_Segment_Vesa(xp, yp, xp + width, yp + height); +} + } // End of namespace Hopkins diff --git a/engines/hopkins/graphics.h b/engines/hopkins/graphics.h index ca343cc1b4..0fc5222408 100644 --- a/engines/hopkins/graphics.h +++ b/engines/hopkins/graphics.h @@ -166,6 +166,7 @@ public: 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(); + void AFFICHE_SPEED(const byte *spriteData, int xp, int yp, int spriteIndex); }; } // End of namespace Hopkins diff --git a/engines/hopkins/menu.cpp b/engines/hopkins/menu.cpp index d25f642be2..b204223757 100644 --- a/engines/hopkins/menu.cpp +++ b/engines/hopkins/menu.cpp @@ -37,7 +37,7 @@ void MenuManager::setParent(HopkinsEngine *vm) { } int MenuManager::MENU() { - byte *v1 = NULL; + byte *spriteData = NULL; signed int v2; int v3; int v4; @@ -84,7 +84,7 @@ int MenuManager::MENU() { if (_vm->_globals.FR == 2) FileManager::CONSTRUIT_SYSTEM("MENUES.SPR"); - v1 = _vm->_objectsManager.CHARGE_SPRITE(_vm->_globals.NFICHIER); + spriteData = _vm->_objectsManager.CHARGE_SPRITE(_vm->_globals.NFICHIER); _vm->_eventsManager.MOUSE_ON(); _vm->_eventsManager.CHANGE_MOUSE(0); _vm->_eventsManager.btsouris = 0; @@ -163,11 +163,11 @@ int MenuManager::MENU() { break; } - AFFICHE_SPEED(v1, 230, 259, v11); - AFFICHE_SPEED(v1, 230, 291, v10 + 2); - AFFICHE_SPEED(v1, 230, 322, v9 + 4); - AFFICHE_SPEED(v1, 230, 354, v8 + 6); - AFFICHE_SPEED(v1, 230, 386, v7 + 8); + _vm->_graphicsManager.AFFICHE_SPEED(spriteData, 230, 259, v11); + _vm->_graphicsManager.AFFICHE_SPEED(spriteData, 230, 291, v10 + 2); + _vm->_graphicsManager.AFFICHE_SPEED(spriteData, 230, 322, v9 + 4); + _vm->_graphicsManager.AFFICHE_SPEED(spriteData, 230, 354, v8 + 6); + _vm->_graphicsManager.AFFICHE_SPEED(spriteData, 230, 386, v7 + 8); _vm->_graphicsManager.VBL(); if (_vm->_eventsManager.BMOUSE() == 1 && v2 > 0) @@ -175,7 +175,7 @@ int MenuManager::MENU() { } while (v12 != 1); if (v2 == 1) { - AFFICHE_SPEED(v1, 230, 259, 10); + _vm->_graphicsManager.AFFICHE_SPEED(spriteData, 230, 259, 10); _vm->_graphicsManager.VBL(); _vm->_eventsManager.delay(200); v6 = 1; @@ -183,7 +183,7 @@ int MenuManager::MENU() { if (v2 != 2) break; - AFFICHE_SPEED(v1, 230, 291, 11); + _vm->_graphicsManager.AFFICHE_SPEED(spriteData, 230, 291, 11); _vm->_graphicsManager.VBL(); _vm->_eventsManager.delay(200); @@ -200,14 +200,14 @@ int MenuManager::MENU() { if (v2 != 3) break; - AFFICHE_SPEED(v1, 230, 322, 12); + _vm->_graphicsManager.AFFICHE_SPEED(spriteData, 230, 322, 12); _vm->_graphicsManager.VBL(); _vm->_eventsManager.delay(200); CHOICE_OPTION(); } if (v2 == 4) { - AFFICHE_SPEED(v1, 230, 354, 13); + _vm->_graphicsManager.AFFICHE_SPEED(spriteData, 230, 354, 13); _vm->_graphicsManager.VBL(); _vm->_eventsManager.delay(200); _vm->INTRORUN(); @@ -215,7 +215,7 @@ int MenuManager::MENU() { } if ( v2 == 5 ) { - AFFICHE_SPEED(v1, 230, 386, 14); + _vm->_graphicsManager.AFFICHE_SPEED(spriteData, 230, 386, 14); _vm->_graphicsManager.VBL(); _vm->_eventsManager.delay(200); v6 = -1; @@ -223,17 +223,13 @@ int MenuManager::MENU() { break; } - _vm->_globals.LIBERE_FICHIER(v1); + _vm->_globals.LIBERE_FICHIER(spriteData); _vm->_globals.DESACTIVE_INVENT = 0; _vm->_globals.FLAG_VISIBLE = 0; _vm->_graphicsManager.FADE_OUTW(); return v6; } -void MenuManager::AFFICHE_SPEED(byte *a1, int a2, int a3, int a4) { - warning("AFFICHE_SPEED"); -} - void MenuManager::CHOICE_OPTION() { warning("CHOICE_OPTION"); } diff --git a/engines/hopkins/menu.h b/engines/hopkins/menu.h index a120157ebe..8d3d8d696a 100644 --- a/engines/hopkins/menu.h +++ b/engines/hopkins/menu.h @@ -40,7 +40,6 @@ public: void setParent(HopkinsEngine *vm); int MENU(); - void AFFICHE_SPEED(byte *a1, int a2, int a3, int a4); void CHARGE_PARTIE(); }; |