flat assembler
Message board for the users of flat assembler.

Index > Linux > SDL2 Help:how can i do a simple sdl2 loop?

Author
Thread Post new topic Reply to topic
naburgondux



Joined: 05 Sep 2024
Posts: 3
naburgondux 05 Sep 2024, 03:42
like in c you would do something like that:
Code:
SDL_Event e;
int close = 0;
while(close != 1)
while(SDL_PollEvent(&e)){
    if(event.type == SDL_QUIT){
        close == 1
    }
}
    


but cant get it to work in assembly Rolling Eyes
Post 05 Sep 2024, 03:42
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20344
Location: In your JS exploiting you and your system
revolution 05 Sep 2024, 04:40
The "Massive Clod" demo has SDL code that might help.

https://board.flatassembler.net/topic.php?p=223475#223475
Post 05 Sep 2024, 04:40
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8354
Location: Kraków, Poland
Tomasz Grysztar 05 Sep 2024, 10:15
Post 05 Sep 2024, 10:15
View user's profile Send private message Visit poster's website Reply with quote
uu



Joined: 20 Jul 2024
Posts: 44
uu 05 Sep 2024, 11:52
I have tried revolution's one before, but first time try Tomasz's SDL2 game.

Tomasz Grysztar wrote:
And another SDL2 example here: https://board.flatassembler.net/topic.php?t=20538


Surprised Thumbs up for you!

This is different from your Tetros!

I like how you split the code, data and main source file.


Description: I have tried Party.def and Road.def.
Filesize: 95.21 KB
Viewed: 485 Time(s)

tomasz.png


Post 05 Sep 2024, 11:52
View user's profile Send private message Reply with quote
naburgondux



Joined: 05 Sep 2024
Posts: 3
naburgondux 05 Sep 2024, 23:43
thanks guys!
good day for you all Smile
Post 05 Sep 2024, 23:43
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.