Jump to content
  • Advertisement


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


Modifing TANSTAAFL code

This topic is 6149 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 tryig to do a few things do code already done by TANSTAAFL just so that I can learn more. Firstly, if have the book and exmaples I''m using the 19.1 example code. My first problem I believe is with the backbuffer. I want to set the screen display to 800x600 which is no problem. Then I want the screen anchor to by 640x480 ad thus leave 160x120 around around the bottom and right edge. Again this is no problem. The problem is the back buffer has junk in it and thus when the program flips from the main to back there is flashing junk at the bottom of the screen. I''m sure this wouldn''t be a problem if I just blit something over top (the interface will be added there) but for now I just want it black there. Any ideas? Secondly with the new code I''m working with I can switch between slide/diamond and staggered maps. This is good but I''m a little hazy on where to add the "NO JAGGIES" code for the staggered map. I would assume I could add a "NO JAGGIES" function into the scroller but I''m just not sure at what point in the program I need to call it. Please and thank you for any help Torwin

Share this post

Link to post
Share on other sites
To clear out the back buffer first make a rect and set it to the size of the backbuffer, then make a DDBLTFX structure and use it to colour fill the back buffer to black such as:

RECT Rectangle;
DDBLTFX DDStructure;
DDStructure.dwSize = Sizeof(DDBLTFX);
DDStructure.dwFillcolor = 0; // 0 = Black
Buffer->(&Rectangle,NULL,NULL,DDBLT_WAIT | DDBLT_COLORFILL, &DDStructure);

Ballistic Programs

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!