why does this code only work some times
- Posted by jpbg33 Mar 07, 2012
- 1214 views
All I'm trying to do in this program is to load 2 bitmaps and then copy both of them to another bitmap and display the new bitmap. To get rid of fliker in a game im making. this code only works every 6 to 7 time or less that i run it.
I tryed "bitBlt" pictures one at a time to "Bitmap2" then displaying "Bitmap2" but when you do that the pictures are not realy loaded onto "Bitmap2" until you display "Bitmap2" which makes it fliker.
so if i make a bitmap of what i wont the screen to look like then load it to "Bitmap2" that should do away with the flikering.
The below code is in "(Intro)"
atom ,new_p,tman,h,testing -- The below code is in "(General)" testing = loadBitmapFromFile( "c:\\testing.bmp" ) tman = loadBitmapFromFile( "c:\\mant1.bmp" ) -- The below code is in "w32HClick" bitBlt( Bitmap2, 0, 0, testing, 0, 0, 50, 50, SRCCOPY ) h = copyToTrueColorBitmapFile(tman, "c:\\test\\testing_n.bmp", 0, 0, 50, 43 ) new_p = loadBitmapFromFile( "c:\\test\\testing_n.bmp" ) bitBlt( Bitmap2, 50, 50, new_p, 0, 0, 50, 50, SRCCOPY )
why does this code not work
[added eucode tags. -matt]