NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
ex_dispgaout.nxc

This is an example of how to use the GraphicArrayOut, NumOut, and Wait function. It also demonstrates how to use the RICOpSprite, RICSpriteData, RICOpCopyBits, RICImgRect, and RICImgPoint macros.

byte ric_data[] = {
RICOpSprite(1, 64, 2,
RICSpriteData(0xFF, 0xFF, 0x80, 0x01, 0x80, 0x41,
0x80, 0x21, 0x80, 0x11, 0x80, 0x09,
0x80, 0x05, 0x80, 0x09, 0x80, 0x11,
0x80, 0x21, 0x80, 0x41, 0x80, 0x81,
0x81, 0x01, 0x82, 0x01, 0x84, 0x01,
0x88, 0x01, 0x90, 0x01, 0xA0, 0x01,
0x90, 0x01, 0x88, 0x01, 0x84, 0x01,
0x82, 0x01, 0x81, 0x01, 0x80, 0x81,
0x80, 0x41, 0x80, 0x21, 0x80, 0x11,
0x80, 0x09, 0x80, 0x05, 0x80, 0x09,
0x80, 0x11, 0x80, 0x21, 0x80, 0x41,
0x80, 0x81, 0x81, 0x01, 0x82, 0x01,
0x84, 0x01, 0x88, 0x01, 0x90, 0x01,
0xA0, 0x01, 0x90, 0x01, 0x88, 0x01,
0x84, 0x01, 0x82, 0x01, 0x81, 0x01,
0x80, 0x81, 0x80, 0x41, 0x80, 0x21,
0x80, 0x11, 0x80, 0x09, 0x80, 0x05,
0x80, 0x09, 0x80, 0x11, 0x80, 0x21,
0x80, 0x41, 0x80, 0x81, 0x81, 0x01,
0x82, 0x01, 0x84, 0x01, 0x88, 0x01,
0x90, 0x01, 0xA0, 0x01, 0x80, 0x01,
0xFF, 0xFF)),
RICImgPoint(0, 0), 16, 64),
RICImgPoint(0, 0))
};
void Animate()
{
int i;
byte a;
byte b;
a = ric_data[12];
b = ric_data[13];
for( i=12; i<132; i++ )
ric_data[i] = ric_data[i+2];
ric_data[ 132 ] = a;
ric_data[ 133 ] = b;
}
task main()
{
int counter = 0;
while( 1 )
{
Animate();
GraphicArrayOut(0, 0, ric_data);
NumOut( 50,LCD_LINE1,++counter );
}
}