diff options
Diffstat (limited to 'engines/cge2/talk.cpp')
-rw-r--r-- | engines/cge2/talk.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/cge2/talk.cpp b/engines/cge2/talk.cpp index a6d9945665..54e9ea3764 100644 --- a/engines/cge2/talk.cpp +++ b/engines/cge2/talk.cpp @@ -34,6 +34,20 @@ void CGE2Engine::setAutoColors() { warning("STUB: CGE2Engine::setAutoColors()"); } +Sprite *CGE2Engine::spriteAt(V2D pos) { + Sprite *spr; + + for (spr = _vga->_showQ->last(); spr; spr = spr->_prev) { + if (!spr->_flags._hide && !spr->_flags._tran) { + V2D temp = pos - spr->_pos2D; + if (spr->getShp()->solidAt(temp.x, temp.y)) + break; + } + } + + return spr; +} + Font::Font(CGE2Engine *vm) : _vm(vm) { _map = new uint8[kMapSize]; _pos = new uint16[kPosSize]; |