aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/vga_pn.cpp
diff options
context:
space:
mode:
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