diff options
| -rw-r--r-- | Makefile.common | 4 | ||||
| -rwxr-xr-x | configure | 13 | ||||
| -rw-r--r-- | scumm/actor.cpp | 5 | ||||
| -rw-r--r-- | scumm/akos.cpp | 2 | ||||
| -rw-r--r-- | scumm/charset.cpp | 2 | ||||
| -rw-r--r-- | scumm/cursor.cpp | 2 | ||||
| -rw-r--r-- | scumm/gfx.cpp | 4 | ||||
| -rw-r--r-- | scumm/module.mk | 24 | ||||
| -rw-r--r-- | scumm/object.cpp | 5 | ||||
| -rw-r--r-- | scumm/resource.cpp | 2 | ||||
| -rw-r--r-- | scumm/room.cpp | 2 | ||||
| -rw-r--r-- | scumm/saveload.cpp | 2 | ||||
| -rw-r--r-- | scumm/scumm.cpp | 18 | 
13 files changed, 69 insertions, 16 deletions
| diff --git a/Makefile.common b/Makefile.common index 178fb5b3c6..ce6cdb0a83 100644 --- a/Makefile.common +++ b/Makefile.common @@ -39,6 +39,10 @@ else  MODULES += scumm  endif +ifdef DISABLE_HE +DEFINES += -DDISABLE_HE +endif +  ifdef DISABLE_SIMON  DEFINES += -DDISABLE_SIMON  else @@ -24,6 +24,7 @@ _fluidsynth=auto  _mt32emu=yes  # default option behaviour yes/no  _build_scumm=yes +_build_he=yes  _build_simon=yes  _build_sky=yes  _build_sword1=yes @@ -263,6 +264,7 @@ Special configuration feature:  Optional Features:    --disable-debug          disable building with debugging symbols    --disable-scumm          don't build the SCUMM engine +  --disable-he             exclude HE70+ games in SCUMM engine    --disable-simon          don't build the simon engine    --disable-sky            don't build the Beneath a Steel Sky engine    --disable-sword1         don't build the Broken Sword I engine @@ -321,6 +323,7 @@ DEBFLAGS="-g"  for ac_option in $@; do      case "$ac_option" in        --disable-scumm)          _build_scumm=no ;; +      --disable-he)             _build_he=no ;;        --disable-simon)          _build_simon=no ;;        --disable-sky)            _build_sky=no ;;        --disable-sword1)         _build_sword1=no ;; @@ -556,6 +559,12 @@ else  	_mak_scumm='# DISABLE_SCUMM = 1'  fi +if test "$_build_he" = no ; then +	_mak_he='DISABLE_HE = 1' +else +	_mak_he='# DISABLE_HE = 1' +fi +  if test "$_build_simon" = no ; then  	_mak_simon='DISABLE_SIMON = 1'  else @@ -1064,6 +1073,9 @@ echo  echo "Engines:"  if test "$_build_scumm" = yes ; then  	echo "    SCUMM" +	if test "$_build_he" = yes ; then +		echo "    SCUMM (HE70+ games)" +	fi  fi  if test "$_build_simon" = yes ; then  	echo "    Simon the Sorcerer" @@ -1218,6 +1230,7 @@ $_mak_plugins  $_make_def_HAVE_GCC3  $_make_def_HAVE_NASM  $_mak_scumm +$_mak_he  $_mak_simon  $_mak_sky  $_mak_sword1 diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 52b9b6f1e8..ada0dd12fd 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -1009,6 +1009,7 @@ void ScummEngine::processActors() {  		akos_processQueue();  } +#ifndef DISABLE_HE  void ScummEngine_v71he::processActors() {  	preProcessAuxQueue(); @@ -1020,7 +1021,6 @@ void ScummEngine_v71he::processActors() {  	postProcessAuxQueue();  } -  void ScummEngine_v90he::processActors() {  	preProcessAuxQueue(); @@ -1037,6 +1037,7 @@ void ScummEngine_v90he::processActors() {  	spritesMarkDirty(true);  	spritesProcessWiz(false);  } +#endif  // Used in Scumm v8, to allow the verb coin to be drawn over the inventory  // chest. I'm assuming that draw order won't matter here. @@ -1968,6 +1969,7 @@ bool Actor::isTalkConditionSet(int slot) const {  	return (_heCondMask & (1 << (slot - 1))) != 0;  } +#ifndef DISABLE_HE  void ScummEngine_v71he::preProcessAuxQueue() {  	if (!_skipProcessActors) {  		for (int i = 0; i < _auxBlocksNum; ++i) { @@ -2048,6 +2050,7 @@ void ScummEngine_v71he::postProcessAuxQueue() {  	}  	_auxEntriesNum = 0;  } +#endif  void ScummEngine::queueAuxBlock(Actor *a) {  	if (!a->_auxBlock.visible) diff --git a/scumm/akos.cpp b/scumm/akos.cpp index 9e25d43e2e..d53fb0d016 100644 --- a/scumm/akos.cpp +++ b/scumm/akos.cpp @@ -1247,6 +1247,7 @@ byte AkosRenderer::codec16(int xmoveCur, int ymoveCur) {  }  byte AkosRenderer::codec32(int xmoveCur, int ymoveCur) { +#ifndef DISABLE_HE  	Common::Rect src, dst;  	if (!_mirror) { @@ -1302,6 +1303,7 @@ byte AkosRenderer::codec32(int xmoveCur, int ymoveCur) {  	byte *dstPtr = (byte *)_out.pixels + dst.left + dst.top * _out.pitch;  	Wiz::decompressWizImage(dstPtr, _out.pitch, dst, _srcptr, src, palPtr); +#endif  	return 0;  } diff --git a/scumm/charset.cpp b/scumm/charset.cpp index 2b358b185d..6e94ef83b7 100644 --- a/scumm/charset.cpp +++ b/scumm/charset.cpp @@ -1383,6 +1383,7 @@ void CharsetRendererClassic::printChar(int chr) {  	}  	if ((_vm->_heversion >= 71 && type >= 8) || (_vm->_heversion >= 90 && type == 0)) { +#ifndef DISABLE_HE  		if (_ignoreCharsetMask || !vs->hasTwoBuffers) {  			dstPtr = vs->getPixels(0, 0);  		} else { @@ -1407,6 +1408,7 @@ void CharsetRendererClassic::printChar(int chr) {  			Common::Rect dst(_left, _top, _left + origWidth, _top + origHeight);  			_vm->gdi.copyVirtScreenBuffers(dst);  		} +#endif  	} else {  		Graphics::Surface dstSurface;  		Graphics::Surface backSurface; diff --git a/scumm/cursor.cpp b/scumm/cursor.cpp index 553fff66ca..a923f4897c 100644 --- a/scumm/cursor.cpp +++ b/scumm/cursor.cpp @@ -156,12 +156,14 @@ void ScummEngine::setCursorFromBuffer(byte *ptr, int width, int height, int pitc  	updateCursor();  } +#ifndef DISABLE_HE  void ScummEngine_v70he::setCursorFromImg(uint img, uint room, uint imgindex) {  	if (_platform == Common::kPlatformMacintosh && _heversion == 72)   		_macResExtractor->setCursor(img);  	else  		_win32ResExtractor->setCursor(img);  } +#endif  void ScummEngine_v90he::setDefaultCursor() {  	const uint16 *src; diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 1283f17c43..182a90915b 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -799,6 +799,7 @@ void ScummEngine::redrawBGAreas() {  	_bgNeedsRedraw = false;  } +#ifndef DISABLE_HE  void ScummEngine_v71he::redrawBGAreas() {  	if (camera._cur.x != camera._last.x && _charset->_hasMask)  		stopTalk(); @@ -817,6 +818,7 @@ void ScummEngine_v72he::redrawBGAreas() {  	ScummEngine_v71he::redrawBGAreas();  	flushWizBuffer();  } +#endif  void ScummEngine::redrawBGStrip(int start, int num) {  	byte *room; @@ -1622,6 +1624,7 @@ void Gdi::drawBMAPBg(const byte *ptr, VirtScreen *vs) {  }  void Gdi::drawBMAPObject(const byte *ptr, VirtScreen *vs, int obj, int x, int y, int w, int h) { +#ifndef DISABLE_HE  	const byte *bmap_ptr = _vm->findResourceData(MKID('BMAP'), ptr);  	assert(bmap_ptr); @@ -1646,6 +1649,7 @@ void Gdi::drawBMAPObject(const byte *ptr, VirtScreen *vs, int obj, int x, int y,  		copyVirtScreenBuffers(rect1);  	} +#endif  }  void Gdi::copyVirtScreenBuffers(Common::Rect rect, int dirtybit) { diff --git a/scumm/module.mk b/scumm/module.mk index 98fce55c52..ac5d8d495e 100644 --- a/scumm/module.mk +++ b/scumm/module.mk @@ -18,13 +18,11 @@ MODULE_OBJS := \  	scumm/input.o \  	scumm/instrument.o \  	scumm/help.o \ -	scumm/logic_he.o \  	scumm/midiparser_ro.o \  	scumm/midiparser_eup.o \  	scumm/nut_renderer.o \  	scumm/object.o \  	scumm/palette.o \ -	scumm/palette_he.o \  	scumm/player_mod.o \  	scumm/player_v1.o \  	scumm/player_nes.o \ @@ -35,7 +33,6 @@ MODULE_OBJS := \  	scumm/resource_v2.o \  	scumm/resource_v3.o \  	scumm/resource_v4.o \ -	scumm/resource_v7he.o \  	scumm/room.o \  	scumm/saveload.o \  	scumm/script.o \ @@ -43,21 +40,14 @@ MODULE_OBJS := \  	scumm/script_v5.o \  	scumm/script_v6.o \  	scumm/script_v6he.o \ -	scumm/script_v7he.o \ -	scumm/script_v72he.o \ -	scumm/script_v80he.o \ -	scumm/script_v90he.o \ -	scumm/script_v100he.o \  	scumm/script_v8.o \  	scumm/scumm.o \  	scumm/sound.o \ -	scumm/sprite_he.o \  	scumm/string.o \  	scumm/usage_bits.o \  	scumm/util.o \  	scumm/vars.o \  	scumm/verbs.o \ -	scumm/wiz_he.o \  	scumm/imuse_digi/dimuse.o \  	scumm/imuse_digi/dimuse_bndmgr.o \  	scumm/imuse_digi/dimuse_codecs.o \ @@ -82,6 +72,20 @@ MODULE_OBJS := \  	scumm/smush/smush_font.o \  	scumm/thumbnail.o +ifndef DISABLE_HE +MODULE_OBJS += \ +	scumm/logic_he.o \ +	scumm/palette_he.o \ +	scumm/resource_v7he.o \ +	scumm/script_v7he.o \ +	scumm/script_v72he.o \ +	scumm/script_v80he.o \ +	scumm/script_v90he.o \ +	scumm/script_v100he.o \ +	scumm/sprite_he.o \ +	scumm/wiz_he.o +endif +  MODULE_DIRS += \  	scumm \  	scumm/imuse_digi \ diff --git a/scumm/object.cpp b/scumm/object.cpp index dcf53569d0..da4599f51e 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -340,10 +340,12 @@ int ScummEngine::findObject(int x, int y) {  			a = _objs[b].parentstate;  			b = _objs[b].parent;  			if (b == 0) { +#ifndef DISABLE_HE  				if (_heversion >= 70) {  					if (((ScummEngine_v70he *)this)->_wiz.polygonHit(_objs[i].obj_nr, x, y))  						return _objs[i].obj_nr;  				} +#endif  				if (_objs[i].x_pos <= x && _objs[i].width + _objs[i].x_pos > x &&  				    _objs[i].y_pos <= y && _objs[i].height + _objs[i].y_pos > y)  					return _objs[i].obj_nr; @@ -865,6 +867,7 @@ void ScummEngine_v6::clearDrawQueues() {  	_blastObjectQueuePos = 0;  } +#ifndef DISABLE_HE  void ScummEngine_v70he::clearDrawQueues() {  	ScummEngine_v6::clearDrawQueues(); @@ -877,7 +880,7 @@ void ScummEngine_v80he::clearDrawQueues() {  	_wiz.clearWizBuffer();  } - +#endif  void ScummEngine::clearOwnerOf(int obj) {  	int i, j; diff --git a/scumm/resource.cpp b/scumm/resource.cpp index b1cff52720..2ad0f47543 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -359,6 +359,7 @@ void ScummEngine_v7::readIndexBlock(uint32 blocktype, uint32 itemsize) {  	}  } +#ifndef DISABLE_HE  void ScummEngine_v70he::readIndexBlock(uint32 blocktype, uint32 itemsize) {  	int i;  	switch (blocktype) { @@ -379,6 +380,7 @@ void ScummEngine_v70he::readIndexBlock(uint32 blocktype, uint32 itemsize) {  		ScummEngine::readIndexBlock(blocktype, itemsize);  	}  } +#endif  void ScummEngine::readIndexBlock(uint32 blocktype, uint32 itemsize) {  	int i; diff --git a/scumm/room.cpp b/scumm/room.cpp index 3f05bfdf63..429d6fa7b9 100644 --- a/scumm/room.cpp +++ b/scumm/room.cpp @@ -519,6 +519,7 @@ void ScummEngine::initRoomSubBlocks() {  		}  	} +#ifndef DISABLE_HE  	// Polygons in HE 80+ games  	if (_heversion >= 80) {  		ptr = findResourceData(MKID('POLD'), roomptr); @@ -526,6 +527,7 @@ void ScummEngine::initRoomSubBlocks() {  			((ScummEngine_v70he *)this)->_wiz.polygonLoad(ptr);  		}  	} +#endif  	if (_PALS_offs || _CLUT_offs)  		setPalette(0); diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index 3a506129c8..6e19d9672a 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -1004,6 +1004,7 @@ void ScummEngine_v7::saveOrLoad(Serializer *s, uint32 savegameVersion) {  	_imuseDigital->saveOrLoad(s);  } +#ifndef DISABLE_HE  void ScummEngine_v70he::saveOrLoad(Serializer *s, uint32 savegameVersion) {  	ScummEngine::saveOrLoad(s, savegameVersion); @@ -1090,6 +1091,7 @@ void ScummEngine_v100he::saveOrLoad(Serializer *s, uint32 savegameVersion) {  	s->saveLoadEntries(this, HE100Entries);  } +#endif  void ScummEngine::saveLoadResource(Serializer *ser, int type, int idx) {  	byte *ptr; diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index b0fb7fb1fb..95009505a7 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -233,7 +233,7 @@ static const ScummGameSettings scumm_settings[] = {  	{"fbdemo", "Fatty Bear's Birthday Surprise (DOS Demo)", GID_FBEAR, 6, 61, MDT_ADLIB | MDT_NATIVE,  	 GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, Common::kPlatformPC, 0, 0}, -#ifndef __PALM_OS__ +#ifndef DISABLE_HE  	{"activity", "Putt-Putt & Fatty Bear's Activity Pack", GID_HEGAME, 6, 70, MDT_NONE,  	 GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformWindows, 0, 0}, @@ -1285,6 +1285,7 @@ ScummEngine_v6::ScummEngine_v6(GameDetector *detector, OSystem *syst, const Scum  	VAR_TIMEDATE_SECOND = 0xFF;  } +#ifndef DISABLE_HE  ScummEngine_v70he::ScummEngine_v70he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16])   : ScummEngine_v60he(detector, syst, gs, md5sum) {  	 _win32ResExtractor = new Win32ResExtractor(this); @@ -1339,7 +1340,7 @@ ScummEngine_v90he::~ScummEngine_v90he() {  		delete _logicHE;  	}  } - +#endif  ScummEngine_v7::ScummEngine_v7(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs, uint8 md5sum[16])   : ScummEngine_v6(detector, syst, gs, md5sum) { @@ -1764,6 +1765,7 @@ void ScummEngine_v60he::scummInit() {  		setCursorHotspot(16, 16);  } +#ifndef DISABLE_HE  void ScummEngine_v72he::scummInit() {  	ScummEngine_v60he::scummInit(); @@ -1816,6 +1818,7 @@ void ScummEngine_v99he::scummInit() {  	memcpy(ah->data, _gameName.c_str(), len);  } +#endif  void ScummEngine::setupMusic(int midi) {  	_midiDriver = MidiDriver::detectMusicDriver(midi); @@ -1918,10 +1921,12 @@ int ScummEngine::go() {  		args[0] = _bootParam;	  		_saveLoadFlag = 0; +#ifndef DISABLE_HE  		if (_heversion >= 98) {  			((ScummEngine_v90he *)this)->_logicHE->initOnce();  			((ScummEngine_v90he *)this)->_logicHE->beforeBootScript();  		} +#endif  		if (_gameId == GID_MANIAC && _demoMode)  			runScript(9, 0, 0, args);  		else @@ -1982,10 +1987,11 @@ int ScummEngine::scummLoop(int delta) {  	// that it will be in a different state each time you run the program.  	_rnd.getRandomNumber(2); +#ifndef DISABLE_HE  	if (_heversion >= 98) {  		((ScummEngine_v90he *)this)->_logicHE->startOfFrame();  	} - +#endif  	if (_version > 2) {  		VAR(VAR_TMR_1) += delta;  		VAR(VAR_TMR_2) += delta; @@ -2199,10 +2205,12 @@ load_game:  		if (_version >= 7)  			redrawVerbs(); +#ifndef DISABLE_HE  		if (_heversion >= 90) {  			((ScummEngine_v90he *)this)->spritesBlitToScreen();  			((ScummEngine_v90he *)this)->spritesSortActiveSprites();  		} +#endif  		setActorRedrawFlags();  		resetActorBgs(); @@ -2256,12 +2264,14 @@ load_game:  	/* show or hide mouse */  	_system->showMouse(_cursor.state > 0); +#ifndef DISABLE_HE  	if (_heversion >= 90) {  		((ScummEngine_v90he *)this)->spritesUpdateImages();  	}  	if (_heversion >= 98) {  		((ScummEngine_v90he *)this)->_logicHE->endOfFrame();  	} +#endif  	if (VAR_TIMER != 0xFF)  		VAR(VAR_TIMER) = 0; @@ -2856,7 +2866,7 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {  		break;  	case 6:  		switch (game.heversion) { -#ifndef __PALM_OS__ +#ifndef DISABLE_HE  		case 100:  			engine = new ScummEngine_v100he(detector, syst, game, md5sum);  			break; | 
