[Scummvm-cvs-logs] scummvm master -> 1dc58b0b2a361865aa0f5f5202297c4834ba2675
fuzzie
fuzzie at fuzzie.org
Wed Apr 17 23:26:26 CEST 2013
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
98934898cf PARALLACTION: Use strlcpy instead of strncpy.
a514927381 PARALLACTION: Fix buffer size in unpackBackground.
c9ccba01df PARALLACTION: Add some sanity checks to SoundMan_br::execute.
1eefd6301b PARALLACTION: Don't use an invalid array index.
1dc58b0b2a PARALLACTION: Fix BRA amiga inventory item cursors.
Commit: 98934898cf4003ce2536acab3f12014d3402d420
https://github.com/scummvm/scummvm/commit/98934898cf4003ce2536acab3f12014d3402d420
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2013-04-17T14:17:22-07:00
Commit Message:
PARALLACTION: Use strlcpy instead of strncpy.
Changed paths:
engines/parallaction/parser_ns.cpp
diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp
index 41ff74f..ac5e7c7 100644
--- a/engines/parallaction/parser_ns.cpp
+++ b/engines/parallaction/parser_ns.cpp
@@ -292,7 +292,7 @@ void LocationParser_ns::parseAnimation(AnimationList &list, char *name) {
AnimationPtr a(new Animation);
_zoneProg++;
- strncpy(a->_name, name, ZONENAME_LENGTH);
+ Common::strlcpy(a->_name, name, ZONENAME_LENGTH);
a->_flags |= kFlagsIsAnimation;
list.push_front(AnimationPtr(a));
@@ -1312,7 +1312,7 @@ void LocationParser_ns::parseZone(ZoneList &list, char *name) {
ZonePtr z(new Zone);
_zoneProg++;
- strncpy(z->_name, name, ZONENAME_LENGTH);
+ Common::strlcpy(z->_name, name, ZONENAME_LENGTH);
ctxt.z = z;
Commit: a514927381bbbde60538042db28e77f5da04780b
https://github.com/scummvm/scummvm/commit/a514927381bbbde60538042db28e77f5da04780b
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2013-04-17T14:19:47-07:00
Commit Message:
PARALLACTION: Fix buffer size in unpackBackground.
Changed paths:
engines/parallaction/disk_ns.cpp
diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp
index f03f16c..4c4893e 100644
--- a/engines/parallaction/disk_ns.cpp
+++ b/engines/parallaction/disk_ns.cpp
@@ -394,7 +394,7 @@ Frames* DosDisk_ns::loadFrames(const char* name) {
- path data [bit 8] (walkable areas)
*/
void DosDisk_ns::unpackBackground(Common::ReadStream *stream, byte *screen, byte *mask, byte *path) {
- byte storage[127];
+ byte storage[128];
uint32 storageLen = 0, len = 0;
uint32 j = 0;
Commit: c9ccba01df8abacd30b87d6b8b0904fb87b1b2f7
https://github.com/scummvm/scummvm/commit/c9ccba01df8abacd30b87d6b8b0904fb87b1b2f7
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2013-04-17T14:20:13-07:00
Commit Message:
PARALLACTION: Add some sanity checks to SoundMan_br::execute.
Changed paths:
engines/parallaction/sound_br.cpp
diff --git a/engines/parallaction/sound_br.cpp b/engines/parallaction/sound_br.cpp
index ad510eb..4a643aa 100644
--- a/engines/parallaction/sound_br.cpp
+++ b/engines/parallaction/sound_br.cpp
@@ -507,10 +507,14 @@ void SoundMan_br::execute(int command, const char *parm) {
stopMusic();
break;
case SC_SETMUSICFILE:
+ if (!parm)
+ error("no parameter passed to SC_SETMUSICFILE");
setMusicFile(parm);
break;
case SC_PLAYSFX:
+ if (!parm)
+ error("no parameter passed to SC_PLAYSFX");
playSfx(parm, _sfxChannel, _sfxLooping, _sfxVolume);
break;
case SC_STOPSFX:
Commit: 1eefd6301bc246d397cd9f1cfebee978fa4e92de
https://github.com/scummvm/scummvm/commit/1eefd6301bc246d397cd9f1cfebee978fa4e92de
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2013-04-17T14:20:31-07:00
Commit Message:
PARALLACTION: Don't use an invalid array index.
Changed paths:
engines/parallaction/dialogue.cpp
diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp
index 78cc233..06ffd0b 100644
--- a/engines/parallaction/dialogue.cpp
+++ b/engines/parallaction/dialogue.cpp
@@ -238,7 +238,7 @@ int16 DialogueManager::selectAnswerN() {
_selection = _balloonMan->hitTestDialogueBalloon(_mousePos.x, _mousePos.y);
- VisibleAnswer *oldAnswer = &_visAnswers[_oldSelection];
+ VisibleAnswer *oldAnswer = (_oldSelection == NO_ANSWER_SELECTED) ? NULL : &_visAnswers[_oldSelection];
VisibleAnswer *answer = &_visAnswers[_selection];
if (_selection != _oldSelection) {
Commit: 1dc58b0b2a361865aa0f5f5202297c4834ba2675
https://github.com/scummvm/scummvm/commit/1dc58b0b2a361865aa0f5f5202297c4834ba2675
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2013-04-17T14:20:55-07:00
Commit Message:
PARALLACTION: Fix BRA amiga inventory item cursors.
Changed paths:
engines/parallaction/input.cpp
diff --git a/engines/parallaction/input.cpp b/engines/parallaction/input.cpp
index 4fbd9b9..484e210 100644
--- a/engines/parallaction/input.cpp
+++ b/engines/parallaction/input.cpp
@@ -551,8 +551,12 @@ void Input::setInventoryCursor(ItemName name) {
case GType_BRA: {
byte *src = _mouseArrow->getData(0);
byte *dst = _comboArrow->getData(0);
- memcpy(dst, src, _comboArrow->getSize(0));
// FIXME: destination offseting is not clear
+ Common::Rect srcRect, dstRect;
+ _mouseArrow->getRect(0, srcRect);
+ _comboArrow->getRect(0, dstRect);
+ for (uint y = 0; y < (uint)srcRect.height(); y++)
+ memcpy(dst + y * dstRect.width(), src + y * srcRect.width(), srcRect.width());
_vm->_inventoryRenderer->drawItem(name, dst + _mouseComboProps_BR._yOffset * _mouseComboProps_BR._width + _mouseComboProps_BR._xOffset, _mouseComboProps_BR._width);
CursorMan.replaceCursor(dst, _mouseComboProps_BR._width, _mouseComboProps_BR._height, 0, 0, 0);
break;
More information about the Scummvm-git-logs
mailing list