|
I Can't stop Flicker!! |
BrunoProg64
Member #6,831
January 2006
|
Well, thanks for the ones that answer my last question. But... now I have other: Basicaly, I have a class called fBackground that have two bitmaps -> The Background and the scenary. Also I have a Bitmap called 'bot' that I want to move over the another ones (Kind of GunBound game). But when I dump the images to the buffer and then to the screen I get a lot of flick!. I don't know why. You can check the source:
It also contains some source code of the other post. http://www.allegro.cc/files/attachment/590617 -> The Main file. Please help me... A complete newbie who wants to learn something. |
Kikaru
Member #7,616
August 2006
|
Hmmm... I don't see whats wrong yet... I use clear_to_color(), though, personally... Do you need to use acquire/release pairs in your drawing function? Also, try using void main() and just using a blank return; statement. Also make sure you directly include allegro.h. That's all I can see incorrect at the moment, though it most likely won't fix your problem at hand. |
HardTranceFan
Member #7,317
June 2006
|
nm. [edit] ftest.dumptobitmap(buffer); draw_sprite(buffer,bot,my_pic_x,my_pic_y); [/edit] -- |
Onewing
Member #6,152
August 2005
|
Well, your problem is in ftest.dumptobitmap. I read the function and the function itself blits several things directly to the screen instead of the buffer. The only time ever anything should go to the screen is when going from the buffer to the screen (according the Theory of Double Buffering). ------------ |
Kikaru
Member #7,616
August 2006
|
Oh! I didn't see that in the function... |
HardTranceFan
Member #7,317
June 2006
|
Ditto. Couldn't see the wood for the trees. -- |
BrunoProg64
Member #6,831
January 2006
|
Thanks very much!. I didn't notice that because I was kind of sleepy at the time I wrote this code. And the last question... How can I rotate the "tank" in the map?. A complete newbie who wants to learn something. |
kazzmir
Member #1,786
December 2001
|
|