61 lines
1.1 KiB
C
61 lines
1.1 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"
|
|
|
|
#define A_HEIGHT 100
|
|
#define A_WIDTH 100
|
|
|
|
void initDisplayLib() {
|
|
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
|
|
addLogCritical("Init SDL libs failed !");
|
|
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
}
|
|
|
|
void initResources() {
|
|
//resOpen();
|
|
}
|
|
|
|
int main(int argc, char *argv[]) {
|
|
ARENA_H_TILE* arena = NULL;
|
|
|
|
// 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);
|
|
|
|
addLogInfo("Starting game...");
|
|
initDisplayLib();
|
|
initResources();
|
|
|
|
addLogInfo("Creating new arena...");
|
|
arena = genNewArena(A_HEIGHT, A_WIDTH);
|
|
if (arena == NULL) {
|
|
addLogCritical("Error with arena generator !");
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
addLogInfo("Successfully created arena.");
|
|
|
|
deleteArena(arena);
|
|
addLogInfo("Cleared arena.");
|
|
|
|
|
|
|
|
return EXIT_SUCCESS;
|
|
}
|
|
|