diff options
Diffstat (limited to 'engines/macventure/gui.cpp')
-rw-r--r-- | engines/macventure/gui.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp index 8ced27957d..310cf92443 100644 --- a/engines/macventure/gui.cpp +++ b/engines/macventure/gui.cpp @@ -392,7 +392,6 @@ bool Gui::loadMenus() { int i = 1; for (iter = resArray.begin(); iter != resArray.end(); ++iter) { res = _resourceManager->getResource(MKTAG('M', 'E', 'N', 'U'), *iter); - bool enabled; uint16 key; uint16 style; uint8 titleLength; @@ -400,7 +399,6 @@ bool Gui::loadMenus() { /* Skip menuID, width, height, resourceID, placeholder */ for (int skip = 0; skip < 5; skip++) { res->readUint16BE(); } - enabled = res->readUint32BE(); titleLength = res->readByte(); title = new char[titleLength + 1]; res->read(title, titleLength); @@ -410,7 +408,7 @@ bool Gui::loadMenus() { _menu->addMenuItem(title); // Read submenu items - while (titleLength = res->readByte()) { + while ((titleLength = res->readByte())) { title = new char[titleLength + 1]; res->read(title, titleLength); title[titleLength] = '\0'; @@ -495,7 +493,6 @@ bool Gui::loadControls() { if ((resArray = _resourceManager->getResIDArray(MKTAG('C', 'N', 'T', 'L'))).size() == 0) return false; - uint16 commandsBorder = borderBounds(kPlainDBox).topOffset; uint32 id = kControlExitBox; for (iter = resArray.begin(); iter != resArray.end(); ++iter) { res = _resourceManager->getResource(MKTAG('C', 'N', 'T', 'L'), *iter); @@ -553,7 +550,6 @@ void Gui::drawCommandsWindow() { if (_engine->needsClickToContinue()) { Graphics::ManagedSurface *srf = _controlsWindow->getSurface(); WindowData data = getWindowData(kCommandsWindow); - uint16 border = borderBounds(data.type).topOffset; srf->fillRect(Common::Rect(0, 0, srf->w, srf->h), kColorWhite); getCurrentFont().drawString( srf, @@ -618,12 +614,10 @@ void Gui::drawInventories() { Graphics::MacWindow *win = findWindow(data.refcon); srf = win->getSurface(); srf->clear(kColorGreen); - BorderBounds border = borderBounds(data.type); srf->fillRect(srf->getBounds(), kColorWhite); drawObjectsInWindow(data, srf); if (DebugMan.isDebugChannelEnabled(kMVDebugGUI)) { - Graphics::MacWindow *win = findWindow(data.refcon); Common::Rect innerDims = win->getInnerDimensions(); int x = win->getDimensions().left; int y = win->getDimensions().top; @@ -988,13 +982,15 @@ Graphics::MacWindow * Gui::findWindow(WindowReference reference) { return _exitsWindow; case MacVenture::kDiplomaWindow: return _diplomaWindow; + default: + return NULL; } return NULL; } void Gui::ensureInventoryOpen(WindowReference reference, ObjID id) { assert(reference < 0x80 && reference >= kInventoryStart); - if (reference - kInventoryStart == _inventoryWindows.size()) { + if (reference - kInventoryStart == (int)_inventoryWindows.size()) { createInventoryWindow(id); } } |