Merge branch 'develop' into resolution

This commit is contained in:
Steve 2018-12-17 07:28:13 +00:00
commit 3739ef4a42
4 changed files with 5 additions and 26 deletions

View File

@ -1 +1 @@
&|_# POfileorTBFS:handWCpygt2015-6,JwsbuGNUL3.Emj@c/"IV\RMD8+v?x;=%!AYq()'kH[]KzQX4Z79*àéí¡Çóè·úïçüºòÉÒÍÀ°æåøÆÅØ<>öÄäßÜá¿ñÁÊûâîôÈêùœÙìëęąłćżńśźŻŚŁĆÖ Ö&|_# POfileorTBFS:handWCpygt2015-6,JwsbuGNUL3.Emj@c/"IV\RMD8+v?x;=%!AYq()'kH[]KzQX4Z79*àéí¡Çóè·úïçüºòÉÒÍÀ°æåøÆÅØ<>öÄäßÜá¿ñÁÊûâîôÈêùœÙìëęąłćżńśźŻŚŁĆÖ

View File

@ -81,7 +81,7 @@ msgid "Missiles"
msgstr "Missiles" msgstr "Missiles"
msgid "Missiles (%d)" msgid "Missiles (%d)"
msgstr "Missiles ( %d )" msgstr "Missiles (%d)"
msgid "Target: %.2fkm" msgid "Target: %.2fkm"
msgstr "Cible:% .2fkm" msgstr "Cible:% .2fkm"

View File

@ -46,7 +46,7 @@ Mission *loadMissionMeta(char *filename)
mission = malloc(sizeof(Mission)); mission = malloc(sizeof(Mission));
memset(mission, 0, sizeof(Mission)); memset(mission, 0, sizeof(Mission));
STRNCPY(mission->name, cJSON_GetObjectItem(root, "name")->valuestring, MAX_NAME_LENGTH); STRNCPY(mission->name, _(cJSON_GetObjectItem(root, "name")->valuestring), MAX_NAME_LENGTH);
STRNCPY(mission->description, _(cJSON_GetObjectItem(root, "description")->valuestring), MAX_DESCRIPTION_LENGTH); STRNCPY(mission->description, _(cJSON_GetObjectItem(root, "description")->valuestring), MAX_DESCRIPTION_LENGTH);
STRNCPY(mission->filename, filename, MAX_DESCRIPTION_LENGTH); STRNCPY(mission->filename, filename, MAX_DESCRIPTION_LENGTH);

View File

@ -29,7 +29,6 @@ void useFont(char *name);
static void initChars(Font *f); static void initChars(Font *f);
static char *nextCharacter(const char *str, int *i); static char *nextCharacter(const char *str, int *i);
static Glyph *findGlyph(char *c); static Glyph *findGlyph(char *c);
static int strlenMB(char *text);
static SDL_Color white = {255, 255, 255, 255}; static SDL_Color white = {255, 255, 255, 255};
static char drawTextBuffer[1024]; static char drawTextBuffer[1024];
@ -187,7 +186,7 @@ static void drawTextLines(int x, int y, int size, int align, SDL_Color color)
memset(&line, '\0', sizeof(line)); memset(&line, '\0', sizeof(line));
memset(&token, '\0', sizeof(token)); memset(&token, '\0', sizeof(token));
len = strlenMB(drawTextBuffer); len = strlen(drawTextBuffer);
n = currentWidth = 0; n = currentWidth = 0;
@ -365,7 +364,7 @@ int getWrappedTextHeight(char *text, int size)
y = 0; y = 0;
h = 0; h = 0;
currentWidth = 0; currentWidth = 0;
len = strlenMB(drawTextBuffer); len = strlen(drawTextBuffer);
memset(word, 0, MAX_WORD_LENGTH); memset(word, 0, MAX_WORD_LENGTH);
for (i = 0 ; i < len ; i++) for (i = 0 ; i < len ; i++)
@ -421,23 +420,3 @@ static char *nextCharacter(const char *str, int *i)
*i = *i + 1; *i = *i + 1;
} }
} }
static int strlenMB(char *text)
{
int i, n;
unsigned char bit;
n = 0;
for (i = 0 ; i < strlen(text) ; i++)
{
bit = (unsigned char)text[i];
if ((bit >= ' ' && bit <= '~') || bit >= 0xC0)
{
n++;
}
}
return n;
}