AST/main.c

76 lines
1.3 KiB
C

/*
* main.c
*
* Created on: 17 juin 2018
* Author: isen
*/
//#include "IAEngine.h"
#include "playerInterface.h"
#include "SDL2/SDL.h"
#include <stdio.h>
#include <stdlib.h>
#include "logHelper.h"
#include "SDL2/SDL.h"
#include "SDL2/SDL_thread.h"
#include "SDL2/SDL_mutex.h"
#include "arenaEngine.h"
int main(void)
{
SDL_Init(SDL_INIT_VIDEO);
if (SDL_Init(SDL_INIT_VIDEO) != 0 )
{
fprintf(stdout,"Échec de l'initialisation de la SDL (%s)\n",SDL_GetError());
return -1;
}
else
{
int continuer = 1;
int action;
// Création de la fenêtre
SDL_Window* pWindow = NULL;
pWindow = SDL_CreateWindow("Arena Survival Tournament",SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,640,480,SDL_WINDOW_SHOWN);
SDL_Event event; // Cette variable servira plus tard à gérer les événements
if( pWindow )
{
SDL_Delay(3000); /* Attendre trois secondes, que l'utilisateur voie la fenêtre */
while (continuer)
{
action = PlayerInterface();
if (action == -1)
{
continuer = 0;
}
else
{
}
}
//SDL_DestroyWindow(pWindow);
}
else
{
fprintf(stderr,"Erreur de création de la fenêtre: %s\n",SDL_GetError());
}
}
//IAEngine();
SDL_Quit();
//PlayerInterface();
return 0;
}