Remove INSANE define.

svn-id: r12363
This commit is contained in:
Travis Howell 2004-01-14 01:41:44 +00:00
parent 51434558f4
commit 1fa4231c47
7 changed files with 1 additions and 92 deletions

View file

@ -27,7 +27,7 @@ CP = cp
####################################################################### #######################################################################
CXXFLAGS:= -g -O -Wall -Wuninitialized -Wno-long-long -Wno-multichar -Wno-unknown-pragmas CXXFLAGS:= -g -O -Wall -Wuninitialized -Wno-long-long -Wno-multichar -Wno-unknown-pragmas
DEFINES += -DINSANE DEFINES +=
LDFLAGS := LDFLAGS :=
INCLUDES:= -I. -Icommon -Iscumm $(SDL_CFLAGS) INCLUDES:= -I. -Icommon -Iscumm $(SDL_CFLAGS)
LIBS += $(SDL_LIBS) -lmingw32 -lwinmm LIBS += $(SDL_LIBS) -lmingw32 -lwinmm

View file

@ -41,10 +41,6 @@
#include "sound/mixer.h" #include "sound/mixer.h"
#include "scumm/smush/insane.h" #include "scumm/smush/insane.h"
#ifndef INSANE
#include "scumm/dialogs.h" // FIXME: This is just for the FT-INSANE warning.
// Remove when INSANE is implemented
#endif
namespace Scumm { namespace Scumm {
@ -2437,70 +2433,10 @@ void ScummEngine_v6::o6_kernelSetFunctions() {
if (args[1] == 0) { if (args[1] == 0) {
sp->play((char *)getStringAddressVar(VAR_VIDEONAME), getGameDataPath()); sp->play((char *)getStringAddressVar(VAR_VIDEONAME), getGameDataPath());
} else if (_gameId == GID_FT) { } else if (_gameId == GID_FT) {
#ifdef INSANE
const int insaneVarNum = (_features & GF_DEMO) ? 232 : 233; const int insaneVarNum = (_features & GF_DEMO) ? 232 : 233;
_insane->setSmushParams(speed); _insane->setSmushParams(speed);
_insane->runScene(insaneVarNum); _insane->runScene(insaneVarNum);
#else
const int insaneVarNum = (_features & GF_DEMO) ? 232 : 233;
const int insaneMode = readArray(insaneVarNum,0,0);
// FIXME: FT Demo has different Insane
debug(1, "FT_INSANE Mode: %d", insaneMode);
switch (insaneMode) {
case 0:
sp->play("minedriv.san", getGameDataPath());
break;
case 1:
sp->play("tovista2.san", getGameDataPath());
break;
case 2:
sp->play("tovista1.san", getGameDataPath());
break;
case 3:
if (readArray(insaneVarNum,0,50) == 0) {
InfoDialog info(this, "Set MineRoad - You can now jump the gorge.");
runDialog(info);
writeArray(insaneVarNum, 0, 50, 1); // INSANE callback: Chain
writeArray(insaneVarNum, 0, 51, 1); // INSANE callback: Chainsaw
writeArray(insaneVarNum, 0, 52, 1); // INSANE callback: Mace
writeArray(insaneVarNum, 0, 53, 1); // INSANE callback: 2x4
writeArray(insaneVarNum, 0, 54, 1); // INSANE callback: Wrench
writeArray(insaneVarNum, 0, 55, 1); // INSANE callback: Dust
writeArray(insaneVarNum, 0, 8, 1); // INSANE callback: Give Googles
writeArray(insaneVarNum, 0, 7, 1); // INSANE callback: Give nitro fuel
putState(235, 1); // Cheat and activate Ramp
writeVar(142 | 0x8000, 1); // Cheat and activate auto-booster (fan)
}
// sp->play("minefite.san", getGameDataPath());
break;
case 4:
sp->play("rottopen.san", getGameDataPath());
break;
case 5:
case 6:
case 7:
case 8:
warning("FT_INSANE mode %d: Stub", args[1]);
break;
case 9:
sp->play("credits.san", getGameDataPath());
break;
default:
// Other INSANE modes
warning("Unknown FT_INSANE mode for %d", args[1]);
sp->play((char *)getStringAddressVar(VAR_VIDEONAME), getGameDataPath());
}
} else {
// Other INSANE modes
warning("Unknown insane mode for %d", args[1]);
sp->play((char *)getStringAddressVar(VAR_VIDEONAME), getGameDataPath());
#endif
} }
delete sp; delete sp;
} }

View file

@ -1006,10 +1006,8 @@ protected:
bool _demoMode; bool _demoMode;
bool _confirmExit; bool _confirmExit;
#ifdef INSANE
public: public:
Insane *_insane; Insane *_insane;
#endif
public: public:
uint16 _extraBoxFlags[65]; uint16 _extraBoxFlags[65];

View file

@ -847,11 +847,9 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
else else
_costumeRenderer = new CostumeRenderer(this); _costumeRenderer = new CostumeRenderer(this);
#ifdef INSANE
// Create FT INSANE object // Create FT INSANE object
if (_gameId == GID_FT) if (_gameId == GID_FT)
_insane = new Insane(this); _insane = new Insane(this);
#endif
} }
ScummEngine::~ScummEngine() { ScummEngine::~ScummEngine() {
@ -1859,14 +1857,10 @@ void ScummEngine::processKbd() {
// normally use F4 for this, we add in a hack that makes escape work, // normally use F4 for this, we add in a hack that makes escape work,
// too (just for convenience). // too (just for convenience).
if (_insaneState) { if (_insaneState) {
#ifdef INSANE
if (_gameId == GID_FT) if (_gameId == GID_FT)
_insane->escapeKeyHandler(); _insane->escapeKeyHandler();
else else
_videoFinished = true; _videoFinished = true;
#else
_videoFinished = true;
#endif
} }
if (!_insaneState || _videoFinished) if (!_insaneState || _videoFinished)
abortCutscene(); abortCutscene();

View file

@ -39,8 +39,6 @@
#include "scumm/smush/chunk.h" #include "scumm/smush/chunk.h"
#include "scumm/smush/insane.h" #include "scumm/smush/insane.h"
#ifdef INSANE
// TODO (in no particular order): // TODO (in no particular order):
// o Ben's velocity don't get zeroed after crash // o Ben's velocity don't get zeroed after crash
// o TRS file support. Everything is in place, I just need to figure out function parameters // o TRS file support. Everything is in place, I just need to figure out function parameters
@ -8185,4 +8183,3 @@ void Insane::smush_setFrameSteps(int32 step1, int32 step2) {
} }
} }
#endif // INSANE

View file

@ -29,8 +29,6 @@
#include "scumm/smush/smush_player.h" #include "scumm/smush/smush_player.h"
#include "scumm/smush/chunk.h" #include "scumm/smush/chunk.h"
#ifdef INSANE
namespace Scumm { namespace Scumm {
#define INV_CHAIN 0 #define INV_CHAIN 0
@ -477,6 +475,4 @@ class Insane {
}; };
} // End of namespace Insane } // End of namespace Insane
#endif // INSANE
#endif #endif

View file

@ -727,11 +727,9 @@ void SmushPlayer::handleFrame(Chunk &b) {
uint32 start_time, end_time; uint32 start_time, end_time;
start_time = _vm->_system->get_msecs(); start_time = _vm->_system->get_msecs();
#ifdef INSANE
if (_insanity) { if (_insanity) {
_vm->_insane->procPreRendering(); _vm->_insane->procPreRendering();
} }
#endif
while (!b.eof()) { while (!b.eof()) {
Chunk *sub = b.subBlock(); Chunk *sub = b.subBlock();
@ -753,15 +751,11 @@ void SmushPlayer::handleFrame(Chunk &b) {
handleDeltaPalette(*sub); handleDeltaPalette(*sub);
break; break;
case TYPE_IACT: case TYPE_IACT:
#ifdef INSANE
// FIXME: check parameters // FIXME: check parameters
if (_insanity) if (_insanity)
_vm->_insane->procIACT(_dst, 0, 0, 0, *sub, 0, 0); _vm->_insane->procIACT(_dst, 0, 0, 0, *sub, 0, 0);
else else
handleIACT(*sub); handleIACT(*sub);
#else
handleIACT(*sub);
#endif
break; break;
case TYPE_STOR: case TYPE_STOR:
handleStore(*sub); handleStore(*sub);
@ -770,14 +764,10 @@ void SmushPlayer::handleFrame(Chunk &b) {
handleFetch(*sub); handleFetch(*sub);
break; break;
case TYPE_SKIP: case TYPE_SKIP:
#ifdef INSANE
if (_insanity) if (_insanity)
_vm->_insane->procSKIP(*sub); _vm->_insane->procSKIP(*sub);
else else
handleSkip(*sub); handleSkip(*sub);
#else
handleSkip(*sub);
#endif
break; break;
case TYPE_TEXT: case TYPE_TEXT:
handleTextResource(*sub); handleTextResource(*sub);
@ -788,12 +778,10 @@ void SmushPlayer::handleFrame(Chunk &b) {
delete sub; delete sub;
} }
#ifdef INSANE
// FIXME: Check either parameters are valid // FIXME: Check either parameters are valid
if (_insanity) { if (_insanity) {
_vm->_insane->procPostRendering(_dst, 0, 0, 0, _frame, _nbframes-1); _vm->_insane->procPostRendering(_dst, 0, 0, 0, _frame, _nbframes-1);
} }
#endif
end_time = _vm->_system->get_msecs(); end_time = _vm->_system->get_msecs();