[comp.sys.atari.st.tech] Strange .RSC files for Rufus, Gemini

Mark.Onyschuk.Of.250/744@f744.n250.z1.FidoNet.Org (Mark Onyschuk Of 250/744) (04/04/91)

Someone posted asking about the peculiar resource files used by programs like Rufus and Gemini. I've done some work with user-defined objects for some in-house and other custom projects. This is what's being done here:
 
The resource file is loaded, as it normally is. The program then searches the various object trees for objects sporting a particular extended object number. If an object is found then it's ob_spec value is swapped out for a pointer to a USER_BLK structure which contains a pointer to new code that draws the object. It also contains space for a 4 byte word where you can place whatever value you had in ob_spec (if you need it).
This new object drawing code is passed a PARM_BLK whenever the object requires redrawing. The PARM_BLK contains information about the state of the object, the clipping rectangle into which the object must be drawn, etc. One nie feature of the OS is that you don't have to worry about drawing objects in "greyed-out" (ob_state = DISABLED) - this is done for you.
I will pass on source code to an archive at the first opportunity. I've written canned routines to load and automatically patch resources with extended objects, as well as to replace calls such as rsrc_gaddr. To implement some of the things you'll find in Gemini, you'll also have to develop your own form handlers. I have source for this as well.
 
Best Regards,
Mark