• Advertisement

Archived

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

HELP IN THIS BOOK!!!

This topic is 6066 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
yes you are right "anomymous poster", sorry I went to fast . If i have time I will check it.

Share this post


Link to post
Share on other sites

  • Advertisement