[Scummvm-cvs-logs] scummvm master -> 43fb42e91730f894e32eaaa3d4997f5134184f4e
Strangerke
Strangerke at scummvm.org
Wed Oct 30 22:45:28 CET 2013
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:
22df279adc TOON: replace strncpy by strlcpy as suggested by LordHoto
a3c937c556 TSAGE: Fix a bug pointed by wjp
43fb42e917 AVALANCHE: Fix CID 1109678, 1109674
Commit: 22df279adc710294e69b1c9b44df56673489121d
https://github.com/scummvm/scummvm/commit/22df279adc710294e69b1c9b44df56673489121d
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-10-30T14:43:59-07:00
Commit Message:
TOON: replace strncpy by strlcpy as suggested by LordHoto
Changed paths:
engines/toon/anim.cpp
engines/toon/script_func.cpp
diff --git a/engines/toon/anim.cpp b/engines/toon/anim.cpp
index 76b4154..19e997a 100644
--- a/engines/toon/anim.cpp
+++ b/engines/toon/anim.cpp
@@ -41,7 +41,7 @@ bool Animation::loadAnimation(const Common::String &file) {
if (strncmp((char *)fileData, "KevinAguilar", 12))
return false;
- strncpy(_name, file.c_str(), 32);
+ Common::strlcpy(_name, file.c_str(), 32);
uint32 headerSize = READ_LE_UINT32(fileData + 16);
uint32 uncompressedBytes = READ_LE_UINT32(fileData + 20);
diff --git a/engines/toon/script_func.cpp b/engines/toon/script_func.cpp
index 06580cd..70baaae 100644
--- a/engines/toon/script_func.cpp
+++ b/engines/toon/script_func.cpp
@@ -1060,9 +1060,9 @@ int32 ScriptFunc::sys_Cmd_Set_Location_Data(EMCState *state) {
// initial setup of locations
int32 locationId = stackPos(0);
debugC(0, 0, "setlocationdata(%d) %s %x %s %s %d %d", locationId, GetText(1, state), stackPos(2), GetText(3, state), GetText(4, state), stackPos(5), stackPos(6));
- strncpy(_vm->state()->_locations[locationId]._name, GetText(1, state), 64);
- strncpy(_vm->state()->_locations[locationId]._music, GetText(3, state), 64);
- strncpy(_vm->state()->_locations[locationId]._cutaway, GetText(4, state), 64);
+ Common::strlcpy(_vm->state()->_locations[locationId]._name, GetText(1, state), 64);
+ Common::strlcpy(_vm->state()->_locations[locationId]._music, GetText(3, state), 64);
+ Common::strlcpy(_vm->state()->_locations[locationId]._cutaway, GetText(4, state), 64);
_vm->state()->_locations[locationId]._flags = stackPos(2);
_vm->state()->_locations[locationId]._visited = false;
_vm->state()->_locations[locationId]._numSceneAnimations = stackPos(5);
Commit: a3c937c556ce28a403b4fa10d58be129dae6aa73
https://github.com/scummvm/scummvm/commit/a3c937c556ce28a403b4fa10d58be129dae6aa73
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-10-30T14:44:02-07:00
Commit Message:
TSAGE: Fix a bug pointed by wjp
Changed paths:
engines/tsage/core.cpp
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 424df16..e703b71 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -860,7 +860,7 @@ void PlayerMover::doStepsOfNpcMovement(const Common::Point &srcPos, const Common
int PlayerMover::calculateRestOfRoute(int *routeList, int srcRegion, int destRegion, bool &foundRoute) {
// Make a copy of the provided route. The first entry is the size.
int tempList[REGION_LIST_SIZE + 1];
- memset(tempList, 0, REGION_LIST_SIZE + 1);
+ memset(tempList, 0, sizeof(tempList));
foundRoute = false;
for (int idx = 0; idx <= *routeList; ++idx)
Commit: 43fb42e91730f894e32eaaa3d4997f5134184f4e
https://github.com/scummvm/scummvm/commit/43fb42e91730f894e32eaaa3d4997f5134184f4e
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-10-30T14:44:04-07:00
Commit Message:
AVALANCHE: Fix CID 1109678, 1109674
Changed paths:
engines/avalanche/animation.cpp
engines/avalanche/avalanche.cpp
diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp
index 4ddeedc..6bce59d 100644
--- a/engines/avalanche/animation.cpp
+++ b/engines/avalanche/animation.cpp
@@ -49,6 +49,7 @@ const int32 Animation::kCatacombMap[8][8] = {
AnimationType::AnimationType(Animation *anim) {
_anim = anim;
+ _xLength = 0;
_yLength = 0;
for (int i = 0; i < 24; i++) {
_mani[i] = nullptr;
@@ -77,6 +78,7 @@ AnimationType::AnimationType(Animation *anim) {
_eachStepProc = Animation::kProcNone;
_fgBubbleCol = kColorWhite;
_bgBubbleCol = kColorBlack;
+ _id = 177;
}
/**
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 9c83c2c..ef03c51 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -75,7 +75,8 @@ AvalancheEngine::~AvalancheEngine() {
}
void AvalancheEngine::initVariables() {
- // Needed because of Lucerna::load_also()
+ resetVariables();
+
for (int i = 0; i < 31; i++) {
_also[i][0] = nullptr;
_also[i][1] = nullptr;
@@ -117,11 +118,18 @@ void AvalancheEngine::initVariables() {
_doingSpriteRun = false;
_isLoaded = false;
_soundFx = true;
- _spludwickAtHome = false;
- _passedCwytalotInHerts = false;
_holdTheDawn = false;
- _lastRoom = 0;
- _lastRoomNotMap = 0;
+
+ _lineNum = 0;
+ for (int i = 0; i < 50; i++)
+ _lines[i]._color = kColorWhite;
+ _dropsOk = false;
+ _cheat = false;
+ _letMeOut = false;
+ _thinks = 2;
+ _thinkThing = true;
+ _seeScroll = false;
+ _currentMouse = 177;
}
Common::ErrorCode AvalancheEngine::initialize() {
More information about the Scummvm-git-logs
mailing list