Last week I continued my work on Meet MediaBand. When I started work on it a few weeks ago, I was working on the Windows version, as that’s the one I got my hands on first. But the Macintosh version is the original, it’s slightly more polished, and I have an old Mac that that runs it well, so I’ve decided to continue work on the Macintosh version instead. First, I needed to deal with a few differences from the Windows version which prevented the Mac version from working.
The first major blocker was allowing the character ‘/’ in movie file names. Meet MediaBand is chock full of movies with names like “MM/stage”, “MM/archives”, and “MM/giftshop”, and the ‘/’ was sometimes confused for a directory separator. As I explained last week, I created a
Path abstraction which allows common file functions to be used with arbitrary directory separators. That pull request has been reviewed, revised, and merged. With that done, the Director engine now uses ‘:’ as a directory separator as classic Mac OS did, and the ‘/’ in Meet MediaBand’s movie names is no longer confused for a directory separator.
The next issue was the SoundJam XObject, which is used to play sound in the House Jam interactive music video. The Windows version contained a fallback from SoundJam to Lingo’s built-in puppetSound command, used when SoundJam failed to initialize. To get the Windows version working, I was able to cheat, triggering the fallback to avoiding reimplementation of the full XObject. The Mac version, on the other hand, does not contain the fallback to
puppetSound, so this week I had to actually reimplement SoundJam. So much for taking the easy way out.
Another one of my bigger undertakings this week was cleaning up cursor management in the Director engine and Mac window manager. The window manager (and ScummVM in general) use stacks to store cursors and their palettes. The window manager didn’t push to/pop from these stacks consistently, which could cause them to get out of sync. I made sure that these stack changes are applied consistently, then cleaned up the window manager’s cursor APIs. Then I modified the Director engine so that the cursor function only sets the cursor for the current movie, not globally like it did before. This allows different windows to have different cursors, and the cursor now resets when the movie changes, fixing many incorrect cursors in Meet MediaBand.
I also made an exciting discovery while working on Meet MediaBand. While the Windows version is protected and does not contain source code, Meet Mediaband 1.1 for Macintosh contains the full source code, perhaps accidentally:
This is making understanding and debugging the thing much easier, and I hope to get it completely working this week. 🙂