Auberon Tatum
/
Accel_test_LCD1Modular
LCD Accelerometer with interrupt fault
Diff: Graphical.cpp
- Revision:
- 0:298e8a54dc2d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Graphical.cpp Wed May 12 20:40:52 2010 +0000 @@ -0,0 +1,55 @@ +#include "header.h" +#include "MobileLCD.h" +// Graphical Mode + +extern float xout; +extern float yout; +extern float zout; +extern float xball; +extern float yball; +extern long ball; +extern long a; +extern long b; +extern long a2; +extern long b2; +extern long k; +extern long red; +extern long blue; +extern long green; +extern long col; + +void Graphic(void){ +lcd.cls(); +while(1){ + +SigCon(); + xball=((xout*64)+64); + yball=((yout*64)+64); + b2 = (xball-20); + a2 = (yball-20); + + for (a = a2; a < a2+39; a++) { // this loop draws rows + + for (b = b2; b < b2+39; b++) {// this loop draws columns + + ball = bmp[k]; + + if (ball !=0x00FF00) { + red = ball << 16; + red = red & 0xE00000; + green = ball << 11; + green = green & 0xE000; + blue = ball << 6; + blue = blue & 0xC0; + + col = blue | green | red; + } + k++; + lcd.pixel(a,b,col); + } + } + k=0; + but2.fall (&menuscreen); + } + + } \ No newline at end of file