Skip to main content

Posts

Showing posts from June, 2020

ScummVM translation files

This week there was slow progress on my task. I was also doing some miscellaneous things that related to my task. The very first thing I want to say:  My RTL-GUI PR has been merged into the master branch of ScummVM! Hooray! Since the previous work was also related to GUI, I had to rebase my branch to even out with master and merge the RTL-GUI work into my own. There were many merge conflicts, but I was able to solve them all! Now that I think about it, merge conflicts are not as scary as I thought they were before. They are pretty simple! I've set up Travis-CI to build my branch. I did this because continuous building on my machine was very slow, and with Travis, it is very easy to catch up on errors, correct them, and so on. After rewriting history several times, I was able to solve all errors (~50) that didn't appear on my local machine. I use MSVC, so many instances of errors don't appear on my machine - even though it builds and runs completely fine. This week,

Milestone 1 - Reflection on the task "RTL based GUI" and an overview

Domain Problem: The domain problem is very simple. RTL language users read their texts in a right-to-left manner, and GUI for these languages is also specialized in a way that they will find intuitive along with their native language. ScummVM did not have such GUI before. My first task (now near merge) introduces RTL based GUI, which will be useful for native RTL users. PR:  https://github.com/scummvm/scummvm/pull/2265 How I solved it: To begin with, sev provided a proof of concept by ZvikaZ , which gave me a very good overview of how things "should" look like when finished.  I began with that proof of concept and slowly worked my way up. For example, after the proof of concept, I reversed the mouse coordinates. Then I checked each menu in the main dialog and worked there. Afterward, I worked with the stacked dialogs and positioning them correctly, reversing the tabs and contents, etc. After good progress on GUI, I worked on flipping individual widgets. Th

More progress on my task & getting close to the finish line

Hello! I was not as close to finish as I had estimated before. However, I have some more good progress on my task! Right after my blog the previous week, I found the problem which was making me very concerned about my code. Whenever I ran ScummVM, it took about 20-30 seconds to start. I was worried that some of my code could be troublesome, but then I found out my configuration file was a little too big. The configuration file (scummvm.ini) stores some useful information and is often low in size (~10KB) or so. In code, we interact with this file using "ConfMan". For my previous task, I configured this to get a boolean from the .ini file to force the RTL-based GUI. I think some of my temporary code would have caused this issue. The ini file was around 150MB big! I was curious to see what it contained, so I opened it in sublime. It took ~15 minutes to open and it had this: 15 minutes! For my own amusement, I have saved this file in another location. I simply dele

Task2.begin() - Moving GUI to use U32Strings!

This week, I got started with my new task - Moving GUI to U32Strings.  Before I tell more about it, some miscellaneous things that happened this week: A team-member of ScummVM had previously worked on adding the achievements for some Wintermute games. He was very nice to offer me a game copy to test out the achievements for my task, but I had some steam credit so I thought there was finally a use for them! This way, I have bought my first ever steam game! I have run out of games - pre-2011 - that I can play on potato pc, so I never really bought anything from Steam. I have yet to try out the game, maybe sometime soon! While cleaning up the history and adding more code, I came across a merge conflict. Previously, I would just find a way around them, but this time I tried to solve it following step-by-step. This way, I learned how to solve merge conflicts! It was quite simple (at least for my small changes), and not as complicated as I thought it would be. I will try to solv

Overview and final looks at RTL GUI

This past week, I spent the majority of my time polishing the GUI, adjusting spacing and padding so that it matches the original (LTR) GUI well, solved my PR review issues, cleaning up my history. I have to say, I did not know before how important and time-consuming polishing things take in the context of GUI. I solve one thing, there's a new thing discovered and needed to solve, a new bug discovered and so on. One example, a bug, for which I was a little confused: I implemented a way to fetch an "RTL" boolean flag from the theme. If this is true and GUI is also using RTL, the widget will be flipped. One of my mentors has a Mac, and I was surprised to see my implementation did not work on their system. I didn't know what was causing the issue, but my mentor found the root of it. It was because the RTL flag of the object was uninitialized, which caused the issue. I use windows and MSVC - and my environment didn't have a problem with it. The problem quickly

Official coding starts, my first task - polished!

Hello again, it's been a while! The last time I wrote this, I felt like I was getting pretty close to the completion of my first task. But, whenever I'd complete one thing, another thing popped up and so on and so forth it went. These past 3 weeks, - I worked on the positioning of tabs and dialogs which overlapped each other. - I then worked on some individual widgets and added the support to flip them internally. Have a look at some of them! DropDownButtons: Orignal Flipped Lists: Orignal Flipped Sliders: Orignal Flipped These involved majorly working with the XML theme-based layout system that ScummVM uses, and it feels so awesome that all of them now have the support to be viewed as in RTL! - I worked on extending this RTL based support to the 3 existing themes, as well as extending support for RTL based on the resolution. Have a look! High res: 960x600 Small res: 320x200 If you've ever played IG