New this time around:
- EventArgs and EventHandler system implemented.
- Added key and VBL events.
- Added drawFilledRect() function for drawing to gadgets.
- Added SuperBitmap gadget.
- Converted from 8-bit display to 16-bit.
If anyone's reading, I'd like to hear your thoughts on the last change. I initially went for an 8-bit display because it uses less memory and should be twice as fast as 16-bit. However, it's become painfully apparent that the complexities of moving 8-bit data around at speed are slowing down the development process and making things much more difficult than the need to be.
I switched everything around to use a 16-bit display instead, and it looks like any speed difference is negligible, but re-implementing some of the more complicated features took next to no time. Can anyone think of any real disadvantages in working in 16-bits? The advantages are faster, easier development, and I can support things like loading image data onto the screen without having to write complex palette remapping functions. As far as I can tell, there aren't any disadvantages.
I've also added a couple more demos to the second screen. There's a very simple Pong demo that shows the new key events (click the window and use up/down to control the left-hand bat), new rectangle drawing functions, and the VBL event system.
There's also a demo of the SuperBitmap gadget. At the moment, the demo is very simple - it just shows a rectangle that can be dragged around with the stylus. However, the SuperBitmap gadget is actually a window into a much larger bitmap stored elsewhere in RAM - it enables windows to contain much more content than their dimensions allow, and that content can be scrolled around smoothly by dragging the stylus in the window. (This was the real reason for the 16-bit switch - it's impossible to scroll smoothly in the horizontal axis using the DMA hardware when working with 8-bit data, as we can't copy an odd pixel into an even pixel since the data is treated as a single 16-bit value).