This commit is contained in:
Rachael Alexanderson 2017-05-02 03:13:40 -04:00
commit a59336908c
14 changed files with 446 additions and 12 deletions

View file

@ -88,6 +88,7 @@ struct MapinfoEdMapItem
// These are for error reporting. We must store the file information because it's no longer available when these items get resolved.
FString filename;
int linenum;
bool noskillflags;
};
typedef TMap<int, MapinfoEdMapItem> IdMap;
@ -184,12 +185,18 @@ void FMapInfoParser::ParseDoomEdNums()
}
memset(editem.args, 0, sizeof(editem.args));
editem.argsdefined = 0;
editem.noskillflags = false;
int minargs = 0;
int maxargs = 5;
FString specialname;
if (sc.CheckString(","))
{
if (sc.CheckString("noskillflags"))
{
editem.noskillflags = true;
if (!sc.CheckString(",")) goto noargs;
}
editem.argsdefined = 5; // mark args as used - if this is done we need to prevent assignment of map args in P_SpawnMapThing.
if (editem.special < 0) editem.special = 0;
if (!sc.CheckNumber())
@ -238,6 +245,7 @@ void FMapInfoParser::ParseDoomEdNums()
error++;
}
}
noargs:
DoomEdFromMapinfo.Insert(ednum, editem);
}
else
@ -275,6 +283,7 @@ void InitActorNumsFromMapinfo()
ent.Type = cls;
ent.Special = pair->Value.special;
ent.ArgsDefined = pair->Value.argsdefined;
ent.NoSkillFlags = pair->Value.noskillflags;
memcpy(ent.Args, pair->Value.args, sizeof(ent.Args));
DoomEdMap.Insert(pair->Key, ent);
}

View file

@ -358,6 +358,7 @@ struct FDoomEdEntry
PClassActor *Type;
short Special;
signed char ArgsDefined;
bool NoSkillFlags;
int Args[5];
};

View file

@ -5817,7 +5817,7 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
}
mask = G_SkillProperty(SKILLP_SpawnFilter);
if (!(mthing->SkillFilter & mask))
if (!(mthing->SkillFilter & mask) && !mentry->NoSkillFlags)
{
return NULL;
}

View file

@ -8481,6 +8481,12 @@ FxExpression *FxActionSpecialCall::Resolve(FCompileContext& ctx)
if (ArgList[i]->ValueType->GetRegType() == REGT_FLOAT /* lax */)
{
ArgList[i] = new FxIntCast(ArgList[i], ctx.FromDecorate);
ArgList[i] = ArgList[i]->Resolve(ctx);
if (ArgList[i] == nullptr)
{
delete this;
return nullptr;
}
}
else
{

View file

@ -171,11 +171,13 @@ void FCanvasTexture::Unload ()
if (Canvas != NULL)
{
delete Canvas;
Canvas = nullptr;
}
if (CanvasBgra != NULL)
{
delete CanvasBgra;
CanvasBgra = nullptr;
}
FTexture::Unload();

View file

@ -100,10 +100,22 @@ IWad
BannerColors = "ff ff 00", "00 c0 00"
}
IWad
{
Name = "Strife: Veteran Edition"
Autoname = "strife.veteran"
Game = "Strife"
Config = "Strife"
Mapinfo = "mapinfo/strife.txt"
MustContain = "MAP35", "I_RELB", "FXAA_F"
BannerColors = "f0 f0 f0", "6b 3c 18"
Required = "Strife: Quest for the Sigil"
}
IWad
{
Name = "Strife: Quest for the Sigil"
Autoname = "strife"
Autoname = "strife.strife"
Game = "Strife"
Config = "Strife"
Mapinfo = "mapinfo/strife.txt"
@ -418,4 +430,5 @@ Names
"hacx2.wad"
"square1.pk3"
"delaweare.wad"
"sve.wad"
}

View file

@ -2671,7 +2671,7 @@ GLTEXMNU_SORTDRAWLIST = "Sort draw lists by texture";
// Dynamic Light Options
GLLIGHTMNU_TITLE = "DYNAMIC LIGHTS";
GLLIGHTMNU_LIGHTSENABLED = "Dynamic Lights enabled";
GLLIGHTMNU_LIGHTSENABLED = "Dynamic Lights (OpenGL)";
GLLIGHTMNU_LIGHTDEFS = "Enable light definitions";
GLLIGHTMNU_CLIPLIGHTS = "Clip lights";
GLLIGHTMNU_LIGHTSPRITES = "Lights affect sprites";
@ -2806,5 +2806,14 @@ TCMNU_TRUECOLOR = "True color output";
TCMNU_MINFILTER = "Linear filter when downscaling";
TCMNU_MAGFILTER = "Linear filter when upscaling";
TCMNU_MIPMAP = "Use mipmapped textures";
TCMNU_DYNLIGHTS = "Dynamic lights";
TCMNU_DYNLIGHTS = "Dynamic lights (Software)";
// SVE strings:
TAG_TALISMANRED = "Red Talisman";
TAG_TALISMANGREEN = "Green Talisman";
TAG_TALISMANBLUE = "Blue Talisman";
MSG_TALISMANRED = "You have a feeling that it wasn't to be touched...";
MSG_TALISMANGREEN = "Whatever it is, it doesn't belong in this world...";
MSG_TALISMANBLUE = "It must do something...";
MSG_TALISMANPOWER = "You have super strength!";

View file

@ -323,4 +323,12 @@ conversationids
341 = QuestItem30
342 = QuestItem31
343 = SlideshowStarter
345 = SVEBlueChalice
346 = SVEFlagSpotRed
347 = SVEFlagSpotBlue
348 = SVETalismanRed
349 = SVETalismanGreen
350 = SVETalismanBlue
351 = SVEOpenDoor225
}

View file

@ -324,6 +324,30 @@ DoomEdNums
3004 = Peasant1
3005 = Crusader
3006 = Sentinel
5080 = none // CTC stuff
5081 = none
5130 = SVEFlagSpotBlue
5131 = SVEFlagSpotRed
7957 = none // AltLight for lightmapped geometry.
7958 = SVELight7958, noskillflags
7959 = SVELight7959, noskillflags
7960 = SVELight7960, noskillflags
7961 = SVELight7961, noskillflags
7962 = SVELight7962, noskillflags
7963 = none
7964 = SVELight7964, noskillflags
7965 = SVELight7965, noskillflags
7966 = SVETalismanRed
7967 = SVETalismanGreen
7968 = SVETalismanBlue
7969 = none // Bloom threshold.
7970 = SVEBlueChalice
7971 = SVELight7971, noskillflags
7972 = SVELight7972, noskillflags
7973 = SVELight7973, noskillflags
7974 = SVELight7974, noskillflags
7975 = SVEOreSpawner
}
SpawnNums
@ -861,6 +885,38 @@ map MAP34 "AREA 3: Movement Base"
noallies
}
map MAP35 "AREA 35: Factory: Production"
{
next = "MAP01"
sky1 = "SKYMNT01"
music = "D_TRIBAL"
cluster = 1
}
map MAP36 "AREA 36: Castle Clash"
{
next = "MAP37"
sky1 = "SKYMNT01"
music = "D_MARCH"
cluster = 3
}
map MAP37 "AREA 37: Killing Grounds"
{
next = "MAP38"
sky1 = "SKYMNT01"
music = "D_STRIKE"
cluster = 3
}
map MAP38 "AREA 38: Ordered Chaos"
{
next = "MAP36"
sky1 = "SKYMNT01"
music = "D_TRIBAL"
cluster = 3
}
cluster 1
{
hub

View file

@ -706,7 +706,6 @@ OptionMenu "TrueColorOptions"
Option "$TCMNU_MINFILTER", "r_minfilter", "OnOff"
Option "$TCMNU_MAGFILTER", "r_magfilter", "OnOff"
Option "$TCMNU_MIPMAP", "r_mipmap", "OnOff"
Option "$TCMNU_DYNLIGHTS", "r_dynlights", "OnOff"
}
OptionMenu "SWROptions"
@ -2094,7 +2093,8 @@ OptionMenu "GLTextureGLOptions"
OptionMenu "GLLightOptions"
{
Title "$GLLIGHTMNU_TITLE"
Option "$GLLIGHTMNU_LIGHTSENABLED", gl_lights, "YesNo"
Option "$TCMNU_DYNLIGHTS", "r_dynlights", "OnOff"
Option "$GLLIGHTMNU_LIGHTSENABLED", gl_lights, "OnOff"
Option "$GLLIGHTMNU_LIGHTDEFS", gl_attachedlights, "YesNo"
Option "$GLLIGHTMNU_CLIPLIGHTS", gl_lights_checkside, "YesNo"
Option "$GLLIGHTMNU_LIGHTSPRITES", gl_light_sprites, "YesNo"

View file

@ -247,6 +247,8 @@ version "2.5"
#include "zscript/strife/weapongrenade.txt"
#include "zscript/strife/weaponmauler.txt"
#include "zscript/strife/sigil.txt"
#include "zscript/strife/svestuff.txt"
#include "zscript/strife/svelights.txt"
#include "zscript/chex/chexmonsters.txt"
#include "zscript/chex/chexkeys.txt"

View file

@ -0,0 +1,129 @@
// This turns the helper things for creating lightmaps in SVE into actual light sources
class SVELight : PointLight
{
override void BeginPlay()
{
Super.BeginPlay();
if (!bSpawnCeiling) AddZ(height);
}
}
class SVELight7958 : SVELight
{
Default
{
+SPAWNCEILING
+DYNAMICLIGHT.ATTENUATE
Height 6;
Args 255,255,224,128;
}
}
class SVELight7959 : SVELight
{
Default
{
+DYNAMICLIGHT.ATTENUATE
Height 6;
Args 255,255,224,128;
}
}
class SVELight7960 : SVELight
{
Default
{
+SPAWNCEILING
+DYNAMICLIGHT.ATTENUATE
Height 6;
Args 255,255,64,100;
}
}
class SVELight7961 : SVELight
{
Default
{
+DYNAMICLIGHT.ATTENUATE
Height 6;
Args 255,255,64,100;
}
}
class SVELight7962 : SVELight
{
Default
{
+DYNAMICLIGHT.ATTENUATE
Height 8;
Args 255,64,16,128;
}
}
// 7963 has intentionally been omitted
class SVELight7964 : SVELight
{
Default
{
+SPAWNCEILING
+DYNAMICLIGHT.ATTENUATE
Height 64;
Args 200,200,170,160;
}
}
class SVELight7965 : SVELight
{
Default
{
+DYNAMICLIGHT.ATTENUATE
Height 64;
Args 200,200,170,160;
}
}
class SVELight7971 : SVELight
{
Default
{
+DYNAMICLIGHT.ATTENUATE
Height 80;
Args 248,248,224,144;
}
}
class SVELight7972 : SVELight
{
Default
{
+SPAWNCEILING
+DYNAMICLIGHT.ATTENUATE
Height 24;
Args 168,175,255,128;
}
}
class SVELight7973 : SVELight
{
Default
{
+DYNAMICLIGHT.ATTENUATE
Height 80;
Args 112,112,112,100;
}
}
class SVELight7974 : SVELight
{
Default
{
+DYNAMICLIGHT.ATTENUATE
Height 80;
Args 100,100,90,100;
}
}

View file

@ -0,0 +1,191 @@
// CTC flag spots. They are not functional and only here so that something gets spawned for them.
class SVEFlagSpotRed : Inventory
{
States
{
Spawn:
FLGR A 1 BRIGHT;
FLGR A 0 BRIGHT; // A_FlagStandSpawn
FLGR A 1 BRIGHT; // A_FlagStandCheck
Wait;
}
}
class SVEFlagSpotBlue : Inventory
{
States
{
Spawn:
FLGB A 1 BRIGHT;
FLGB A 0 BRIGHT; // A_FlagStandSpawn
FLGB A 1 BRIGHT; // A_FlagStandCheck
Wait;
}
}
class SVEBlueChalice : Inventory
{
Default
{
+DROPPED
+FLOORCLIP
+INVENTORY.INVBAR
Radius 10;
Height 16;
Tag "$TAG_OFFERINGCHALICE";
Inventory.Icon "I_RELB";
Inventory.PickupMessage "$TXT_OFFERINGCHALICE";
}
States
{
Spawn:
RELB A -1 BRIGHT;
Stop;
}
}
class SVETalismanPowerup : Inventory
{
}
class SVETalismanRed : Inventory
{
Default
{
+DROPPED
+FLOORCLIP
+INVENTORY.INVBAR
Radius 10;
Height 16;
Inventory.MaxAmount 1;
Inventory.Icon "I_FLGR";
Tag "$TAG_TALISMANRED";
Inventory.PickupMessage "$MSG_TALISMANRED";
}
States
{
Spawn:
FLGR A -1 BRIGHT;
Stop;
}
override bool TryPickup (in out Actor toucher)
{
let useok = Super.TryPickup (toucher);
if (useok)
{
if (toucher.FindInventory("SVETalismanRed") &&
toucher.FindInventory("SVETalismanGreen") &&
toucher.FindInventory("SVETalismanBlue"))
{
toucher.A_Print("$MSG_TALISMANPOWER");
GiveInventoryType("SVETalismanPowerup");
}
}
return useok;
}
}
class SVETalismanBlue : SVETalismanRed
{
Default
{
+INVENTORY.INVBAR
Inventory.Icon "I_FLGB";
Tag "$TAG_TALISMANBLUE";
Inventory.PickupMessage "$MSG_TALISMANBLUE";
}
States
{
Spawn:
FLGB A -1 BRIGHT;
Stop;
}
}
class SVETalismanGreen : SVETalismanRed
{
Default
{
+INVENTORY.INVBAR
Inventory.Icon "I_FLGG";
Tag "$TAG_TALISMANGREEN";
Inventory.PickupMessage "$MSG_TALISMANGREEN";
}
States
{
Spawn:
FLGG A -1 BRIGHT;
Stop;
}
}
class SVEOreSpawner : Actor
{
Default
{
+NOSECTOR
}
States
{
Spawn:
TNT1 A 175 A_OreSpawner;
loop;
}
//
// A_OreSpawner
//
// [SVE] svillarreal
//
void A_OreSpawner()
{
if(deathmatch) return;
bool inrange = false;
for(int i = 0; i < MAXPLAYERS; i++)
{
if(!playeringame[i])
continue;
if(Distance2D(players[i].mo) < 2048)
{
inrange = true;
break;
}
}
if(!inrange) return;
let it = ThinkerIterator.Create("DegninOre");
Thinker ac;
int numores = 0;
while (ac = it.Next())
{
if (++numores == 3) return;
}
Spawn("DegninOre", Pos);
}
}
class SVEOpenDoor225 : DummyStrifeItem
{
override bool TryPickup (in out Actor toucher)
{
Door_Open(225, 16);
GoAwayAndDie ();
return true;
}
override bool SpecialDropAction (Actor dropper)
{
Door_Open(225, 16);
Destroy ();
return true;
}
}

View file

@ -40,13 +40,21 @@ class PunchDagger : StrifeWeapon
action void A_JabDagger ()
{
FTranslatedLineTarget t;
int power = MIN(10, stamina / 10);
int damage = (random[JabDagger]() % (power + 8)) * (power + 2);
if (FindInventory("PowerStrength"))
int damage;
if (FindInventory("SVETalismanPowerup"))
{
damage *= 10;
damage = 1000;
}
else
{
int power = MIN(10, stamina / 10);
damage = (random[JabDagger]() % (power + 8)) * (power + 2);
if (FindInventory("PowerStrength"))
{
damage *= 10;
}
}
double angle = angle + random2[JabDagger]() * (5.625 / 256);