aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
authoruruk2014-03-04 15:25:26 +0100
committeruruk2014-03-04 15:25:26 +0100
commit8b16fdcede688a156b4787601d284224d915d49f (patch)
tree6b2581143abe790005a8572216fc2195d1cd4899 /engines/avalanche
parentd69975af14e121ff32f26bb86353e30044da1537 (diff)
downloadscummvm-rg350-8b16fdcede688a156b4787601d284224d915d49f.tar.gz
scummvm-rg350-8b16fdcede688a156b4787601d284224d915d49f.tar.bz2
scummvm-rg350-8b16fdcede688a156b4787601d284224d915d49f.zip
AVALANCHE: Implement loadMenu(). Unify it with menuLoadIcons().
Also rename menuLoadIcons to menuLoadPictures after the unifying.
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/graphics.cpp16
-rw-r--r--engines/avalanche/graphics.h2
-rw-r--r--engines/avalanche/mainmenu.cpp7
-rw-r--r--engines/avalanche/mainmenu.h1
4 files changed, 15 insertions, 11 deletions
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);