From b84b59153c587248ca8a6a94a6d93977e851233f Mon Sep 17 00:00:00 2001 From: oroborus Date: Sat, 15 Mar 2008 18:35:48 +0000 Subject: - moznost skompilovat public server bez GUI ( pomocou Makefile-publicServer ) port sa nastavuje ako ./publicserver --port - jeto iba prvotna verzia treba to este odladit a zostabilnit git-svn-id: http://opensvn.csie.org/tuxanci_ng@18 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/main.c | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 195d6cb..e1a9285 100644 --- a/src/main.c +++ b/src/main.c @@ -1,12 +1,15 @@ #include -#include "interface.h" #include "main.h" +#include "tux.h" + +#ifndef BUBLIC_SERVER + #include "font.h" #include "image.h" #include "layer.h" -#include "tux.h" +#include "interface.h" #include "screen.h" #include "screen_world.h" #include "screen_mainMenu.h" @@ -17,19 +20,25 @@ #include "screen_table.h" #include "screen_credits.h" #include "homeDirector.h" -#include "wall.h" -#include "shot.h" #include "panel.h" -#include "myTimer.h" -#include "arenaFile.h" #include "audio.h" #include "sound.h" #include "music.h" + +#endif + +#include "wall.h" +#include "shot.h" +#include "myTimer.h" +#include "arenaFile.h" #include "item.h" +#include "publicServer.h" static int my_argc; static char **my_argv; +#ifndef BUBLIC_SERVER + static void init() { createHomeDirector(); @@ -86,6 +95,8 @@ void quit() exit(0); } +#endif + char* getParam(char *s) { int i; @@ -145,12 +156,26 @@ int main(int argc, char *argv[]) my_argc = argc; my_argv = argv; +#ifndef BUBLIC_SERVER + init(); setScreen("mainMenu"); eventSDL(); quit(); +#endif + +#ifdef BUBLIC_SERVER + + initPublicServer(); + + while(1) + { + eventPublicServer(); + } + +#endif return 0; } -- cgit v1.2.3