FULLPIPE: Implement PictureObject::isPointInside()
This commit is contained in:
parent
f9cefd02df
commit
5e21cefa72
2 changed files with 17 additions and 0 deletions
|
@ -213,6 +213,22 @@ bool PictureObject::setPicAniInfo(PicAniInfo *picAniInfo) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool PictureObject::isPointInside(int x, int y) {
|
||||||
|
bool res;
|
||||||
|
int oldx = _picture->_x;
|
||||||
|
int oldy = _picture->_y;
|
||||||
|
|
||||||
|
_picture->_x = _ox;
|
||||||
|
_picture->_y = _oy;
|
||||||
|
|
||||||
|
res = _picture->isPointInside(x, y);
|
||||||
|
|
||||||
|
_picture->_x = oldx;
|
||||||
|
_picture->_y = oldy;
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
GameObject::GameObject() {
|
GameObject::GameObject() {
|
||||||
_okeyCode = 0;
|
_okeyCode = 0;
|
||||||
_flags = 0;
|
_flags = 0;
|
||||||
|
|
|
@ -159,6 +159,7 @@ class PictureObject : public GameObject {
|
||||||
void draw();
|
void draw();
|
||||||
|
|
||||||
bool setPicAniInfo(PicAniInfo *picAniInfo);
|
bool setPicAniInfo(PicAniInfo *picAniInfo);
|
||||||
|
bool isPointInside(int x, int y);
|
||||||
};
|
};
|
||||||
|
|
||||||
class Background : public CObject {
|
class Background : public CObject {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue