Hi everyone,
Here are some updates on my project and how I have been coming along.
Last week I mostly worked on refactoring and features suggested by Eugene. I started up with the Event stuff, the code now handles the RTL and quit events, and one can safely exit testbed, even if not all the tests are completed. Besides the keyboard events were completed as well.
Next I moved on to drawing rainbow palettes and rotating them, after doing some search over it, i figured out that rainbows are basically drawn on HSV scale by varying the hue from 0 to 360 degrees and keeping saturation and value constant at 1.
The algorithm for the conversion was available at wikipedia, although I needed to do some scaling so as to suit to my requirements. I scaled the 0-360 range to 0-254, as the remaining two colors are fixed for background and foreground respectively. Finally, I ended up with a couple of good-looking rainbows.
The rotation code was later modified to adapt to this change.
After this was done, I moved on to detection corrections. The detection code was switched to advanced detector.
Now if game data files are not found, the code leaves a warning for the data files and can continue normal execution skipping the FS tests.
Lastly, I moved on to scaling corrections. In scaling, to establish the correctness of scaling implementation, what I did was, say I have a cursor with target scale ‘x’, now if the game data is scaled by factor ‘y, > x’, then the scaler would scale the cursor as well by factor of ‘y/x’. Based upon this relationship, I devised a method to calculate an estimated rectangle which when scaled would fit the cursor. So if the rectangle fits the cursor, the implementation holds correct, incorrect otherwise.
This happens to be all from this week, however i expected more out of it, but just got stuck at some point and that consumed some time. However, as the midterms are nearing, I plan to continue the refactoring stuff next week too, so that I can get done all the features Eugene wanted me to have in. Next I can then safely move to audio subsystem.
Stuff for next week:
- Usability improvements: Selecting tests with checkboxes, skip a test, Progress bar.
- Specific test improvements: Extend dialogs to make them timed, test stats at end, rerun the tests, logging improvements
- Code Improvements: document functions in doxygen recognized format, a scan of code to make it adhere to CFC.
That happens to be all. I hope I get all of this done by next week :D.