aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/vga_pn.cpp
diff options
context:
space:
mode:
authorTravis Howell2009-03-08 13:18:07 +0000
committerTravis Howell2009-03-08 13:18:07 +0000
commit1937dca584ab38db4af7084649a59ccd3c3bf1ca (patch)
treec85975feb80ed97afb6e878f16cc4de7b480a278 /engines/agos/vga_pn.cpp
parent275cf8a383a58262c939b7662f1b7ec02f69cb86 (diff)
downloadscummvm-rg350-1937dca584ab38db4af7084649a59ccd3c3bf1ca.tar.gz
scummvm-rg350-1937dca584ab38db4af7084649a59ccd3c3bf1ca.tar.bz2
scummvm-rg350-1937dca584ab38db4af7084649a59ccd3c3bf1ca.zip
Cleanup.
svn-id: r39222
Diffstat (limited to 'engines/agos/vga_pn.cpp')
-rw-r--r--engines/agos/vga_pn.cpp35
1 files changed, 35 insertions, 0 deletions
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