[Scummvm-cvs-logs] scummvm master -> 8b16fdcede688a156b4787601d284224d915d49f
urukgit
urukgit at users.noreply.github.com
Tue Mar 4 15:25:57 CET 2014
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8b16fdcede AVALANCHE: Implement loadMenu(). Unify it with menuLoadIcons().
Commit: 8b16fdcede688a156b4787601d284224d915d49f
https://github.com/scummvm/scummvm/commit/8b16fdcede688a156b4787601d284224d915d49f
Author: uruk (koppirnyo at gmail.com)
Date: 2014-03-04T06:25:26-08:00
Commit Message:
AVALANCHE: Implement loadMenu(). Unify it with menuLoadIcons().
Also rename menuLoadIcons to menuLoadPictures after the unifying.
Changed paths:
engines/avalanche/graphics.cpp
engines/avalanche/graphics.h
engines/avalanche/mainmenu.cpp
engines/avalanche/mainmenu.h
diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp
index 83910d0..0ba9a8c 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 fa72847..36952c7 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 30b92a9..6c3b606 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 b5e0a0e..7b1e386 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);
More information about the Scummvm-git-logs
mailing list