| 1 |
/*--------------------------------------------------------------------------------- |
| 2 |
|
| 3 |
Simple console print demo |
| 4 |
-- dovoto |
| 5 |
|
| 6 |
---------------------------------------------------------------------------------*/ |
| 7 |
#include <nds.h> |
| 8 |
#include <stdio.h> |
| 9 |
|
| 10 |
//--------------------------------------------------------------------------------- |
| 11 |
int main(void) { |
| 12 |
//--------------------------------------------------------------------------------- |
| 13 |
touchPosition touch; |
| 14 |
|
| 15 |
consoleDemoInit(); //setup the sub screen for printing |
| 16 |
|
| 17 |
iprintf("\n\n\tHello DS dev'rs\n"); |
| 18 |
iprintf("\twww.drunkencoders.com\n"); |
| 19 |
iprintf("\twww.devkitpro.org"); |
| 20 |
|
| 21 |
while(1) { |
| 22 |
|
| 23 |
touchRead(&touch); |
| 24 |
iprintf("\x1b[10;0HTouch x = %04i, %04i\n", touch.rawx, touch.px); |
| 25 |
iprintf("Touch y = %04i, %04i\n", touch.rawy, touch.py); |
| 26 |
|
| 27 |
swiWaitForVBlank(); |
| 28 |
} |
| 29 |
|
| 30 |
return 0; |
| 31 |
} |