aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/menu_views.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mads/menu_views.cpp')
-rw-r--r--engines/mads/menu_views.cpp77
1 files changed, 57 insertions, 20 deletions
diff --git a/engines/mads/menu_views.cpp b/engines/mads/menu_views.cpp
index cfc3b09461..10d5a2179a 100644
--- a/engines/mads/menu_views.cpp
+++ b/engines/mads/menu_views.cpp
@@ -1,24 +1,24 @@
/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
+*
+* ScummVM is the legal property of its developers, whose names
+* are too numerous to list here. Please refer to the COPYRIGHT
+* file distributed with this source distribution.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+*/
#include "common/scummsys.h"
#include "mads/game.h"
@@ -254,6 +254,7 @@ void TextView::processCommand() {
sceneInfo->_width = MADS_SCREEN_WIDTH;
sceneInfo->_height = MADS_SCENE_HEIGHT;
_spareScreens[spareIndex].setSize(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT);
+
sceneInfo->loadMadsV1Background(screenId, "", SCENEFLAG_TRANSLATE,
_spareScreens[spareIndex]);
delete sceneInfo;
@@ -795,4 +796,40 @@ int AnimationView::getParameter() {
return result;
}
+void AnimationView::checkResource(const Common::String &resourceName) {
+ //bool hasSuffix = false;
+
+}
+
+int AnimationView::scanResourceIndex(const Common::String &resourceName) {
+ int foundIndex = -1;
+
+ if (_v1) {
+ const char *chP = strchr(resourceName.c_str(), '\\');
+ if (!chP) {
+ chP = strchr(resourceName.c_str(), '*');
+ }
+
+ Common::String resName = chP ? Common::String(chP + 1) : resourceName;
+
+ if (_v2 != 3) {
+ assert(_resIndex.size() == 0);
+ }
+
+ // Scan for the resource name
+ for (uint resIndex = 0; resIndex < _resIndex.size(); ++resIndex) {
+ ResIndexEntry &resEntry = _resIndex[resIndex];
+ if (resEntry._resourceName.compareToIgnoreCase(resourceName)) {
+ foundIndex = resIndex;
+ break;
+ }
+ }
+ }
+
+ if (foundIndex >= 0) {
+ // TODO
+ }
+ return -1;
+}
+
} // End of namespace MADS