- added the needed properties for Doom64 colors and a little FraggleScript hack to test it with existing maps.
This commit is contained in:
parent
1d2ae53ecb
commit
dbbd797baa
8 changed files with 67 additions and 3 deletions
|
|
@ -3875,7 +3875,7 @@ void FParser::SF_SetColor(void)
|
|||
color.r=intvalue(t_argv[1]);
|
||||
color.g=intvalue(t_argv[2]);
|
||||
color.b=intvalue(t_argv[3]);
|
||||
color.a=0;
|
||||
color.a = (DFraggleThinker::ActiveThinker->setcolormaterial) ? 255 : 0;
|
||||
}
|
||||
else return;
|
||||
|
||||
|
|
@ -3883,7 +3883,16 @@ void FParser::SF_SetColor(void)
|
|||
FSSectorTagIterator itr(tagnum);
|
||||
while ((i = itr.Next()) >= 0)
|
||||
{
|
||||
level.sectors[i].ColorMap = GetSpecialLights (color, level.sectors[i].ColorMap->Fade, 0);
|
||||
if (!DFraggleThinker::ActiveThinker->setcolormaterial)
|
||||
level.sectors[i].ColorMap = GetSpecialLights(color, level.sectors[i].ColorMap->Fade, 0);
|
||||
else
|
||||
{
|
||||
// little hack for testing the D64 color stuff.
|
||||
for (int j = 0; j < 4; j++) level.sectors[i].SpecialColors[j] = color;
|
||||
// simulates 'nocoloredspritelighting' settings.
|
||||
int v = (color.r + color.g + color.b) / 3;
|
||||
level.sectors[i].SpecialColors[4] = (255 + v + v) / 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,15 +73,18 @@ struct FFsOptions : public FOptionalMapinfoData
|
|||
{
|
||||
identifier = "fragglescript";
|
||||
nocheckposition = false;
|
||||
setcolormaterial = false;
|
||||
}
|
||||
virtual FOptionalMapinfoData *Clone() const
|
||||
{
|
||||
FFsOptions *newopt = new FFsOptions;
|
||||
newopt->identifier = identifier;
|
||||
newopt->nocheckposition = nocheckposition;
|
||||
newopt->setcolormaterial = setcolormaterial;
|
||||
return newopt;
|
||||
}
|
||||
bool nocheckposition;
|
||||
bool setcolormaterial;
|
||||
};
|
||||
|
||||
DEFINE_MAP_OPTION(fs_nocheckposition, false)
|
||||
|
|
@ -99,6 +102,21 @@ DEFINE_MAP_OPTION(fs_nocheckposition, false)
|
|||
}
|
||||
}
|
||||
|
||||
DEFINE_MAP_OPTION(fs_setcolormaterial, false)
|
||||
{
|
||||
FFsOptions *opt = info->GetOptData<FFsOptions>("fragglescript");
|
||||
|
||||
if (parse.CheckAssign())
|
||||
{
|
||||
parse.sc.MustGetNumber();
|
||||
opt->setcolormaterial = !!parse.sc.Number;
|
||||
}
|
||||
else
|
||||
{
|
||||
opt->setcolormaterial = true;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Process the lump to strip all unneeded information from it
|
||||
|
|
@ -307,6 +325,7 @@ bool FScriptLoader::ParseInfo(MapData * map)
|
|||
if (opt != NULL)
|
||||
{
|
||||
DFraggleThinker::ActiveThinker->nocheckposition = opt->nocheckposition;
|
||||
DFraggleThinker::ActiveThinker->setcolormaterial = opt->setcolormaterial;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -695,6 +695,7 @@ public:
|
|||
TObjPtr<DRunningScript> RunningScripts;
|
||||
TArray<TObjPtr<AActor> > SpawnedThings;
|
||||
bool nocheckposition;
|
||||
bool setcolormaterial;
|
||||
|
||||
DFraggleThinker();
|
||||
void OnDestroy() override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue