diff --git a/configure.ac b/configure.ac index 0b4cb77..140d73a 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ # information. This file is offered as-is, without any warranty. AC_PREREQ([2.69]) -AC_INIT([Project: Starfighter], [1.7], [onpon4@riseup.net], [starfighter]) +AC_INIT([Project: Starfighter], [1.7.1-dev], [onpon4@riseup.net], [starfighter]) AM_INIT_AUTOMAKE([foreign -Wall -Werror]) AC_CONFIG_SRCDIR([src/Starfighter.cpp]) AC_CONFIG_HEADERS([config.h]) diff --git a/src/gfx.cpp b/src/gfx.cpp index 79b08db..f6a2b7c 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -346,8 +346,14 @@ SDL_Surface *gfx_createTextSurface(const char *inString, int color) void gfx_createTextObject(int index, const char *inString, int x, int y, int fontColor) { + // Reset the life of the text object + gfx_textSprites[index].life = 0; + /* Shortcut: if we already rendered the same string in the same color, don't render it again. */ - if(gfx_textSprites[index].text && gfx_textSprites[index].image && gfx_textSprites[index].fontColor == fontColor && !strcmp(gfx_textSprites[index].text, inString)) { + if (gfx_textSprites[index].text && gfx_textSprites[index].image && + gfx_textSprites[index].fontColor == fontColor && + !strcmp(gfx_textSprites[index].text, inString)) + { gfx_textSprites[index].x = x; gfx_textSprites[index].y = y; if (x == -1)