#100273 - TheRain - Sun Aug 27, 2006 4:17 am
One of my DS apps now needs to have some sprites on the sub screen in addition to the sprites already on the main screen... I was trying to set up VRAM bank I to serve this purpose, but I'm not sure where in VRAM my sprites will end up and also I'm not sure how to reference this sub screen sprite location in sprite OAM... here's my VRAM and mode set up
And here is part of my sprite setup code for sprite attributes
So what I'm wondering is, how can I make a sprite entry point to a sprite in SUB sprite VRAM space?
_________________
DSMIDI and dSTAR sequencer brought to you by TheRain
http://www.collinmeyermusic.com/dev/
Code: |
vramSetMainBanks( VRAM_A_MAIN_SPRITE, //A and B maped consecutivly as sprite memory VRAM_B_MAIN_BG_0x6000000, //map as main BG VRAM_C_SUB_BG_0x6200000 , //map C sub BG VRAM_D_MAIN_BG_0x6020000 //using D as BG2 ); vramSetBankI(VRAM_I_SUB_SPRITE); //set the video mode videoSetMode( MODE_5_2D | DISPLAY_SPR_ACTIVE | //turn on sprites DISPLAY_BG2_ACTIVE | //This background will be used for pixel draw overlay DISPLAY_BG3_ACTIVE | //turn on background 3 DISPLAY_SPR_2D_BMP_256 //and this in bitmap mode ); videoSetModeSub( MODE_5_2D | DISPLAY_BG2_ACTIVE| DISPLAY_SPR_1D ); |
And here is part of my sprite setup code for sprite attributes
Code: |
sprites[spritesInitialized].attribute[0] = ATTR0_BMP | (newbutton.y); //bitmap mode sprite at y=10 sprites[spritesInitialized].attribute[1] = ATTR1_SIZE_16 | (newbutton.x); //16x16 sprite placed at x=20 sprites[spritesInitialized].attribute[2] = ATTR2_ALPHA(1)| ((normalx*2)+(normaly*64)); |
So what I'm wondering is, how can I make a sprite entry point to a sprite in SUB sprite VRAM space?
_________________
DSMIDI and dSTAR sequencer brought to you by TheRain
http://www.collinmeyermusic.com/dev/