Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » annoying dilemma

This thread is locked; no one can reply to it. rss feed Print
annoying dilemma
William Labbett
Member #4,486
March 2004
avatar

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
Member #856
December 2000
avatar

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.

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

Chris Katko
Member #1,881
January 2002
avatar

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 [].

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Krzysztof Kluczek
Member #4,191
January 2004
avatar

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

William Labbett
Member #4,486
March 2004
avatar

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
Member #856
December 2000
avatar

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. :)

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

Korval
Member #1,538
September 2001
avatar

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

Go to: