hello_world/source/main.cpp

/*---------------------------------------------------------------------------------

        $Id: main.cpp,v 1.13 2008-12-02 20:21:20 dovoto Exp $

        Simple console print demo
        -- dovoto


---------------------------------------------------------------------------------*/
#include <nds.h>

#include <stdio.h>

volatile int frame = 0;

//---------------------------------------------------------------------------------
void Vblank() {
//---------------------------------------------------------------------------------
        frame++;
}
        
//---------------------------------------------------------------------------------
int main(void) {
//---------------------------------------------------------------------------------
        touchPosition touchXY;

        irqSet(IRQ_VBLANK, Vblank);

        consoleDemoInit();

        iprintf("      Hello DS dev'rs\n");
        iprintf("     \x1b[32mwww.devkitpro.org\n");
        iprintf("   \x1b[32;1mwww.drunkencoders.com\x1b[39m");
 
        while(1) {
        
                swiWaitForVBlank();
                touchRead(&touchXY);

                // print at using ansi escape sequence \x1b[line;columnH 
                iprintf("\x1b[10;0HFrame = %d",frame);
                iprintf("\x1b[16;0HTouch x = %04X, %04X\n", touchXY.rawx, touchXY.px);
                iprintf("Touch y = %04X, %04X\n", touchXY.rawy, touchXY.py);            
        
        }

        return 0;
}
 全て クラス ファイル 関数 変数 型定義 列挙型 列挙型の値 マクロ定義
libndsに対してMon Apr 26 23:39:49 2010に生成されました。  doxygen 1.6.3