Moved more GfxObj management to Gfx object.

svn-id: r35466
This commit is contained in:
Nicola Mettifogo 2008-12-21 15:42:47 +00:00
parent 74b251d45d
commit e11c17a005
11 changed files with 81 additions and 68 deletions

View file

@ -103,6 +103,12 @@ GfxObj* Gfx::loadAnim(const char *name) {
return obj;
}
GfxObj* Gfx::loadCharacterAnim(const char *name) {
GfxObj *obj = loadAnim(name);
obj->setFlags(kGfxObjCharacter);
obj->clearFlags(kGfxObjNormal);
return obj;
}
GfxObj* Gfx::loadGet(const char *name) {
GfxObj *obj = _disk->loadStatic(name);
@ -140,6 +146,18 @@ void Gfx::clearGfxObjects(uint filter) {
}
void Gfx::freeLocationObjects() {
freeDialogueObjects();
clearGfxObjects(kGfxObjNormal);
freeLabels();
}
void Gfx::freeCharacterObjects() {
freeDialogueObjects();
clearGfxObjects(kGfxObjCharacter);
}
void Gfx::loadGfxObjMask(const char *name, GfxObj *obj) {
Common::Rect rect;
obj->getRect(0, rect);