some fixing of some things

This commit is contained in:
codeimp 2009-01-04 00:01:59 +00:00
parent 0581b119d0
commit 2448d401d7
18 changed files with 80 additions and 82 deletions

View file

@ -289,7 +289,6 @@ gen_sectortypes
1 = "Light Blinks (randomly)";
2 = "Light Blinks (0.5 sec)";
3 = "Light Blinks (1 sec)";
4 = "Light Blinks (0.5 sec) and Damage 10 or 20";
8 = "Light Glows (1+ sec)";
12 = "Light Blinks (0.5 sec sync)";
13 = "Light Blinks (1 sec sync)";

View file

@ -284,7 +284,6 @@ gen_sectortypes
1 = "Light Blinks (randomly)";
2 = "Light Blinks (0.5 sec)";
3 = "Light Blinks (1 sec)";
4 = "Light Blinks (0.5 sec) and Damage 10 or 20";
8 = "Light Glows (1+ sec)";
12 = "Light Blinks (0.5 sec sync)";
13 = "Light Blinks (1 sec sync)";
@ -3797,7 +3796,8 @@ thingtypes
color = 8; // Grey
arrow = 1;
title = "Eternity Items";
width = 0;
width = 10;
height = 20;
sort = 1;
fixedsize = true;
sprite = "internal:arrow";

View file

@ -251,7 +251,6 @@ gen_sectortypes
1 = "Light Blinks (randomly)";
2 = "Light Blinks (0.5 sec)";
3 = "Light Blinks (1 sec)";
4 = "Light Blinks (0.5 sec) and Damage 10 or 20";
8 = "Light Glows (1+ sec)";
12 = "Light Blinks (0.5 sec sync)";
13 = "Light Blinks (1 sec sync)";
@ -3436,7 +3435,8 @@ thingtypes
color = 8; // Grey
arrow = 1;
title = "Eternity Items";
width = 0;
width = 10;
height = 20;
sort = 1;
fixedsize = true;
sprite = "internal:arrow";

View file

@ -284,7 +284,6 @@ gen_sectortypes
1 = "Light Blinks (randomly)";
2 = "Light Blinks (0.5 sec)";
3 = "Light Blinks (1 sec)";
4 = "Light Blinks (0.5 sec) and Damage 10 or 20";
8 = "Light Glows (1+ sec)";
12 = "Light Blinks (0.5 sec sync)";
13 = "Light Blinks (1 sec sync)";

View file

@ -306,7 +306,6 @@ gen_sectortypes
1 = "Light Blinks (randomly)";
2 = "Light Blinks (0.5 sec)";
3 = "Light Blinks (1 sec)";
4 = "Light Blinks (0.5 sec) and Damage 10 or 20";
8 = "Light Glows (1+ sec)";
12 = "Light Blinks (0.5 sec sync)";
13 = "Light Blinks (1 sec sync)";
@ -3687,9 +3686,9 @@ thingtypes
color = 5; // Purple
arrow = 0;
title = "Sounds";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;
@ -3708,9 +3707,9 @@ thingtypes
color = 5; // Purple
arrow = 0;
title = "Ambient Sounds";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;
@ -3791,9 +3790,9 @@ thingtypes
color = 5; // Purple
arrow = 0;
title = "Change Music Tracks";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;
@ -3956,9 +3955,9 @@ thingtypes
color = 11; // Light Cyan
arrow = 0;
title = "Dynamic Lights";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;
@ -4039,9 +4038,9 @@ thingtypes
color = 2; // Green
arrow = 0;
title = "Fake Sector Teleport (Below Floor)";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;
@ -4157,9 +4156,9 @@ thingtypes
color = 2; // Green
arrow = 0;
title = "Fake Sector Teleport (Above Ceiling)";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;
@ -4275,9 +4274,9 @@ thingtypes
color = 7; // Light Grey
arrow = 0;
title = "Risen3D Special";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;
@ -4293,9 +4292,9 @@ thingtypes
color = 8; // Grey
arrow = 1;
title = "Boom Controllers";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;

View file

@ -308,7 +308,6 @@ gen_sectortypes
1 = "Light Blinks (randomly)";
2 = "Light Blinks (0.5 sec)";
3 = "Light Blinks (1 sec)";
4 = "Light Blinks (0.5 sec) and Damage 10 or 20";
8 = "Light Glows (1+ sec)";
12 = "Light Blinks (0.5 sec sync)";
13 = "Light Blinks (1 sec sync)";
@ -3981,9 +3980,9 @@ thingtypes
color = 5; // Purple
arrow = 0;
title = "Sounds";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;
@ -4072,9 +4071,9 @@ thingtypes
color = 8; // Grey
arrow = 1;
title = "ZDoom";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;

View file

@ -6177,9 +6177,9 @@ thingtypes
color = 7;
arrow = 0;
title = "Sector Actions";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;
@ -6204,9 +6204,9 @@ thingtypes
color = 5; // Purple
arrow = 0;
title = "Sounds";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;
@ -6402,9 +6402,9 @@ thingtypes
color = 7; // Light Grey
arrow = 1;
title = "ZDoom";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;

View file

@ -307,7 +307,6 @@ gen_sectortypes
1 = "Light Blinks (randomly)";
2 = "Light Blinks (0.5 sec)";
3 = "Light Blinks (1 sec)";
4 = "Light Blinks (0.5 sec) and Damage 10 or 20";
8 = "Light Glows (1+ sec)";
12 = "Light Blinks (0.5 sec sync)";
13 = "Light Blinks (1 sec sync)";
@ -3586,8 +3585,8 @@ thingtypes
color = 5; // Purple
arrow = 0;
title = "Sounds";
width = 0;
height = 0;
width = 10;
height = 20;
sort = 1;
blocking = 0;
hangs = 0;
@ -3677,8 +3676,8 @@ thingtypes
color = 7; // Light Grey
arrow = 1;
title = "ZDoom";
width = 0;
height = 0;
width = 10;
height = 20;
sort = 1;
blocking = 0;
hangs = 0;

View file

@ -6152,9 +6152,9 @@ thingtypes
color = 7;
arrow = 0;
title = "Sector Actions";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;
@ -6179,9 +6179,9 @@ thingtypes
color = 5; // Purple
arrow = 0;
title = "Sounds";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;
@ -6377,9 +6377,9 @@ thingtypes
color = 7; // Light Grey
arrow = 1;
title = "ZDoom";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;

View file

@ -6373,9 +6373,9 @@ thingtypes
color = 7;
arrow = 0;
title = "Sector Actions";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;
@ -6400,9 +6400,9 @@ thingtypes
color = 5; // Purple
arrow = 0;
title = "Sounds";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;
@ -6598,9 +6598,9 @@ thingtypes
color = 7; // Light Grey
arrow = 1;
title = "ZDoom";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;

View file

@ -5119,7 +5119,8 @@ thingtypes
color = 5; // Purple
arrow = 0;
title = "Sounds";
width = 0;
width = 10;
height = 20;
sort = 1;
sprite = "internal:sound";
@ -5449,7 +5450,8 @@ thingtypes
color = 7;
arrow = 0;
title = "Sector Actions";
width = 16;
width = 10;
height = 20;
sort = 1;
fixedsize = true;
sprite = "internal:action";
@ -5541,9 +5543,9 @@ thingtypes
color = 7; // Light Grey
arrow = 1;
title = "ZDoom";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;

View file

@ -6296,9 +6296,9 @@ thingtypes
color = 5; // Purple
arrow = 1;
title = "Sounds";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;
@ -6510,7 +6510,8 @@ thingtypes
color = 7; // Light Grey
arrow = 1;
title = "ZDoom";
width = 0;
width = 10;
height = 20;
sort = 1;
fixedsize = true;
sprite = "internal:arrow";

View file

@ -5734,7 +5734,8 @@ thingtypes
color = 7;
arrow = 0;
title = "Sector Actions";
width = 16;
width = 10;
height = 20;
sort = 1;
fixedsize = true;
sprite = "internal:action";
@ -5758,7 +5759,8 @@ thingtypes
color = 5; // Purple
arrow = 0;
title = "Sounds";
width = 0;
width = 10;
height = 20;
sort = 1;
fixedsize = true;
sprite = "internal:sound";
@ -5953,9 +5955,9 @@ thingtypes
color = 7; // Light Grey
arrow = 1;
title = "ZDoom";
width = 0;
sort = 1;
height = 0;
width = 10;
height = 20;
hangs = 0;
blocking = 0;
fixedsize = true;

View file

@ -83,9 +83,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
PixelColor sectorcolor = new PixelColor(255, 255, 255, 255);
// Must have a width!
if(info.Width < 0.1f) return false;
// Must have a width and height!
if((info.Width < 0.1f) || (info.Height < 0.1f)) return false;
if(sprite != null)
{
// Find the sector in which the thing resides
@ -97,18 +97,18 @@ namespace CodeImp.DoomBuilder.BuilderModes
unchecked((byte)Thing.Sector.Brightness),
unchecked((byte)Thing.Sector.Brightness));
}
// Check if the texture is loaded
sprite.LoadImage();
isloaded = sprite.IsImageLoaded;
if(isloaded)
{
base.Texture = sprite;
// Determine sprite size
float radius = sprite.ScaledWidth * 0.5f;
float height = sprite.ScaledHeight;
// Make vertices
WorldVertex[] verts = new WorldVertex[6];
verts[0] = new WorldVertex(-radius, 0.0f, 0.0f, sectorcolor.ToInt(), 0.0f, 1.0f);
@ -122,11 +122,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
else
{
base.Texture = General.Map.Data.Hourglass3D;
// Determine sprite size
float radius = Math.Min(info.Width, info.Height / 2f);
float height = Math.Min(info.Width * 2f, info.Height);
// Make vertices
WorldVertex[] verts = new WorldVertex[6];
verts[0] = new WorldVertex(-radius, 0.0f, 0.0f, sectorcolor.ToInt(), 0.0f, 1.0f);
@ -172,7 +172,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
SetPosition(pos);
SetCageSize(info.Width, info.Height);
SetCageColor(Thing.Color);
// Keep info for object picking
cageradius2 = info.Width * Angle2D.SQRT2;
cageradius2 = cageradius2 * cageradius2;

View file

@ -101,8 +101,8 @@ namespace CodeImp.DoomBuilder.Config
this.sorted = (cfg.ReadSetting("thingtypes." + name + ".sort", 0) != 0);
this.color = cfg.ReadSetting("thingtypes." + name + ".color", 0);
this.arrow = cfg.ReadSetting("thingtypes." + name + ".arrow", 0);
this.width = cfg.ReadSetting("thingtypes." + name + ".width", 16);
this.height = cfg.ReadSetting("thingtypes." + name + ".height", 16);
this.width = cfg.ReadSetting("thingtypes." + name + ".width", 10);
this.height = cfg.ReadSetting("thingtypes." + name + ".height", 20);
this.hangs = cfg.ReadSetting("thingtypes." + name + ".hangs", 0);
this.blocking = cfg.ReadSetting("thingtypes." + name + ".blocking", 0);
this.errorcheck = cfg.ReadSetting("thingtypes." + name + ".error", 1);
@ -110,7 +110,6 @@ namespace CodeImp.DoomBuilder.Config
// Safety
if(this.width < 8f) this.width = 8f;
if(this.height < 8f) this.height = 8f;
// Go for all items in category
dic = cfg.ReadSetting("thingtypes." + name, new Hashtable());

View file

@ -93,8 +93,8 @@ namespace CodeImp.DoomBuilder.Config
this.sprite = DataManager.INTERNAL_PREFIX + "unknownthing";
this.color = 0;
this.arrow = true;
this.width = 16f;
this.height = 16f;
this.width = 10f;
this.height = 20f;
this.hangs = false;
this.blocking = 0;
this.errorcheck = 0;
@ -128,7 +128,6 @@ namespace CodeImp.DoomBuilder.Config
// Safety
if(this.width < 8f) this.width = 8f;
if(this.height < 8f) this.height = 8f;
// Make long name for sprite lookup
if(this.sprite.Length <= 8)

View file

@ -638,13 +638,13 @@ namespace CodeImp.DoomBuilder.Rendering
// This collects a visual sector's geometry for rendering
public void AddThingGeometry(VisualThing t)
{
// Make sure the distance to camera is calculated
t.CalculateCameraDistance(cameraposition);
thingsbydistance.Add(t);
// Must have a texture!
if(t.Texture != null)
{
// Make sure the distance to camera is calculated
t.CalculateCameraDistance(cameraposition);
thingsbydistance.Add(t);
// Texture group not yet collected?
if(!things[t.RenderPassInt].ContainsKey(t.Texture))
{

View file

@ -272,7 +272,7 @@ namespace CodeImp.DoomBuilder.VisualModes
/// </summary>
public int CompareTo(VisualThing other)
{
return Math.Sign(this.cameradistance - other.cameradistance);
return Math.Sign(other.cameradistance - this.cameradistance);
}
#endregion