Next Previous Contents

3.245 tgi_setdrawpage

Function

Set the page for drawing.

Header

tgi.h

Declaration

void __fastcall__ tgi_setdrawpage (unsigned char page);

Description

If the drawpage and the viewpage are the same then all drawing is seen immediately as it is drawn. For double buffered games you can set the drawpage to a different page than the viewpage. This lets you draw the next screen in the background and when the screen is ready you display it.

Limits

  • The function is only available as fastcall function, so it may only be used in presence of a prototype.

Availability

cc65

See also

Other tgi functions.

Example

tgi_setdrawpage(1);
tgi_outtextxy(10, 10, "Hello World");
tgi_setviewpage(1); // Show page 1
tgi_setdrawpage(0);
tgi_outtextxy(10, 10, "Creating next frame");
...
tgi_setviewpage(0); // Show page 0


Next Previous Contents