For education purposes only · no game files included · bring your own THUG
Field notes

THUG on a Mac

How Tony Hawk's Underground (2003) got a native macOS build: the platform layer rewritten on SDL2 and OpenGL, and a pile of quality-of-life features bolted on top. Each guide is a short "how to", with the diffs that did it.

GoalRun the original game data on Apple Silicon and Intel Macs, natively, with modern settings menus, rebindable keyboard and gamepad controls, and hints that show the right button.
New Jersey, native on Apple Silicon: 1280×720, 60 fps, original PC data.
New Jersey, native on Apple Silicon: 1280×720, 60 fps, original PC data.

The map

Three layers, and almost every guide touches all three:

FolderWhat lives thereTouch it when
Code/The engine and the game: skater physics, screen elements, scripting, the front end.You need a new script function, or the engine has to know about something (text measuring, button glyphs).
Wn32/Code/Plat/The platform layer. Originally Xbox/Win32; here it's SDL2 + OpenGL + miniaudio: graphics, audio, input, files, saves.Anything that talks to the Mac: windows, keys, controllers, files.
Scripts/patches/QScript patches applied on top of the retail scripts (the menus).You add or change a menu.

The retail qb.pre wins over freshly compiled scripts. So you don't edit the game's scripts, you patch them. See Screen settings, step 3: it's the trick everything else relies on.

How it got here

CommitWhatGuide
962139dFirst commit: the port itself (SDL2/OpenGL renderer, audio mixer, saves, Enter in menus, PC keyboard layout)Graphics and sound, Saves, Controls
5660c56Options › Screen, config.ini, script patchesScreen settings
3ca5eeaNumpad 1 caveman fixControls
a4cac21Game controllers: hotplug, Xbox layout, rumbleControllers
28ef9a3Music and streams (Bink audio decoder)Graphics and sound
97790b7build_dmg.sh, app bundle pathsInstallation, Saves
c46ec3360 / 120 fpsScreen settings
72de709Options › KeyboardKeyboard settings
working treeOptions › Gamepad, button hintsGamepad settings, Button hints

How to test a menu without touching it

Screen recording permissions are a pain, so the menus were checked with a throwaway hook in Wn32/Code/Plat/Gfx/p_nx.cpp (never committed): it replays key presses and controller buttons from a file, and dumps frames with glReadPixels right before the swap.

excerptWn32/Code/Plat/Gfx/p_nx.cpp (temporary test hook)

Sixteen D-pad presses in a menu with sixteen items lands you exactly where you started. Ask me how I know.