How viny182/mystery-sdl works
mystery-sdl is an SDL2/Linux recreation of the Mystery screensaver. Its main workflow loads the user's original Mystery.dll, initializes the scene and actors, advances sprite animations, and renders video and sound through SDL; options include wide-screen and headless frame-dump modes. A separate optional tool extracts scene tables and sprite artwork into JSON and an interactive viewer. The single C source is only partially excerpted, so internal runtime links not established by the excerpts or README are omitted.
Main entry points: dump_scene.py Scene extraction · mystery_sdl.c DLL resource loader · viewer_template.html Viewer template
Components 20
Screensaver runtime
- Options and startup
mystery_sdl.c - DLL resource loader
mystery_sdl.c - DCL bitmap decoder
mystery_sdl.c - Scene tables
mystery_sdl.c - Static scenery
mystery_sdl.c - Actor state machine
mystery_sdl.c - Sprite paths
mystery_sdl.c - Sound playback
mystery_sdl.c - Frame rendering
mystery_sdl.c
Scene viewer
- Scene extraction
tools/dump_scene.py - Scene JSON
- Viewer template
tools/viewer_template.html - Interactive scene viewer
Other components
- User
- Mystery.dll
- SDL video and audio
- Screen output
- Audio output
- Built mystery executable
- ImageMagick
Connections 22
- User → Options and startup: starts
README.md - Options and startup → DLL resource loader: loads
README.md - Mystery.dll → DLL resource loader: provides resources
README.md - DLL resource loader → DCL bitmap decoder: decodes bitmaps
mystery_sdl.c - DLL resource loader → Scene tables: reads tables
README.md - Scene tables → Static scenery: defines scenery
mystery_sdl.c - Scene tables → Actor state machine: defines actors
README.md - Actor state machine → Sprite paths: advances animations
mystery_sdl.c - Sprite paths → Sound playback: plays step sounds
mystery_sdl.c - Static scenery → Frame rendering: draws scenery
mystery_sdl.c - Sprite paths → Frame rendering: draws sprites
mystery_sdl.c - Frame rendering → SDL video and audio: outputs frames
README.md - Sound playback → SDL video and audio: queues sound
mystery_sdl.c - SDL video and audio → Screen output: presents video
README.md - SDL video and audio → Audio output: outputs audio
README.md - User → Scene extraction: runs optionally
README.md - Scene extraction → Mystery.dll: reads
tools/dump_scene.py - Scene extraction → Scene JSON: writes
tools/dump_scene.py - Scene extraction → Viewer template: loads
tools/dump_scene.py - Scene extraction → Built mystery executable: runs for reference frame
tools/dump_scene.py - Scene extraction → ImageMagick: converts frame
tools/dump_scene.py - Scene extraction → Interactive scene viewer: builds
README.md