I’ve added the best feature to Woopsi. The feature that tops all others. The feature that’s been missing, and will make all other features pale in comparison.
At last, a debug console.
It’s just a combination of a screen, window and multiline textbox that open when Debug::output() is called, but it should make developing easier. I got absolutely sick of not being able to debug anything, particularly when Woopsi works fine in all of the emulators but breaks on the real hardware. Having to unplug the flash cart, take out the micro SD card, stick it into the SD adaptor, stick it into the card reader, wait for Windows to recognise it, copy the ROM across, reverse the whole process, get the DS booted and finally load Woopsi to discover that it still doesn’t work and that I have no way to work out why was driving me crazy.
Other new changes. Text::wrap() wasn’t splitting at line returns in the last line of text; that’s now fixed. I’ve fixed some more bugs in the TextViewer - that must be the buggiest piece of code I’ve ever written. It’s full of bugs because the Text class (which used to be in the TextViewer) is full of bugs, and the bugs cancel each other out. As soon as I fix the bugs in one class, the other class stops working. It makes it impossible to find out where the bug is or what it is.
I’ve fixed the clipping routine in the SuperBitmap class - another pain in the behind. For some reason, the code worked perfectly when emulated, but went wrong on the DS - instead of drawing filled rects of a particular colour, it kept drawing black rects or doing nothing at all. Some very strange pointer stuff must have been happening, but I’ve rewritten it and it all seems to work now.
A few changes to the MultiLineTextBox - it now outputs using the GraphicsPort, automatically sets its buffered row count to the number of visible rows (if no value is specified), forgets rows of text that fall outside its buffer, and implements a “setAutomaticDrawing()” function. If set to “false”, draw() must be called after calling setText() or addText() for the changes to be visible. Lets you call multiple addText() functions without multiple draws occurring.
There are a few changes I could make to the MultiLineTextBox - it should really scroll with the DMA hardware and only print new text, but on the DS itself it’s quick enough at the moment that I’m not worried about it.