From 1937dca584ab38db4af7084649a59ccd3c3bf1ca Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 8 Mar 2009 13:18:07 +0000 Subject: Cleanup. svn-id: r39222 --- engines/agos/vga_pn.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'engines/agos/vga_pn.cpp') diff --git a/engines/agos/vga_pn.cpp b/engines/agos/vga_pn.cpp index ae9bb8eac4..eafac6e1a2 100644 --- a/engines/agos/vga_pn.cpp +++ b/engines/agos/vga_pn.cpp @@ -88,6 +88,27 @@ void AGOSEngine_PN::setupVideoOpcodes(VgaOpcodeProc *op) { op[55] = &AGOSEngine::vc55_scanFlag; } +bool AGOSEngine_PN::ifObjectHere(uint16 a) { + if (getFeatures() & GF_DEMO) + return 0; + else + return _variableArray[39] == getptr(_quickptr[11] + a * _quickshort[4] + 2); +} + +bool AGOSEngine_PN::ifObjectAt(uint16 a, uint16 b) { + if (getFeatures() & GF_DEMO) + return 0; + else + return b == getptr(_quickptr[11] + a * _quickshort[4] + 2); +} + +bool AGOSEngine_PN::ifObjectState(uint16 a, int16 b) { + if (getFeatures() & GF_DEMO) + return 0; + else + return b == getptr(_quickptr[0] + a * _quickshort[0] + 2); +} + void AGOSEngine::vc36_pause() { const char *message1 = "Press any key to continue"; bool oldWiped = _wiped; @@ -185,4 +206,18 @@ void AGOSEngine::vc55_scanFlag() { _scanFlag = 1; } +void AGOSEngine_PN::clearVideoWindow(uint16 num, uint16 color) { + const uint16 *vlut = &_videoWindows[num * 4]; + uint16 xoffs = vlut[0] * 16; + uint16 yoffs = vlut[1]; + + Graphics::Surface *screen = _system->lockScreen(); + byte *dst = (byte *)screen->pixels + xoffs + yoffs * screen->pitch; + for (uint h = 0; h < vlut[3]; h++) { + memset(dst, color, vlut[2] * 16); + dst += screen->pitch; + } + _system->unlockScreen(); +} + } // End of namespace AGOS -- cgit v1.2.3