Path: utzoo!mnetor!uunet!husc6!mailrus!nrl-cmf!ames!lll-tis!oodis01!uplherc!utah-gr!utah-cs!thomson
From: thomson@utah-cs.UUCP (Richard A Thomson)
Newsgroups: comp.sys.amiga.tech
Subject: Re: RESOURCES (as in disk-resources)
Message-ID: <5476@utah-cs.UUCP>
Date: 9 May 88 01:42:48 GMT
References: <8805080154.AA23107@cory.Berkeley.EDU>
Reply-To: thomson@cs.utah.edu.UUCP (Richard A Thomson)
Organization: University of Utah CS Dept
Lines: 60

In article <8805080154.AA23107@cory.Berkeley.EDU> dillon@CORY.BERKELEY.EDU (Matt Dillon) writes:
>>I have one comment. You need to tag each resource somehow:
>>
>>	BITMAP *bm = GetResource("MyTitleScreen", "BITMAP");
>>
>>Otherwise, what happens when you change it into an audio sample?
>
>	It blows up.  Of course, since the programmer defined that
>resource to be a BitMap, he knows what it is.

OK, here we go again.  There's all this really neat talk about another tool
that could be of use to every Amiga programmer.  The question is this time,
will it be a library?  So far, I've seen two libraries come down the pike.
The first one I saw [not counting x.device files, which are sort of a lib-
rary] was the ARP library.  "Great!", I thought.  Here were all these nifty
tools for programmers supplied in a library!  That wonderful run-time shared
library that is largely LANGUAGE INDEPENDANT.  Now, for all you guys out there
with 2 megs of memory and a hard drive who program in C may not particularly
notice the gap here.  With a C compiler, you can just link and compile all
these programmer goodies that come across in C.  The rest of us limp along
with what we've got [relatively speaking; some find it easier to translate
the goodies into their language, or hook up the c object code to their
sytem].

I would just to request that if something like what Matt has suggested shows
up, I'd like to see it packaged as a library.  I'm not asking you to make
lots of different translations of your code in language x, that I happen to
use.  I can translate it if I need it bad enough.  [Language X has a superb
ability to mimic the structure of C code]  A library is much more useful.
Moreover, its useful right away!

>	Huge in fact... think of all the neat things you could put in
>there!  So far, a particular resource 'file' is broken up into three
>parts:
>	(1) structure defs
>	(2) dictionary of resource names
>	(3) Data pertaining to the resources
>
>	A structure is made of other structures.

It sounds to me like (3) is made up of some tree-like structure reflecting the
nested data bits inside one another.  Couldn't the mechanism for overlay trees
be used to reflect this?  Then you could use the existing DOS hooks to get your
data in.

>	For structures containing pointers to sub-structures, the DATA
>part of the resource would be not only for the master structure, but
>also for any sub-strutures (or sub-sub-structures, etc...)
>
>					-Matt

Perhaps you'd put the overlay segment name in here?


							-- Rich
-- 
USnail: Richard Thomson, Design Engineer, Oasis Technologies, 3190 MEB,
        University of Utah, Salt Lake City, Utah  84112
ARPA: thomson@cs.utah.edu	FONE: (801) 584-4555:      Talk to a machine;
UUCP: {bellcore, ihnp4, ut-sally}!utah-cs!redpine!thomson     they're lonely.