Advertisement Jump to content


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

Ahmed Saleh


This topic is 6391 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
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(!GetMessage(&msg,NULL,0,0))return msg.wParam;
TranslateMessage(&msg); DispatchMessage(&msg);

This should work.


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?


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)

Richard-- Thankes

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!