Mildred a shark
Professional

The interlacing features of the c2p system keeps track of wether to draw the even or odd rows and columns. When you are using a single, double, or triple-buffered display, the toggling of even/odd rows and columns is simplified by a single call to Mc2pToggle, specifying how many buffers you have (1 to 3), and the number of the current buffer (0 to buffers-1). This will handle the row and column interlacing in the context of working with single, double and triple-buffered displays.

The first parameter you pass is the number of buffers in your display. 1=Single-buffering, 2=Double-buffering and 3=Triple-buffering. You should then specify the number of the current buffer, which should range from 0 to the total number of buffers minus 1. While you move between your buffers using something such as buf=1-buf for double-buffering or a more manual incrementing for triple-buffering, you should pass this buf number to Mc2pToggle so that it will do the correct stage of the interlacing.

If either row interlacing or column interlacing in the c2p system are not switched on, they will simply be ignored. Note that when performing c2p interlacing in a triple-buffered display it will take more than 2 frames to produce fully refreshed bitmaps.

Possible syntax:
Mc2pToggle NumberOfBuffers.w, CurrentBuffer.w


NumberOfBuffers.w
---- This is the total number of buffers in your display system. 1 represents a single-buffered display, 2 represents a double-buffered display, and 3 represents a triple-buffered display.


CurrentBuffer.w ---- CurrentBuffer is the number of the current buffer from those available in the display buffering, ranging from 0 to the total number of buffers minus 1. In a single-buffered display the current buffer is always 0. In a double-buffered display the current buffer should be alternated with buf=1-buf and will be 0 or 1. In a triple-buffered display the current buffer should be cycled by adding 1 to the current buffer number and checking if the resulting number is to high, and if so reset it to 0, and the number of the current buffer will always be 0, 1 or 2.

a shark