ハローワールド大作戦!(3)


RGKT-NDS-STDY-002(002)


consoleDemoInit()がちゃんとした用途で使えない訳は以下(console.h より引用)。

PrintConsole* consoleDemoInit(void);
Initialize the console to a default state for prototyping. 
This function sets the console to use sub display, VRAM_C, 
and BG0 and enables MODE_0_2D on the sub display. 
It is intended for use in prototyping applications which need print ability and not actual game use. 
Print functionality can be utilized with just this call. 


ようはこれでiprintf()する為の初期化をすると、
サブ画面表示、VRAM バンクC、デフォルトのフォントは BG0 にマッピングされて画面モードはモード0の2D設定に決め打ちされてしまうため。
ゲームとかに使うんじゃなくて適当に表示させたいものを手早く作りたいとき(〜レジスタの値を見たいとか。)
に使うと良さ気って上の英文にも書かれてる。


分かりやすいところでこれを使った ARM9 のテンプレートサンプルとか見てみるといいです。


\devkitPro\examples\nds\templates\arm9\source\main.c


単純な表示をさせるだけなら十行行かないソースで実現出来るようになったというのがわかります。
面白くないですけどw