Page 1 of 1

Basic RTC API

Posted: Tue May 23, 2006 1:36 pm
by andyboy_uk
hi george,

Im assuming that in the code of RTC there is an object model in place that has all of the object types within an RTC file and every possible property with their limits, choices, options, etc built in.

Is there any way you could make a little reflected routine to scan through that object model and plonk it out into an xml document (or some other format).

That way guide writers can put very definitive guides together of what things do and where.

Also if this function was accessible through a DLL or by referencing the EXE file in say a .NET application, it would make 3rd party tools a lot easier to write.

This could be a pain in the backside depending on what the object model inside the code is like, but with the speed of your changes recently I would say you have a fairly generic and flexible structure in there so it should be easy(ish) to extract.

Not to mention, if you had a way for an external EXE to pick graphics, sounds, etc, from an RTC file (via DLL or reference to the EXE) im sure there are a million tools that would be great.

I will be happy to explain my warped idea in more detail over PM if you like.

Posted: Tue May 23, 2006 1:36 pm
by andyboy_uk
Incidentally, I dont mind writing said DLL if you are able to help me reading the RTC data files.

Re: Basic RTC API

Posted: Tue May 23, 2006 1:53 pm
by George Gilbert
andyboy_uk wrote:Im assuming that in the code of RTC there is an object model in place that has all of the object types within an RTC file and every possible property with their limits, choices, options, etc built in.
Not an object model (it's all in C rather than C++) but the general point is right.
andyboy_uk wrote:Is there any way you could make a little reflected routine to scan through that object model and plonk it out into an xml document (or some other format).
Not easily. Also, they don't contain anything that isn't already viewable in the RTC editor, so I'm not sure what that would give you.
andyboy_uk wrote:That way guide writers can put very definitive guides together of what things do and where.
Ooooh - that so doesn't logically follow.

Just knowing that a WALLITEM_RELAY has the "is-a-relay" property set in its object doesn't in any way shape or form give you an idea of what it does and how it does it!

Posted: Tue May 23, 2006 8:41 pm
by andyboy_uk
True I suppose, I was working on the assumption that the editor was using some sort of reflected routine to get at all the various properties you can set.

But if that is not the case, are all the forms hardcoded to a degree? or did you create custom controls or something to sort of "lego" the forms together for the editor?
Ooooh - that so doesn't logically follow.

Just knowing that a WALLITEM_RELAY has the "is-a-relay" property set in its object doesn't in any way shape or form give you an idea of what it does and how it does it!
Good point, but with a bit of experimentation im sure we'd get there. To be honest I think your right though, the editor does everything and more that was requested recently and you have done a sterling job of it.

:)

So how bout the graphical hook in? :)