From a988df656b4d37dfa2472a4cde390185cfcea8b5 Mon Sep 17 00:00:00 2001 From: jacopo grandi Date: Tue, 2 Mar 2021 18:26:39 +0100 Subject: test foundation and functional reimplementation of cost function --- main.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index c9ee420..3090135 100644 --- a/main.c +++ b/main.c @@ -22,6 +22,10 @@ #include "hud/hud.h" #include "net/net.h" +#define TEST 1 +#if TEST == 1 +#include "test/test.h" +#endif //The music that will be played Mix_Music *gMusic = NULL; @@ -32,8 +36,7 @@ Mix_Chunk *sounds[16]; #define A(a, arg) printf("value: %d", a.arg); struct a { int v; } biga; -int main( int argc, char* args[] ) { - +int main( int argc, char* args[] ) { graphic_settings gs = { 1250, 700 }; SDL_Window* window = NULL; @@ -80,7 +83,6 @@ int main( int argc, char* args[] ) { sounds[SOUND_SUCCESS] = Mix_LoadWAV( "content/sounds/success.wav" ); Mix_Volume(-1,MIX_MAX_VOLUME/16); - // Mix_PlayChannel( -1, mouse_over, 0 ); // frame timing const double FRAME_TIME = (double)1/60; // delta time for 60 FPS @@ -94,7 +96,6 @@ int main( int argc, char* args[] ) { MKb mkb; mkb_init(&mkb); - // info infos info; info_load(&info); @@ -127,6 +128,12 @@ int main( int argc, char* args[] ) { int server = 0; int quit = 0; + + if (TEST) { + int result = test_run(&info); + if (result != 0) quit = 1; + } + SDL_Event e; while(!quit) { while(SDL_PollEvent(&e) != 0) { -- cgit v1.2.3-54-g00ecf