DoMove(id)
id (using AddMove()) at once. This
is very useful if you want to display animated graphics with
different objects. If you painted every object with
DisplayBrush() your display would certainly flicker a lot.
This can be prevented by updating the display with one drawing
operation. DoMove() lets you realize that: You add all objects
that shall be drawn to a move list (using AddMove()) and then
you call DoMove() which will draw the whole move list using
just a single draw operation.
Implementation of DoMove() is that it scans the move list
you specify and looks what objects shall be drawn. For every
object that is in the list Hollywood will check if the object
is already on the screen. If it is, Hollywood will move the
object to the new position. If it is not on the screen, it
will be drawn on the screen. Therefore if all objects that
shall be drawn are already on the screen and shall just be
moved with DoMove(), all layer positions will be kept. If
there are objects in the move list that are not currently on
the screen, they will be drawn and will get the top most layer
position assigned.
After DoMove() is finished, you should call ClearMove(). This
will clear the move list you specify and you can use it again
with new object positions.
This function requires enabled layers.
EnableLayers() For x = 0 To 400 AddMove(1, #BRUSH, 1, x, 0) AddMove(1, #BRUSH, 2, x, 100) AddMove(1, #BRUSH, 3, x, 200) AddMove(1, #BRUSH, 4, x, 300) DoMove(1) ClearMove(1) NextThe code above scrolls brushes 1 to 4 from 0 to 400. You will see no flickering because we use the move list technique.