*triple posts*
If you guys haven't done what I suggested in my previous post, now is a good time.
I have additionally implemented some more features of the Sprite class today.
EDIT: I was able to split off a class with some common features. The Renderable class is a superclass of Sprite (and it will be for Window, Viewport and Plane and maybe Tilemap as well). But Renderable is not exposed to Ruby. One problem is that because Ruby creates our instances of Sprite, etc., no virtual function pointer table is created and we can't use any kind of polymorphism. That's why I have added an additional variable called type which is set to one of four (or five if we include Tilemap) possible values. This value determines which class it actually is and calls the proper draw method.
This may seem like a dirty trick (and I assure you, it is, it's very dirty), but at least we don't have to duplicate so much code (e.g. setting a bitmap, setting the Z coordinate, setting the offset X and offset Y coordinates, etc.). Also, we can put all objects into one single rendering queue instead of having to keep track of multiple queues (each one for windows, sprites, planes and viewports). I'll change the unsigned int variable to an enum later.