annoying dilemma
William Labbett

hi chaps,

can anyone tell me why my code;

clear(screen);
   
   /* debug */
   report_error("About to draw to screen.");
   /* debug */
   
   rectfill(screen, 100, 50, 40, 40, 3);
   masked_blit(edge_tuft_canvas, screen, 0, 0, 400, 300, 48, 10);
   //masked_stretch_blit(edge_tuft_canvas, screen, 0, 0, 48, 10, 300, 200, 48 * 3, 10 * 3);
   readkey();
   exit(0);

results in nothing but a black screen ? So you know and b4 u ask, i have set a color depth (8), have set the gfx mode (auto 1024, 768).

Thanks, I'm really miffed. Can't understand it.

Could it be black magic ??? ?

X-G

This is not a dilemma. :P

Anyways, if you're in Windows, remember that DirectX some times forgets about its video memory, loses it, flips out and clears the screen. You might need to be constantly updating it.

Chris Katko
void rectfill(BITMAP *bmp, int x1, int y1, int x2, int y2, int color);

Note that it doesn't say x, y, width, height.

Also, just so you know, for the <code> tags, replace the <> with [].

Krzysztof Kluczek

Hmm, are you sure edge_tuft_canvas is a non-black bitmap?

William Labbett

No, Chris spotted the problem.
Respect to Chris.

It was a dilemma for me...... no i checked the link - still not totally clear what a rel dilemma is now but yes I was wrong; it wasn't a dilemma.::)

X-G

Strictly a dilemma is a situation where you have exactly two choices to choose between and you don't know which to choose; if you relax the definition a bit it's a situation with multiple choices and you don't know which to choose. :)

Korval

BTW, it's [code, not <code.

Thread #351722. Printed from Allegro.cc