WP-132: Game thumbnails in the TV app’s grid
Status: ✅ Done (2026-11-30), every exit criterion met. Fork PR
barefootbetters/scummvm#56
merged on 2026-11-30 (merge commit e32c4137ae), private PR
barefootbetters/scooby-engine-private#69
the same day (squash 3d4f14c).
The TV runs 26041070 with the covers (§Result), Phantom’s the
English front Jeff supplied after execution (D4); they hold with ScummVM’s
downloaded icon packs too (2026-12-01). The pack also carries 54 Humongous
covers (2026-12-01), for when a TV build adds the SCUMM engine. Decisions D1–D4 answered by Jeff on
2026-11-30: D3 by supplying the games’ box-front covers, D1, D2 and D4 all
as recommended (§Decisions,
DECISIONS.md).
Phase: 5 (polish & distribution).
Depends on:
- WP-104 (🚧): the private identity
injection (
tvAppAssetsDir) the thumbnails ship through. Its open criteria (Help and a controller, licenses, splash) don’t touch this packet. - WP-118 ✅: the grid is the TV default again, so the thumbnails are the first thing a player sees.
Unblocks: a launcher whose games are recognisable at 3 m, ahead of the
first store release (WP-084).
Companion EC: EC-019.
Pre-flight: required. D1’s recommendation adds a commit to the fork’s
shared code (common/zip-set.cpp, outside engines/terraglyph/), and
the packet changes what the TV build packages.
Targets generation(s): none. The grid and the icon packs are
engine-independent. The covers are for Gen 1 titles (Showdown, Phantom)
and detected Gen 2/3 titles (D2), and no engine code changes.
Estimated effort: 1 day for the mechanism, the pack script and the TV
check.
Goal
Each TerraGlyph game in the TV app’s grid shows its own box-front cover instead of the grey tile with its name. The covers ship as an icon pack in the private identity, never in the fork. A plain ScummVM build is unchanged.
Background
How the grid finds a thumbnail (gui/widgets/grid.cpp,
GridWidget::reloadThumbnails() on the fork’s scooby-engine):
- It looks up
icons/<engineid>-<gameid>.pngin the GUI’s icons set, thenicons/<engineid>.png. For TerraGlyph games that isicons/terraglyph-<gameid>.png, withicons/terraglyph.pngas the fallback. - Thumbnails are PNG only (
loadSurfaceFromFile()); SVG is read only for the grid’s extra icons. A PNG that decodes to 8-bit (a palette PNG) is dropped, and the tile stays grey. - The image is scaled to fit the square tile, keeping its proportions
(
scaleGfx(), filtered). A portrait image gets bars at its sides.
Where the icons set comes from (GuiManager::initIconsSet() and
Common::generateZipSet()):
- Every
gui-icons*.datzip iniconspath, sorted by name, newest-named first. On Androidiconspathis<app files>/icons, empty unless the player downloads an icon pack. - Then the default
gui-icons.dat, fromthemepath(on Android theassetsfolder extracted from the APK). The stock file has 99 icons,sky-sky.pngamong them, and none for TerraGlyph.
Why the TV app can’t just ship a file today:
- The identity’s assets (
tvAppAssetsDir) are packaged at the APK’s asset root, next totvapp.iniand thetvapp.ziptheme. They are read in place through the Android asset archive inSearchMan, never extracted. The pack loader scans onlyiconspath, so agui-icons-*.datthere is never seen. - Replacing
assets/gui-icons.datby name would reach the APK, but the copy in the app’s files is refreshed only when the APK’sMD5SUMSchanges.android.mkbuildsMD5SUMSfrom the fork’s own dist files, not the identity’s. An update that changes only the thumbnails would never be extracted on a TV that already has the app.
Measured on the TCL 65Q77K (2026-11-30, versionCode 26041041, the TV’s
1920×1080 GUI at gui_scale=140, the TV theme). Packs were placed by hand
in the app’s icons folder. Captures stay local, as they show the app’s
name.
-
A 512×512 RGBA test card, as Showdown’s thumbnail, drew at these sizes. Afterwards
scummvm.iniwas restored byte-identical and the pack removed.Icons per row Image drawn From a 512 source 4 (default) 256 × 256 px halved, clean 3 380 px wide reduced, clean 2 627 px wide enlarged and soft; the tile is taller than the grid - The language flag covers about the right 25% and top 13% of the image, and the platform logo about a 17% square bottom-right. A 20 px line of text in the source drew at 10 px at 4 per row.
- Jeff’s covers (
gui-icons-preview.dat, the four TerraGlyph covers, bytes unchanged) at 4 per row: Showdown and Phantom show their covers, recognisable, and the titles are readable on the tiles. The flag sits over the end of each cover’s “Scooby-Doo!” logo. Phantom’s cover is the German edition, so its tile reads “Entführung im Spukschloss” (D4).scummvm.iniwas unchanged. This preview pack was left on the TV for Jeff to see; the pre-flight removes it before testing.
The covers (Jeff, 2026-11-30; kept with the private material, with an
artwork-manifest.json that records each one’s source edition): 512 × 512,
PNG colour type 2 (RGB), 8-bit. They meet the specification as supplied.
Seven are Scooby-Doo titles and two are Humongous titles. In the fork’s
detection table these four have a TerraGlyph game id:
gameid |
Cover |
|---|---|
showdown |
Showdown in Ghost Town, retail box front |
phantomknight |
Phantom of the Knight, German retail box front (D4) |
jinxsphinx |
Jinx at the Sphinx, retail box front |
casefile1 |
Case File #1: The Glowing Bug Man, retail box front |
activitychallenge has no cover. Case File #2 and #3, Classic Creep
Capers (an N64 title) and the two Humongous games have no TerraGlyph game
id.
Scope
In scope
- The thumbnail specification, recorded in the private identity README: 512 × 512 px, RGB or RGBA PNG (no palette), square, nothing essential in the flag corner (top-right, 25% × 13%) or the platform corner (bottom-right, 17% square), and any lettering at least 56 px tall in the source.
- The covers for the game ids D2 names, copied into the private identity
(
thumbnails/, with the manifest) byte for byte, never re-encoded. - A pack script,
New-ThumbnailPack.ps1in the private identity’stools/, in PowerShell 7:- it reads a map from
gameidto cover file; - it checks each cover’s size and PNG colour type (2 or 6);
- it writes the zip
assets/gui-icons-tvapp.datwith entries aticons/terraglyph-<gameid>.png; - it is re-runnable, and the same covers give entries byte-identical to the covers.
- it reads a map from
- The fork mechanism, as D1 decides. With (a),
generateZipSet()also adds thegui-icons*.datpacksSearchManholds, so an APK’s asset-root pack loads:- after the
iconspathpacks and before the default file; - never the default file twice.
One brand-free commit, written upstream-ready.
- after the
- The TV build: FreeType and the private identity, versionCode above
the TV’s current one,
adb install -ronly. - Plain build unchanged: with the identity unset, no pack in the APK, and the grid as before.
Out of scope
- Covers for games with no TerraGlyph game id (Case File #2 and #3, Classic Creep Capers): when the fork detects them, one map line each.
- The Humongous covers: those are SCUMM-engine games, and the TV build
has only the
terraglyphandskyengines. They belong in a packet that adds the SCUMM engine to the TV build. - Beneath a Steel Sky: the stock
gui-icons.datalready has its icon. - A Google Play feature graphic and store screenshots: WP-084.
- The grid’s layout at 2 per row (the tile taller than the grid): a theme follow-up if Jeff wants that setting.
Decisions for Jeff
Jeff, 2026-11-30: D3 answered by supplying the covers; D1, D2 and D4: “Yes, all three”. Every recommendation below is the decision.
| # | Decision | Options | Recommendation (approved) |
|---|---|---|---|
| D1 | How the pack reaches the grid | (a) ship gui-icons-tvapp.dat at the APK’s asset root and let generateZipSet() also load packs from SearchMan (one fork commit); (b) replace gui-icons.dat by name with a merged copy, and override MD5SUMS too so updates extract it (no fork commit); (c) have the Android activity copy asset-root packs into iconspath at start (Java) |
(a). It reads the pack in place, as the theme and tvapp.ini are read, so no extraction step can go stale. A plain build has no such pack and behaves as before. (b) has to rebuild a merged file and MD5SUMS on every fork update. (c) duplicates the file and adds Java for the same result. |
| D2 | Which covers ship | (a) every detected TerraGlyph game with a cover: showdown, phantomknight, jinxsphinx, casefile1; (b) only the two the app plays today |
(a). About 1.9 MB, and a game shows its cover the day the app adds it. No terraglyph.png fallback until there’s art for one, so activitychallenge keeps the grey tile. |
| D3 | What the thumbnails show | (a) studio-made title cards; (b) the games’ own box art | Answered (b) by Jeff, 2026-11-30: he supplied the box-front covers. |
| D4 | Phantom’s cover is the German edition | (a) find the English retail front and use it; (b) ship the German one | (a). The app is English, and the tile reads “Entführung im Spukschloss” under the logo. (b) ships now if an English scan isn’t to hand. |
Dependencies
- The fork’s
scooby-enginetip, in a fork worktree fromtools/New-ForkWorktree.ps1(never inC:\dev\scummvm). - The private identity repository (
scooby-engine-private), in its own worktree. - Jeff’s covers and manifest (
C:\pcloud\scooby-engine\ImagesGameThumbnails\game-thumbnails). - The Android build in WSL with FreeType 2.13.3 for armeabi-v7a
(
/opt/build/ft-v7a), as WP-104 built it. - The TCL 65Q77K on Windows
adb, by its current serial (the mDNS nameadb deviceslists; the IP port changes).
Execution
- Pre-flight.
- Remove the preview pack from the TV (
files/icons/gui-icons-preview.dat). - Confirm the
SearchManroute on the device: a pack at the APK’s asset root is listed bySearchMan.listMatchingMembers(), and the loading order puts it above the defaultgui-icons.dat. - Record the TV’s versionCode.
- Remove the preview pack from the TV (
- The fork commit (D1), tested on Windows first. With a pack on
SearchMan’s path, the thumbnail shows; with none, the debug log shows the same packs as before. - The covers and
New-ThumbnailPack.ps1. Run the script, then check the pack’s entries against the covers byte for byte. - The TV build and install. Captures at 4 and 3 per row, and the list view unchanged.
- A downloaded icon pack. If the app offers the download, check
TerraGlyph’s covers still show with it in
iconspath. - The plain build check.
- Close: fork PR, private PR, docs.
Exit criteria
- D1–D4 answered and recorded in
docs/ai/DECISIONS.md(2026-11-30). - Phantom’s English retail front in the pack (D4), or, if none is to hand, the German cover with that noted in §Result. The English front Jeff supplied, cropped square (§Result).
- On the TCL, each game the app has from D2’s list shows its cover in the grid, at 4 and at 3 per row (captures, kept local). It is drawn at the measured size, 256 px at 4 per row.
- The pack is rebuilt by
New-ThumbnailPack.ps1alone, and its entries are byte-identical to the covers. - An update install (
adb install -rover the previous build, no data cleared) shows the covers without a reinstall, with no hand-placed pack iniconspath. This is theMD5SUMSfailure D1 avoids. - With the identity unset, the APK has no
gui-icons-tvapp.datand the grid’s tiles are unchanged (capture or debug log). - The fork commit is brand-free:
git log -pover it grepped for the app’s name, its distinctive word and the package id, with no hits beyond the author line. - The build has no new warnings in the changed file under clang (Android) and GCC (Windows).
Deliverables
- Fork: one commit on a
wp-132-*branch, PR intoscooby-engine(D1 (a) or (c)); none for (b). - Private: one PR with
- the covers and their manifest;
tools/New-ThumbnailPack.ps1and itsgameidmap;- the built
assets/gui-icons-tvapp.dat; - the README’s specification.
- Public docs: this WP’s §Result, EC-019, the WORK_INDEX row, and D1–D4
in
docs/ai/DECISIONS.md. - Not committed: device captures (they show the app’s name) and APKs.
Notes
- With D1 (a) the order among packs shouldn’t matter. No upstream pack
carries
terraglyphicons, so the lookup falls through to the pack that has them. The pre-flight confirms this rather than assuming it. - The TV app’s identity assets already include the theme as a zip read in place; the pack follows the same pattern, which is D1 (a)’s case.
- The covers are third-party retail artwork and stay in the private repository with the rest of the identity. The public fork carries only the loading mechanism.
Result
Run on 2026-11-30 by the session that pre-flighted it (pre-flight-WP-132-2026-11-30, EC-019).
- Fork: one commit on
wp-132-searchman-icon-packs, fromscooby-engine @ bcefc97cf4, in fork PR barefootbetters/scummvm#56:4bb4c523a2,COMMON: Load icon and shader packs that SearchMan holds(common/zip-set.{h,cpp}), merged on 2026-11-30 ase32c4137ae; the fork worktree and its branch are removed. - Private:
barefootbetters/scooby-engine-private#69,
merged on 2026-11-30 as
3d4f14c(squash), with:- the four covers and the manifest in
tv-app-identity/thumbnails/; tools/New-ThumbnailPack.ps1;assets/gui-icons-tvapp.dat;- the README’s specification.
- the four covers and the manifest in
- The TV runs versionCode 26041060 (
2026.4.1-wp132.4), built in WSL with FreeType and that identity, and installed withadb install -r. The first build, 26041050, went over 26041041.
How it works
generateZipSet()adds, after the packs iniconspath, everygui-icons*.datSearchMan lists, then the defaultgui-icons.datas before. It skips:- a file named as the default, in any case;
- a name the set already has, so a downloaded pack of the same name wins;
- a later copy of a name SearchMan lists twice.
- On Android the APK’s asset archive is in SearchMan, so
gui-icons-tvapp.datat the asset root is read in place, astvapp.iniand thetvapp.ziptheme are. Nothing is extracted, soMD5SUMSplays no part. - The same applies to
shaders*.dat; no port ships a shader pack in its data, so nothing changes there. - The pack script stores the covers uncompressed, in name order and with a fixed timestamp, so the same covers always give the same pack. It reads the pack back against the covers.
Checked
Captures are in C:\pcloud\BB\DEV\wp-132-tv-captures\, kept out of git as
the TV’s show the app. SHA-256 prefixes:
| Check | Capture | SHA-256 |
|---|---|---|
| Pre-flight: preview pack removed, grey tiles again (pixel-identical to WP-118’s grid capture) | pf-grey-tiles |
EB51BF3A5259 |
Windows, the baseline exe, no pack: shaders.dat, gui-icons.dat |
win-shot-A-base-nopack |
D5C2F66C34A4 |
| Windows, this commit, no pack: the same two files, grey tiles (criterion 6’s debug log) | win-shot-B-wp132-nopack |
2067ADF94131 |
| Windows, the pack in the current folder: loaded between them, both covers shown | win-shot-C-wp132-datapack |
760A3934159B |
Windows, plus a stand-in downloaded pack in iconspath (a red card for showdown): it loads first and wins; Phantom falls through to the pack |
win-shot-D-wp132-both |
C1E55776D684 |
| Windows, the baseline exe with the pack in the current folder: ignored, grey tiles | win-shot-E-base-datapack |
B85BD14C23B2 |
TCL, 26041050, 4 per row: both covers; the log loads shaders.dat, gui-icons-tvapp.dat, gui-icons.dat, no already present warning. Each cover measures 256 × 256 px |
tv-4perrow |
879D82765FEB |
| TCL, 3 per row: both covers, about 380 px wide | tv-3perrow |
3F46CCA4711D |
| TCL, the list view: unchanged | tv-list |
81B669763D5D |
TCL, 26041051 over 26041050: only the pack changed (showdown a test card); the test card shows at once |
tv-upd-51 |
B96A53C378A8 |
| TCL, 26041052 over 26041051: the real pack again; the cover shows, pixel-identical to 26041050 | tv-upd-52, tv-final |
879D82765FEB |
TCL, 26041060 over 26041052: Phantom’s English cover (D4), a pack-only update; scummvm.ini byte-identical after |
tv-en-60 |
39A5D326D314 |
- The update builds (criterion 5): 26041050, 26041051 and 26041052 have
the same
assets/MD5SUMS(SHA-2565701c58f1e044631…) and the samelibscummvm.so, and differ only ingui-icons-tvapp.dat. Before D1 such an update would have left the old icons on the TV.files/iconsstayed empty throughout. - The plain build (criterion 6): with
-PtvAppId= -PtvAppLabel= -PtvAppResDir= -PtvAppAssetsDir=the APK has nogui-icons-tvapp.datand notvappfile; only the stockassets/assets/gui-icons.dat. It wasn’t installed: its package id is the WP-079 app’s on the TV. The Windows runs show a build with no pack loads what it did before. - Warnings (criterion 8): none in
zip-set.cppunder GCC 15 (UCRT64) or clang (NDK, armeabi-v7a). - Brand-free (criterion 7):
git log -pover the fork commit, grepped for the app’s name, its distinctive word and the package id, hits the author line only. The PR text was grepped too. scummvm.ini: backed up before the checks (SHA-256A1354D35…84ED2);debuglevel=2,grid_items_per_row=3and the list view were set in copies of it. The original went back with the app stopped, byte-identical, and stayed so after a launch.
D4: Phantom’s cover
This session looked for the English Windows front on MobyGames, but its covers page answered with a bot check (HTTP 403) that this session doesn’t get past, and an archived copy was off limits. The first builds (26041050–52) shipped the German cover. Jeff first answered “Keep German cover”, then supplied an English front: “here is an english cover”. D4’s notes are in DECISIONS.md.
The English cover is the GSP edition’s box front, a 714 × 1000 WebP
(SHA-256 95907731…4B35), kept in the private identity at
thumbnails/source/. A portrait box doesn’t fit the square tile, so the
thumbnail is cropped and resized:
- the crop is 714 × 714 from y = 85, which drops the “PC CD-ROM” bar above and the tagline below, and keeps the logo and the “Phantom of the Knight” banner whole;
- it is resized to 512 × 512 and saved as PNG colour type 2 (ImageMagick 7.1.2).
The flag corner falls on sky and the platform corner on the stone floor. The other three covers are still Jeff’s PNGs byte for byte; this one is derived, and the manifest records its source and crop.
On the TV it went in as a pack-only update: 26041060 has the same
MD5SUMS and libscummvm.so as 26041052, and only the pack differs.
At Jeff’s request the English PNG is also in his pCloud set
(terraglyph/scooby-doo-phantom-of-the-knight.png, SHA-256 52EA0B7C…7AF5,
equal to the private copy). The German PNG stays beside it as
-de.png. Its manifest entry matches the private one, but for the paths:
the source is the WebP Jeff had already put in that folder. (Jeff’s later
rebuild of that set moved the German PNG and the WebP to its archive folder,
with the manifest’s paths updated.)
Follow-up: Activity Challenge’s cover (2026-11-30)
Jeff: “add Activity Challenge’s cover to the TV pack”. The cover is the 2001
Bonus CD sleeve front, a 640 × 559 JPG from archive.org that Jeff’s
rebuilt pCloud set carries. It’s kept in the private identity’s
thumbnails/source/. The pCloud thumbnail centres the sleeve, which puts the
language flag over the top of “ACTIVITY”. The pack’s copy is resized to 512
wide with all the padding on top, so the flag sits on plain colour, and
nothing is cropped or stretched. The bottom-right platform corner covers only
the AOL trial badge and the end of “The Learning Company”.
- The map line
activitychallengegives the entryicons/terraglyph-activitychallenge.png. The pack is now 2,241,484 bytes, SHA-256F33DBB7D…7C08, with five entries, each byte-identical to its cover, and two runs give the same pack. - On the TV: 26041061 (
2026.4.1-wp132.5) was installed with-rover- Only the pack differs:
MD5SUMS,libscummvm.soand the APK’s entry list are the same. The log shows the same load order. The grid capture (tv-ac-61,39A5D326D314) is byte-identical to 26041060’s.scummvm.iniwas restored byte-identical (A1354D35…) and stayed so after a launch.
- Only the pack differs:
- The fork detects Activity Challenge but marks it
ADGF_UNSUPPORTED, so the launcher won’t add it, and its cover hasn’t been seen in the grid. It shows once the engine supports the game, as with Jinx and Case File #1.
Private PR
barefootbetters/scooby-engine-private#71
(160601b).
Follow-up: the Download Icons check (2026-12-01)
Jeff: “run the Download Icons check on the TV”. On 26041061, Global Options →
GUI → Download Icons found 12 packs, 356.8 MB, from scummvm.org, and fetched
them into iconspath (files/icons, gui-icons-20211112.dat to
gui-icons-20261010.dat).
- Live: after the dialog closed, the launcher reloaded the icon set, and
Showdown and Phantom kept their covers (
dl-07-grid-live,EC906F19BF31; the pointer sits on Global Options). - After a restart with
debuglevel=2, the log loadsshaders.dat, the 12 downloaded packs newest-named first, thengui-icons-tvapp.dat, thengui-icons.dat, as D1 gives, with noalready presentwarning. The grid capture (dl-08-restart,39A5D326D314) is byte-identical totv-ac-61. ScummVM’s packs carry noterraglyph-*entry, so the lookup falls through to the TV pack. - The dialog captures are
dl-04-dialog(C401D175660D, 12 packs found) anddl-06-done(9EAFDA5BBE5C, the download complete).
Afterwards the TV went back to its state before the check: the app stopped,
the 12 packs removed through run-as (files/icons empty), and
scummvm.ini restored from the pre-flight copy, byte-identical
(A1354D35…) before and after a launch. The grid after that launch is
tv-ac-61 again. Download Icons fetches them again in about two minutes.
At Jeff’s request the packs were downloaded again the same day, and the TV
keeps them.
Follow-up: Humongous covers in the pack (2026-12-01)
Jeff: “Add the Humongous covers to the TV pack”. His thumbnail set holds 68
Humongous Entertainment (HE) titles. ScummVM’s SCUMM engine detects 54 of them
(engines/scumm/detection_tables.h), and those 54 go into the pack, byte for
byte from his set, as icons/scumm-<gameid>.png. The other 14 aren’t SCUMM
games (the later Backyard Sports titles among them), so the launcher can’t add
them. The private pack script now maps covers per engine. The pack is
23,429,684 bytes with 59 entries, and rebuilding it gives the same file.
- The TV: 26041070 (
2026.4.1-wp132.6) was installed with-rover- Only the pack differs (same
libscummvm.soandMD5SUMS). Copies ofscummvm.iniadded test targets forpajama,freddi,spyfoxandBaseball2003; the grid draws their tiles without the engine.- With
iconspathset to an empty folder, so the downloaded packs aren’t read, the log loadsgui-icons-tvapp.dat, thengui-icons.dat, and all four tiles show the new covers (he-70-a-top,0D320980D9F9). - With the downloaded packs in place, ScummVM’s own icons show for all four
(
he-70-b-top,15AEC67E3ABD), as D1’s load order gives. scummvm.iniwent back to the pre-flight copy, byte-identical before and after a launch, and the grid then matchedtv-ac-61(tv-he-70,39A5D326D314).
- With
- Only the pack differs (same
- ScummVM’s packs carry an icon for all 54 games (checked against the 12
downloaded packs). So these covers show on a TV that hasn’t run Download
Icons, and ScummVM’s after it. The stock
gui-icons.dathas no SCUMM icons. - No HE game runs in the TV app yet. Its builds enable only
terraglyphandsky. A build that addsscummwith itshesubengine is what puts these covers in front of a player. - The pack is stored uncompressed, so the APK grew from 63 MB to 84 MB.
Not done or not checked
- Jinx and Case File #1 aren’t installed on the TV, so their covers were checked only as pack entries, byte for byte.
- The plain APK wasn’t installed (above).