From 77465c2629ef63629d69c97a0af60a47a07ce7f5 Mon Sep 17 00:00:00 2001 From: oroborus Date: Thu, 17 Jul 2008 20:49:03 +0000 Subject: - opravena chyba, tux mophol pomocou bombballu vybuchnuteho v objekte do ktoreho sa dostal ako duch pridavat itemy - kod namiesto SDL_Surface pouziva moj typ image_t git-svn-id: http://opensvn.csie.org/tuxanci_ng@154 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/base/tux.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'src/base/tux.c') diff --git a/src/base/tux.c b/src/base/tux.c index cfaaddf..bbc63e0 100644 --- a/src/base/tux.c +++ b/src/base/tux.c @@ -18,6 +18,7 @@ #include "idManager.h" #ifndef PUBLIC_SERVER +#include "font.h" #include "image.h" #include "layer.h" #include "term.h" @@ -36,11 +37,11 @@ #ifndef PUBLIC_SERVER -static SDL_Surface *g_tux_up; -static SDL_Surface *g_tux_right; -static SDL_Surface *g_tux_left; -static SDL_Surface *g_tux_down; -static SDL_Surface *g_cross; +static image_t *g_tux_up; +static image_t *g_tux_right; +static image_t *g_tux_left; +static image_t *g_tux_down; +static image_t *g_cross; #endif @@ -104,6 +105,12 @@ tux_t* newTux() return new; } +void tuxSetName(tux_t *tux, char *name) +{ + strcpy(tux->name, name); + //tux->g_name = getFontImage(name, COLOR_WHITE); +} + bool_t isTuxAnyGun(tux_t *tux) { int i; @@ -156,7 +163,7 @@ void getCourse(int n, int *x, int *y) void drawTux(tux_t *tux) { - SDL_Surface *g_image = NULL; + image_t *g_image = NULL; assert( tux != NULL ); @@ -202,7 +209,16 @@ void drawTux(tux_t *tux) return; } - +/* + if( tux->g_name != NULL ) + { + addLayer(tux->g_name, + tux->x - TUX_IMG_WIDTH / 2, + ( tux->y + TUX_HEIGHT / 2 ) - TUX_IMG_HEIGHT, + 0, 0, + tux->g_name->w, tux->g_name->h, TUX_LAYER); + } +*/ addLayer(g_image, tux->x - TUX_IMG_WIDTH / 2, ( tux->y + TUX_HEIGHT / 2 ) - TUX_IMG_HEIGHT, -- cgit v1.2.3