]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_map.c
updated the copyleft wwww i am not deAD! i just been 2 busy last 6 monthes
[16.git] / src / lib / 16_map.c
index 1799921951aa23dc37ada73ca08ce32c3f84e8dd..d3ccb7c4f7de7bc909df4d974c72a142b1cdba63 100755 (executable)
@@ -1,5 +1,5 @@
 /* Project 16 Source Code~\r
- * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
+ * Copyright (C) 2012-2018 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
  *\r
  * This file is part of Project 16.\r
  *\r
@@ -180,7 +180,7 @@ int newloadmap(char *mn, map_t *map) {
        int status;\r
 \r
        /* Prepare parser */\r
-       jsmn_init((jsmn_parser *)&p);\r
+       jsmn_init(&p);\r
 \r
        file_s = filesize(fh);\r
        js = malloc(file_s);//TODO: USE MM_ CA_ AND PM_\r
@@ -195,11 +195,11 @@ int newloadmap(char *mn, map_t *map) {
                fclose(fh);\r
                return 1;\r
        }\r
-       tokcount = jsmn_parse((jsmn_parser *)&p, js, file_s, NULL, 0);\r
+       tokcount = jsmn_parse(&p, js, file_s, NULL, 0);\r
        tok = malloc(tokcount*sizeof(jsmntok_t));//TODO: USE MM_ CA_ AND PM_\r
        printf("Allocated %d tokens", tokcount);\r
-       jsmn_init((jsmn_parser *)&p);\r
-       if((status = jsmn_parse((jsmn_parser *)&p, js, file_s, tok, tokcount)) < 0)\r
+       jsmn_init(&p);\r
+       if((status = jsmn_parse(&p, js, file_s, tok, tokcount)) < 0)\r
        {\r
                printf("Error: %d\n", status);\r
                return status;\r
@@ -228,15 +228,15 @@ int CA_loadmap(char *mn, map_t *map, global_game_variables_t *gvar)
        int status;\r
 \r
        /* Prepare parser */\r
-       jsmn_init((jsmn_parser *)&p);\r
+       jsmn_init(&p);\r
 \r
        file_s = filesize(fh);\r
        CA_LoadFile(mn, MEMPTRCONV MAPSEGINLM, gvar);\r
-       tokcount = jsmn_parse((jsmn_parser *)&p, (char const *)MAPSEGINLM, file_s, NULL, 0);\r
+       tokcount = jsmn_parse(&p, (char const *)MAPSEGINLM, file_s, NULL, 0);\r
        tok = malloc(tokcount*sizeof(jsmntok_t));//TODO: USE MM_ CA_ AND PM_\r
 //     printf("Allocated %d tokens", tokcount);\r
-       jsmn_init((jsmn_parser *)&p);\r
-       if((status = jsmn_parse((jsmn_parser *)&p, (char const *)MAPSEGINLM, file_s, tok, tokcount)) < 0)\r
+       jsmn_init(&p);\r
+       if((status = jsmn_parse(&p, (char const *)MAPSEGINLM, file_s, tok, tokcount)) < 0)\r
        {\r
                printf("Error: %d\n", status);\r
                return status;\r