#38528 - Piratero - Mon Mar 28, 2005 10:55 pm
the effect i want to accomplish is at the end of the demo, http://www.pdroms.de/file_details.php?fn=1762
the code i wrote works but i can't find a way to move it down and up like the demo above has.
here is the code:
any ideas?
btw, here is a link to the effect: http://mrkotfw.ribrdb.com/mana.gba
_________________
http://mrkotfw.ribrdb.com/
the code i wrote works but i can't find a way to move it down and up like the demo above has.
here is the code:
Code: |
#define START_SCANLINE 1
static void credits_scroll(void) { REG_BLDMOD = 0x2241; // Backdrop, 1st: bg0, 2nd: bg1 // bg0 = text // bg1 = background switch(REG_VCOUNT) { case 1: REG_COLEV = MAP_COLEV(16,0); REG_DISPSTAT &= 0xFF; REG_DISPSTAT |= IRQ_SCANLINE(2); break; case 2: REG_COLEV = MAP_COLEV(14,2); REG_DISPSTAT &= 0xFF; REG_DISPSTAT |= IRQ_SCANLINE(3); break; case 3: REG_COLEV = MAP_COLEV(12,4); REG_DISPSTAT &= 0xFF; REG_DISPSTAT |= IRQ_SCANLINE(4); break; case 4: REG_COLEV = MAP_COLEV(10,6); REG_DISPSTAT &= 0xFF; REG_DISPSTAT |= IRQ_SCANLINE(5); break; case 5: REG_COLEV = MAP_COLEV(8,8); REG_DISPSTAT &= 0xFF; REG_DISPSTAT |= IRQ_SCANLINE(6); break; case 6: REG_COLEV = MAP_COLEV(8,10); REG_DISPSTAT &= 0xFF; REG_DISPSTAT |= IRQ_SCANLINE(7); break; case 7: REG_COLEV = MAP_COLEV(8,12); REG_DISPSTAT &= 0xFF; REG_DISPSTAT |= IRQ_SCANLINE(8); break; case 8: REG_COLEV = MAP_COLEV(0,16); REG_DISPSTAT &= 0xFF; REG_DISPSTAT |= IRQ_SCANLINE(1); break; } } int main(void) { init_display_and_copy_tiles_and_palette(); REG_DISPSTAT &= 0xFF; REG_DISPSTAT |= IRQ_SCANLINE(START_SCANLINE); irqtable[IRQ_VCOUNT] = credits_scroll; while(1){ update(); } } |
any ideas?
btw, here is a link to the effect: http://mrkotfw.ribrdb.com/mana.gba
_________________
http://mrkotfw.ribrdb.com/