Second Week – some bugs and new stuff

This week’s plan was to get the STUBs done. At their current state, I won’t say ALL of them have been addressed, but yes, very few of them remain, and some of them can’t be done right now (more on that). This week’s work can be seen here.

The STUB list can be referred to know the current state of STUBs.

  • LB::b_saveMovie() : something sev mentioned on the #director-engine channel. This would be a project in itself and there is no code around it. Saving is currently not supported in ScummVM’s Director Engine and this STUB would need some time to be implemented.
  • LB::b_setCallBack() : This needs to be adressed when I encounter this command while playing one of the director targets. The documentation to this is vague. here:

    • The third point is not very clear. It appears as if this would involve the implementation of the specific factory object, and the interactions between that and the XCMD or XFCN callbacks are not generalised.
  • LB::b_playAccel() : Deprecated since D3
  • LC::cb_v4theentitypush – kTEAMenuIdItemId and LC::cb_v4theentityassign – kTEAString : These will also be implemented when I encounter their usage. The MenuIdItemId is probably creating menus from scripts, but that is just speculation. I haven’t encountered their usage and their purpose is not documented, so I would have to encounter them first
  • LM::m_moveToBack() and LM::m_moveToFront() : These will be tackled along with this.

There were some things which were fixed this week, like checking for constraint before rendering sprites, acknowledging movable sprites as active.

There are some things which ScummVM would never be able to fully support, like openDA and closeDA, which open the Macintosh’s Desk Accessories like calculator. To be honest, I don’t thin many games which target both Windows and Mac might be using it. There is the open comman too which opens any document in the application specified. ScummVM can’t run arbitrary applications.

I took the liberty of modifying some commands in the way they work (these commands were mainly used for debugging in Lingo and sev said that those are basically no ops for us, so can be ignore) like showResFile and showXlib as we have a REPL Lingo debugger in ScummVM.

While I looked into importFileInto cast Lingo command, we realised that the BitmapCastMember uses PICT files. So I would be porting WAGE’s PICT handling code for that. The remaining STUBs (5 exactly: param, importFileInto and special cases of framesToHMS, HMStoFrames and openResFile) I intend to do in the next couple of days (param has a bug which I can hopefully solve tonight, importFileInto would need work and for the others, I must discuss with sev and others.)

So this week, I can start looking at Meet Mediaband. Personally, I have never seen anything more interestingly weird than that. There are bugs in UNDO ME, Macaroni Man and HOUSE JAM, and the popupMenuXObj needs to be implemented. I had alotted 4 weeks of time to work on Meet Mediaband, and I believe that would be enough to fix it and clear up my trello cards too! Hoping for a productive week ahead.

First Week!!

This week was quite eventful. sev assigned me some tasks in the Trello board for the director engine. I have shared the link to that in my previous blog post.
I first tried my hands on the window properties task that was assigned to me on Trello. I had some progress in finding the cause of the issue, but didn’t have any code to push (this was the first day of the week). So I kept it for later and started working on the STUBs in the Director Engine codebase. A github gist of the STUBs.

This gist doesn’t contain some STUBs I had implemented at the first day of week. Still, it has all the ones that are unimplemented. I will add a strikethrough to the ones that are done.

This week I created 19 Pull Requests. 14 of them are merged. 4 are open and 1 is a draft (Though that will be open tomorrow). 18 of them were implementations of STUBs. The lingo properties now don’t have STUBs (yay!) (Actually one is left, but I have figured that out. Need some sleep and then will push it)

I also refactored the RIFX Chunk dumping so it dumps all Archive chunks now.
You can see all my PRs for the week, sorted by last updated here.

I had 2 non productive days this week. One was when I had some mild fever and was exhausted. Second was my birthday, I turned 20 this week. So there wasn’t much progress these days.

But seeing how things went this week, I am sure that I can implement all the STUBs in Director Engine’s Codebase next week, which would be inline to what was my goal for the first two weeks in my proposal. Then the issues won’t be about missing code in Director, it would be about wrong code. So it would be all about resolving bugs in various targets like Meet Mediaband, The Journeyman Project, Spaceship Warlock.

Speaking of targets, hsrtron playtested The Seven Colours : Legend of PSYS City. There were a few issues with the target :

  • Wrong palette in the corridor (This is an issue while importing palettes from sharedCast)
  • Animations are quite fast at some places
  • Not being able to leave the first level (sev identified this as an issue of not checking for punycoded file paths)

These issues have been documented on the trello board. sev also pushed a quick fix for the game’s cursor. Seems like this target is also being one which we would be using to fix the Director Engine and will make it work just like the original.

So this would be another target for me to tackle in my coding period. This week, when I get done with the STUBs, I can start looking for the source of bugs in the targets I mentioned in my proposal. I can also finish my trello tasks one by one (as they are identified bugs)

Looking ahead to an even more eventful and productive week!

Official Coding Period Begins!

The GSoC coding period has begun, and I have some tasks in my kitty for the week.

Starting with the updates from last blog. I got the MENUREF working! The Pull Request for same is opened. I also implemented the Text and Font related STUBs.
The Discord user hsrtron#3373 had translated a D3 game (The Seven Colours: Legend of PSYS City) but this had some issues, with a wrong color palette being the most evident one. While ScummVM had most of the palette implementation required to use custom palettes, there were some missing links. After changing a few things, we could run the game with its intended color palette!

I talked to sev about my apprehensions of making different git branches for every task, and turns out its fine!

Also, I got added to the Trello board of the Director Engine so I can pick up the ToDo tasks from there and complete them. Link

Now my tasks for this week: Complete the implementation of window properties. I would try to do this soon. And then move on to making all archive types to dump all movie chunks.

Looking for a great week ahead!!

Working on STUBs

The community bonding is going on, and I managed to push some work on unimplemented STUBs for director engine in till now.
The first issues I picked up in this period were of implementing the move cast command and the findEmpty builtin function. I completed them and then moved on to the Menu properties.

I implemented the MENUREF datumType to generalize the setting and getting of Menu, Menus, MenuItem and MenuItems properties in the existing setTheEntity() and getTheEntity(). Changes to MacMenu and MacWindowManager were done to accomodate these changes and remove duplicacy of code. While the lingotests and workshop movies passed the changes, the BUILDBOT failed on some Director Games. I would fix these as these properties are used in a lot of targets.

I then resolved a couple of small issues (stageColor and b_union) and sev then asked me to implement font-related properties (kTheFont, kTheTextHeight, kTheTextStyle, kTheTextSize). The setters of these properties were taking wrong inputs and I implemented the required functions.

The changes described in the last two paragraphs are under review. I have submitted Pull Requests on them and can be seen here.

One thing I am guilty of – not having a single seperate branch on my fork to which I make commits. I usually make different branches for different issues I work on to isolate them from other changes I might make on other issues. I will make a dedicated GSoC branch on my fork so that all my commits can be viewed in a single branch.

That was all, thanks for reading!