From e8af9a2ecae53d00c2c335ac76802966c3681342 Mon Sep 17 00:00:00 2001 From: xHire Date: Mon, 7 Jul 2008 11:04:41 +0000 Subject: - fixed problem with PREFIX - fixed problem when compiling without sound git-svn-id: http://opensvn.csie.org/tuxanci_ng@114 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/CMakeLists.txt | 4 +++- src/base/path.h | 5 +---- src/client/image.c | 6 +++--- src/client/image.h | 2 +- src/modules/modAI.c | 11 ++++------- src/screen/screen_setting.c | 2 +- 6 files changed, 13 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c97e4f5..7a27c29 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -30,7 +30,9 @@ IF ( Server ) ADD_DEFINITIONS ( -DPUBLIC_SERVER ) ADD_DEFINITIONS ( -DNO_SOUND ) ENDIF ( Server ) -ADD_DEFINITIONS ( -DPREFIX="${PREFIX}" ) +IF ( PREFIX ) + ADD_DEFINITIONS ( -DPREFIX="${PREFIX}" ) +ENDIF ( PREFIX ) #include zdrojaku INCLUDE_DIRECTORIES ( ${WORKDIR}/base ) INCLUDE_DIRECTORIES ( ${WORKDIR}/net ) diff --git a/src/base/path.h b/src/base/path.h index 783fc6c..8765ed5 100644 --- a/src/base/path.h +++ b/src/base/path.h @@ -12,13 +12,10 @@ #ifndef PUBLIC_SERVER #define PATH_DIR PREFIX "/share/tuxanci-ng/" #define PATH_MODULES PREFIX "/lib/tuxanci-ng/" -#endif - -#ifdef PUBLIC_SERVER +#else #define PATH_DIR PREFIX "/share/tuxanci-ng-server/" #define PATH_MODULES PREFIX "/lib/tuxanci-ng-server/" #define SERVER_CONFIG "/etc/tuxanci-ng-server/server.conf" - #endif #define PATH_IMAGE PATH_DIR "image/" diff --git a/src/client/image.c b/src/client/image.c index d582193..3c3b40f 100755 --- a/src/client/image.c +++ b/src/client/image.c @@ -20,7 +20,7 @@ bool_t isImageInicialized() } /* - * Inicialuzje globalny zoznam obrazkov + * Inicializuje globalny zoznam obrazkov */ void initImageData() { @@ -128,12 +128,12 @@ void drawImage(SDL_Surface *p, int x,int y, int px, int py, int w, int h) dst_rect.x = x; dst_rect.y = y; - + src_rect.x = px; src_rect.y = py; src_rect.w = w; src_rect.h = h; - + SDL_BlitSurface(p, &src_rect, screen, &dst_rect); } diff --git a/src/client/image.h b/src/client/image.h index be3826d..e80efb5 100755 --- a/src/client/image.h +++ b/src/client/image.h @@ -3,7 +3,7 @@ #define IMAGE_H -#include "image.h" +//#include "image.h" #include "interface.h" #define IMAGE_NO_ALPHA 0 diff --git a/src/modules/modAI.c b/src/modules/modAI.c index 53f689e..d244aa3 100755 --- a/src/modules/modAI.c +++ b/src/modules/modAI.c @@ -13,12 +13,10 @@ #include "space.h" #ifndef PUBLIC_SERVER -#include "interface.h" -#include "image.h" -#endif - -#ifdef PUBLIC_SERVER -#include "publicServer.h" + #include "interface.h" + #include "image.h" +#else + #include "publicServer.h" #endif static export_fce_t *export_fce; @@ -35,7 +33,6 @@ int init(export_fce_t *p) } #ifndef PUBLIC_SERVER - int draw(int x, int y, int w, int h) { return 0; diff --git a/src/screen/screen_setting.c b/src/screen/screen_setting.c index a7eca81..ae12518 100644 --- a/src/screen/screen_setting.c +++ b/src/screen/screen_setting.c @@ -337,7 +337,7 @@ void initScreenSetting() check_sound = newWidgetCheck(label_sound->x + label_sound->w + 10, WINDOW_SIZE_Y-80, isSoundActive() , eventWidget); label_ai = newWidgetLabel("AI:", check_sound->x + WIDGET_CHECK_WIDTH + 10, WINDOW_SIZE_Y-85, WIDGET_LABEL_LEFT); -#elif +#else label_ai = newWidgetLabel("AI:", 100, WINDOW_SIZE_Y-85, WIDGET_LABEL_LEFT); #endif -- cgit v1.2.3