Log in

View Full Version : Sprite engine in unDelphix



blackvoid
19-03-2005, 12:41 PM
Hi,

We just converted our game to unDelphix/Delphi 7 from Delhix/Delphi 5.
The good news that the game runs without any change to the code.

The bad news is that all the sprites and the mouse cursor are displaced. In DelphiX when we gave coordinates to a sprite, the middle of the sprite was put at the coordinates. In UnDelphix the top left corner of the sprite is drawn at the coordinates.
It is easy enough to add to each coordinate half the width and half the height of the sprite. In DelphiX we did not have to deal with this, so many areas will need to be rewritten. It seems to be easier to correct this in the unDelphiX source code, but where?
Also we have no idea why the mouse cursor is also displaced...
Why was this changed and why is the change not listed anywhere?


Help appreciated. Thanks.

nzo2
26-03-2005, 12:16 AM
I rewrote all of my sprite routines prior to switching for another reason (I can ping-pong animated sprites eg. from 12341234 I can go 1234321234), and ignore all that animstart etc.
This accidentally resolved this problem, so I didn't see it :)
It would be more benefit to switch to this method, than try to reapply the old one to UnDelphiX. Let me know and I`ll share this routine.