Chase-san on 2010-06-01 at 06:59 said:

Looking nice. I managed to port my GIF loader over to a Woopsi BitmapBase interface. Works well (even if I did have a bit of an annoying error in getData(x,y)). I just loads it as a 16 bit image (instead of a paletted image, which I used to use, since converting back and forth would be annoying).

I attempted to port the JPG loader over as well, but it didn’t work out to well.

I might attempt to make a BMFont interface for Woopsi as well. This would be useful for me (since I use BMFont extensively).

Chase-san on 2010-06-01 at 10:05 said:

Though, I cannot seem to hold mroe than two full screen images in memory without emulators crashing.

Not sure if this is due to my loader or if I am unexpectedly hitting the memory limits of the device. This might be, if woopsi uses a lot during initialization. But if it is… OUCH.

I know that the video memory is fairly limited, but the 4mb of main memory should have plenty of room to store a few 100kb blocks.

Ant on 2010-06-01 at 13:03 said:

Woopsi shouldn’t use anywhere near that much memory. I’d guess you’ve got a memory leak somewhere, or you’re putting a lot of data onto the stack (DS stack = 16K).

Chase-san on 2010-06-01 at 23:29 said:

That might be it. I got some strange results with the GIF loader, but your Bitmap loader works fine. Not sure why it does it, I didn’t write the GIF Library, but I will try again later.

Also, for your Bitmap loader. There is a variant of the 16-bit format that allows transparency. It has a dib header size of 56 bytes, with 4 8-bit masks instead of 3, which add the extra 16 bytes at the end of it. For that reason, perhaps you should set it to get the alpha bit from the image. In normal 16-bit images, the alpha bit is 1.

As for me, I am going to write a GIF loader from scratch here in the next few days, see if I can make an interface similar to your bitmap one. That is to say, read from file as needed, instead of reading it onto the heap.

After that, I will probably work on that font thing I mentioned earlier. Oh by the way. Again Good Job.

leonel on 2010-06-10 at 15:27 said:

Maybe the woopsistring class should be have a method that compare with a literal string. And the text class maybe shouldn’t break, only at te code point new line.

Ant on 2010-06-11 at 08:03 said:

The WoopsiString’s compare method should automatically wrap any literals in new WoopsiString instances. True, this involves creating a copy of the string and a new object, but I doubt that it will ever present that great a performance problem.

As for the Text class, it’s meant to be used by the MultiLineTextBox set of classes. These only have vertical scrolling enabled, so disabling automatic wrapping would result in them being unusable for pretty much all text not written for a specific string displayed in a specific textbox size using a specific font. It’s far easier just to wrap the text automatically.

It shouldn’t be terribly difficult to create a new multiline textbox and a new text class that enables horizontal scrolling and disables wrapping, should you want to have a go at writing it. I’ll certainly help out. It’s not something that I want to add to the core library, though.

leonel on 2010-06-12 at 05:40 said:

That’s ok for me. And Another thing, I think that the key events must be handled by the application not by the core, even the cursor position at miltilinetextbox or the procedure should be can overwritten.

Ant on 2010-06-14 at 14:32 said:

Key events in both TextBox and MultiLineTextBox can be overridden. To do so, you need to subclass one of those gadgets and override one or both of the following methods:

  • onKeyPress()
  • onKeyRepeat()

You can also override the onKeyRelease() method (from the Gadget class) if you need to.

These methods are called when the physical DS buttons (ie. d-pad, X, Y, L, R, Start and Select) are pressed/released/etc. If you need to change the way that the textboxes deal with the on-screen keyboard, override these methods:

  • handleKeyboardPressEvent()
  • handleKeyboardRepeatEvent()
  • handleKeyboardReleaseEvent()

leonel on 2010-06-29 at 20:13 said:

By the way: leonel = leonelhs