#155881 - Roland - Mon May 05, 2008 12:33 am
Hi all,
I'm really new to NDS development, and I'm learning the basics without using high-level libraries such as PAlib, because I really want to learn the architecture without any other abstraction layer.
Anyway, I have to admit that I'm feeling a bit lost (i.e.: I didn't find the documentation for functions like consoleInit() etc...), today I wrote my first "application", well it's just a text printed with printf() that can be moved around with the touchscreen and resized/rotated, nothing else ;p.
Now I'd like to move the text from the lower screen to the upper screen when the user drags it with the pen. The main question is: who decides where the text printed with printf() is actually printed? This is a snippet of the code:
Most of it is taken from an example I've found in devkitpro. printf() prints the text on the lower screen, this is ok for me, but how can I tell it that I want the text to be printed on the upper screen? And if I want to move the text from the lower to the upper screen what should I do?
Thanx a lot in advance for your help, I'm really willing to learn the basics and that's why I'm experimenting with the example code, but a lot of parts are quite obscure to me :).
C u!
I'm really new to NDS development, and I'm learning the basics without using high-level libraries such as PAlib, because I really want to learn the architecture without any other abstraction layer.
Anyway, I have to admit that I'm feeling a bit lost (i.e.: I didn't find the documentation for functions like consoleInit() etc...), today I wrote my first "application", well it's just a text printed with printf() that can be moved around with the touchscreen and resized/rotated, nothing else ;p.
Now I'd like to move the text from the lower screen to the upper screen when the user drags it with the pen. The main question is: who decides where the text printed with printf() is actually printed? This is a snippet of the code:
Code: |
lcdMainOnTop(); videoSetMode(MODE_5_2D | DISPLAY_BG3_ACTIVE); videoSetModeSub(MODE_5_2D | DISPLAY_BG3_ACTIVE | DISPLAY_BG_EXT_PALETTE); vramSetBankA(VRAM_A_MAIN_BG); vramSetBankC(VRAM_C_SUB_BG); SUB_BG3_CR = BG_TILE_BASE(char_base) | BG_MAP_BASE(screen_base) | ROTBG_SIZE_256x256; u16* sub_tile = (u16*)CHAR_BASE_BLOCK_SUB(char_base); u16* sub_map = (u16*)SCREEN_BASE_BLOCK_SUB(screen_base); consoleInit((u16*)fontData, sub_tile, 95, 32, sub_map, CONSOLE_USE_COLOR255, 8); printf("Test text!\n"); |
Most of it is taken from an example I've found in devkitpro. printf() prints the text on the lower screen, this is ok for me, but how can I tell it that I want the text to be printed on the upper screen? And if I want to move the text from the lower to the upper screen what should I do?
Thanx a lot in advance for your help, I'm really willing to learn the basics and that's why I'm experimenting with the example code, but a lot of parts are quite obscure to me :).
C u!