mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 12:22:35 +00:00
DECORATE parser: added special handling for ZDoom's special sprite names (namely TNT1, "####" and "----").
Internal: changed the way apppath is acquired. It should no longer fail when launching the editor from a shared network folder. Main Form: changed some labels of dynamic light and model rendering selectors to be less confusing. Updated ZDoom_DECORATE.cfg.
This commit is contained in:
parent
be14f852ec
commit
9c11d7e682
7 changed files with 45 additions and 18 deletions
|
@ -235,8 +235,8 @@ keywords
|
|||
A_SetCrosshair = "A_SetCrosshair(int number)";
|
||||
//Weapon attack functions
|
||||
A_Punch = "A_Punch";
|
||||
A_Saw = "A_Saw[(string fullsound = \"weapons/sawfull\"[, string hitsound = \"weapons/sawhit\"[, int damage = 0[, string pufftype = \"BulletPuff\"[, int flags = 0[, float range = 65.0[, float spread_xy = 2.8125[, float spread_z = 0[, float lifesteal = 0]]]]]]]])]";
|
||||
A_CustomPunch = "A_CustomPunch(int damage[, bool norandom = false[, int flags = 0[, string pufftype = \"BulletPuff\"[, float range = 64.0[, float lifesteal = 0]]]]])";
|
||||
A_Saw = "A_Saw[(string fullsound = \"weapons/sawfull\"[, string hitsound = \"weapons/sawhit\"[, int damage = 0[, string pufftype = \"BulletPuff\"[, int flags = 0[, float range = 65.0[, float spread_xy = 2.8125[, float spread_z = 0[, float lifesteal = 0[, int lifestealmax = 0[, string armorbonustype = \"ArmorBonus\"]]]]]]]]]])]";
|
||||
A_CustomPunch = "A_CustomPunch(int damage[, bool norandom = false[, int flags = 0[, string pufftype = \"BulletPuff\"[, float range = 64.0[, float lifesteal = 0[, int lifestealmax = 0[, string armorbonustype = \"ArmorBonus\"]]]]]]])";
|
||||
A_FireBullets = "A_FireBullets(int spread_horz, int spread_vert, int numbullets, int damage[, string pufftype = \"\"[, int flags = FBF_USEAMMO[, float range = 0]]])";
|
||||
A_FireCustomMissile = "A_FireCustomMissile(string missiletype[, int angle = 0[, bool useammo = false[, int spawnofs_horz = 0[, int spawnheight = 0[, bool aim = false OR int flags = 0[, angle pitch = 0]]]]]])";
|
||||
A_RailAttack = "A_RailAttack(int damage[, int spawnofs_horz[, bool useammo[, color ringcolor[, color corecolor[, int flags[, int maxdiff[, string pufftype[, float spread_xy = 0[, float spread_z = 0[, fixed range = 8192[, int duration = 35[, float sparsity = 1.0[, float driftspeed = 1.0[, string spawnclass[, float spawnofs_z = 0]]]]]]]]]]]]]]])";
|
||||
|
@ -304,6 +304,7 @@ keywords
|
|||
A_Blast = "A_Blast[(int flags = 0[, int strength = 255[, int radius = 255[, float speed = 20[, string blasteffect = \"BlastEffect\"[, sound blastsound = \"BlastRadius\"]]]]])]";
|
||||
A_DropWeaponPieces = "A_DropWeaponPieces(string actorclass1, string actorclass2, string actorclass3)";
|
||||
A_Feathers = "A_Feathers";
|
||||
A_GauntletAttack = "A_GauntletAttack(int power)";
|
||||
A_GiveQuestItem = "A_GiveQuestItem(int itemnum)";
|
||||
A_PigPain = "A_PigPain";
|
||||
A_RemoveForcefield = "A_RemoveForcefield";
|
||||
|
@ -320,7 +321,7 @@ keywords
|
|||
random = "random[identifier](min, max)\nReturns a random integer value between min and max.";
|
||||
random2 = "random2[identifier](mask)\nReturns a random integer value between -mask and +mask.";
|
||||
frandom = "frandom[identifier](min, max)\nReturns a random floating point value between min and max.";
|
||||
pick = "pick[identifier](int, ...)\nPicks a number from the numbers placed in it.\nThis can take an unlimited amount of parameters.";
|
||||
randompick = "randompick[identifier](int, ...)\nPicks a number from the numbers placed in it.\nThis can take an unlimited amount of parameters.";
|
||||
//State keywords
|
||||
Bright = "Bright";
|
||||
CanRaise = "CanRaise";
|
||||
|
@ -459,6 +460,8 @@ constants
|
|||
CPF_DAGGER;
|
||||
CPF_PULLIN;
|
||||
CPF_NORANDOMPUFFZ;
|
||||
CPF_NOTURN;
|
||||
CPF_STEALARMOR;
|
||||
FBF_USEAMMO;
|
||||
FBF_NOFLASH;
|
||||
FBF_NORANDOM;
|
||||
|
@ -861,6 +864,7 @@ constants
|
|||
SF_RANDOMLIGHTBOTH;
|
||||
SF_RANDOMLIGHTHIT;
|
||||
SF_RANDOMLIGHTMISS;
|
||||
SF_STEALARMOR;
|
||||
SMF_CURSPEED;
|
||||
SMF_LOOK;
|
||||
SMF_PRECISE;
|
||||
|
|
|
@ -75,7 +75,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows
|
|||
"I'm sorry... :(",
|
||||
"This is a horrbble day for you, and of course, the world",
|
||||
"Abort, Retry, Fail?",
|
||||
"You are making progress. I'm afraid that's something I cannot allow to happen",
|
||||
"You are making progress. I'm afraid that's something I can't allow to happen",
|
||||
"You are making progress. That's not OK",
|
||||
"No errors found, restarting computer",
|
||||
"Does Not Compute!",
|
||||
|
@ -112,6 +112,8 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows
|
|||
"Good. It's boring here anyway.",
|
||||
"Shameful display!",
|
||||
"It's CRASHENING!",
|
||||
"W-W-W-WIPEOUT!",
|
||||
"EVERYTHING IS LOST!",
|
||||
};
|
||||
this.Text = titles[new Random().Next(0, titles.Length - 1)];
|
||||
}
|
||||
|
|
|
@ -569,8 +569,9 @@ namespace CodeImp.DoomBuilder
|
|||
thisasm = Assembly.GetExecutingAssembly();
|
||||
|
||||
// Find application path
|
||||
Uri localpath = new Uri(Path.GetDirectoryName(thisasm.GetName().CodeBase) + Path.DirectorySeparatorChar);
|
||||
apppath = Uri.UnescapeDataString(localpath.AbsolutePath);
|
||||
//Uri localpath = new Uri(Path.GetDirectoryName(thisasm.GetName().CodeBase));
|
||||
//apppath = Uri.UnescapeDataString(localpath.AbsolutePath);
|
||||
apppath = Path.GetDirectoryName(Application.ExecutablePath); //mxd. What was the point of using Uri here (other than to prevent lauching from a shared folder)?
|
||||
|
||||
// Setup directories
|
||||
temppath = Path.GetTempPath();
|
||||
|
|
6
Source/Core/Windows/MainForm.Designer.cs
generated
6
Source/Core/Windows/MainForm.Designer.cs
generated
|
@ -1573,7 +1573,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.sightsdontshow.Name = "sightsdontshow";
|
||||
this.sightsdontshow.Size = new System.Drawing.Size(237, 22);
|
||||
this.sightsdontshow.Tag = 0;
|
||||
this.sightsdontshow.Text = "No dynamic lights";
|
||||
this.sightsdontshow.Text = "Don't show dynamic lights";
|
||||
this.sightsdontshow.Click += new System.EventHandler(this.ChangeLightRenderingMode);
|
||||
//
|
||||
// lightsshow
|
||||
|
@ -1629,7 +1629,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.modelsshowselection.Name = "modelsshowselection";
|
||||
this.modelsshowselection.Size = new System.Drawing.Size(245, 22);
|
||||
this.modelsshowselection.Tag = 1;
|
||||
this.modelsshowselection.Text = "Show models for selected things";
|
||||
this.modelsshowselection.Text = "Show models for selected things only";
|
||||
this.modelsshowselection.Click += new System.EventHandler(this.ChangeModelRenderingMode);
|
||||
//
|
||||
// modelsshowall
|
||||
|
@ -1639,7 +1639,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.modelsshowall.Name = "modelsshowall";
|
||||
this.modelsshowall.Size = new System.Drawing.Size(245, 22);
|
||||
this.modelsshowall.Tag = 2;
|
||||
this.modelsshowall.Text = "Show all models";
|
||||
this.modelsshowall.Text = "Always show models";
|
||||
this.modelsshowall.Click += new System.EventHandler(this.ChangeModelRenderingMode);
|
||||
//
|
||||
// buttontogglefog
|
||||
|
|
|
@ -374,7 +374,11 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
else
|
||||
{
|
||||
// Show normal caption
|
||||
#if DEBUG
|
||||
this.Text = Application.ProductName + " - DEVBUILD";
|
||||
#else
|
||||
this.Text = Application.ProductName + " v" + Application.ProductVersion;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Update the status bar
|
||||
|
|
|
@ -27,9 +27,6 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
{
|
||||
#region ================== Constants
|
||||
|
||||
// Some odd thing in ZDoom
|
||||
internal const string IGNORE_SPRITE = "TNT1A0";
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
|
@ -97,7 +94,15 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
else
|
||||
{
|
||||
// First part of the sprite name
|
||||
if(token == null)
|
||||
if(string.IsNullOrEmpty(token))
|
||||
{
|
||||
parser.ReportError("Unexpected end of structure");
|
||||
return;
|
||||
}
|
||||
|
||||
//mxd. First part of the sprite name can be quoted
|
||||
token = parser.StripTokenQuotes(token);
|
||||
if(string.IsNullOrEmpty(token))
|
||||
{
|
||||
parser.ReportError("Unexpected end of structure");
|
||||
return;
|
||||
|
@ -112,6 +117,14 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
return;
|
||||
}
|
||||
|
||||
//mxd. Frames can be quoted
|
||||
spriteframes = parser.StripTokenQuotes(spriteframes);
|
||||
if(spriteframes == null)
|
||||
{
|
||||
parser.ReportError("Unexpected end of structure");
|
||||
return;
|
||||
}
|
||||
|
||||
// Label?
|
||||
if(spriteframes == ":")
|
||||
{
|
||||
|
@ -129,8 +142,8 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
string spritename = token + spriteframes[0];
|
||||
spritename = spritename.ToUpperInvariant();
|
||||
|
||||
// Ignore some odd ZDoom thing
|
||||
if(!IGNORE_SPRITE.StartsWith(spritename))
|
||||
// Ignore some odd ZDoom things
|
||||
if (!spritename.StartsWith("TNT1") && !spritename.StartsWith("----") && !spritename.Contains("#"))
|
||||
sprites.Add(spritename);
|
||||
}
|
||||
|
||||
|
@ -158,10 +171,10 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
}
|
||||
|
||||
//mxd
|
||||
internal StateStructure(string spriteName)
|
||||
internal StateStructure(string spritename)
|
||||
{
|
||||
this.gotostate = null;
|
||||
this.sprites = new List<string>() { spriteName };
|
||||
this.sprites = new List<string> { spritename };
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -28,6 +28,9 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
{
|
||||
#region ================== Constants
|
||||
|
||||
// Some odd thing in ZDoom
|
||||
private const string IGNORE_SPRITE = "TNT1A0";
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
|
@ -177,7 +180,7 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
if (parser.HasError) break;
|
||||
|
||||
//mxd. Let's ignore TNT1A0
|
||||
if(pt.Name == StateStructure.IGNORE_SPRITE) break;
|
||||
if(pt.Name == IGNORE_SPRITE) break;
|
||||
|
||||
// Add the patch
|
||||
patches.Add(pt);
|
||||
|
|
Loading…
Reference in a new issue