You're welcome.       Sign up (learn about it) | Sign in (lost password?)

donone Profile
Live feed
Miscellaneous info

Registered user

Registered: 01-2006
Posts: 3
Karma: 0 (+0/-0)
Reply | Quote
posticon TurboSprite for Delphi, software problem

I am not able to find a Forum that seems to cover TurboSprite. Perhaps I can be shunted in the right direction.

I am evaluating turbosprite current version and have an unusual problem.

I have produced a new sprite based on Tpolygonsprite.
The only addition is three field variables.
In the new factory all have done is override the Createsprite and returned
my new sprite.

The new sprite is created and I tested the type with (x is TDSPolygonSprite) and it
confirms true!
I can set the new field variables and read them back.
All is well until I put the sprite into the Sprite engine!

It loses its type when I attempt to typecast it back and seems to have reverted to the original Tpolygonsprite.
I then cannot access the new fields.

Also the sprites no longer render. I would have expected that the original
render would have worked by inheritance.

Any advice would be appreciated

I have not shown the trivial property routines below.

    FNo: integer;
    procedure SetNo(const value: integer);
    procedure SetWP(const value: byte);
    procedure SetDir(const value: byte);
  property No: integer read FNo write SetNo;
  property WP: byte read FWP write SetWP;
  property Dir: byte read FDir write SetDir;
    function CreateSprite: TSprite;override;

function TDSPFactory.CreateSprite:TSprite;
  inherited CreateSprite;

function TDSPFactory.CreateSprite:TSprite;
  inherited CreateSprite;
1/27/2006, 1:58 am Link to this post Send Email to donone   Send PM to donone

Add a reply

You are not logged in (login)