home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 48
/
Amiga_Dream_48.iso
/
Atari
/
c
/
libs
/
gemfast
/
gemfut15.lzh
/
AESUTRS1.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-05-26
|
2KB
|
60 lines
/**************************************************************************
*
* AESFAST PD utilties.
*
* Resource-related utilities 1...
* rsc_sstrings
*
* 05/26/90 - v1.4
* > Added support for ICONs.
*************************************************************************/
#include <gemfast.h>
/*-------------------------------------------------------------------------
* rsc_sstrings - Set string pointers within rsc tree.
*
* Will this work with MWC? Good question, it depends on how MWC puts
* parms on the stack...
*-----------------------------------------------------------------------*/
typedef struct {
int object;
long stringptr;
} OBJSTR;
void
rsc_sstrings(ptree, parms)
register OBJECT *ptree;
OBJSTR parms[];
{
register OBJECT *pobj;
register OBJSTR *pparms;
register long *pspec;
for (pparms = parms; pparms->object >= 0; pparms++) {
pobj = &ptree[pparms->object];
pspec = &(pobj->ob_spec);
if (pobj->ob_flags & INDIRECT) {
pspec = (long *)*pspec;
}
switch (pobj->ob_type & 0x00FF) {
case G_ICON:
pspec = (long *)*pspec;
pspec = &pspec[2]; /* add 12-byte offset to pointer */
break;
case G_TEXT:
case G_BOXTEXT:
case G_FTEXT:
case G_FBOXTEXT:
pspec = (long *)*pspec;
break;
}
*pspec = pparms->stringptr;
}
}