[Scummvm-cvs-logs] scummvm master -> f0111e92dc039e1555ee2d77053960bf95487ea0
Strangerke
Strangerke at scummvm.org
Mon Mar 3 23:06:38 CET 2014
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
db7d8a0d40 VOYEUR: Remove a couple of default values in function declaration
1c6a6474d2 VOYEUR: Fix a comment
f0111e92dc VOYEUR: Rewrite hotspot code in doLock()
Commit: db7d8a0d4023a11da4ca8e7f77f20fa742b2e719
https://github.com/scummvm/scummvm/commit/db7d8a0d4023a11da4ca8e7f77f20fa742b2e719
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-03-03T14:02:44-08:00
Commit Message:
VOYEUR: Remove a couple of default values in function declaration
Changed paths:
engines/voyeur/files.h
engines/voyeur/voyeur_game.cpp
diff --git a/engines/voyeur/files.h b/engines/voyeur/files.h
index d1a0e26..16d27fb 100644
--- a/engines/voyeur/files.h
+++ b/engines/voyeur/files.h
@@ -210,7 +210,7 @@ public:
FilesManager(VoyeurEngine *vm);
bool openBoltLib(const Common::String &filename, BoltFile *&boltFile);
- byte *fload(const Common::String &filename, int *size = NULL);
+ byte *fload(const Common::String &filename, int *size);
};
class RectEntry: public Common::Rect {
@@ -348,7 +348,7 @@ public:
void setupViewPort();
void setupViewPort(PictureResource *pic, Common::Rect *clippingRect = NULL);
void addSaveRect(int pageIndex, const Common::Rect &r);
- void fillPic(byte onOff = 0);
+ void fillPic(byte onOff);
void drawIfaceTime();
void drawPicPerm(PictureResource *pic, const Common::Point &pt);
};
diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp
index 752ec53..1f2703c 100644
--- a/engines/voyeur/voyeur_game.cpp
+++ b/engines/voyeur/voyeur_game.cpp
@@ -302,7 +302,7 @@ void VoyeurEngine::doClosingCredits() {
int flags = READ_LE_UINT16(entry + 4);
if (flags & 0x10)
- (*_graphicsManager->_vPort)->fillPic();
+ (*_graphicsManager->_vPort)->fillPic(0);
if (flags & 1) {
fi._foreColor = 1;
Commit: 1c6a6474d2ad1c8cbb179a4fcacc0509cfb05bd2
https://github.com/scummvm/scummvm/commit/1c6a6474d2ad1c8cbb179a4fcacc0509cfb05bd2
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-03-03T14:03:01-08:00
Commit Message:
VOYEUR: Fix a comment
Changed paths:
engines/voyeur/files.cpp
diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp
index 20d70f8..9d1ff58 100644
--- a/engines/voyeur/files.cpp
+++ b/engines/voyeur/files.cpp
@@ -504,7 +504,7 @@ void BVoyBoltFile::sInitRect() {
_state._curMemberPtr->_data = _state.decompress(NULL, _state._curMemberPtr->_size,
_state._curMemberPtr->_mode);
- // Check whether the resouce Id is in the list of extended rects
+ // Check whether the resource Id is in the list of extended rects
bool isExtendedRects = false;
for (int i = 0; i < 49 && !isExtendedRects; ++i)
isExtendedRects = RESOLVE_TABLE[i] == (_state._curMemberPtr->_id & 0xff00);
Commit: f0111e92dc039e1555ee2d77053960bf95487ea0
https://github.com/scummvm/scummvm/commit/f0111e92dc039e1555ee2d77053960bf95487ea0
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-03-03T14:04:51-08:00
Commit Message:
VOYEUR: Rewrite hotspot code in doLock()
Changed paths:
engines/voyeur/voyeur.cpp
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index 85dabf2..f2d0885 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -238,18 +238,15 @@ bool VoyeurEngine::doLock() {
byte *wrongVoc = _filesManager->fload("wrong.voc", &wrongVocSize);
if (_bVoy->getBoltGroup(0x700)) {
- _voy->_viewBounds = _bVoy->boltEntry(0x704)._rectResource;
-
Common::String password = "3333";
- PictureResource *cursorPic = _bVoy->getPictureResource(0x702);
- assert(cursorPic);
-
- // Get the mappings of keys on the keypad
- byte *keyData = _bVoy->memberAddr(0x705);
- int keyCount = READ_LE_UINT16(keyData);
- _graphicsManager->_backColors = _bVoy->getCMapResource(0x7010000);
_graphicsManager->_backgroundPage = _bVoy->getPictureResource(0x700);
+ _graphicsManager->_backColors = _bVoy->getCMapResource(0x701);
+ PictureResource *cursorPic = _bVoy->getPictureResource(0x702);
+ _voy->_viewBounds = _bVoy->boltEntry(0x704)._rectResource;
+ Common::Array<RectEntry> &hotspots = _bVoy->boltEntry(0x705)._rectResource->_entries;
+
+ assert(cursorPic);
(*_graphicsManager->_vPort)->setupViewPort();
_graphicsManager->_backColors->startFade();
@@ -306,17 +303,13 @@ bool VoyeurEngine::doLock() {
do {
// Scan through the list of key rects to check if a keypad key is highlighted
key = -1;
- Common::Point mousePos = _eventsManager->getMousePos() +
- Common::Point(30, 20);
-
- for (int keyIndex = 0; keyIndex < keyCount; ++keyIndex) {
- int x1 = READ_LE_UINT16(keyData + (((keyIndex << 2) + 1) << 1));
- int x2 = READ_LE_UINT16(keyData + (((keyIndex << 2) + 3) << 1));
- int y1 = READ_LE_UINT16(keyData + (((keyIndex << 2) + 2) << 1));
- int y2 = READ_LE_UINT16(keyData + (((keyIndex << 2) + 4) << 1));
+ Common::Point mousePos = _eventsManager->getMousePos() + Common::Point(20, 10);
- if (mousePos.x >= x1 && mousePos.x <= x2 && mousePos.y >= y1 && mousePos.y <= y2) {
+ int keyCount = hotspots.size();
+ for (int keyIndex = 0; keyIndex < keyCount; ++keyIndex) {
+ if (hotspots[keyIndex].contains(mousePos)) {
key = keyIndex;
+ break;
}
}
More information about the Scummvm-git-logs
mailing list