- increased the snd_channels default and minimum.
The values were still 8 and 32 respectively which applied to hardware from last decade, but for modern mods these are simply too low. New values are 64 as minimum and 128 as default. - added script access to a sector's colormap and specialcolors fields. (Writing only through dedicated functions because these fields are render state which may need to trigger some form of refresh if the renderer changes.)
This commit is contained in:
parent
889a2ae6aa
commit
005e6871f9
6 changed files with 59 additions and 8 deletions
|
|
@ -845,6 +845,35 @@ DEFINE_ACTION_FUNCTION(_Sector, SetFade)
|
|||
//
|
||||
//=====================================================================================
|
||||
|
||||
void sector_t::SetSpecialColor(int slot, int r, int g, int b)
|
||||
{
|
||||
SpecialColors[slot] = PalEntry(255, r, g, b);
|
||||
}
|
||||
|
||||
void sector_t::SetSpecialColor(int slot, PalEntry rgb)
|
||||
{
|
||||
rgb.a = 255;
|
||||
SpecialColors[slot] = rgb;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_Sector, SetSpecialColor)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
||||
PARAM_INT(num);
|
||||
PARAM_COLOR(color);
|
||||
if (num >= 0 && num < 5)
|
||||
{
|
||||
color.a = 255;
|
||||
self->SetSpecialColor(num, color);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=====================================================================================
|
||||
//
|
||||
//
|
||||
//=====================================================================================
|
||||
|
||||
void sector_t::SetFogDensity(int dens)
|
||||
{
|
||||
Colormap.FogDensity = dens;
|
||||
|
|
@ -2414,6 +2443,7 @@ DEFINE_ACTION_FUNCTION(_Secplane, PointToDist)
|
|||
DEFINE_FIELD_X(Sector, sector_t, floorplane)
|
||||
DEFINE_FIELD_X(Sector, sector_t, ceilingplane)
|
||||
DEFINE_FIELD_X(Sector, sector_t, Colormap)
|
||||
DEFINE_FIELD_X(Sector, sector_t, SpecialColors)
|
||||
DEFINE_FIELD_X(Sector, sector_t, SoundTarget)
|
||||
DEFINE_FIELD_X(Sector, sector_t, special)
|
||||
DEFINE_FIELD_X(Sector, sector_t, lightlevel)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue