#178126 - DarkBones - Fri Nov 22, 2013 9:32 pm
Hello, DarkBones here. I decided I'd tinker a little with GBA Development by making some changes to Smash Bros Advance (I'm not a Hello World kinda guy...), so I looked through the source code and found where the player input commands are. I changed the jump to the Up button instead of the A button, then attempted to compile it, but when I type this into the terminal:
"gcc -o main.elf main.c -lm"
I get this error:
"main.c: In function 'main':
main.c:138:2: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
main.c: In function 'FrameUpdate':
main.c:302:2: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
main.c: In function 'EnableBackground':
main.c:463:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
main.c:464:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]".
If it helps, I think they correspond to these lines of code:
memcpy( (u16 *)bg2.tileData, &debugtilesData, sizeof(debugtilesData) );
memcpy( (u16 *)0x6010000, &kirbystandData + (Player1.frame), sizeof(kirbystandData) );
bg->tileData = (u16*)CharBaseBlock(bg->charBaseBlock);
bg->mapData = (u16*)ScreenBaseBlock(bg->screenBaseBlock);
"gcc -o main.elf main.c -lm"
I get this error:
"main.c: In function 'main':
main.c:138:2: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
main.c: In function 'FrameUpdate':
main.c:302:2: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]
main.c: In function 'EnableBackground':
main.c:463:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
main.c:464:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]".
If it helps, I think they correspond to these lines of code:
memcpy( (u16 *)bg2.tileData, &debugtilesData, sizeof(debugtilesData) );
memcpy( (u16 *)0x6010000, &kirbystandData + (Player1.frame), sizeof(kirbystandData) );
bg->tileData = (u16*)CharBaseBlock(bg->charBaseBlock);
bg->mapData = (u16*)ScreenBaseBlock(bg->screenBaseBlock);