Jump to content
  • Advertisement

Archived

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

Jim, problem with your cTiles

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

Hey Jim, One of the updates you didn''t catch w/ your 8.1 updater was w/ your angled tiles example. Upon calling cTiles::Load(...), you know how you specify the color to blit? It doesn''t seem to work I''ve studied the code and can''t seem to fix it. If I add in a call to say m_Graphics.ClearDisplay(Color) before drawing the frame, the areas that were suppose to be transparent are set to the ClearDisplay() color (i.e. - the corners of your angled tiles use to flicker, so I added in a clear display and now they turn to the color specified). Your help is appreciated, i''ll keep at it for a bit and see if I can''t find the bug. Thanks. ''Chris

Share this post


Link to post
Share on other sites
Advertisement
Follow up: I have spent the last 1-2 hours checking over all of your code. I can''t find anything wrong. Your cTexture objects work fine for blitting, so i''m not entirely sure why your cTile objects don''t considering the cTiles use an array of cTexture objects...Jim, could you look into this sometime soon? Your help is appreciated.

If anyone else here has Jim''s book and has physically tested out Chapter 11-> Angled Tiles source code, and was able to fix the corners of the angled tiles so they blit correctly, please let me know. Thanks.

''Chris

Share this post


Link to post
Share on other sites
I think you may be mistaken on how it''s supposed to work. The color passed to the Load() function is the transparent color. Using the angled tiles means that the corners should be the only parts to use that color. Try blitting a tile over some other tiles, and you should still see parts of the bottom tiles show through(at the corners). The flickering you mentioned is normal if nothing is drawn to a section of the screen. It shows up at those spots on the tiles because those spots aren''t drawn. They''re transparent.

Share this post


Link to post
Share on other sites
EEEK, I thought his sample had 2 layers, then I lookedback and it only had 1....No wonder. Yea that was just a miscommunication between the readings in his book and the actual code. In the book he has multiple layers so the blitted corners do indeed work, but here i''m blitting the corners to the actual background, hence the reason for the m_Graphics.Clear() affecting the corner colors.

''Chris

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.

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

Sign me up!