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.htmlI 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?