Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

FooFighter

Copy Objetc to another

This topic is 5546 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello friends, I''m stuck in my last project, a level editor, what I''m trying to do is: Copy the content of a object to another...here is the code I''m using: var TileImage : TPictureCollectionItem; Collection1 : TPictureCollection; procedure FormCreate(Sender : TObject); begin Collection1 := TPictureCollection.Create; TileImage := TPictureCollectionItem.Create(Collection1); end; Then I load a Bitmap inside into this PictureCollectionItem: ... TileImage.Picture.LoadFromFile(''C:\TILES.BMP''); .. Then I have to pass this TileImage to the Image property of the TImageSprite Object ... var Tiles : TTiles; begin Tiles := TTIles.Create; Tiles.Image := TileImage; X := 0; Y := 0; ... Everything goes ok ''til I noted that no image appears on the screen when I create the "Tiles" Sprite. The DXSpriteEngine counts the sprite and the draw but no image appears... when I tried to change the Image property to a DXImageList Item then the Image drew correctly, so I figured out that it must be when I try to set the Image := TileImage... What am I doing wrong n'' what could I do to fix it? Thanks in advance, FooFighter Delphi just rules!!!

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!