The past few days have been spent furiously copying and pasting FishEd code into the new framework, and tidying up a multitude of errors and syntax changes along the way. I started by sorting out a small problem with the toolbar, as the spacers weren't working properly - this turned out to be a problem caused by the fact that the toolbar graphic was a BMP instead of a PNG. I also tidied up the event calls, as Blitz+ starts Toolbar events at zero and ignores Toolbar spaces.
This was followed by a lengthy session adding hotkeys and modifier commands to the Menus; in Blitz+, you had to add Menu shortcut keys manually, and check for the key presses yourself; Blitz Max, on the other hand, has a beautiful system that not only prints the hotkey text in the menu for you, but also checks for the keypress. Lots of fiddly work to convert, but beautiful in practise.
Hit a slight snag with the hotkey code, namely the issue of keyboard conflicts (the menu key detection takes priority over any manual key checks I perform). Finished off that particular session, however, by implementing a proper, full-screen zoom mode, something which was exceedingly simple to implement; this bodes well for FishEd Max, and hopefully I'll be able to have a much more powerful and flexible zoom mode.
Next came a fairly lengthy session inside the Globals source file; I want FishEd Max to run in Superstrict mode, which requires that, among other things, variable types are declared - this involved adding a % after all my integers, as well as assigning Object Types to Gadgets, Images and Banks.
The next big task was to start adding the Menu checks, Toolbar checks, and Button checks; the biggest problem here is that the functions have yet to be copied across to the Testbed, so any checks I add would be referencing non-existent routines.
However, I needed to set up my external function files anyway, so I set about adding the checks, compiling, then fixing the errors one by one by adding a dummy function to my function files each time a function couldn't be found (thus giving me a fully working template program).
This has the knock-on effect of allowing me to simply cut 'n' paste the functions into their relevant spot in the function files; in effect, I'm completely organised before I even start converting code. :)
With that arduous groundwork out of the way, I'm was free to start porting routines across one by one, so I kicked off by adding the Grid display code, and then turned my attention to getting the Canvas display code working for the various panels. Rounded off yesterday's session by adding the Tile Inc/Dec code (I'd completely forgotten that I'd written a really nice routine that increments and decrements the current tile, adjusting all of the display cursors and offsets along the way - a classic case of "That's a really nice routine, but I don't remember writing it...").
