Jump to content
  • Advertisement

Archived

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

Nacho

Simple Direct Draw Problem from a Newbie

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

I´m currently reading Lamothe´s book Tricks of the Windows Game Programming Gurus. I have a little problem with the example demo7_13.cpp. It seems that it doesn´t work properly on my computer, because the alien bitmaps are not clear enough while they´re moving along the screen. I printed the code and in the function Load_Bitmap_File() there´s a single line that I couldn´t understand: _lseek(file_handle,-(int)(bitmap->bitmapinfoheader.biSizeImage),SEEK_END); Why does he move to the end of the structure and go 32 bits backwards (sizeof(biSizeImage)). Maybe some of you who have already read the book could help me a little bit with this. Thanks in advance, guys!

Share this post


Link to post
Share on other sites
Advertisement
sorry, but I don''t see a sizeof() in that sentence

he go backwards the size of the bitmap to begin to read at the beginning of the bitmap

cyberg

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
windows bitmap files are inverted vertically, so when you read them in, you need to read them in backwards. That''s what this code is all about.

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!