#33274 - ferr - Sat Jan 01, 2005 11:50 am
i'm reading through the pern project thing which i found in the gbadev.org faq sticky thread, and i'm having a problem with sprites.
here's the tutorial i'm using (it's demo 1) :
http://www.thepernproject.com/English/day_3.html
1) the sprite becomes truncated: the image is supposed (i would think) to be 64x64 on a 64x64 "palette" but it seems as if it is truncating the image to 64x32 then placing it on a 64x32 palette. it seems that SQUARE, SIZE_64 is actually 64x32 when it should be 64x64 (according to the tut). i've messed with other formats like SQUARE, SIZE_32 and it does the same exact (proportional) truncation.
2) i can't figure out the damn transparent color attribute, he says: "Color zero, no matter its RGB value, will not be rendered onto the GBA screen so use this to color the portions of your image that you do not want blitted" and his sprite 'background' is R204, G153, B255.. and this is not transparent in emulation, hardware, or the images on his site. i looked into the video.h include and found " #define MODE_TRANSPERANT BIT(0xA) " What is BIT(0xA)? I looked into another GBA source and found someone using BIT10, which is apparently black. is there a list somewhere that explains what each bit is for this? right now i can't even test if BIT10 works correctly since the background in the sprite demo is also black and i haven't the slightest idea how to change that, but i'll just have to assume it does since it works in the other program.
the thing is, he has images in his tutorial that display the same things which just shouldn't be such as truncated sprites and non-transparent sprite BGs, but never mentions them.
***
edit: found the problem with the truncation, i don't remember changing it but the mapping mode was set to 2D instead of 1D. still trying to figure out the transparency.
edit: just noticed he covers alpha blending in Day 9 according to the day 3 tutorial. too bad he stopped at Day 6.
anyone know of a tutorial similar to the pern project.. except complete?
here's the tutorial i'm using (it's demo 1) :
http://www.thepernproject.com/English/day_3.html
1) the sprite becomes truncated: the image is supposed (i would think) to be 64x64 on a 64x64 "palette" but it seems as if it is truncating the image to 64x32 then placing it on a 64x32 palette. it seems that SQUARE, SIZE_64 is actually 64x32 when it should be 64x64 (according to the tut). i've messed with other formats like SQUARE, SIZE_32 and it does the same exact (proportional) truncation.
2) i can't figure out the damn transparent color attribute, he says: "Color zero, no matter its RGB value, will not be rendered onto the GBA screen so use this to color the portions of your image that you do not want blitted" and his sprite 'background' is R204, G153, B255.. and this is not transparent in emulation, hardware, or the images on his site. i looked into the video.h include and found " #define MODE_TRANSPERANT BIT(0xA) " What is BIT(0xA)? I looked into another GBA source and found someone using BIT10, which is apparently black. is there a list somewhere that explains what each bit is for this? right now i can't even test if BIT10 works correctly since the background in the sprite demo is also black and i haven't the slightest idea how to change that, but i'll just have to assume it does since it works in the other program.
the thing is, he has images in his tutorial that display the same things which just shouldn't be such as truncated sprites and non-transparent sprite BGs, but never mentions them.
***
edit: found the problem with the truncation, i don't remember changing it but the mapping mode was set to 2D instead of 1D. still trying to figure out the transparency.
edit: just noticed he covers alpha blending in Day 9 according to the day 3 tutorial. too bad he stopped at Day 6.
anyone know of a tutorial similar to the pern project.. except complete?