Updated layer calculation: animations are now hidden properly by background elements (but not items yet).
svn-id: r33894
This commit is contained in:
parent
0606fef24e
commit
22eaffcb34
7 changed files with 62 additions and 29 deletions
|
@ -71,6 +71,20 @@ uint16 Animation::height() const {
|
|||
return r.height();
|
||||
}
|
||||
|
||||
int16 Animation::getFrameX() const {
|
||||
if (!gfxobj) return _left;
|
||||
Common::Rect r;
|
||||
gfxobj->getRect(_frame, r);
|
||||
return r.left + _left;
|
||||
}
|
||||
|
||||
int16 Animation::getFrameY() const {
|
||||
if (!gfxobj) return _top;
|
||||
Common::Rect r;
|
||||
gfxobj->getRect(_frame, r);
|
||||
return r.top + _top;
|
||||
}
|
||||
|
||||
uint16 Animation::getFrameNum() const {
|
||||
if (!gfxobj) return 0;
|
||||
return gfxobj->getNum();
|
||||
|
@ -198,13 +212,6 @@ Zone::~Zone() {
|
|||
free(_linkedName);
|
||||
}
|
||||
|
||||
void Zone::getRect(Common::Rect& r) const {
|
||||
r.left = _left;
|
||||
r.right = _right;
|
||||
r.top = _top;
|
||||
r.bottom = _bottom;
|
||||
}
|
||||
|
||||
void Zone::translate(int16 x, int16 y) {
|
||||
_left += x;
|
||||
_right += x;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue