Skip to content

Commit

Permalink
Merge branch 'master' of github.com:scummvm/scummvm
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Jun 6, 2014
2 parents 8cb50b5 + 113a282 commit 3dcfa95
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 10 deletions.
11 changes: 9 additions & 2 deletions devtools/create_neverhood/create_neverhood.cpp
Expand Up @@ -467,15 +467,22 @@ class StaticDataListVector {
std::vector<LISTCLASS*> lists;

void add(LISTCLASS *list) {
lists.push_back(list);
bool doAppend = true;
for (typename std::vector<LISTCLASS*>::iterator it = lists.begin(); it != lists.end(); it++) {
if ((*it)->id == list->id) {
doAppend = false;
break;
}
}
if (doAppend)
lists.push_back(list);
}

void loadListVector(const uint32 *offsets) {
for (int i = 0; offsets[i] != 0; i += 2) {
LISTCLASS *list = new LISTCLASS();
list->loadList(offsets[i], offsets[i + 1]);
bool doAppend = true;
// Bad
for (typename std::vector<LISTCLASS*>::iterator it = lists.begin(); it != lists.end(); it++) {
if ((*it)->id == list->id) {
doAppend = false;
Expand Down
1 change: 0 additions & 1 deletion devtools/create_neverhood/tables.h
Expand Up @@ -45,7 +45,6 @@ static const uint32 rectListOffsets[] = {
// Scene1002
3, 0x004B43A0,
1, 0x004B4418,
3, 0x004B43A0,
// Scene1004
1, 0x004B7C70,
// Scene1109
Expand Down
Binary file modified dists/engine-data/neverhood.dat
Binary file not shown.
3 changes: 3 additions & 0 deletions engines/fullpipe/modal.cpp
Expand Up @@ -1456,6 +1456,9 @@ ModalSaveGame::ModalSaveGame() {
_cancelL = 0;
_emptyD = 0;
_emptyL = 0;
_fullD = 0;
_fullL = 0;
_menuScene = 0;
_queryRes = -1;
_rect = g_fp->_sceneRect;
_queryDlg = 0;
Expand Down
7 changes: 5 additions & 2 deletions engines/fullpipe/motion.cpp
Expand Up @@ -554,8 +554,7 @@ MessageQueue *MctlLadder::doWalkTo(StaticANIObject *ani, int xpos, int ypos, int

mq->transferExCommands(newmq);

if (newmq)
delete newmq;
delete newmq;

ani->setPicAniInfo(&picinfo);

Expand Down Expand Up @@ -1136,6 +1135,8 @@ MessageQueue *MovGraph::sub1(StaticANIObject *ani, int x, int y, int stid, int x
_items[idx]->movarr._link = 0;

res = fillMGMinfo(_items[idx]->ani, &_items[idx]->movarr, stid2);

break;
}
}

Expand Down Expand Up @@ -1517,6 +1518,8 @@ Common::Array<MovItem *> *MovGraph::calcMovItems(MovArr *movarr1, MovArr *movarr

genMovItem(r, tempObList2[i], movarr1, movarr2);

res->push_back(r);

delete tempObList2[i];
}

Expand Down
5 changes: 4 additions & 1 deletion engines/fullpipe/scenes.cpp
Expand Up @@ -1455,6 +1455,9 @@ void BallChain::init(Ball **ball) {

Ball *BallChain::sub04(Ball *ballP, Ball *ballN) {
if (!pTail) {
if (!cPlexLen)
error("BallChain::sub04: cPlexLen is 0");

cPlex = (byte *)calloc(cPlexLen, sizeof(Ball));

Ball *runPtr = (Ball *)&cPlex[(cPlexLen - 1) * sizeof(Ball)];
Expand All @@ -1463,7 +1466,7 @@ Ball *BallChain::sub04(Ball *ballP, Ball *ballN) {
runPtr->p0 = pTail;
pTail = runPtr;

runPtr -= sizeof(Ball);
runPtr--;
}
}

Expand Down
2 changes: 1 addition & 1 deletion engines/fullpipe/scenes/scene16.cpp
Expand Up @@ -182,7 +182,7 @@ void sceneHandler16_fillMug() {
mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC16_BOYOUT), 0, 1);

mq->replaceKeyCode(-1, g_vars->scene16_walkingBoy->_okeyCode);
if (mq->chain(g_vars->scene16_walkingBoy) || !mq)
if (!mq || mq->chain(g_vars->scene16_walkingBoy))
return;
} else {
if (!g_vars->scene16_walkingGirl)
Expand Down
7 changes: 4 additions & 3 deletions engines/fullpipe/statics.cpp
Expand Up @@ -979,11 +979,12 @@ void StaticANIObject::stopAnim_maybe() {
_ox += point.x;
_oy += point.y;
}
} else {
_statics = _movement->_staticsObj2;
}
}

if (_movement->_currDynamicPhaseIndex || !(_flags & 0x40))
} else {
_statics = _movement->_staticsObj2;
}

_statics->getSomeXY(point);

Expand Down

0 comments on commit 3dcfa95

Please sign in to comment.