Jump to content
  • Advertisement

Archived

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

Ahmed Saleh

HELP IN THIS BOOK!!!

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

hi i have the book (Learn computer game programming by dx7) by Lan Parbery when i load a sprite i see it but i saw fog on it and the color of the sprite is bad i used 256 Colors i use Visual c++6 i use Dx7 ------------------------------------------------------

Share this post


Link to post
Share on other sites
Advertisement
Hello again

I have checked quickly your code.
First I have to say that your code is hard to read, I do not know if it is because of my editor, but you should put more spaces, and some indentations. Well in other words : establish your own coding style. I will be easier for you to find things.

You have a function PageFlip() this one should be called in you main loop:

while(TRUE) {

if(PeekMessage(&msg,NULL,0,0,PM_NOREMOVE)){
if(!GetMessage(&msg,NULL,0,0))return msg.wParam;
TranslateMessage(&msg); DispatchMessage(&msg);
}
PageFlip();
}

This should work.

Richard

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Richard -- He is calling page flip-- he is calling the processframe() function in the main loop that then calls his pageflip() function.

Ahmed--"The fog" is your trasperancy not working. The program you draw with does not put the color you are trying to make trasperant in palette position 255. Try putting black where the magenta was and making palette position 256 transperant (if the .bmp is saved in MSPaint).

--That doesn''t explain why the magenta show up black though--perhaps you saved the background and sprites in different palettes?

--CTRL_ALT_DELETE

Share this post


Link to post
Share on other sites
Anonymous Poster-- hello, how can i make the trasperant palette position 255, in (MS PAINT or PHOTO SHOP,PAINT SHOP)
thankes

Richard-- Thankes

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!