loop separado

main
fanta 3 weeks ago
parent 16c4321a56
commit c42457a6c5

BIN
bocm

Binary file not shown.

@ -1,5 +1,5 @@
#include <SDL.h>
#include "functions.c"
#include "loop.c"
int main(int argc, char** argv) {
initWindow();

@ -4,7 +4,7 @@ SDL_Window* window;
SDL_Renderer* renderer;
SDL_Surface* surface;
SDL_Texture* texture;
SDL_Event event;
const int screenWidth = 800;
const int screenHeight = 600;
@ -54,19 +54,6 @@ int presentLogo(void){
return 0;
}
int windowLoop(void){
while (1) {
SDL_PollEvent(&event);
if (event.type == SDL_QUIT) {
break;
}
loadBackgroundColor();
presentLogo();
}
return 0;
}
int destroy(void){
SDL_DestroyTexture(texture);
SDL_DestroyRenderer(renderer);

@ -0,0 +1,18 @@
#include <SDL.h>
SDL_Event event;
int windowLoop(void){
while (1) {
SDL_PollEvent(&event);
if (event.type == SDL_QUIT) {
break;
}
loadBackgroundColor();
presentLogo();
}
return 0;
}
Loading…
Cancel
Save