feat: updated engine version to 4.4-rc1
This commit is contained in:
parent
ee00efde1f
commit
21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions
|
|
@ -2,6 +2,8 @@
|
|||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#include "shape-description.h"
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
namespace msdfgen {
|
||||
|
||||
int readCharF(FILE *input) {
|
||||
|
|
@ -25,14 +27,25 @@ int readCharS(const char **input) {
|
|||
}
|
||||
|
||||
int readCoordF(FILE *input, Point2 &coord) {
|
||||
return fscanf(input, "%lf,%lf", &coord.x, &coord.y);
|
||||
return fscanf(input, "%lf , %lf", &coord.x, &coord.y);
|
||||
}
|
||||
|
||||
int readCoordS(const char **input, Point2 &coord) {
|
||||
int read = 0;
|
||||
int result = sscanf(*input, "%lf,%lf%n", &coord.x, &coord.y, &read);
|
||||
*input += read;
|
||||
return result;
|
||||
char *end = NULL;
|
||||
coord.x = strtod(*input, &end);
|
||||
if (end <= *input)
|
||||
return 0;
|
||||
*input = end;
|
||||
while (**input == ' ' || **input == '\t' || **input == '\n' || **input == '\r')
|
||||
++*input;
|
||||
if (**input != ',')
|
||||
return 1;
|
||||
++*input;
|
||||
coord.y = strtod(*input, &end);
|
||||
if (end <= *input)
|
||||
return 1;
|
||||
*input = end;
|
||||
return 2;
|
||||
}
|
||||
|
||||
static bool writeCoord(FILE *output, Point2 coord) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue