#5570 - Link - Fri May 02, 2003 12:54 am
C:\devkitadv\bin>make.bat
C:\devkitadv\bin>path=c:\devkitadv\bin
C:\devkitadv\bin>gcc -o test4.elf test4.c
test4.c: In function `main':
test4.c:20: underscore in number
C:\devkitadv\bin>objcopy -O binary test4.elf test4.bin
objcopy: test4.elf: No such file or directory
the code is (the bold row id the line 20 with the error):
#include "gba.h"
#include "screenmode.h"
#include "sprite.h"
#include "sprite1.h" //header file ottenuto da pcx2gba
int main(void)
{
SetMode(OBJ_MAP_2D | MODE_3 | OBJ_ENABLE);
u8 sprite1Atributes = 0;
s16 x = 10;
s16 y = 10;
u16 char_number = 0;
u16 loop;
for(loop = 0; loop < 256; loop++)
OBJPaletteMem[loop] = sprite1Palette[loop];
sprites[sprite1Atributes].attribute0 = 256_COLOR | SQUARE | y;
sprites[sprite1Atributes].attribute1 = SIZE_64 | x;
sprites[sprite1Atributes].attribute2 = char_number;
int x_loop = 0, y_loop = 0, index = 0;
for(y_loop = 0; y_loop < 8; y_loop++)
{
for(x_loop = 0; x_loop < 256; x_loop++)
{
OAMData[x_loop + y_loop * 512] = sprite1Data[index];
index++;
} //end for x_loop
} //end for y_loop
}
C:\devkitadv\bin>path=c:\devkitadv\bin
C:\devkitadv\bin>gcc -o test4.elf test4.c
test4.c: In function `main':
test4.c:20: underscore in number
C:\devkitadv\bin>objcopy -O binary test4.elf test4.bin
objcopy: test4.elf: No such file or directory
the code is (the bold row id the line 20 with the error):
#include "gba.h"
#include "screenmode.h"
#include "sprite.h"
#include "sprite1.h" //header file ottenuto da pcx2gba
int main(void)
{
SetMode(OBJ_MAP_2D | MODE_3 | OBJ_ENABLE);
u8 sprite1Atributes = 0;
s16 x = 10;
s16 y = 10;
u16 char_number = 0;
u16 loop;
for(loop = 0; loop < 256; loop++)
OBJPaletteMem[loop] = sprite1Palette[loop];
sprites[sprite1Atributes].attribute0 = 256_COLOR | SQUARE | y;
sprites[sprite1Atributes].attribute1 = SIZE_64 | x;
sprites[sprite1Atributes].attribute2 = char_number;
int x_loop = 0, y_loop = 0, index = 0;
for(y_loop = 0; y_loop < 8; y_loop++)
{
for(x_loop = 0; x_loop < 256; x_loop++)
{
OAMData[x_loop + y_loop * 512] = sprite1Data[index];
index++;
} //end for x_loop
} //end for y_loop
}