aboutsummaryrefslogtreecommitdiff
path: root/fbwarn/src/warn.c
blob: 65995d23169016b59d51d1a728a5c57e12ca8310 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "raylib.h"
#include "parseBVG.h"
#include <string.h>
#include <stdlib.h>

int main(void) {
  char *str, *single, *toFree;
  toFree = str = strdup("rectangle (x=20,y=30,\nwidth=200,\nheight=300,\ncolor='#F5A9B8')\n");
  if (str == NULL)
    return 1;
  printf("Multi:\n %s", str);
  single = multiToSingle(str);
  printf("Single:\n %s\n", single);
  free(toFree);
    
  InitWindow (800, 450, "raylib");

  while (!WindowShouldClose ()) {
    BeginDrawing ();
    ClearBackground (RAYWHITE);
    DrawText ("TEXT", 190, 200, 20, LIGHTGRAY);
    char *parse = strdup(single);
    matchFunctionCall(parse);
    EndDrawing ();
  }

  CloseWindow ();
  
  return 0;
}