[Scummvm-git-logs] scummvm master -> 7f4754a45f982e462ce4bffbd7e3ae17718985fc

bluegr noreply at scummvm.org
Thu Nov 12 07:40:46 UTC 2026


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

Summary:
97f4bb3692 HOLLYWOOD: Fix signed/unsigned MSVC warnings
dd0171c9f4 NANCY: NANCY26: Keep the order of records with the same z
38fa664eff NANCY: Decode frames shortly ahead instead of seeking
bdc73e24ff NANCY: NANCY23: Give a loading scene its own time
323705c9d5 NANCY: NANCY19: Use the color key only for pictures without alpha
761dcc0c11 NANCY: NANCY19: Let scripts change the picture of an overlay
c0ca16f762 NANCY: NANCY26: Let records draw on the whole screen
2a95118cc7 NANCY: NANCY26: Leave the menus out of the pictures of saved games
fac0646c67 NANCY: NANCY26: Shrink screenshots to the size the scripts ask for
023889ff0b NANCY: NANCY26: Show the pictures of saved games
978fe09639 NANCY: NANCY26: Accept any name for a saved game
bb3a296e05 NANCY: NANCY28: Make rects from a rect or from two points
d998abc0c4 NANCY: NANCY28: Add Inventory:Clear
3650b6871a NANCY: NANCY28: Add Message:Send
5f881e03ce NANCY: NANCY28: Play movies at the frame rate of their record
19947a46b8 NANCY: NANCY28: Show the tooltips of hotspots
9e7d509d53 NANCY: NANCY28: Add the script filter of the cheat menu
53a8640c6d NANCY: NANCY28: Add the achievements
0d21ce5ebf NANCY: NANCY28: Read the new format of the Brain
777fff631f NANCY: NANCY28: Add detection entry
7f4754a45f COMMON: Fix typos in AchievementsManager


Commit: 97f4bb3692229b30349518971eba71a789a6c6fb
    https://github.com/scummvm/scummvm/commit/97f4bb3692229b30349518971eba71a789a6c6fb
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:11+02:00

Commit Message:
HOLLYWOOD: Fix signed/unsigned MSVC warnings

The enum values weren't handled correctly by MSVC, resulting in
thousands of warnings

Changed paths:
    engines/hollywood/monsters/scenes/animation_channels.h
    engines/hollywood/monsters/scenes/animation_layers.h


diff --git a/engines/hollywood/monsters/scenes/animation_channels.h b/engines/hollywood/monsters/scenes/animation_channels.h
index d9c80490574..6d32152d904 100644
--- a/engines/hollywood/monsters/scenes/animation_channels.h
+++ b/engines/hollywood/monsters/scenes/animation_channels.h
@@ -87,9 +87,7 @@ struct TimedAnimationChannel {
  */
 class RealtimeAnimationTracks {
 public:
-	enum {
-		kInvalidTrack = 0xffffffff
-	};
+	static constexpr uint kInvalidTrack = 0xffffffff;
 
 	explicit RealtimeAnimationTracks(SceneLayerStack &layers) :
 			_layers(layers) {
diff --git a/engines/hollywood/monsters/scenes/animation_layers.h b/engines/hollywood/monsters/scenes/animation_layers.h
index 7d706199348..8687a415069 100644
--- a/engines/hollywood/monsters/scenes/animation_layers.h
+++ b/engines/hollywood/monsters/scenes/animation_layers.h
@@ -108,9 +108,7 @@ struct SceneLayerSpec {
  */
 class SceneLayerStack {
 public:
-	enum {
-		kInvalidLayer = 0xffffffff
-	};
+	static constexpr uint kInvalidLayer = 0xffffffff;
 
 	void clear() {
 		_layers.clear();


Commit: dd0171c9f493235a5b6c84f7ac2b561cc9bb25e0
    https://github.com/scummvm/scummvm/commit/dd0171c9f493235a5b6c84f7ac2b561cc9bb25e0
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:11+02:00

Commit Message:
NANCY: NANCY26: Keep the order of records with the same z

Records with the same z, or with the same key priority, now always get
the mouse and the keys in the same order. The sort used before could
swap them: after a game was loaded, the keys went to the screen behind
the text field of the save screen, and no name could be typed.

Changed paths:
    engines/nancy/script/v5/scriptinput.cpp


diff --git a/engines/nancy/script/v5/scriptinput.cpp b/engines/nancy/script/v5/scriptinput.cpp
index c48d66356b8..86399080b42 100644
--- a/engines/nancy/script/v5/scriptinput.cpp
+++ b/engines/nancy/script/v5/scriptinput.cpp
@@ -87,6 +87,20 @@ static bool isFrontmost(const Record *a, const Record *b) {
 	return a->getZ() > b->getZ();
 }
 
+// Sorts the records, keeping equal ones in the order they were added
+static void sortStable(Common::Array<Record *> &records, bool (*isBefore)(const Record *, const Record *)) {
+	for (uint i = 1; i < records.size(); ++i) {
+		Record *record = records[i];
+		uint j = i;
+		while (j > 0 && isBefore(record, records[j - 1])) {
+			records[j] = records[j - 1];
+			--j;
+		}
+
+		records[j] = record;
+	}
+}
+
 // The enabled records of every stream that gets input, the frontmost first
 static void collectRecords(Common::Array<Record *> &records) {
 	records.clear();
@@ -116,7 +130,7 @@ static void collectRecords(Common::Array<Record *> &records) {
 				}
 			}
 
-			Common::sort(streamRecords.begin(), streamRecords.end(), isFrontmost);
+			sortStable(streamRecords, isFrontmost);
 			for (Record *record : streamRecords) {
 				records.push_back(record);
 			}
@@ -333,7 +347,7 @@ static bool isMoveKey(Common::KeyCode key) {
 // the mouse goes by
 static void sendKey(const Common::Array<Record *> &records, Common::KeyCode key, bool isDown, uint16 ascii) {
 	Common::Array<Record *> keyOrder = records;
-	Common::sort(keyOrder.begin(), keyOrder.end(), isKeyFrontmost);
+	sortStable(keyOrder, isKeyFrontmost);
 
 	for (Record *record : keyOrder) {
 		if (record->capturesKeys() || (isDown && record->handleKey(key, ascii))) {


Commit: 38fa664effff009784745a6600f8f79a8b02ad8b
    https://github.com/scummvm/scummvm/commit/38fa664effff009784745a6600f8f79a8b02ad8b
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:12+02:00

Commit Message:
NANCY: Decode frames shortly ahead instead of seeking

Showing a frame that isn't the next one made the Bink decoder seek,
which decodes again from the keyframe before it. The conversation
movies have few keyframes, so a frame rate that dropped for a moment,
e.g. during Nancy28's fade-ins, made every later frame slower to get
to, and the characters moved in slow motion until the fade was over.
Frames up to a second ahead are now reached by decoding the ones in
between.

Changed paths:
    engines/nancy/movieplayer.cpp
    engines/nancy/movieplayer.h


diff --git a/engines/nancy/movieplayer.cpp b/engines/nancy/movieplayer.cpp
index 47edcd79d55..e690af1cdbc 100644
--- a/engines/nancy/movieplayer.cpp
+++ b/engines/nancy/movieplayer.cpp
@@ -255,9 +255,17 @@ const Graphics::Surface *MoviePlayer::decodeNextFrame(int frameNr) {
 		return &_frameCache[frameNr];
 	}
 
-	// seekToFrame() re-decodes from the previous keyframe, so only seek when the
-	// frame can't be reached by decoding forward one step.
-	if (_decoder->getCurFrame() + 1 != frameNr) {
+	// seekToFrame() decodes again from the keyframe before the frame, which can
+	// be far back: the movies of the conversations have few of them. A frame a
+	// little ahead is reached by decoding the ones in between instead, so a
+	// frame rate that drops for a moment, e.g. during a fade, doesn't make every
+	// later frame slower to get to.
+	const int framesAhead = frameNr - _decoder->getCurFrame();
+	if (framesAhead > 1 && framesAhead <= kMaxFramesDecodedAhead) {
+		while (_decoder->getCurFrame() + 1 < frameNr) {
+			_decoder->decodeNextFrame();
+		}
+	} else if (framesAhead != 1) {
 		_decoder->seekToFrame(frameNr);
 	}
 
diff --git a/engines/nancy/movieplayer.h b/engines/nancy/movieplayer.h
index 0e071eb1a99..94b2f3fb4e3 100644
--- a/engines/nancy/movieplayer.h
+++ b/engines/nancy/movieplayer.h
@@ -121,6 +121,10 @@ public:
 private:
 	friend class BinkCacheLoader;
 
+	// How far ahead decodeNextFrame() decodes to a frame instead of seeking: a
+	// second of a 15 frames per second movie
+	static const int kMaxFramesDecodedAhead = 15;
+
 	static byte resolvePlaytype(byte videoPlaytype);	// resolves kVideoPlaytypeAuto
 
 	void storeCurrentFrame();


Commit: bdc73e24ff3d18a0e69d530a6b3cc09c2bbaf4a1
    https://github.com/scummvm/scummvm/commit/bdc73e24ff3d18a0e69d530a6b3cc09c2bbaf4a1
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:13+02:00

Commit Message:
NANCY: NANCY23: Give a loading scene its own time

While the script of a scene runs for the first time, the time and frame
of its stream are now the new scene's, not the ones of the scene before.
Nancy28's conversations hide the phone, the inventory and the task list
with an area that keeps that time, and the area ended as soon as the
scene started, so the phone icon showed up between the lines.

Changed paths:
    engines/nancy/state/scene.cpp
    engines/nancy/state/scenestream.cpp
    engines/nancy/state/scenestream.h


diff --git a/engines/nancy/state/scene.cpp b/engines/nancy/state/scene.cpp
index 266dbeee014..b299b4e1ca8 100644
--- a/engines/nancy/state/scene.cpp
+++ b/engines/nancy/state/scene.cpp
@@ -2331,7 +2331,11 @@ void Scene::loadScriptedScene(bool fromSaveFile) {
 		Common::String::format("s%u", _sceneState.nextScene.sceneID) : _nextScriptSceneName;
 
 	Script::SceneContext *scriptScene = new Script::SceneContext(SceneStreamManager::getMainStreamName(), sceneName, _sceneState.nextScene.frameID, 0);
-	if (!scriptScene->load()) {
+	_streams.beginSceneLoad(scriptScene);
+	const bool isLoaded = scriptScene->load();
+	_streams.endSceneLoad();
+
+	if (!isLoaded) {
 		// A scene that can't be loaded leaves the player where they are
 		warning("Failed to load scene %s", sceneName.c_str());
 		delete scriptScene;
diff --git a/engines/nancy/state/scenestream.cpp b/engines/nancy/state/scenestream.cpp
index 87978036f1f..e0083145918 100644
--- a/engines/nancy/state/scenestream.cpp
+++ b/engines/nancy/state/scenestream.cpp
@@ -177,7 +177,11 @@ byte SceneStream::getEventFlag(int16 index) const {
 // Nancy19 scenes are Lua scripts, which make their own records
 bool SceneStream::loadScriptedScene() {
 	Script::SceneContext *scriptScene = new Script::SceneContext(_name, _nextSceneName, _nextFrameID, _zOffset);
-	if (!scriptScene->load()) {
+	NancySceneState.getStreams().beginSceneLoad(scriptScene);
+	const bool isLoaded = scriptScene->load();
+	NancySceneState.getStreams().endSceneLoad();
+
+	if (!isLoaded) {
 		warning("Stream %s: could not load scene %s", _name.c_str(), _nextSceneName.c_str());
 		delete scriptScene;
 		return false;
@@ -614,6 +618,12 @@ Common::String SceneStreamManager::getSceneName(const Common::String &name) cons
 
 #ifdef ENABLE_NANCY_V4
 const Script::SceneContext *SceneStreamManager::findScriptScene(const Common::String &name) const {
+	for (uint i = _loadingScenes.size(); i > 0; --i) {
+		if (!name.empty() && name.equalsIgnoreCase(_loadingScenes[i - 1]->getStreamName())) {
+			return _loadingScenes[i - 1];
+		}
+	}
+
 	if (name.equalsIgnoreCase(getMainStreamName())) {
 		return NancySceneState.getScriptScene();
 	}
diff --git a/engines/nancy/state/scenestream.h b/engines/nancy/state/scenestream.h
index cb29b8fede9..edd4d21a49f 100644
--- a/engines/nancy/state/scenestream.h
+++ b/engines/nancy/state/scenestream.h
@@ -276,6 +276,13 @@ public:
 #endif
 
 #ifdef ENABLE_NANCY_V4
+	// While the script of a new scene runs for the first time, the time and
+	// frame of its stream are already the new scene's. The scripts count on
+	// that: Nancy28's area tags keep the time of the stream when they are made,
+	// and get dropped when the stream's time is lower than that.
+	void beginSceneLoad(const Script::SceneContext *scene) { _loadingScenes.push_back(scene); }
+	void endSceneLoad() { _loadingScenes.pop_back(); }
+
 	// Nancy21: what the scripts move and scale everything in a stream with; null
 	// when there is no such stream. Only the scaling and the offset get drawn.
 	const Script::ScriptMatrix *getTransform(const Common::String &name);
@@ -310,6 +317,7 @@ private:
 #ifdef ENABLE_NANCY_V4
 	const Script::SceneContext *findScriptScene(const Common::String &name) const;
 
+	Common::Array<const Script::SceneContext *> _loadingScenes;
 	Script::ScriptMatrix _mainStreamTransform;
 #endif
 #ifdef ENABLE_NANCY_V5


Commit: 323705c9d5d34c72c2b170422b7adeec24d836ab
    https://github.com/scummvm/scummvm/commit/323705c9d5d34c72c2b170422b7adeec24d836ab
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:13+02:00

Commit Message:
NANCY: NANCY19: Use the color key only for pictures without alpha

Pictures that get drawn anew, e.g. when they are tinted or turned, now
leave out only what their alpha channel makes transparent, like the
pictures that are shown unchanged. From Nancy16 on the color key is
black, so the black checkboxes of Nancy28's task list vanished when they
were greyed.

Changed paths:
    engines/nancy/script/records.cpp


diff --git a/engines/nancy/script/records.cpp b/engines/nancy/script/records.cpp
index aed36e30b1f..240799bdf4d 100644
--- a/engines/nancy/script/records.cpp
+++ b/engines/nancy/script/records.cpp
@@ -296,6 +296,9 @@ static void placePicture(RecordGraphic &graphic, Graphics::ManagedSurface &image
 	out.clear(0);
 	graphic.setTransparent(false);
 
+	// A picture with an alpha channel uses only that for transparency, like
+	// when it is shown unchanged. The color key is black from Nancy16 on, and
+	// pictures such as Nancy28's task checkboxes are drawn in black.
 	byte transR, transG, transB;
 	image.format.colorToRGB(g_nancy->_graphics->getTransColor(), transR, transG, transB);
 	const bool hasAlpha = image.format.aBits() != 0;
@@ -347,7 +350,7 @@ static void placePicture(RecordGraphic &graphic, Graphics::ManagedSurface &image
 
 			const uint32 pixel = image.getPixel(source.left + sourceX, source.top + sourceY);
 			if (isCopied) {
-				if ((pixel & colorMask) != transColor) {
+				if (hasAlpha || (pixel & colorMask) != transColor) {
 					outRow[x] = pixel;
 				}
 
@@ -356,7 +359,7 @@ static void placePicture(RecordGraphic &graphic, Graphics::ManagedSurface &image
 
 			byte alpha, red, green, blue;
 			image.format.colorToARGB(pixel, alpha, red, green, blue);
-			if (red == transR && green == transG && blue == transB) {
+			if (!hasAlpha && red == transR && green == transG && blue == transB) {
 				continue;
 			}
 
@@ -387,14 +390,12 @@ static void blendPicture(Graphics::ManagedSurface &target, const RecordGraphic &
 		for (int x = MAX<int>(0, -area.left); x < image.w && area.left + x < target.w; ++x) {
 			byte alpha, red, green, blue;
 			image.format.colorToARGB(image.getPixel(x, y), alpha, red, green, blue);
-			if (isKeyed) {
+			if (isKeyed && !hasAlpha) {
 				if (red == transR && green == transG && blue == transB) {
 					continue;
 				}
 
-				if (!hasAlpha) {
-					alpha = 0xFF;
-				}
+				alpha = 0xFF;
 			}
 
 			if (alpha == 0) {


Commit: 761dcc0c1154d9215a303e4c51fb1164ff9690fa
    https://github.com/scummvm/scummvm/commit/761dcc0c1154d9215a303e4c51fb1164ff9690fa
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:13+02:00

Commit Message:
NANCY: NANCY19: Let scripts change the picture of an overlay

Setting the ovl field of an overlay now loads the picture of that name,
from the archive its tree field names, and keeps the part of it that
shows. The save and load screens of Nancy26 and later show the pictures
of the saved games this way.

Changed paths:
    engines/nancy/script/records.cpp
    engines/nancy/script/records.h


diff --git a/engines/nancy/script/records.cpp b/engines/nancy/script/records.cpp
index 240799bdf4d..b1d6116196c 100644
--- a/engines/nancy/script/records.cpp
+++ b/engines/nancy/script/records.cpp
@@ -1244,6 +1244,8 @@ bool loadTreeImage(const Common::String &name, const Common::String &treeName, G
 // cached: every record has its own.
 static bool loadCachedImage(const Common::String &name, const Common::String &treeName, Common::SharedPtr<Graphics::ManagedSurface> &cached, Graphics::ManagedSurface &image) {
 	if (treeName.equalsIgnoreCase(kPictureTreeName)) {
+		image.free();
+		cached.reset();
 		return loadTreeImage(name, treeName, image);
 	}
 
@@ -1273,6 +1275,9 @@ void OverlayRecord::readTable(int tableIndex) {
 		luaL_error(L, "Could not load overlay %s", imageName.c_str());
 	}
 
+	_imageName = imageName;
+	_treeName = treeName;
+
 	// Both default to the whole image
 	_source = ScriptRect(0, 0, _image.w, _image.h);
 	if (pushField(L, tableIndex, "source")) {
@@ -1537,6 +1542,10 @@ bool OverlayRecord::getField(const Common::String &key) {
 		pushRect(L, _source);
 	} else if (key == "modColor") {
 		pushColor(L, _modColor);
+	} else if (key == "ovl") {
+		lua_pushstring(L, _imageName.c_str());
+	} else if (key == "tree") {
+		lua_pushstring(L, _treeName.c_str());
 	} else {
 		return false;
 	}
@@ -1544,11 +1553,38 @@ bool OverlayRecord::getField(const Common::String &key) {
 	return true;
 }
 
+// The scripts change the picture by its name, after naming the tree it is in:
+// the save and load screens show the pictures of the saved games this way. The
+// part of it that shows stays as it was.
+bool OverlayRecord::setPicture(const Common::String &imageName) {
+	Common::SharedPtr<Graphics::ManagedSurface> cached;
+	Graphics::ManagedSurface image;
+	if (!loadCachedImage(imageName, _treeName, cached, image)) {
+		warning("Could not load overlay %s", imageName.c_str());
+		return false;
+	}
+
+	_image = Common::move(image);
+	_cachedImage = cached;
+	_imageName = imageName;
+	return true;
+}
+
 bool OverlayRecord::setField(const Common::String &key) {
 	lua_State *L = getLua();
 
+	if (key == "tree") {
+		_treeName = lua_isnil(L, 3) ? Common::String() : Common::String(luaL_checkstring(L, 3));
+		return true;
+	}
+
 	// Only a change gets the picture drawn anew
-	if (key == "onScreen") {
+	if (key == "ovl") {
+		const Common::String imageName = luaL_checkstring(L, 3);
+		if (!setPicture(imageName)) {
+			return true;
+		}
+	} else if (key == "onScreen") {
 		if (lua_istable(L, 3) || _hasDestTable) {
 			readDest(3);
 		} else {
diff --git a/engines/nancy/script/records.h b/engines/nancy/script/records.h
index 376f186b232..6e1ef9acf50 100644
--- a/engines/nancy/script/records.h
+++ b/engines/nancy/script/records.h
@@ -289,9 +289,12 @@ private:
 	void readDest(int index);
 	void readDestTable(Common::Array<ScriptRect> &dests);
 	void applyRects();
+	bool setPicture(const Common::String &imageName);
 
 	Common::SharedPtr<Graphics::ManagedSurface> _cachedImage;	// kept while the record uses it
 	Graphics::ManagedSurface _image;	// the cached picture, or a saved one
+	Common::String _imageName;
+	Common::String _treeName;
 	ScriptRect _source;
 	ScriptRect _dest;
 	bool _hasDestTable = false;					// Nancy24: onScreen is a table of rects


Commit: c0ca16f7624d50441cd9129ee508d1103b8b5b63
    https://github.com/scummvm/scummvm/commit/c0ca16f7624d50441cd9129ee508d1103b8b5b63
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:14+02:00

Commit Message:
NANCY: NANCY26: Let records draw on the whole screen

Turned or tinted pictures, Overrides and particles were cut off at the
bottom of the viewport. From Nancy26 on the UI along the bottom is made
of records too, so its greyed buttons vanished, and the grey behind the
menu left the bottom bar out.

Changed paths:
    engines/nancy/script/particles.cpp
    engines/nancy/script/records.cpp
    engines/nancy/script/records.h


diff --git a/engines/nancy/script/particles.cpp b/engines/nancy/script/particles.cpp
index f37a7f4c021..cf90544d4ce 100644
--- a/engines/nancy/script/particles.cpp
+++ b/engines/nancy/script/particles.cpp
@@ -1096,10 +1096,7 @@ void ParticleRecord::updateGraphics() {
 	}
 
 	if (!_canvas) {
-		const VIEW *viewport = GetEngineData(VIEW);
-		assert(viewport);
-
-		const Common::Rect bounds(viewport->screenPosition.width(), viewport->screenPosition.height());
+		const Common::Rect bounds = RecordGraphic::getDrawArea();
 
 		_canvas = new RecordGraphic();
 		_canvas->init();
diff --git a/engines/nancy/script/records.cpp b/engines/nancy/script/records.cpp
index b1d6116196c..a1a18aa99ba 100644
--- a/engines/nancy/script/records.cpp
+++ b/engines/nancy/script/records.cpp
@@ -208,6 +208,16 @@ bool RecordGraphic::isViewportRelative() const {
 	return g_nancy->getGameType() < kGameTypeNancy26;
 }
 
+Common::Rect RecordGraphic::getDrawArea() {
+	if (g_nancy->getGameType() >= kGameTypeNancy26) {
+		return g_nancy->_graphics->getScreenBounds();
+	}
+
+	const VIEW *viewport = GetEngineData(VIEW);
+	assert(viewport);
+	return Common::Rect(viewport->screenPosition.width(), viewport->screenPosition.height());
+}
+
 void RecordGraphic::setScriptZ(double z, const SceneContext &context) {
 	setZOrder(getScriptZOrder(z, context.getZOffset()));
 	setViewTransform(context.getViewTransform());
@@ -280,10 +290,7 @@ static void placePicture(RecordGraphic &graphic, Graphics::ManagedSurface &image
 
 	// Nothing shows outside the viewport, so only the part inside it gets drawn.
 	// The map of Nancy25 is far larger than the viewport when zoomed in.
-	const VIEW *viewport = GetEngineData(VIEW);
-	assert(viewport);
-
-	area.clip(Common::Rect(viewport->screenPosition.width(), viewport->screenPosition.height()));
+	area.clip(RecordGraphic::getDrawArea());
 	const bool isOnScreen = !area.isEmpty();
 	if (!isOnScreen) {
 		area = Common::Rect(1, 1);
@@ -1123,10 +1130,7 @@ void OverrideRecord::updateGraphics() {
 	}
 
 	if (!_canvas) {
-		const VIEW *viewport = GetEngineData(VIEW);
-		assert(viewport);
-
-		const Common::Rect bounds(viewport->screenPosition.width(), viewport->screenPosition.height());
+		const Common::Rect bounds = RecordGraphic::getDrawArea();
 
 		_canvas = new RecordGraphic();
 		_canvas->init();
diff --git a/engines/nancy/script/records.h b/engines/nancy/script/records.h
index 6e1ef9acf50..35669278033 100644
--- a/engines/nancy/script/records.h
+++ b/engines/nancy/script/records.h
@@ -80,6 +80,10 @@ public:
 	// The highest z order of what the records draw
 	static const int kMaxScriptZOrder = 59000;
 
+	// Where the records can draw: the viewport, and from Nancy26 on the whole
+	// screen
+	static Common::Rect getDrawArea();
+
 protected:
 	// Nancy26 has the viewport at the top left of the screen, and lets records
 	// draw on all of it, the UI along the bottom included


Commit: 2a95118cc7d443227ae65208263dac593a940180
    https://github.com/scummvm/scummvm/commit/2a95118cc7d443227ae65208263dac593a940180
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:14+02:00

Commit Message:
NANCY: NANCY26: Leave the menus out of the pictures of saved games

The menus save the game and take its picture from a Render function
that runs below them. Pictures taken there, and the thumbnail of a game
saved from there, now show only what is drawn below that function: the
scene without the menu.

Changed paths:
    engines/nancy/graphics.cpp
    engines/nancy/graphics.h
    engines/nancy/metaengine.cpp
    engines/nancy/script/gameapi.cpp
    engines/nancy/script/records.cpp
    engines/nancy/script/v5/gamefunctions.cpp


diff --git a/engines/nancy/graphics.cpp b/engines/nancy/graphics.cpp
index a62058c40f5..a12cd29fb29 100644
--- a/engines/nancy/graphics.cpp
+++ b/engines/nancy/graphics.cpp
@@ -815,6 +815,47 @@ void GraphicsManager::screenshotScreen(Graphics::ManagedSurface &inSurf) {
 	inSurf.copyFrom(_screen);
 }
 
+void GraphicsManager::getDrawnGameImage(Graphics::ManagedSurface &out) {
+	const Graphics::ManagedSurface &image = getGameImage();
+	if (_scriptDrawingZOrder < 0) {
+		out.copyFrom(image);
+		return;
+	}
+
+	// The objects below the script have been brought up to date for this frame
+	out.create(image.w, image.h, image.format);
+	out.clear(out.format.ARGBToColor(255, 0, 0, 0));
+	for (const RenderObject *object : _objects) {
+		if (object->getZOrder() >= _scriptDrawingZOrder) {
+			break;
+		}
+
+		if (!object->isVisible() || !isInLayer(*object, isGameScaled() ? kLayerGame : kLayerAll)) {
+			continue;
+		}
+
+		Common::Rect position = getDrawnPosition(*object);
+		if (!object->getClipRect().isEmpty()) {
+			position.clip(object->getClipRect());
+		}
+
+		position.clip(Common::Rect(out.w, out.h));
+		if (!position.isEmpty()) {
+			blitObject(out, *object, position);
+		}
+	}
+}
+
+bool GraphicsManager::takeSavePicture(Graphics::ManagedSurface &out) {
+	if (_savePicture.empty()) {
+		return false;
+	}
+
+	out.copyFrom(_savePicture);
+	_savePicture.free();
+	return true;
+}
+
 // Draw a given screen-space rectangle of an object
 void GraphicsManager::blitObject(Graphics::ManagedSurface &target, const RenderObject &src, Common::Rect screenRect) {
 	// An object whose image is missing has nothing to draw
diff --git a/engines/nancy/graphics.h b/engines/nancy/graphics.h
index 2edc7203454..41120849735 100644
--- a/engines/nancy/graphics.h
+++ b/engines/nancy/graphics.h
@@ -119,6 +119,18 @@ public:
 	void grabViewportObjects(Common::Array<RenderObject *> &inArray);
 	void screenshotScreen(Graphics::ManagedSurface &inSurf);
 
+	// Nancy26 has scripts draw while the frame is drawn, and the pictures they
+	// take then hold only what lies below them: the menus take the scene
+	// behind them. Outside of that, the picture is the last frame.
+	void beginScriptDrawing(uint16 zOrder) { _scriptDrawingZOrder = zOrder; }
+	void endScriptDrawing() { _scriptDrawingZOrder = -1; }
+	void getDrawnGameImage(Graphics::ManagedSurface &out);
+
+	// The picture a script took for a saved game it asked for, which gets saved
+	// with it a frame later
+	void keepSavePicture() { getDrawnGameImage(_savePicture); }
+	bool takeSavePicture(Graphics::ManagedSurface &out);
+
 	static void loadSurfacePalette(Graphics::ManagedSurface &inSurf, const Common::Path &paletteFilename, uint paletteStart = 0, uint paletteSize = 256);
 	static void copyToManaged(const Graphics::Surface &src, Graphics::ManagedSurface &dst, bool verticalFlip = false, bool doubleSize = false);
 	static void copyToManaged(void *src, Graphics::ManagedSurface &dst, uint srcW, uint srcH, const Graphics::PixelFormat &format, bool verticalFlip = false, bool doubleSize = false);
@@ -155,6 +167,9 @@ private:
 
 	Common::SortedArray<RenderObject *> _objects;
 
+	int32 _scriptDrawingZOrder = -1;	// of the script drawing now, or -1
+	Graphics::ManagedSurface _savePicture;
+
 	Graphics::PixelFormat _inputPixelFormat16, _inputPixelFormat24, _inputPixelFormat32;
 	Graphics::PixelFormat _screenPixelFormat16, _screenPixelFormat32;
 	Graphics::PixelFormat _clut8Format;
diff --git a/engines/nancy/metaengine.cpp b/engines/nancy/metaengine.cpp
index edc4bd4e782..fe798c95f99 100644
--- a/engines/nancy/metaengine.cpp
+++ b/engines/nancy/metaengine.cpp
@@ -203,6 +203,12 @@ SaveStateDescriptor NancyMetaEngine::querySaveMetaInfos(const char *target, int
 }
 
 void NancyMetaEngine::getSavegameThumbnail(Graphics::Surface &thumb) {
+	// A picture a script took for the saved game it asked for
+	Graphics::ManagedSurface savePicture;
+	if (Nancy::g_nancy->_graphics->takeSavePicture(savePicture) && createThumbnail(&thumb, &savePicture)) {
+		return;
+	}
+
 	if (Nancy::g_nancy->getState() == Nancy::NancyState::kLoadSave) {
 		// Do not screenshot the screen if we're in the engine's original menus,
 		// since that would just screenshot the menu itself
diff --git a/engines/nancy/script/gameapi.cpp b/engines/nancy/script/gameapi.cpp
index 3e8a0688971..3d6c47c0924 100644
--- a/engines/nancy/script/gameapi.cpp
+++ b/engines/nancy/script/gameapi.cpp
@@ -1018,8 +1018,10 @@ static int saveScreenshot(lua_State *L) {
 	const char *suffix = g_nancy->getGameType() >= kGameTypeNancy22 ? "_SSPIC" : "_OVL";
 	const Common::String name = lua_gettop(L) > 2 ? Common::String(luaL_checkstring(L, 3)) : Common::String::format("%u%s", g_system->getMillis(), suffix);
 
-	// The viewport as it was drawn last, before it got scaled onto the screen
-	const Graphics::ManagedSurface &image = g_nancy->_graphics->getGameImage();
+	// The viewport as it was drawn last, before it got scaled onto the screen,
+	// or from Nancy26 on, as far as it is drawn when a Render function takes it
+	Graphics::ManagedSurface image;
+	g_nancy->_graphics->getDrawnGameImage(image);
 	Common::Rect area = NancySceneState.getViewport().convertViewportToScreen(rect.toRect());
 	area.clip(Common::Rect(image.w, image.h));
 
diff --git a/engines/nancy/script/records.cpp b/engines/nancy/script/records.cpp
index a1a18aa99ba..ea2ae21f454 100644
--- a/engines/nancy/script/records.cpp
+++ b/engines/nancy/script/records.cpp
@@ -1144,10 +1144,20 @@ void OverrideRecord::updateGraphics() {
 
 	_renderSurface.clear(0);
 
+	// From Nancy26 on, a picture the function takes shows what is below it
+	const bool isDrawnInPlace = g_nancy->getGameType() >= kGameTypeNancy26;
+	if (isDrawnInPlace) {
+		g_nancy->_graphics->beginScriptDrawing(_canvas->getZOrder());
+	}
+
 	s_drawTarget = &_renderSurface;
 	callFunction("Render");
 	s_drawTarget = nullptr;
 
+	if (isDrawnInPlace) {
+		g_nancy->_graphics->endScriptDrawing();
+	}
+
 	Graphics::ManagedSurface &shown = _canvas->_drawSurface;
 	const uint32 size = shown.pitch * shown.h;
 	if (memcmp(shown.getPixels(), _renderSurface.getPixels(), size) != 0) {
diff --git a/engines/nancy/script/v5/gamefunctions.cpp b/engines/nancy/script/v5/gamefunctions.cpp
index 3f5a95b5a73..ca9a637c64b 100644
--- a/engines/nancy/script/v5/gamefunctions.cpp
+++ b/engines/nancy/script/v5/gamefunctions.cpp
@@ -267,6 +267,10 @@ static int gameSave(lua_State *L) {
 
 	getSaveManager(L).requestSave(name);
 	setContinueSave(name, isContinue);
+
+	// The menus save from a Render function, below themselves, so the picture
+	// of the saved game shows the scene
+	g_nancy->_graphics->keepSavePicture();
 	return 0;
 }
 


Commit: fac0646c676b19e0d641dec1574546fb5bbd6fdd
    https://github.com/scummvm/scummvm/commit/fac0646c676b19e0d641dec1574546fb5bbd6fdd
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:14+02:00

Commit Message:
NANCY: NANCY26: Shrink screenshots to the size the scripts ask for

Save:Screenshot(rect, width, height) scales the picture to that size,
e.g. for the small picture of the scene on the save screen. The width
was taken as the name of the picture before.

Changed paths:
    engines/nancy/script/gameapi.cpp


diff --git a/engines/nancy/script/gameapi.cpp b/engines/nancy/script/gameapi.cpp
index 3d6c47c0924..abe26029e61 100644
--- a/engines/nancy/script/gameapi.cpp
+++ b/engines/nancy/script/gameapi.cpp
@@ -1011,12 +1011,18 @@ static int saveGame(lua_State *L) {
 // Save:Screenshot(rect[, name]), Nancy21: keeps a picture of a part of the
 // viewport with the game, for the camera of the cell phone. Overlays show it
 // from the "LOADSAVE" tree. Gives the name of the picture, or an empty one when
-// it couldn't be taken.
+// it couldn't be taken. Nancy26 takes Save:Screenshot(rect[, width, height])
+// instead, and shrinks the picture to that size: the save screen shows the
+// whole scene in a small picture.
 static int saveScreenshot(lua_State *L) {
 	const ScriptRect &rect = checkRect(L, 2);
+	const bool takesSize = g_nancy->getGameType() >= kGameTypeNancy26;
+	const int width = takesSize ? (int)luaL_optinteger(L, 3, 0) : 0;
+	const int height = takesSize ? (int)luaL_optinteger(L, 4, 0) : 0;
+
 	// Nancy22 names the pictures it takes "<time>_SSPIC"
 	const char *suffix = g_nancy->getGameType() >= kGameTypeNancy22 ? "_SSPIC" : "_OVL";
-	const Common::String name = lua_gettop(L) > 2 ? Common::String(luaL_checkstring(L, 3)) : Common::String::format("%u%s", g_system->getMillis(), suffix);
+	const Common::String name = (!takesSize && lua_gettop(L) > 2) ? Common::String(luaL_checkstring(L, 3)) : Common::String::format("%u%s", g_system->getMillis(), suffix);
 
 	// The viewport as it was drawn last, before it got scaled onto the screen,
 	// or from Nancy26 on, as far as it is drawn when a Render function takes it
@@ -1028,7 +1034,15 @@ static int saveScreenshot(lua_State *L) {
 	bool isTaken = false;
 	if (!area.isEmpty()) {
 		const Graphics::Surface part = image.rawSurface().getSubArea(area);
-		Graphics::Surface *picture = part.convertTo(Graphics::PixelFormat::createFormatRGB24());
+		Graphics::Surface *picture = nullptr;
+		if (width > 0 && height > 0 && (width != area.width() || height != area.height())) {
+			Graphics::Surface *scaled = part.scale(width, height, true);
+			picture = scaled->convertTo(Graphics::PixelFormat::createFormatRGB24());
+			scaled->free();
+			delete scaled;
+		} else {
+			picture = part.convertTo(Graphics::PixelFormat::createFormatRGB24());
+		}
 
 		Common::MemoryWriteStreamDynamic png(DisposeAfterUse::YES);
 		if (Image::writePNG(png, *picture)) {


Commit: 023889ff0b1cead1cb0dce503585f27b9c41bb26
    https://github.com/scummvm/scummvm/commit/023889ff0b1cead1cb0dce503585f27b9c41bb26
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:15+02:00

Commit Message:
NANCY: NANCY26: Show the pictures of saved games

The save and load screens show the picture of a saved game from the
"SaveFile" tree, by the name of the save. It is the thumbnail ScummVM
keeps with the save, scaled to the size the screens show it at.

Changed paths:
    engines/nancy/script/records.cpp


diff --git a/engines/nancy/script/records.cpp b/engines/nancy/script/records.cpp
index ea2ae21f454..875dfa932a5 100644
--- a/engines/nancy/script/records.cpp
+++ b/engines/nancy/script/records.cpp
@@ -19,10 +19,13 @@
  *
  */
 
+#include "common/config-manager.h"
 #include "common/memstream.h"
 #include "common/random.h"
 #include "common/textconsole.h"
 
+#include "engines/metaengine.h"
+
 #include "image/png.h"
 
 #include "engines/nancy/cursor.h"
@@ -1224,7 +1227,48 @@ bool OverrideRecord::setField(const Common::String &key) {
 // the saved game
 static const char *const kPictureTreeName = "LOADSAVE";
 
+// Nancy26: the "SaveFile" tree holds the pictures of the saved games, by their
+// names. They are the thumbnails of ScummVM's saved games, at the size the save
+// and load screens show them at.
+static const char *const kSaveFileTreeName = "SaveFile";
+static const int kSavePictureWidth = 184;
+static const int kSavePictureHeight = 124;
+
+static bool loadSavePicture(const Common::String &name, Graphics::ManagedSurface &image) {
+	const MetaEngine *metaEngine = g_nancy->getMetaEngine();
+	const Common::String target = ConfMan.getActiveDomainName();
+	const SaveStateList saves = metaEngine->listSaves(target.c_str());
+	for (const SaveStateDescriptor &save : saves) {
+		if (save.getSaveSlot() == metaEngine->getMaximumSaveSlot() || save.getSaveSlot() == g_nancy->getAutosaveSlot() ||
+				!save.getDescription().equalsIgnoreCase(name)) {
+			continue;
+		}
+
+		const SaveStateDescriptor info = metaEngine->querySaveMetaInfos(target.c_str(), save.getSaveSlot());
+		const Graphics::Surface *thumbnail = info.getThumbnail();
+		if (!thumbnail) {
+			return false;
+		}
+
+		Graphics::Surface *scaled = thumbnail->scale(kSavePictureWidth, kSavePictureHeight, true);
+		Graphics::Surface *converted = scaled->convertTo(g_nancy->_graphics->getInputPixelFormat(32));
+		GraphicsManager::copyToManaged(*converted, image);
+		converted->free();
+		delete converted;
+		scaled->free();
+		delete scaled;
+		return true;
+	}
+
+	warning("There is no saved game named %s", name.c_str());
+	return false;
+}
+
 bool loadTreeImage(const Common::String &name, const Common::String &treeName, Graphics::ManagedSurface &image) {
+	if (treeName.equalsIgnoreCase(kSaveFileTreeName)) {
+		return loadSavePicture(name, image);
+	}
+
 	if (!treeName.equalsIgnoreCase(kPictureTreeName)) {
 		return g_nancy->_resource->loadImage(Common::Path(name), image, treeName);
 	}
@@ -1257,7 +1301,7 @@ bool loadTreeImage(const Common::String &name, const Common::String &treeName, G
 // and hold on to the cached picture while they use it. Saved pictures aren't
 // cached: every record has its own.
 static bool loadCachedImage(const Common::String &name, const Common::String &treeName, Common::SharedPtr<Graphics::ManagedSurface> &cached, Graphics::ManagedSurface &image) {
-	if (treeName.equalsIgnoreCase(kPictureTreeName)) {
+	if (treeName.equalsIgnoreCase(kPictureTreeName) || treeName.equalsIgnoreCase(kSaveFileTreeName)) {
 		image.free();
 		cached.reset();
 		return loadTreeImage(name, treeName, image);


Commit: 978fe09639d90928e2a1b9654dbaf0f40f2961d7
    https://github.com/scummvm/scummvm/commit/978fe09639d90928e2a1b9654dbaf0f40f2961d7
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:16+02:00

Commit Message:
NANCY: NANCY26: Accept any name for a saved game

The original turns down names that can't be file names. ScummVM keeps
the name only as the description of the save, so any name goes, an
empty one too. The save screen checks the name after every key.

Changed paths:
    engines/nancy/script/v5/gamefunctions.cpp


diff --git a/engines/nancy/script/v5/gamefunctions.cpp b/engines/nancy/script/v5/gamefunctions.cpp
index ca9a637c64b..8fbecce758f 100644
--- a/engines/nancy/script/v5/gamefunctions.cpp
+++ b/engines/nancy/script/v5/gamefunctions.cpp
@@ -561,16 +561,14 @@ static int inventoryIndex(lua_State *L) {
 
 // Save, Sound, Scene and Log
 
-// Save:IsNameAcceptable(name): whether a saved game can go by the name
+// Save:IsNameAcceptable(name): whether a saved game can go by the name. The exe
+// makes a file of it, and turns down what a file name can't be. ScummVM keeps
+// the name only as the description of the save, so any name goes, an empty one
+// too: the save screen checks the name after every key, and puts the last one
+// back when it isn't acceptable.
 static int saveIsNameAcceptable(lua_State *L) {
-	const Common::String name = luaL_checkstring(L, 2);
-
-	bool isAcceptable = !name.empty() && !name.hasPrefix(" ") && !name.hasSuffix(" ") && !name.hasSuffix(".");
-	for (uint i = 0; i < name.size() && isAcceptable; ++i) {
-		isAcceptable = (byte)name[i] >= 32 && !strchr("\\/:*?\"<>|", name[i]);
-	}
-
-	lua_pushboolean(L, isAcceptable);
+	luaL_checkstring(L, 2);
+	lua_pushboolean(L, true);
 	return 1;
 }
 


Commit: bb3a296e05cde61f6113b95a674d772d878f903d
    https://github.com/scummvm/scummvm/commit/bb3a296e05cde61f6113b95a674d772d878f903d
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:17+02:00

Commit Message:
NANCY: NANCY28: Make rects from a rect or from two points

Rect:New(rect) copies a rect, as some scripts of Nancy27 and Nancy28 do,
and Rect:LTRB and Rect:LTWH also take two points, rounded to whole
pixels

Changed paths:
    engines/nancy/script/types.cpp


diff --git a/engines/nancy/script/types.cpp b/engines/nancy/script/types.cpp
index 8d4b65d2ba7..1a2998d0c64 100644
--- a/engines/nancy/script/types.cpp
+++ b/engines/nancy/script/types.cpp
@@ -109,22 +109,64 @@ static void checkPlaceArguments(lua_State *L, int index, double &x, double &y) {
 	luaL_argerror(L, index, "Single parameter must be a Point or a table with x and y fields");
 }
 
-static int rectNew(lua_State *L) {
+static PointValue &checkPoint(lua_State *L, int index);
+
+// Halves go away from zero
+static double roundCoordinate(float value) {
+	return value > 0.0f ? floor(value + 0.5) : ceil(value - 0.5);
+}
+
+// Rect:LTRB(left, top, right, bottom), and in Nancy28
+// Rect:LTRB(leftTop, rightBottom) with two points, rounded to whole pixels
+static int rectNewLTRB(lua_State *L) {
 	ScriptRect rect;
-	rect.left = luaL_checkint(L, 2);
-	rect.top = luaL_checkint(L, 3);
-	rect.right = luaL_checkint(L, 4);
-	rect.bottom = luaL_checkint(L, 5);
+	if (lua_gettop(L) == 3) {
+		const PointValue &leftTop = checkPoint(L, 2);
+		const PointValue &rightBottom = checkPoint(L, 3);
+		rect.left = (int32)roundCoordinate(leftTop.x);
+		rect.top = (int32)roundCoordinate(leftTop.y);
+		rect.right = (int32)roundCoordinate(rightBottom.x);
+		rect.bottom = (int32)roundCoordinate(rightBottom.y);
+	} else {
+		rect.left = luaL_checkint(L, 2);
+		rect.top = luaL_checkint(L, 3);
+		rect.right = luaL_checkint(L, 4);
+		rect.bottom = luaL_checkint(L, 5);
+	}
+
 	pushRect(L, rect);
 	return 1;
 }
 
+// Rect:New(left, top, right, bottom), and from Nancy27 on Rect:New(rect),
+// which copies it
+static int rectNew(lua_State *L) {
+	if (lua_gettop(L) == 2) {
+		pushRect(L, checkRect(L, 2));
+		return 1;
+	}
+
+	return rectNewLTRB(L);
+}
+
+// Rect:LTWH(left, top, width, height), and in Nancy28
+// Rect:LTWH(leftTop, size) with two points
 static int rectNewLTWH(lua_State *L) {
 	ScriptRect rect;
-	rect.left = luaL_checkint(L, 2);
-	rect.top = luaL_checkint(L, 3);
-	rect.right = rect.left + luaL_checkint(L, 4);
-	rect.bottom = rect.top + luaL_checkint(L, 5);
+	if (lua_gettop(L) == 3) {
+		const PointValue &leftTop = checkPoint(L, 2);
+		const PointValue &size = checkPoint(L, 3);
+		rect.left = (int32)roundCoordinate(leftTop.x);
+		rect.top = (int32)roundCoordinate(leftTop.y);
+		rect.right = (int32)roundCoordinate(leftTop.x + size.x);
+		rect.bottom = (int32)roundCoordinate(leftTop.y + size.y);
+	} else {
+		rect.left = luaL_checkint(L, 2);
+		rect.top = luaL_checkint(L, 3);
+		rect.right = rect.left + luaL_checkint(L, 4);
+		rect.bottom = rect.top + luaL_checkint(L, 5);
+	}
+
 	pushRect(L, rect);
 	return 1;
 }
@@ -350,7 +392,7 @@ static const luaL_Reg kRectFunctions[] = {
 static const luaL_Reg kRectHelperFunctions[] = {
 	{ "__index", indexFunctions },
 	{ "New", rectNew },
-	{ "LTRB", rectNew },
+	{ "LTRB", rectNewLTRB },
 	{ "LTWH", rectNewLTWH },
 	{ nullptr, nullptr }
 };
@@ -538,11 +580,6 @@ static int pointDivide(lua_State *L) {
 	return 1;
 }
 
-// Halves go away from zero
-static double roundCoordinate(float value) {
-	return value > 0.0f ? floor(value + 0.5) : ceil(value - 0.5);
-}
-
 // Point:Rounded() and Point:Floored(), Nancy27
 static int pointRounded(lua_State *L) {
 	const PointValue &point = checkPoint(L, 1);


Commit: d998abc0c4b90b37b8f0d673bfc962a52f98d81a
    https://github.com/scummvm/scummvm/commit/d998abc0c4b90b37b8f0d673bfc962a52f98d81a
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:17+02:00

Commit Message:
NANCY: NANCY28: Add Inventory:Clear

It puts the item in hand away and takes every item out of the inventory.

Changed paths:
    engines/nancy/script/v5/gamefunctions.cpp


diff --git a/engines/nancy/script/v5/gamefunctions.cpp b/engines/nancy/script/v5/gamefunctions.cpp
index 8fbecce758f..60fcf7982dc 100644
--- a/engines/nancy/script/v5/gamefunctions.cpp
+++ b/engines/nancy/script/v5/gamefunctions.cpp
@@ -458,6 +458,19 @@ static int inventoryRemove(lua_State *L) {
 	return 0;
 }
 
+// Inventory:Clear(), Nancy28: puts the item in hand away, and takes every item
+// out of the inventory
+static int inventoryClear(lua_State *L) {
+	NancySceneState.setHeldItem(-1);
+
+	const Common::Array<int16> items = NancySceneState.getInventoryOrder();
+	for (int16 id : items) {
+		NancySceneState.removeItemFromInventory(id, false);
+	}
+
+	return 0;
+}
+
 static int inventoryContains(lua_State *L) {
 	lua_pushboolean(L, NancySceneState.hasItem(checkItem(L, 2).id) == g_nancy->_true);
 	return 1;
@@ -495,6 +508,7 @@ static int inventoryAll(lua_State *L) {
 static const luaL_Reg kInventoryFunctions[] = {
 	{ "Add", inventoryAdd },
 	{ "Remove", inventoryRemove },
+	{ "Clear", inventoryClear },
 	{ "Contains", inventoryContains },
 	{ "Exists", inventoryExists },
 	{ "IsViewable", inventoryIsViewable },


Commit: 3650b6871afb247b4341140de29680da995ebad4
    https://github.com/scummvm/scummvm/commit/3650b6871afb247b4341140de29680da995ebad4
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:17+02:00

Commit Message:
NANCY: NANCY28: Add Message:Send

Scripts send a message to a record by its name, without a record of
their own to send it from, and get back what the receiver returns.

Changed paths:
    engines/nancy/script/v5/gamefunctions.cpp


diff --git a/engines/nancy/script/v5/gamefunctions.cpp b/engines/nancy/script/v5/gamefunctions.cpp
index 60fcf7982dc..6d0567afe7e 100644
--- a/engines/nancy/script/v5/gamefunctions.cpp
+++ b/engines/nancy/script/v5/gamefunctions.cpp
@@ -39,6 +39,7 @@
 #include "engines/nancy/script/v5/brain.h"
 
 #include "engines/nancy/script/v5/gamefunctions.h"
+#include "engines/nancy/script/v5/messaging.h"
 #include "engines/nancy/script/v5/scriptinput.h"
 
 #include "engines/nancy/state/scene.h"
@@ -706,6 +707,16 @@ static int logWarn(lua_State *L) {
 	return 0;
 }
 
+// Message:Send(recipient, action, ...), Nancy28: a message that comes from no
+// record, which returns what the receiver returns. The Message global of the
+// earlier games sends to the UI, and from Nancy26 on none of their scripts that
+// still use it are run.
+static int messageSend(lua_State *L) {
+	const Common::String recipient = luaL_checkstring(L, 2);
+	const Common::String action = luaL_checkstring(L, 3);
+	return sendMessage(L, "", recipient, action, 4, MAX(0, lua_gettop(L) - 3));
+}
+
 void registerNancy26GameAPI(lua_State *L) {
 	replaceFunction(L, "ND.Flags", "__index", flagsIndex);
 	replaceFunction(L, "ND.VarTable", "__index", varTableIndex);
@@ -755,6 +766,15 @@ void registerNancy26GameAPI(lua_State *L) {
 	addFunctions(L, "ND.Scene", kSceneFunctions);
 	addFunctions(L, "ND.Log", kLogFunctions);
 
+	if (g_nancy->getGameType() >= kGameTypeNancy28) {
+		static const luaL_Reg kMessageFunctions[] = {
+			{ "Send", messageSend },
+			{ nullptr, nullptr }
+		};
+
+		addFunctions(L, "ND.Message", kMessageFunctions);
+	}
+
 	registerBrainAPI(L);
 }
 


Commit: 5f881e03ce80327e706018028a2c2975caa95eb8
    https://github.com/scummvm/scummvm/commit/5f881e03ce80327e706018028a2c2975caa95eb8
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:18+02:00

Commit Message:
NANCY: NANCY28: Play movies at the frame rate of their record

Movie records play at 15 frames a second, or at the framerate their
script sets, whatever the frame rate of the video. Some of the scares
play their 15 frames per second videos at 24 or 30.

Changed paths:
    engines/nancy/movieplayer.cpp
    engines/nancy/movieplayer.h
    engines/nancy/script/records.cpp
    engines/nancy/script/records.h


diff --git a/engines/nancy/movieplayer.cpp b/engines/nancy/movieplayer.cpp
index e690af1cdbc..21a24ce7365 100644
--- a/engines/nancy/movieplayer.cpp
+++ b/engines/nancy/movieplayer.cpp
@@ -300,13 +300,25 @@ void MoviePlayer::goToFrame(int frameNr) {
 	storeCurrentFrame();
 }
 
-// How long a frame shows, from the length of the movie
+// How long a frame shows, from the length of the movie unless another frame
+// rate was set
 double MoviePlayer::getFrameMillis() const {
+	if (_frameRate > 0.0) {
+		return 1000.0 / _frameRate;
+	}
+
 	const int frameCount = _decoder->getFrameCount();
 	const uint32 durationMs = _decoder->getDuration().msecs();
 	return (frameCount > 0 && durationMs > 0) ? (double)durationMs / frameCount : 1000.0 / 15.0;
 }
 
+void MoviePlayer::setFrameRate(double framesPerSecond) {
+	_frameRate = MAX(framesPerSecond, 0.0);
+	if (_decoder) {
+		_frameMillis = getFrameMillis();
+	}
+}
+
 void MoviePlayer::playRange(int first, int last) {
 	if (!_decoder) {
 		return;
diff --git a/engines/nancy/movieplayer.h b/engines/nancy/movieplayer.h
index 94b2f3fb4e3..67b8c3fb0aa 100644
--- a/engines/nancy/movieplayer.h
+++ b/engines/nancy/movieplayer.h
@@ -113,6 +113,9 @@ public:
 	// Advances by the time that went by in the game, which stops while the
 	// movie isn't run. A movie that falls behind skips frames to catch up.
 	bool advance(double elapsedMillis);
+	// The frames per second the frame-range player plays at, instead of the
+	// movie's own; 0 for the movie's own
+	void setFrameRate(double framesPerSecond);
 	bool isRangePlaying() const { return _rangePlaying; }
 	int getCurrentFrame() const { return getCurFrame(); }
 	void drawFrame(Graphics::ManagedSurface &dst, const Common::Point &pos) const;
@@ -161,6 +164,7 @@ private:
 	double _playedMillis = 0.0;		// how long advance() has played the range
 	double _nextPlayedFrame = 0.0;	// when advance() shows the next frame
 	double _frameMillis = 1000.0 / 15.0;
+	double _frameRate = 0.0;
 };
 
 } // End of namespace Nancy
diff --git a/engines/nancy/script/records.cpp b/engines/nancy/script/records.cpp
index 875dfa932a5..a3cfb684904 100644
--- a/engines/nancy/script/records.cpp
+++ b/engines/nancy/script/records.cpp
@@ -2464,6 +2464,14 @@ void MovieRecord::readTable(int tableIndex) {
 	readField(L, tableIndex, "volume", volume);
 	_player.setVolume((byte)CLIP<int>((int)(volume * 100.0 + 0.5), 0, 100));
 
+	// Nancy28 plays the movies at 15 frames a second, or what the script asks
+	// for, whatever the frame rate of the movie
+	if (g_nancy->getGameType() >= kGameTypeNancy28) {
+		_frameRate = 15.0;
+		readField(L, tableIndex, "framerate", _frameRate);
+		_player.setFrameRate(_frameRate);
+	}
+
 	// true is forever, false once, and a number that many times
 	lua_getfield(L, tableIndex, "loop");
 	if (lua_isboolean(L, -1)) {
@@ -2723,6 +2731,8 @@ bool MovieRecord::getField(const Common::String &key) {
 		lua_pushinteger(L, _lastFrame);
 	} else if (key == "frames") {
 		lua_pushinteger(L, _player.getFrameCount());
+	} else if (key == "framerate" && _frameRate > 0.0) {
+		lua_pushnumber(L, _frameRate);
 	} else {
 		return false;
 	}
@@ -2757,6 +2767,9 @@ bool MovieRecord::setField(const Common::String &key) {
 		_player.setVolume((byte)CLIP<int>((int)(luaL_checknumber(L, 3) * 100.0 + 0.5), 0, 100));
 	} else if (key == "pauseOnLastFrame") {
 		_pausesOnLastFrame = lua_toboolean(L, 3) != 0;
+	} else if (key == "framerate" && g_nancy->getGameType() >= kGameTypeNancy28) {
+		_frameRate = MAX(luaL_checknumber(L, 3), 0.0);
+		_player.setFrameRate(_frameRate);
 	} else if (key == "paused") {
 		// Nancy24 has no Play and Pause anymore
 		_isPaused = lua_toboolean(L, 3) != 0;
diff --git a/engines/nancy/script/records.h b/engines/nancy/script/records.h
index 35669278033..7942b88796e 100644
--- a/engines/nancy/script/records.h
+++ b/engines/nancy/script/records.h
@@ -506,6 +506,7 @@ private:
 	ScriptRect _source;
 	ScriptRect _dest;
 	uint32 _modColor = 0xFFFFFFFF;	// what the colors of the frames get multiplied with
+	double _frameRate = 0.0;		// Nancy28, 0 for the movie's own
 
 	// What a turned, resized or colored frame gets drawn from. It is kept while
 	// the movie stays at the frame, for the transform to move it around.


Commit: 19947a46b8c48ff96a0cfbf9957d8c633ec091b7
    https://github.com/scummvm/scummvm/commit/19947a46b8c48ff96a0cfbf9957d8c633ec091b7
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:18+02:00

Commit Message:
NANCY: NANCY28: Show the tooltips of hotspots

A hotspot with a tooltip asks its tooltip manager, "Tooltip" unless it
names another, to show the tooltip while the mouse is over it, and to
hide it when the mouse leaves. The cheat tools show their tooltips this
way.

Changed paths:
    engines/nancy/script/v5/widgets.cpp
    engines/nancy/script/v5/widgets.h


diff --git a/engines/nancy/script/v5/widgets.cpp b/engines/nancy/script/v5/widgets.cpp
index 84c526bf6a9..78d79b0f9ab 100644
--- a/engines/nancy/script/v5/widgets.cpp
+++ b/engines/nancy/script/v5/widgets.cpp
@@ -34,6 +34,7 @@
 #include "engines/nancy/script/ref.h"
 #include "engines/nancy/script/scenecontext.h"
 
+#include "engines/nancy/script/v5/messaging.h"
 #include "engines/nancy/script/v5/scriptinput.h"
 #include "engines/nancy/script/v5/widgets.h"
 
@@ -101,6 +102,12 @@ void HotspotRecord::readTable(int tableIndex) {
 	readField(L, tableIndex, "stream", _streamName);
 	readField(L, tableIndex, "watchLeft", _watchesLeft);
 	readField(L, tableIndex, "watchRight", _watchesRight);
+	readField(L, tableIndex, "tooltip", _tooltip);
+
+	Common::String tooltipManager;
+	if (readField(L, tableIndex, "tooltipManager", tooltipManager) && !tooltipManager.empty()) {
+		_tooltipManager = tooltipManager;
+	}
 
 	static const char *const kCursorNames[] = { "cursor", "startCursor", "downCursor", "dragOnCursor", "dragOffCursor" };
 	Cursor *const cursors[] = { &_cursor, &_startCursor, &_downCursor, &_dragOnCursor, &_dragOffCursor };
@@ -162,12 +169,41 @@ void HotspotRecord::setMouseOver(bool isOver) {
 	}
 
 	_isMouseOver = isOver;
+	sendTooltip(isOver);
 	callFunction(isOver ? "OnMouseOver" : "OnMouseLeave");
 	if (_widget) {
 		_widget->onHotspotOver(isOver);
 	}
 }
 
+// Nancy28. A hotspot with a tooltip has its manager show it while the mouse is
+// over it: Receive(manager, sender, "Show", tooltip, onScreen, transform), and
+// Receive(manager, sender, "Hide") when the mouse leaves
+void HotspotRecord::sendTooltip(bool isShown) {
+	if (_tooltip.empty() || _tooltipManager.empty()) {
+		return;
+	}
+
+	lua_State *L = getLua();
+	const int top = lua_gettop(L);
+	if (isShown) {
+		lua_pushstring(L, _tooltip.c_str());
+		pushRect(L, _onScreen);
+		pushMatrix(L, getTransform());
+		sendMessage(L, getUniqueAlias(), _tooltipManager, "Show", top + 1, 3);
+	} else {
+		sendMessage(L, getUniqueAlias(), _tooltipManager, "Hide", top + 1, 0);
+	}
+
+	lua_settop(L, top);
+}
+
+void HotspotRecord::onDie() {
+	if (_isMouseOver) {
+		sendTooltip(false);
+	}
+}
+
 bool HotspotRecord::pressRegion(int button) {
 	if (!(button == 0 ? _watchesLeft : _watchesRight)) {
 		return false;
@@ -275,6 +311,10 @@ bool HotspotRecord::getField(const Common::String &key) {
 		pushColor(L, _refColor);
 	} else if (key == "source") {
 		pushRect(L, _source);
+	} else if (key == "tooltip") {
+		lua_pushstring(L, _tooltip.c_str());
+	} else if (key == "tooltipManager") {
+		lua_pushstring(L, _tooltipManager.c_str());
 	} else {
 		return false;
 	}
@@ -316,6 +356,16 @@ bool HotspotRecord::setField(const Common::String &key) {
 		}
 	} else if (key == "source") {
 		_source = checkRect(L, 3);
+	} else if (key == "tooltip" || key == "tooltipManager") {
+		// A tooltip that is shown goes away, and the new one shows
+		if (_isMouseOver) {
+			sendTooltip(false);
+		}
+
+		(key == "tooltip" ? _tooltip : _tooltipManager) = luaL_checkstring(L, 3);
+		if (_isMouseOver) {
+			sendTooltip(true);
+		}
 	} else {
 		return false;
 	}
diff --git a/engines/nancy/script/v5/widgets.h b/engines/nancy/script/v5/widgets.h
index 147bfc93e8a..c62a04eaf9b 100644
--- a/engines/nancy/script/v5/widgets.h
+++ b/engines/nancy/script/v5/widgets.h
@@ -57,6 +57,7 @@ public:
 	bool pressRegion(int button) override;
 	void releaseRegion(int button) override;
 	bool getRegionCursor(uint &cursorType, bool &isHot) const override;
+	void onDie() override;
 
 	bool isMouseOver() const { return _isMouseOver; }
 	bool isDown() const { return _pressedButton >= 0; }
@@ -79,6 +80,7 @@ private:
 	void readCursorField(int valueIndex, Cursor &cursor);
 	void pushCursorField(const Cursor &cursor);
 	void fire();
+	void sendTooltip(bool isShown);
 
 	ScriptRect _onScreen;
 	Common::String _sceneName;
@@ -101,6 +103,11 @@ private:
 	bool _isMouseOver = false;
 	int _pressedButton = -1;	// 0 for the left one, 1 for the right one
 	WidgetRecord *_widget = nullptr;
+
+	// Nancy28. The autotext the record named by the manager shows while the
+	// mouse is over the hotspot
+	Common::String _tooltip;
+	Common::String _tooltipManager = "Tooltip";
 };
 
 // Nancy26: catches the player's input in a part of the screen, so whatever is


Commit: 9e7d509d53bfa98633c749857522040d82fb6c21
    https://github.com/scummvm/scummvm/commit/9e7d509d53bfa98633c749857522040d82fb6c21
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:20+02:00

Commit Message:
NANCY: NANCY28: Add the script filter of the cheat menu

The cheat menu that starts streams lists the scripts whose names have
every word typed in its filter, and selects the closest one, through
Game:SetScriptNameFilter, Game:GetScriptNameRange and
Game.closestFilteredMatch.

Changed paths:
    engines/nancy/script/v5/gamefunctions.cpp
    engines/nancy/script/v5/gamefunctions.h


diff --git a/engines/nancy/script/v5/gamefunctions.cpp b/engines/nancy/script/v5/gamefunctions.cpp
index 6d0567afe7e..4abd9401589 100644
--- a/engines/nancy/script/v5/gamefunctions.cpp
+++ b/engines/nancy/script/v5/gamefunctions.cpp
@@ -19,10 +19,12 @@
  *
  */
 
+#include "common/algorithm.h"
 #include "common/config-manager.h"
 #include "common/debug.h"
 #include "common/events.h"
 #include "common/system.h"
+#include "common/tokenizer.h"
 
 #include "audio/mixer.h"
 
@@ -31,6 +33,8 @@
 #include "engines/nancy/nancy.h"
 #include "engines/nancy/sound.h"
 
+#include "engines/nancy/resource/resource.h"
+
 #include "engines/nancy/script/api.h"
 #include "engines/nancy/script/luabind.h"
 #include "engines/nancy/script/records.h"
@@ -328,7 +332,85 @@ static int gameSetWindowed(lua_State *L) {
 	return 0;
 }
 
+// Game:SetScriptNameFilter(text), Nancy28: the cheat menu that starts streams
+// lists the scripts whose names have every word of the text in them, and
+// selects the first one that comes after the whole text in alphabetical order
+static int gameSetScriptNameFilter(lua_State *L) {
+	ScriptGameState &state = getGameState();
+	if (state.scriptNames.empty()) {
+		Common::Array<Common::Path> paths;
+		g_nancy->_resource->list("", paths, CifInfo::kResTypeScript);
+		for (const Common::Path &path : paths) {
+			Common::String name = path.toString();
+			name.toUppercase();
+			state.scriptNames.push_back(name);
+		}
+
+		Common::sort(state.scriptNames.begin(), state.scriptNames.end());
+	}
+
+	Common::String filter = luaL_checkstring(L, 2);
+	filter.toUppercase();
+
+	Common::Array<Common::String> words;
+	Common::StringTokenizer tokenizer(filter, " ");
+	while (!tokenizer.empty()) {
+		const Common::String word = tokenizer.nextToken();
+		if (!word.empty()) {
+			words.push_back(word);
+		}
+	}
+
+	state.filteredScriptNames.clear();
+	state.closestFilteredMatch = 0;
+	if (words.empty()) {
+		return 0;
+	}
+
+	bool hasClosest = false;
+	for (const Common::String &name : state.scriptNames) {
+		bool hasAllWords = true;
+		for (const Common::String &word : words) {
+			if (!name.contains(word)) {
+				hasAllWords = false;
+				break;
+			}
+		}
+
+		if (!hasAllWords) {
+			continue;
+		}
+
+		state.filteredScriptNames.push_back(name);
+		if (!hasClosest && name.compareTo(filter) >= 0) {
+			hasClosest = true;
+			state.closestFilteredMatch = state.filteredScriptNames.size() - 1;
+		}
+	}
+
+	return 0;
+}
+
+// Game:GetScriptNameRange(first, last), Nancy28: the scripts the filter let
+// through from first to last, counting from 1, as a table with those numbers
+// for keys
+static int gameGetScriptNameRange(lua_State *L) {
+	const Common::Array<Common::String> &names = getGameState().filteredScriptNames;
+	const int first = MAX(luaL_checkint(L, 2), 1);
+	const int last = MIN(MAX(luaL_checkint(L, 3), first), (int)names.size());
+
+	lua_newtable(L);
+	for (int i = first; i <= last; ++i) {
+		lua_pushstring(L, names[i - 1].c_str());
+		lua_rawseti(L, -2, i);
+	}
+
+	return 1;
+}
+
 static const luaL_Reg kGameFunctions[] = {
+	{ "SetScriptNameFilter", gameSetScriptNameFilter },
+	{ "GetScriptNameRange", gameGetScriptNameRange },
 	{ "Save", gameSave },
 	{ "Load", gameLoad },
 	{ "IsContinue", gameIsContinue },
@@ -365,6 +447,9 @@ static bool pushGameField(lua_State *L, const Common::String &key) {
 		lua_pushboolean(L, true);
 	} else if (key == "restarts") {
 		lua_pushinteger(L, getGameState().numRestarts);
+	} else if (key == "closestFilteredMatch") {
+		// Nancy28, counting from 1
+		lua_pushinteger(L, getGameState().closestFilteredMatch + 1);
 	} else {
 		return false;
 	}
diff --git a/engines/nancy/script/v5/gamefunctions.h b/engines/nancy/script/v5/gamefunctions.h
index 6d1375b25d4..05d53681336 100644
--- a/engines/nancy/script/v5/gamefunctions.h
+++ b/engines/nancy/script/v5/gamefunctions.h
@@ -49,6 +49,13 @@ struct ScriptGameState : public EngineData {
 	};
 
 	Common::Array<PausedChannel> pausedAbandonedChannels;
+
+	// Nancy28. The scripts of the game, in alphabetical order, the ones the
+	// filter of the cheat menu let through, and the index of the first one of
+	// those that comes after the filter
+	Common::Array<Common::String> scriptNames;
+	Common::Array<Common::String> filteredScriptNames;
+	uint closestFilteredMatch = 0;
 };
 
 // What Nancy26 adds to the objects of the earlier games: the saved games and


Commit: 53a8640c6dbefe8ef3d6454bfcef28bf12fc5e6e
    https://github.com/scummvm/scummvm/commit/53a8640c6dbefe8ef3d6454bfcef28bf12fc5e6e
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:21+02:00

Commit Message:
NANCY: NANCY28: Add the achievements

The Achievements object unlocks the achievements of the Steam release
through ScummVM's achievements manager, which keeps them outside the
saved games, and tells whether one is unlocked.

Changed paths:
    engines/nancy/metaengine.cpp
    engines/nancy/script/v5/gamefunctions.cpp
    engines/nancy/script/v5/gamefunctions.h


diff --git a/engines/nancy/metaengine.cpp b/engines/nancy/metaengine.cpp
index fe798c95f99..0d11f904288 100644
--- a/engines/nancy/metaengine.cpp
+++ b/engines/nancy/metaengine.cpp
@@ -133,6 +133,9 @@ public:
 
 	const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override;
 
+	Common::AchievementsPlatform getAchievementsPlatform(const Common::String &target) const override;
+	const Common::AchievementDescriptionList *getAchievementDescriptionList() const override;
+
 	Nancy::GameType getGameType(const char *gameId) const;
 };
 
@@ -240,6 +243,20 @@ void NancyMetaEngine::registerDefaultSettings(const Common::String &target) cons
 	ConfMan.registerDefault("originalsaveload", true);
 }
 
+// Nancy28 has the achievements of its Steam release, the only one there is
+Common::AchievementsPlatform NancyMetaEngine::getAchievementsPlatform(const Common::String &target) const {
+	return Common::STEAM_ACHIEVEMENTS;
+}
+
+const Common::AchievementDescriptionList *NancyMetaEngine::getAchievementDescriptionList() const {
+	static const Common::AchievementDescriptionList achievementDescriptionList[] = {
+		{ "nancy28", Common::STEAM_ACHIEVEMENTS, "226820" },
+		ACHIEVEMENT_DESC_TABLE_END_MARKER
+	};
+
+	return achievementDescriptionList;
+}
+
 const ADExtraGuiOptionsMap *NancyMetaEngine::getAdvancedExtraGuiOptions() const {
 	return optionsList;
 }
diff --git a/engines/nancy/script/v5/gamefunctions.cpp b/engines/nancy/script/v5/gamefunctions.cpp
index 4abd9401589..b0b0d34ffc7 100644
--- a/engines/nancy/script/v5/gamefunctions.cpp
+++ b/engines/nancy/script/v5/gamefunctions.cpp
@@ -28,6 +28,9 @@
 
 #include "audio/mixer.h"
 
+#include "engines/achievements.h"
+#include "engines/metaengine.h"
+
 #include "engines/nancy/enginedata.h"
 #include "engines/nancy/graphics.h"
 #include "engines/nancy/nancy.h"
@@ -802,6 +805,86 @@ static int messageSend(lua_State *L) {
 	return sendMessage(L, "", recipient, action, 4, MAX(0, lua_gettop(L) - 3));
 }
 
+// Achievements, Nancy28: the achievements of the Steam release, which are
+// kept by ScummVM's achievements manager. Achievements.<id> is whether it is
+// unlocked.
+
+static const char *const kAchievementsType = "ND.Achievements";
+
+static bool isAchievementKnown(const Common::String &id) {
+	for (const Common::String &known : getGameState().achievementIds) {
+		if (known == id) {
+			return true;
+		}
+	}
+
+	return false;
+}
+
+// Achievements:InitIDs({ id, ... }) gives the achievements there are, once
+static int achievementsInitIDs(lua_State *L) {
+	luaL_checktype(L, 2, LUA_TTABLE);
+	ScriptGameState &state = getGameState();
+	if (state.hasAchievementIds) {
+		return luaL_error(L, "Achievements are already loaded");
+	}
+
+	state.hasAchievementIds = true;
+	const int numIds = (int)lua_objlen(L, 2);
+	for (int i = 1; i <= numIds; ++i) {
+		lua_rawgeti(L, 2, i);
+		state.achievementIds.push_back(luaL_checkstring(L, -1));
+		lua_pop(L, 1);
+	}
+
+	AchMan.setActiveDomain(g_engine->getMetaEngine()->getAchievementsInfo(ConfMan.getActiveDomainName()));
+	return 0;
+}
+
+static int achievementsGetIDs(lua_State *L) {
+	const Common::Array<Common::String> &ids = getGameState().achievementIds;
+	lua_createtable(L, ids.size(), 0);
+	for (uint i = 0; i < ids.size(); ++i) {
+		lua_pushstring(L, ids[i].c_str());
+		lua_rawseti(L, -2, i + 1);
+	}
+
+	return 1;
+}
+
+// Achievements:Unlock(id) does nothing for an achievement InitIDs didn't give
+static int achievementsUnlock(lua_State *L) {
+	const Common::String id = luaL_checkstring(L, 2);
+	if (isAchievementKnown(id) && AchMan.isReady()) {
+		AchMan.setAchievement(id);
+	}
+
+	return 0;
+}
+
+// Achievements:ClearAll(), for the cheat menu
+static int achievementsClearAll(lua_State *L) {
+	if (AchMan.isReady()) {
+		for (const Common::String &id : getGameState().achievementIds) {
+			AchMan.clearAchievement(id);
+		}
+	}
+
+	return 0;
+}
+
+static int achievementsIndex(lua_State *L) {
+	const Common::String key = luaL_checkstring(L, 2);
+	indexFunctions(L);
+	if (!lua_isnil(L, -1)) {
+		return 1;
+	}
+
+	lua_pop(L, 1);
+	lua_pushboolean(L, isAchievementKnown(key) && AchMan.isReady() && AchMan.isAchieved(key));
+	return 1;
+}
+
 void registerNancy26GameAPI(lua_State *L) {
 	replaceFunction(L, "ND.Flags", "__index", flagsIndex);
 	replaceFunction(L, "ND.VarTable", "__index", varTableIndex);
@@ -860,6 +943,17 @@ void registerNancy26GameAPI(lua_State *L) {
 		addFunctions(L, "ND.Message", kMessageFunctions);
 	}
 
+	static const luaL_Reg kAchievementsFunctions[] = {
+		{ "__index", achievementsIndex },
+		{ "InitIDs", achievementsInitIDs },
+		{ "GetIDs", achievementsGetIDs },
+		{ "Unlock", achievementsUnlock },
+		{ "ClearAll", achievementsClearAll },
+		{ nullptr, nullptr }
+	};
+
+	registerGlobal(L, "Achievements", kAchievementsType, kAchievementsFunctions);
+
 	registerBrainAPI(L);
 }
 
diff --git a/engines/nancy/script/v5/gamefunctions.h b/engines/nancy/script/v5/gamefunctions.h
index 05d53681336..57579b74aaf 100644
--- a/engines/nancy/script/v5/gamefunctions.h
+++ b/engines/nancy/script/v5/gamefunctions.h
@@ -56,6 +56,11 @@ struct ScriptGameState : public EngineData {
 	Common::Array<Common::String> scriptNames;
 	Common::Array<Common::String> filteredScriptNames;
 	uint closestFilteredMatch = 0;
+
+	// Nancy28. The achievements the game knows of, which Achievements:InitIDs()
+	// gives once
+	Common::Array<Common::String> achievementIds;
+	bool hasAchievementIds = false;
 };
 
 // What Nancy26 adds to the objects of the earlier games: the saved games and


Commit: 0d21ce5ebf75868226264b8692b7e14c388b2c7b
    https://github.com/scummvm/scummvm/commit/0d21ce5ebf75868226264b8692b7e14c388b2c7b
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:23+02:00

Commit Message:
NANCY: NANCY28: Read the new format of the Brain

The Brain holds the conditions the scripts check by name. Nancy28's
entries say which ones the scripts set themselves and which ones keep
their last result until asked to work it out again; both kinds are
kept in the saved game. Each one also has a description, and a later
entry with the same name replaces the one before.

Changed paths:
    engines/nancy/puzzledata.h
    engines/nancy/script/v5/brain.cpp
    engines/nancy/script/v5/brain.h


diff --git a/engines/nancy/puzzledata.h b/engines/nancy/puzzledata.h
index 5021512c726..25a721bec2b 100644
--- a/engines/nancy/puzzledata.h
+++ b/engines/nancy/puzzledata.h
@@ -744,7 +744,8 @@ struct ScriptSavedData : public PuzzleData {
 };
 
 // Nancy27. The results of the conditions of the Brain that are only worked out
-// again when the scripts ask for it
+// again when the scripts ask for it, and from Nancy28 on the flags of the Brain
+// the scripts set
 struct BrainData : public PuzzleData {
 	static constexpr uint32 getTag() { return MKTAG('B', 'R', 'N', 'S'); }
 	virtual void synchronize(Common::Serializer &ser);
diff --git a/engines/nancy/script/v5/brain.cpp b/engines/nancy/script/v5/brain.cpp
index ce3a0a5663f..0c01146c790 100644
--- a/engines/nancy/script/v5/brain.cpp
+++ b/engines/nancy/script/v5/brain.cpp
@@ -59,8 +59,9 @@ BrainLogic::~BrainLogic() {
 	delete _lua;
 }
 
-// BrainInit:Create({ { name, isAutoUpdated, function }, ... }). The names
-// end in "_BR".
+// BrainInit:Create({ entry, ... }). Nancy27's entries are
+// { name, isAutoUpdated, function }, Nancy28's are { id, enabled, name, tags,
+// isWritable, isCached, function, description, date }. The names end in "_BR".
 int BrainLogic::brainInitCreate(lua_State *L) {
 	BrainLogic *brain = *(BrainLogic **)checkUserData(L, 1, kBrainInitType);
 	luaL_checktype(L, 2, LUA_TTABLE);
@@ -72,116 +73,208 @@ int BrainLogic::brainInitCreate(lua_State *L) {
 	for (int i = 1; i <= numEntries; ++i) {
 		lua_rawgeti(L, 2, i);
 		luaL_checktype(L, -1, LUA_TTABLE);
-
-		lua_rawgeti(L, -1, 1);
-		lua_rawgeti(L, -2, 2);
-		lua_rawgeti(L, -3, 3);
-		if (!lua_isstring(L, -3) || !lua_isboolean(L, -2)) {
-			return luaL_error(L, "Entry %d of the Brain does not have enough fields", i);
+		if (g_nancy->getGameType() >= kGameTypeNancy28) {
+			brain->readNancy28Entry(L, i);
+		} else {
+			brain->readNancy27Entry(L, i);
 		}
 
-		if (!lua_isfunction(L, -1)) {
-			return luaL_error(L, "Entry %d of the Brain has no logic function", i);
-		}
+		lua_pop(L, 1);
+	}
 
-		Logic logic;
-		logic.name = lua_tostring(L, -3);
-		logic.isAutoUpdated = lua_toboolean(L, -2) != 0;
+	return 0;
+}
 
-		if (!logic.name.hasSuffix("_BR")) {
-			warning("Logic %s of the Brain is not properly tagged", logic.name.c_str());
-			lua_pop(L, 4);
-			continue;
-		}
+// The entry is on the top of the stack
+void BrainLogic::readNancy27Entry(lua_State *L, int index) {
+	lua_rawgeti(L, -1, 1);
+	lua_rawgeti(L, -2, 2);
+	lua_rawgeti(L, -3, 3);
+	if (!lua_isstring(L, -3) || !lua_isboolean(L, -2)) {
+		luaL_error(L, "Entry %d of the Brain does not have enough fields", index);
+	}
 
-		if (brain->findLogic(logic.name)) {
-			warning("Name %s appears more than once in the Brain", logic.name.c_str());
-			lua_pop(L, 4);
-			continue;
-		}
+	if (!lua_isfunction(L, -1)) {
+		luaL_error(L, "Entry %d of the Brain has no logic function", index);
+	}
 
-		logic.functionRef = luaL_ref(L, LUA_REGISTRYINDEX);
-		brain->_logic.push_back(logic);
+	Logic logic;
+	logic.name = lua_tostring(L, -3);
+	logic.isCached = lua_toboolean(L, -2) == 0;
+
+	if (!logic.name.hasSuffix("_BR")) {
+		warning("Logic %s of the Brain is not properly tagged", logic.name.c_str());
 		lua_pop(L, 3);
+		return;
 	}
 
-	return 0;
+	if (findLogic(logic.name)) {
+		warning("Name %s appears more than once in the Brain", logic.name.c_str());
+		lua_pop(L, 3);
+		return;
+	}
+
+	logic.functionRef = luaL_ref(L, LUA_REGISTRYINDEX);
+	lua_pop(L, 2);
+	addLogic(logic);
 }
 
-const BrainLogic::Logic *BrainLogic::findLogic(const Common::String &name) const {
-	for (const Logic &logic : _logic) {
-		if (logic.name.equalsIgnoreCase(name)) {
-			return &logic;
+// Brain_SC keeps every version of an entry, and the last one counts. Entries
+// without the second field are left out.
+void BrainLogic::readNancy28Entry(lua_State *L, int index) {
+	lua_rawgeti(L, -1, 2);
+	const bool isEnabled = !lua_isnil(L, -1);
+	lua_pop(L, 1);
+	if (!isEnabled) {
+		return;
+	}
+
+	Logic logic;
+	logic.isWritable = true;
+	logic.isCached = true;
+
+	lua_rawgeti(L, -1, 3);
+	if (!lua_isstring(L, -1)) {
+		luaL_error(L, "Entry %d of the Brain has no name", index);
+	}
+
+	logic.name = lua_tostring(L, -1);
+
+	lua_rawgeti(L, -2, 5);
+	if (lua_isboolean(L, -1)) {
+		logic.isWritable = lua_toboolean(L, -1) != 0;
+	}
+
+	lua_rawgeti(L, -3, 6);
+	if (lua_isboolean(L, -1)) {
+		logic.isCached = lua_toboolean(L, -1) != 0;
+	}
+
+	lua_rawgeti(L, -4, 8);
+	if (lua_isstring(L, -1)) {
+		logic.description = lua_tostring(L, -1);
+	}
+
+	lua_pop(L, 4);
+
+	// The descriptions have their commas as backquotes
+	for (uint i = 0; i < logic.description.size(); ++i) {
+		if (logic.description[i] == '`') {
+			logic.description.setChar(',', i);
 		}
 	}
 
-	return nullptr;
+	// A writable entry is a flag, and has no function. Some of the others have
+	// none either, and are always false.
+	if (!logic.isWritable) {
+		lua_rawgeti(L, -1, 7);
+		if (lua_isfunction(L, -1)) {
+			logic.functionRef = luaL_ref(L, LUA_REGISTRYINDEX);
+		} else {
+			lua_pop(L, 1);
+		}
+	}
+
+	LogicMap::iterator previous = _logic.find(logic.name);
+	if (previous != _logic.end()) {
+		if (previous->_value.functionRef) {
+			luaL_unref(L, LUA_REGISTRYINDEX, previous->_value.functionRef);
+		}
+
+		logic.name = previous->_value.name;
+		previous->_value = logic;
+	} else {
+		addLogic(logic);
+	}
+}
+
+void BrainLogic::addLogic(const Logic &logic) {
+	_names.push_back(logic.name);
+	_logic.setVal(logic.name, logic);
+}
+
+const BrainLogic::Logic *BrainLogic::findLogic(const Common::String &name) const {
+	LogicMap::const_iterator it = _logic.find(name);
+	return it != _logic.end() ? &it->_value : nullptr;
 }
 
-// Runs the function of a condition, and keeps the result of one that isn't
-// updated automatically. A function that fails changes nothing.
-bool BrainLogic::evaluate(const Logic &logic, bool &value) {
+// Runs the function of a condition, and keeps the result of a cached one. A
+// function that fails gives what it gave the last time.
+bool BrainLogic::evaluate(Logic &logic) {
 	lua_State *L = _lua->get();
 	lua_rawgeti(L, LUA_REGISTRYINDEX, logic.functionRef);
 	const Common::String what = Common::String::format("Function for %s failed", logic.name.c_str());
 	if (!LuaState::call(L, 0, 1, what.c_str())) {
-		return false;
+		return logic.lastResult;
 	}
 
-	value = lua_toboolean(L, -1) != 0;
+	logic.lastResult = lua_toboolean(L, -1) != 0;
 	lua_pop(L, 1);
 
-	if (!logic.isAutoUpdated) {
+	if (logic.isCached) {
 		BrainData *data = (BrainData *)NancySceneState.getPuzzleData(BrainData::getTag());
-		data->results.setVal(logic.name, value);
+		data->results.setVal(logic.name, logic.lastResult);
 	}
 
-	return true;
+	return logic.lastResult;
 }
 
-bool BrainLogic::getValue(const Common::String &name, bool &value) {
-	const Logic *logic = findLogic(name);
-	if (!logic) {
+// A writable condition that was never set is false, and a cached one that was
+// never worked out is worked out now
+bool BrainLogic::getValue(const Common::String &name) {
+	LogicMap::iterator it = _logic.find(name);
+	if (it == _logic.end()) {
 		return false;
 	}
 
-	value = false;
-	if (!logic->isAutoUpdated) {
+	Logic &logic = it->_value;
+	if (logic.isWritable || logic.isCached) {
 		const BrainData *data = (const BrainData *)NancySceneState.getPuzzleData(BrainData::getTag());
-		if (data->results.tryGetVal(logic->name, value)) {
-			return true;
+		bool value = false;
+		if (data->results.tryGetVal(logic.name, value) || logic.isWritable) {
+			return value;
 		}
 	}
 
-	evaluate(*logic, value);
-	return true;
+	return evaluate(logic);
 }
 
-bool BrainLogic::isAutoUpdated(const Common::String &name) const {
+bool BrainLogic::isCached(const Common::String &name) const {
 	const Logic *logic = findLogic(name);
-	return logic && logic->isAutoUpdated;
+	return logic && logic->isCached;
 }
 
-void BrainLogic::update(const Common::String &name) {
+bool BrainLogic::isWritable(const Common::String &name) const {
 	const Logic *logic = findLogic(name);
-	bool value;
-	if (logic) {
-		evaluate(*logic, value);
-	}
+	return logic && logic->isWritable;
 }
 
-// The cheat menu sets the conditions that keep their results
-void BrainLogic::overrideValue(const Common::String &name, bool value) {
+Common::String BrainLogic::getDescription(const Common::String &name) const {
+	const Logic *logic = findLogic(name);
+	return logic ? logic->description : Common::String();
+}
+
+void BrainLogic::setValue(const Common::String &name, bool value) {
 	const Logic *logic = findLogic(name);
-	if (logic && !logic->isAutoUpdated) {
+	if (logic && logic->isWritable) {
 		BrainData *data = (BrainData *)NancySceneState.getPuzzleData(BrainData::getTag());
 		data->results.setVal(logic->name, value);
 	}
 }
 
-void BrainLogic::getNames(Common::Array<Common::String> &names) const {
-	for (const Logic &logic : _logic) {
-		names.push_back(logic.name);
+void BrainLogic::update(const Common::String &name) {
+	LogicMap::iterator it = _logic.find(name);
+	if (it != _logic.end() && !it->_value.isWritable) {
+		evaluate(it->_value);
+	}
+}
+
+// The cheat menu sets the conditions that keep their results
+void BrainLogic::overrideValue(const Common::String &name, bool value) {
+	const Logic *logic = findLogic(name);
+	if (logic && logic->isCached && !logic->isWritable) {
+		BrainData *data = (BrainData *)NancySceneState.getPuzzleData(BrainData::getTag());
+		data->results.setVal(logic->name, value);
 	}
 }
 
@@ -194,11 +287,19 @@ static BrainLogic &getBrain(lua_State *L) {
 	return *brain;
 }
 
+// The name of a condition, from the argument at the index
+static Common::String checkLogicName(lua_State *L, int index) {
+	const Common::String name = luaL_checkstring(L, index);
+	if (!getBrain(L).exists(name)) {
+		luaL_error(L, "There is no flag named %s", name.c_str());
+	}
+
+	return name;
+}
+
 // Brain:AllNames(): an array of the names of all conditions
 static int brainAllNames(lua_State *L) {
-	Common::Array<Common::String> names;
-	getBrain(L).getNames(names);
-
+	const Common::Array<Common::String> &names = getBrain(L).getNames();
 	lua_createtable(L, names.size(), 0);
 	for (uint i = 0; i < names.size(); ++i) {
 		lua_pushstring(L, names[i].c_str());
@@ -208,28 +309,67 @@ static int brainAllNames(lua_State *L) {
 	return 1;
 }
 
+// Nancy27
 static int brainIsAutoUpdated(lua_State *L) {
-	lua_pushboolean(L, getBrain(L).isAutoUpdated(luaL_checkstring(L, 2)));
+	const Common::String name = checkLogicName(L, 2);
+	lua_pushboolean(L, !getBrain(L).isCached(name) && !getBrain(L).isWritable(name));
+	return 1;
+}
+
+// Nancy28
+static int brainIsCached(lua_State *L) {
+	lua_pushboolean(L, getBrain(L).isCached(checkLogicName(L, 2)));
+	return 1;
+}
+
+// Nancy28
+static int brainIsWritable(lua_State *L) {
+	lua_pushboolean(L, getBrain(L).isWritable(checkLogicName(L, 2)));
 	return 1;
 }
 
+// Brain:Logic(name), Nancy28: the description of a condition, for the cheat menu
+static int brainLogic(lua_State *L) {
+	lua_pushstring(L, getBrain(L).getDescription(checkLogicName(L, 2)).c_str());
+	return 1;
+}
+
+// Nancy28 only lets the cheat menu and Brain:Update() work on cached conditions
+static void checkCachedLogic(lua_State *L, const Common::String &name) {
+	if (g_nancy->getGameType() < kGameTypeNancy28) {
+		return;
+	}
+
+	if (getBrain(L).isWritable(name)) {
+		luaL_error(L, "Flag %s is writable", name.c_str());
+	}
+
+	if (!getBrain(L).isCached(name)) {
+		luaL_error(L, "Flag %s is not cached", name.c_str());
+	}
+}
+
+// Brain:Update(name) works out a condition again
 static int brainUpdate(lua_State *L) {
-	getBrain(L).update(luaL_checkstring(L, 2));
+	const Common::String name = checkLogicName(L, 2);
+	checkCachedLogic(L, name);
+	getBrain(L).update(name);
 	return 0;
 }
 
 static int brainOverrideFromCheat(lua_State *L) {
-	getBrain(L).overrideValue(luaL_checkstring(L, 2), lua_toboolean(L, 3) != 0);
+	const Common::String name = checkLogicName(L, 2);
+	checkCachedLogic(L, name);
+	getBrain(L).overrideValue(name, lua_toboolean(L, 3) != 0);
 	return 0;
 }
 
 // Brain.<name>: the result of a condition
 static int brainIndex(lua_State *L) {
 	const char *name = luaL_checkstring(L, 2);
-
-	bool value;
-	if (getBrain(L).getValue(name, value)) {
-		lua_pushboolean(L, value);
+	BrainLogic &brain = getBrain(L);
+	if (brain.exists(name)) {
+		lua_pushboolean(L, brain.getValue(name));
 		return 1;
 	}
 
@@ -241,11 +381,26 @@ static int brainIndex(lua_State *L) {
 	return 1;
 }
 
+// Brain.<name> = value, Nancy28: sets a writable condition
+static int brainNewIndex(lua_State *L) {
+	const Common::String name = checkLogicName(L, 2);
+	if (!getBrain(L).isWritable(name)) {
+		return luaL_error(L, "Flag %s is not writable", name.c_str());
+	}
+
+	getBrain(L).setValue(name, lua_toboolean(L, 3) != 0);
+	return 0;
+}
+
 void registerBrainAPI(lua_State *L) {
 	static const luaL_Reg kBrainFunctions[] = {
 		{ "__index", brainIndex },
+		{ "__newindex", brainNewIndex },
 		{ "AllNames", brainAllNames },
 		{ "IsAutoUpdated", brainIsAutoUpdated },
+		{ "IsCached", brainIsCached },
+		{ "IsWritable", brainIsWritable },
+		{ "Logic", brainLogic },
 		{ "Update", brainUpdate },
 		{ "OverrideFromCheat", brainOverrideFromCheat },
 		{ nullptr, nullptr }
diff --git a/engines/nancy/script/v5/brain.h b/engines/nancy/script/v5/brain.h
index 655fa3b6712..8637ef49ba9 100644
--- a/engines/nancy/script/v5/brain.h
+++ b/engines/nancy/script/v5/brain.h
@@ -23,6 +23,8 @@
 #define NANCY_SCRIPT_V5_BRAIN_H
 
 #include "common/array.h"
+#include "common/hash-str.h"
+#include "common/hashmap.h"
 #include "common/str.h"
 
 #include "engines/nancy/enginedata.h"
@@ -37,35 +39,50 @@ class LuaState;
 // Nancy27. The conditions Brain_SC gives names to ("Hum_Ready_BR"), which
 // scripts read as booleans through the Brain global. Each one is a function
 // that keeps running in a Lua state of its own for the whole game. Those that
-// aren't updated automatically keep their last result, which is saved with
-// the game, until a script asks for it to be worked out again.
+// are cached keep their last result, which is saved with the game, until a
+// script asks for it to be worked out again.
+// Nancy28 adds writable ones, which have no function: they are flags the
+// scripts set with Brain.<name> = value, and are saved with the game as well.
 class BrainLogic : public EngineData {
 public:
 	BrainLogic();
 	~BrainLogic() override;
 
-	// Returns false when there is no condition of that name
-	bool getValue(const Common::String &name, bool &value);
-	bool isAutoUpdated(const Common::String &name) const;
+	bool exists(const Common::String &name) const { return findLogic(name) != nullptr; }
+	bool getValue(const Common::String &name);
+	bool isCached(const Common::String &name) const;
+	bool isWritable(const Common::String &name) const;
+	Common::String getDescription(const Common::String &name) const;
+
+	void setValue(const Common::String &name, bool value);
 	void update(const Common::String &name);
 	void overrideValue(const Common::String &name, bool value);
 
-	void getNames(Common::Array<Common::String> &names) const;
+	const Common::Array<Common::String> &getNames() const { return _names; }
 
 private:
 	struct Logic {
 		Common::String name;
-		bool isAutoUpdated = true;
-		int functionRef = 0;
+		Common::String description;	// Nancy28, what the designers wrote down about it
+		bool isWritable = false;
+		bool isCached = false;
+		int functionRef = 0;		// 0 for none
+		bool lastResult = false;		// what a function that fails gives
 	};
 
+	typedef Common::HashMap<Common::String, Logic, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> LogicMap;
+
 	static int brainInitCreate(lua_State *L);
+	void readNancy27Entry(lua_State *L, int index);
+	void readNancy28Entry(lua_State *L, int index);
+	void addLogic(const Logic &logic);
 
 	const Logic *findLogic(const Common::String &name) const;
-	bool evaluate(const Logic &logic, bool &value);
+	bool evaluate(Logic &logic);
 
 	LuaState *_lua;
-	Common::Array<Logic> _logic;
+	LogicMap _logic;
+	Common::Array<Common::String> _names;	// in the order Brain_SC gives them
 	bool _isLoading = false;	// BrainInit:Create only works while Brain_SC runs
 };
 


Commit: 777fff631f29b6873712fd3d36245eb4f85a23ff
    https://github.com/scummvm/scummvm/commit/777fff631f29b6873712fd3d36245eb4f85a23ff
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:24+02:00

Commit Message:
NANCY: NANCY28: Add detection entry

Set to unstable as the game now starts

Changed paths:
    engines/nancy/detection_tables.h


diff --git a/engines/nancy/detection_tables.h b/engines/nancy/detection_tables.h
index 26c445c5020..4244e04cd8e 100644
--- a/engines/nancy/detection_tables.h
+++ b/engines/nancy/detection_tables.h
@@ -928,6 +928,14 @@ static const ADGameDescription gameDescriptions[] = {
 		ADGF_UNSTABLE | ADGF_DROPPLATFORM,
 		NANCY_GUIOPTIONS
 	},
+	{ // MD5 by bluegr
+		"nancy28", nullptr,
+		AD_ENTRY1s("ciftree.dat", "3fad2155442ea49861fe00d4050a8a8e", 182654641),
+		Common::EN_ANY,
+		Common::kPlatformWindows,
+		ADGF_UNSTABLE | ADGF_DROPPLATFORM,
+		NANCY_GUIOPTIONS
+	},
 
 	// Do not delete
 	AD_TABLE_END_MARKER


Commit: 7f4754a45f982e462ce4bffbd7e3ae17718985fc
    https://github.com/scummvm/scummvm/commit/7f4754a45f982e462ce4bffbd7e3ae17718985fc
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-11-12T09:40:24+02:00

Commit Message:
COMMON: Fix typos in AchievementsManager

Changed paths:
    engines/achievements.h


diff --git a/engines/achievements.h b/engines/achievements.h
index 33764b58019..ebca7d9e4c5 100644
--- a/engines/achievements.h
+++ b/engines/achievements.h
@@ -105,7 +105,7 @@ public:
 
 	/**
 	 * Set a game targeted by platform type and application ID as active domain.
-	 * Automaticly loads messages texts from achievements.dat.
+	 * Automatically loads messages texts from achievements.dat.
 	 *
 	 * @param[in] info Achievements platform type and application ID.
 	 */
@@ -184,7 +184,7 @@ public:
 
 	/**
 	 * Get an average rate statistic (float).
-	 * Calcucated by devision the sum of count by the sum of times.
+	 * Calculated by dividing the sum of count by the sum of times.
 	 *
 	 * @param[in] id	Internal ID of the achievement.
 	 */




More information about the Scummvm-git-logs mailing list