[Scummvm-cvs-logs] scummvm master -> ccd82145a46607438fa395a3109d555e1097262d
sev-
sev at scummvm.org
Fri Nov 27 23:25:06 CET 2015
This automated email contains information about 13 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1f1c9803a7 PRINCE: Fix color clipping logic
6e9fe0052c CGE2: Fix rounding error
866baf1d9a LASTEXPRESS: Removing excess check
a92ecf7b53 AGI: Removed excess check
9033f8db13 MADS: Shut gcc warning. Requires checking
46dc9a89c3 MADS: Fix warning. Requires consulting with the original
9855957697 MADS: Fixing parenthesis. Requires checking with the original
8f3d528b7e AGI: Better pointer checking
48e048be8d WINTERMUTE: More sanity checks
401518a3dc WINTERMUTE: Proper place for pointer check
a6ca2ec6d0 ACCESS: Adding missing comma
5675fa7b7f SCUMM: Enforcing numbers to double
ccd82145a4 HE: Proper cast to double to avoid integer division
Commit: 1f1c9803a7debcc09dba0959ce5457eb592dbd49
https://github.com/scummvm/scummvm/commit/1f1c9803a7debcc09dba0959ce5457eb592dbd49
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-11-27T22:34:26+01:00
Commit Message:
PRINCE: Fix color clipping logic
Changed paths:
engines/prince/graphics.cpp
diff --git a/engines/prince/graphics.cpp b/engines/prince/graphics.cpp
index f556d81..3482d79 100644
--- a/engines/prince/graphics.cpp
+++ b/engines/prince/graphics.cpp
@@ -375,30 +375,30 @@ byte GraphicsMan::getBlendTableColor(byte pixelColor, byte backgroundPixelColor,
const byte *originalPalette = _vm->_roomBmp->getPalette();
int redFirstOrg = originalPalette[pixelColor * 3] * _vm->_mst_shadow / 256;
- CLIP(redFirstOrg, 0, 255);
+ redFirstOrg = CLIP(redFirstOrg, 0, 255);
if (_vm->_mst_shadow <= 256) {
int redFirstBack = originalPalette[backgroundPixelColor * 3] * (256 - _vm->_mst_shadow) / 256;
- CLIP(redFirstBack, 0, 255);
+ redFirstBack = CLIP(redFirstBack, 0, 255);
redFirstOrg += redFirstBack;
- CLIP(redFirstOrg, 0, 255);
+ redFirstOrg = CLIP(redFirstOrg, 0, 255);
}
int greenFirstOrg = originalPalette[pixelColor * 3 + 1] * _vm->_mst_shadow / 256;
- CLIP(greenFirstOrg, 0, 255);
+ greenFirstOrg = CLIP(greenFirstOrg, 0, 255);
if (_vm->_mst_shadow <= 256) {
int greenFirstBack = originalPalette[backgroundPixelColor * 3 + 1] * (256 - _vm->_mst_shadow) / 256;
- CLIP(greenFirstBack, 0, 255);
+ greenFirstBack = CLIP(greenFirstBack, 0, 255);
greenFirstOrg += greenFirstBack;
- CLIP(greenFirstOrg, 0, 255);
+ greenFirstOrg = CLIP(greenFirstOrg, 0, 255);
}
int blueFirstOrg = originalPalette[pixelColor * 3 + 2] * _vm->_mst_shadow / 256;
- CLIP(blueFirstOrg, 0, 255);
+ blueFirstOrg = CLIP(blueFirstOrg, 0, 255);
if (_vm->_mst_shadow <= 256) {
int blueFirstBack = originalPalette[backgroundPixelColor * 3 + 2] * (256 - _vm->_mst_shadow) / 256;
- CLIP(blueFirstBack, 0, 255);
+ blueFirstBack = CLIP(blueFirstBack, 0, 255);
blueFirstOrg += blueFirstBack;
- CLIP(blueFirstOrg, 0, 255);
+ blueFirstOrg = CLIP(blueFirstOrg, 0, 255);
}
int bigValue = PrinceEngine::kIntMax; // infinity
Commit: 6e9fe0052c032e8209d8b549023e40f4e570bdd9
https://github.com/scummvm/scummvm/commit/6e9fe0052c032e8209d8b549023e40f4e570bdd9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-11-27T22:34:26+01:00
Commit Message:
CGE2: Fix rounding error
Changed paths:
engines/cge2/vga13h.cpp
diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp
index f4064f3..eb111c3 100644
--- a/engines/cge2/vga13h.cpp
+++ b/engines/cge2/vga13h.cpp
@@ -629,11 +629,11 @@ void Sprite::gotoxyz(V2D pos) {
if (!_follow) {
FXP m = _vm->_eye->_z / (_pos3D._z - _vm->_eye->_z);
_pos3D._x = (_vm->_eye->_x + (_vm->_eye->_x - _pos2D.x) / m);
- _pos3D._x.round();
+ _pos3D._x = _pos3D._x.round();
if (!_constY) {
_pos3D._y = _vm->_eye->_y + (_vm->_eye->_y - _pos2D.y) / m;
- _pos3D._y.round();
+ _pos3D._y = _pos3D._y.round();
}
}
Commit: 866baf1d9a3a1a463fc4fe83c287168291b865ac
https://github.com/scummvm/scummvm/commit/866baf1d9a3a1a463fc4fe83c287168291b865ac
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-11-27T22:34:26+01:00
Commit Message:
LASTEXPRESS: Removing excess check
Changed paths:
engines/lastexpress/game/savegame.cpp
diff --git a/engines/lastexpress/game/savegame.cpp b/engines/lastexpress/game/savegame.cpp
index d9f2993..e2682ba 100644
--- a/engines/lastexpress/game/savegame.cpp
+++ b/engines/lastexpress/game/savegame.cpp
@@ -497,9 +497,6 @@ void SaveLoad::loadLastGame() {
return;
}
- if (!_savegame)
- error("[SaveLoad::loadGame] No savegame stream present");
-
// Load the last entry
_savegame->seek(header.offsetEntry);
Commit: a92ecf7b5388c03cd9e899645da2430caaf89e60
https://github.com/scummvm/scummvm/commit/a92ecf7b5388c03cd9e899645da2430caaf89e60
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-11-27T22:34:26+01:00
Commit Message:
AGI: Removed excess check
Changed paths:
engines/agi/wagparser.cpp
diff --git a/engines/agi/wagparser.cpp b/engines/agi/wagparser.cpp
index 0b49866..54f8eaf 100644
--- a/engines/agi/wagparser.cpp
+++ b/engines/agi/wagparser.cpp
@@ -79,7 +79,7 @@ bool WagProperty::read(Common::SeekableReadStream &stream) {
uint32 readBytes = stream.read(_propData, _propSize); // Read the data in
_propData[_propSize] = 0; // Set the trailing zero for easy C-style string access
- _readOk = (_propData != NULL && readBytes == _propSize); // Check that we got the whole data
+ _readOk = (readBytes == _propSize); // Check that we got the whole data
return _readOk;
}
Commit: 9033f8db13b117fd8a78142cb244835d99777310
https://github.com/scummvm/scummvm/commit/9033f8db13b117fd8a78142cb244835d99777310
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-11-27T22:41:39+01:00
Commit Message:
MADS: Shut gcc warning. Requires checking
Changed paths:
engines/mads/phantom/game_phantom.cpp
diff --git a/engines/mads/phantom/game_phantom.cpp b/engines/mads/phantom/game_phantom.cpp
index af2102b..27849cc 100644
--- a/engines/mads/phantom/game_phantom.cpp
+++ b/engines/mads/phantom/game_phantom.cpp
@@ -432,7 +432,7 @@ void GamePhantom::doObjectAction() {
_vm->_dialogs->showItem(OBJ_BOOK, 815, 0);
action._inProgress = false;
return;
- }
+ }
if (action.isAction(VERB_LOOK, NOUN_CRUMPLED_NOTE) || action.isAction(VERB_READ, NOUN_CRUMPLED_NOTE)) {
_vm->_dialogs->showItem(OBJ_CRUMPLED_NOTE, 816, 6);
@@ -870,6 +870,10 @@ void GamePhantom::setupCatacombs() {
_globals[kCatacombs501From] = 0;
break;
+ case DIFFICULTY_MEDIUM:
+ // TODO: FIXME. Do we need to set something here?
+ break;
+
case DIFFICULTY_HARD:
_catacombs = _hardCatacombs;
_catacombSize = 62;
@@ -924,7 +928,7 @@ void GamePhantom::newCatacombRoom(int toRoom, int fromExit) {
default:
error("Unexpected room in newCatacombRoom");
- }
+ }
} else {
newSceneNum = _catacombs[toRoom]._sceneNum;
_globals[81] = _catacombs[toRoom]._flags;
Commit: 46dc9a89c3e876e88786b0f20bbcb9cf8acba5bb
https://github.com/scummvm/scummvm/commit/46dc9a89c3e876e88786b0f20bbcb9cf8acba5bb
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-11-27T22:41:59+01:00
Commit Message:
MADS: Fix warning. Requires consulting with the original
Changed paths:
engines/mads/phantom/phantom_scenes1.cpp
diff --git a/engines/mads/phantom/phantom_scenes1.cpp b/engines/mads/phantom/phantom_scenes1.cpp
index 7bc9c17..c86d285 100644
--- a/engines/mads/phantom/phantom_scenes1.cpp
+++ b/engines/mads/phantom/phantom_scenes1.cpp
@@ -6220,7 +6220,7 @@ void Scene110::actions() {
if (_action.isAction(VERB_WALK_THROUGH, NOUN_RIGHT_DOOR) || _action.isAction(VERB_OPEN, NOUN_RIGHT_DOOR)
|| _action.isAction(VERB_UNLOCK, NOUN_RIGHT_DOOR) || _action.isAction(VERB_LOCK, NOUN_RIGHT_DOOR)) {
- if ((_globals[kCurrentYear] == 1881) || (_globals[kDoneBrieConv203] >= 1)
+ if (((_globals[kCurrentYear] == 1881) || (_globals[kDoneBrieConv203] >= 1))
&& !_action.isAction(VERB_UNLOCK, NOUN_RIGHT_DOOR) && !_action.isAction(VERB_LOCK, NOUN_RIGHT_DOOR)) {
switch (_game._trigger) {
case (0):
Commit: 98559576977aaf020739e596f9440e81aa7d06fa
https://github.com/scummvm/scummvm/commit/98559576977aaf020739e596f9440e81aa7d06fa
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-11-27T22:44:20+01:00
Commit Message:
MADS: Fixing parenthesis. Requires checking with the original
Changed paths:
engines/mads/phantom/phantom_scenes2.cpp
diff --git a/engines/mads/phantom/phantom_scenes2.cpp b/engines/mads/phantom/phantom_scenes2.cpp
index 1590d06..eff0bf8 100644
--- a/engines/mads/phantom/phantom_scenes2.cpp
+++ b/engines/mads/phantom/phantom_scenes2.cpp
@@ -4580,9 +4580,9 @@ void Scene205::actions() {
}
if ((_action.isAction(VERB_ENTER)) || (_action.isAction(VERB_OPEN)) || _action.isAction(VERB_UNLOCK) || _action.isAction(VERB_LOCK)) {
- if (((_action.isObject(NOUN_BOX_FIVE)) && ((_globals[kDoorsIn205] == 0) || (_globals[kDoorsIn205] == 2))
+ if (((_action.isObject(NOUN_BOX_FIVE) && ((_globals[kDoorsIn205] == 0) || (_globals[kDoorsIn205] == 2)))
|| _action.isAction(VERB_UNLOCK) || _action.isAction(VERB_LOCK))
- || ((_action.isObject(NOUN_BOX_NINE)) && ((_globals[kDoorsIn205] == 0) || (_globals[kDoorsIn205] == 1)))
+ || ((_action.isObject(NOUN_BOX_NINE) && ((_globals[kDoorsIn205] == 0) || (_globals[kDoorsIn205] == 1))))
|| (_action.isObject(NOUN_BOX_SIX)) || (_action.isObject(NOUN_BOX_SEVEN)) || (_action.isObject(NOUN_BOX_EIGHT))) {
switch (_game._trigger) {
case (0):
Commit: 8f3d528b7efba1b3c86a5a4934eae5ace78459a9
https://github.com/scummvm/scummvm/commit/8f3d528b7efba1b3c86a5a4934eae5ace78459a9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-11-27T22:49:18+01:00
Commit Message:
AGI: Better pointer checking
Changed paths:
engines/agi/words.cpp
diff --git a/engines/agi/words.cpp b/engines/agi/words.cpp
index ff9049f..438c1ce 100644
--- a/engines/agi/words.cpp
+++ b/engines/agi/words.cpp
@@ -161,11 +161,13 @@ void AgiEngine::dictionaryWords(char *msg) {
char *q = NULL;
int wid, wlen;
+ assert(msg);
+
debugC(2, kDebugLevelScripts, "msg = \"%s\"", msg);
cleanInput();
- for (p = msg; p && *p && getvar(vWordNotFound) == 0;) {
+ for (p = msg; *p && getvar(vWordNotFound) == 0;) {
if (*p == 0x20)
p++;
@@ -205,7 +207,7 @@ void AgiEngine::dictionaryWords(char *msg) {
break;
}
- if (p != NULL && *p) {
+ if (*p) {
debugC(2, kDebugLevelScripts, "p = %s", p);
*p = 0;
p++;
Commit: 48e048be8d888c6c52140eeedac2742f5b1319cb
https://github.com/scummvm/scummvm/commit/48e048be8d888c6c52140eeedac2742f5b1319cb
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-11-27T22:54:13+01:00
Commit Message:
WINTERMUTE: More sanity checks
Changed paths:
engines/wintermute/ad/ad_game.cpp
diff --git a/engines/wintermute/ad/ad_game.cpp b/engines/wintermute/ad/ad_game.cpp
index 3c4383f..df0328c 100644
--- a/engines/wintermute/ad/ad_game.cpp
+++ b/engines/wintermute/ad/ad_game.cpp
@@ -2261,7 +2261,7 @@ bool AdGame::onMouseRightUp() {
bool AdGame::displayDebugInfo() {
char str[100];
if (_gameRef->_debugDebugMode) {
- sprintf(str, "Mouse: %d, %d (scene: %d, %d)", _mousePos.x, _mousePos.y, _mousePos.x + _scene->getOffsetLeft(), _mousePos.y + _scene->getOffsetTop());
+ sprintf(str, "Mouse: %d, %d (scene: %d, %d)", _mousePos.x, _mousePos.y, _mousePos.x + (_scene ? _scene->getOffsetLeft() : 0), _mousePos.y + (_scene ? _scene->getOffsetTop() : 0));
_systemFont->drawText((byte *)str, 0, 90, _renderer->getWidth(), TAL_RIGHT);
sprintf(str, "Scene: %s (prev: %s)", (_scene && _scene->getName()) ? _scene->getName() : "???", _prevSceneName ? _prevSceneName : "???");
Commit: 401518a3dc4b55482fa28bfb066d8255454c39cc
https://github.com/scummvm/scummvm/commit/401518a3dc4b55482fa28bfb066d8255454c39cc
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-11-27T22:57:23+01:00
Commit Message:
WINTERMUTE: Proper place for pointer check
Changed paths:
engines/wintermute/base/file/base_save_thumb_file.cpp
diff --git a/engines/wintermute/base/file/base_save_thumb_file.cpp b/engines/wintermute/base/file/base_save_thumb_file.cpp
index acd5363..54f7ee7 100644
--- a/engines/wintermute/base/file/base_save_thumb_file.cpp
+++ b/engines/wintermute/base/file/base_save_thumb_file.cpp
@@ -70,11 +70,12 @@ bool BaseSaveThumbFile::open(const Common::String &filename) {
delete[] tempFilename;
BasePersistenceManager *pm = new BasePersistenceManager();
- Common::String slotFilename = pm->getFilenameForSlot(slot);
if (!pm) {
return STATUS_FAILED;
}
+ Common::String slotFilename = pm->getFilenameForSlot(slot);
+
if (DID_FAIL(pm->initLoad(slotFilename))) {
delete pm;
return STATUS_FAILED;
Commit: a6ca2ec6d02bd7f5075ce1e1ffc15973d0da6970
https://github.com/scummvm/scummvm/commit/a6ca2ec6d02bd7f5075ce1e1ffc15973d0da6970
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-11-27T23:02:30+01:00
Commit Message:
ACCESS: Adding missing comma
Changed paths:
engines/access/resources.cpp
diff --git a/engines/access/resources.cpp b/engines/access/resources.cpp
index c11dbf6..096fb15 100644
--- a/engines/access/resources.cpp
+++ b/engines/access/resources.cpp
@@ -74,7 +74,7 @@ bool Resources::load(Common::String &errorMessage) {
// Load in the data for the game
load(f);
-
+
return true;
}
@@ -147,7 +147,7 @@ uint Resources::findEntry(byte gameId, byte discType, byte demoType, Common::Lan
Common::String Resources::readString(Common::SeekableReadStream &s) {
Common::String result;
char c;
-
+
while ((c = s.readByte()) != 0)
result += c;
@@ -180,14 +180,14 @@ const byte INITIAL_PALETTE[18 * 3] = {
const char *const GENERAL_MESSAGES[] = {
"LOOKING THERE REVEALS NOTHING OF INTEREST.", // LOOK_MESSAGE
"THAT DOESN'T OPEN.", // OPEN_MESSAGE
- "THAT WON'T MOVE." // MOVE_MESSAGE
+ "THAT WON'T MOVE.", // MOVE_MESSAGE
"YOU CAN'T TAKE THAT.", // GET_MESSAGE
"THAT DOESN'T SEEM TO WORK.", // USE_MESSAGE
"YOU CAN'T CLIMB THAT.", // GO_MESSAGE
"THERE SEEMS TO BE NO RESPONSE.", // TALK_MESSAGE
"THIS OBJECT REQUIRES NO HINTS", // HELP_MESSAGE
"THIS OBJECT REQUIRES NO HINTS", // HELP_MESSAGE
- "THAT DOESN'T SEEM TO WORK.", // USE_MESSAGE
+ "THAT DOESN'T SEEM TO WORK." // USE_MESSAGE
};
const int INVCOORDS[][4] = {
Commit: 5675fa7b7fd751c0699cb944258e608e5ae68b74
https://github.com/scummvm/scummvm/commit/5675fa7b7fd751c0699cb944258e608e5ae68b74
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-11-27T23:07:02+01:00
Commit Message:
SCUMM: Enforcing numbers to double
Changed paths:
engines/scumm/players/player_v2.cpp
diff --git a/engines/scumm/players/player_v2.cpp b/engines/scumm/players/player_v2.cpp
index f0aaa4a..c7ebd8a 100644
--- a/engines/scumm/players/player_v2.cpp
+++ b/engines/scumm/players/player_v2.cpp
@@ -77,7 +77,7 @@ void Player_V2::setMusicVolume (int vol) {
vol = 255;
/* scale to int16, FIXME: find best value */
- double out = vol * 128 / 3;
+ double out = vol * 128.0 / 3.0;
/* build volume table (2dB per step) */
for (int i = 0; i < 15; i++) {
Commit: ccd82145a46607438fa395a3109d555e1097262d
https://github.com/scummvm/scummvm/commit/ccd82145a46607438fa395a3109d555e1097262d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2015-11-27T23:08:50+01:00
Commit Message:
HE: Proper cast to double to avoid integer division
Changed paths:
engines/scumm/he/logic/puttrace.cpp
diff --git a/engines/scumm/he/logic/puttrace.cpp b/engines/scumm/he/logic/puttrace.cpp
index 1c3317b..ba62c11 100644
--- a/engines/scumm/he/logic/puttrace.cpp
+++ b/engines/scumm/he/logic/puttrace.cpp
@@ -256,7 +256,7 @@ int32 LogicHErace::op_1102(int32 *args) {
}
int32 LogicHErace::op_1103(int32 *args) {
- double angle = args[0] / args[1] * DEG2RAD;
+ double angle = (double)args[0] / (double)args[1] * DEG2RAD;
writeScummVar(108, (int32)(sin(angle) * args[2]));
writeScummVar(109, (int32)(cos(angle) * args[2]));
More information about the Scummvm-git-logs
mailing list