Messages récents

#31
PVSnesLib English section / Re : Trying to convert "Animat...
Dernier message par zenac - 12 Mai 2014 à 13:31:41
My both picture files have the name "sprites.bmp". Here I changed the name to "sprites8x8" and "sprites32x32". The forum doesn't accept "bmp" files, so I have converted them to "png".
#32
PVSnesLib English section / Re : Trying to convert "Animat...
Dernier message par alekmaul - 11 Mai 2014 à 13:57:02
well, send me your bmp file, i will check if colors are OK, because you must have a 16 colors palette but your bmp file must be a 256 colors file (so yes, colors #17 ..255 are useless).
#33
PVSnesLib English section / Re : Trying to convert "Animat...
Dernier message par zenac - 09 Mai 2014 à 15:10:17
In fact, all the colors of my pictures are wrong.

I think I don't know how to change the line 65 of Makefile to make the right conversion of images of 8x8 pixels and 32x32 pixels...

Original "Makefile" (line 65)

$(GFXCONV) -gs16 -pc16 -po16 -n $<


As I have written before, I have only changed the first argument (-gs16 changed to -gs8 and -gs32) of $(GFXCONV) in Makefile.

Please, what should I do? Should I make other changes besides Makefile?
#34
PVSnesLib English section / Re : Trying to convert "Animat...
Dernier message par alekmaul - 09 Mai 2014 à 10:21:11
Are you sure that transparent color is first color of your palette ?
#35
PVSnesLib English section / Trying to convert "AnimatedSpr...
Dernier message par zenac - 06 Mai 2014 à 23:22:35
I'm trying to convert "AnimatedSprite" project. The original project uses sprites with 16x16 pixels. I would like to make a new version using sprites with 8x8 (project "AnimatedSprite8x8") and another new version using sprites with 32x32 (project "AnimatedSprite32x32").

The original file "AnimatedSprite.c" can be seen at:
http://www.portabledev.com/media/SNES/PVSnesLib/doc/a00010.html

I have copied all the files of the original project to the other two new projects.

But there are some differences:

- The file "AnimatedSprite.c" was renamed: "AnimatedSprite8x8.c" and "AnimatedSprite32x32.c"

- The dimensions of the original file image ("sprites.bmp") are: 16x144 pixels. The new versions of this files have the following dimensions: 8x72 pixels (for AnimatedSprite8x8) and 32x288 (for AnimatedSprite32x32).

Then, I have changed some lines of the code:

AnimatedSprite.c (line 39)
char sprTiles[9]={0,2,4, 6,8,10, 12,14,32};  // Remeber that sprites are interleave with 128 pix width,

AnimatedSprite8x8.c (line 39)
char sprTiles[9]={0,1,2, 3,4,5, 6,7,8};

AnimatedSprite32x32.c (line 39)
char sprTiles[9]={0,4,8, 12,64,68, 72,76,128};


AnimatedSprite.c (line 50)
oamInitGfxSet(&gfxpsrite, (&gfxpsrite_end-&gfxpsrite), &palsprite, 0, 0x4000, OBJ_SIZE16);

AnimatedSprite8x8.c (line 50)
oamInitGfxSet(&gfxpsrite, (&gfxpsrite_end-&gfxpsrite), &palsprite, 0, 0x4000, OBJ_SIZE8);

AnimatedSprite32x32.c (line 50)
oamInitGfxSet(&gfxpsrite, (&gfxpsrite_end-&gfxpsrite), &palsprite, 0, 0x4000, OBJ_SIZE32);


More changes in Makefile...

Makefile - AnimatedSprite (lines 63 to 65)

sprites.pic: sprites.bmp
@echo convert bitmap ... $(notdir $@)
$(GFXCONV) -gs16 -pc16 -po16 -n $<



Makefile - AnimatedSprite8x8 (lines 63 to 65)

sprites.pic: sprites.bmp
@echo convert bitmap ... $(notdir $@)
$(GFXCONV) -gs8 -pc16 -po16 -n $<



Makefile - AnimatedSprite32x32 (lines 63 to 65)

sprites.pic: sprites.bmp
@echo convert bitmap ... $(notdir $@)
$(GFXCONV) -gs32 -pc16 -po16 -n $<


When I run "AnimatedSprite8x8" and "AnimatedSprite32x32" the joystick moves the character, but the transparency effect does NOT work. The character is inside a visible square area.

Please, what have I forgotten?
#36
PVSnesLib English section / Re : Get value of the certain ...
Dernier message par faeldaniel - 10 Avril 2014 à 14:35:06
My code for rpg is very large and you take a long time to understand but if one day you're curious about some of my routines I can send to you brother.

I go creat new code for exemple Mode1Scroll with sprites using my engine based for we working in colission and you can post in the future realeases of exemples in lib. Anyway I want to give my contribution :)
#37
PVSnesLib English section / Re : Get value of the certain ...
Dernier message par alekmaul - 10 Avril 2014 à 09:00:29
faeldaniel, no i'm not working like that.
I did an example with mario, it works so I did my job.
If you want help, share your code and I will see where it is not ok.
#38
PVSnesLib English section / Re : Get value of the certain ...
Dernier message par faeldaniel - 10 Avril 2014 à 02:50:57
I try this but dont working, honestly I have no idea what's going on can. this would be a good challenge for you, take this my image and try with your code. I am using map with SC_64x32, X maximum 512pixel and Y 756, vram is update and only Y axis.
#39
PVSnesLib English section / Re : Get value of the certain ...
Dernier message par alekmaul - 09 Avril 2014 à 06:30:25
Well, your problem is with the coordinates.
I think you must only have
Citation
  //512 pixel width 512/8 = 64
   u16 *ptrMap = (u16 *) &mapCol +  (OBJY>>3)*64 + (OBJX>>3);
X does not need to be multiply by height

Also, try to use u16 instead of short, short is signed and is bad for SNES (your u8 for mapcol is correct).
#40
PVSnesLib English section / Re : Get value of the certain ...
Dernier message par faeldaniel - 09 Avril 2014 à 02:27:01
Yes I know, &mapcol  is one address and not usigned, this example is not correct, i am showing one possible solution for my problem, but lets go, my problem is Collision Map,I can not understand how it works, my backgrounds has 512px / 756px, this is one example below, i think this function is valid for my imagem, but dont working.


u16 checkMapCol(short OBJX, short OBJY, u8 *mapCol){
         
        //512 pixel width 512/8 = 64
        //768 pixel height -> 768/8 = 96     
u16 *ptrMap = (u16 *) &mapCol +  (OBJY>>3)*64 + (OBJX>>3)*96;

return (*ptrMap);
}


Original image:
http://faeldaniel.com.br/stg_1_1_col.bmp


That's the only problem I could not solve yet and i need your help for this.