- Joined
- Apr 23, 2009
- Messages
- 3,462
- Solutions
- 4
- Reaction score
- 194
- Trophies
- 1
- Age
- 33
- Location
- North East Scotland
- XP
- 761
- Country

Trying to learn how to code some simple applications for the DS (never used C++ or whatever language it is so a complete beginner) and have been following this simple tutorial here but am having a small bit of trouble.
I have devkitarm etc. installed with programmers notepad and have written this code
CODE// Video Start code
videosetmode (mode_FB0);
vramsetbankA(vram_a_lcd);
// Shape Size variables
static int shape_width = 10;
static int shape+height = 10;
//Drawing Shape Code
void draw_shape(int x, int y, uint16* buffer, uint16 color)
{
buffer += y * screen_width + x;
for (int i = 0; i < shape_height; ++i) {
uint16* line = buffer + (screen_width * i);
for(int j = 0; j < shape_width; ++j) {
*line++ = color;
}
}
}
Which I believe is correct and will draw a simple square (although I have just realised there is no color code in there, can anyone tell me where to put it?) but I can't figure out how to compile and test this file in an emulator. It is saved as a...well windows just says "file" and has no "makefile" beside it to let me compile the bugger...help please?
I have devkitarm etc. installed with programmers notepad and have written this code
CODE// Video Start code
videosetmode (mode_FB0);
vramsetbankA(vram_a_lcd);
// Shape Size variables
static int shape_width = 10;
static int shape+height = 10;
//Drawing Shape Code
void draw_shape(int x, int y, uint16* buffer, uint16 color)
{
buffer += y * screen_width + x;
for (int i = 0; i < shape_height; ++i) {
uint16* line = buffer + (screen_width * i);
for(int j = 0; j < shape_width; ++j) {
*line++ = color;
}
}
}
Which I believe is correct and will draw a simple square (although I have just realised there is no color code in there, can anyone tell me where to put it?) but I can't figure out how to compile and test this file in an emulator. It is saved as a...well windows just says "file" and has no "makefile" beside it to let me compile the bugger...help please?






