Path: utzoo!attcan!uunet!zephyr.ens.tek.com!uw-beaver!mit-eddie!bu.edu!rpi!zaphod.mps.ohio-state.edu!uwm.edu!ux1.cso.uiuc.edu!jason From: jason@ux1.cso.uiuc.edu (char *myName) Newsgroups: comp.sys.mac.programmer Subject: Re: ResEdit TMPLs Message-ID: <1990Sep29.015058.20304@ux1.cso.uiuc.edu> Date: 29 Sep 90 01:50:58 GMT References: <106625@tiger.oxy.edu> Organization: University of Illinois at Urbana Lines: 54 hammersslammers1@oxy.edu (David J. Harr) writes: >I am trying to create a template for a custom resource in ResEdit. Since I >was too cheap to buy the thing from APDA ("Money? What do you mean spend >money? I pirated this fair ands square...") I find now that I am being bit > by not understanding the size of the various parameters in the TMPL TMPL. >There are several different sizes, including >HWRD (half word = 1 byte?) Hex word: 2 bytes >DWRD (double word? but that would be the same as a long, right?) Decimal word: 2 bytes >ZCNT (a zero count, ie you take the number and add one to it) I think this refers to a zero-based counting scheme used with certain list structures. For instance, color tables have a word which is one less than the number of entries in the table. >HLNG (half long = 2 bytes? but that is the same as a word, right?) Hex long: 4 bytes >FWRD (full word = 2 bytes?) Filler word: 2 bytes. Two null bytes are inserted into the resource structure, but an editable field does not appear where FWRD was used. >BBIT (I dunno) Boolean Bit? Binary Bit? I think this takes up one bit of a word-sized object (or perhaps a byte-sized object) similar to struct { Boolean aBit : 1 }... >DLNG (double long = 8 bytes?) Decimal long: 4 bytes >ESTR (dunno) Me either. I suspect it is a type of string. Pascal strings (PSTR) will begin with a length byte. C-style null-terminated strings (CSTR) will end with a zero-byte. Perhaps ESTRs are simply an alternative format for strings ("empty" string, perhaps, as a single byte filler). LST*s are used to create list structures of dynamic size. Note: this information is free but may not be worth the price. I too have not purchased the APDA materials. This knowledge comes from my own hacking with TMPLs. -- | | |====================| | | | Jason Watts | \ |\ |\ \ | (jazzin@uiuc.edu) |