[net.micro.atari16] RCS problems with icons, bit images.

TPC862@ESTEC.BITNET (06/03/86)

OPTIONS: NOACK    LOG    SHORT     NOTEBOOK ALL




Date: 2 June 1986, 16:53:50 EST
From: Ton van Overbeek          +31 1719 83041       TPC862   at ESTEC
To:   INFO-ATARI16 at SU-SCORE.ARPA
Subj: RCS problems with icons, bit images.

hmm@unido.bitnet writes:
> Did you ever try to incorporate multiple icons in your resource
> file using RCS  ?  It screws up
> the resource file completeley, and you have to remove the complete
> object tree which contains these icons.
>
>   Hans-Martin Mosner (hmm@unido.uucp, hmm@unido.bitnet)
>   University of Dortmund

I found the following when trying to make a dialogue box with the Resource
Construction Set. The dialog box included both text and an image (bitblk).
Sometimes it worked, sometimes three boms appeared when trying to open
the dialog box (that happened both in the RCS and in the apllication using
the resource). It turned out that the problem is the generation of the
.RSC file by the RCS. First the resource header (as defined in one of
the header files) is generated. Then all the strings used in menu's,
TEDINFO's, alertboxes, etc. After that follow the bit images of the
images and the icons.

These images have to start on a word boundary ||||||||||||

When the total number of bytes in all the strings (including the ending
nulls) is odd you will have a problem.

The remedy is simple. Construct your resource. Save it. Load it again.
Try to open something with an image or icon in it. If boms occur, change
one of the strings (doesn't matter which one) by adding or deleting
one character (a space probably). And, magic, it works.

Ton van Overbeek
European Space Research and Technology Centre (ESTEC)
Control Systems Section
P.O.Box 299
2200 AG Noordwijk, The Netherlands.
Phone: +31 1719 83041
Email: TPC862%ESTEC.BITNET@WISCVM.WISC.EDU  (ARPA)
       TPC862@ESTEC                         (EARN/BITNET)