Jump to content
  • Advertisement


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


Copy Objetc to another

This topic is 5718 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

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!