Week 7 – Finishing up PINK

Continuing from last week, I fixed all the remaining issues with PINK so I’ll just go over them in this blog.

First thing I worked on was to disable the country name menu items in Passport to Peril. Unlike in Hokus Pokus Pink, the country items in Peril have a submenu to jump to any section which means they don’t need to do anything when clicked.

Clicking on them brings up this dialog

We don’t want such a dialog because they don’t have any functionality to implement in the first place. The fix was relatively easy and all I did was to prevent it from firing an event when clicked. Commit which fixes this.

The next issue was to fix the menu behavior in the hebrew versions of the game. There are two different menu behavior which can be used: First is the Mac mode where you need to keep to mouse button held to keep the menu open. Second is the Modal mode which keep the menu open unless you click out of it.

Modal mode is what was expected but it’s tied to Win95 mode (because it’s how menus behaved in Win95). However we can’t use Win95 with the hebrew version because the font it uses lacks hebrew support.

The fix was to add a flag which forces Mac fonts to be used and to enable it when the hebrew version of the game is loaded. Now we can keep Win95 mode enabled to get the Modal mode working. Commit #1, #2.

Next issue was a weird bug where some submenu items in Peril were disabled. This wasn’t the expected behavior as the actual game has the items enabled.

Some items are grayed out and can’t be clicked

First thing I did was to ensure that the code responsible for creating the menu was working as intended and indeed it was. After that I opened the exe in a hex editor to check the flag which sets the menu item status. The result had me surprised because the items were indeed disabled.

I talked to sev about this and it turns out that the menus are later enabled by a different function. So I also implemented a similar function which goes through the menu recursively and enables the items. Commit.

Last issue was to show the last 10 saves in the menu. This was kinda straightforward and I just get the list of all saves, sort them by time and add the first 10 to the menu. There are a bunch of commits so I’ll just link the main one here. I also had to limit the submenu width to account for really long names.

Recent saves

With this PINK should be completed 🙂 I started going through WAGE so expect a blog post detailing my progress with it next week.

Thanks for reading!

3 replies on “Week 7 – Finishing up PINK”

I was hoping that all the menu items that just default to openMainMenuDialog() would get more specific implementations. That’s what I meant by “poorly stubbed”.

Most of the menu items that don’t work right now seem to be dependent on MS Help which I don’t really know much about. Working on that might be out of scope for this project so I’ll have to discuss that with my mentor.

Leave a Reply

Your email address will not be published. Required fields are marked *