From 8b16fdcede688a156b4787601d284224d915d49f Mon Sep 17 00:00:00 2001 From: uruk Date: Tue, 4 Mar 2014 15:25:26 +0100 Subject: AVALANCHE: Implement loadMenu(). Unify it with menuLoadIcons(). Also rename menuLoadIcons to menuLoadPictures after the unifying. --- engines/avalanche/graphics.cpp | 16 +++++++++++++--- engines/avalanche/graphics.h | 2 +- engines/avalanche/mainmenu.cpp | 7 +------ engines/avalanche/mainmenu.h | 1 - 4 files changed, 15 insertions(+), 11 deletions(-) (limited to 'engines/avalanche') diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp index 83910d00ad..0ba9a8c118 100644 --- a/engines/avalanche/graphics.cpp +++ b/engines/avalanche/graphics.cpp @@ -802,7 +802,7 @@ void GraphicManager::menuClear() { initGraphics(kScreenWidth, 2 * kScreenHeight, true); } -void GraphicManager::menuLoadIcons() { +void GraphicManager::menuLoadPictures() { _menu.fillRect(Common::Rect(0, 0, kScreenWidth, kMenuScreenHeight), kColorBlack); Common::File file; @@ -845,10 +845,20 @@ void GraphicManager::menuLoadIcons() { _menu.fillRect(Common::Rect(114, 70 + i * 33, 584, 73 + i * 33), kColorWhite); _menu.fillRect(Common::Rect(114, 100 + i * 33, 584, 103 + i * 33), kColorDarkgray); } - - menuRefreshScreen(); file.close(); + + // The title on the top of the screen: + if (!file.open("mainmenu.avd")) + error("AVALANCHE: MainMenu: File not found: mainmenu.avd"); + + Graphics::Surface title = loadPictureRaw(file, 640, 59); + drawPicture(_menu, title, 0, 0); + title.free(); + + file.close(); + + menuRefreshScreen(); } /** diff --git a/engines/avalanche/graphics.h b/engines/avalanche/graphics.h index fa72847856..36952c7415 100644 --- a/engines/avalanche/graphics.h +++ b/engines/avalanche/graphics.h @@ -123,7 +123,7 @@ public: void menuRefreshScreen(); void menuInitialize(); void menuClear(); - void menuLoadIcons(); + void menuLoadPictures(); void clearAlso(); void clearTextBar(); diff --git a/engines/avalanche/mainmenu.cpp b/engines/avalanche/mainmenu.cpp index 30b92a9bf3..6c3b606854 100644 --- a/engines/avalanche/mainmenu.cpp +++ b/engines/avalanche/mainmenu.cpp @@ -38,8 +38,7 @@ MainMenu::MainMenu(AvalancheEngine *vm) { void MainMenu::run() { _vm->_graphics->menuInitialize(); - _vm->_graphics->menuLoadIcons(); - loadMenu(); + _vm->_graphics->menuLoadPictures(); loadRegiInfo(); option(1, "Play the game."); @@ -55,10 +54,6 @@ void MainMenu::run() { _vm->_graphics->menuClear(); } -void MainMenu::loadMenu() { - warning("STUB: MainMenu::loadMenu()"); -} - void MainMenu::loadRegiInfo() { warning("STUB: MainMenu::loadRegiInfo()"); } diff --git a/engines/avalanche/mainmenu.h b/engines/avalanche/mainmenu.h index b5e0a0e3da..7b1e38612f 100644 --- a/engines/avalanche/mainmenu.h +++ b/engines/avalanche/mainmenu.h @@ -42,7 +42,6 @@ private: Common::String registrant; - void loadMenu(); void loadRegiInfo(); void option(byte which, Common::String what); void centre(int16 y, Common::String text); -- cgit v1.2.3