Original Post
I''m pretty tired and I''m *really* frustrated (both with my program, and my dog...dog just chewed one of my cables in half) so I''m probably not going to give important info here...so please let me know if there''s info that''s needed to help me figure this out.
I have a mini-third buffer (this is tetris and I don''t update the scoreboard yet, so this is a surface that only blits over the playfield). The pieces fall into place and you can see that clear enough...I blit the play field to the backbuffer (over the background image) and flip-page it to the primary surface once per cycle. So you can see my stacked pieces without fail, but the image itself is otherwise filled with garbage: I floodfill it with my transparency color, which shouldn''t copy in a blit, but still...instead of seeing my own background image, it gets covered in crap. So basically I see a column of motionless static (one time I saw the aol insignia distored all over it; this lead me to believe it was a pointer error but everything in that way seemed to be in order).
If I floodfill it with a different color, black, a random color, don''t floodfill it at all, it''s as if I don''t floodfill it at all anyway. How can I be *sure* that the surface is cleared out to black before getting started? (I''d rather see a black rectangle over my background than this white/black/staticky crap).
Here''s my current floodfill routine:
void CApplication::DDFillSurfaceWithColor(LPDIRECTDRAWSURFACE7 lpdds, DWORD color) // a clearscreen function =)
{
DDBLTFX ddbltfx; // this contains the DDBLTFX structure
// clear out the structure and set the size field
DD_INIT_STRUCT(ddbltfx);
// set the dwfillcolor field to the desired color
ddbltfx.dwFillColor = color;
// ready to blt to surface
lpdds->Blt(NULL, // ptr to dest rectangle
NULL, // ptr to source surface, NA
NULL, // ptr to source rectangle, NA
DDBLT_COLORFILL | DDBLT_WAIT,
&ddbltfx); // ptr to DDBLTFX structure
}
Like I said, I''ve tried to fill it, both once and once-per-cycle, with every color under the sun, and well...you wouldn''t know it. Funny enough the tetris-pieces all piled up are crisp and clear over this otherwise-garbagefilled surface. I blit those to it after flood-filling it (which I''d figure would clear it), and well...I hate this.
I''m working in 32-bit color mode, 800x600. I switched it to 16-bit color mode to see if that changed anything, and all it changed was the color-gradient of the garbage, and the picture quality of my background.
Any additional info you might need I''ll provide. I''ve been rackin my brain on this for days now.