aboutsummaryrefslogtreecommitdiff
path: root/engines/agos
diff options
context:
space:
mode:
authorTravis Howell2009-03-09 02:25:29 +0000
committerTravis Howell2009-03-09 02:25:29 +0000
commit2bd2fe43c5b2514b9dc3e5d851dcb3affec78167 (patch)
tree344068c3936357f6eb6fdff37186fb8bb5e123d8 /engines/agos
parentb2d49eaeef32b34353c787884f23892411e169f9 (diff)
downloadscummvm-rg350-2bd2fe43c5b2514b9dc3e5d851dcb3affec78167.tar.gz
scummvm-rg350-2bd2fe43c5b2514b9dc3e5d851dcb3affec78167.tar.bz2
scummvm-rg350-2bd2fe43c5b2514b9dc3e5d851dcb3affec78167.zip
Change Personal Nightmare support to optional, until setjmp/longjmp code is converted.
svn-id: r39253
Diffstat (limited to 'engines/agos')
-rw-r--r--engines/agos/agos.cpp2
-rw-r--r--engines/agos/agos.h2
-rw-r--r--engines/agos/cursor.cpp2
-rw-r--r--engines/agos/detection.cpp2
-rw-r--r--engines/agos/event.cpp2
-rw-r--r--engines/agos/gfx.cpp2
-rw-r--r--engines/agos/icons.cpp2
-rw-r--r--engines/agos/input.cpp3
-rw-r--r--engines/agos/pn.cpp4
-rw-r--r--engines/agos/res.cpp2
-rw-r--r--engines/agos/saveload.cpp2
-rw-r--r--engines/agos/script_pn.cpp3
-rw-r--r--engines/agos/string.cpp3
-rw-r--r--engines/agos/verb.cpp2
-rw-r--r--engines/agos/vga_pn.cpp5
15 files changed, 34 insertions, 4 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 1dd5cb0d7e..5b6465dc32 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -851,6 +851,7 @@ void AGOSEngine_Elvira1::setupGame() {
AGOSEngine::setupGame();
}
+#ifdef ENABLE_PN
void AGOSEngine_PN::setupGame() {
gss = &simon1_settings;
_numVideoOpcodes = 57;
@@ -862,6 +863,7 @@ void AGOSEngine_PN::setupGame() {
AGOSEngine::setupGame();
}
+#endif
void AGOSEngine::setupGame() {
allocItemHeap();
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 4f098ae9f2..a77e6862b1 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -1280,6 +1280,7 @@ protected:
virtual char *genSaveName(int slot);
};
+#ifdef ENABLE_PN
class AGOSEngine_PN : public AGOSEngine {
struct stackframe {
struct stackframe *nextframe;
@@ -1525,6 +1526,7 @@ protected:
const OpcodeEntryPN *_opcodesPN;
};
+#endif
class AGOSEngine_Elvira1 : public AGOSEngine {
public:
diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp
index cd91117d62..02141eaec9 100644
--- a/engines/agos/cursor.cpp
+++ b/engines/agos/cursor.cpp
@@ -474,6 +474,7 @@ get_out:
_litBoxFlag = 0;
}
+#ifdef ENABLE_PN
void AGOSEngine_PN::handleMouseMoved() {
if (_mouseHideCount) {
CursorMan.showMouse(false);
@@ -538,6 +539,7 @@ void AGOSEngine_PN::handleMouseMoved() {
_needHitAreaRecalc = 0;
_litBoxFlag = 0;
}
+#endif
void AGOSEngine::handleMouseMoved() {
uint x;
diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp
index 59f603a905..7ecd6d3374 100644
--- a/engines/agos/detection.cpp
+++ b/engines/agos/detection.cpp
@@ -133,9 +133,11 @@ bool AgosMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGame
bool res = true;
switch (gd->gameType) {
+#ifdef ENABLE_PN
case AGOS::GType_PN:
*engine = new AGOS::AGOSEngine_PN(syst);
break;
+#endif
case AGOS::GType_ELVIRA1:
*engine = new AGOS::AGOSEngine_Elvira1(syst);
break;
diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp
index c915af1aba..183aff1cf1 100644
--- a/engines/agos/event.cpp
+++ b/engines/agos/event.cpp
@@ -613,6 +613,7 @@ void AGOSEngine_Feeble::timerProc() {
_videoLockOut &= ~2;
}
+#ifdef ENABLE_PN
void AGOSEngine_PN::timerProc() {
if (_videoLockOut & 0x80E9 || _videoLockOut & 2)
return;
@@ -651,6 +652,7 @@ void AGOSEngine_PN::timerProc() {
_videoLockOut &= ~2;
}
+#endif
void AGOSEngine::timerProc() {
if (_videoLockOut & 0x80E9 || _videoLockOut & 2)
diff --git a/engines/agos/gfx.cpp b/engines/agos/gfx.cpp
index 0268463ff5..3fb108b5d1 100644
--- a/engines/agos/gfx.cpp
+++ b/engines/agos/gfx.cpp
@@ -1278,6 +1278,7 @@ void AGOSEngine::setImage(uint16 vgaSpriteId, bool vgaScript) {
_vcPtr = vc_ptr_org;
}
+#ifdef ENABLE_PN
void AGOSEngine_PN::setWindowImageEx(uint16 mode, uint16 vga_res) {
if (!_initMouse) {
_initMouse = 1;
@@ -1285,6 +1286,7 @@ void AGOSEngine_PN::setWindowImageEx(uint16 mode, uint16 vga_res) {
}
setWindowImage(mode, vga_res);
}
+#endif
void AGOSEngine::setWindowImageEx(uint16 mode, uint16 vgaSpriteId) {
_window3Flag = 0;
diff --git a/engines/agos/icons.cpp b/engines/agos/icons.cpp
index c0ca9c67fe..58599ce5f6 100644
--- a/engines/agos/icons.cpp
+++ b/engines/agos/icons.cpp
@@ -1039,6 +1039,7 @@ static const byte hitBarData[12 * 7] = {
0x3C, 0x89, 0xC3, 0x00, 0x88, 0x88, 0x18, 0x03, 0x86, 0x23, 0x0C, 0x00
};
+#ifdef ENABLE_PN
// Personal Nightmare specific
void AGOSEngine_PN::drawIconHitBar() {
Graphics::Surface *screen = _system->lockScreen();
@@ -1118,5 +1119,6 @@ void AGOSEngine_PN::printIcon(HitArea *ha, uint8 i, uint8 r) {
}
}
}
+#endif
} // End of namespace AGOS
diff --git a/engines/agos/input.cpp b/engines/agos/input.cpp
index 2a43cd2484..36ff77a5c0 100644
--- a/engines/agos/input.cpp
+++ b/engines/agos/input.cpp
@@ -606,6 +606,7 @@ bool AGOSEngine::processSpecialKeys() {
return verbCode;
}
+#ifdef ENABLE_PN
// Personal Nightmare specific
void AGOSEngine_PN::clearInputLine() {
_inputting = 0;
@@ -729,6 +730,6 @@ bool AGOSEngine_PN::processSpecialKeys() {
_keyPressed.reset();
return false;
}
-
+#endif
} // End of namespace AGOS
diff --git a/engines/agos/pn.cpp b/engines/agos/pn.cpp
index 66ff6c9c18..ee02b71c0f 100644
--- a/engines/agos/pn.cpp
+++ b/engines/agos/pn.cpp
@@ -23,6 +23,8 @@
*
*/
+#ifdef ENABLE_PN
+
#include "common/config-manager.h"
#include "agos/intern.h"
@@ -291,3 +293,5 @@ void AGOSEngine_PN::setqptrs() {
}
} // End of namespace AGOS
+
+#endif
diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp
index 1540e5a018..54a3fad757 100644
--- a/engines/agos/res.cpp
+++ b/engines/agos/res.cpp
@@ -150,6 +150,7 @@ int AGOSEngine::allocGamePcVars(Common::SeekableReadStream *in) {
return itemArrayInited;
}
+#ifdef ENABLE_PN
void AGOSEngine_PN::loadGamePcFile() {
Common::File in;
@@ -189,6 +190,7 @@ void AGOSEngine_PN::loadGamePcFile() {
error("Unknown compression format");
}
}
+#endif
void AGOSEngine::loadGamePcFile() {
Common::File in;
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index 40c469c6da..a11f7e5141 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -1553,6 +1553,7 @@ bool AGOSEngine_Elvira2::saveGame(uint slot, const char *caption) {
return result;
}
+#ifdef ENABLE_PN
// Personal Nightmare specific
bool AGOSEngine_PN::badload(int8 errorNum) {
if (errorNum == -2)
@@ -1673,5 +1674,6 @@ void AGOSEngine_PN::dbtosysf() {
ct++;
}
}
+#endif
} // End of namespace AGOS
diff --git a/engines/agos/script_pn.cpp b/engines/agos/script_pn.cpp
index 7d54c1f110..c106ee058c 100644
--- a/engines/agos/script_pn.cpp
+++ b/engines/agos/script_pn.cpp
@@ -23,6 +23,7 @@
*
*/
+#ifdef ENABLE_PN
#include "agos/agos.h"
#include "agos/vga.h"
@@ -1105,3 +1106,5 @@ void AGOSEngine_PN::popstack(int type) {
}
} // End of namespace AGOS
+
+#endif
diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp
index 72f9e60b3a..68860fe4f3 100644
--- a/engines/agos/string.cpp
+++ b/engines/agos/string.cpp
@@ -910,8 +910,8 @@ void AGOSEngine_Waxworks::printBox() {
changeWindow(0);
}
+#ifdef ENABLE_PN
// Personal Nightmare specific
-
uint32 AGOSEngine_PN::ftext(uint32 base, int n) {
uint32 b = base;
int ct = n;
@@ -1549,5 +1549,6 @@ char *AGOSEngine_PN::getMessage(char *msg, uint16 num) {
return origPtr;
}
+#endif
} // End of namespace AGOS
diff --git a/engines/agos/verb.cpp b/engines/agos/verb.cpp
index 2cb5fa0514..6f198af799 100644
--- a/engines/agos/verb.cpp
+++ b/engines/agos/verb.cpp
@@ -1027,6 +1027,7 @@ void AGOSEngine::invertBox(HitArea *ha, byte a, byte b, byte c, byte d) {
_videoLockOut &= ~0x8000;
}
+#ifdef ENABLE_PN
// Personal Nightmare specific
void AGOSEngine_PN::boxController(uint x, uint y, uint mode) {
HitArea *best_ha;
@@ -1277,5 +1278,6 @@ void AGOSEngine_PN::hitBox11(HitArea *ha) {
_mouseString = messageList[ha->msg1];
_mousePrintFG++;
}
+#endif
} // End of namespace AGOS
diff --git a/engines/agos/vga_pn.cpp b/engines/agos/vga_pn.cpp
index 61e5bc1e9c..e84248bb4d 100644
--- a/engines/agos/vga_pn.cpp
+++ b/engines/agos/vga_pn.cpp
@@ -23,8 +23,7 @@
*
*/
-// Video script opcodes for Simon1/Simon2
-
+#ifdef ENABLE_PN
#include "agos/agos.h"
#include "agos/intern.h"
@@ -221,3 +220,5 @@ void AGOSEngine_PN::clearVideoWindow(uint16 num, uint16 color) {
}
} // End of namespace AGOS
+
+#endif