[SDL] Why is this programme bad
Phantom Lord
thephantomlord at gmail.com
Tue Aug 1 10:43:54 PDT 2006
Do you really speak english?...hey guy, do NOT use auto-translators.
Where is the program loop?...
A while() or do...while() maybe can help you :D...
Greetings.
C ya
2006/8/1, Krzysztof Posłuszny <wojownik266 at wp.pl>:
>
> Hi All
> I ask me to say what in this it is programme made bad?
>
> She did not happen programme so as it should.Thank you
>
> #include<SDL/SDL.h>
>
> #include<iostream>
>
> #undef main
>
> const int WYS=600;
>
> const int SZER=800;
>
> const int BPP=32;
>
> SDL_Surface *background;
>
> SDL_Surface *kula;
>
> SDL_Surface *screen;
>
> int x;
>
> int y;
>
> int main()
>
> {
>
> if(SDL_Init(SDL_INIT_EVERYTHING)<0)
>
> std::cerr<<"Jajko z tego"<<SDL_GetError()<<std::endl;
>
> screen=SDL_SetVideoMode(SZER,WYS,BPP,SDL_SWSURFACE|SDL_ANYFORMAT);
>
> kula=SDL_LoadBMP("kula.bmp");
>
> SDL_MapRGB(screen->format,0,255,255);
>
> SDL_Event event;
>
> SDL_PollEvent(&event);
>
> SDL_Rect *klaw;
>
> SDL_Rect *clip=NULL;
>
> switch(event.key.keysym.sym)
>
> {
>
> case SDLK_UP:klaw->x=20;break;
>
> case SDLK_LEFT:klaw->y=20;break;
>
> }
>
> SDL_BlitSurface(kula,NULL,screen,NULL);
>
> SDL_Flip(screen);
>
> SDL_Delay(5000);
>
> SDL_Quit();
>
> }
>
> --
>
> krzysiek
>
>
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
>
--
Phantom Lord
Caelis Studios ---> From Gods Hands To Yours
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20060801/9025ab3c/attachment.html
More information about the SDL
mailing list