RGSSError Implementations in Renderable Subclasses
DescriptionWe have a Renderable class that provides some basic functionality for all the classes that can be rendered and are visible on the screen. These instances can be disposed manually and the majority of the methods of those classes cannot be accessed once it has been disposed. To prevent this access, an RGSSError is thrown (i.e. raised in Ruby language). These throws/raises need to be implemented.
PriorityLow.
PrerequisitesRGSS::Sprite Implementation (http://forum.chaos-project.com/index.php/topic,9235.0.html)
RGSS::Viewport Implementation (http://forum.chaos-project.com/index.php/topic,9237.0.html)
RGSS::Plane Implementation (http://forum.chaos-project.com/index.php/topic,9236.0.html)
RGSS::Window Implementation (http://forum.chaos-project.com/index.php/topic,9234.0.html)
RGSS::Tilemap Implementation (http://forum.chaos-project.com/index.php/topic,9232.0.html)
AssignedForeverZer0
Everything elseCheck out how I have implemented the raising of RGSSError in Bitmap::rb_initialize in case the dimensions are less than 1x1.
I'll see what I can do with this.
I spent a while trying to throw as many errors as I could with these classes, might as well try to catch some. :P
I know, I know, corny humor.
Actually that was clever. xD
Even though the prerequisite tasks haven't been done yet, feel free to start working already since as good as all methods have been interface already.
I also did RGSS::Bitmap. I wasn't sure why it wasn't on the list, but I figured it should be.
If that's a problem, I'll revert it back.
EDIT:
I think its done. Some various notes that may or not be of interest
- RGSS::Plane was unaffected because all of its functions were inherited, I did add a "#include RGSSError.h" to it, but only cause I was unsure if was required or not. I'll remove it if it is useless.
- The way it stands right now, a reference to @autotiles of a disposed Tilemap instance will cause an error. Although this is how I think it should have been, RMXP did not have this behavior. I don't see how/why this would need to be referenced, so let me know and I'll add in Exception handling there too.
It's not a Renderable subclass, but yeah, it's good you did it anyway.
You can remove the header inclusion.
Actually it shouldn't throw an error. Just because a renderable object containing a source (Bitmap instance in this case) cannot be accessed anymore, doesn't mean that the source cannot be accessed anymore. The same goes for Sprite and similar classes. You can still access Sprite#bitmap even after you disposed the sprite (you just can't use Sprite#bitmap=).
Okay, removed header.
Moving this one to "Finished".