Adapt various thing types for UDMF

This commit is contained in:
MascaraSnake 2021-12-28 16:38:52 +01:00
parent 53931727bd
commit 79c3197de2
5 changed files with 236 additions and 10 deletions

View file

@ -4265,6 +4265,12 @@ udmf
width = 24; width = 24;
height = 24; height = 24;
sprite = "RINGA0"; sprite = "RINGA0";
arg0
{
title = "Float?";
type = 11;
enum = "yesno";
}
300 300
{ {
@ -4380,6 +4386,12 @@ udmf
sprite = "TOKEA0"; sprite = "TOKEA0";
width = 16; width = 16;
height = 32; height = 32;
arg0
{
title = "Float?";
type = 11;
enum = "yesno";
}
} }
313 313
{ {
@ -4420,11 +4432,23 @@ udmf
{ {
title = "Emerald Hunt Location"; title = "Emerald Hunt Location";
sprite = "SHRDA0"; sprite = "SHRDA0";
arg0
{
title = "Float?";
type = 11;
enum = "yesno";
}
} }
321 321
{ {
title = "Match Chaos Emerald Spawn"; title = "Match Chaos Emerald Spawn";
sprite = "CEMGA0"; sprite = "CEMGA0";
arg0
{
title = "Float?";
type = 11;
enum = "yesno";
}
} }
322 322
{ {
@ -4432,6 +4456,12 @@ udmf
sprite = "EMBMA0"; sprite = "EMBMA0";
width = 16; width = 16;
height = 30; height = 30;
arg0
{
title = "Float?";
type = 11;
enum = "yesno";
}
} }
} }
@ -4661,6 +4691,12 @@ udmf
{ {
title = "Order"; title = "Order";
} }
arg1
{
title = "Respawn at center?";
type = 11;
enum = "noyes";
}
} }
520 520
{ {
@ -4668,6 +4704,12 @@ udmf
sprite = "SPHRD0"; sprite = "SPHRD0";
width = 16; width = 16;
height = 24; height = 24;
arg0
{
title = "Float?";
type = 11;
enum = "yesno";
}
} }
521 521
{ {
@ -4675,6 +4717,12 @@ udmf
sprite = "SPIKA0"; sprite = "SPIKA0";
width = 12; width = 12;
height = 8; height = 8;
arg0
{
title = "Float?";
type = 11;
enum = "yesno";
}
} }
522 522
{ {
@ -4791,6 +4839,12 @@ udmf
title = "Gas Jet"; title = "Gas Jet";
sprite = "STEMD0"; sprite = "STEMD0";
width = 32; width = 32;
arg0
{
title = "Play sound?";
type = 11;
enum = "noyes";
}
} }
542 542
{ {
@ -4889,6 +4943,12 @@ udmf
sprite = "SSWYD2D8"; sprite = "SSWYD2D8";
width = 16; width = 16;
height = 32; height = 32;
arg0
{
title = "Float?";
type = 11;
enum = "yesno";
}
} }
559 559
{ {
@ -4897,6 +4957,12 @@ udmf
sprite = "SSWRD2D8"; sprite = "SSWRD2D8";
width = 16; width = 16;
height = 32; height = 32;
arg0
{
title = "Float?";
type = 11;
enum = "yesno";
}
} }
560 560
{ {
@ -4905,6 +4971,12 @@ udmf
sprite = "SSWBD2D8"; sprite = "SSWBD2D8";
width = 16; width = 16;
height = 32; height = 32;
arg0
{
title = "Float?";
type = 11;
enum = "yesno";
}
} }
1134 1134
{ {
@ -4927,6 +4999,12 @@ udmf
sprite = "BSTYA0"; sprite = "BSTYA0";
width = 28; width = 28;
height = 2; height = 2;
arg0
{
title = "Force spin?";
type = 11;
enum = "noyes";
}
} }
545 545
{ {
@ -4935,6 +5013,12 @@ udmf
sprite = "BSTRA0"; sprite = "BSTRA0";
width = 28; width = 28;
height = 2; height = 2;
arg0
{
title = "Force spin?";
type = 11;
enum = "noyes";
}
} }
} }
@ -5572,6 +5656,12 @@ udmf
type = 11; type = 11;
enum = "pushablebehavior"; enum = "pushablebehavior";
} }
arg1
{
title = "Solid gold?";
type = 11;
enum = "noyes";
}
} }
1103 1103
{ {
@ -6049,6 +6139,17 @@ udmf
sprite = "EGR1A1"; sprite = "EGR1A1";
width = 20; width = 20;
height = 72; height = 72;
arg0
{
title = "Movement";
type = 11;
enum
{
0 = "None";
1 = "Right";
2 = "Left";
}
}
} }
1128 1128
{ {
@ -6265,6 +6366,12 @@ udmf
sprite = "SALDARAL"; sprite = "SALDARAL";
width = 96; width = 96;
height = 160; height = 160;
arg0
{
title = "Allow non-minecart players?";
type = 11;
enum = "noyes";
}
} }
1222 1222
{ {
@ -6293,6 +6400,16 @@ udmf
sprite = "internal:zoom"; sprite = "internal:zoom";
width = 8; width = 8;
height = 16; height = 16;
arg0
{
title = "Type";
type = 11;
enum
{
0 = "Disable";
1 = "Enable";
}
}
} }
1230 1230
{ {
@ -6391,6 +6508,12 @@ udmf
sprite = "PUMIA1A5"; sprite = "PUMIA1A5";
width = 30; width = 30;
height = 60; height = 60;
arg0
{
title = "Buoyant?";
type = 11;
enum = "yesno";
}
} }
1306 1306
{ {
@ -6939,6 +7062,12 @@ udmf
sprite = "SPHRA0"; sprite = "SPHRA0";
width = 16; width = 16;
height = 24; height = 24;
arg0
{
title = "Float?";
type = 11;
enum = "yesno";
}
} }
1707 1707
{ {
@ -7051,6 +7180,12 @@ udmf
sprite = "COINA0"; sprite = "COINA0";
width = 16; width = 16;
height = 24; height = 24;
arg0
{
title = "Float?";
type = 11;
enum = "yesno";
}
} }
1801 1801
{ {

View file

@ -1437,7 +1437,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
// Misc touchables // // Misc touchables //
// *************** // // *************** //
case MT_STARPOST: case MT_STARPOST:
P_TouchStarPost(special, player, special->spawnpoint && (special->spawnpoint->options & MTF_OBJECTSPECIAL)); P_TouchStarPost(special, player, special->spawnpoint && special->spawnpoint->args[1]);
return; return;
case MT_FAKEMOBILE: case MT_FAKEMOBILE:

View file

@ -8590,9 +8590,9 @@ static boolean P_EggRobo1Think(mobj_t *mobj)
{ {
fixed_t basex = mobj->cusval, basey = mobj->cvmem; fixed_t basex = mobj->cusval, basey = mobj->cvmem;
if (mobj->spawnpoint && mobj->spawnpoint->options & (MTF_AMBUSH|MTF_OBJECTSPECIAL)) if (mobj->spawnpoint && mobj->spawnpoint->args[0] != TMED_NONE)
{ {
angle_t sideang = mobj->movedir + ((mobj->spawnpoint->options & MTF_AMBUSH) ? ANGLE_90 : -ANGLE_90); angle_t sideang = mobj->movedir + ((mobj->spawnpoint->args[0] == TMED_LEFT) ? ANGLE_90 : -ANGLE_90);
fixed_t oscillate = FixedMul(FINESINE(((leveltime * ANG1) >> (ANGLETOFINESHIFT + 2)) & FINEMASK), 250*mobj->scale); fixed_t oscillate = FixedMul(FINESINE(((leveltime * ANG1) >> (ANGLETOFINESHIFT + 2)) & FINEMASK), 250*mobj->scale);
basex += P_ReturnThrustX(mobj, sideang, oscillate); basex += P_ReturnThrustX(mobj, sideang, oscillate);
basey += P_ReturnThrustY(mobj, sideang, oscillate); basey += P_ReturnThrustY(mobj, sideang, oscillate);
@ -11775,14 +11775,14 @@ fixed_t P_GetMapThingSpawnHeight(const mobjtype_t mobjtype, const mapthing_t* mt
dz = 288*FRACUNIT; dz = 288*FRACUNIT;
break; break;
// Horizontal springs, may float additional units with MTF_AMBUSH. // Horizontal springs, float additional units unless args[0] is set.
case MT_YELLOWHORIZ: case MT_YELLOWHORIZ:
case MT_REDHORIZ: case MT_REDHORIZ:
case MT_BLUEHORIZ: case MT_BLUEHORIZ:
offset += mthing->options & MTF_AMBUSH ? 16*FRACUNIT : 0; offset += mthing->args[0] ? 0 : 16*FRACUNIT;
break; break;
// Ring-like items, may float additional units with MTF_AMBUSH. // Ring-like items, float additional units unless args[0] is set.
case MT_SPIKEBALL: case MT_SPIKEBALL:
case MT_EMERHUNT: case MT_EMERHUNT:
case MT_EMERALDSPAWN: case MT_EMERALDSPAWN:
@ -11796,13 +11796,13 @@ fixed_t P_GetMapThingSpawnHeight(const mobjtype_t mobjtype, const mapthing_t* mt
case MT_BOMBSPHERE: case MT_BOMBSPHERE:
case MT_NIGHTSCHIP: case MT_NIGHTSCHIP:
case MT_NIGHTSSTAR: case MT_NIGHTSSTAR:
offset += mthing->options & MTF_AMBUSH ? 24*FRACUNIT : 0; offset += mthing->args[0] ? 0 : 24*FRACUNIT;
break; break;
// Remaining objects. // Remaining objects.
default: default:
if (P_WeaponOrPanel(mobjtype)) if (P_WeaponOrPanel(mobjtype))
offset += mthing->options & MTF_AMBUSH ? 24*FRACUNIT : 0; offset += mthing->args[0] ? 0 : 24*FRACUNIT;
} }
if (!(dz + offset)) // Snap to the surfaces when there's no offset set. if (!(dz + offset)) // Snap to the surfaces when there's no offset set.
@ -12717,7 +12717,7 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
break; break;
} }
case MT_EGGSTATUE: case MT_EGGSTATUE:
if (mthing->options & MTF_EXTRA) if (mthing->args[1])
{ {
mobj->color = SKINCOLOR_GOLD; mobj->color = SKINCOLOR_GOLD;
mobj->colorized = true; mobj->colorized = true;
@ -13096,6 +13096,22 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
if (mthing->args[1]) if (mthing->args[1])
mobj->flags2 |= MF2_AMBUSH; mobj->flags2 |= MF2_AMBUSH;
break; break;
case MT_STEAM:
if (mthing->args[0])
mobj->flags2 |= MF2_AMBUSH;
break;
case MT_SALOONDOORCENTER:
if (mthing->args[0])
mobj->flags2 |= MF2_AMBUSH;
break;
case MT_MINECARTSWITCHPOINT:
if (mthing->args[0])
mobj->flags2 |= MF2_AMBUSH;
break;
case MT_ROLLOUTSPAWN:
if (mthing->args[0])
mobj->flags2 |= MF2_AMBUSH;
break;
default: default:
break; break;
} }
@ -13136,6 +13152,12 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
break; break;
} }
} }
if (mobj->flags & MF_SPRING && mobj->info->painchance == 3)
{
if (mthing->args[0])
mobj->flags2 |= MF2_AMBUSH;
}
return true; return true;
} }
@ -13171,7 +13193,12 @@ static void P_SetAmbush(mobj_t *mobj)
mobj->type != MT_CACOLANTERN && mobj->type != MT_CACOLANTERN &&
mobj->type != MT_PIAN && mobj->type != MT_PIAN &&
mobj->type != MT_EGGGUARD && mobj->type != MT_EGGGUARD &&
mobj->type != MT_STARPOST) mobj->type != MT_STEAM &&
mobj->type != MT_SALOONDOORCENTER &&
mobj->type != MT_MINECARTSWITCHPOINT &&
mobj->type != MT_ROLLOUTSPAWN &&
mobj->type != MT_STARPOST &&
!(mobj->flags & MF_SPRING && mobj->info->painchance == 3))
mobj->flags2 |= MF2_AMBUSH; mobj->flags2 |= MF2_AMBUSH;
} }

View file

@ -4914,6 +4914,8 @@ static void P_ConvertBinaryMap(void)
else else
mapthings[i].args[0] = TMP_NORMAL; mapthings[i].args[0] = TMP_NORMAL;
} }
if (mobjinfo[mobjtype].flags & MF_SPRING && mobjinfo[mobjtype].painchance == 3)
mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH);
} }
if (mapthings[i].type >= 1 && mapthings[i].type <= 35) //Player starts if (mapthings[i].type >= 1 && mapthings[i].type <= 35) //Player starts
@ -4996,6 +4998,32 @@ static void P_ConvertBinaryMap(void)
case 294: //Fang waypoint case 294: //Fang waypoint
mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH); mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH);
break; break;
case 300: //Ring
case 301: //Bounce ring
case 302: //Rail ring
case 303: //Infinity ring
case 304: //Automatic ring
case 305: //Explosion ring
case 306: //Scatter ring
case 307: //Grenade ring
case 308: //Red team ring
case 309: //Blue team ring
case 312: //Emerald token
case 320: //Emerald hunt location
case 321: //Match chaos emerald spawn
case 322: //Emblem
case 330: //Bounce ring panel
case 331: //Rail ring panel
case 332: //Automatic ring panel
case 333: //Explosion ring panel
case 334: //Scatter ring panel
case 335: //Grenade ring panel
case 520: //Bomb sphere
case 521: //Spikeball
case 1706: //Blue sphere
case 1800: //Coin
mapthings[i].args[0] = !(mapthings[i].options & MTF_AMBUSH);
break;
case 500: //Air bubble patch case 500: //Air bubble patch
mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH); mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH);
break; break;
@ -5009,6 +5037,7 @@ static void P_ConvertBinaryMap(void)
else else
// Old behavior if Parameter is 0; add 360 to the angle for each consecutive star post. // Old behavior if Parameter is 0; add 360 to the angle for each consecutive star post.
mapthings[i].args[0] = (mapthings[i].angle/360); mapthings[i].args[0] = (mapthings[i].angle/360);
mapthings[i].args[1] = !!(mapthings[i].options & MTF_OBJECTSPECIAL);
break; break;
case 522: //Wall spike case 522: //Wall spike
if (mapthings[i].options & MTF_OBJECTSPECIAL) if (mapthings[i].options & MTF_OBJECTSPECIAL)
@ -5039,6 +5068,9 @@ static void P_ConvertBinaryMap(void)
if (mapthings[i].options & MTF_AMBUSH) if (mapthings[i].options & MTF_AMBUSH)
mapthings[i].args[1] |= TMF_NODISTANCECHECK; mapthings[i].args[1] |= TMF_NODISTANCECHECK;
break; break;
case 541: //Gas jet
mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH);
break;
case 543: //Balloon case 543: //Balloon
if (mapthings[i].angle > 0) if (mapthings[i].angle > 0)
P_WriteConstant(((mapthings[i].angle - 1) % (numskincolors - 1)) + 1, &mapthings[i].stringargs[0]); P_WriteConstant(((mapthings[i].angle - 1) % (numskincolors - 1)) + 1, &mapthings[i].stringargs[0]);
@ -5052,6 +5084,11 @@ static void P_ConvertBinaryMap(void)
if (mapthings[i].options & MTF_AMBUSH) if (mapthings[i].options & MTF_AMBUSH)
mapthings[i].args[0] |= TMDS_ROTATEEXTRA; mapthings[i].args[0] |= TMDS_ROTATEEXTRA;
break; break;
case 558: //Horizontal yellow spring
case 559: //Horizontal red spring
case 560: //Horizontal blue spring
mapthings[i].args[0] = !(mapthings[i].options & MTF_AMBUSH);
break;
case 700: //Water ambience A case 700: //Water ambience A
case 701: //Water ambience A case 701: //Water ambience A
case 702: //Water ambience A case 702: //Water ambience A
@ -5174,6 +5211,9 @@ static void P_ConvertBinaryMap(void)
case 1011: //Stalagmite (DSZ2) case 1011: //Stalagmite (DSZ2)
mapthings[i].args[0] = !!(mapthings[i].options & MTF_OBJECTSPECIAL); mapthings[i].args[0] = !!(mapthings[i].options & MTF_OBJECTSPECIAL);
break; break;
case 1102: //Eggman Statue
mapthings[i].args[1] = !!(mapthings[i].options & MTF_EXTRA);
break;
case 1104: //Mace spawnpoint case 1104: //Mace spawnpoint
case 1105: //Chain with maces spawnpoint case 1105: //Chain with maces spawnpoint
case 1106: //Chained spring spawnpoint case 1106: //Chained spring spawnpoint
@ -5238,6 +5278,14 @@ static void P_ConvertBinaryMap(void)
if (mapthings[i].options & MTF_EXTRA) if (mapthings[i].options & MTF_EXTRA)
mapthings[i].args[0] |= TMFH_CORONA; mapthings[i].args[0] |= TMFH_CORONA;
break; break;
case 1127: //Spectator EggRobo
if (mapthings[i].options & MTF_AMBUSH)
mapthings[i].args[0] = TMED_LEFT;
else if (mapthings[i].options & MTF_OBJECTSPECIAL)
mapthings[i].args[0] = TMED_RIGHT;
else
mapthings[i].args[0] = TMED_NONE;
break;
case 1200: //Tumbleweed (Big) case 1200: //Tumbleweed (Big)
case 1201: //Tumbleweed (Small) case 1201: //Tumbleweed (Small)
mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH); mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH);
@ -5259,6 +5307,12 @@ static void P_ConvertBinaryMap(void)
P_WriteConstant(MT_ROCKCRUMBLE1 + (sides[lines[j].sidenum[0]].rowoffset >> FRACBITS), &mapthings[i].stringargs[0]); P_WriteConstant(MT_ROCKCRUMBLE1 + (sides[lines[j].sidenum[0]].rowoffset >> FRACBITS), &mapthings[i].stringargs[0]);
break; break;
} }
case 1221: //Minecart saloon door
mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH);
break;
case 1229: //Minecart switch point
mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH);
break;
case 1300: //Flame jet (horizontal) case 1300: //Flame jet (horizontal)
case 1301: //Flame jet (vertical) case 1301: //Flame jet (vertical)
mapthings[i].args[0] = (mapthings[i].angle >> 13)*TICRATE/2; mapthings[i].args[0] = (mapthings[i].angle >> 13)*TICRATE/2;
@ -5269,6 +5323,9 @@ static void P_ConvertBinaryMap(void)
mapthings[i].args[0] = mapthings[i].angle; mapthings[i].args[0] = mapthings[i].angle;
mapthings[i].args[1] = !!(mapthings[i].options & MTF_AMBUSH); mapthings[i].args[1] = !!(mapthings[i].options & MTF_AMBUSH);
break; break;
case 1305: //Rollout Rock
mapthings[i].args[0] = !!(mapthings[i].options & MTF_AMBUSH);
break;
case 1700: //Axis case 1700: //Axis
mapthings[i].args[2] = mapthings[i].angle & 16383; mapthings[i].args[2] = mapthings[i].angle & 16383;
mapthings[i].args[3] = !!(mapthings[i].angle & 16384); mapthings[i].args[3] = !!(mapthings[i].angle & 16384);

View file

@ -96,6 +96,13 @@ typedef enum
TMP_CLASSIC = 3, TMP_CLASSIC = 3,
} textmappushabletype_t; } textmappushabletype_t;
typedef enum
{
TMED_NONE = 0,
TMED_RIGHT = 1,
TMED_LEFT = 2,
} textmapeggrobodirection_t;
//FOF flags //FOF flags
typedef enum typedef enum
{ {