Jump to content
  • Advertisement

Archived

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

MrSpidey007

'& 0x0000001F'!???

This topic is 6043 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 the Game Programming Genesis tutorial http://www.gamedev.net/reference/articles/article1304.asp to calculate if a number is he uses someting like: int x = themap->xCamera & 0x0000001F; to caluclate if themap->xCamera is divisible by 32. This is the only part of his code that I don''t understand how it works. I want to create a tile engine with 16 pixel tiles. How does this work? what does the ''&'' do and how can I change it to calculate if a number is divisible by 16? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Ewww...magic numbers

"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." - - Stephen Roberts

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!