FATXC@USU.BITNET (01/23/88)
I am trying to use either a ScrollLayer() or BltBitMap() function to scroll a superbitmap in a window. The functions appear to work quite well, but there is always an annoying flicker when several calls are made to these functions in rapid succession. Is there a way to prevent the colors on the screen from flashing? Could it be that the blitter being done while the screen is being updated causes the flashing? I rember something like this causing trouble with updating the screen on an IBM (*gasp*) machine when I was writing to video memory, I had to write routines (in assembly, no less) to wait for horizontal or vertical retrace to occur before I could write to video memory without causing flicker. IS the same thing happening here? or is is something else entirely. I have seen some very nice scrolling rastports without flicker, so I assume it can be done... Thanks in advance for any information. J. Norman Gee ________________________________________________________________________ | | | | No one pays attention to what I | Email: fatxc@usu.bitnet | | say, so why bother disclaiming | USNail: usu trailer ct # 30 | | anything? | Logan Ut. 84321 | |_____________________________________|__________________________________|
papa@pollux.usc.edu (Marco Papa) (01/23/88)
In article <8801230030.AA28130@jade.berkeley.edu> FATXC@USU.BITNET writes: > > I am trying to use either a ScrollLayer() or BltBitMap() function to >scroll a superbitmap in a window. The functions appear to work quite >well, but there is always an annoying flicker when several calls are >made to these functions in rapid succession. Is theere a way to prevent >the colors on the screen from flashing? Yes. > I have >seen some very nice scrolling rastports without flicker, so I assume it can >be done... In A-Talk Plus I do that in the Zoom for the Tek4014 emulator. I have two horizontal and vertical scrolling gadgets that control a 1024 x 780 superbitmap. When I get a GADGETDOWN, I smooth-scroll until the gadget is released looping for INTUITICKS messages. A little voodoo with ModifyIDCMP is also needed. I recall that the source code for the Lines Workbench demo (probably by Bart) does just that. -- Marco
dillon@CORY.BERKELEY.EDU.UUCP (01/23/88)
:In A-Talk Plus I do that in the Zoom for the Tek4014 emulator. I have two :horizontal and vertical scrolling gadgets that control a 1024 x 780 :superbitmap. When I get a GADGETDOWN, I smooth-scroll until the gadget is :released looping for INTUITICKS messages. A little voodoo with ModifyIDCMP :is also needed. I recall that the source code for the Lines Workbench demo :(probably by Bart) does just that. An easier way would be to set the FOLLOWMOUSE flag for the prop gadget. Then you get mouse movement events *while* the person is sliding the gadget around. The example code below will also handle the update as fast as the program can take it (that is, it uses only the very latest mousemove). This is a somewhat different effect than INTUITICKS in that if you have an extremely fast display update it will look smoother. while (mess = GetMsg(win->UserPort)) { switch(mess->Class) { GADGETDOWN: if (mess->IAddress == (APTR)&MySliderGadget) sgisdown = 1; ModifyTheStuff(mess->MouseY); break; GADGETUP: if (mess->IAddress == (APTR)&MySliderGadget) sgisdown = 0; ModifyTheStuff(mess->MouseY); break; MOUSEMOVE: MouseMovedFlag = 1; MouseX = mess->MouseX; MouseY = mess->MouseY; break; etc.... } ReplyMsg(mess); } if (MouseMovedFlag) { MouseMovedFlag = 0; if (sgisdown) ModifyTheStuff(MouseY); /* do other stuff */ }