GSoC with ScummVM: Weekly report (Week 4-5)

Hi everyone,

Its sunday today and time for some update regarding how am I moving on.

Last week I worked upon some loopholes in the GFX tests in the first half of the week, implemented some FS stuff in the middle
and finally ended up with completing the savegame tests.

Crash while scaling with 3x scalers and odd dimensioned cursors.

while working on the scaled cursors, I noticed a weird behavior, My code happened to crash always with 3x scalers.
I tried some more permutations of cursor dimensions, and with hours of efforts with valgrind and gdb, I was finally able to establish  that the behavior is due to somewhere inside the scaling code.(and not from my code). Thanks Jordi for verifying it for me.
Finally, we found that there is some assumption in scaling code which relies on cursor dimensions being even. I am tabulating here the results of other permutations i tried with.

For square cursors:

  • Odd  x Odd crashes
  • Even x Even Fine
  • Even x Odd Crashes
  • Odd x Even Works fine

same behavior for non-square cursors.

The overlay rectangle test was corrected as well, thanks to jordi again, which points to some update on documenting how showOverlay() should be called.
If called after writing some data to overlay, copyRectToOverlay() in my case, there is nothing visible on the overlay, however, moving the showOverlay() ahead does all the charm :D.

Ideally, I expected it to be like this, “write something to overlay and then make it visible”, unless it is documented to behave otherwise.

Next, two new tests were added, Palette rotation and Testing pixel formats. As pointed out in my previous post, in palette rotation, we try to demonstrate how user can change the data displayed on screen without having to paint anything. This should be possible in palette graphics only.

In pixel tests, what I did was iterate over all PixelFormats, displayed some colored rectangles for each, and verify if they are rendered correctly.

Next returning to FS tests, a cache insensitive file read/write/navigation tests were implemented as suggested by Eugene.
However, the system is still not able to open files with names “file.” (with a trailing dot) as “file”.

In savegames, each and every function defined in common/savefile.h was tested.
However, I noticed that the error handling functions are not working as expected.

What I tried:

  • Cleared the error state in savefile,
  • Opened a non-existent file,
  • re-examined the error state, which happened too be Common::kNoError, clearly not expected (as it appears to me).

As I am done with all these, I have moved upon the Misc tests datetime/mutexes/timers, the details of which are topic of my next post.

Furthermore, today I got some feedback from Eugene too on my efforts so far, which was encouraging :), He had some inputs as well, which point to even more work ahead! :D.

Neeraj