#90686 - Nuja - Sat Jul 01, 2006 7:31 pm
hi,
I'm trying to compile a little code bug i got error:
Code: |
main.c
In file included from c:/projetnds/camille/source/main.c:5:
c:/projetnds/camille/source/Standv2.c:4: error: redefinition of 'Standv2_Sprite'
c:/projetnds/camille/source/Standv2.c:4: error: previous definition of 'Standv2_Sprite' was here
In file included from c:/projetnds/camille/source/main.c:6:
c:/projetnds/camille/source/Standv2.pal.c:3: error: redefinition of 'Standv2_Pal'
c:/projetnds/camille/source/Standv2.pal.c:3: error: previous definition of 'Standv2_Pal' was here
c:/projetnds/camille/source/main.c:32:2: warning: no newline at end of file
make[1]: *** [main.o] Error 1
"make": *** [build] Error 2
> Process Exit Code: 2
|
Do someone know what could be the problem ? I did the sprit with the ini & PAGfx.exe method because with the other method the software is all the time returning error "file could not be found".
#90688 - Dwedit - Sat Jul 01, 2006 7:56 pm
Do not #include .c files.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#90694 - Nuja - Sat Jul 01, 2006 8:52 pm
Dwedit wrote: |
Do not #include .c files. |
My new errors
Code: |
> "make"
main.c
c:/projetnds/camille/source/main.c:30:2: warning: no newline at end of file
arm-eabi-g++ -g -mthumb-interwork -mno-fpu -L/c/devkitPro/PAlib/lib -specs=ds_arm9.specs Standv2.o Standv2.pal.o all_gfx.o main.o -Lc:/devkitPro/PAlib//lib -lpa9 -L/c/devkitPro/libnds/lib -lnds9 -o build.elf
all_gfx.o:(.rodata+0x0): multiple definition of `Standv2_Sprite'
Standv2.o:(.rodata+0x0): first defined here
all_gfx.o:(.rodata+0x9000): multiple definition of `Standv2_Pal'
Standv2.pal.o:(.rodata+0x0): first defined here
collect2: ld returned 1 exit status
make[1]: *** [/c/projetnds/camille/camille.elf] Error 1
"make": *** [build] Error 2
> Process Exit Code: 2
|
What is wrong ?
Thank in advance ++
#90695 - tepples - Sat Jul 01, 2006 9:05 pm
Looks like you're missing a few 'extern' declarations.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#90711 - Nuja - Sat Jul 01, 2006 10:30 pm
tepples wrote: |
Looks like you're missing a few 'extern' declarations. |
My code:
Code: |
// Includes
#include <PA9.h> // Include for PA_Lib
#include "all_gfx.h"
// Function: main()
int main(int argc, char ** argv)
{
PA_Init(); // Initializes PA_Lib
PA_InitVBL(); // Initializes a standard VBL
// Infinite loop to keep the program running
PA_LoadSpritePal(0, 0,(void*)Standv2_Pal);
PA_CreateSprite(0, 0,(void*)Standv2_Sprite, OBJ_SIZE_64X64,1, 0, 191, 0);
while (1)
{
PA_WaitForVBL();
PA_SetSpriteAnim(0, 0, 0);
PA_SetSpriteAnim(0, 0, 1);
PA_SetSpriteAnim(0, 0, 2);
PA_SetSpriteAnim(0, 0, 3);
PA_SetSpriteAnim(0, 0, 4);
PA_SetSpriteAnim(0, 0, 5);
PA_SetSpriteAnim(0, 0, 6);
PA_SetSpriteAnim(0, 0, 7);
PA_SetSpriteAnim(0, 0, 8);
}
return 0;
}
|
I don't know what it is :/
#90722 - Nuja - Sun Jul 02, 2006 12:39 am
any idea ?
edit: now it works, I installed the lastest version of devkitpro + lastest palib.
It was a "s" instead of "S" in sprite and pal name which were making trouble.
Is that normal to see a little bit of pink which should be transparent ? (in sprite)
++
Last edited by Nuja on Sun Jul 02, 2006 1:20 am; edited 2 times in total
#90729 - tepples - Sun Jul 02, 2006 1:15 am
What is all_gfx.h?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#90730 - Nuja - Sun Jul 02, 2006 1:20 am
tepples wrote: |
What is all_gfx.h? |
Its a file created by PAGfx.exe but now its good. but now i have a problem of transparency. i can see a little bit of pink color around my sprite (Camille from street fighter: just for test ^^).
++
#90731 - tepples - Sun Jul 02, 2006 1:48 am
Move the pink color to index 0 in the palette. If you don't understand how to do this, you're using the wrong image editor.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#90756 - Nuja - Sun Jul 02, 2006 8:09 am
tepples wrote: |
Move the pink color to index 0 in the palette. If you don't understand how to do this, you're using the wrong image editor. |
wrong "photoshop ?" i think i know what your are talking abo ut even if i nerver used it xD. Im going to give it a try.
Thank u
#90762 - Nuja - Sun Jul 02, 2006 8:39 am
First, that is how its displayed in the emulator:
The color around the sprite
Then you were talking about changing a color in the palette, is that there:
Palette
If that is it, even if I replace a big part of the pink by "0" there still is pink left. And when I replace by "0", the color which allow us to make transparency will be black ?
Thank in advance ++
#90764 - keldon - Sun Jul 02, 2006 8:51 am
In the gimp you can move cyan to the first ... or by using the amazing usenti tool.
#90766 - Nuja - Sun Jul 02, 2006 9:09 am
The problem is that the pink is not only one pink color :/
#90770 - keldon - Sun Jul 02, 2006 9:32 am
Nuja wrote: |
The problem is that the pink is not only one pink color :/ |
Oh yes, I wasn't really paying much attention; but I'm not sure if setting that particular colour to transparent will make it index 0. Use the gimp or usenti.
Also the reason why we use cyan (sorry I meant magenta) is because it is the least used colour and usually would not cause problems using it as the transparent colour.
Use (pure) green/blue/cyan for your transparent colour as nothing is that colour.
#90776 - Nuja - Sun Jul 02, 2006 10:06 am
When I said pink I meant magenta, the magenta disapear when I launch the rom, but there is still pink/magenta (see the pictures in previous post)
(The sprite are not made by me) :/