]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_brush.c
renamed COM_ParseTokenConsole to COM_ParseToken_Console
[xonotic/darkplaces.git] / model_brush.c
index 966c7bc26c38c824f056c963a07905fd1c09a3bf..ca78e3ce7bd8a5a670988b2617c77ed765b30206 100644 (file)
@@ -1748,13 +1748,13 @@ static void Mod_Q1BSP_ParseWadsFromEntityLump(const char *data)
        int i, j, k;
        if (!data)
                return;
-       if (!COM_ParseTokenConsole(&data))
+       if (!COM_ParseToken_Simple(&data, false))
                return; // error
        if (com_token[0] != '{')
                return; // error
        while (1)
        {
-               if (!COM_ParseTokenConsole(&data))
+               if (!COM_ParseToken_Simple(&data, false))
                        return; // error
                if (com_token[0] == '}')
                        break; // end of worldspawn
@@ -1764,7 +1764,7 @@ static void Mod_Q1BSP_ParseWadsFromEntityLump(const char *data)
                        strlcpy(key, com_token, sizeof(key));
                while (key[strlen(key)-1] == ' ') // remove trailing spaces
                        key[strlen(key)-1] = 0;
-               if (!COM_ParseTokenConsole(&data))
+               if (!COM_ParseToken_Simple(&data, false))
                        return; // error
                dpsnprintf(value, sizeof(value), "%s", com_token);
                if (!strcmp("wad", key)) // for HalfLife maps
@@ -2660,12 +2660,12 @@ static void Mod_Q1BSP_LoadMapBrushes(void)
        if (!maptext)
                return;
        text = maptext;
-       if (!COM_ParseTokenConsole(&data))
+       if (!COM_ParseToken_Simple(&data, false))
                return; // error
        submodel = 0;
        for (;;)
        {
-               if (!COM_ParseTokenConsole(&data))
+               if (!COM_ParseToken_Simple(&data, false))
                        break;
                if (com_token[0] != '{')
                        return; // error
@@ -2676,7 +2676,7 @@ static void Mod_Q1BSP_LoadMapBrushes(void)
                brushes = Mem_Alloc(loadmodel->mempool, maxbrushes * sizeof(mbrush_t));
                for (;;)
                {
-                       if (!COM_ParseTokenConsole(&data))
+                       if (!COM_ParseToken_Simple(&data, false))
                                return; // error
                        if (com_token[0] == '}')
                                break; // end of entity
@@ -2700,7 +2700,7 @@ static void Mod_Q1BSP_LoadMapBrushes(void)
                                }
                                for (;;)
                                {
-                                       if (!COM_ParseTokenConsole(&data))
+                                       if (!COM_ParseToken_Simple(&data, false))
                                                return; // error
                                        if (com_token[0] == '}')
                                                break; // end of brush
@@ -2709,25 +2709,25 @@ static void Mod_Q1BSP_LoadMapBrushes(void)
                                        // FIXME: support hl .map format
                                        for (pointnum = 0;pointnum < 3;pointnum++)
                                        {
-                                               COM_ParseTokenConsole(&data);
+                                               COM_ParseToken_Simple(&data, false);
                                                for (componentnum = 0;componentnum < 3;componentnum++)
                                                {
-                                                       COM_ParseTokenConsole(&data);
+                                                       COM_ParseToken_Simple(&data, false);
                                                        point[pointnum][componentnum] = atof(com_token);
                                                }
-                                               COM_ParseTokenConsole(&data);
+                                               COM_ParseToken_Simple(&data, false);
                                        }
-                                       COM_ParseTokenConsole(&data);
+                                       COM_ParseToken_Simple(&data, false);
                                        strlcpy(facetexture, com_token, sizeof(facetexture));
-                                       COM_ParseTokenConsole(&data);
+                                       COM_ParseToken_Simple(&data, false);
                                        //scroll_s = atof(com_token);
-                                       COM_ParseTokenConsole(&data);
+                                       COM_ParseToken_Simple(&data, false);
                                        //scroll_t = atof(com_token);
-                                       COM_ParseTokenConsole(&data);
+                                       COM_ParseToken_Simple(&data, false);
                                        //rotate = atof(com_token);
-                                       COM_ParseTokenConsole(&data);
+                                       COM_ParseToken_Simple(&data, false);
                                        //scale_s = atof(com_token);
-                                       COM_ParseTokenConsole(&data);
+                                       COM_ParseToken_Simple(&data, false);
                                        //scale_t = atof(com_token);
                                        TriangleNormal(point[0], point[1], point[2], planenormal);
                                        VectorNormalizeDouble(planenormal);
@@ -4070,11 +4070,11 @@ static void Mod_Q3BSP_LoadEntities(lump_t *l)
        memcpy(loadmodel->brush.entities, mod_base + l->fileofs, l->filelen);
        data = loadmodel->brush.entities;
        // some Q3 maps override the lightgrid_cellsize with a worldspawn key
-       if (data && COM_ParseTokenConsole(&data) && com_token[0] == '{')
+       if (data && COM_ParseToken_Simple(&data, false) && com_token[0] == '{')
        {
                while (1)
                {
-                       if (!COM_ParseTokenConsole(&data))
+                       if (!COM_ParseToken_Simple(&data, false))
                                break; // error
                        if (com_token[0] == '}')
                                break; // end of worldspawn
@@ -4084,7 +4084,7 @@ static void Mod_Q3BSP_LoadEntities(lump_t *l)
                                strlcpy(key, com_token, sizeof(key));
                        while (key[strlen(key)-1] == ' ') // remove trailing spaces
                                key[strlen(key)-1] = 0;
-                       if (!COM_ParseTokenConsole(&data))
+                       if (!COM_ParseToken_Simple(&data, false))
                                break; // error
                        strlcpy(value, com_token, sizeof(value));
                        if (!strcmp("gridsize", key))
@@ -4151,7 +4151,7 @@ static void Mod_Q3BSP_LoadShaders(void)
                text = f = (char *)FS_LoadFile(search->filenames[fileindex], tempmempool, false, NULL);
                if (!f)
                        continue;
-               while (COM_ParseToken(&text, false))
+               while (COM_ParseToken_QuakeC(&text, false))
                {
                        if (q3shaders_numshaders >= Q3SHADER_MAXSHADERS)
                        {
@@ -4161,12 +4161,12 @@ static void Mod_Q3BSP_LoadShaders(void)
                        shader = q3shaders_shaders + q3shaders_numshaders++;
                        memset(shader, 0, sizeof(*shader));
                        strlcpy(shader->name, com_token, sizeof(shader->name));
-                       if (!COM_ParseToken(&text, false) || strcasecmp(com_token, "{"))
+                       if (!COM_ParseToken_QuakeC(&text, false) || strcasecmp(com_token, "{"))
                        {
                                Con_Printf("%s parsing error - expected \"{\", found \"%s\"\n", search->filenames[fileindex], com_token);
                                break;
                        }
-                       while (COM_ParseToken(&text, false))
+                       while (COM_ParseToken_QuakeC(&text, false))
                        {
                                if (!strcasecmp(com_token, "}"))
                                        break;
@@ -4182,7 +4182,7 @@ static void Mod_Q3BSP_LoadShaders(void)
                                        }
                                        else
                                                layer = NULL;
-                                       while (COM_ParseToken(&text, false))
+                                       while (COM_ParseToken_QuakeC(&text, false))
                                        {
                                                if (!strcasecmp(com_token, "}"))
                                                        break;
@@ -4198,7 +4198,7 @@ static void Mod_Q3BSP_LoadShaders(void)
                                                                strlcpy(parameter[j], com_token, sizeof(parameter[j]));
                                                                numparameters = j + 1;
                                                        }
-                                                       if (!COM_ParseToken(&text, true))
+                                                       if (!COM_ParseToken_QuakeC(&text, true))
                                                                break;
                                                }
                                                if (developer.integer >= 100)
@@ -4311,7 +4311,7 @@ static void Mod_Q3BSP_LoadShaders(void)
                                                strlcpy(parameter[j], com_token, sizeof(parameter[j]));
                                                numparameters = j + 1;
                                        }
-                                       if (!COM_ParseToken(&text, true))
+                                       if (!COM_ParseToken_QuakeC(&text, true))
                                                break;
                                }
                                if (fileindex == 0 && !strcasecmp(com_token, "}"))