[Scummvm-git-logs] scummvm master -> 2a440582b9cf503866f594eeac03fb2df0112168

dreammaster noreply at scummvm.org
Sun Apr 26 07:30:46 UTC 2026


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
039e0803a6 MADS: FOREST: Skeleton engine
3eba4c03a3 MADS: PHANTOM: Correct detection GUIO flags
2a440582b9 MADS: PHANTOM: Correct detection entry MD5s


Commit: 039e0803a60b7a5b7a46752b2044bff3129181d2
    https://github.com/scummvm/scummvm/commit/039e0803a60b7a5b7a46752b2044bff3129181d2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-04-26T17:30:36+10:00

Commit Message:
MADS: FOREST: Skeleton engine

Changed paths:
  A engines/mads/madsv2/forest/forest.cpp
  A engines/mads/madsv2/forest/forest.h
  R engines/mads/forest/forest_scenes.cpp
  R engines/mads/forest/forest_scenes.h
  R engines/mads/forest/game_forest.cpp
  R engines/mads/forest/game_forest.h
  R engines/mads/forest/globals_forest.cpp
  R engines/mads/forest/globals_forest.h
    engines/mads/core/game.cpp
    engines/mads/core/scene.cpp
    engines/mads/core/scene_data.cpp
    engines/mads/metaengine.cpp
    engines/mads/module.mk


diff --git a/engines/mads/core/game.cpp b/engines/mads/core/game.cpp
index bd9af32443c..f15adaca6e4 100644
--- a/engines/mads/core/game.cpp
+++ b/engines/mads/core/game.cpp
@@ -36,7 +36,6 @@
 #include "mads/nebular/game_nebular.h"
 #ifdef ENABLE_MADSV2
 #include "mads/dragonsphere/game_dragonsphere.h"
-#include "mads/forest/game_forest.h"
 #endif
 
 namespace MADS {
@@ -48,10 +47,6 @@ Game *Game::init(RexNebularEngine *vm) {
 #ifdef ENABLE_MADSV2
 	case GType_Dragonsphere:
 		return new Dragonsphere::GameDragonsphere(vm);
-	case GType_Phantom:
-		return nullptr; // new Phantom::GamePhantom(vm);
-	case GType_Forest:
-		return new Forest::GameForest(vm);
 #endif
 	default:
 		error("Game::init(): Unknown game");
diff --git a/engines/mads/core/scene.cpp b/engines/mads/core/scene.cpp
index 3e256eaf6a6..deb5a105690 100644
--- a/engines/mads/core/scene.cpp
+++ b/engines/mads/core/scene.cpp
@@ -27,7 +27,6 @@
 #include "mads/nebular/nebular_scenes.h"
 #ifdef ENABLE_MADSV2
 #include "mads/dragonsphere/dragonsphere_scenes.h"
-#include "mads/forest/forest_scenes.h"
 #endif
 
 namespace MADS {
@@ -134,12 +133,6 @@ void Scene::loadSceneLogic() {
 	case GType_Dragonsphere:
 		_sceneLogic = Dragonsphere::SceneFactory::createScene(_vm);
 		break;
-	case GType_Phantom:
-		_sceneLogic = nullptr;// Phantom::SceneFactory::createScene(_vm);
-		break;
-	case GType_Forest:
-		_sceneLogic = Forest::SceneFactory::createScene(_vm);
-		break;
 #endif
 	default:
 		error("Scene logic: Unknown game");
diff --git a/engines/mads/core/scene_data.cpp b/engines/mads/core/scene_data.cpp
index 99123f739a4..6cc71b32357 100644
--- a/engines/mads/core/scene_data.cpp
+++ b/engines/mads/core/scene_data.cpp
@@ -28,7 +28,6 @@
 #include "mads/nebular/nebular_scenes.h"
 #ifdef ENABLE_MADSV2
 #include "mads/dragonsphere/dragonsphere_scenes.h"
-#include "mads/forest/forest_scenes.h"
 #endif
 
 namespace MADS {
@@ -120,10 +119,6 @@ SceneInfo *SceneInfo::init(RexNebularEngine *vm) {
 #ifdef ENABLE_MADSV2
 	case GType_Dragonsphere:
 		return new Dragonsphere::SceneInfoDragonsphere(vm);
-	case GType_Phantom:
-		return nullptr; // new Phantom::SceneInfoPhantom(vm);
-	case GType_Forest:
-		return new Forest::SceneInfoForest(vm);
 #endif
 	default:
 		error("SceneInfo: Unknown game");
diff --git a/engines/mads/forest/forest_scenes.cpp b/engines/mads/forest/forest_scenes.cpp
deleted file mode 100644
index c2d104a016c..00000000000
--- a/engines/mads/forest/forest_scenes.cpp
+++ /dev/null
@@ -1,175 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "common/config-manager.h"
-#include "mads/nebular/nebular.h"
-#include "mads/core/compression.h"
-#include "mads/core/resources.h"
-#include "mads/core/scene.h"
-#include "mads/forest/game_forest.h"
-#include "mads/forest/forest_scenes.h"
-
-namespace MADS {
-namespace Forest {
-
-SceneLogic *SceneFactory::createScene(RexNebularEngine *vm) {
-	Scene &scene = vm->_game->_scene;
-
-	// TODO
-	//scene.addActiveVocab(NOUN_DROP);
-
-	switch (scene._nextSceneId) {
-	// Scene group #1 (Cornelius's House inside/outside)
-	case 101:	// Cornelius's House inside
-		return new DummyScene(vm);  // TODO
-	case 103:	// Forest, tree
-		return new DummyScene(vm);  // TODO
-	case 104:	// Bedroom
-		return new DummyScene(vm);  // TODO
-	case 106:	// Cornelius's House outside
-		return new DummyScene(vm);	// TODO
-	case 107:	// Tree base
-		return new DummyScene(vm);	// TODO
-	case 199:	// Book
-		return new DummyScene(vm);	// TODO
-
-	// Scene group #2 (Dapplewood Forest Areas 1-4)
-	case 201:	// 
-		return new DummyScene(vm);	// TODO
-	case 203:	// 
-		return new DummyScene(vm);	// TODO
-	case 204:	// 
-		return new DummyScene(vm);	// TODO
-	case 205:	// 
-		return new DummyScene(vm);	// TODO
-	case 210:	// 
-		return new DummyScene(vm);	// TODO
-	case 211:	// 
-		return new DummyScene(vm);	// TODO
-	case 220:	// 
-		return new DummyScene(vm);	// TODO
-	case 221:	// 
-		return new DummyScene(vm);	// TODO
-
-	// Scene group #3 (Dapplewood Nexus)
-	case 301:	// 
-		return new DummyScene(vm);	// TODO
-	case 302:	// 
-		return new DummyScene(vm);	// TODO
-	case 303:	// 
-		return new DummyScene(vm);	// TODO
-	case 304:	// 
-		return new DummyScene(vm);	// TODO
-	case 305:	// 
-		return new DummyScene(vm);	// TODO
-	case 306:	// 
-		return new DummyScene(vm);	// TODO
-	case 307:	// 
-		return new DummyScene(vm);	// TODO
-	case 308:	//
-		return new DummyScene(vm);	// TODO
-	case 321:	//
-		return new DummyScene(vm);	// TODO
-	case 322:	//
-		return new DummyScene(vm);	// TODO
-
-	// Scene group #4 (Yellow Dragons' Lair)
-	case 401:	// 
-		return new DummyScene(vm);	// TODO
-	case 402:	// 
-		return new DummyScene(vm);	// TODO
-	case 403:	// 
-		return new DummyScene(vm);	// TODO
-	case 404:	// 
-		return new DummyScene(vm);	// TODO
-	case 405:	// 
-		return new DummyScene(vm);	// TODO
-	case 420:	// 
-		return new DummyScene(vm);	// TODO
-
-	// Scene group #5 (Meadow & Backtracking)
-	case 501:	// 
-		return new DummyScene(vm);	// TODO
-	case 503:	// 
-		return new DummyScene(vm);	// TODO
-	case 509:	// 
-		return new DummyScene(vm);	// TODO
-	case 510:	// 
-		return new DummyScene(vm);	// TODO
-	case 520:	// 
-		return new DummyScene(vm);	// TODO
-
-	default:
-		error("Invalid scene %d called", scene._nextSceneId);
-	}
-}
-
-/*------------------------------------------------------------------------*/
-
-ForestScene::ForestScene(RexNebularEngine *vm) : SceneLogic(vm),
-		_globals(static_cast<GameForest *>(vm->_game)->_globals),
-		_game(*static_cast<GameForest *>(vm->_game)),
-		_action(vm->_game->_scene._action) {
-}
-
-Common::Path ForestScene::formAnimName(char sepChar, int suffixNum) {
-	return Resources::formatName(_scene->_currentSceneId, sepChar, suffixNum,
-		EXT_NONE, "");
-}
-
-/*------------------------------------------------------------------------*/
-
-void SceneInfoForest::loadCodes(BaseSurface &depthSurface, int variant) {
-	Common::String ext = Common::String::format(".WW%d", variant);
-	Common::Path fileName = Resources::formatName(RESPREFIX_RM, _sceneId, ext);
-	if (!Common::File::exists(fileName))
-		return;
-
-	File f(fileName);
-	MadsPack codesPack(&f);
-	Common::SeekableReadStream *stream = codesPack.getItemStream(0);
-
-	loadCodes(depthSurface, stream);
-
-	delete stream;
-	f.close();
-}
-
-void SceneInfoForest::loadCodes(BaseSurface &depthSurface, Common::SeekableReadStream *stream) {
-	byte *destP = (byte *)depthSurface.getPixels();
-	byte *walkMap = new byte[stream->size()];
-	stream->read(walkMap, stream->size());
-
-	for (int y = 0; y < 156; ++y) {
-		for (int x = 0; x < 320; ++x) {
-			int offset = x + (y * 320);
-			if ((walkMap[offset / 8] << (offset % 8)) & 0x80)
-				*destP++ = 1;		// walkable
-			else
-				*destP++ = 0;
-		}
-	}
-
-	delete[] walkMap;
-}
-
-} // namespace Forest
-} // namespace MADS
diff --git a/engines/mads/forest/forest_scenes.h b/engines/mads/forest/forest_scenes.h
deleted file mode 100644
index 2ea438790a8..00000000000
--- a/engines/mads/forest/forest_scenes.h
+++ /dev/null
@@ -1,235 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef MADS_FOREST_SCENES_H
-#define MADS_FOREST_SCENES_H
-
-#include "mads/core/scene.h"
-#include "mads/forest/game_forest.h"
-#include "mads/forest/globals_forest.h"
-
-namespace MADS {
-namespace Forest {
-
-enum Verb {
-	VERB_LOOK = 0x3,
-	VERB_TAKE = 0x4,
-	VERB_PUSH = 0x5,
-	VERB_OPEN = 0x6,
-	VERB_PUT = 0x7,
-	VERB_TALK_TO = 0x8,
-	VERB_GIVE = 0x9,
-	VERB_PULL = 0xa,
-	VERB_CLOSE = 0xb,
-	VERB_THROW = 0xc,
-	VERB_WALK_TO = 0xd,
-	VERB_ATTACK = 0x43,
-	VERB_CARVE_UP = 0x4c,
-	VERB_CLICK_ON = 0x4e,
-	VERB_CLIMB_DOWN = 0x50,
-	VERB_CLIMB_UP = 0x51,
-	VERB_DOWN_PAGE = 0x5a,
-	VERB_EAT = 0x5b,
-	VERB_INVOKE = 0x6c,
-	VERB_LOOK_AT = 0x72,
-	VERB_MAKE_NOISE = 0x73,
-	VERB_POLISH = 0x80,
-	VERB_RUB = 0x88,
-	VERB_THRUST = 0x98,
-	VERB_TIE = 0x99,
-	VERB_UP_PAGE = 0x9c,
-	VERB_USE = 0x9d,
-	VERB_WALK = 0x9f,
-	VERB_WALK_DOWN = 0xa0,
-	VERB_WEAR = 0xa1
-};
-
-enum Noun {
-	NOUN_GAME = 0x1,
-	NOUN_QSAVE = 0x2,
-	NOUN_OWL_TREE = 0x40,
-	NOUN_ABI_BUBBLE = 0x41,
-	NOUN_ALL_BUBBLE = 0x42,
-	NOUN_BEDROOM = 0x44,
-	NOUN_BIRD_FIGURINE = 0x45,
-	NOUN_BIRDCALL = 0x46,
-	NOUN_BOOK = 0x47,
-	NOUN_BOOKCASE = 0x48,
-	NOUN_BOOKS = 0x49,
-	NOUN_BOOKSHELF = 0x4a,
-	NOUN_BUSH = 0x4b,
-	NOUN_CHICORY = 0x4d,
-	NOUN_CLIFF = 0x4f,
-	NOUN_COMFREY = 0x52,
-	NOUN_DANDELION = 0x53,
-	NOUN_DOOR = 0x54,
-	NOUN_DOOR_1 = 0x55,
-	NOUN_DOOR_2 = 0x56,
-	NOUN_DOOR_3 = 0x57,
-	NOUN_DOOR_4 = 0x58,
-	NOUN_DOOR_5 = 0x59,
-	NOUN_EDGE_OF_CLIFF = 0x5c,
-	NOUN_ELM_LEAVES = 0x5d,
-	NOUN_EXIT_JOURNAL = 0x5e,
-	NOUN_EYEBRIGHT = 0x5f,
-	NOUN_FEATHER = 0x60,
-	NOUN_FIVE = 0x61,
-	NOUN_FLOOR = 0x62,
-	NOUN_FLOWERS = 0x63,
-	NOUN_FOREST = 0x64,
-	NOUN_FORKED_STICK = 0x65,
-	NOUN_FOUR = 0x66,
-	NOUN_FOXGLOVE = 0x67,
-	NOUN_FROG = 0x68,
-	NOUN_GEARS = 0x69,
-	NOUN_GROUND = 0x6a,
-	NOUN_HOLE = 0x6b,
-	NOUN_IVY_LEAF = 0x6d,
-	NOUN_JOURNAL = 0x6e,
-	NOUN_LABORATORY = 0x6f,
-	NOUN_LEAVES = 0x70,
-	NOUN_LILY_PAD = 0x71,
-	NOUN_MAP = 0x74,
-	NOUN_MARSH = 0x75,
-	NOUN_MINT = 0x76,
-	NOUN_MOSS = 0x77,
-	NOUN_MUSHROOM = 0x78,
-	NOUN_NEEDLE = 0x79,
-	NOUN_NOTHING = 0x7a,
-	NOUN_ONE = 0x7b,
-	NOUN_OVERHANGING_GRASS = 0x7c,
-	NOUN_PEBBLES = 0x7d,
-	NOUN_PICK_UP = 0x7e,
-	NOUN_PLANT = 0x7f,
-	NOUN_POND = 0x81,
-	NOUN_POSTER = 0x82,
-	NOUN_PRIMROSE = 0x83,
-	NOUN_REEDS = 0x84,
-	NOUN_RIVER = 0x85,
-	NOUN_ROCKS = 0x86,
-	NOUN_ROPE = 0x87,
-	NOUN_RUBBER_BAND = 0x89,
-	NOUN_SANCTUARY_WOODS = 0x8a,
-	NOUN_SHIELDSTONE = 0x8b,
-	NOUN_SIGNET_RING = 0x8c,
-	NOUN_SIX = 0x8d,
-	NOUN_SNAPDRAGON = 0x8e,
-	NOUN_SPIDER_SILK = 0x8f,
-	NOUN_STAIRS = 0x90,
-	NOUN_STICKS = 0x91,
-	NOUN_SUNFLOWER = 0x92,
-	NOUN_SWORD = 0x93,
-	NOUN_TABLE = 0x94,
-	NOUN_TELESCOPE = 0x95,
-	NOUN_THISTLE = 0x96,
-	NOUN_THREE = 0x97,
-	NOUN_TWINE = 0x9a,
-	NOUN_TWO = 0x9b,
-	NOUN_VINE_WEED = 0x9e,
-	NOUN_WEASEL = 0xa2,
-	NOUN_WEB = 0xa3,
-	NOUN_WOOD = 0xa4,
-	NOUN_WOODS = 0xa5,
-	NOUN_WRENCH = 0xa6,
-	NOUN_Y_STICK = 0xa7,
-	NOUN_ABIGAIL = 0xa8,
-	NOUN_EDGAR = 0xa9,
-	NOUN_RUSSEL = 0xaa,
-	NOUN_SNAPDRAGON2 = 0xab,
-	NOUN_LUNGWORT = 0xac,
-	NOUN_GRASS = 0xad,
-	NOUN_FWT = 0xae,
-	NOUN_DRAGON1 = 0xaf,
-	NOUN_DRAGON2 = 0xb0,
-	NOUN_NEST = 0xb1,
-	NOUN_PAINT_CAN = 0xb2,
-	NOUN_DAM = 0xb3,
-	NOUN_BROWN = 0xb4,
-	NOUN_TURTLE = 0xb5,
-	NOUN_DRAGONFLY = 0xb6,
-	NOUN_FENWICK = 0xb7,
-	NOUN_BLUE_BIRD = 0xb8,
-	NOUN_BLACK_BIRD = 0xb9,
-	NOUN_LEVER = 0xba,
-	NOUN_ROCK = 0xbb,
-	NOUN_USED_IT = 0xbc,
-	NOUN_TAIL = 0xbd
-};
-
-class SceneFactory {
-public:
-	static SceneLogic *createScene(RexNebularEngine *vm);
-};
-
-/**
- * Specialized base class for Forest game scenes
- */
-class ForestScene : public SceneLogic {
-protected:
-	ForestGlobals &_globals;
-	GameForest &_game;
-	MADSAction &_action;
-
-	/**
-	 * Forms an animation resource name
-	 */
-	Common::Path formAnimName(char sepChar, int suffixNum);
-
-	/**
-	 * Plays appropriate sound for entering varous rooms
-	 */
-	void lowRoomsEntrySound();
-public:
-	/**
-	 * Constructor
-	 */
-	ForestScene(RexNebularEngine *vm);
-};
-
-class SceneInfoForest : public SceneInfo {
-	friend class SceneInfo;
-protected:
-	void loadCodes(BaseSurface &depthSurface, int variant) override;
-
-	void loadCodes(BaseSurface &depthSurface, Common::SeekableReadStream *stream) override;
-
-	/**
-	* Constructor
-	*/
-	SceneInfoForest(RexNebularEngine *vm) : SceneInfo(vm) {}
-};
-
-// TODO: Temporary, remove once implemented properly
-class DummyScene : public ForestScene {
-public:
-	DummyScene(RexNebularEngine *vm) : ForestScene(vm) {
-		warning("Unimplemented scene");
-	}
-
-	void setup() override {}
-	void enter() override {}
-	void actions() override {}
-};
-
-} // namespace Forest
-} // namespace MADS
-
-#endif
diff --git a/engines/mads/forest/game_forest.cpp b/engines/mads/forest/game_forest.cpp
deleted file mode 100644
index 4260c8358f5..00000000000
--- a/engines/mads/forest/game_forest.cpp
+++ /dev/null
@@ -1,159 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "common/config-manager.h"
-#include "mads/nebular/nebular.h"
-#include "mads/core/game.h"
-#include "mads/core/screen.h"
-#include "mads/core/msurface.h"
-#include "mads/forest/game_forest.h"
-//#include "mads/nebular/dialogs_nebular.h"
-#include "mads/forest/globals_forest.h"
-//#include "mads/forest/forest_scenes.h"
-
-namespace MADS {
-namespace Forest {
-
-GameForest::GameForest(RexNebularEngine *vm)
-	: Game(vm) {
-	_surface = new MSurface(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT);
-	_storyMode = STORYMODE_NAUGHTY;
-}
-
-void GameForest::startGame() {
-	_scene._priorSceneId = 0;
-	_scene._currentSceneId = -1;
-	_scene._nextSceneId = 101;
-
-	initializeGlobals();
-}
-
-void GameForest::initializeGlobals() {
-	//int count, count2;
-	//int bad;
-
-	_globals.reset();
-	//_globals[kTalkInanimateCount] = 8;
-
-	/* Section #1 variables */
-	// TODO
-
-	/* Section #2 variables */
-	// TODO
-
-	/* Section #3 variables */
-	// TODO
-
-	/* Section #4 variables */
-	// TODO
-
-	/* Section #5 variables */
-	// TODO
-
-	/* Section #6 variables */
-	// TODO
-
-	/* Section #9 variables */
-	// TODO
-
-	_player._facing = FACING_NORTH;
-	_player._turnToFacing = FACING_NORTH;
-
-	//Player::preloadSequences("RXM", 1);
-	//Player::preloadSequences("ROX", 1);
-}
-
-void GameForest::setSectionHandler() {
-	delete _sectionHandler;
-
-	switch (_sectionNumber) {
-	case 1:
-		_sectionHandler = new Section1Handler(_vm);
-		break;
-	case 2:
-		_sectionHandler = new Section2Handler(_vm);
-		break;
-	case 3:
-		_sectionHandler = new Section3Handler(_vm);
-		break;
-	case 4:
-		_sectionHandler = new Section4Handler(_vm);
-		break;
-	case 5:
-		_sectionHandler = new Section5Handler(_vm);
-		break;
-	case 6:
-		_sectionHandler = new Section6Handler(_vm);
-		break;
-	case 7:
-		_sectionHandler = new Section7Handler(_vm);
-		break;
-	case 8:
-		_sectionHandler = new Section8Handler(_vm);
-		break;
-	default:
-		break;
-	}
-}
-
-void GameForest::checkShowDialog() {
-	// TODO: Copied from Nebular
-	if (_vm->_dialogs->_pendingDialog && _player._stepEnabled && !_globals[5]) {
-		_player.releasePlayerSprites();
-		_vm->_dialogs->showDialog();
-		_vm->_dialogs->_pendingDialog = DIALOG_NONE;
-	}
-}
-
-void GameForest::doObjectAction() {
-	// TODO: Copied from Nebular
-	//Scene &scene = _scene;
-	MADSAction &action = _scene._action;
-	//Dialogs &dialogs = *_vm->_dialogs;
-	//int id;
-
-	action._inProgress = false;
-}
-
-void GameForest::unhandledAction() {
-	// TODO
-}
-
-void GameForest::step() {
-	if (_player._visible && _player._stepEnabled && !_player._moving &&
-		(_player._facing == _player._turnToFacing)) {
-
-		// TODO
-	}
-
-}
-
-void GameForest::synchronize(Common::Serializer &s, bool phase1) {
-	Game::synchronize(s, phase1);
-
-	// TODO: Copied from Nebular
-	if (!phase1) {
-		_globals.synchronize(s);
-	}
-}
-
-} // namespace Forest
-} // namespace MADS
diff --git a/engines/mads/forest/game_forest.h b/engines/mads/forest/game_forest.h
deleted file mode 100644
index bca5f938d9d..00000000000
--- a/engines/mads/forest/game_forest.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef MADS_GAME_FOREST_H
-#define MADS_GAME_FOREST_H
-
-#include "mads/core/game.h"
-#include "mads/core/globals.h"
-#include "mads/forest/globals_forest.h"
-
-namespace MADS {
-namespace Forest {
-
-// TODO: Adapt for Forest's difficulty setting
-enum StoryMode { STORYMODE_NAUGHTY = 1, STORYMODE_NICE = 2 };
-
-enum InventoryObject {
-	OBJ_NONE = -1,
-	OBJ_GEARS = 0,
-	OBJ_RUBBER_BAND = 1,
-	OBJ_FEATHER = 2,
-	OBJ_NEEDLE = 3,
-	OBJ_LILY_PAD = 4,
-	OBJ_PEBBLES = 5,
-	OBJ_REEDS = 6,
-	OBJ_STICKS = 7,
-	OBJ_TWINE = 8,
-	OBJ_VINE_WEED = 9,
-	OBJ_WEB = 10,
-	OBJ_WOOD = 11,
-	OBJ_LEAVES = 12,
-	OBJ_WRENCH = 13,
-	OBJ_Y_STICK = 14,
-	OBJ_FORKED_STICK = 15
-};
-
-class GameForest : public Game {
-	friend class Game;
-protected:
-	GameForest(RexNebularEngine *vm);
-
-	void startGame() override;
-
-	void initializeGlobals() override;
-
-	void setSectionHandler() override;
-
-	void checkShowDialog() override;
-public:
-	ForestGlobals _globals;
-	StoryMode _storyMode;
-
-	Globals &globals() override { return _globals; }
-
-	void doObjectAction() override;
-
-	void unhandledAction() override;
-
-	void step() override;
-
-	void synchronize(Common::Serializer &s, bool phase1) override;
-};
-
-
-class Section1Handler : public SectionHandler {
-public:
-	Section1Handler(RexNebularEngine *vm) : SectionHandler(vm) {}
-
-	// TODO: Properly implement handler methods
-	void preLoadSection() override {}
-	void sectionPtr2() override {}
-	void postLoadSection() override {}
-};
-
-// TODO: Properly implement handler classes
-typedef Section1Handler Section2Handler;
-typedef Section1Handler Section3Handler;
-typedef Section1Handler Section4Handler;
-typedef Section1Handler Section5Handler;
-typedef Section1Handler Section6Handler;
-typedef Section1Handler Section7Handler;
-typedef Section1Handler Section8Handler;
-
-} // namespace Forest
-} // namespace MADS
-
-#endif
diff --git a/engines/mads/forest/globals_forest.cpp b/engines/mads/forest/globals_forest.cpp
deleted file mode 100644
index 9e6e6565351..00000000000
--- a/engines/mads/forest/globals_forest.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "mads/forest/globals_forest.h"
-
-namespace MADS {
-namespace Forest {
-
-ForestGlobals::ForestGlobals()
-	: Globals() {
-	// Initialize lists
-	resize(140);
-	_spriteIndexes.resize(30);
-	_sequenceIndexes.resize(30);
-	_animationIndexes.resize(30);
-}
-
-void ForestGlobals::synchronize(Common::Serializer &s) {
-	Globals::synchronize(s);
-
-	_spriteIndexes.synchronize(s);
-	_sequenceIndexes.synchronize(s);
-	_animationIndexes.synchronize(s);
-}
-
-} // namespace Forest
-} // namespace MADS
diff --git a/engines/mads/madsv2/forest/forest.cpp b/engines/mads/madsv2/forest/forest.cpp
new file mode 100644
index 00000000000..af0c9cc5913
--- /dev/null
+++ b/engines/mads/madsv2/forest/forest.cpp
@@ -0,0 +1,175 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "engines/util.h"
+#include "mads/madsv2/console.h"
+#include "mads/madsv2/forest/forest.h"
+#include "mads/madsv2/core/game.h"
+#include "mads/madsv2/core/imath.h"
+#include "mads/madsv2/core/kernel.h"
+#include "mads/madsv2/core/screen.h"
+
+namespace MADS {
+namespace MADSV2 {
+namespace Forest {
+
+Common::Error ForestEngine::run() {
+	initGraphics(320, 200);
+	_screen = new Graphics::Screen();
+	scr_live.data = (byte *)_screen->getPixels();
+
+	// Create a debugger console
+	setDebugger(new Console());
+
+	// Set up sound manager
+	_soundManager = nullptr; // new ForestSoundManager(_mixer, _soundFlag);
+	//_soundManager->validate();
+
+	// Run the game
+	// TODO
+
+	return Common::kNoError;
+}
+
+void ForestEngine::global_init_code() {
+
+}
+
+void ForestEngine::section_music(int section_num) {
+
+}
+
+void ForestEngine::global_object_sprite() {
+
+}
+
+void ForestEngine::stop_walker_basic() {
+	int random;
+	int count;
+	int how_many;
+
+	random = imath_random(1, 30000);
+
+	switch (player.facing) {
+	case FACING_SOUTH:
+		if (random < 500) {
+			how_many = imath_random(4, 10);
+			for (count = 0; count < how_many; count++) {
+				player_add_stop_walker((random < 250) ? 1 : 2, 0);
+			}
+		} else if (random < 750) {
+			for (count = 0; count < 4; count++) {
+				player_add_stop_walker(1, 0);
+			}
+
+			player_add_stop_walker(0, 0);
+
+			for (count = 0; count < 4; count++) {
+				player_add_stop_walker(2, 0);
+			}
+
+			player_add_stop_walker(0, 0);
+		}
+		break;
+
+	case FACING_SOUTHEAST:
+	case FACING_SOUTHWEST:
+	case FACING_NORTHEAST:
+	case FACING_NORTHWEST:
+		if (random < 150) {
+			player_add_stop_walker(-1, 0);
+			player_add_stop_walker(1, 0);
+			for (count = 0; count < 6; count++) {
+				player_add_stop_walker(0, 0);
+			}
+		}
+		break;
+
+	case FACING_EAST:
+	case FACING_WEST:
+		if (random < 250) {
+			player_add_stop_walker(-1, 0);
+			how_many = imath_random(2, 6);
+			for (count = 0; count < how_many; count++) {
+				player_add_stop_walker(2, 0);
+			}
+			player_add_stop_walker(1, 0);
+			player_add_stop_walker(0, 0);
+			player_add_stop_walker(0, 0);
+		} else if (random < 500) {
+			WRITE_LE_UINT32(&global[walker_timing], kernel.clock);
+		}
+		break;
+
+	case FACING_NORTH:
+		if (random < 250) {
+			player_add_stop_walker(-1, 0);
+			how_many = imath_random(3, 7);
+			for (count = 0; count < how_many; count++) {
+				player_add_stop_walker(2, 0);
+			}
+			player_add_stop_walker(1, 0);
+			player_add_stop_walker(0, 0);
+		}
+		break;
+
+	}
+}
+
+void ForestEngine::stop_walker_tricks() {
+
+}
+
+void ForestEngine::global_section_constructor() {
+
+}
+
+void ForestEngine::syncRoom(Common::Serializer &s) {
+
+}
+
+void ForestEngine::global_daemon_code() {
+
+}
+
+void ForestEngine::global_pre_parser_code() {
+
+}
+
+void ForestEngine::global_parser_code() {
+
+}
+
+void ForestEngine::global_error_code() {
+
+}
+
+void ForestEngine::global_room_init() {
+
+}
+
+void ForestEngine::global_sound_driver() {
+
+}
+
+} // namespace Forest
+} // namespace MADSV2
+} // namespace MADS
diff --git a/engines/mads/forest/globals_forest.h b/engines/mads/madsv2/forest/forest.h
similarity index 53%
rename from engines/mads/forest/globals_forest.h
rename to engines/mads/madsv2/forest/forest.h
index f0571ea179a..577492d4ef8 100644
--- a/engines/mads/forest/globals_forest.h
+++ b/engines/mads/madsv2/forest/forest.h
@@ -19,40 +19,42 @@
  *
  */
 
-#ifndef MADS_GLOBALS_FOREST_H
-#define MADS_GLOBALS_FOREST_H
+#ifndef MADS_FOREST_FOREST_H
+#define MADS_FOREST_FOREST_H
 
-#include "mads/core/game.h"
-#include "mads/core/resources.h"
+#include "mads/madsv2/engine.h"
 
 namespace MADS {
+namespace MADSV2 {
 namespace Forest {
 
-enum GlobalId {
-	// Global variables
+class ForestEngine : public MADSV2Engine {
+private:
+	static void global_object_sprite();
+	static void stop_walker_basic();
+	static void stop_walker_tricks();
 
-	kWalkerTiming           = 0,
-	kWalkerTiming2			= 1
-	};
-
-class ForestGlobals : public Globals {
-public:
-	SynchronizedList _spriteIndexes;
-	SynchronizedList _sequenceIndexes;
-	SynchronizedList _animationIndexes;
 public:
-	/**
-	 * Constructor
-	 */
-	ForestGlobals();
-
-	/**
-	* Synchronize the globals data
-	*/
-	virtual void synchronize(Common::Serializer &s);
+	ForestEngine(OSystem *syst, const MADSGameDescription *gameDesc) :
+		MADSV2Engine(syst, gameDesc) {}
+	~ForestEngine() override {}
+
+	Common::Error run() override;
+	void syncRoom(Common::Serializer &s) override;
+
+	void global_init_code() override;
+	void section_music(int section_num) override;
+	void global_section_constructor() override;
+	void global_daemon_code() override;
+	void global_pre_parser_code() override;
+	void global_parser_code() override;
+	void global_error_code() override;
+	void global_room_init() override;
+	void global_sound_driver() override;
 };
 
 } // namespace Forest
+} // namespace MADSV2
 } // namespace MADS
 
 #endif
diff --git a/engines/mads/metaengine.cpp b/engines/mads/metaengine.cpp
index b9f8ae1133c..f4e44fa2153 100644
--- a/engines/mads/metaengine.cpp
+++ b/engines/mads/metaengine.cpp
@@ -41,6 +41,7 @@
 #include "mads/detection.h"
 #ifdef ENABLE_MADSV2
 #include "mads/madsv2/phantom/phantom.h"
+#include "mads/madsv2/forest/forest.h"
 #endif
 
 #define MAX_SAVES 99
@@ -218,6 +219,8 @@ Common::Error MADSMetaEngine::createInstance(OSystem *syst, Engine **engine, con
 #ifdef ENABLE_MADSV2
 	if (desc->gameID == MADS::GType_Phantom)
 		*engine = new MADS::MADSV2::Phantom::PhantomEngine(syst, desc);
+	else if (desc->gameID == MADS::GType_Forest)
+		*engine = new MADS::MADSV2::Forest::ForestEngine(syst, desc);
 	else
 #endif
 
diff --git a/engines/mads/module.mk b/engines/mads/module.mk
index b7103b34e63..1f6715cbad8 100644
--- a/engines/mads/module.mk
+++ b/engines/mads/module.mk
@@ -58,9 +58,6 @@ MODULE_OBJS += \
 	dragonsphere/dragonsphere_scenes.o \
 	dragonsphere/dragonsphere_scenes1.o \
 	dragonsphere/globals_dragonsphere.o \
-	forest/game_forest.o \
-	forest/forest_scenes.o \
-	forest/globals_forest.o \
 	madsv2/console.o \
 	madsv2/engine.o \
 	madsv2/core/anim.o \
@@ -181,7 +178,8 @@ MODULE_OBJS += \
 	madsv2/phantom/main_menu.o \
 	madsv2/phantom/menus.o \
 	madsv2/phantom/main.o \
-	madsv2/phantom/sound_phantom.o
+	madsv2/phantom/sound_phantom.o \
+	madsv2/forest/forest.o
 endif
 
 # This module can be built as a plugin


Commit: 3eba4c03a335bf3dbf5dab61fe8f18368eb7c581
    https://github.com/scummvm/scummvm/commit/3eba4c03a335bf3dbf5dab61fe8f18368eb7c581
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-04-26T17:30:36+10:00

Commit Message:
MADS: PHANTOM: Correct detection GUIO flags

Changed paths:
    engines/mads/detection_tables.h


diff --git a/engines/mads/detection_tables.h b/engines/mads/detection_tables.h
index 0deb1970163..617fd8f8eb0 100644
--- a/engines/mads/detection_tables.h
+++ b/engines/mads/detection_tables.h
@@ -156,7 +156,7 @@ static const MADSGameDescription gameDescriptions[] = {
 			Common::EN_ANY,
 			Common::kPlatformDOS,
 			ADGF_UNSTABLE,
-			GUIO7(GUIO_NOSPEECH, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ANIMATED_INVENTORY, GAMEOPTION_ANIMATED_INTERFACE, GAMEOPTION_NAUGHTY_MODE, GAMEOPTION_COPY_PROTECTION, GAMEOPTION_ORIGINAL_SAVELOAD)
+			GUIO8(GUIO_NOMIDI, GUIO_NOSPEECH, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ANIMATED_INVENTORY, GAMEOPTION_ANIMATED_INTERFACE, GAMEOPTION_NAUGHTY_MODE, GAMEOPTION_COPY_PROTECTION, GAMEOPTION_ORIGINAL_SAVELOAD)
 		},
 		GType_Phantom,
 		0
@@ -166,12 +166,12 @@ static const MADSGameDescription gameDescriptions[] = {
 		// Return of the Phantom GOG DOS English
 		{
 			"phantom",
-			0,
+			"CD",
 			AD_ENTRY1s("global.idx", "cf17ab33b5ab084763cf83c76a8d9634", 4638),
 			Common::EN_ANY,
 			Common::kPlatformDOS,
 			ADGF_UNSTABLE,
-			GUIO7(GUIO_NOSPEECH, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ANIMATED_INVENTORY, GAMEOPTION_ANIMATED_INTERFACE, GAMEOPTION_NAUGHTY_MODE, GAMEOPTION_COPY_PROTECTION, GAMEOPTION_ORIGINAL_SAVELOAD)
+			GUIO7(GUIO_NOMIDI, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ANIMATED_INVENTORY, GAMEOPTION_ANIMATED_INTERFACE, GAMEOPTION_NAUGHTY_MODE, GAMEOPTION_COPY_PROTECTION, GAMEOPTION_ORIGINAL_SAVELOAD)
 		},
 		GType_Phantom,
 		0
@@ -186,7 +186,7 @@ static const MADSGameDescription gameDescriptions[] = {
 			Common::EN_ANY,
 			Common::kPlatformDOS,
 			ADGF_UNSTABLE | ADGF_DEMO,
-			GUIO7(GUIO_NOSPEECH, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ANIMATED_INVENTORY, GAMEOPTION_ANIMATED_INTERFACE, GAMEOPTION_NAUGHTY_MODE, GAMEOPTION_COPY_PROTECTION, GAMEOPTION_ORIGINAL_SAVELOAD)
+			GUIO8(GUIO_NOMIDI, GUIO_NOSPEECH, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ANIMATED_INVENTORY, GAMEOPTION_ANIMATED_INTERFACE, GAMEOPTION_NAUGHTY_MODE, GAMEOPTION_COPY_PROTECTION, GAMEOPTION_ORIGINAL_SAVELOAD)
 		},
 		GType_Phantom,
 		0


Commit: 2a440582b9cf503866f594eeac03fb2df0112168
    https://github.com/scummvm/scummvm/commit/2a440582b9cf503866f594eeac03fb2df0112168
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-04-26T17:30:36+10:00

Commit Message:
MADS: PHANTOM: Correct detection entry MD5s

Changed paths:
    engines/mads/detection_tables.h


diff --git a/engines/mads/detection_tables.h b/engines/mads/detection_tables.h
index 617fd8f8eb0..8b42f54a399 100644
--- a/engines/mads/detection_tables.h
+++ b/engines/mads/detection_tables.h
@@ -152,7 +152,7 @@ static const MADSGameDescription gameDescriptions[] = {
 		{
 			"phantom",
 			0,
-			AD_ENTRY1s("section1.hag", "76e2d47a7aebafe48edc9884b3d91782", 1130939),
+			AD_ENTRY1s("global.hag", "bdce9ca93a015f0883d1bc0fabd0cdfa", 812150),
 			Common::EN_ANY,
 			Common::kPlatformDOS,
 			ADGF_UNSTABLE,
@@ -167,10 +167,10 @@ static const MADSGameDescription gameDescriptions[] = {
 		{
 			"phantom",
 			"CD",
-			AD_ENTRY1s("global.idx", "cf17ab33b5ab084763cf83c76a8d9634", 4638),
+			AD_ENTRY1s("global.hag", "8a51c984eb4c64e8b30a7e6670f6bddb", 101154000),
 			Common::EN_ANY,
 			Common::kPlatformDOS,
-			ADGF_UNSTABLE,
+			ADGF_UNSTABLE | ADGF_CD,
 			GUIO7(GUIO_NOMIDI, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ANIMATED_INVENTORY, GAMEOPTION_ANIMATED_INTERFACE, GAMEOPTION_NAUGHTY_MODE, GAMEOPTION_COPY_PROTECTION, GAMEOPTION_ORIGINAL_SAVELOAD)
 		},
 		GType_Phantom,




More information about the Scummvm-git-logs mailing list