Chaos Project

Featured Projects => Tasks => Advanced RPG Creator => Finished Tasks => Topic started by: Blizzard on April 08, 2011, 02:49:15 am

Title: [Finished] [RGSS] RGSSError Implementations in Renderable Subclasses
Post by: Blizzard on April 08, 2011, 02:49:15 am
RGSSError Implementations in Renderable Subclasses




Description

We 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.



Priority

Low.



Prerequisites

RGSS::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)



Assigned

ForeverZer0



Everything else

Check out how I have implemented the raising of RGSSError in Bitmap::rb_initialize in case the dimensions are less than 1x1.
Title: Re: RGSSError Implementations in Renderable Subclasses
Post by: ForeverZer0 on May 03, 2011, 09:59:31 pm
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.
Title: Re: RGSSError Implementations in Renderable Subclasses
Post by: Blizzard on May 04, 2011, 02:20:13 am
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.
Title: Re: RGSSError Implementations in Renderable Subclasses
Post by: ForeverZer0 on May 12, 2011, 12:07:45 am
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
Title: Re: RGSSError Implementations in Renderable Subclasses
Post by: Blizzard on May 12, 2011, 06:45:01 am
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=).
Title: Re: RGSSError Implementations in Renderable Subclasses
Post by: ForeverZer0 on May 12, 2011, 06:04:25 pm
Okay, removed header.
Moving this one to "Finished".