I'm developing a game using J2ME and testing the application on my Nokia 6280. The problem: the sprites used in the game are offset by a few pixels in both directions. I've tested the game on the Sony Ericcson K800i with no problems and upon research have discovered this problem arises with Series 40 Nokia phones.
How can I correct the problem? Games I've bought online for the Nokia phone all work fine, so why do I have the problem? If there is a correction could example code be given?
I've read in a previous thread of a supposed solution:
"I use setPosition() and setRefPixelPosition() to position the sprite. your sprite is at position (x,y) and its refpixels position is (m,n) and the transform goes wrong on a s40/3rd device to get it work locate your sprite at (x+m, y+n) instead, this will work in your case: to overwrite setTransform doesn't makes sense to me, only overwrite setPosition() and add the refpixel coordinates there additionally may be you want to overwrite setRefPixelposition too, because it could be helpful to recall setPositon there"
If my sprite (11*11) is located at (50,50) and it's reference pixel is (5,5) then I should position the sprite at (55,55)? I can't see how this would work; it would just reposition the sprite with the original problem intact.