Greetings everybody! Just before we start, I have something to tell you all, It’s about time and we are in the final phases of GSoC ending, the final mentor evaluation is about to happen (2 weeks~) and unfortunately, that means my tenure will be coming to an end! With that being said let’s start with my work this week! (plus what has been merged)
This week I have worked on fixing more bugs and improve more support, let’s start with the title!
Reading Books in Total Distortion!
Linked to https://trello.com/c/ZMRuRYA0/632-index-books-overflow where in books library the index in book was overflowing (see image)
Now, like any good sensible developer I took it upon myself to fix this issue! To do that I have to investigate, that how this thing is different from other “texts” in Director.. and I found that:
Style: Scrolling and that’s it! The difference was that this “text cast” has this style “Scrolling”, which was giving issues as in ScummVM we didn’t implement “Scrolling” textcast! You might have been confused about one thing: What is “Cast?” or “Text Cast” here??
Well a cast is like an element of movie, it is like the building blocks of any game/multimedia in director engine, and among these elements, we have many different kinds, for example Image cast, text cast, filmloop (series of frames), digital-video etc etc. Now each of these building blocks can have properties, like here TextCast member has this property of Style, where we can choose what kind of cast that is!
So as I have previously mentioned, there is only simple text cast implemented in ScummVM, therefore, what I had to do is to simply implement a scrolling cast member! One that takes into account a scrollbar in side and the logic to click items in it!
Well to do that, I just reused the TextScrollingWindow (ie a special kind of window specially created for displaying text in mac styled windows), well I had to do this because of scrollbar, that I needed in order to implement this scroll behaviour! Now as a part of doing this, what I was basically doing is to reuse the code that was written for text display, google says about code reuse:
Code reuse aims to save time and resources and reduce redundancy by taking advantage of assets that have already been created in some form within the software product development process.
and that’s how the working books look like, Happy Reading!
Link to PR – #5182
More work done
Fixing visibility issues when setting window properties
There was this bug where assigning windows property automatically used to bring them to foreground, but this was not good as it means that sometimes hidden window that are supposed to be hidden are now shown, to fix it all I had to do is to remove the statement that does this and voila, fixed!
Link to PR – #5245
Refactor frames loading, fixing chan command
If you have been reading my blogs for a while, you must be knowing about one of the biggest changes to frames loading, well there are still some things that pop out occasionally, one of them being this debugger command “chan <number>” which was used to list channel information on any specific frame! The fix was simple, to refactor some things and fix the logic!
Link to PR – #5255
Thank you for reading so far, its been great writing and working for scummvm and I really enjoyed this whole journey! Before ending I’d like to say that I have been offered to become member of this organization (Director engine), and I am very happy for that! (the process is still underway but expect the results next week), what that means is I can officially start directly committing codes to scummvm, and get some perks (cool discord roles, etc!). With that being said see you in next article!