mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 23:42:11 +00:00
Merge branch 'write-textmap-bruh' into 'next'
Fix size_t compiler warnings in P_WriteTextmap See merge request STJr/SRB2!1785
This commit is contained in:
commit
9e2d8f059d
1 changed files with 39 additions and 39 deletions
|
@ -2111,31 +2111,31 @@ static void P_WriteTextmap(void)
|
|||
case 1:
|
||||
TAG_ITER_SECTORS(Tag_FGet(&wlines[i].tags), s)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %d applies custom gravity to sector %d. Changes to this gravity at runtime will not be reflected in the converted map. Use linedef type 469 for this.\n"), i, s);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %s applies custom gravity to sector %d. Changes to this gravity at runtime will not be reflected in the converted map. Use linedef type 469 for this.\n"), sizeu1(i), s);
|
||||
wsectors[s].gravity = FixedDiv(lines[i].frontsector->floorheight >> FRACBITS, 1000);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Custom exit linedef %d detected. Changes to the next map at runtime will not be reflected in the converted map. Use linedef type 468 for this.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Custom exit linedef %s detected. Changes to the next map at runtime will not be reflected in the converted map. Use linedef type 468 for this.\n"), sizeu1(i));
|
||||
wlines[i].args[0] = lines[i].frontsector->floorheight >> FRACBITS;
|
||||
wlines[i].args[2] = lines[i].frontsector->ceilingheight >> FRACBITS;
|
||||
break;
|
||||
case 5:
|
||||
case 50:
|
||||
case 51:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %d has type %d, which is not supported in UDMF.\n"), i, wlines[i].special);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %s has type %d, which is not supported in UDMF.\n"), sizeu1(i), wlines[i].special);
|
||||
break;
|
||||
case 61:
|
||||
if (wlines[i].flags & ML_MIDSOLID)
|
||||
continue;
|
||||
if (!wlines[i].args[1])
|
||||
continue;
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %d with crusher type 61 rises twice as fast on spawn. This behavior is not supported in UDMF.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %s with crusher type 61 rises twice as fast on spawn. This behavior is not supported in UDMF.\n"), sizeu1(i));
|
||||
break;
|
||||
case 76:
|
||||
if (freetag == (mtag_t)MAXTAGS)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %d with type 76 cannot be converted.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %s with type 76 cannot be converted.\n"), sizeu1(i));
|
||||
break;
|
||||
}
|
||||
TAG_ITER_SECTORS(wlines[i].args[0], s)
|
||||
|
@ -2151,9 +2151,9 @@ static void P_WriteTextmap(void)
|
|||
break;
|
||||
case 259:
|
||||
if (wlines[i].args[3] & FF_QUICKSAND)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Quicksand properties of custom FOF on linedef %d cannot be converted. Use linedef type 75 instead.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Quicksand properties of custom FOF on linedef %s cannot be converted. Use linedef type 75 instead.\n"), sizeu1(i));
|
||||
if (wlines[i].args[3] & FF_BUSTUP)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Bustable properties of custom FOF on linedef %d cannot be converted. Use linedef type 74 instead.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Bustable properties of custom FOF on linedef %s cannot be converted. Use linedef type 74 instead.\n"), sizeu1(i));
|
||||
break;
|
||||
case 412:
|
||||
if ((s = Tag_Iterate_Sectors(wlines[i].args[0], 0)) < 0)
|
||||
|
@ -2162,7 +2162,7 @@ static void P_WriteTextmap(void)
|
|||
break;
|
||||
if (freetag == (mtag_t)MAXTAGS)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %d with type 412 cannot be converted.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %s with type 412 cannot be converted.\n"), sizeu1(i));
|
||||
break;
|
||||
}
|
||||
Tag_Add(&specialthings[s].teleport->tags, freetag);
|
||||
|
@ -2176,7 +2176,7 @@ static void P_WriteTextmap(void)
|
|||
break;
|
||||
if (freetag == (mtag_t)MAXTAGS)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %d with type 422 cannot be converted.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %s with type 422 cannot be converted.\n"), sizeu1(i));
|
||||
break;
|
||||
}
|
||||
Tag_Add(&specialthings[s].altview->tags, freetag);
|
||||
|
@ -2185,14 +2185,14 @@ static void P_WriteTextmap(void)
|
|||
freetag = Tag_NextUnused(freetag);
|
||||
break;
|
||||
case 447:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %d has change colormap action, which cannot be converted automatically. Tag arg0 to a sector with the desired colormap.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %s has change colormap action, which cannot be converted automatically. Tag arg0 to a sector with the desired colormap.\n"), sizeu1(i));
|
||||
if (wlines[i].flags & ML_TFERLINE)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %d mixes front and back colormaps, which is not supported in UDMF. Copy one colormap to the target sector first, then mix in the second one.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %s mixes front and back colormaps, which is not supported in UDMF. Copy one colormap to the target sector first, then mix in the second one.\n"), sizeu1(i));
|
||||
break;
|
||||
case 455:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %d has fade colormap action, which cannot be converted automatically. Tag arg0 to a sector with the desired colormap.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %s has fade colormap action, which cannot be converted automatically. Tag arg0 to a sector with the desired colormap.\n"), sizeu1(i));
|
||||
if (wlines[i].flags & ML_TFERLINE)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %d specifies starting colormap for the fade, which is not supported in UDMF. Change the colormap with linedef type 447 instead.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %s specifies starting colormap for the fade, which is not supported in UDMF. Change the colormap with linedef type 447 instead.\n"), sizeu1(i));
|
||||
break;
|
||||
case 457:
|
||||
if ((s = Tag_Iterate_Sectors(wlines[i].args[0], 0)) < 0)
|
||||
|
@ -2201,7 +2201,7 @@ static void P_WriteTextmap(void)
|
|||
break;
|
||||
if (freetag == (mtag_t)MAXTAGS)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %d with type 457 cannot be converted.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %s with type 457 cannot be converted.\n"), sizeu1(i));
|
||||
break;
|
||||
}
|
||||
Tag_Add(&specialthings[s].angleanchor->tags, freetag);
|
||||
|
@ -2224,7 +2224,7 @@ static void P_WriteTextmap(void)
|
|||
wsectors[s].extra_colormap = wsides[wlines[i].sidenum[0]].colormap_data;
|
||||
if (freetag == (mtag_t)MAXTAGS)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %d with type 606 cannot be converted.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %s with type 606 cannot be converted.\n"), sizeu1(i));
|
||||
break;
|
||||
}
|
||||
Tag_Add(&wsectors[s].tags, freetag);
|
||||
|
@ -2239,23 +2239,23 @@ static void P_WriteTextmap(void)
|
|||
}
|
||||
|
||||
if (wlines[i].special >= 300 && wlines[i].special < 400 && wlines[i].flags & ML_WRAPMIDTEX)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef executor trigger linedef %d has disregard order flag, which is not supported in UDMF.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef executor trigger linedef %s has disregard order flag, which is not supported in UDMF.\n"), sizeu1(i));
|
||||
}
|
||||
|
||||
for (i = 0; i < numsectors; i++)
|
||||
{
|
||||
if (Tag_Find(&wsectors[i].tags, LE_CAPSULE0))
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %d has reserved tag %d, which is not supported in UDMF. Use arg3 of the boss mapthing instead.\n"), i, LE_CAPSULE0);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has reserved tag %d, which is not supported in UDMF. Use arg3 of the boss mapthing instead.\n"), sizeu1(i), LE_CAPSULE0);
|
||||
if (Tag_Find(&wsectors[i].tags, LE_CAPSULE1))
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %d has reserved tag %d, which is not supported in UDMF. Use arg3 of the boss mapthing instead.\n"), i, LE_CAPSULE1);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has reserved tag %d, which is not supported in UDMF. Use arg3 of the boss mapthing instead.\n"), sizeu1(i), LE_CAPSULE1);
|
||||
if (Tag_Find(&wsectors[i].tags, LE_CAPSULE2))
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %d has reserved tag %d, which is not supported in UDMF. Use arg3 of the boss mapthing instead.\n"), i, LE_CAPSULE2);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has reserved tag %d, which is not supported in UDMF. Use arg3 of the boss mapthing instead.\n"), sizeu1(i), LE_CAPSULE2);
|
||||
|
||||
switch (GETSECSPECIAL(wsectors[i].special, 1))
|
||||
{
|
||||
case 9:
|
||||
case 10:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %d has ring drainer effect, which is not supported in UDMF. Use linedef type 462 instead.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has ring drainer effect, which is not supported in UDMF. Use linedef type 462 instead.\n"), sizeu1(i));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -2264,13 +2264,13 @@ static void P_WriteTextmap(void)
|
|||
switch (GETSECSPECIAL(wsectors[i].special, 2))
|
||||
{
|
||||
case 6:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %d has emerald check trigger type, which is not supported in UDMF. Use linedef types 337-339 instead.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has emerald check trigger type, which is not supported in UDMF. Use linedef types 337-339 instead.\n"), sizeu1(i));
|
||||
break;
|
||||
case 7:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %d has NiGHTS mare trigger type, which is not supported in UDMF. Use linedef types 340-342 instead.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has NiGHTS mare trigger type, which is not supported in UDMF. Use linedef types 340-342 instead.\n"), sizeu1(i));
|
||||
break;
|
||||
case 9:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %d has Egg Capsule type, which is not supported in UDMF. Use linedef type 464 instead.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Sector %s has Egg Capsule type, which is not supported in UDMF. Use linedef type 464 instead.\n"), sizeu1(i));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -2280,7 +2280,7 @@ static void P_WriteTextmap(void)
|
|||
fprintf(f, "namespace = \"srb2\";\n");
|
||||
for (i = 0; i < nummapthings; i++)
|
||||
{
|
||||
fprintf(f, "thing // %d\n", i);
|
||||
fprintf(f, "thing // %s\n", sizeu1(i));
|
||||
fprintf(f, "{\n");
|
||||
firsttag = Tag_FGet(&wmapthings[i].tags);
|
||||
if (firsttag != 0)
|
||||
|
@ -2313,17 +2313,17 @@ static void P_WriteTextmap(void)
|
|||
fprintf(f, "flip = true;\n");
|
||||
for (j = 0; j < NUMMAPTHINGARGS; j++)
|
||||
if (wmapthings[i].args[j] != 0)
|
||||
fprintf(f, "arg%d = %d;\n", j, wmapthings[i].args[j]);
|
||||
fprintf(f, "arg%s = %d;\n", sizeu1(j), wmapthings[i].args[j]);
|
||||
for (j = 0; j < NUMMAPTHINGSTRINGARGS; j++)
|
||||
if (mapthings[i].stringargs[j])
|
||||
fprintf(f, "stringarg%d = \"%s\";\n", j, mapthings[i].stringargs[j]);
|
||||
fprintf(f, "stringarg%s = \"%s\";\n", sizeu1(j), mapthings[i].stringargs[j]);
|
||||
fprintf(f, "}\n");
|
||||
fprintf(f, "\n");
|
||||
}
|
||||
|
||||
for (i = 0; i < numvertexes; i++)
|
||||
{
|
||||
fprintf(f, "vertex // %d\n", i);
|
||||
fprintf(f, "vertex // %s\n", sizeu1(i));
|
||||
fprintf(f, "{\n");
|
||||
fprintf(f, "x = %f;\n", FIXED_TO_FLOAT(wvertexes[i].x));
|
||||
fprintf(f, "y = %f;\n", FIXED_TO_FLOAT(wvertexes[i].y));
|
||||
|
@ -2337,10 +2337,10 @@ static void P_WriteTextmap(void)
|
|||
|
||||
for (i = 0; i < numlines; i++)
|
||||
{
|
||||
fprintf(f, "linedef // %d\n", i);
|
||||
fprintf(f, "linedef // %s\n", sizeu1(i));
|
||||
fprintf(f, "{\n");
|
||||
fprintf(f, "v1 = %d;\n", wlines[i].v1 - vertexes);
|
||||
fprintf(f, "v2 = %d;\n", wlines[i].v2 - vertexes);
|
||||
fprintf(f, "v1 = %s;\n", sizeu1(wlines[i].v1 - vertexes));
|
||||
fprintf(f, "v2 = %s;\n", sizeu1(wlines[i].v2 - vertexes));
|
||||
fprintf(f, "sidefront = %d;\n", wlines[i].sidenum[0]);
|
||||
if (wlines[i].sidenum[1] != 0xffff)
|
||||
fprintf(f, "sideback = %d;\n", wlines[i].sidenum[1]);
|
||||
|
@ -2362,10 +2362,10 @@ static void P_WriteTextmap(void)
|
|||
fprintf(f, "special = %d;\n", wlines[i].special);
|
||||
for (j = 0; j < NUMLINEARGS; j++)
|
||||
if (wlines[i].args[j] != 0)
|
||||
fprintf(f, "arg%d = %d;\n", j, wlines[i].args[j]);
|
||||
fprintf(f, "arg%s = %d;\n", sizeu1(j), wlines[i].args[j]);
|
||||
for (j = 0; j < NUMLINESTRINGARGS; j++)
|
||||
if (lines[i].stringargs[j])
|
||||
fprintf(f, "stringarg%d = \"%s\";\n", j, lines[i].stringargs[j]);
|
||||
fprintf(f, "stringarg%s = \"%s\";\n", sizeu1(j), lines[i].stringargs[j]);
|
||||
if (wlines[i].alpha != FRACUNIT)
|
||||
fprintf(f, "alpha = %f;\n", FIXED_TO_FLOAT(wlines[i].alpha));
|
||||
if (wlines[i].blendmode != AST_COPY)
|
||||
|
@ -2393,7 +2393,7 @@ static void P_WriteTextmap(void)
|
|||
}
|
||||
if (wlines[i].executordelay != 0 && wlines[i].backsector)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %d has an executor delay. Changes to the delay at runtime will not be reflected in the converted map. Use linedef type 465 for this.\n"), i);
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Linedef %s has an executor delay. Changes to the delay at runtime will not be reflected in the converted map. Use linedef type 465 for this.\n"), sizeu1(i));
|
||||
fprintf(f, "executordelay = %d;\n", (wlines[i].backsector->ceilingheight >> FRACBITS) + (wlines[i].backsector->floorheight >> FRACBITS));
|
||||
}
|
||||
if (wlines[i].flags & ML_IMPASSIBLE)
|
||||
|
@ -2432,9 +2432,9 @@ static void P_WriteTextmap(void)
|
|||
|
||||
for (i = 0; i < numsides; i++)
|
||||
{
|
||||
fprintf(f, "sidedef // %d\n", i);
|
||||
fprintf(f, "sidedef // %s\n", sizeu1(i));
|
||||
fprintf(f, "{\n");
|
||||
fprintf(f, "sector = %d;\n", wsides[i].sector - sectors);
|
||||
fprintf(f, "sector = %s;\n", sizeu1(wsides[i].sector - sectors));
|
||||
if (wsides[i].textureoffset != 0)
|
||||
fprintf(f, "offsetx = %d;\n", wsides[i].textureoffset >> FRACBITS);
|
||||
if (wsides[i].rowoffset != 0)
|
||||
|
@ -2453,7 +2453,7 @@ static void P_WriteTextmap(void)
|
|||
|
||||
for (i = 0; i < numsectors; i++)
|
||||
{
|
||||
fprintf(f, "sector // %d\n", i);
|
||||
fprintf(f, "sector // %s\n", sizeu1(i));
|
||||
fprintf(f, "{\n");
|
||||
fprintf(f, "heightfloor = %d;\n", wsectors[i].floorheight >> FRACBITS);
|
||||
fprintf(f, "heightceiling = %d;\n", wsectors[i].ceilingheight >> FRACBITS);
|
||||
|
@ -3263,7 +3263,7 @@ static boolean P_LoadExtendedSubsectorsAndSegs(UINT8 **data, nodetype_t nodetype
|
|||
|
||||
linenum = (nodetype == NT_XGL3) ? READUINT32((*data)) : READUINT16((*data));
|
||||
if (linenum != 0xFFFF && linenum >= numlines)
|
||||
I_Error("P_LoadExtendedSubsectorsAndSegs: Seg %s in subsector %d has invalid linedef %d!\n", sizeu1(k), i, linenum);
|
||||
I_Error("P_LoadExtendedSubsectorsAndSegs: Seg %s in subsector %s has invalid linedef %d!\n", sizeu1(k), sizeu2(i), linenum);
|
||||
segs[k].glseg = (linenum == 0xFFFF);
|
||||
segs[k].linedef = (linenum == 0xFFFF) ? NULL : &lines[linenum];
|
||||
segs[k].side = READUINT8((*data));
|
||||
|
@ -3272,7 +3272,7 @@ static boolean P_LoadExtendedSubsectorsAndSegs(UINT8 **data, nodetype_t nodetype
|
|||
{
|
||||
subsectors[i].firstline++;
|
||||
if (subsectors[i].firstline == k)
|
||||
I_Error("P_LoadExtendedSubsectorsAndSegs: Subsector %d does not have any valid segs!", i);
|
||||
I_Error("P_LoadExtendedSubsectorsAndSegs: Subsector %s does not have any valid segs!", sizeu1(i));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -6318,7 +6318,7 @@ static void P_ConvertBinaryThingTypes(void)
|
|||
|
||||
if (j == -1)
|
||||
{
|
||||
CONS_Debug(DBG_GAMELOGIC, "Particle generator (mapthing #%d) needs to be tagged to a #15 parameter line (trying to find tag %d).\n", i, mapthings[i].angle);
|
||||
CONS_Debug(DBG_GAMELOGIC, "Particle generator (mapthing #%s) needs to be tagged to a #15 parameter line (trying to find tag %d).\n", sizeu1(i), mapthings[i].angle);
|
||||
break;
|
||||
}
|
||||
mapthings[i].args[0] = mapthings[i].z;
|
||||
|
|
Loading…
Reference in a new issue