[comp.sys.amiga.programmer] Scrolling super-bitmaps

bairds@eecs.cs.pdx.edu (Shawn L. Baird) (02/26/91)

ycs16a03@merrimack.edu writes:


>     OK, say I have a super-bitmap (ex. 800 x 800), and I want to scroll
>around in it on a smaller screen (ex. 640 x 400).  I'd like to accomplish
>this as "legally" as possible using graphics/intuition routines.
>Unfortunately, I'd also like it to be reasonably fast and smooth.
>I can accomplish this in about 10 minutes by programming the hardware
>directly.  The only problem is, of course, it won't multitask (not to 
>mention the fact that some programmers out there would probably have me
>drawn and quartered for this.)  I've played around with the viewports and
>some routines like ScrollRaster, but the results have been downright
>pathetic.  Can anyone give me some advice on this?
>I'd prefer examples in assembly, but C is all right too.

Well, there are a couple of ways of doing this that should work in a multi-
tasking environment. Intuition provides Super-Bitmap flags to display a
Super-Bitmap in a window. You should be able to get pretty smooth scrolling,
although it isn't something I've ever tried. Also, you can use the blitter to
your hearts content as long as you remember to Own and Disown (sp?) the
blitter. You can also use user copper lists to your advantage. Unfortunately,
the results will be, unavoidably, slower than taking over the hardware
directly (even if you were to Forbid() or something to stop the machines other
tasks) due to the overhead of calling OS routines. As long as you're not
programming Turrican you should be okay... ;) Since 2.0 can apparently use
screens larger than the display and scrolls very smoothly, this is probably
readily available in 2.0, and from the glut of programs that turn your
Workbench into a Super-Bitmap there is probably some source code out there
somewhere.

>                        Thanx,
>                        S. Borden
| Shawn L. Baird                        | Or via US Snail:                  |
| bairds@eecs.ee.pdx.edu                | 17650 SE Cason Rd.                |
| ...uunet!tektronix!psueea!eecs!bairds | Gladstone, OR  97027              |