Chaos Project

Featured Projects => Tasks => Advanced RPG Creator => Finished Tasks => Topic started by: Blizzard on May 19, 2011, 03:17:02 pm

Title: [Finished] [RGSS] Cloning
Post by: Blizzard on May 19, 2011, 03:17:02 pm
Cloning




Description

RGSS objects can be cloned. The question is which of them can be cloned and which can't.
Every object that can be cloned needs to have a rb_initialize_copy method defined. Declare the method in the header, define the method in the source file and add it to the interface of the class.



Priority

High.



Prerequisites

None



Assigned

Blizzard



Everything else

For reference you can take a look at how Bitmap was done.
If you are unsure how to implement rb_initialize_copy for a specific class, just leave a comment with "// TODO - cloning" and I will take care of that.
You should first try in the original RGSS to call clone for every RGSS class to see if it works and if it's defined.
Title: Re: Cloning
Post by: ForeverZer0 on May 20, 2011, 12:09:13 am
Wasn't this already included in this (http://forum.chaos-project.com/index.php/topic,9220.0.html) task?
Title: Re: Cloning
Post by: Blizzard on May 20, 2011, 02:11:05 am
I made a special task because nobody was attending to that task. :P
Basically the other task is done except that the rd_initialize_copy method wasn't implemented.
Title: Re: Cloning
Post by: Blizzard on August 09, 2011, 11:18:51 am
*coughs*
Title: Re: Cloning
Post by: G_G on August 09, 2011, 11:24:45 am
Quote from: Blizzard on July 30, 2011, 06:41:07 am
*cough* <_<;

Is this task done? I removed the rb_initialize_copy method from the list because it is part of another class.


Quote from: Blizzard on August 09, 2011, 11:18:51 am
*coughs*


I have some cough medicine if you need any.
Title: Re: Cloning
Post by: Blizzard on August 09, 2011, 11:37:40 am
rb_initialize_copy still needs to be implemented. :P
The thing is that the Color needs it in order to fix the current text color bug.

EDIT: Can somebody at least check out which RGSS classes are clone-able? I'll take care of the rest.
Title: Re: RGSS: Cloning
Post by: G_G on August 13, 2011, 02:24:24 pm
I know color is for sure. Tone, plane, viewport? I would honestly test all classes but I'm in the worst environment for a computer nerd right now.
Title: Re: RGSS: Cloning
Post by: Blizzard on August 13, 2011, 03:08:28 pm
In the middle of a forest? D:

I'm more worried about the Renderable classes. I think they aren't clone-able. The simple classes are all clone-able (Color, Tone, Font).
Title: Re: RGSS: Cloning
Post by: G_G on August 13, 2011, 07:55:58 pm
Bitmaps can be cloned. I remember doing it while testing out graphics. I was applying effects to bitmaps and then when I realized I had to clone the graphic to its own id so the effect wouldn't be applied to that one graphic globally. I think Sprite is even clone-able.

I'm just on a password protected computer, the owner keeps changing passwords so I can't install anything, so I can't pop open RMXP and do a test on several classes....*remembers portable RMXP*
Title: Re: RGSS: Cloning
Post by: Blizzard on August 13, 2011, 08:10:04 pm
I know bitmaps can be cloned. That's already implemented.
As I said, I'm not sure about the renderable classes, because we had to implement them in an unusual way and probably Enterbrain had to do so as well. Because of that simple cloning might not work well. So somebody simply needs to test it. *pokes all scripters at the forum*
Title: Re: RGSS: Cloning
Post by: nathmatt on August 13, 2011, 08:44:50 pm
ow quit poking me  :naughty:
Title: Re: RGSS: Cloning
Post by: Blizzard on August 20, 2011, 03:47:54 pm
I was right, Renderables cannot be cloned. And cloning Viewport crashes the whole Game.exe. That one won't happen in ARC.