[comp.sys.amiga.tech] Q2 - How to USE custom bit map

davewt@NCoast.ORG (David Wright) (09/29/89)

	Thanks to everyone who answered my question about converting
IFF pics to C data statements (tho I still need one to convert
IFF sounds to C).
	But now it appears I have another question: How do I USE the
data that I have converted??? I now have several structs, one with
the actual bits, one with the color map. How do I put them into a
screen. In the CUstomBitMap field?

			Dave

cmcmanis%pepper@Sun.COM (Chuck McManis) (09/29/89)

In article <1989Sep28.225653.20627@NCoast.ORG> (David Wright) writes:
>	But now it appears I have another question: How do I USE the
>data that I have converted??? I now have several structs, one with
>the actual bits, one with the color map. How do I put them into a
>screen. In the CUstomBitMap field?

Do we have to tell you everything ? :-) In truth the learning curve on
the Amiga is fairly steep and getting to that "ah-hah!" point can be 
agonizingly slow. 

Some general guidelines :
	What the screen looks like (depth, resolution, etc) is controlled
by the "View." The contents of the screen are controlled by the "BitMap."
Intutition puts them all together in the "Screen." 

So check out the OpenScreen command and in particular the NewScreen
structure. When you build a custom screen you can attach to it a
BitMap (if you want) and what ever is in it becomes part of the display.
Also check out the graphics routines like BltBitMapRastPort() which will
take a pointers to a bitmap and a pointer to a RastPort (Available in the
Screen or Window structure) and copy the data into that window. 

Also read Rob Pecks book, Programmers Guide to the Amiga since it explains
all this in more detail.



--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: cmcmanis  ARPAnet: cmcmanis@sun.com
These opinions are my own and no one elses, but you knew that didn't you.
"If I were driving a Macintosh, I'd have to stop before I could turn the wheel."

davewt@NCoast.ORG (David Wright) (09/30/89)

	Well, the learning curve isn't that bad, it's just that I have
never really been interested in graphics, and so I'm not that familiar
with how to do them on the Amiga... What I really want is a few
good books on how to do them, with current examples, and showing things
like using custom bitmaps, sprites, etc..... I haven't been able to
find that many which don't use BASIC for some of the examples, or
which don't assume you will be doing the conversions to C
data by hand....
	Know of any?

			Dave

jms@tardis.Tymnet.COM (Joe Smith) (10/01/89)

In article <1989Sep28.225653.20627@NCoast.ORG> davewt@NCoast.ORG (David Wright) writes:
>	But now it appears I have another question: How do I USE the
>data that I have converted??? I now have several structs, one with
>the actual bits, one with the color map. How do I put them into a
>screen. In the CUstomBitMap field?

It sounds like you are asking for some relativly simple source code as an
example.  I recommend getting disk #185 of the Fred Fish library.  It has
a bunch of files describing the IFF standard, and the sources to Display.
This program (formerly known as ViewILBM) reads an IFF file, allocates
a custom bitmap, puts in the appropriate values, and displays the picture.
-- 
Joe Smith (408)922-6220 | SMTP: JMS@F74.TYMNET.COM or jms@tymix.tymnet.com
McDonnell Douglas FSCO  | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms
PO Box 49019, MS-D21    | PDP-10 support: My car's license plate is "POPJ P,"
San Jose, CA 95161-9019 | narrator.device: "I didn't say that, my Amiga did!"

shadow@pawl.rpi.edu (Deven T. Corzine) (10/06/89)

On 29 Sep 89 04:53:18 GMT, cmcmanis%pepper@Sun.COM (Chuck McManis) said:

cmcmanis> Do we have to tell you everything ? :-) In truth the
cmcmanis> learning curve on the Amiga is fairly steep and getting to
cmcmanis> that "ah-hah!" point can be agonizingly slow.

Unfortunately true.  :-(

But it's worth it.  :-)

Deven
--
Deven T. Corzine        Internet:  deven@rpi.edu, shadow@pawl.rpi.edu
Snail:  2151 12th St. Apt. 4, Troy, NY 12180   Phone:  (518) 274-0327
Bitnet:  deven@rpitsmts, userfxb6@rpitsmts     UUCP:  uunet!rpi!deven
Simple things should be simple and complex things should be possible.