Concluding Post

This blog post is the culmination of my GSoC 2022 journey.
This summer, I worked on the ScummVM Director engine, where I completed the STUB code in the engine and worked on fixing various issues in it and bringing it more in line with the original working, thus improving the compatibility of games (D4 and older).

This is a list of the Pull Requests I created during the summer in ScummVM. They completely describe each issue they are supposed to fix/implement. My initial work was with the STUBs. Here is a list of STUBs that were resolved.

Next, I worked on the various issues encountered in certain targets of Director Engine which get updated on this Trello board. This board also contains the open issues of the Director engine.

I also created a couple of test movies to gain a better understanding of the internals of the original Macromedia Director. They can be found here.

It was a great experience working with the ScummVM Director devteam (sev, djsrv, rvanlaar, mstea, moralrecordings and all the other devs). I consider myself privileged to have contributed to such a popular and well-maintained open source project. I learnt a lot of things this summer from this awesome experience.

Since director is an ongoing project and the plan is to support games till D7, I will be sticking around and contributing to the Director engine (and ScummVM) after GSoC. I would love to continue being a part of the community and volunteer in the project.

A huge thanks to my mentors sev and djsrv (and the devteam) to help me out throughout the duration of this programme and answering even my dumbest queries with patience 😀

This is the concluding post of my GSoC journey. I loved the project and the people and would continue to be a part of it. Thank you everyone 😀

WEEK 12: PopUpMenus can be drawn!

This week, I mostly worked on the PopUpMenuXObj. sev had outlined to me the steps that would be needed to get it working.

The first step was to make the MacPopUp menu constructor. Now MacPopUp is very similar to MacMenu (essentially, it is a menu with a single submenu. It can have BITD images as menuItems, and can be drawn anywhere on the screen instead of just the top)

So MacPopUp is derived from MacMenu. We have MacWindowManager::addMenu(), which removes the current menu if one exists. creates a new one, sets it as the menu of the movie and adds that to the _windows array. To change this for MacPopUp, we need to remove the part where it is set as the menu of the movie, and we assign the index of the menu in the _windows array ourselves. (This is something done in the original director engine too to prevent collision of popupmenu IDs with the IDs of other windows). So the MacWindowManager::addPopUpMenu() has been made to do this (creates a MacPopUp instead of a MacMenu in our case)

Then a null item is added to the menu, and the submenu is created by the provided string. These functions take care of creation of MacPopUp, and the menu object is created using this.

Now, for drawing, I had to change some functions of MacMenu. Most of the changes were in MacMenu::mouseClick(), MacMenu::draw() and MacMenu::calcDimensions.

The changes were mainly the passing of drawing coordinates as a parameter in calcDimensions, adding a forceDraw flag in mouseClick to allow drawing anywhere on the screen, and removal of drawing of top bar in draw().

The end result is this:
Now, the changes to these functions were done directly in MacMenu. Adding a macpopupmenu.cpp to the project is resulting in LNK2019 error. I had tried resolving it before writing the constructor, but then went ahead with just the header. I will try to fix it again now and override them in the MacPopUp class.

I will finish this and then pick up the issue I have not touched since long – the window options. Some of the work on that is already done. I will have to finish up the remaining.

This is the 12th weekly update of my GSoC program. I will be submitting my work before 12 September. My experience with ScummVM has been amazing this summer and I would be sticking around on the discord and continue contributing to the project (to the Director engine and other stuff – like there was a content verification project proposed in the GSoC ideas list which I would definitely like to work on, not as GSoC project, but voluntary contribution). The experience with my mentors has been great, both sev and djsrv were quite helpful and understanding throughout the time, and were more than happy to help me anytime (This is the same for the rest of the director engine team – rvanlaar, mstea and moralrecordings). I am happy to have contributed to the director engine and would continue doing that.

See you! 😀