Skip to content

Commit

Permalink
FULLPIPE: Fix Background::addPictureObject()
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Jan 2, 2014
1 parent a21bba0 commit 979cf9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions engines/fullpipe/gfx.cpp
Expand Up @@ -129,8 +129,8 @@ void Background::addPictureObject(PictureObject *pct) {
pct->renumPictures(&_picObjList);

bool inserted = false;
for (uint i = 0; i < _picObjList.size(); i++) {
if (((PictureObject *)_picObjList[i])->_priority == pct->_priority) {
for (uint i = 1; i < _picObjList.size(); i++) {
if (((PictureObject *)_picObjList[i])->_priority <= pct->_priority) {
_picObjList.insert_at(i, pct);
inserted = true;
break;
Expand Down Expand Up @@ -329,8 +329,8 @@ void GameObject::renumPictures(PtrList *lst) {
int *buf = (int *)calloc(lst->size() + 2, sizeof(int));

for (uint i = 0; i < lst->size(); i++) {
if (_id == ((PictureObject *)((*lst)[i]))->_id)
buf[((PictureObject *)((*lst)[i]))->_okeyCode] = 1;
if (_id == ((GameObject *)((*lst)[i]))->_id)
buf[((GameObject *)((*lst)[i]))->_okeyCode] = 1;
}

if (buf[_okeyCode]) {
Expand Down
1 change: 1 addition & 0 deletions engines/fullpipe/scene.cpp
Expand Up @@ -526,6 +526,7 @@ void Scene::updateScrolling2() {
((PictureObject *)_picObjList[0])->getDimensions(&point);

int flags = ((PictureObject *)_picObjList[0])->_flags;
warning("flags: %d %d %d %d", flags & 2, flags & 0x20, point.x, point.y);

if (g_fp->_sceneRect.left < 0 && !(flags & 2))
offsetX = -g_fp->_sceneRect.left;
Expand Down

0 comments on commit 979cf9f

Please sign in to comment.