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

View file

@ -1788,6 +1788,7 @@ static int lib_pMove(lua_State *L)
return 2; return 2;
} }
// TODO: 2.3: Delete
static int lib_pTeleportMove(lua_State *L) static int lib_pTeleportMove(lua_State *L)
{ {
mobj_t *ptmthing = tmthing; mobj_t *ptmthing = tmthing;
@ -2266,6 +2267,7 @@ static int lib_pMobjTouchingSectorSpecial(lua_State *L)
return 1; return 1;
} }
// TODO: 2.3: Delete
static int lib_pThingOnSpecial3DFloor(lua_State *L) static int lib_pThingOnSpecial3DFloor(lua_State *L)
{ {
mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); 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) if (lua_gettop(L) >= 3)
{ // For the third argument, only take a boolean or a number. { // For the third argument, only take a boolean or a number.
lua_settop(L, 3); lua_settop(L, 3);
// TODO: 2.3: Remove boolean option
if (lua_type(L, 3) == LUA_TBOOLEAN) if (lua_type(L, 3) == LUA_TBOOLEAN)
{ {
CONS_Alert(CONS_WARNING, 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; pivot[idx].x = (INT32)value;
else if (ikey == 2 || (key && fastcmp(key, "y"))) else if (ikey == 2 || (key && fastcmp(key, "y")))
pivot[idx].y = (INT32)value; pivot[idx].y = (INT32)value;
// TODO: 2.3: Delete
else if (ikey == 3 || (key && fastcmp(key, "rotaxis"))) else if (ikey == 3 || (key && fastcmp(key, "rotaxis")))
LUA_UsageWarning(L, "\"rotaxis\" is deprecated and will be removed.") LUA_UsageWarning(L, "\"rotaxis\" is deprecated and will be removed.")
else if (ikey == -1 && (key != NULL)) else if (ikey == -1 && (key != NULL))
@ -571,6 +572,7 @@ static int framepivot_get(lua_State *L)
lua_pushinteger(L, framepivot->x); lua_pushinteger(L, framepivot->x);
else if (fastcmp("y", field)) else if (fastcmp("y", field))
lua_pushinteger(L, framepivot->y); lua_pushinteger(L, framepivot->y);
// TODO: 2.3: Delete
else if (fastcmp("rotaxis", field)) else if (fastcmp("rotaxis", field))
{ {
LUA_UsageWarning(L, "\"rotaxis\" is deprecated and will be removed."); 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); framepivot->x = luaL_checkinteger(L, 3);
else if (fastcmp("y", field)) else if (fastcmp("y", field))
framepivot->y = luaL_checkinteger(L, 3); framepivot->y = luaL_checkinteger(L, 3);
// TODO: 2.3: delete
else if (fastcmp("rotaxis", field)) else if (fastcmp("rotaxis", field))
LUA_UsageWarning(L, "\"rotaxis\" is deprecated and will be removed.") LUA_UsageWarning(L, "\"rotaxis\" is deprecated and will be removed.")
else else

View file

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

View file

@ -125,6 +125,7 @@ static int lib_fixeddiv(lua_State *L)
return 1; return 1;
} }
// TODO: 2.3: Delete
static int lib_fixedrem(lua_State *L) static int lib_fixedrem(lua_State *L)
{ {
LUA_Deprecated(L, "FixedRem(a, b)", "a % b"); 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, ' '))) if ((id = strchr(id, ' ')))
id++; id++;
} }
} }
else if (fastcmp(param, "xpanningfloor")) else if (fastcmp(param, "xpanningfloor"))
sectors[i].floorxoffset = FLOAT_TO_FIXED(atof(val)); sectors[i].floorxoffset = FLOAT_TO_FIXED(atof(val));
else if (fastcmp(param, "ypanningfloor")) else if (fastcmp(param, "ypanningfloor"))
@ -6132,6 +6132,7 @@ static void P_ConvertBinarySectorTypes(void)
case 14: //Non-ramp sector case 14: //Non-ramp sector
sectors[i].specialflags |= SSF_NOSTEPDOWN; sectors[i].specialflags |= SSF_NOSTEPDOWN;
break; break;
// TODO: 2.3: Delete
case 15: //Bouncy FOF case 15: //Bouncy FOF
CONS_Alert(CONS_WARNING, M_GetText("Deprecated bouncy FOF sector type detected. Please use linedef type 76 instead.\n")); CONS_Alert(CONS_WARNING, M_GetText("Deprecated bouncy FOF sector type detected. Please use linedef type 76 instead.\n"));
break; break;
@ -6166,12 +6167,14 @@ static void P_ConvertBinarySectorTypes(void)
sectors[i].flags |= MSF_TRIGGERLINE_PLANE; sectors[i].flags |= MSF_TRIGGERLINE_PLANE;
sectors[i].triggerer = TO_PLAYER; sectors[i].triggerer = TO_PLAYER;
break; break;
// TODO: 2.3: Delete
case 6: //Trigger linedef executor (Emerald check) 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")); 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].triggertag = tag;
sectors[i].flags &= ~MSF_TRIGGERLINE_PLANE; sectors[i].flags &= ~MSF_TRIGGERLINE_PLANE;
sectors[i].triggerer = TO_PLAYEREMERALDS; sectors[i].triggerer = TO_PLAYEREMERALDS;
break; break;
// TODO: 2.3: Delete
case 7: //Trigger linedef executor (NiGHTS mare) 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")); CONS_Alert(CONS_WARNING, M_GetText("Deprecated NiGHTS mare sector type detected. Please use linedef types 340-342 instead.\n"));
sectors[i].triggertag = tag; sectors[i].triggertag = tag;
@ -6181,9 +6184,11 @@ static void P_ConvertBinarySectorTypes(void)
case 8: //Check for linedef executor on FOFs case 8: //Check for linedef executor on FOFs
sectors[i].flags |= MSF_TRIGGERLINE_MOBJ; sectors[i].flags |= MSF_TRIGGERLINE_MOBJ;
break; break;
// TODO: 2.3: Delete
case 10: //Special stage time/spheres requirements 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")); 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; break;
// TODO: 2.3: Delete
case 11: //Custom global gravity 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")); CONS_Alert(CONS_WARNING, M_GetText("Deprecated sector type for global gravity detected. Please use the Gravity level header option instead.\n"));
break; break;
@ -6822,7 +6827,7 @@ static void P_ConvertBinaryThingTypes(void)
default: default:
break; break;
} }
// Clear binary thing height hacks, to prevent interfering with UDMF-only flags // Clear binary thing height hacks, to prevent interfering with UDMF-only flags
mapthings[i].options &= 0xF; 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; titlemapcameraref = altview;
else if (!mo->player->awayviewtics || mo->player->awayviewmobj != altview) { else if (!mo->player->awayviewtics || mo->player->awayviewmobj != altview) {
P_SetTarget(&mo->player->awayviewmobj, altview); P_SetTarget(&mo->player->awayviewmobj, altview);
if (mo->player == &players[displayplayer]) if (mo->player == &players[displayplayer])
P_ResetCamera(mo->player, &camera); // reset p1 camera on p1 getting an awayviewmobj P_ResetCamera(mo->player, &camera); // reset p1 camera on p1 getting an awayviewmobj
else if (splitscreen && mo->player == &players[secondarydisplayplayer]) else if (splitscreen && mo->player == &players[secondarydisplayplayer])
@ -4178,6 +4178,7 @@ sector_t *P_MobjTouchingSectorSpecial(mobj_t *mo, INT32 section, INT32 number)
return NULL; return NULL;
} }
// TODO: 2.3: Delete
// Deprecated in favor of P_MobjTouchingSectorSpecial // Deprecated in favor of P_MobjTouchingSectorSpecial
// Kept for Lua backwards compatibility only // Kept for Lua backwards compatibility only
sector_t *P_ThingOnSpecial3DFloor(mobj_t *mo) sector_t *P_ThingOnSpecial3DFloor(mobj_t *mo)
@ -6229,6 +6230,7 @@ void P_SpawnSpecials(boolean fromnetsave)
sector->flags |= MSF_TRIGGERSPECIAL_TOUCH; sector->flags |= MSF_TRIGGERSPECIAL_TOUCH;
} }
// TODO: 2.3: Delete everything below
// Process deprecated binary sector specials // Process deprecated binary sector specials
if (udmf || !sector->special) if (udmf || !sector->special)
continue; continue;

View file

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