Jump to content
  • Advertisement

Archived

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

planewalker

DelphiX-Problem: Accessing Pixels of a TDXImageList Item

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

In my little game (oh wonder - tile based), i''d like a small map thats showing a larger part of the game world than the main window. To do that, I created a TDXImageList - Bitmap and tried to set the pixels according to the tiles of my map, but there doesn''t seem to be a method available to do that... Please help! See Ya, planewalker

Share this post


Link to post
Share on other sites
Advertisement
Try this...


DXImageList.Items[item].PatternSurfaces[pattern].Pixels[x,y] := pixeldata;


This is nice for 256 color modes where the colors are pre-set. You may also need to "ColorMatch" your colors first...


pixeldata := ImageList.Items[0].PatternSurfaces[0].ColorMatch(color); // where color is a TColor





[ Michael Wilson | turbo sys-op | turbo.gamedev.net ]

Share this post


Link to post
Share on other sites
With a static map, you should only have to read the 150x150 map once, and then display it. If you need real-time updating I would suggest using a TDIB and then Assign()Iing it to a Surface that then get''s BLTed to the screen...



[ Michael Wilson | turbo sys-op | turbo.gamedev.net ]

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!