Problem with update

Hi everybody,
I have create a black rectangle for the background in my game.
But this rectangle isn’t update when I call the SDL_UpdateRect.

Follow you can read my lines for create and update the background

 SDL_Surface *background;
 SDL_Rect backrct;
 backrct.x = 0;
 backrct.y = 0;
 backrct.w = 320;
 backrct.h = 240;
 SDL_FillRect(background->screen, &backrct, SDL_MapRGB(background->screen->format , 0, 0, 0));


SDL_UpdateRect( screen, 0, 0, 0, 0);

Where is the error?
Tnx

Hi every body,

Can anyone out there tried to use SDL with MFC and can tell me how to do
it step by step?

Thanks in advance.

DSW

Hi

I tried… And without much luck… You see, the thing is that MFC uses a
"hidden" main function, and SDL wants to use it’s own. So I didn’t get it to
work. And people told me it could not be done. I think however, that it
probably could be done if you do all the windows MFC main stuff manualy, but
that would be a nightmare…

Good luck :wink:

Best regards
Daniel>From: Wilson Wen

Reply-To: sdl at libsdl.org
To: sdl at libsdl.org
Subject: [SDL] SDL with MFC
Date: Mon, 21 Jul 2003 22:55:11 +1000

Hi every body,

Can anyone out there tried to use SDL with MFC and can tell me how to do
it step by step?

Thanks in advance.

DSW


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus

Hi everybody,
I have create a black rectangle for the background in my game.
But this rectangle isn’t update when I call the SDL_UpdateRect.

Follow you can read my lines for create and update the background

 SDL_Surface *background;
 SDL_Rect backrct;
 backrct.x = 0;
 backrct.y = 0;
 backrct.w = 320;
 backrct.h = 240;
 SDL_FillRect(background->screen, &backrct, SDL_MapRGB(background->screen->format , 0, 0, 0));

Don’t you want to fill the screen, rather than the background?

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Hi everybody,
I have create a black rectangle for the background in my game.
But this rectangle isn’t update when I call the SDL_UpdateRect.

Follow you can read my lines for create and update the background

 SDL_Surface *background;
 SDL_Rect backrct;
 backrct.x = 0;
 backrct.y = 0;
 backrct.w = 320;
 backrct.h = 240;
 SDL_FillRect(background->screen, &backrct, SDL_MapRGB(background->screen->format , 0, 0, 0));

Don’t you want to fill the screen, rather than the background?

Mmm I would like create a black background for my game with out use a bmp image.
I think that I can use the SDL_FillRect for create a black background.
I wrong?

Mmm I would like create a black background for my game with out use a bmp image.
I think that I can use the SDL_FillRect for create a black background.
I wrong?

No, but it’s actually faster to just use SDL_FillRect() on the screen than
create an entire surface that’s entirely black and then blit that.

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Mmm I would like create a black background for my game with out use a bmp image.
I think that I can use the SDL_FillRect for create a black background.
I wrong?

No, but it’s actually faster to just use SDL_FillRect() on the screen than
create an entire surface that’s entirely black and then blit that.

but the SDL_Update(); isn’t sufficent for update the SDL_FillRect()?
tnxSubject: Re: [SDL] Problem with update
From: slouken@libsdl.org (slouken)
Date: Tue, 22 Jul 2003 21:42:55 -0700

“Wilson Wen” wrote in message
news:mailman.1058792187.1387.sdl at libsdl.org

Hi every body,

Can anyone out there tried to use SDL with MFC and can tell me how to do
it step by step?

Thanks in advance.

DSW

I’ve got MFC working with SDL, but none of the MFC windowing stuff, which I
guess your after (but MFC is not just the dialog boxes ect…). I didn’t
have any problems at all using MFC. I started with a win32 exe project and
then added MFC on top of that by simply setting “use of MFC” to “use MFC in
a shared DLL”.

I also disable “msvcrt.lib msvcrtd.lib” in the linking settings (looking
back at that project now), but I don’t know if that’s important. This worked
for VS6 and VS7.