so i recently started doing a course to learn c++ (as well as java and some other stuff)
and i thought maybe i could practice by doing some ds dev...
i started fooling around with the hello world that came with the examples
and after fiddling a bit i got some sexy patterns happening
both of these code snippets will compile and run perfectly fine. if, however i edit the code slightly...
other info:
IDE: programmers notepad (was already pre-configured for libnds on installation of dkp)
screenshots:
working:
not working:
edit: bbcode
and i thought maybe i could practice by doing some ds dev...
i started fooling around with the hello world that came with the examples
CODE#include
#include
int main(void)
{
ÂÂÂÂint i;
ÂÂÂÂconsoleDemoInit();
ÂÂÂÂvideoSetMode(MODE_FB0);
ÂÂÂÂvramSetBankA(VRAM_A_LCD);
ÂÂÂÂprintf("Hello World!\n");
ÂÂÂÂprintf("www.Drunkencoders.com");
ÂÂÂÂfor(i = 0; i < 256 * 192; i++)
ÂÂÂÂÂÂÂÂVRAM_A = RGB15(31,0,0);
ÂÂÂÂreturn 0;
}
#include
int main(void)
{
ÂÂÂÂint i;
ÂÂÂÂconsoleDemoInit();
ÂÂÂÂvideoSetMode(MODE_FB0);
ÂÂÂÂvramSetBankA(VRAM_A_LCD);
ÂÂÂÂprintf("Hello World!\n");
ÂÂÂÂprintf("www.Drunkencoders.com");
ÂÂÂÂfor(i = 0; i < 256 * 192; i++)
ÂÂÂÂÂÂÂÂVRAM_A = RGB15(31,0,0);
ÂÂÂÂreturn 0;
}
and after fiddling a bit i got some sexy patterns happening
CODE#include //libnds
#include //standard input/output
int main(void)
{
ÂÂÂÂint i;
ÂÂÂÂconsoleDemoInit();
ÂÂÂÂvideoSetMode(MODE_FB0);
ÂÂÂÂvramSetBankA(VRAM_A_LCD);
ÂÂÂÂprintf("COLORS!\n");
ÂÂÂÂfor(i = 0; i < 256 * 192; i++)
ÂÂÂÂÂÂÂÂVRAM_A = RGB15((0),(i%257/2),(i%255/2));
ÂÂÂÂreturn 0;
}
#include //standard input/output
int main(void)
{
ÂÂÂÂint i;
ÂÂÂÂconsoleDemoInit();
ÂÂÂÂvideoSetMode(MODE_FB0);
ÂÂÂÂvramSetBankA(VRAM_A_LCD);
ÂÂÂÂprintf("COLORS!\n");
ÂÂÂÂfor(i = 0; i < 256 * 192; i++)
ÂÂÂÂÂÂÂÂVRAM_A = RGB15((0),(i%257/2),(i%255/2));
ÂÂÂÂreturn 0;
}
both of these code snippets will compile and run perfectly fine. if, however i edit the code slightly...
CODE#include //libnds
#include //standard input/output
int main(void)
{
ÂÂÂÂint i;
ÂÂÂÂint r, g, b;
ÂÂÂÂconsoleDemoInit();
ÂÂÂÂvideoSetMode(MODE_FB0);
ÂÂÂÂvramSetBankA(VRAM_A_LCD);
ÂÂÂÂprintf("COLORS!\n");
ÂÂÂÂfor(i = 0; i < 256 * 192; i++)
ÂÂÂÂÂÂÂÂr=0;
ÂÂÂÂÂÂÂÂg=(i%257/2);
ÂÂÂÂÂÂÂÂb=(i%255/2);
ÂÂÂÂÂÂÂÂVRAM_A = RGB15(r,g,b);
ÂÂÂÂreturn 0;
}
#include //standard input/output
int main(void)
{
ÂÂÂÂint i;
ÂÂÂÂint r, g, b;
ÂÂÂÂconsoleDemoInit();
ÂÂÂÂvideoSetMode(MODE_FB0);
ÂÂÂÂvramSetBankA(VRAM_A_LCD);
ÂÂÂÂprintf("COLORS!\n");
ÂÂÂÂfor(i = 0; i < 256 * 192; i++)
ÂÂÂÂÂÂÂÂr=0;
ÂÂÂÂÂÂÂÂg=(i%257/2);
ÂÂÂÂÂÂÂÂb=(i%255/2);
ÂÂÂÂÂÂÂÂVRAM_A = RGB15(r,g,b);
ÂÂÂÂreturn 0;
}
other info:
IDE: programmers notepad (was already pre-configured for libnds on installation of dkp)
screenshots:
working:
not working:
edit: bbcode







