Original Post
Hi!
We have a problem that we guess has something to do with lock and pitch. Let me first try to explain what we are trying to do.
We are writing a small simple spaceship shooter (2D, dx7, 640x480, 16bit colors). The ship rotation contains of 36 sprites that are placed next to eachother in a large bitmap. A ship also has a placement for a gun that is plotted with a single pixel right under the 36 ship rotation sprites in the large bitmap. Upon creation of a ship we are reading those single pixels to get the gun placement for every sprite (we did this raw in the source code in the beginning, but with this method we can draw new ships and with single pixels mark where the gun for each of the 36 sprites is positioned). When we extract those single pixels we are aware of stuff like zeromemory, lock, pitch, 2 bytes per pixel in 16bit color mode, unlock and stuff like that).
And now to the problem..
This works great on my machine and on my friends machine. We have also tried it on atleast 4 other computers, no problems. But I recently tried this on my friends laptop and everything was kinda messed up. Not only the gun is positioned wrong, but the actuall ship sprites seems to be cut out of the large bitmap with some sort of offset (the leftmost ~5 pixels are blitted to the right of the ship). To blit the right sprite according to the current angle (that is controlled with the arrow keys), we do something like
display->Blt( x, y, surface, ▭)
where rect contains the "right" sprite to blit due to the arrow key controlled angle.
This laptop computer is using up to date dx drivers and the screen is in the right color mode. We can''t figure this one out. Please help! (if you don''t get me, please reply and I will explain further)