diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-15 18:35:48 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-15 18:35:48 +0000 |
| commit | b84b59153c587248ca8a6a94a6d93977e851233f (patch) | |
| tree | e13b33f09ee6ac130bb6045626618b1c5fc4d787 /src/main.c | |
| parent | 6038f9434f1eb40caf7992ece9a3972e95a9fc11 (diff) | |
- moznost skompilovat public server bez GUI ( pomocou Makefile-publicServer )
port sa nastavuje ako ./publicserver --port <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
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 37 |
1 files changed, 31 insertions, 6 deletions
@@ -1,12 +1,15 @@ #include <time.h> -#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; } |