47 lines
954 B
C
47 lines
954 B
C
#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 //Real value is A_X + 1
|
|
#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;
|
|
|
|
|
|
|
|
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.");
|
|
|
|
if (deleteArena(arena) > 0) addLogCritical("An tile from arena asn't been deleted correctly."); else addLogInfo("Arena successfully deleted from memory.");
|
|
|
|
|
|
|
|
return EXIT_SUCCESS;
|
|
}
|