summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--config.h2
-rw-r--r--include/widget_textfield.h1
-rwxr-xr-xsrc/Makefile1
-rw-r--r--src/item.c45
-rw-r--r--src/widget_textfield.c2
6 files changed, 29 insertions, 24 deletions
diff --git a/Makefile b/Makefile
index d4699ca..cef51d4 100644
--- a/Makefile
+++ b/Makefile
@@ -49,7 +49,7 @@ server:
install:
mkdir -p $(DESTDIR)/bin
mkdir -p $(DESTDIR)/share/tuxanci-ng/{arena,data,font,image,lang,music,sound,conf}
- cp ./build/tuxanci-ng $(DESTDIR)/bin/
+ cp ./src/tuxanci-ng $(DESTDIR)/bin/
cp -rf ./arena/* $(DESTDIR)/share/tuxanci-ng/arena/
cp -rf ./font/* $(DESTDIR)/share/tuxanci-ng/font/
diff --git a/config.h b/config.h
index 8be890e..dba75f2 100644
--- a/config.h
+++ b/config.h
@@ -6,7 +6,7 @@
#define DEBUG_CLIENT_RECV
*/
-#define TUXANCI_NG_VERSION "svn45"
+#define TUXANCI_NG_VERSION "svn47"
#define DESTDIR "/usr/local/"
#define SUPPORT_NET_SDL_UDP
diff --git a/include/widget_textfield.h b/include/widget_textfield.h
index af59ae8..e5e7cf3 100644
--- a/include/widget_textfield.h
+++ b/include/widget_textfield.h
@@ -19,6 +19,7 @@ typedef struct widget_textfield
int w, h;
int canWrite;
int timeBlick;
+ int time;
char text[STR_SIZE];
bool_t active;
} widget_textfield_t;
diff --git a/src/Makefile b/src/Makefile
index 8661603..2ce95be 100755
--- a/src/Makefile
+++ b/src/Makefile
@@ -20,7 +20,6 @@ FILES = interface.o font.o list.o image.o layer.o director.o configFile.o tux.o
tuxanci-ng: $(FILES)
$(CC) $(CFLAGS) $(LIBS) -o $(BUILD_DIR)/tuxanci-ng $(BUILD_DIR)/*.o
-
main.o: main.c
$(CC) $(CFLAGS) -o $(BUILD_DIR)/main.o -c main.c
diff --git a/src/item.c b/src/item.c
index 38490f9..c336cd4 100644
--- a/src/item.c
+++ b/src/item.c
@@ -375,8 +375,9 @@ void eventConflictShotWithItem(list_t *listItem, list_t *listShot)
for( i = 0 ; i < listShot->count ; i++ )
{
- bool_t isDelShot = FALSE;
+ bool_t isDelShot;
+ isDelShot = FALSE;
thisShot = (shot_t *)listShot->list[i];
assert( thisShot != NULL );
@@ -385,33 +386,37 @@ void eventConflictShotWithItem(list_t *listItem, list_t *listShot)
thisItem = (item_t *)listItem->list[j];
assert( thisItem != NULL );
- switch( thisItem->type )
+ if( conflictSpace(thisShot->x, thisShot->y, thisShot->w, thisShot->h,
+ thisItem->x, thisItem->y, thisItem->w, thisItem->h) )
{
- case ITEM_MINE :
-
- if( getNetTypeGame() != NET_GAME_TYPE_CLIENT &&
- conflictSpace(thisShot->x, thisShot->y, thisShot->w, thisShot->h,
- thisItem->x, thisItem->y, thisItem->w, thisItem->h) )
- {
- if( getNetTypeGame() == NET_GAME_TYPE_SERVER )
+ switch( thisItem->type )
+ {
+ case ITEM_MINE :
+
+ if( getNetTypeGame() != NET_GAME_TYPE_CLIENT )
{
- proto_send_item_server(PROTO_SEND_ALL, NULL, NULL, thisItem);
+ if( getNetTypeGame() == NET_GAME_TYPE_SERVER )
+ {
+ proto_send_item_server(PROTO_SEND_ALL, NULL, NULL, thisItem);
+ }
+
+ mineExplosion(listItem, thisItem);
+ j--;
}
-
- mineExplosion(listItem, thisItem);
- j--;
- }
- break;
-
- case ITEM_EXPLOSION :
- case ITEM_BIG_EXPLOSION :
- isDelShot = TRUE;
- break;
+ break;
+
+ case ITEM_EXPLOSION :
+ case ITEM_BIG_EXPLOSION :
+ isDelShot = TRUE;
+
+ break;
+ }
}
}
if( isDelShot )
{
+ printf("del shot\n");
delListItem(listShot, i, destroyShot);
i--;
}
diff --git a/src/widget_textfield.c b/src/widget_textfield.c
index fb3e902..d61718f 100644
--- a/src/widget_textfield.c
+++ b/src/widget_textfield.c
@@ -1,4 +1,3 @@
-
#include <stdlib.h>
#include "main.h"
@@ -192,3 +191,4 @@ void destroyWidgetTextfield(widget_textfield_t *p)
{
free(p);
}
+