Add deprecation TODOs

This commit is contained in:
LJ Sonic 2023-10-28 15:19:35 +02:00
parent c0146744b7
commit 8608ded317
9 changed files with 28 additions and 9 deletions

View file

@ -911,6 +911,7 @@ static void readspriteframe(MYFILE *f, spriteinfo_t *sprinfo, UINT8 frame)
sprinfo->pivot[frame].x = value;
else if (fastcmp(word, "YPIVOT"))
sprinfo->pivot[frame].y = value;
// TODO: 2.3: Delete
else if (fastcmp(word, "ROTAXIS"))
deh_warning("SpriteInfo: ROTAXIS is deprecated and will be removed.");
else
@ -1617,6 +1618,7 @@ void readlevelheader(MYFILE *f, INT32 num)
sizeof(mapheaderinfo[num-1]->musname), va("Level header %d: music", num));
}
}
// TODO: 2.3: Delete
else if (fastcmp(word, "MUSICSLOT"))
deh_warning("Level header %d: MusicSlot parameter is deprecated and will be removed.\nUse \"Music\" instead.", num);
else if (fastcmp(word, "MUSICTRACK"))

View file

@ -1788,6 +1788,7 @@ static int lib_pMove(lua_State *L)
return 2;
}
// TODO: 2.3: Delete
static int lib_pTeleportMove(lua_State *L)
{
mobj_t *ptmthing = tmthing;
@ -2266,6 +2267,7 @@ static int lib_pMobjTouchingSectorSpecial(lua_State *L)
return 1;
}
// TODO: 2.3: Delete
static int lib_pThingOnSpecial3DFloor(lua_State *L)
{
mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));

View file

@ -194,6 +194,7 @@ static int lib_comAddCommand(lua_State *L)
if (lua_gettop(L) >= 3)
{ // For the third argument, only take a boolean or a number.
lua_settop(L, 3);
// TODO: 2.3: Remove boolean option
if (lua_type(L, 3) == LUA_TBOOLEAN)
{
CONS_Alert(CONS_WARNING,

View file

@ -318,6 +318,7 @@ static int PopPivotSubTable(spriteframepivot_t *pivot, lua_State *L, int stk, in
pivot[idx].x = (INT32)value;
else if (ikey == 2 || (key && fastcmp(key, "y")))
pivot[idx].y = (INT32)value;
// TODO: 2.3: Delete
else if (ikey == 3 || (key && fastcmp(key, "rotaxis")))
LUA_UsageWarning(L, "\"rotaxis\" is deprecated and will be removed.")
else if (ikey == -1 && (key != NULL))
@ -571,6 +572,7 @@ static int framepivot_get(lua_State *L)
lua_pushinteger(L, framepivot->x);
else if (fastcmp("y", field))
lua_pushinteger(L, framepivot->y);
// TODO: 2.3: Delete
else if (fastcmp("rotaxis", field))
{
LUA_UsageWarning(L, "\"rotaxis\" is deprecated and will be removed.");
@ -600,6 +602,7 @@ static int framepivot_set(lua_State *L)
framepivot->x = luaL_checkinteger(L, 3);
else if (fastcmp("y", field))
framepivot->y = luaL_checkinteger(L, 3);
// TODO: 2.3: delete
else if (fastcmp("rotaxis", field))
LUA_UsageWarning(L, "\"rotaxis\" is deprecated and will be removed.")
else

View file

@ -1098,6 +1098,7 @@ static int line_get(lua_State *L)
case line_polyobj:
LUA_PushUserdata(L, line->polyobj, META_POLYOBJ);
return 1;
// TODO: 2.3: Delete
case line_text:
{
if (udmf)
@ -1231,6 +1232,7 @@ static int side_get(lua_State *L)
case side_repeatcnt:
lua_pushinteger(L, side->repeatcnt);
return 1;
// TODO: 2.3: Delete
case side_text:
{
if (udmf)

View file

@ -125,6 +125,7 @@ static int lib_fixeddiv(lua_State *L)
return 1;
}
// TODO: 2.3: Delete
static int lib_fixedrem(lua_State *L)
{
LUA_Deprecated(L, "FixedRem(a, b)", "a % b");

View file

@ -1679,7 +1679,7 @@ static void ParseTextmapSectorParameter(UINT32 i, const char *param, const char
if ((id = strchr(id, ' ')))
id++;
}
}
}
else if (fastcmp(param, "xpanningfloor"))
sectors[i].floorxoffset = FLOAT_TO_FIXED(atof(val));
else if (fastcmp(param, "ypanningfloor"))
@ -6132,6 +6132,7 @@ static void P_ConvertBinarySectorTypes(void)
case 14: //Non-ramp sector
sectors[i].specialflags |= SSF_NOSTEPDOWN;
break;
// TODO: 2.3: Delete
case 15: //Bouncy FOF
CONS_Alert(CONS_WARNING, M_GetText("Deprecated bouncy FOF sector type detected. Please use linedef type 76 instead.\n"));
break;
@ -6166,12 +6167,14 @@ static void P_ConvertBinarySectorTypes(void)
sectors[i].flags |= MSF_TRIGGERLINE_PLANE;
sectors[i].triggerer = TO_PLAYER;
break;
// TODO: 2.3: Delete
case 6: //Trigger linedef executor (Emerald check)
CONS_Alert(CONS_WARNING, M_GetText("Deprecated emerald check sector type detected. Please use linedef types 337-339 instead.\n"));
sectors[i].triggertag = tag;
sectors[i].flags &= ~MSF_TRIGGERLINE_PLANE;
sectors[i].triggerer = TO_PLAYEREMERALDS;
break;
// TODO: 2.3: Delete
case 7: //Trigger linedef executor (NiGHTS mare)
CONS_Alert(CONS_WARNING, M_GetText("Deprecated NiGHTS mare sector type detected. Please use linedef types 340-342 instead.\n"));
sectors[i].triggertag = tag;
@ -6181,9 +6184,11 @@ static void P_ConvertBinarySectorTypes(void)
case 8: //Check for linedef executor on FOFs
sectors[i].flags |= MSF_TRIGGERLINE_MOBJ;
break;
// TODO: 2.3: Delete
case 10: //Special stage time/spheres requirements
CONS_Alert(CONS_WARNING, M_GetText("Deprecated sector type for special stage requirements detected. Please use the SpecialStageTime and SpecialStageSpheres level header options instead.\n"));
break;
// TODO: 2.3: Delete
case 11: //Custom global gravity
CONS_Alert(CONS_WARNING, M_GetText("Deprecated sector type for global gravity detected. Please use the Gravity level header option instead.\n"));
break;
@ -6822,7 +6827,7 @@ static void P_ConvertBinaryThingTypes(void)
default:
break;
}
// Clear binary thing height hacks, to prevent interfering with UDMF-only flags
mapthings[i].options &= 0xF;
}

View file

@ -2661,7 +2661,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
titlemapcameraref = altview;
else if (!mo->player->awayviewtics || mo->player->awayviewmobj != altview) {
P_SetTarget(&mo->player->awayviewmobj, altview);
if (mo->player == &players[displayplayer])
P_ResetCamera(mo->player, &camera); // reset p1 camera on p1 getting an awayviewmobj
else if (splitscreen && mo->player == &players[secondarydisplayplayer])
@ -4178,6 +4178,7 @@ sector_t *P_MobjTouchingSectorSpecial(mobj_t *mo, INT32 section, INT32 number)
return NULL;
}
// TODO: 2.3: Delete
// Deprecated in favor of P_MobjTouchingSectorSpecial
// Kept for Lua backwards compatibility only
sector_t *P_ThingOnSpecial3DFloor(mobj_t *mo)
@ -6229,6 +6230,7 @@ void P_SpawnSpecials(boolean fromnetsave)
sector->flags |= MSF_TRIGGERSPECIAL_TOUCH;
}
// TODO: 2.3: Delete everything below
// Process deprecated binary sector specials
if (udmf || !sector->special)
continue;

View file

@ -2775,6 +2775,7 @@ static void P_CheckBouncySectors(player_t *player)
if (!(rover->fofflags & FOF_EXISTS))
continue; // FOFs should not be bouncy if they don't even "exist"
// TODO: 2.3: Delete
// Handle deprecated bouncy FOF sector type
if (!udmf && GETSECSPECIAL(rover->master->frontsector->special, 1) == 15)
{
@ -11390,7 +11391,7 @@ static void P_DoTailsOverlay(player_t *player, mobj_t *tails)
tails->y = player->mo->y + P_ReturnThrustY(tails, tails->angle, FixedMul(backwards, tails->scale));
tails->z = player->mo->z + zoffs;
P_SetThingPosition(tails);
if (player->mo->flags2 & MF2_SHADOW)
tails->flags2 |= MF2_SHADOW;
else
@ -11606,7 +11607,7 @@ void P_PlayerThink(player_t *player)
P_SetTarget(&player->awayviewmobj, NULL); // remove awayviewmobj asap if invalid
player->awayviewtics = 1; // reset to one, the below code will immediately set it to zero
}
if (player->awayviewtics && player->awayviewtics != -1)
{
player->awayviewtics--;
@ -12278,11 +12279,11 @@ void P_PlayerThink(player_t *player)
if (!(player->stronganim))
player->stronganim = player->panim;
else if (player->panim != player->stronganim)
player->powers[pw_strong] = STR_NONE;
}
player->powers[pw_strong] = STR_NONE;
}
else if (player->stronganim)
player->stronganim = 0;
//pw_super acts as a timer now
if (player->powers[pw_super]
&& (player->mo->state < &states[S_PLAY_SUPER_TRANS1]
@ -12389,7 +12390,7 @@ void P_PlayerThink(player_t *player)
if (player->jumpfactor < FixedMul(skins[player->skin].jumpfactor, 5*FRACUNIT/4)) // Boost jump height.
player->jumpfactor += FRACUNIT/300;
if ((player->charflags & SF_MACHINE) && (!(player->powers[pw_strong] == STR_METAL)))
if ((player->charflags & SF_MACHINE) && (!(player->powers[pw_strong] == STR_METAL)))
player->powers[pw_strong] = STR_METAL;
}