#19595 - telamon - Thu Apr 22, 2004 4:39 pm
Hello i'm a newcomer to this forum and the gbadev scene. I've been following the tutorials over at http://gbajunkie.co.uk and I have now begun to write my own code. Everything seems to work fine except for my sprite :(
I've searched the forum for people with similiar problems and did find a couple of post actually. But the only clue to the solution was a binarie called "spritestripper.exe" wich is nolonger accessible at it's former host due to an outdated post .
So to better understand my problem i made a debug image so that i maybe could understand wich pixels had went astray.
[Images not permitted - Click here to view it]
It's originally a 16x16 sprite. It's a bit resized so that you can see it better.
As you can see it seems like no pixels are missing, but most of them are wierdly dislocated. The dislocation pattern seems quite symmetrical so it could be fixed with a function i suppose, maybe that is what spritestripper.exe was supposed to do. Also, the palette loads just fine so i can exclude that from the list of suspects.
Now over to my loading functions.
I've tried swapping my debug sprite with the original tutorial sprite in the original tutorial code, It gave me the same error.
So i put it aside and continued to write other stuff on my own project. Yesterday i included VBFS into my project as it seemed to be quite a nice solution. And thus i've changed my loading function.
Whatever loading routine i tried i got the same result wheter my image was stored in a header or a raw binarie file. So i drew the conclusion that my loading wasn't errorneous.
the sprite attributes setup looks like this, it's unchanged from the original tutorial:
I've tried converting my picture to either header or raw with following 3 programs:
gfx2gba
gifs2sprites
pcx2gba
everyone of them gave me the same result.
I've tried recreating the image and saving it with Photoshop, Paint Shop Pro and Graphics Gale to formats of PCX, BMP and GIF.
And then converting them. But alas still the same result.
So i'm about to exclude my ways of creation/conversion too.
Please help me solve this, thanks!
I've searched the forum for people with similiar problems and did find a couple of post actually. But the only clue to the solution was a binarie called "spritestripper.exe" wich is nolonger accessible at it's former host due to an outdated post .
So to better understand my problem i made a debug image so that i maybe could understand wich pixels had went astray.
[Images not permitted - Click here to view it]
It's originally a 16x16 sprite. It's a bit resized so that you can see it better.
As you can see it seems like no pixels are missing, but most of them are wierdly dislocated. The dislocation pattern seems quite symmetrical so it could be fixed with a function i suppose, maybe that is what spritestripper.exe was supposed to do. Also, the palette loads just fine so i can exclude that from the list of suspects.
Now over to my loading functions.
I've tried swapping my debug sprite with the original tutorial sprite in the original tutorial code, It gave me the same error.
So i put it aside and continued to write other stuff on my own project. Yesterday i included VBFS into my project as it seemed to be quite a nice solution. And thus i've changed my loading function.
Code: |
The original Tutorial sprite loader using data in header files for(loop = 0; loop < 384; loop++) //load 1st sprite image data { OAMData[loop] = pacanimData[loop]; } +------------------------------------------------------------+ my current loading function using data stored VBFS gbfs_copy_obj(OAMData , dat , "cursor2.raw"); //load 1st sprite image data |
Whatever loading routine i tried i got the same result wheter my image was stored in a header or a raw binarie file. So i drew the conclusion that my loading wasn't errorneous.
the sprite attributes setup looks like this, it's unchanged from the original tutorial:
Code: |
sprites[0].attribute0 = COLOR_256 | SQUARE | cursor.y; //setup sprite info, 256 colour, shape and y-coord sprites[0].attribute1 = SIZE_16 | cursor.x; //size 16x16 and x-coord sprites[0].attribute2 = 0; //pointer to tile where sprite starts |
I've tried converting my picture to either header or raw with following 3 programs:
gfx2gba
gifs2sprites
pcx2gba
everyone of them gave me the same result.
I've tried recreating the image and saving it with Photoshop, Paint Shop Pro and Graphics Gale to formats of PCX, BMP and GIF.
And then converting them. But alas still the same result.
So i'm about to exclude my ways of creation/conversion too.
Please help me solve this, thanks!