[Scummvm-git-logs] scummvm master -> e5877985ffb3a189a9f46b78b5590463186addda
sev-
noreply at scummvm.org
Sun Sep 4 18:30:12 UTC 2022
This automated email contains information about 8 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
64d4c93568 MACVENTURE: Support return to launcher
51543aa523 MACVENTURE: Use MacMenu::loadMenuResource
300a575b86 MACVENTURE: Trim inventory window title to fit it in the border
e97bdbd5a5 MACVENTURE: Fix text alignment of window titles
26c3c4f160 MACVENTURE: Invert exit window's color when active
081c3db06b MACVENTURE: Fix window titles
22308ed4f7 MACVENTURE: Fix window borders
e5877985ff MACVENTURE: Change comment
Commit: 64d4c93568fffee5ea528be50f546ff7a7362d2a
https://github.com/scummvm/scummvm/commit/64d4c93568fffee5ea528be50f546ff7a7362d2a
Author: Avijeet (am388488 at gmail.com)
Date: 2022-09-04T20:30:02+02:00
Commit Message:
MACVENTURE: Support return to launcher
Changed paths:
engines/macventure/macventure.cpp
diff --git a/engines/macventure/macventure.cpp b/engines/macventure/macventure.cpp
index 96469a9be6b..6678c17e681 100644
--- a/engines/macventure/macventure.cpp
+++ b/engines/macventure/macventure.cpp
@@ -491,6 +491,7 @@ void MacVentureEngine::processEvents() {
switch (event.type) {
case Common::EVENT_QUIT:
+ case Common::EVENT_RETURN_TO_LAUNCHER:
_gameState = kGameStateQuitting;
break;
default:
Commit: 51543aa5236f753b1fb67ac6618cf456b8f3287a
https://github.com/scummvm/scummvm/commit/51543aa5236f753b1fb67ac6618cf456b8f3287a
Author: Avijeet (am388488 at gmail.com)
Date: 2022-09-04T20:30:02+02:00
Commit Message:
MACVENTURE: Use MacMenu::loadMenuResource
Changed paths:
engines/macventure/gui.cpp
diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp
index 61903080233..0ae55be1df8 100644
--- a/engines/macventure/gui.cpp
+++ b/engines/macventure/gui.cpp
@@ -475,44 +475,7 @@ bool Gui::loadMenus() {
int i = 1;
for (iter = resArray.begin(); iter != resArray.end(); ++iter) {
- res = _resourceManager->getResource(MKTAG('M', 'E', 'N', 'U'), *iter);
- uint16 key;
- uint16 style;
- uint8 titleLength;
- char *title;
-
- /* Skip menuID, width, height, resourceID, placeholder */
- for (int skip = 0; skip < 5; skip++) {
- res->readUint16BE();
- }
- titleLength = res->readByte();
- title = new char[titleLength + 1];
- res->read(title, titleLength);
- title[titleLength] = '\0';
-
- if (titleLength > 1) {
- _menu->addMenuItem(nullptr, title);
- Graphics::MacMenuSubMenu *submenu = _menu->addSubMenu(nullptr);
-
- // Read submenu items
- while ((titleLength = res->readByte())) {
- title = new char[titleLength + 1];
- res->read(title, titleLength);
- title[titleLength] = '\0';
- // Skip icon
- res->readUint16BE();
- // Read key
- key = res->readUint16BE();
- // Skip mark
- res->readUint16BE();
- // Read style
- style = res->readUint16BE();
- _menu->addMenuItem(submenu, title, 0, style, key, false);
- }
- }
-
- i++;
- delete res;
+ _menu->loadMenuResource(_resourceManager, *iter);
}
return true;
Commit: 300a575b8686a913cba01d9a90d67b70469258bc
https://github.com/scummvm/scummvm/commit/300a575b8686a913cba01d9a90d67b70469258bc
Author: Avijeet (am388488 at gmail.com)
Date: 2022-09-04T20:30:02+02:00
Commit Message:
MACVENTURE: Trim inventory window title to fit it in the border
Changed paths:
engines/macventure/gui.cpp
engines/macventure/macventure.cpp
diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp
index 0ae55be1df8..21403694112 100644
--- a/engines/macventure/gui.cpp
+++ b/engines/macventure/gui.cpp
@@ -381,7 +381,7 @@ WindowReference Gui::createInventoryWindow(ObjID objRef) {
//newWindow->setDimensions(newData.bounds);
//newWindow->setActive(false);
loadBorders(newWindow, newData.type);
- newWindow->resize(newData.bounds.width() - bbs.rightScrollbarWidth, newData.bounds.height() - bbs.bottomScrollbarHeight, true);
+ newWindow->resize(newData.bounds.width(), newData.bounds.height() - bbs.bottomScrollbarHeight, true);
newWindow->move(newData.bounds.left - bbs.leftOffset, newData.bounds.top - bbs.topOffset);
newWindow->setCallback(inventoryWindowCallback, this);
//newWindow->setCloseable(true);
diff --git a/engines/macventure/macventure.cpp b/engines/macventure/macventure.cpp
index 6678c17e681..f637d157846 100644
--- a/engines/macventure/macventure.cpp
+++ b/engines/macventure/macventure.cpp
@@ -785,7 +785,12 @@ void MacVentureEngine::openObject(ObjID objID) {
} else { // Open inventory window
Common::Point p(_world->getObjAttr(objID, kAttrPosX), _world->getObjAttr(objID, kAttrPosY));
WindowReference invID = _gui->createInventoryWindow(objID);
- _gui->setWindowTitle(invID, _world->getText(objID, objID, objID));
+ Common::String title = _world->getText(objID, objID, objID);
+ // HACK, trim titletext because windows can't be resized
+ while (title.size() > 6) {
+ title.deleteLastChar();
+ }
+ _gui->setWindowTitle(invID, title);
_gui->updateWindowInfo(invID, objID, _world->getChildren(objID, true));
_gui->updateWindow(invID, _world->getObjAttr(objID, kAttrContainerOpen));
}
Commit: e97bdbd5a5060f213d6b2e2ffdc5ac070e2c746d
https://github.com/scummvm/scummvm/commit/e97bdbd5a5060f213d6b2e2ffdc5ac070e2c746d
Author: Avijeet (am388488 at gmail.com)
Date: 2022-09-04T20:30:02+02:00
Commit Message:
MACVENTURE: Fix text alignment of window titles
Changed paths:
engines/macventure/windows.cpp
diff --git a/engines/macventure/windows.cpp b/engines/macventure/windows.cpp
index 46a02192f8b..600accbe421 100644
--- a/engines/macventure/windows.cpp
+++ b/engines/macventure/windows.cpp
@@ -94,7 +94,7 @@ Graphics::BorderOffsets borderOffsets(MVWindowType type) {
case MacVenture::kAltBox:
break;
case MacVenture::kNoGrowDoc:
- offsets.titleTop = 0;
+ offsets.titleTop = 2;
offsets.titleBottom = 0;
offsets.titlePos = 0;
break;
@@ -122,7 +122,7 @@ Graphics::BorderOffsets borderOffsets(MVWindowType type) {
offsets.lowerScrollHeight = 20;
break;
case MacVenture::kRDoc4:
- offsets.titleTop = 0;
+ offsets.titleTop = 2;
offsets.titleBottom = 0;
offsets.titlePos = 0;
break;
Commit: 26c3c4f160a27f8ec1d029ae6a40f5b7ba6b7ae5
https://github.com/scummvm/scummvm/commit/26c3c4f160a27f8ec1d029ae6a40f5b7ba6b7ae5
Author: Avijeet (am388488 at gmail.com)
Date: 2022-09-04T20:30:02+02:00
Commit Message:
MACVENTURE: Invert exit window's color when active
Changed paths:
dists/engine-data/macventure.dat
engines/macventure/gui.cpp
graphics/macgui/macwindow.h
diff --git a/dists/engine-data/macventure.dat b/dists/engine-data/macventure.dat
index c600a615a8b..d8a1da382cc 100644
Binary files a/dists/engine-data/macventure.dat and b/dists/engine-data/macventure.dat differ
diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp
index 21403694112..e03c5bd78ee 100644
--- a/engines/macventure/gui.cpp
+++ b/engines/macventure/gui.cpp
@@ -678,6 +678,10 @@ void Gui::drawExitsWindow() {
button.draw(*srf);
}
+ Graphics::BorderOffsets offsets = borderOffsets(MacVenture::kRDoc4);
+ offsets.dark = _exitsWindow->_active;
+ _exitsWindow->setBorderOffsets(offsets);
+
findWindow(kExitsWindow)->setDirty(true);
}
diff --git a/graphics/macgui/macwindow.h b/graphics/macgui/macwindow.h
index 2c10b4ca03c..724b4e1e27c 100644
--- a/graphics/macgui/macwindow.h
+++ b/graphics/macgui/macwindow.h
@@ -349,6 +349,7 @@ public:
void resizeBorderSurface();
void setMode(uint32 mode) { _mode = mode; }
+ void setBorderOffsets(BorderOffsets &offsets) { _macBorder.setOffsets(offsets); }
void updateInnerDims();
Commit: 081c3db06b38c02bf4e83209fc29465a4bdeae4a
https://github.com/scummvm/scummvm/commit/081c3db06b38c02bf4e83209fc29465a4bdeae4a
Author: Avijeet (am388488 at gmail.com)
Date: 2022-09-04T20:30:02+02:00
Commit Message:
MACVENTURE: Fix window titles
Changed paths:
engines/macventure/gui.cpp
engines/macventure/windows.cpp
diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp
index e03c5bd78ee..1c128ab7882 100644
--- a/engines/macventure/gui.cpp
+++ b/engines/macventure/gui.cpp
@@ -595,7 +595,7 @@ void Gui::drawCommandsWindow() {
srf,
_engine->getCommandsPausedString(),
0,
- (srf->h / 2) - getCurrentFont().getFontHeight(),
+ (srf->h - getCurrentFont().getFontHeight()) / 2 - 1,
data.bounds.right - data.bounds.left,
kColorBlack,
Graphics::kTextAlignCenter);
diff --git a/engines/macventure/windows.cpp b/engines/macventure/windows.cpp
index 600accbe421..b3cb4d8204d 100644
--- a/engines/macventure/windows.cpp
+++ b/engines/macventure/windows.cpp
@@ -96,14 +96,14 @@ Graphics::BorderOffsets borderOffsets(MVWindowType type) {
case MacVenture::kNoGrowDoc:
offsets.titleTop = 2;
offsets.titleBottom = 0;
- offsets.titlePos = 0;
+ offsets.titlePos = 29;
break;
case MacVenture::kMovableDBox:
break;
case MacVenture::kZoomDoc:
- offsets.titleTop = 0;
+ offsets.titleTop = 3;
offsets.titleBottom = 0;
- offsets.titlePos = 0;
+ offsets.titlePos = 25;
offsets.upperScrollHeight = 20;
offsets.lowerScrollHeight = 20;
@@ -114,9 +114,9 @@ Graphics::BorderOffsets borderOffsets(MVWindowType type) {
offsets.titlePos = 0;
break;
case MacVenture::kInvWindow:
- offsets.titleTop = 0;
+ offsets.titleTop = 3;
offsets.titleBottom = 0;
- offsets.titlePos = 0;
+ offsets.titlePos = 36;
offsets.upperScrollHeight = 20;
offsets.lowerScrollHeight = 20;
@@ -124,7 +124,7 @@ Graphics::BorderOffsets borderOffsets(MVWindowType type) {
case MacVenture::kRDoc4:
offsets.titleTop = 2;
offsets.titleBottom = 0;
- offsets.titlePos = 0;
+ offsets.titlePos = 22;
break;
default:
break;
Commit: 22308ed4f7f60e39849a10983042d9a8b2e1e843
https://github.com/scummvm/scummvm/commit/22308ed4f7f60e39849a10983042d9a8b2e1e843
Author: Avijeet (am388488 at gmail.com)
Date: 2022-09-04T20:30:02+02:00
Commit Message:
MACVENTURE: Fix window borders
Changed paths:
dists/engine-data/macventure.dat
diff --git a/dists/engine-data/macventure.dat b/dists/engine-data/macventure.dat
index d8a1da382cc..014f14f2216 100644
Binary files a/dists/engine-data/macventure.dat and b/dists/engine-data/macventure.dat differ
Commit: e5877985ffb3a189a9f46b78b5590463186addda
https://github.com/scummvm/scummvm/commit/e5877985ffb3a189a9f46b78b5590463186addda
Author: Avijeet (am388488 at gmail.com)
Date: 2022-09-04T20:30:02+02:00
Commit Message:
MACVENTURE: Change comment
Changed paths:
engines/macventure/macventure.cpp
diff --git a/engines/macventure/macventure.cpp b/engines/macventure/macventure.cpp
index f637d157846..28dcaa1f26e 100644
--- a/engines/macventure/macventure.cpp
+++ b/engines/macventure/macventure.cpp
@@ -786,7 +786,7 @@ void MacVentureEngine::openObject(ObjID objID) {
Common::Point p(_world->getObjAttr(objID, kAttrPosX), _world->getObjAttr(objID, kAttrPosY));
WindowReference invID = _gui->createInventoryWindow(objID);
Common::String title = _world->getText(objID, objID, objID);
- // HACK, trim titletext because windows can't be resized
+ // HACK, trim titletext to fit initial inventory size
while (title.size() > 6) {
title.deleteLastChar();
}
More information about the Scummvm-git-logs
mailing list