FOF mode progress

This commit is contained in:
spherallic 2024-05-13 17:07:55 +02:00
parent 64ef8157a9
commit 9e426cb999
6 changed files with 24 additions and 35 deletions

View file

@ -1,8 +1,9 @@

#region ================== Copyright (c) 2014 Boris Iwanski
#region ================== Copyright (c) 2014 Boris Iwanski, 2024 9sphere
/*
* Copyright (c) 2014 Boris Iwanski
* Copyright (c) 2024 9sphere
* This program is released under GNU General Public License
*
* This program is distributed in the hope that it will be useful,

View file

@ -1,7 +1,8 @@
#region ================== Copyright (c) 2014 Boris Iwanski
#region ================== Copyright (c) 2014 Boris Iwanski, 2024 9sphere
/*
* Copyright (c) 2014 Boris Iwanski
* Copyright (c) 2024 9sphere
* This program is released under GNU General Public License
*
* This program is distributed in the hope that it will be useful,

View file

@ -134,9 +134,9 @@ namespace CodeImp.DoomBuilder.FOFMode
fof.TopHeight = ctrl.fof.TopHeight;
fof.BottomHeight = ctrl.fof.BottomHeight;
typeArgument.SetValue(ctrl.fof.Type);
flagsArgument.SetValue(ctrl.fof.Flags);
alphaArgument.SetValue(ctrl.fof.Alpha);
typeArgument.SetValue(ctrl.fof.Arguments[4]);
flagsArgument.SetValue(ctrl.fof.Arguments[3]);
alphaArgument.SetValue(ctrl.fof.Arguments[1]);
sectorBrightness.Text = ctrl.fof.Brightness.ToString();
fof.FloorSlope = ctrl.fof.FloorSlope;
@ -165,9 +165,9 @@ namespace CodeImp.DoomBuilder.FOFMode
flagsArgument.Setup(General.Map.Config.LinedefActions[100].Args[3]);
alphaArgument.Setup(General.Map.Config.LinedefActions[100].Args[1]);
typeArgument.SetValue(FOF.Type);
flagsArgument.SetValue(FOF.Flags);
alphaArgument.SetValue(FOF.Alpha);
typeArgument.SetValue(FOF.Arguments[4]);
flagsArgument.SetValue(FOF.Arguments[3]);
alphaArgument.SetValue(FOF.Arguments[1]);
sectorBrightness.Text = FOF.Brightness.ToString();
AddSectorCheckboxes();
@ -195,9 +195,9 @@ namespace CodeImp.DoomBuilder.FOFMode
fof.BottomFlat = sectorBottomFlat.TextureName;
fof.BorderTexture = sectorBorderTexture.TextureName;
fof.Type = int.Parse(typeArgument.Text);
fof.Flags = int.Parse(flagsArgument.Text);
fof.Alpha = int.Parse(alphaArgument.Text);
fof.Arguments[4] = int.Parse(typeArgument.Text);
fof.Arguments[3] = int.Parse(flagsArgument.Text);
fof.Arguments[1] = int.Parse(alphaArgument.Text);
fof.Brightness = sectorBrightness.GetResult(fof.Brightness);
fof.Tags = sector.Tags;

View file

@ -1,7 +1,8 @@
#region ================== Copyright (c) 2014 Boris Iwanski
#region ================== Copyright (c) 2014 Boris Iwanski, 2024 9sphere
/*
* Copyright (c) 2014 Boris Iwanski
* Copyright (c) 2024 9sphere
* This program is released under GNU General Public License
*
* This program is distributed in the hope that it will be useful,
@ -47,9 +48,6 @@ namespace CodeImp.DoomBuilder.FOFMode
private double floorslopeoffset;
private Vector3D ceilingslope;
private double ceilingslopeoffset;
private int type; // GZDoom
private int flags; // GZDoom
private int alpha; // GZDoom
private int action; // SRB2
private int[] arguments; // SRB2
private int brightness;
@ -70,9 +68,6 @@ namespace CodeImp.DoomBuilder.FOFMode
public string BorderTexture { get { return bordertexture; } set { bordertexture = value; } }
public string TopFlat { get { return topflat; } set { topflat = value; } }
public string BottomFlat { get { return bottomflat; } set { bottomflat = value; } }
public int Type { get { return type; } set { type = value; } }
public int Flags { get { return flags; } set { flags = value; } }
public int Alpha { get { return alpha; } set { alpha = value; } }
public int Action { get { return action; } set { action = value; } }
public int[] Arguments { get { return arguments; } set { arguments = value; } }
public int Brightness { get { return brightness; }set { brightness = value; } }
@ -97,8 +92,6 @@ namespace CodeImp.DoomBuilder.FOFMode
topheight = General.Settings.DefaultCeilingHeight;
bottomheight = General.Settings.DefaultFloorHeight;
bordertexture = General.Settings.DefaultTexture;
type = 0;
flags = 0;
tags = new List<int>();
action = 100;
arguments = new int[Linedef.NUM_ARGS];
@ -109,8 +102,6 @@ namespace CodeImp.DoomBuilder.FOFMode
linedefproperties = null;
sectorproperties = null;
alpha = 255;
}
public FOF(Sector sector) : this(sector, General.Map.Map.Sectors)
@ -142,10 +133,7 @@ namespace CodeImp.DoomBuilder.FOFMode
if (sd.Line.Action >= 100 && sd.Line.Action < 300)
{
bordertexture = sd.MiddleTexture;
udmftag = sd.Line.Args[0];
type = sd.Line.Args[4];
flags = sd.Line.Args[3];
alpha = sd.Line.Args[1];
udmftag = arguments[0] = sd.Line.Args[0];
action = sd.Line.Action;
for (int i = 1; i < Linedef.NUM_ARGS; i++)
arguments[i] = sd.Line.Args[i];
@ -208,9 +196,6 @@ namespace CodeImp.DoomBuilder.FOFMode
ldprops.Apply(new List<Linedef>() { line }, false);
line.Args[0] = tag;
line.Args[4] = type;
line.Args[3] = flags;
line.Args[1] = alpha;
line.Action = action;
for (int i = 1; i < Linedef.NUM_ARGS; i++)

View file

@ -1,9 +1,10 @@
#region ================== Copyright (c) 2007 Pascal vd Heiden, 2014 Boris Iwanski
#region ================== Copyright (c) 2007 Pascal vd Heiden, 2014 Boris Iwanski, 2024 9sphere
/*
* Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com
* Copyright (c) 2014 Boris Iwanski
* Copyright (c) 2024 9sphere
* This program is released under GNU General Public License
*
* This program is distributed in the hope that it will be useful,
@ -640,9 +641,9 @@ namespace CodeImp.DoomBuilder.FOFMode
foreach (KeyValuePair<Sector, int> group in numfofs)
{
if (group.Key.Selected)
selectedFOFlabels.Add(group.Key, new string[] { group.Value + (group.Value == 1 ? " floor" : " floors"), group.Value.ToString() });
selectedFOFlabels.Add(group.Key, new string[] { group.Value + (group.Value == 1 ? " FOF" : " FOFs"), group.Value.ToString() });
else
unselectedFOFlabels.Add(group.Key, new string[] { group.Value + (group.Value == 1 ? " floor" : " floors"), group.Value.ToString() });
unselectedFOFlabels.Add(group.Key, new string[] { group.Value + (group.Value == 1 ? " FOF" : " FOFs"), group.Value.ToString() });
}
/*
@ -653,7 +654,7 @@ namespace CodeImp.DoomBuilder.FOFMode
if (tdfs.Count == 0)
selectedFOFlabels.Add(s, new string[] { "", "" });
else
selectedFOFlabels.Add(s, new string[] { tdfs.Count + (tdfs.Count == 1 ? " floor" : " floors"), tdfs.Count.ToString() });
selectedFOFlabels.Add(s, new string[] { tdfs.Count + (tdfs.Count == 1 ? " FOF" : " FOFs"), tdfs.Count.ToString() });
}
foreach (Sector s in General.Map.Map.GetSelectedSectors(false))
@ -663,7 +664,7 @@ namespace CodeImp.DoomBuilder.FOFMode
if (tdfs.Count == 0)
unselectedFOFlabels.Add(s, new string[] { "", "" });
else
unselectedFOFlabels.Add(s, new string[] { tdfs.Count + (tdfs.Count == 1 ? " floor" : " floors"), tdfs.Count.ToString() });
unselectedFOFlabels.Add(s, new string[] { tdfs.Count + (tdfs.Count == 1 ? " FOF" : " FOFs"), tdfs.Count.ToString() });
}
*/
}

View file

@ -1,7 +1,8 @@
#region ================== Copyright (c) 2014 Boris Iwanski
#region ================== Copyright (c) 2014 Boris Iwanski, 2024 9sphere
/*
* Copyright (c) 2014 Boris Iwanski
* Copyright (c) 2024 9sphere
* This program is released under GNU General Public License
*
* This program is distributed in the hope that it will be useful,