mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 16:35:20 +00:00
fix 2 cases not handled in findBob() (stupid me...) and match new/delete
svn-id: r10576
This commit is contained in:
parent
8fb8ea48ec
commit
d19c7980fb
@ -31,7 +31,7 @@ QueenLogic::QueenLogic(QueenResource *resource)
|
||||
}
|
||||
|
||||
QueenLogic::~QueenLogic() {
|
||||
free (_jas);
|
||||
delete[] _jas;
|
||||
//free(_graphicData);
|
||||
}
|
||||
|
||||
@ -280,16 +280,25 @@ uint16 QueenLogic::findBob(uint16 obj) {
|
||||
++idxStatic;
|
||||
}
|
||||
}
|
||||
else if(img == -1) {
|
||||
++idxStatic;
|
||||
}
|
||||
else if(img == -2) {
|
||||
++idxAnimated;
|
||||
}
|
||||
}
|
||||
// FIXME: _max*Frame variables should initialized in SETUP_FURNITURE and DISP_ROOM
|
||||
// FIXME: _max*Frame variables should be initialized in SETUP_FURNITURE and DISP_ROOM
|
||||
if(bobtype == 0) {
|
||||
// static bob
|
||||
bobnum = 19 + _maxStaticFrame + idxStatic;
|
||||
if(idxStatic > 0) {
|
||||
bobnum = 19 + _maxStaticFrame + idxStatic;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// animated bob
|
||||
bobnum = 4 + _maxAnimatedFrame + idxAnimated;
|
||||
|
||||
if(idxAnimated > 0) {
|
||||
bobnum = 4 + _maxAnimatedFrame + idxAnimated;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -355,7 +364,7 @@ uint16 QueenLogic::findFrame(uint16 obj) {
|
||||
if(img <= -10) {
|
||||
GraphicData* pgd = &_graphicData[-(img + 10)];
|
||||
if(pgd->lastFrame != 0) {
|
||||
idx += ABS(pgd->lastFrame - pgd->firstFrame) + 1;
|
||||
idx += ABS(pgd->lastFrame) - pgd->firstFrame + 1;
|
||||
}
|
||||
else {
|
||||
++idx;
|
||||
|
Loading…
x
Reference in New Issue
Block a user