- use a saner data structure to store the BrokenLines.

Calling the old method with a pointer to an array of unspecified length 'dirty' would be an understatement.
Now it uses a TArray to store the single elements
This commit is contained in:
Christoph Oelckers 2018-10-31 19:13:54 +01:00
commit 0d54d335c4
15 changed files with 62 additions and 135 deletions

View file

@ -87,6 +87,7 @@ The FON2 header is followed by variable length data:
#include "cmdlib.h"
#include "sc_man.h"
#include "hu_stuff.h"
#include "gstrings.h"
#include "v_text.h"
#include "vm.h"
@ -919,7 +920,9 @@ DEFINE_ACTION_FUNCTION(FFont, StringWidth)
{
PARAM_SELF_STRUCT_PROLOGUE(FFont);
PARAM_STRING(str);
ACTION_RETURN_INT(self->StringWidth(str));
const char *txt = str[0] == '$' ? GStrings(&str[1]) : str.GetChars();
ACTION_RETURN_INT(self->StringWidth(txt));
}
//==========================================================================