•  Back 
  •  AES 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-File
                                  Resources



GEM resources consist of object trees, strings, and bitmaps used by an
application. They encapsulate the user interface and make
internationalization easier by placing all program strings in a single
file. Resources are generally created using a Resource Construction Set
(RCS) and saved to a .RSC file (see Appendix C: Native File Formats) which
is loaded by rsrc_load() at program initialization time.

Resources may also be embedded as data structures in source code (some
utility programs convert .RSC files to source code). Desk accessories
often do this to avoid complications they have in loading .RSC files.
Resources contain pointers and coordinates which must be fixed up before
being used. rsrc_load() does this automatically, however if you use an
embedded resource you must use rsrc_rcfix() if available or rsrc_obfix()
on each object in each object tree to convert the initial character
coordinates of to screen coordinates. This allows resources designed on
screens with different aspect ratios and system fonts to appear the same.
In any case, you should test your resources on several different screens,
especially screen resolutions with different aspect ratios such as ST
Medium and ST High.

Once a resource is loaded use rsrc_gaddr() to obtain pointers to
individual object trees which can then be manipulated directly or with the
AES Object Library. Replacing resources after they're loaded is
accomplished with rsrc_saddr().