Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!purdue!bu-cs!bloom-beacon!mit-eddie!uw-beaver!ubc-cs!alberta!dvinci!weyr!Jeff.Petkau From: Jeff.Petkau@weyr.FIDONET.ORG (Jeff Petkau) Newsgroups: comp.sys.amiga.tech Subject: Re: Fast Scrolling Message-ID: <110.258415B1@weyr.FIDONET.ORG> Date: 11 Dec 89 18:25:44 GMT Organization: Benden Weyr, Saskatoon Sk. (306)-382-5746 Lines: 34 Original From: Sean Lamont To: All Re: Fast Scrolling > > I am trying to do horizontal smooth scrolling. I tried > > two methods, one using SCROLLRASTPORT and one using > > SCROLLVPORT. > > > > Problems I want to solve: > > 1) I can't get SCROLLVPORT to work at all!!! I gave it the VPORT Originial From: Brewski Rogers To: Sean Lamont Re: Fast Scrolling > Basically, there are NO fast intuition routines to scroll your > screens view. This may be connected to the fact that most screens > can be dragged up and down the screen... IMNSHO, ScrollVPort is just such a routine. You can easily animate at 15-20 frames/second with it (not fast enough for The Ulitmate Super-Duper Really Really Fast Action Whammo Blammo Arcade Game, but plenty enough for anything else). And it works by just the method you suggested: directly poking new offsets into the screen's copper list. Back to the original question (Sean Lamont): You probably forgot to follow the golden rule of Amiga programming--ignore everything the RKM's say about a function, except for the Autodocs (if it weren't for those, I doubt that a single working Amiga program would exist yet.) To scroll in a screen with ScrollVPort, do lak dis: MyScreen->ViewPort.RasInfo->RxOffset=x_offset_into_screen; MyScreen->ViewPort.RasInfo->RyOffset=y_offste_into_screen; if(I_am_double_buffering) MyScreen->ViewPort.RasInfo->BitMap=dbuf_bitmap; ScrollVPort(&MyScreen->ViewPort); #end of code You might want to stick a WaitTOF() before the ScrollVPort() if it's flickering a lot. Also, ScrollVPort() doesn't work on interlaced screens (bug). The edges of the screen will jump around if you don't do some setup first. Specifically, open your screen as wide as you want, then change MyScreen->Width and MyScreen->Height, and do a MakeScreen() and RethinkDisplay(). You only have to do this once. -- Jeff Petkau - via FidoNet node 1:140/22 UUCP: alberta!dvinci!weyr!Jeff.Petkau Internet: Jeff.Petkau@weyr.FIDONET.ORG Standard Disclaimers Apply...