diff --git a/Build/Configurations/Includes/Common.cfg b/Build/Configurations/Includes/Common.cfg
index 1bae0d63..b1a4be4a 100644
--- a/Build/Configurations/Includes/Common.cfg
+++ b/Build/Configurations/Includes/Common.cfg
@@ -21,10 +21,11 @@ topboundary = 32767;
bottomboundary = -32768;
-// Maximum length of texture name length in characters (0 for unlimited)
-// WARNING: changing this may destroy your WAD file. Only change it when
-// you know what you're doing!
-maxtexturenamelength = 8;
+// Enables support for long (> 8 chars) texture names
+// (to use long texture names you must also enable "Use long texture names" in the Map Configuration window).
+// WARNING: this should only be enabled for UDMF game configurations!
+// WARNING: enabling this will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3!
+longtexturenames = false;
diff --git a/Build/Configurations/Includes/ZDoom_common.cfg b/Build/Configurations/Includes/ZDoom_common.cfg
index 9c345b02..02ea9461 100644
--- a/Build/Configurations/Includes/ZDoom_common.cfg
+++ b/Build/Configurations/Includes/ZDoom_common.cfg
@@ -308,15 +308,16 @@ mapformat_hexen
mapformat_udmf
{
// The format interface handles the map data format
- formatinterface = "UniversalMapSetIO";
+ formatinterface = "UniversalMapSetIO";
//mxd. The default script compiler to use
defaultscriptcompiler = "zdoom_acs.cfg";
- // Maximum length of texture name length in characters (0 for unlimited)
- // WARNING: changing this may destroy your WAD file. Only change it when
- // you know what you're doing!
- maxtexturenamelength = 2048;
+ // Enables support for long (> 8 chars) texture names
+ // (to use long texture names you must also enable "Use long texture names" in the Map Configuration window).
+ // WARNING: this should only be enabled for UDMF game configurations!
+ // WARNING: enabling this will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3!
+ longtexturenames = true;
// Default nodebuilder configurations
defaultsavecompiler = "zdbsp_udmf_normal";
diff --git a/Build/Configurations/Includes/ZDoom_misc.cfg b/Build/Configurations/Includes/ZDoom_misc.cfg
index a2be9b67..b9c7037b 100644
--- a/Build/Configurations/Includes/ZDoom_misc.cfg
+++ b/Build/Configurations/Includes/ZDoom_misc.cfg
@@ -554,10 +554,10 @@ enums
generic_door_delays
{
- 8 = "1 second";
- 34 = "4 seconds";
- 69 = "9 seconds";
- 240 = "30 seconds";
+ 8 = "8: 1 second";
+ 34 = "34: 4 seconds";
+ 69 = "69: 9 seconds";
+ 240 = "240: 30 seconds";
}
donut
diff --git a/Build/Configurations/Zandronum_DoomUDMF.cfg b/Build/Configurations/Zandronum_DoomUDMF.cfg
index 08bda09e..e735603f 100644
--- a/Build/Configurations/Zandronum_DoomUDMF.cfg
+++ b/Build/Configurations/Zandronum_DoomUDMF.cfg
@@ -26,6 +26,12 @@ include("Includes\\ZDoom_common.cfg", "common");
// Settings common to text map format
include("Includes\\ZDoom_common.cfg", "mapformat_udmf");
+// Enables support for long (> 8 chars) texture names
+// (to use long texture names you must also enable "Use long texture names" in the Map Configuration window).
+// WARNING: this should only be enabled for UDMF game configurations!
+// WARNING: enabling this will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3!
+longtexturenames = false;
+
// mxd. Default script compiler
defaultscriptcompiler = "zandronum_acs.cfg";
diff --git a/Build/Configurations/Zandronum_HereticUDMF.cfg b/Build/Configurations/Zandronum_HereticUDMF.cfg
index addf0654..048ae111 100644
--- a/Build/Configurations/Zandronum_HereticUDMF.cfg
+++ b/Build/Configurations/Zandronum_HereticUDMF.cfg
@@ -26,6 +26,12 @@ include("Includes\\ZDoom_common.cfg", "common");
// Settings common to text map format
include("Includes\\ZDoom_common.cfg", "mapformat_udmf");
+// Enables support for long (> 8 chars) texture names
+// (to use long texture names you must also enable "Use long texture names" in the Map Configuration window).
+// WARNING: this should only be enabled for UDMF game configurations!
+// WARNING: enabling this will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3!
+longtexturenames = false;
+
// mxd. Default script compiler
defaultscriptcompiler = "zandronum_acs.cfg";
diff --git a/Build/Configurations/Zandronum_HexenUDMF.cfg b/Build/Configurations/Zandronum_HexenUDMF.cfg
index 5077c150..cd4faf3e 100644
--- a/Build/Configurations/Zandronum_HexenUDMF.cfg
+++ b/Build/Configurations/Zandronum_HexenUDMF.cfg
@@ -26,6 +26,12 @@ include("Includes\\ZDoom_common.cfg", "common");
// Settings common to text map format
include("Includes\\ZDoom_common.cfg", "mapformat_udmf");
+// Enables support for long (> 8 chars) texture names
+// (to use long texture names you must also enable "Use long texture names" in the Map Configuration window).
+// WARNING: this should only be enabled for UDMF game configurations!
+// WARNING: enabling this will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3!
+longtexturenames = false;
+
// mxd. Default script compiler
defaultscriptcompiler = "zandronum_acs.cfg";
diff --git a/Build/Configurations/Zandronum_StrifeUDMF.cfg b/Build/Configurations/Zandronum_StrifeUDMF.cfg
index b2adeedd..b6e4a522 100644
--- a/Build/Configurations/Zandronum_StrifeUDMF.cfg
+++ b/Build/Configurations/Zandronum_StrifeUDMF.cfg
@@ -26,6 +26,12 @@ include("Includes\\ZDoom_common.cfg", "common");
// Settings common to text map format
include("Includes\\ZDoom_common.cfg", "mapformat_udmf");
+// Enables support for long (> 8 chars) texture names
+// (to use long texture names you must also enable "Use long texture names" in the Map Configuration window).
+// WARNING: this should only be enabled for UDMF game configurations!
+// WARNING: enabling this will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3!
+longtexturenames = false;
+
// mxd. Default script compiler
defaultscriptcompiler = "zandronum_acs.cfg";
diff --git a/Build/Scripting/ZDoom_DECORATE.cfg b/Build/Scripting/ZDoom_DECORATE.cfg
index 5207f023..be03b563 100644
--- a/Build/Scripting/ZDoom_DECORATE.cfg
+++ b/Build/Scripting/ZDoom_DECORATE.cfg
@@ -23,16 +23,16 @@ keywords
A_AlertMonsters = "A_AlertMonsters[(float maxrange = 0[, int flags = 0])]";
A_Burst = "A_Burst(string type)";
A_CentaurDefend = "A_CentaurDefend";
- A_Chase = "A_Chase[(string meleestate = 'Melee'[, string rangedstate = 'Missile'[, int flags = 0]])]";
+ A_Chase = "A_Chase[(string meleestate = \"Melee\"[, string rangedstate = \"Missile\"[, int flags = 0]])]";
A_ClearLastHeard = "A_ClearLastHeard";
A_ClearSoundTarget = "A_ClearSoundTarget";
A_ClearTarget = "A_ClearTarget";
- A_DamageChildren = "A_DamageChildren(int amount[, string damagetype = 'None'[, int flags = 0]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.";
- A_DamageMaster = "A_DamageMaster(int amount[, string damagetype = 'None'[, int flags = 0]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.";
- A_DamageSelf = "A_DamageSelf(int amount[, string damagetype = 'None'[, int flags = 0]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.";
- A_DamageSiblings = "A_DamageSiblings(int amount[, string damagetype = 'None'[, int flags = 0]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.";
- A_DamageTarget = "A_DamageTarget(int amount[, string damagetype = 'None'[, int flags = 0]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.";
- A_DamageTracer = "A_DamageTracer(int amount[, string damagetype = 'None'[, int flags = 0]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.";
+ A_DamageChildren = "A_DamageChildren(int amount[, string damagetype = \"None\"[, int flags = 0]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.";
+ A_DamageMaster = "A_DamageMaster(int amount[, string damagetype = \"None\"[, int flags = 0]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.";
+ A_DamageSelf = "A_DamageSelf(int amount[, string damagetype = \"None\"[, int flags = 0]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.";
+ A_DamageSiblings = "A_DamageSiblings(int amount[, string damagetype = \"None\"[, int flags = 0]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.";
+ A_DamageTarget = "A_DamageTarget(int amount[, string damagetype = \"None\"[, int flags = 0]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.";
+ A_DamageTracer = "A_DamageTracer(int amount[, string damagetype = \"None\"[, int flags = 0]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.";
A_Die = "A_Die[(string damagetype)]";
A_FaceTarget = "A_FaceTarget[(float angle = 0[, float pitch = 0])]";
A_FaceMaster = "A_FaceMaster[(float angle = 0[, float pitch = 0])]";
@@ -56,7 +56,7 @@ keywords
A_Remove = "A_Remove(int pointer, int flags)\nflags: RMVF flags.";
A_SentinelBob = "A_SentinelBob";
A_TurretLook = "A_TurretLook";
- A_Teleport = "A_Teleport[(string teleportstate = 'Teleport'[, string targettype = 'BossSpot'[, string fogtype = 'TeleportFog'[, int flags = 0[, float mindist = 0[, float maxdist = 0]]]]])]";
+ A_Teleport = "A_Teleport[(string teleportstate = \"Teleport\"[, string targettype = \"BossSpot\"[, string fogtype = \"TeleportFog\"[, int flags = 0[, float mindist = 0[, float maxdist = 0]]]]])]";
A_VileChase = "A_VileChase";
A_Wander = "A_Wander";
//Generic monster attacks
@@ -64,16 +64,16 @@ keywords
A_CustomBulletAttack = "A_CustomBulletAttack(float horz_spread, float vert_spread, int numbullets, int damageperbullet, string pufftype[, float range[, int flags]])";
A_CustomRailgun = "A_CustomRailgun(int damage[, int offset[, color ringcolor[, color corecolor[, int flags[, bool aim[, float maxdiff[, string pufftype[, float spread_xy[, float spread_z[, fixed range[, int duration[, float sparsity[, float driftspeed[, string spawnclass]]]]]]]]]]]]]])";
A_CustomMeleeAttack = "A_CustomMeleeAttack(int damage[, string meleesound[, string misssound[, string damagetype[, bool bleed]]]])";
- A_CustomComboAttack = "A_CustomComboAttack(string missiletype, float spawnheight, int damage, string meleesound[, string damagetype = 'Melee'[, bool bleed = true]])";
+ A_CustomComboAttack = "A_CustomComboAttack(string missiletype, float spawnheight, int damage, string meleesound[, string damagetype = \"Melee\"[, bool bleed = true]])";
A_MonsterRefire = "A_MonsterRefire(int chancecontinue, string abortstate) ";
A_BasicAttack = "A_BasicAttack(int meleedamage, string meleesound, string missiletype, float missileheight)";
A_BulletAttack = "A_BulletAttack";
A_MonsterRail = "A_MonsterRail";
- A_Explode = "A_Explode[(int explosiondamage = 128[, int explosionradius = 128[, int flags = XF_HURTSOURCE[, bool alert = false[, int fulldamageradius = 0[, int nails = 0[, int naildamage = 10[, string pufftype = 'BulletPuff']]]]]]])]";
+ A_Explode = "A_Explode[(int explosiondamage = 128[, int explosionradius = 128[, int flags = XF_HURTSOURCE[, bool alert = false[, int fulldamageradius = 0[, int nails = 0[, int naildamage = 10[, string pufftype = \"BulletPuff\"]]]]]]])]";
A_RadiusThrust = "A_RadiusThrust(int force, int distance[, int flags[, int fullthrustdistance]])";
A_Detonate = "A_Detonate";
A_ThrowGrenade = "A_ThrowGrenade(string spawntype[, float spawnheight[, float throwspeed_horz[, float throwspeed_vert[, bool useammo]]]])";
- A_WolfAttack = "A_WolfAttack[(int flags = 0[, string soundname = 'weapons/pistol'[, float snipe = 1.0[, int damage = 64[, int blocksize = 128[, int pointblank = 0[, int longrange = 0[, float runspeed = 160.0, [string pufftype = 'BulletPuff']]]]]]]])]";
+ A_WolfAttack = "A_WolfAttack[(int flags = 0[, string soundname = \"weapons/pistol\"[, float snipe = 1.0[, int damage = 64[, int blocksize = 128[, int pointblank = 0[, int longrange = 0[, float runspeed = 160.0, [string pufftype = \"BulletPuff\"]]]]]]]])]";
//Freeze death functions
A_FreezeDeath = "A_FreezeDeath";
A_GenericFreezeDeath = "A_GenericFreezeDeath";
@@ -95,8 +95,8 @@ keywords
A_BrainAwake = "A_BrainAwake";
A_BFGSound = "A_BFGSound";
//Print actions
- A_Print = "A_Print(string text[, float time = 0.0[, string fontname = 'SmallFont']])";
- A_PrintBold = "A_PrintBold(string text[, float time = 0.0[, string fontname = 'SmallFont']])";
+ A_Print = "A_Print(string text[, float time = 0.0[, string fontname = \"SmallFont\"]])";
+ A_PrintBold = "A_PrintBold(string text[, float time = 0.0[, string fontname = \"SmallFont\"]])";
A_Log = "A_Log(string text)";
A_LogInt = "A_LogInt(int number)";
//Special actions
@@ -109,8 +109,8 @@ keywords
A_SetBlend = "A_SetBlend(string blendcolor, float alpha, int duration[, string fadecolor])";
A_CheckPlayerDone = "A_CheckPlayerDone";
A_PlayerSkinCheck = "A_PlayerSkinCheck(string state)";
- A_SkullPop = "A_SkullPop[(string type = 'BloodySkull')]";
- A_Quake = "A_Quake (int intensity, int duration, int damageradius, int tremorradius[, string sound = 'world/quake'])";
+ A_SkullPop = "A_SkullPop[(string type = \"BloodySkull\")]";
+ A_Quake = "A_Quake (int intensity, int duration, int damageradius, int tremorradius[, string sound = \"world/quake\"])";
//Spawn functions
A_TossGib = "A_TossGib";
A_SpawnDebris = "A_SpawnDebris(string type[, bool translation = false[, float horizontal_vel = 1.0[, float vertical_vel = 1.0]]])";
@@ -159,14 +159,14 @@ keywords
A_Respawn = "A_Respawn[(int flags = RSF_FOG)]\nflags: RSF flags";
A_ScaleVelocity = "A_ScaleVelocity(float scale)";
A_ScreamAndUnblock = "A_ScreamAndUnblock";
- A_SetAngle = "A_SetAngle(float angle[, int flags])\nangle: the actor's new angle, in degrees.\nflags: SPF flags.";
+ A_SetAngle = "A_SetAngle(float angle[, int flags])\nangle: the actor\"s new angle, in degrees.\nflags: SPF flags.";
A_SetArg = "A_SetArg(int position, int value)";
A_SetDamageType = "A_SetDamageType(string damagetype)";
A_SetFloat = "A_SetFloat";
A_SetFloorClip = "A_SetFloorClip";
A_SetInvulnerable = "A_SetInvulnerable";
A_SetMass = "A_SetMass(int mass)";
- A_SetPitch = "A_SetPitch(float pitch[, int flags])\npitch: The actor's new pitch, in degrees.\nflags: SPF flags.";
+ A_SetPitch = "A_SetPitch(float pitch[, int flags])\npitch: The actor\"s new pitch, in degrees.\nflags: SPF flags.";
A_SetReflective = "A_SetReflective";
A_SetReflectiveInvulnerable = "A_SetReflectiveInvulnerable";
A_SetScale = "A_SetScale(float scaleX[, float scaleY = scaleX])";
@@ -215,9 +215,9 @@ keywords
A_WeaponReady = "A_WeaponReady[(int flags = 0)]\nflags: WRF flags.";
A_Lower = "A_Lower";
A_Raise = "A_Raise";
- A_ReFire = "A_ReFire[(string state = 'Hold')]";
+ A_ReFire = "A_ReFire[(string state = \"Hold\")]";
A_ClearReFire = "A_ClearReFire";
- A_GunFlash = "A_GunFlash[(string state = 'Flash'[, int flags = 0])]\nflags: GFF flags.";
+ A_GunFlash = "A_GunFlash[(string state = \"Flash\"[, int flags = 0])]\nflags: GFF flags.";
A_CheckReload = "A_CheckReload";
A_CheckForReload = "A_CheckForReload(int counter, string state[, bool dontincrement = false])";
A_ResetReloadCounter = "A_ResetReloadCounter";
@@ -231,9 +231,9 @@ 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_FireBullets = "A_FireBullets(int spread_horz, int spread_vert, int numbullets, int damage[, string pufftype = ''[, int flags = FBF_USEAMMO[, float range = 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]]]]]]]])]";
+ A_CustomPunch = "A_CustomPunch(int damage[, bool norandom = false[, int flags = 0[, string pufftype = \"BulletPuff\"[, float range = 64.0[, float lifesteal = 0]]]]])";
+ 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]]]]]]]]]]]]]]])";
A_FireAssaultGun = "A_FireAssaultGun";
@@ -266,23 +266,23 @@ keywords
A_SkullAttack = "A_SkullAttack[(int speed = 20)]";
A_BspiAttack = "A_BspiAttack";
A_CyberAttack = "A_CyberAttack";
- A_PainAttack = "A_PainAttack[(string spawntype = 'LostSoul'[, float angle = 0[, int flags = 0[, int limit = 21]]])]";
- A_DualPainAttack = "A_DualPainAttack[(string spawntype = 'LostSoul')]";
- A_PainDie = "A_PainDie[(string spawntype = 'LostSoul')]";
+ A_PainAttack = "A_PainAttack[(string spawntype = \"LostSoul\"[, float angle = 0[, int flags = 0[, int limit = 21]]])]";
+ A_DualPainAttack = "A_DualPainAttack[(string spawntype = \"LostSoul\")]";
+ A_PainDie = "A_PainDie[(string spawntype = \"LostSoul\")]";
A_SkelFist = "A_SkelFist";
A_SkelMissile = "A_SkelMissile";
- A_FatAttack1 = "A_FatAttack1[(string spawntype = 'FatShot')]";
- A_FatAttack2 = "A_FatAttack2[(string spawntype = 'FatShot')]";
- A_FatAttack3 = "A_FatAttack3[(string spawntype = 'FatShot')]";
- A_VileTarget = "A_VileTarget[(string type = 'ArchvileFire')]";
- A_VileAttack = "A_VileAttack[(string sound = 'vile/stop'[, int initialdamage = 20[, int blastdamage = 70[, int blastradius = 70[, float thrustfactor = 1.0[, string damagetype = 'Fire'[, int flags = 0]]]]]])]";
- A_BrainSpit = "A_BrainSpit[(string spawntype = 'SpawnShot')]";
- A_SpawnFly = "A_SpawnFly[(string fogactor = 'SpawnFire')]";
+ A_FatAttack1 = "A_FatAttack1[(string spawntype = \"FatShot\")]";
+ A_FatAttack2 = "A_FatAttack2[(string spawntype = \"FatShot\")]";
+ A_FatAttack3 = "A_FatAttack3[(string spawntype = \"FatShot\")]";
+ A_VileTarget = "A_VileTarget[(string type = \"ArchvileFire\")]";
+ A_VileAttack = "A_VileAttack[(string sound = \"vile/stop\"[, int initialdamage = 20[, int blastdamage = 70[, int blastradius = 70[, float thrustfactor = 1.0[, string damagetype = \"Fire\"[, int flags = 0]]]]]])]";
+ A_BrainSpit = "A_BrainSpit[(string spawntype = \"SpawnShot\")]";
+ A_SpawnFly = "A_SpawnFly[(string fogactor = \"SpawnFire\")]";
A_SpawnSound = "A_SpawnSound";
A_BrainScream = "A_BrainScream";
A_BrainExplode = "A_BrainExplode";
- A_Mushroom = "A_Mushroom[(string spawntype = 'FatShot'[, int amount[, int flags = MSF_STANDARD[, float vrange = 4.0[, float hrange = 0.5]]]])]";
- A_M_Saw = "A_M_Saw[(string fullsound = 'weapons/sawfull'[, string hitsound = 'weapons/sawhit'[, int damage = 0[, string pufftype = 'BulletPuff']]])]";
+ A_Mushroom = "A_Mushroom[(string spawntype = \"FatShot\"[, int amount[, int flags = MSF_STANDARD[, float vrange = 4.0[, float hrange = 0.5]]]])]";
+ A_M_Saw = "A_M_Saw[(string fullsound = \"weapons/sawfull\"[, string hitsound = \"weapons/sawhit\"[, int damage = 0[, string pufftype = \"BulletPuff\"]]])]";
A_SentinelRefire = "A_SentinelRefire";
A_BetaSkullAttack = "A_BetaSkullAttack";
//Miscellaneous functions for Doom
@@ -293,8 +293,21 @@ keywords
A_SkelWhoosh = "A_SkelWhoosh";
A_StartFire = "A_StartFire";
A_FireCrackle = "A_FireCrackle";
- A_BFGSpray = "A_BFGSpray[(string flashtype = 'BFGExtra'[, int numrays = 40[, int damage = 15[, float angle = 90[, float distance = 1024[, float vrange = 32[, int explicit_damage = 0]]]]]])]";
- A_BarrelDestroy = "A_BarrelDestroy";
+ A_BFGSpray = "A_BFGSpray[(string flashtype = \"BFGExtra\"[, int numrays = 40[, int damage = 15[, float angle = 90[, float distance = 1024[, float vrange = 32[, int explicit_damage = 0]]]]]])]";
+ A_BarrelDestroy = "A_BarrelDestroy";
+//Miscellaneous functions not listed in the "Action functions" wiki article
+ A_Bang4Cloud = "A_Bang4Cloud";
+ 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_GiveQuestItem = "A_GiveQuestItem(int itemnum)";
+ A_PigPain = "A_PigPain";
+ A_RemoveForcefield = "A_RemoveForcefield";
+ A_RocketInFlight = "A_RocketInFlight";
+ A_SetGravity = "A_SetGravity(float gravity)\nSets the amount of gravity for the calling actor.";
+ A_SetUserArray = "A_SetUserArray(string name, int index, int value)";
+ A_ShootGun = "A_ShootGun";
+ A_SPosAttackUseAtkSound = "A_SPosAttackUseAtkSound";
//Mathematical functions
abs = "abs(x)\nreturns the absolute value of x.";
sin = "sin(x)\ntrigonometry function, x must be in degrees.";
@@ -606,6 +619,7 @@ constants
SPAWNSOUNDSOURCE;
PAINLESS;
FORCEPAIN;
+ CAUSEPAIN;
DONTSEEKINVISIBLE;
STEPMISSILE;
ADDITIVEPOISONDAMAGE;
@@ -650,6 +664,7 @@ constants
NOTAUTOAIMED;
NOTONAUTOMAP;
WEAPONSPAWN;
+ NOMENU;
PICKUP;
TOUCHY;
VULNERABLE;
@@ -713,6 +728,10 @@ constants
AMF_EMITFROMTARGET;
AMF_TARGETEMITTER;
AMF_TARGETNONPLAYER;
+ BF_USEAMMO;
+ BF_DONTWARN;
+ BF_AFFECTBOSSES;
+ BF_NOIMPACTDAMAGE;
CBAF_AIMFACING;
CBAF_EXPLICITANGLE;
CBAF_NOPITCH;
diff --git a/Source/Core/Builder.csproj b/Source/Core/Builder.csproj
index bc2e5264..f8690c0a 100644
--- a/Source/Core/Builder.csproj
+++ b/Source/Core/Builder.csproj
@@ -699,6 +699,9 @@
Component
+
+ Component
+
UserControl
diff --git a/Source/Core/Config/ConfigurationInfo.cs b/Source/Core/Config/ConfigurationInfo.cs
index 22ae65ca..ea5cccd2 100644
--- a/Source/Core/Config/ConfigurationInfo.cs
+++ b/Source/Core/Config/ConfigurationInfo.cs
@@ -59,6 +59,7 @@ namespace CodeImp.DoomBuilder.Config
private Configuration config; //mxd
private bool enabled; //mxd
private bool changed; //mxd
+ private bool longtexturenames; //mxd
private List testEngines; //mxd
private int currentEngineIndex; //mxd
@@ -84,6 +85,7 @@ namespace CodeImp.DoomBuilder.Config
internal Configuration Configuration { get { return config; } } //mxd
public bool Enabled { get { return enabled; } internal set { enabled = value; } } //mxd
public bool Changed { get { return changed; } internal set { changed = value; } } //mxd
+ public bool SupportsLongTextureNames { get { return longtexturenames; } internal set { longtexturenames = value; } } //mxd
//mxd
public string TestProgramName { get { return testEngines[currentEngineIndex].TestProgramName; } internal set { testEngines[currentEngineIndex].TestProgramName = value; } }
@@ -116,6 +118,7 @@ namespace CodeImp.DoomBuilder.Config
// Load settings from game configuration
this.name = config.ReadSetting("game", "");
this.defaultlumpname = config.ReadSetting("defaultlumpname", "");
+ this.longtexturenames = config.ReadSetting("longtexturenames", false); //mxd
// Load settings from program configuration
this.nodebuildersave = General.Settings.ReadSetting("configurations." + settingskey + ".nodebuildersave", MISSING_NODEBUILDER);
@@ -132,7 +135,8 @@ namespace CodeImp.DoomBuilder.Config
currentEngineIndex = General.Settings.ReadSetting("configurations." + settingskey + ".currentengineindex", 0);
//no engine list found? use old engine properties
- if (list.Count == 0) {
+ if (list.Count == 0)
+ {
EngineInfo info = new EngineInfo();
info.TestProgram = General.Settings.ReadSetting("configurations." + settingskey + ".testprogram", "");
info.TestProgramName = General.Settings.ReadSetting("configurations." + settingskey + ".testprogramname", EngineInfo.DEFAULT_ENGINE_NAME);
@@ -143,9 +147,12 @@ namespace CodeImp.DoomBuilder.Config
info.TestSkill = General.Settings.ReadSetting("configurations." + settingskey + ".testskill", 3);
testEngines.Add(info);
currentEngineIndex = 0;
- } else {
+ }
+ else
+ {
//read engines settings from config
- foreach (DictionaryEntry de in list) {
+ foreach (DictionaryEntry de in list)
+ {
string path = "configurations." + settingskey + ".engines." + de.Key;
EngineInfo info = new EngineInfo();
info.TestProgram = General.Settings.ReadSetting(path + ".testprogram", "");
@@ -166,13 +173,17 @@ namespace CodeImp.DoomBuilder.Config
list = General.Settings.ReadSetting("configurations." + settingskey + ".linedefcolorpresets", new ListDictionary());
//no presets? add "classic" ones then.
- if(list.Count == 0) {
+ if(list.Count == 0)
+ {
LinedefColorPreset anyActionPreset = new LinedefColorPreset("Any action", PixelColor.FromColor(System.Drawing.Color.PaleGreen), -1, 0, new List(), new List());
anyActionPreset.SetValid();
colorPresets.Add(anyActionPreset);
- } else {
+ }
+ else
+ {
//read custom linedef colors from config
- foreach(DictionaryEntry de in list) {
+ foreach(DictionaryEntry de in list)
+ {
string path = "configurations." + settingskey + ".linedefcolorpresets." + de.Key;
string presetname = General.Settings.ReadSetting(path + ".name", "Unnamed");
PixelColor color = PixelColor.FromInt(General.Settings.ReadSetting(path + ".color", -1));
diff --git a/Source/Core/Config/GameConfiguration.cs b/Source/Core/Config/GameConfiguration.cs
index 4fd7a9f2..8c18e5fb 100644
--- a/Source/Core/Config/GameConfiguration.cs
+++ b/Source/Core/Config/GameConfiguration.cs
@@ -25,6 +25,7 @@ using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Editing;
using CodeImp.DoomBuilder.GZBuilder.Data;
+using CodeImp.DoomBuilder.Data;
#endregion
@@ -311,7 +312,6 @@ namespace CodeImp.DoomBuilder.Config
linetagindicatesectors = cfg.ReadSetting("linetagindicatesectors", false);
decorategames = cfg.ReadSetting("decorategames", "");
skyflatname = cfg.ReadSetting("skyflatname", "F_SKY1");
- maxtexturenamelength = cfg.ReadSetting("maxtexturenamelength", 8);
leftboundary = cfg.ReadSetting("leftboundary", -32768);
rightboundary = cfg.ReadSetting("rightboundary", 32767);
topboundary = cfg.ReadSetting("topboundary", 32767);
@@ -320,6 +320,10 @@ namespace CodeImp.DoomBuilder.Config
defaultLinedefActivation = cfg.ReadSetting("defaultlinedefactivation", ""); //mxd
for(int i = 0; i < Linedef.NUM_ARGS; i++) makedoorargs[i] = cfg.ReadSetting("makedoorarg" + i.ToString(CultureInfo.InvariantCulture), 0);
+ //mxd. Texture names length
+ bool uselongtexturenames = cfg.ReadSetting("longtexturenames", false);
+ maxtexturenamelength = (uselongtexturenames ? short.MaxValue : DataManager.CLASIC_IMAGE_NAME_LENGTH);
+
// Flags have special (invariant culture) conversion
// because they are allowed to be written as integers in the configs
object obj = cfg.ReadSettingObject("singlesidedflag", 0);
diff --git a/Source/Core/Controls/ConfigurablePictureBox.cs b/Source/Core/Controls/ConfigurablePictureBox.cs
new file mode 100644
index 00000000..cee7db23
--- /dev/null
+++ b/Source/Core/Controls/ConfigurablePictureBox.cs
@@ -0,0 +1,40 @@
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Windows.Forms;
+
+namespace CodeImp.DoomBuilder.Controls
+{
+ public class ConfigurablePictureBox : PictureBox
+ {
+ private InterpolationMode interpolationmode = InterpolationMode.NearestNeighbor;
+ private SmoothingMode smoothingmode = SmoothingMode.Default;
+ private CompositingQuality compositingquality = CompositingQuality.Default;
+ private PixelOffsetMode pixeloffsetmode = PixelOffsetMode.None;
+ private GraphicsUnit pageunit = GraphicsUnit.Pixel;
+
+ public InterpolationMode InterpolationMode { get { return interpolationmode; } set { interpolationmode = value; } }
+ public SmoothingMode SmoothingMode { get { return smoothingmode; } set { smoothingmode = value; } }
+ public CompositingQuality CompositingQuality { get { return compositingquality; } set { compositingquality = value; } }
+ public PixelOffsetMode PixelOffsetMode { get { return pixeloffsetmode; } set { pixeloffsetmode = value; } }
+ public GraphicsUnit PageUnit { get { return pageunit; } set { pageunit = value; } }
+
+ /*public ConfigurablePictureBox()
+ {
+ InterpolationMode = InterpolationMode.NearestNeighbor;
+ SmoothingMode = SmoothingMode.Default;
+ CompositingQuality = CompositingQuality.Default;
+ PixelOffsetMode = PixelOffsetMode.None;
+ PageUnit = GraphicsUnit.Pixel;
+ }*/
+
+ protected override void OnPaint(PaintEventArgs pe)
+ {
+ pe.Graphics.InterpolationMode = InterpolationMode;
+ pe.Graphics.SmoothingMode = SmoothingMode;
+ pe.Graphics.CompositingQuality = CompositingQuality;
+ pe.Graphics.PageUnit = PageUnit;
+ pe.Graphics.PixelOffsetMode = PixelOffsetMode;
+ base.OnPaint(pe);
+ }
+ }
+}
diff --git a/Source/Core/Controls/DebugConsole.cs b/Source/Core/Controls/DebugConsole.cs
index 3c19ad51..dd5a9393 100644
--- a/Source/Core/Controls/DebugConsole.cs
+++ b/Source/Core/Controls/DebugConsole.cs
@@ -27,15 +27,14 @@ namespace CodeImp.DoomBuilder
{
#region ================== Variables
- private static readonly List> messages = new List>(1000);
- private DebugMessageType filters;
+ private const int MAX_MESSAGES = 1024;
+ private static readonly List> messages = new List>(MAX_MESSAGES);
//Colors
private readonly Dictionary textcolors;
private readonly Dictionary textheaders;
- private static int charcount;
- private const int MAX_CHARS = short.MaxValue;
+ private DebugMessageType filters;
private static long starttime = -1;
private static DebugConsole me;
@@ -107,6 +106,7 @@ namespace CodeImp.DoomBuilder
}
else
{
+ if (messages.Count + 1 > MAX_MESSAGES) lock (messages) { messages.RemoveAt(0); }
messages.Add(new KeyValuePair(type, text));
if(me != null && (me.filters & type) == type)
{
@@ -130,7 +130,6 @@ namespace CodeImp.DoomBuilder
{
if (me != null) me.console.Clear();
messages.Clear();
- charcount = 0;
}
}
@@ -163,18 +162,6 @@ namespace CodeImp.DoomBuilder
private void AddMessage(DebugMessageType type, string text, bool scroll)
{
text = textheaders[type] + text;
- bool updatemessages = false;
-
- while (charcount + text.Length > MAX_CHARS)
- {
- charcount -= messages[0].Value.Length;
- messages.RemoveAt(0);
- updatemessages = true;
- }
-
- if(updatemessages) UpdateMessages();
- charcount += text.Length;
-
console.SelectionStart = console.TextLength;
console.SelectionColor = textcolors[type];
console.AppendText(text);
@@ -197,7 +184,6 @@ namespace CodeImp.DoomBuilder
private void UpdateMessages()
{
console.Clear();
- charcount = 0;
console.SuspendLayout();
foreach (KeyValuePair pair in messages)
diff --git a/Source/Core/Controls/FlatSelectorControl.cs b/Source/Core/Controls/FlatSelectorControl.cs
index 3c09444f..881d4c81 100644
--- a/Source/Core/Controls/FlatSelectorControl.cs
+++ b/Source/Core/Controls/FlatSelectorControl.cs
@@ -61,10 +61,10 @@ namespace CodeImp.DoomBuilder.Controls
if(string.IsNullOrEmpty(texture.FullName) || texture is UnknownImage) DisplayImageSize(0, 0); //mxd
else DisplayImageSize(texture.ScaledWidth, texture.ScaledHeight); //mxd
- if(!texture.IsPreviewLoaded) timer.Start(); //mxd
+ if(usepreviews ? !texture.IsPreviewLoaded : !texture.IsImageLoaded) timer.Start(); //mxd
// Set the image
- return texture.GetPreview();
+ return (usepreviews ? texture.GetPreview() : texture.GetBitmap());
}
}
diff --git a/Source/Core/Controls/ImageBrowserControl.Designer.cs b/Source/Core/Controls/ImageBrowserControl.Designer.cs
index 7a6352cb..23c337fd 100644
--- a/Source/Core/Controls/ImageBrowserControl.Designer.cs
+++ b/Source/Core/Controls/ImageBrowserControl.Designer.cs
@@ -100,6 +100,7 @@ namespace CodeImp.DoomBuilder.Controls
// list
//
this.list.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.list.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.list.HideSelection = false;
this.list.Location = new System.Drawing.Point(0, 0);
this.list.MultiSelect = false;
@@ -132,6 +133,7 @@ namespace CodeImp.DoomBuilder.Controls
this.filterHeight.AllowRelative = false;
this.filterHeight.ButtonStep = 1;
this.filterHeight.ButtonStepFloat = 1F;
+ this.filterHeight.ButtonStepsWrapAround = false;
this.filterHeight.Location = new System.Drawing.Point(410, 4);
this.filterHeight.Name = "filterHeight";
this.filterHeight.Size = new System.Drawing.Size(54, 24);
@@ -156,6 +158,7 @@ namespace CodeImp.DoomBuilder.Controls
this.filterWidth.AllowRelative = false;
this.filterWidth.ButtonStep = 1;
this.filterWidth.ButtonStepFloat = 1F;
+ this.filterWidth.ButtonStepsWrapAround = false;
this.filterWidth.Location = new System.Drawing.Point(308, 4);
this.filterWidth.Name = "filterWidth";
this.filterWidth.Size = new System.Drawing.Size(54, 24);
diff --git a/Source/Core/Controls/ImageBrowserControl.cs b/Source/Core/Controls/ImageBrowserControl.cs
index 3139b54a..01a4f756 100644
--- a/Source/Core/Controls/ImageBrowserControl.cs
+++ b/Source/Core/Controls/ImageBrowserControl.cs
@@ -69,7 +69,6 @@ namespace CodeImp.DoomBuilder.Controls
public bool PreventSelection { get { return preventselection; } set { preventselection = value; } }
public bool HideInputBox { get { return splitter.Panel2Collapsed; } set { splitter.Panel2Collapsed = value; } }
public bool BrowseFlats { get { return browseFlats; } set { browseFlats = value; } } //mxd
- //public string LabelText { get { return label.Text; } set { label.Text = value; objectname.Left = label.Right + label.Margin.Right + objectname.Margin.Left; } } //mxd
public ListViewItem SelectedItem { get { if(list.SelectedItems.Count > 0) return list.SelectedItems[0]; else return null; } }
#endregion
@@ -108,9 +107,12 @@ namespace CodeImp.DoomBuilder.Controls
list.TileSize = new Size(itemwidth, itemheight);
//mxd
- if(General.Map.Config.MixTexturesFlats) {
+ if(General.Map.Config.MixTexturesFlats)
+ {
cbMixMode.SelectedIndex = mixMode;
- } else {
+ }
+ else
+ {
labelMixMode.Visible = false;
cbMixMode.Visible = false;
label.Left = labelMixMode.Left;
@@ -261,7 +263,8 @@ namespace CodeImp.DoomBuilder.Controls
}
//mxd
- private void cbMixMode_SelectedIndexChanged(object sender, EventArgs e) {
+ private void cbMixMode_SelectedIndexChanged(object sender, EventArgs e)
+ {
mixMode = cbMixMode.SelectedIndex;
RefillList(false);
}
@@ -278,9 +281,11 @@ namespace CodeImp.DoomBuilder.Controls
ListViewItem selected = list.SelectedItems[0];
//mxd
- foreach(ListViewItem n in visibleitems) {
+ foreach(ListViewItem n in visibleitems)
+ {
if(n == selected) continue;
- if(n.Text == selected.Text) {
+ if(n.Text == selected.Text)
+ {
n.Selected = true;
n.Focused = true;
n.EnsureVisible();
@@ -293,7 +298,7 @@ namespace CodeImp.DoomBuilder.Controls
// This selects an item by name
public void SelectItem(string name, ListViewGroup preferredgroup)
{
- ListViewItem lvi = null;
+ ImageBrowserItem lvi = null; //mxd
// Not when selecting is prevented
if(preventselection) return;
@@ -303,9 +308,10 @@ namespace CodeImp.DoomBuilder.Controls
{
foreach(ListViewItem item in list.Items)
{
- if(string.Compare(item.Text, name, true) == 0)
+ ImageBrowserItem curitem = item as ImageBrowserItem;
+ if(curitem != null && string.Compare(curitem.icon.Name, name, true) == 0)
{
- lvi = item;
+ lvi = curitem;
if(item.Group == preferredgroup) break;
}
}
@@ -326,9 +332,6 @@ namespace CodeImp.DoomBuilder.Controls
// This performs item sleection by keys
private void SelectNextItem(SearchDirectionHint dir)
{
- ListViewItem lvi;
- Point spos;
-
// Not when selecting is prevented
if(preventselection) return;
@@ -341,9 +344,9 @@ namespace CodeImp.DoomBuilder.Controls
else
{
// Get selected item
- lvi = list.SelectedItems[0];
+ ListViewItem lvi = list.SelectedItems[0];
Rectangle lvirect = list.GetItemRect(lvi.Index, ItemBoundsPortion.Entire);
- spos = new Point(lvirect.Location.X + lvirect.Width / 2, lvirect.Y + lvirect.Height / 2);
+ Point spos = new Point(lvirect.Location.X + lvirect.Width / 2, lvirect.Y + lvirect.Height / 2);
// Try finding 5 times in the given direction
for(int i = 0; i < 5; i++)
@@ -378,8 +381,6 @@ namespace CodeImp.DoomBuilder.Controls
// This selectes the first item
private void SelectFirstItem()
{
- ListViewItem lvi;
-
// Not when selecting is prevented
if(preventselection) return;
@@ -387,7 +388,7 @@ namespace CodeImp.DoomBuilder.Controls
if(list.Items.Count > 0)
{
list.SelectedItems.Clear();
- lvi = list.GetItemAt(list.TileSize.Width / 2, list.TileSize.Height / 2);
+ ListViewItem lvi = list.GetItemAt(list.TileSize.Width / 2, list.TileSize.Height / 2);
if(lvi != null)
{
lvi.Selected = true;
@@ -424,14 +425,6 @@ namespace CodeImp.DoomBuilder.Controls
// This ends adding items
public void EndAdding()
{
- //mxd. Do we need to change item width?
- if (longestTextureName.Length > 8)
- {
- Graphics g = Graphics.FromImage(new Bitmap(1, 1));
- SizeF size = g.MeasureString(longestTextureName, list.Font);
- list.TileSize = new Size((int)(size.Width + 12), list.TileSize.Height);
- }
-
// Fill list with items
RefillList(true);
diff --git a/Source/Core/Controls/ImageBrowserItem.cs b/Source/Core/Controls/ImageBrowserItem.cs
index b02696bf..654b9d55 100644
--- a/Source/Core/Controls/ImageBrowserItem.cs
+++ b/Source/Core/Controls/ImageBrowserItem.cs
@@ -29,6 +29,12 @@ namespace CodeImp.DoomBuilder.Controls
{
internal class ImageBrowserItem : ListViewItem, IComparable
{
+ #region ================== Constants
+
+ private const int MAX_DISPLAY_NAME_LENGTH = 16; //mxd
+
+ #endregion
+
#region ================== Variables
// Display image and text
@@ -58,6 +64,9 @@ namespace CodeImp.DoomBuilder.Controls
{
// Initialize
this.Text = text;
+ if (text.Length > MAX_DISPLAY_NAME_LENGTH) text = text.Substring(0, MAX_DISPLAY_NAME_LENGTH); //mxd
+ this.displaytext = text;
+
if(General.Settings.ShowTextureSizes)
this.displaytext = text + "\n" + icon.ScaledWidth + " x " + icon.ScaledHeight;
else
diff --git a/Source/Core/Controls/ImageSelectorControl.Designer.cs b/Source/Core/Controls/ImageSelectorControl.Designer.cs
index b0503cf5..28359a77 100644
--- a/Source/Core/Controls/ImageSelectorControl.Designer.cs
+++ b/Source/Core/Controls/ImageSelectorControl.Designer.cs
@@ -32,34 +32,32 @@ namespace CodeImp.DoomBuilder.Controls
this.components = new System.ComponentModel.Container();
this.preview = new System.Windows.Forms.Panel();
this.labelSize = new System.Windows.Forms.Label();
- this.name = new CodeImp.DoomBuilder.Controls.AutoSelectTextbox();
+ this.imagebox = new CodeImp.DoomBuilder.Controls.ConfigurablePictureBox();
this.timer = new System.Windows.Forms.Timer(this.components);
+ this.tooltip = new System.Windows.Forms.ToolTip(this.components);
+ this.name = new CodeImp.DoomBuilder.Controls.AutoSelectTextbox();
this.preview.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.imagebox)).BeginInit();
this.SuspendLayout();
//
// preview
//
this.preview.BackColor = System.Drawing.SystemColors.AppWorkspace;
this.preview.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
- this.preview.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+ this.preview.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.preview.Controls.Add(this.labelSize);
+ this.preview.Controls.Add(this.imagebox);
this.preview.Location = new System.Drawing.Point(0, 0);
this.preview.Name = "preview";
this.preview.Size = new System.Drawing.Size(68, 60);
this.preview.TabIndex = 1;
- this.preview.MouseLeave += new System.EventHandler(this.preview_MouseLeave);
- this.preview.MouseMove += new System.Windows.Forms.MouseEventHandler(this.preview_MouseMove);
- this.preview.Click += new System.EventHandler(this.preview_Click);
- this.preview.MouseDown += new System.Windows.Forms.MouseEventHandler(this.preview_MouseDown);
- this.preview.MouseUp += new System.Windows.Forms.MouseEventHandler(this.preview_MouseUp);
- this.preview.MouseEnter += new System.EventHandler(this.preview_MouseEnter);
//
// labelSize
//
this.labelSize.AutoSize = true;
- this.labelSize.BackColor = System.Drawing.Color.Black;
+ this.labelSize.BackColor = System.Drawing.SystemColors.ControlText;
this.labelSize.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
- this.labelSize.ForeColor = System.Drawing.Color.White;
+ this.labelSize.ForeColor = System.Drawing.SystemColors.HighlightText;
this.labelSize.Location = new System.Drawing.Point(1, 1);
this.labelSize.MaximumSize = new System.Drawing.Size(0, 13);
this.labelSize.Name = "labelSize";
@@ -68,6 +66,30 @@ namespace CodeImp.DoomBuilder.Controls
this.labelSize.Text = "128x128";
this.labelSize.Visible = false;
//
+ // imagebox
+ //
+ this.imagebox.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
+ this.imagebox.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.Default;
+ this.imagebox.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.imagebox.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
+ this.imagebox.Location = new System.Drawing.Point(0, 0);
+ this.imagebox.Name = "imagebox";
+ this.imagebox.PageUnit = System.Drawing.GraphicsUnit.Pixel;
+ this.imagebox.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.None;
+ this.imagebox.Size = new System.Drawing.Size(66, 58);
+ this.imagebox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+ this.imagebox.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.Default;
+ this.imagebox.TabIndex = 3;
+ this.imagebox.TabStop = false;
+ this.imagebox.MouseLeave += new System.EventHandler(this.preview_MouseLeave);
+ this.imagebox.Click += new System.EventHandler(this.preview_Click);
+ this.imagebox.MouseDown += new System.Windows.Forms.MouseEventHandler(this.preview_MouseDown);
+ this.imagebox.MouseEnter += new System.EventHandler(this.preview_MouseEnter);
+ //
+ // timer
+ //
+ this.timer.Tick += new System.EventHandler(this.timer_Tick);
+ //
// name
//
this.name.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
@@ -79,11 +101,6 @@ namespace CodeImp.DoomBuilder.Controls
this.name.TabIndex = 2;
this.name.TextChanged += new System.EventHandler(this.name_TextChanged);
//
- // timer
- //
- this.timer.Interval = 1000;
- this.timer.Tick += new System.EventHandler(this.timer_Tick);
- //
// ImageSelectorControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@@ -97,6 +114,7 @@ namespace CodeImp.DoomBuilder.Controls
this.EnabledChanged += new System.EventHandler(this.ImageSelectorControl_EnabledChanged);
this.preview.ResumeLayout(false);
this.preview.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.imagebox)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -108,6 +126,8 @@ namespace CodeImp.DoomBuilder.Controls
protected CodeImp.DoomBuilder.Controls.AutoSelectTextbox name;
private System.Windows.Forms.Label labelSize;
protected System.Windows.Forms.Timer timer;
+ private System.Windows.Forms.ToolTip tooltip;
+ private ConfigurablePictureBox imagebox;
}
}
diff --git a/Source/Core/Controls/ImageSelectorControl.cs b/Source/Core/Controls/ImageSelectorControl.cs
index b1c69db7..adee35c6 100644
--- a/Source/Core/Controls/ImageSelectorControl.cs
+++ b/Source/Core/Controls/ImageSelectorControl.cs
@@ -36,17 +36,18 @@ namespace CodeImp.DoomBuilder.Controls
public event EventHandler OnValueChanged; //mxd
private Bitmap bmp;
- private bool ismouseinside;
private MouseButtons button;
private string previousImageName; //mxd
protected bool multipletextures; //mxd
+ protected bool usepreviews = true; //mxd
#endregion
#region ================== Properties
public string TextureName { get { return name.Text; } set { name.Text = value; } }
-
+ public bool UsePreviews { get { return usepreviews; } set { usepreviews = value; } } //mxd
+
[Browsable(false)]
public bool MultipleTextures { get { return multipletextures; } set { multipletextures = value; } }
@@ -67,6 +68,7 @@ namespace CodeImp.DoomBuilder.Controls
// set the max length of texture names
name.MaxLength = General.Map.Config.MaxTextureNameLength;
if(General.Settings.CapitalizeTextureNames) this.name.CharacterCasing = CharacterCasing.Upper; //mxd
+ labelSize.BackColor = Color.FromArgb(196, labelSize.BackColor);
}
#endregion
@@ -92,8 +94,7 @@ namespace CodeImp.DoomBuilder.Controls
// Image clicked
private void preview_Click(object sender, EventArgs e)
{
- preview.BackColor = SystemColors.Highlight;
- ShowPreview(FindImage(name.Text));
+ imagebox.BackColor = SystemColors.Highlight;
if(button == MouseButtons.Right)
{
name.Text = "-";
@@ -109,6 +110,9 @@ namespace CodeImp.DoomBuilder.Controls
{
// Show it centered
ShowPreview(FindImage(name.Text));
+
+ // Update tooltip (mxd)
+ tooltip.SetToolTip(imagebox, name.Text);
}
// Mouse pressed
@@ -117,44 +121,20 @@ namespace CodeImp.DoomBuilder.Controls
button = e.Button;
if((button == MouseButtons.Left) || ((button == MouseButtons.Right)))
{
- //ispressed = true;
- preview.BackColor = AdjustedColor(SystemColors.Highlight, 0.2f);
- ShowPreview(FindImage(name.Text));
+ imagebox.BackColor = AdjustedColor(SystemColors.Highlight, 0.2f);
}
}
- // Mouse released
- private void preview_MouseUp(object sender, MouseEventArgs e)
- {
- //ispressed = false;
- ShowPreview(FindImage(name.Text));
- }
-
// Mouse leaves
private void preview_MouseLeave(object sender, EventArgs e)
{
- //ispressed = false;
- ismouseinside = false;
- preview.BackColor = SystemColors.AppWorkspace;
+ imagebox.BackColor = SystemColors.AppWorkspace;
}
// Mouse enters
private void preview_MouseEnter(object sender, EventArgs e)
{
- ismouseinside = true;
- preview.BackColor = SystemColors.Highlight;
- ShowPreview(FindImage(name.Text));
- }
-
- // Mouse moves
- private void preview_MouseMove(object sender, MouseEventArgs e)
- {
- if(!ismouseinside)
- {
- ismouseinside = true;
- preview.BackColor = SystemColors.Highlight;
- ShowPreview(FindImage(name.Text));
- }
+ imagebox.BackColor = SystemColors.Highlight;
}
//mxd
@@ -185,7 +165,7 @@ namespace CodeImp.DoomBuilder.Controls
private void ShowPreview(Image image)
{
// Dispose old image
- preview.BackgroundImage = null;
+ imagebox.BackgroundImage = null;
if(bmp != null)
{
bmp.Dispose();
@@ -195,12 +175,13 @@ namespace CodeImp.DoomBuilder.Controls
if(image != null)
{
// Show it centered
- General.DisplayZoomedImage(preview, image);
- preview.Refresh();
+ imagebox.Image = image;
+ imagebox.Refresh();
}
//mxd. Dispatch event
- if(OnValueChanged != null && previousImageName != name.Text) {
+ if(OnValueChanged != null && previousImageName != name.Text)
+ {
previousImageName = name.Text;
OnValueChanged(this, EventArgs.Empty);
}
diff --git a/Source/Core/Controls/ImageSelectorControl.resx b/Source/Core/Controls/ImageSelectorControl.resx
index 981d2452..5298bd52 100644
--- a/Source/Core/Controls/ImageSelectorControl.resx
+++ b/Source/Core/Controls/ImageSelectorControl.resx
@@ -120,12 +120,15 @@
True
-
- True
-
17, 17
+
+ 97, 17
+
+
+ True
+
True
diff --git a/Source/Core/Controls/LinedefInfoPanel.cs b/Source/Core/Controls/LinedefInfoPanel.cs
index 3b99131b..c5763971 100644
--- a/Source/Core/Controls/LinedefInfoPanel.cs
+++ b/Source/Core/Controls/LinedefInfoPanel.cs
@@ -35,6 +35,7 @@ namespace CodeImp.DoomBuilder.Controls
private int doomformatwidth;
private List fieldInfos;
private int[] labelPositionsY = new[] { 39, 58, 77 }; //mxd
+ private const int defaultPanelWidth = 270; //mxd
// Constructor
public LinedefInfoPanel()
@@ -52,12 +53,10 @@ namespace CodeImp.DoomBuilder.Controls
{
bool upperunpegged, lowerunpegged;
string peggedness;
- int defaultPanelWidth = 270; //mxd
//mxd
- if (General.Map.UDMF && fieldInfos == null) {
+ if (General.Map.UDMF && fieldInfos == null)
fieldInfos = General.Map.Config.SidedefFields;
- }
// Show/hide stuff depending on format
if(!General.Map.FormatInterface.HasActionArgs)
@@ -90,15 +89,18 @@ namespace CodeImp.DoomBuilder.Controls
}
//mxd. Hide activation or tag and rearrange labels
- if(!General.Map.FormatInterface.HasBuiltInActivations && General.Map.FormatInterface.HasNumericLinedefActivations) { //Hexen map format?
+ if(!General.Map.FormatInterface.HasBuiltInActivations && General.Map.FormatInterface.HasNumericLinedefActivations) //Hexen map format?
+ {
activation.Visible = true;
activationlabel.Visible = true;
taglabel.Visible = false;
tag.Visible = false;
//set activation
- foreach(LinedefActivateInfo ai in General.Map.Config.LinedefActivates) {
- if(l.Activate == ai.Index) {
+ foreach(LinedefActivateInfo ai in General.Map.Config.LinedefActivates)
+ {
+ if(l.Activate == ai.Index)
+ {
activation.Text = ai.Title;
break;
}
@@ -118,8 +120,9 @@ namespace CodeImp.DoomBuilder.Controls
anglelabel.Top = labelPositionsY[2];
backoffset.Top = labelPositionsY[2];
backoffsetlabel.Top = labelPositionsY[2];
-
- } else {
+ }
+ else
+ {
activation.Visible = false;
activationlabel.Visible = false;
taglabel.Visible = true;
@@ -187,11 +190,10 @@ namespace CodeImp.DoomBuilder.Controls
arg5.Enabled = act.Args[4].Used;
//mxd
- if (hasArg0Str) {
+ if (hasArg0Str)
arg1.Text = '"' + l.Fields["arg0str"].Value.ToString() + '"';
- } else {
+ else
setArgumentText(act.Args[0], arg1, l.Args[0]);
- }
setArgumentText(act.Args[1], arg2, l.Args[1]);
setArgumentText(act.Args[2], arg3, l.Args[2]);
setArgumentText(act.Args[3], arg4, l.Args[3]);
@@ -210,7 +212,8 @@ namespace CodeImp.DoomBuilder.Controls
frontsector.Visible = true;
//mxd
- if(General.Map.UDMF) {
+ if(General.Map.UDMF)
+ {
//light
frontoffsetlabel.Text = "Front light:";
setUDMFLight(l.Front, frontoffsetlabel, frontoffset);
@@ -249,7 +252,9 @@ namespace CodeImp.DoomBuilder.Controls
if(hasTopFields) addedWidth = 64;
if(hasMiddleFields) addedWidth += 64;
if(hasBottomFields) addedWidth += 64;
- } else {
+ }
+ else
+ {
frontoffsetlabel.Text = "Front offset:";
frontoffset.Text = l.Front.OffsetX + ", " + l.Front.OffsetY;
frontoffsetlabel.Enabled = true;
@@ -264,12 +269,10 @@ namespace CodeImp.DoomBuilder.Controls
frontpanel.Width = defaultPanelWidth + addedWidth + 12;
flowLayoutPanelFront.Width = defaultPanelWidth + addedWidth;
- fronthighname.Text = l.Front.HighTexture;
- frontmidname.Text = l.Front.MiddleTexture;
- frontlowname.Text = l.Front.LowTexture;
- DisplaySidedefTexture(fronthightex, labelTextureFrontTop, l.Front.HighTexture, l.Front.HighRequired());
- DisplaySidedefTexture(frontmidtex, labelTextureFrontMid, l.Front.MiddleTexture, l.Front.MiddleRequired());
- DisplaySidedefTexture(frontlowtex, labelTextureFrontBottom, l.Front.LowTexture, l.Front.LowRequired());
+ // Show textures
+ DisplaySidedefTexture(fronthightex, fronthighname, labelTextureFrontTop, l.Front.HighTexture, l.Front.HighRequired());
+ DisplaySidedefTexture(frontmidtex, frontmidname, labelTextureFrontMid, l.Front.MiddleTexture, l.Front.MiddleRequired());
+ DisplaySidedefTexture(frontlowtex, frontlowname, labelTextureFrontBottom, l.Front.LowTexture, l.Front.LowRequired());
//mxd. Position label
frontsector.Left = frontpanel.Width - frontsector.Width - 12;
@@ -277,11 +280,13 @@ namespace CodeImp.DoomBuilder.Controls
else
{
// Show no info
- //mxd
- if(General.Map.UDMF) {
+ if(General.Map.UDMF) //mxd
+ {
frontoffsetlabel.Text = "Front light:";
frontoffset.Text = "--";
- } else {
+ }
+ else
+ {
frontoffsetlabel.Text = "Front offset:";
frontoffset.Text = "--, --";
}
@@ -362,12 +367,10 @@ namespace CodeImp.DoomBuilder.Controls
backpanel.Width = defaultPanelWidth + addedWidth + 12;
flowLayoutPanelBack.Width = defaultPanelWidth + addedWidth;
- backhighname.Text = l.Back.HighTexture;
- backmidname.Text = l.Back.MiddleTexture;
- backlowname.Text = l.Back.LowTexture;
- DisplaySidedefTexture(backhightex, labelTextureBackTop, l.Back.HighTexture, l.Back.HighRequired());
- DisplaySidedefTexture(backmidtex, labelTextureBackMid, l.Back.MiddleTexture, l.Back.MiddleRequired());
- DisplaySidedefTexture(backlowtex, labelTextureBackBottom, l.Back.LowTexture, l.Back.LowRequired());
+ // Show textures
+ DisplaySidedefTexture(backhightex, backhighname, labelTextureBackTop, l.Back.HighTexture, l.Back.HighRequired());
+ DisplaySidedefTexture(backmidtex, backmidname, labelTextureBackMid, l.Back.MiddleTexture, l.Back.MiddleRequired());
+ DisplaySidedefTexture(backlowtex, backlowname, labelTextureBackBottom, l.Back.LowTexture, l.Back.LowRequired());
//mxd. Position label
backsector.Left = backpanel.Width - backsector.Width - 12;
@@ -375,11 +378,13 @@ namespace CodeImp.DoomBuilder.Controls
else
{
// Show no info
- //mxd
- if(General.Map.UDMF) {
+ if(General.Map.UDMF) //mxd
+ {
backoffsetlabel.Text = "Back light:";
backoffset.Text = "--";
- } else {
+ }
+ else
+ {
backoffsetlabel.Text = "Back offset:";
backoffset.Text = "--, --";
}
@@ -396,21 +401,21 @@ namespace CodeImp.DoomBuilder.Controls
//mxd. Flags
Dictionary activations = new Dictionary(StringComparer.Ordinal);
- foreach(LinedefActivateInfo ai in General.Map.Config.LinedefActivates) {
+ foreach(LinedefActivateInfo ai in General.Map.Config.LinedefActivates)
activations.Add(ai.Key, ai.Title);
- }
flags.Items.Clear();
- foreach(KeyValuePair group in l.Flags) {
- if(group.Value) {
+ foreach(KeyValuePair group in l.Flags)
+ {
+ if(group.Value)
+ {
ListViewItem item;
- if (General.Map.Config.LinedefFlags.ContainsKey(group.Key)) {
+ if (General.Map.Config.LinedefFlags.ContainsKey(group.Key))
item = new ListViewItem(General.Map.Config.LinedefFlags[group.Key]);
- } else if (activations.ContainsKey(group.Key)) {
+ else if (activations.ContainsKey(group.Key))
item = new ListViewItem(activations[group.Key]);
- } else {
+ else
item = new ListViewItem(group.Key);
- }
item.Checked = true;
flags.Items.Add(item);
@@ -419,7 +424,8 @@ namespace CodeImp.DoomBuilder.Controls
//mxd. Flags panel visibility and size
flagsPanel.Visible = (flags.Items.Count > 0);
- if(flags.Items.Count > 0) {
+ if(flags.Items.Count > 0)
+ {
int itemWidth = flags.Items[0].GetBounds(ItemBoundsPortion.Entire).Width;
if(itemWidth == 0) itemWidth = 96;
flags.Width = itemWidth * (int)Math.Ceiling(flags.Items.Count / 5.0f);
@@ -432,7 +438,8 @@ namespace CodeImp.DoomBuilder.Controls
}
//mxd
- private bool checkPairedUDMFFields(UniFields fields, string paramX, string paramY, Label label, Label value) {
+ private bool checkPairedUDMFFields(UniFields fields, string paramX, string paramY, Label label, Label value)
+ {
float dx = getDefaultUDMFValue(paramX);
float dy = getDefaultUDMFValue(paramY);
float x = dx;
@@ -443,7 +450,8 @@ namespace CodeImp.DoomBuilder.Controls
if(fields.ContainsKey(paramY))
y = (float)fields[paramY].Value;
- if(x != dx || y != dy) {
+ if(x != dx || y != dy)
+ {
value.Text = String.Format("{0:0.##}", x) + ", " + String.Format("{0:0.##}", y);
value.Enabled = true;
label.Enabled = true;
@@ -459,7 +467,8 @@ namespace CodeImp.DoomBuilder.Controls
//mxd
private static void setUDMFLight(Sidedef sd, Label label, Label value)
{
- if(sd.Fields.ContainsKey("light")) {
+ if(sd.Fields.ContainsKey("light"))
+ {
int light = (int)sd.Fields["light"].Value;
if (sd.Fields.ContainsKey("lightabsolute") && Boolean.Parse(sd.Fields["lightabsolute"].Value.ToString()))
@@ -469,7 +478,9 @@ namespace CodeImp.DoomBuilder.Controls
value.Enabled = true;
label.Enabled = true;
- } else {
+ }
+ else
+ {
value.Text = "--";
label.Enabled = false;
value.Enabled = false;
@@ -479,9 +490,8 @@ namespace CodeImp.DoomBuilder.Controls
//mxd
private float getDefaultUDMFValue(string valueName)
{
- foreach (UniversalFieldInfo fi in fieldInfos) {
+ foreach (UniversalFieldInfo fi in fieldInfos)
if (fi.Name == valueName) return (float)fi.Default;
- }
return 0;
}
@@ -494,9 +504,8 @@ namespace CodeImp.DoomBuilder.Controls
if(value < 1 || !General.Map.Options.TagLabels.ContainsKey(value)) return;
- if(th is ThingTagHandler || th is LinedefTagHandler || th is SectorTagHandler) {
+ if(th is ThingTagHandler || th is LinedefTagHandler || th is SectorTagHandler)
label.Text += " (" + General.Map.Options.TagLabels[value] + ")";
- }
}
// When visible changed
@@ -518,29 +527,39 @@ namespace CodeImp.DoomBuilder.Controls
}
// This shows a sidedef texture in a panel
- private static void DisplaySidedefTexture(Panel panel, Label label, string name, bool required)
+ private static void DisplaySidedefTexture(Panel panel, Label namelabel, Label sizelabel, string name, bool required)
{
// Check if name is a "none" texture
if((name.Length < 1) || (name == "-"))
{
- label.Visible = false; //mxd
+ sizelabel.Visible = false; //mxd
// Determine image to show
if(required)
General.DisplayZoomedImage(panel, Properties.Resources.MissingTexture);
else
panel.BackgroundImage = null;
+
+ // Set texture name
+ namelabel.Text = "-";
}
else
{
//mxd
ImageData texture = General.Map.Data.GetTextureImage(name);
- if(General.Settings.ShowTextureSizes && texture.ImageState == ImageLoadState.Ready && !(texture is UnknownImage)) {
- label.Visible = true;
- label.Text = texture.ScaledWidth + "x" + texture.ScaledHeight;
- } else {
- label.Visible = false;
+ bool unknowntexture = texture is UnknownImage;
+ if(General.Settings.ShowTextureSizes && texture.ImageState == ImageLoadState.Ready && !unknowntexture)
+ {
+ sizelabel.Visible = true;
+ sizelabel.Text = texture.ScaledWidth + "x" + texture.ScaledHeight;
+ }
+ else
+ {
+ sizelabel.Visible = false;
}
+
+ // Set texture name
+ namelabel.Text = (unknowntexture ? name : texture.DisplayName);
// Set the image
General.DisplayZoomedImage(panel, texture.GetPreview());
diff --git a/Source/Core/Controls/ResourceListEditor.cs b/Source/Core/Controls/ResourceListEditor.cs
index fded9f6b..b501edd0 100644
--- a/Source/Core/Controls/ResourceListEditor.cs
+++ b/Source/Core/Controls/ResourceListEditor.cs
@@ -170,13 +170,11 @@ namespace CodeImp.DoomBuilder.Controls
// This adds a normal item
private void AddItem(DataLocation rl)
{
- int index;
-
// Start editing list
resourceitems.BeginUpdate();
// Add item
- index = resourceitems.Items.Count;
+ int index = resourceitems.Items.Count;
resourceitems.Items.Add(new ListViewItem(rl.location));
resourceitems.Items[index].Tag = rl;
resourceitems.Items[index].ImageIndex = GetIconIndex(rl.type, false);
@@ -189,22 +187,30 @@ namespace CodeImp.DoomBuilder.Controls
}
//mxd
- internal void DropItem(IDataObject data) {
+ internal void DropItem(IDataObject data)
+ {
if(!data.GetDataPresent(DataFormats.FileDrop)) return;
string[] paths = (string[])data.GetData(DataFormats.FileDrop);
- foreach(string path in paths) {
- if(File.Exists(path)) {
+ foreach(string path in paths)
+ {
+ if(File.Exists(path))
+ {
string ext = Path.GetExtension(path);
- if(string.IsNullOrEmpty(ext))
- continue;
+ if(string.IsNullOrEmpty(ext)) continue;
+
ext = ext.ToLower();
- if(ext == ".wad") {
+ if(ext == ".wad")
+ {
AddItem(new DataLocation(DataLocation.RESOURCE_WAD, path, false, false, false));
- } else if(ext == ".pk3" || ext == ".pk7") {
+ }
+ else if(ext == ".pk3" || ext == ".pk7")
+ {
AddItem(new DataLocation(DataLocation.RESOURCE_PK3, path, false, false, false));
}
- } else if(Directory.Exists(path)) {
+ }
+ else if(Directory.Exists(path))
+ {
AddItem(new DataLocation(DataLocation.RESOURCE_DIRECTORY, path, false, false, false));
}
}
@@ -227,13 +233,10 @@ namespace CodeImp.DoomBuilder.Controls
// Add a resource
private void addresource_Click(object sender, EventArgs e)
{
- ResourceOptionsForm resoptions;
- Rectangle startposition;
-
// Open resource options dialog
- resoptions = new ResourceOptionsForm(new DataLocation(), "Add Resource", StartPath);
+ ResourceOptionsForm resoptions = new ResourceOptionsForm(new DataLocation(), "Add Resource", StartPath);
resoptions.StartPosition = FormStartPosition.Manual;
- startposition = new Rectangle(dialogoffset.X, dialogoffset.Y, 1, 1);
+ Rectangle startposition = new Rectangle(dialogoffset.X, dialogoffset.Y, 1, 1);
startposition = this.RectangleToScreen(startposition);
Screen screen = Screen.FromPoint(startposition.Location);
if(startposition.X + resoptions.Size.Width > screen.WorkingArea.Right)
@@ -254,21 +257,16 @@ namespace CodeImp.DoomBuilder.Controls
// Edit resource
private void editresource_Click(object sender, EventArgs e)
{
- ResourceOptionsForm resoptions;
- Rectangle startposition;
- ListViewItem selecteditem;
- DataLocation rl;
-
// Anything selected?
if(resourceitems.SelectedItems.Count > 0)
{
// Get selected item
- selecteditem = resourceitems.SelectedItems[0];
+ ListViewItem selecteditem = resourceitems.SelectedItems[0];
// Open resource options dialog
- resoptions = new ResourceOptionsForm((DataLocation)selecteditem.Tag, "Resource Options", StartPath);
+ ResourceOptionsForm resoptions = new ResourceOptionsForm((DataLocation)selecteditem.Tag, "Resource Options", StartPath);
resoptions.StartPosition = FormStartPosition.Manual;
- startposition = new Rectangle(dialogoffset.X, dialogoffset.Y, 1, 1);
+ Rectangle startposition = new Rectangle(dialogoffset.X, dialogoffset.Y, 1, 1);
startposition = this.RectangleToScreen(startposition);
Screen screen = Screen.FromPoint(startposition.Location);
if(startposition.X + resoptions.Size.Width > screen.WorkingArea.Right)
@@ -282,7 +280,7 @@ namespace CodeImp.DoomBuilder.Controls
resourceitems.BeginUpdate();
// Update item
- rl = resoptions.ResourceLocation;
+ DataLocation rl = resoptions.ResourceLocation;
selecteditem.Text = rl.location;
selecteditem.Tag = rl;
selecteditem.ImageIndex = GetIconIndex(rl.type, false);
diff --git a/Source/Core/Controls/SectorInfoPanel.cs b/Source/Core/Controls/SectorInfoPanel.cs
index 639d1526..1099f654 100644
--- a/Source/Core/Controls/SectorInfoPanel.cs
+++ b/Source/Core/Controls/SectorInfoPanel.cs
@@ -29,7 +29,7 @@ namespace CodeImp.DoomBuilder.Controls
{
internal partial class SectorInfoPanel : UserControl
{
- private int fullWidth; //mxd
+ private readonly int fullWidth; //mxd
// Constructor
public SectorInfoPanel()
@@ -55,57 +55,74 @@ namespace CodeImp.DoomBuilder.Controls
tag.Text = s.Tag + (General.Map.Options.TagLabels.ContainsKey(s.Tag) ? " (" + General.Map.Options.TagLabels[s.Tag] + ")" : string.Empty);
height.Text = sheight.ToString();
brightness.Text = s.Brightness.ToString();
- floorname.Text = s.FloorTexture;
- ceilingname.Text = s.CeilTexture;
//mxd. Texture info
- if (s.LongFloorTexture == MapSet.EmptyLongName){
+ if (s.LongFloorTexture == MapSet.EmptyLongName)
+ {
labelFloorTextureSize.Visible = false;
General.DisplayZoomedImage(floortex, Properties.Resources.MissingTexture);
- } else {
- ImageData floorImage = General.Map.Data.GetFlatImage(s.FloorTexture);
- DisplayTextureSize(labelFloorTextureSize, floorImage);
- General.DisplayZoomedImage(floortex, floorImage.GetPreview());
+ floorname.Text = s.FloorTexture;
+ }
+ else
+ {
+ ImageData image = General.Map.Data.GetFlatImage(s.FloorTexture);
+ DisplayTextureSize(labelFloorTextureSize, image);
+ General.DisplayZoomedImage(floortex, image.GetPreview());
+ floorname.Text = (image is UnknownImage ? s.FloorTexture : image.DisplayName);
}
- if (s.LongCeilTexture == MapSet.EmptyLongName) {
+ if (s.LongCeilTexture == MapSet.EmptyLongName)
+ {
labelCeilTextureSize.Visible = false;
General.DisplayZoomedImage(ceilingtex, Properties.Resources.MissingTexture);
- } else {
- ImageData ceilingImage = General.Map.Data.GetFlatImage(s.CeilTexture);
- DisplayTextureSize(labelCeilTextureSize, ceilingImage); //mxd
- General.DisplayZoomedImage(ceilingtex, ceilingImage.GetPreview());
+ ceilingname.Text = s.CeilTexture;
+ }
+ else
+ {
+ ImageData image = General.Map.Data.GetFlatImage(s.CeilTexture);
+ DisplayTextureSize(labelCeilTextureSize, image); //mxd
+ General.DisplayZoomedImage(ceilingtex, image.GetPreview());
+ ceilingname.Text = (image is UnknownImage ? s.CeilTexture : image.DisplayName);
}
//mxd
bool showExtededFloorInfo = false;
bool showExtededCeilingInfo = false;
- if(General.Map.UDMF) {
- if(s.Fields != null) {
+ if(General.Map.UDMF)
+ {
+ if(s.Fields != null)
+ {
//sector colors
labelLight.Visible = true;
labelFade.Visible = true;
panelLightColor.Visible = true;
panelFadeColor.Visible = true;
- if(s.Fields.ContainsKey("lightcolor")) {
+ if(s.Fields.ContainsKey("lightcolor"))
+ {
panelLightColor.BackColor = PixelColor.FromInt(s.Fields.GetValue("lightcolor", 0xFFFFFF)).WithAlpha(255).ToColor();
labelLight.Enabled = true;
- } else {
+ }
+ else
+ {
panelLightColor.BackColor = System.Drawing.SystemColors.Control;
labelLight.Enabled = false;
}
- if(s.Fields.ContainsKey("fadecolor")) {
+ if(s.Fields.ContainsKey("fadecolor"))
+ {
panelFadeColor.BackColor = PixelColor.FromInt(s.Fields.GetValue("fadecolor", 0)).WithAlpha(255).ToColor();
labelFade.Enabled = true;
- } else {
+ }
+ else
+ {
panelFadeColor.BackColor = System.Drawing.SystemColors.Control;
labelFade.Enabled = false;
}
//light
- if(s.Fields.ContainsKey("lightceiling") || s.Fields.ContainsKey("lightceilingabsolute")) {
+ if(s.Fields.ContainsKey("lightceiling") || s.Fields.ContainsKey("lightceilingabsolute"))
+ {
showExtededCeilingInfo = true;
ceilingLight.Enabled = true;
ceilingLightLabel.Enabled = true;
@@ -117,13 +134,16 @@ namespace CodeImp.DoomBuilder.Controls
else
ceilingLight.Text = cl + " (" + Math.Min(255, Math.Max(0, (cl + s.Brightness))) + ")";
- } else {
+ }
+ else
+ {
ceilingLight.Text = "--";
ceilingLight.Enabled = false;
ceilingLightLabel.Enabled = false;
}
- if(s.Fields.ContainsKey("lightfloor") || s.Fields.ContainsKey("lightfloorabsolute")) {
+ if(s.Fields.ContainsKey("lightfloor") || s.Fields.ContainsKey("lightfloorabsolute"))
+ {
showExtededFloorInfo = true;
floorLight.Enabled = true;
floorLightLabel.Enabled = true;
@@ -135,7 +155,9 @@ namespace CodeImp.DoomBuilder.Controls
else
floorLight.Text = fl + " (" + Math.Min(255, Math.Max(0, (fl + s.Brightness))) + ")";
- } else {
+ }
+ else
+ {
floorLight.Text = "--";
floorLight.Enabled = false;
floorLightLabel.Enabled = false;
@@ -145,12 +167,15 @@ namespace CodeImp.DoomBuilder.Controls
float panX = s.Fields.GetValue("xpanningceiling", 0f);
float panY = s.Fields.GetValue("ypanningceiling", 0f);
- if(panX != 0 || panY != 0) {
+ if(panX != 0 || panY != 0)
+ {
showExtededCeilingInfo = true;
ceilingOffset.Enabled = true;
ceilingOffsetLabel.Enabled = true;
ceilingOffset.Text = String.Format("{0:0.##}", panX) + ", " + String.Format("{0:0.##}", panY);
- } else {
+ }
+ else
+ {
ceilingOffset.Text = "--, --";
ceilingOffset.Enabled = false;
ceilingOffsetLabel.Enabled = false;
@@ -160,12 +185,15 @@ namespace CodeImp.DoomBuilder.Controls
panX = s.Fields.GetValue("xpanningfloor", 0f);
panY = s.Fields.GetValue("ypanningfloor", 0f);
- if(panX != 0 || panY != 0) {
+ if(panX != 0 || panY != 0)
+ {
showExtededFloorInfo = true;
floorOffset.Enabled = true;
floorOffsetLabel.Enabled = true;
floorOffset.Text = String.Format("{0:0.##}", panX) + ", " + String.Format("{0:0.##}", panY);
- } else {
+ }
+ else
+ {
floorOffset.Text = "--, --";
floorOffset.Enabled = false;
floorOffsetLabel.Enabled = false;
@@ -175,12 +203,15 @@ namespace CodeImp.DoomBuilder.Controls
float scaleX = s.Fields.GetValue("xscaleceiling", 1.0f);//1.0f;
float scaleY = s.Fields.GetValue("yscaleceiling", 1.0f);
- if(scaleX != 1.0f || scaleY != 1.0f) {
+ if(scaleX != 1.0f || scaleY != 1.0f)
+ {
showExtededCeilingInfo = true;
ceilingScale.Enabled = true;
ceilingScaleLabel.Enabled = true;
ceilingScale.Text = String.Format("{0:0.##}", scaleX) + ", " + String.Format("{0:0.##}", scaleY);
- } else {
+ }
+ else
+ {
ceilingScale.Text = "--, --";
ceilingScale.Enabled = false;
ceilingScaleLabel.Enabled = false;
@@ -190,35 +221,44 @@ namespace CodeImp.DoomBuilder.Controls
scaleX = s.Fields.GetValue("xscalefloor", 1.0f);
scaleY = s.Fields.GetValue("yscalefloor", 1.0f);
- if(scaleX != 1.0f || scaleY != 1.0f) {
+ if(scaleX != 1.0f || scaleY != 1.0f)
+ {
showExtededFloorInfo = true;
floorScale.Enabled = true;
floorScaleLabel.Enabled = true;
floorScale.Text = String.Format("{0:0.##}", scaleX) + ", " + String.Format("{0:0.##}", scaleY);
- } else {
+ }
+ else
+ {
floorScale.Text = "--, --";
floorScale.Enabled = false;
floorScaleLabel.Enabled = false;
}
//rotation
- if(s.Fields.ContainsKey("rotationceiling")) {
+ if(s.Fields.ContainsKey("rotationceiling"))
+ {
showExtededCeilingInfo = true;
ceilingAngle.Enabled = true;
ceilingAngleLabel.Enabled = true;
ceilingAngle.Text = s.Fields["rotationceiling"].Value + "\u00B0";
- } else {
+ }
+ else
+ {
ceilingAngle.Text = "-";
ceilingAngle.Enabled = false;
ceilingAngleLabel.Enabled = false;
}
- if(s.Fields.ContainsKey("rotationfloor")) {
+ if(s.Fields.ContainsKey("rotationfloor"))
+ {
showExtededFloorInfo = true;
floorAngle.Enabled = true;
floorAngleLabel.Enabled = true;
floorAngle.Text = s.Fields["rotationfloor"].Value + "\u00B0";
- } else {
+ }
+ else
+ {
floorAngle.Text = "-";
floorAngle.Enabled = false;
floorAngleLabel.Enabled = false;
@@ -227,8 +267,10 @@ namespace CodeImp.DoomBuilder.Controls
//Flags
flags.Items.Clear();
- foreach(KeyValuePair group in s.Flags) {
- if(group.Value) {
+ foreach(KeyValuePair group in s.Flags)
+ {
+ if(group.Value)
+ {
ListViewItem item = new ListViewItem(General.Map.Config.SectorFlags.ContainsKey(group.Key) ? General.Map.Config.SectorFlags[group.Key] : group.Key);
item.Checked = true;
flags.Items.Add(item);
@@ -237,14 +279,17 @@ namespace CodeImp.DoomBuilder.Controls
//mxd. Flags panel visibility and size
flagsPanel.Visible = (flags.Items.Count > 0);
- if(flags.Items.Count > 0) {
+ if(flags.Items.Count > 0)
+ {
int itemWidth = flags.Items[0].GetBounds(ItemBoundsPortion.Entire).Width;
if(itemWidth == 0) itemWidth = 96;
flags.Width = itemWidth * (int)Math.Ceiling(flags.Items.Count / 5.0f);
flagsPanel.Width = flags.Width + flags.Left * 2;
}
- } else {
+ }
+ else
+ {
panelFadeColor.Visible = false;
panelLightColor.Visible = false;
labelFade.Visible = false;
@@ -253,18 +298,24 @@ namespace CodeImp.DoomBuilder.Controls
}
//panels size
- if(showExtededCeilingInfo) {
+ if(showExtededCeilingInfo)
+ {
ceilingpanel.Width = fullWidth;
ceilingInfo.Visible = true;
- } else {
+ }
+ else
+ {
ceilingInfo.Visible = false;
ceilingpanel.Width = 84;
}
- if(showExtededFloorInfo) {
+ if(showExtededFloorInfo)
+ {
floorpanel.Width = fullWidth;
floorInfo.Visible = true;
- } else {
+ }
+ else
+ {
floorInfo.Visible = false;
floorpanel.Width = 84;
}
@@ -275,11 +326,16 @@ namespace CodeImp.DoomBuilder.Controls
this.Update();
}
- protected void DisplayTextureSize(Label label, ImageData texture) {
- if(General.Settings.ShowTextureSizes && texture.ImageState == ImageLoadState.Ready && !string.IsNullOrEmpty(texture.Name) && !(texture is UnknownImage)) {
+ private void DisplayTextureSize(Label label, ImageData texture)
+ {
+ if(General.Settings.ShowTextureSizes && texture.ImageState == ImageLoadState.Ready
+ && !string.IsNullOrEmpty(texture.Name) && !(texture is UnknownImage))
+ {
label.Visible = true;
label.Text = texture.ScaledWidth + "x" + texture.ScaledHeight;
- } else {
+ }
+ else
+ {
label.Visible = false;
}
}
diff --git a/Source/Core/Controls/TextureSelectorControl.cs b/Source/Core/Controls/TextureSelectorControl.cs
index 11f02bc0..304a3225 100644
--- a/Source/Core/Controls/TextureSelectorControl.cs
+++ b/Source/Core/Controls/TextureSelectorControl.cs
@@ -50,7 +50,8 @@ namespace CodeImp.DoomBuilder.Controls
timer.Stop(); //mxd
// Check if name is a "none" texture
- if(string.IsNullOrEmpty(imagename)) {
+ if(string.IsNullOrEmpty(imagename))
+ {
DisplayImageSize(0, 0); //mxd
//mxd. Determine image to show
@@ -70,15 +71,16 @@ namespace CodeImp.DoomBuilder.Controls
if(string.IsNullOrEmpty(texture.FullName) || texture is UnknownImage) DisplayImageSize(0, 0); //mxd
else DisplayImageSize(texture.ScaledWidth, texture.ScaledHeight); //mxd
- if(!texture.IsPreviewLoaded) timer.Start(); //mxd
+ if(usepreviews ? !texture.IsPreviewLoaded : !texture.IsImageLoaded) timer.Start(); //mxd
// Set the image
- return texture.GetPreview();
+ return (usepreviews ? texture.GetPreview() : texture.GetBitmap());
}
}
// This browses for a texture
- protected override string BrowseImage(string imagename) {
+ protected override string BrowseImage(string imagename)
+ {
// Browse for texture
string result = TextureBrowserForm.Browse(this.ParentForm, imagename, false);
return result ?? imagename;
diff --git a/Source/Core/Data/ColormapImage.cs b/Source/Core/Data/ColormapImage.cs
index f7fc0393..9e63ee51 100644
--- a/Source/Core/Data/ColormapImage.cs
+++ b/Source/Core/Data/ColormapImage.cs
@@ -45,29 +45,24 @@ namespace CodeImp.DoomBuilder.Data
// This loads the image
protected override void LocalLoadImage()
{
- Stream lumpdata;
- MemoryStream mem;
- IImageReader reader;
- byte[] membytes;
-
// Leave when already loaded
if(this.IsImageLoaded) return;
lock(this)
{
// Get the lump data stream
- lumpdata = General.Map.Data.GetColormapData(Name);
+ Stream lumpdata = General.Map.Data.GetColormapData(Name);
if(lumpdata != null)
{
// Copy lump data to memory
lumpdata.Seek(0, SeekOrigin.Begin);
- membytes = new byte[(int)lumpdata.Length];
+ byte[] membytes = new byte[(int)lumpdata.Length];
lumpdata.Read(membytes, 0, (int)lumpdata.Length);
- mem = new MemoryStream(membytes);
+ MemoryStream mem = new MemoryStream(membytes);
mem.Seek(0, SeekOrigin.Begin);
// Get a reader for the data
- reader = ImageDataFormat.GetImageReader(mem, ImageDataFormat.DOOMCOLORMAP, General.Map.Data.Palette);
+ IImageReader reader = ImageDataFormat.GetImageReader(mem, ImageDataFormat.DOOMCOLORMAP, General.Map.Data.Palette);
if(reader is UnknownImageReader)
{
// Data is in an unknown format!
diff --git a/Source/Core/Data/DataManager.cs b/Source/Core/Data/DataManager.cs
index 22dc22f3..ed4bdbc0 100644
--- a/Source/Core/Data/DataManager.cs
+++ b/Source/Core/Data/DataManager.cs
@@ -39,6 +39,7 @@ namespace CodeImp.DoomBuilder.Data
#region ================== Constants
public const string INTERNAL_PREFIX = "internal:";
+ public const int CLASIC_IMAGE_NAME_LENGTH = 8; //mxd
#endregion
@@ -53,8 +54,10 @@ namespace CodeImp.DoomBuilder.Data
// Textures, Flats and Sprites
private Dictionary textures;
+ private Dictionary texturenamesshorttofull; //mxd
private List texturenames;
private Dictionary flats;
+ private Dictionary flatnamesshorttofull; //mxd
private List flatnames;
private Dictionary sprites;
private List texturesets;
@@ -237,6 +240,8 @@ namespace CodeImp.DoomBuilder.Data
sprites = new Dictionary();
texturenames = new List();
flatnames = new List();
+ texturenamesshorttofull = new Dictionary(); //mxd
+ flatnamesshorttofull = new Dictionary(); //mxd
imageque = new Queue();
previews = new PreviewManager();
texturesets = new List();
@@ -320,7 +325,6 @@ namespace CodeImp.DoomBuilder.Data
Dictionary actorsByClass = createActorsByClassList();
loadModeldefs(actorsByClass);
loadGldefs(actorsByClass);
- actorsByClass = null; //don't need them any more
foreach (Thing t in General.Map.Map.Things) t.UpdateCache();
General.MainWindow.DisplayReady();
@@ -386,6 +390,10 @@ namespace CodeImp.DoomBuilder.Data
// Sort things
foreach(ThingCategory tc in thingcategories) tc.SortIfNeeded();
+ //mxd. Create texture name translation lists
+ texturenamesshorttofull = CreateShortTextureNamesCollection(textures);
+ flatnamesshorttofull = CreateShortTextureNamesCollection(flats);
+
// Update the used textures
General.Map.Data.UpdateUsedTextures();
@@ -417,6 +425,33 @@ namespace CodeImp.DoomBuilder.Data
// Output info
General.WriteLogLine("Loaded " + texcount + " textures, " + flatcount + " flats, " + colormapcount + " colormaps, " + spritecount + " sprites, " + thingcount + " decorate things, " + modeldefEntries.Count + " model deinitions, " + gldefsEntries.Count + " dynamic light definitions");
}
+
+ //mxd
+ private Dictionary CreateShortTextureNamesCollection(Dictionary images)
+ {
+ Dictionary names = new Dictionary();
+
+ foreach(KeyValuePair pair in images)
+ {
+ if(pair.Value.FullName.Length > CLASIC_IMAGE_NAME_LENGTH)
+ {
+ string shortname = pair.Value.DisplayName.ToUpperInvariant();
+ if(shortname.Length > CLASIC_IMAGE_NAME_LENGTH) shortname = shortname.Substring(0, CLASIC_IMAGE_NAME_LENGTH);
+ long hash = MurmurHash2.Hash(shortname);
+
+ if(names.ContainsKey(hash))
+ {
+ names[hash] = pair.Value.LongName;
+ }
+ else
+ {
+ names.Add(hash, pair.Value.LongName);
+ }
+ }
+ }
+
+ return names;
+ }
// This unloads all data
internal void Unload()
@@ -854,7 +889,7 @@ namespace CodeImp.DoomBuilder.Data
}
// This returns a specific patch stream
- internal Stream GetPatchData(string pname)
+ internal Stream GetPatchData(string pname, bool longname)
{
Stream patch;
@@ -862,7 +897,7 @@ namespace CodeImp.DoomBuilder.Data
for(int i = containers.Count - 1; i > -1; i--)
{
// This contain provides this patch?
- patch = containers[i].GetPatchData(pname);
+ patch = containers[i].GetPatchData(pname, longname);
if(patch != null) return patch;
}
@@ -870,21 +905,8 @@ namespace CodeImp.DoomBuilder.Data
return null;
}
- //mxd
- internal string GetPatchLocation(string pname) {
- string fullName = pname;
- // Go for all opened containers
- for (int i = containers.Count - 1; i >= 0; i--) {
- // This contain provides this patch?
- fullName = containers[i].GetPatchLocation(pname);
- if (fullName != pname) return fullName;
- }
-
- return pname;
- }
-
// This returns a specific texture stream
- internal Stream GetTextureData(string pname)
+ internal Stream GetTextureData(string pname, bool longname)
{
Stream patch;
@@ -892,7 +914,7 @@ namespace CodeImp.DoomBuilder.Data
for(int i = containers.Count - 1; i >= 0; i--)
{
// This contain provides this patch?
- patch = containers[i].GetTextureData(pname);
+ patch = containers[i].GetTextureData(pname, longname);
if(patch != null) return patch;
}
@@ -934,6 +956,17 @@ namespace CodeImp.DoomBuilder.Data
// Return null image
return unknownimage; //mxd
}
+
+ //mxd
+ public string GetFullTextureName(string name)
+ {
+ if (Path.GetFileNameWithoutExtension(name) == name && name.Length > CLASIC_IMAGE_NAME_LENGTH)
+ name = name.Substring(0, CLASIC_IMAGE_NAME_LENGTH);
+ long hash = MurmurHash2.Hash(name.Trim().ToUpperInvariant());
+ if(textures.ContainsKey(hash)) return textures[hash].Name;
+ if(texturenamesshorttofull.ContainsKey(hash)) return textures[texturenamesshorttofull[hash]].Name;
+ return name;
+ }
#endregion
@@ -962,7 +995,6 @@ namespace CodeImp.DoomBuilder.Data
// Add to preview manager
previews.AddImage(img);
- img.IsFlat = true; //mxd
}
}
}
@@ -972,7 +1004,7 @@ namespace CodeImp.DoomBuilder.Data
}
// This returns a specific flat stream
- internal Stream GetFlatData(string pname)
+ internal Stream GetFlatData(string pname, bool longname)
{
Stream flat;
@@ -980,7 +1012,7 @@ namespace CodeImp.DoomBuilder.Data
for(int i = containers.Count - 1; i >= 0; i--)
{
// This contain provides this flat?
- flat = containers[i].GetFlatData(pname);
+ flat = containers[i].GetFlatData(pname, longname);
if(flat != null) return flat;
}
@@ -1025,6 +1057,17 @@ namespace CodeImp.DoomBuilder.Data
// Return flat
return flats[longname];
}
+
+ //mxd. Gets full flat name by short flat name
+ public string GetFullFlatName(string name)
+ {
+ if(Path.GetFileNameWithoutExtension(name) == name && name.Length > CLASIC_IMAGE_NAME_LENGTH)
+ name = name.Substring(0, CLASIC_IMAGE_NAME_LENGTH);
+ long hash = MurmurHash2.Hash(name.ToUpperInvariant());
+ if(flats.ContainsKey(hash)) return flats[hash].Name;
+ if(flatnamesshorttofull.ContainsKey(hash)) return flats[flatnamesshorttofull[hash]].Name;
+ return name;
+ }
#endregion
@@ -1064,7 +1107,7 @@ namespace CodeImp.DoomBuilder.Data
foreach(ThingTypeInfo ti in General.Map.Data.ThingTypes)
{
// Valid sprite name?
- if(ti.Sprite.Length == 0 || ti.Sprite.Length > 8) continue; //mxd
+ if(ti.Sprite.Length == 0 || ti.Sprite.Length > CLASIC_IMAGE_NAME_LENGTH) continue; //mxd
ImageData image = null;
@@ -1145,7 +1188,7 @@ namespace CodeImp.DoomBuilder.Data
string[] files = Directory.GetFiles(General.SpritesPath, "*.png", SearchOption.TopDirectoryOnly);
foreach(string spritefile in files)
{
- ImageData img = new FileImage(Path.GetFileNameWithoutExtension(spritefile).ToLowerInvariant(), spritefile, false);
+ ImageData img = new FileImage(Path.GetFileNameWithoutExtension(spritefile).ToLowerInvariant(), spritefile);
img.LoadImage();
img.AllowUnload = false;
internalsprites.Add(img.Name, img);
@@ -1542,7 +1585,7 @@ namespace CodeImp.DoomBuilder.Data
// Valid sprite name?
string sprite;
- if(ti.Sprite.Length == 0 || ti.Sprite.Length > 8) {
+ if(ti.Sprite.Length == 0 || ti.Sprite.Length > CLASIC_IMAGE_NAME_LENGTH) {
if(ti.Actor == null) continue;
sprite = ti.Actor.FindSuitableVoxel(voxelNames);
} else {
@@ -1721,12 +1764,6 @@ namespace CodeImp.DoomBuilder.Data
updatedusedtextures = true;
}
}
-
- // This returns the long name for a string
- public long GetLongImageName(string name)
- {
- return Lump.MakeLongName(name);
- }
#endregion
}
diff --git a/Source/Core/Data/DataReader.cs b/Source/Core/Data/DataReader.cs
index 607a719c..30144063 100644
--- a/Source/Core/Data/DataReader.cs
+++ b/Source/Core/Data/DataReader.cs
@@ -117,13 +117,10 @@ namespace CodeImp.DoomBuilder.Data
public virtual PatchNames LoadPatchNames() { return null; }
// When implemented, this returns the patch lump
- public virtual Stream GetPatchData(string pname) { return null; }
-
- //mxd. When implemented, this returns a path to patch (like /patches/walls/WALL001.png)
- public virtual string GetPatchLocation(string pname) { return pname; }
+ public virtual Stream GetPatchData(string pname, bool longname) { return null; }
// When implemented, this returns the texture lump
- public virtual Stream GetTextureData(string pname) { return null; }
+ public virtual Stream GetTextureData(string pname, bool longname) { return null; }
// When implemented, this loads the textures
public virtual ICollection LoadTextures(PatchNames pnames) { return null; }
@@ -136,7 +133,7 @@ namespace CodeImp.DoomBuilder.Data
public virtual ICollection LoadFlats() { return null; }
// When implemented, this returns the flat lump
- public virtual Stream GetFlatData(string pname) { return null; }
+ public virtual Stream GetFlatData(string pname, bool longname) { return null; }
#endregion
@@ -179,7 +176,6 @@ namespace CodeImp.DoomBuilder.Data
//mxd
internal virtual MemoryStream LoadFile(string name) { return null; }
- //mxd
internal virtual bool FileExists(string filename) { return false; }
#endregion
diff --git a/Source/Core/Data/DirectoryReader.cs b/Source/Core/Data/DirectoryReader.cs
index 12156842..3fa033c6 100644
--- a/Source/Core/Data/DirectoryReader.cs
+++ b/Source/Core/Data/DirectoryReader.cs
@@ -65,22 +65,31 @@ namespace CodeImp.DoomBuilder.Data
#region ================== Textures
// This finds and returns a patch stream
- public override Stream GetPatchData(string pname)
+ public override Stream GetPatchData(string pname, bool longname)
{
// Error when suspended
if(issuspended) throw new Exception("Data reader is suspended");
// Find in any of the wad files
// Note the backward order, because the last wad's images have priority
- for(int i = wads.Count - 1; i > -1; i--)
+ if(!longname) //mxd. Patches with long names can't be in wads
{
- Stream data = wads[i].GetPatchData(pname);
- if(data != null) return data;
+ for (int i = wads.Count - 1; i > -1; i--)
+ {
+ Stream data = wads[i].GetPatchData(pname, false);
+ if (data != null) return data;
+ }
}
-
+
try
{
- if (General.Map.Config.MixTexturesFlats)
+ if(longname)
+ {
+ //mxd. Long names are absolute
+ pname = pname.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
+ return (FileExists(pname) ? LoadFile(pname) : null);
+ }
+ else if (General.Map.Config.MixTexturesFlats)
{
//mxd. Find in directories ZDoom expects them to be
string dir = Path.GetDirectoryName(pname);
@@ -112,21 +121,31 @@ namespace CodeImp.DoomBuilder.Data
}
// This finds and returns a textue stream
- public override Stream GetTextureData(string pname)
+ public override Stream GetTextureData(string pname, bool longname)
{
// Error when suspended
if(issuspended) throw new Exception("Data reader is suspended");
// Find in any of the wad files
// Note the backward order, because the last wad's images have priority
- for(int i = wads.Count - 1; i >= 0; i--)
+ if (!longname) //mxd. Textures with long names can't be in wads
{
- Stream data = wads[i].GetTextureData(pname);
- if(data != null) return data;
+ for (int i = wads.Count - 1; i >= 0; i--)
+ {
+ Stream data = wads[i].GetTextureData(pname, false);
+ if (data != null) return data;
+ }
}
try
{
+ //mxd. Long names are absolute
+ if(General.Map.Options.UseLongTextureNames && !string.IsNullOrEmpty(Path.GetExtension(pname)))
+ {
+ pname = pname.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
+ return (FileExists(pname) ? LoadFile(pname) : null);
+ }
+
// Find in textures directory
string path = Path.Combine(TEXTURES_DIR, Path.GetDirectoryName(pname));
string filename = FindFirstFile(path, Path.GetFileName(pname), true);
@@ -283,18 +302,18 @@ namespace CodeImp.DoomBuilder.Data
}
// This creates an image
- protected override ImageData CreateImage(string name, string filename, int imagetype)
+ protected override ImageData CreateImage(string filename, int imagetype)
{
switch(imagetype)
{
case ImageDataFormat.DOOMFLAT:
- return new FileImage(name, Path.Combine(location.location, filename), true);
+ return new FileImage(filename, Path.Combine(location.location, filename), true);
case ImageDataFormat.DOOMPICTURE:
- return new FileImage(name, Path.Combine(location.location, filename), false);
+ return new FileImage(filename, Path.Combine(location.location, filename), false);
case ImageDataFormat.DOOMCOLORMAP:
- return new ColormapImage(name);
+ return new ColormapImage(Path.GetFileNameWithoutExtension(filename));
default:
throw new ArgumentException("Invalid image format specified!");
@@ -320,7 +339,8 @@ namespace CodeImp.DoomBuilder.Data
}
//mxd. This returns all files in a given directory which title starts with given title
- protected override string[] GetAllFilesWhichTitleStartsWith(string path, string title) {
+ protected override string[] GetAllFilesWhichTitleStartsWith(string path, string title)
+ {
return files.GetAllFilesWhichTitleStartsWith(path, title).ToArray();
}
@@ -357,9 +377,12 @@ namespace CodeImp.DoomBuilder.Data
{
MemoryStream s = null;
- try {
+ try
+ {
s = new MemoryStream(File.ReadAllBytes(Path.Combine(location.location, filename)));
- } catch(Exception e) {
+ }
+ catch(Exception e)
+ {
General.ErrorLogger.Add(ErrorType.Error, "Unable to load file: "+e.Message);
}
return s;
diff --git a/Source/Core/Data/DynamicBitmapImage.cs b/Source/Core/Data/DynamicBitmapImage.cs
index 65fc5d96..33db85f2 100644
--- a/Source/Core/Data/DynamicBitmapImage.cs
+++ b/Source/Core/Data/DynamicBitmapImage.cs
@@ -27,9 +27,6 @@ namespace CodeImp.DoomBuilder.Data
{
#region ================== Variables
- // Image source
- //private Bitmap img;
-
#endregion
#region ================== Constructor / Disposer
diff --git a/Source/Core/Data/FileImage.cs b/Source/Core/Data/FileImage.cs
index 8b98b8bb..fc77832e 100644
--- a/Source/Core/Data/FileImage.cs
+++ b/Source/Core/Data/FileImage.cs
@@ -28,7 +28,7 @@ namespace CodeImp.DoomBuilder.Data
{
#region ================== Variables
- private int probableformat;
+ private readonly int probableformat;
#endregion
@@ -38,8 +38,8 @@ namespace CodeImp.DoomBuilder.Data
public FileImage(string name, string filepathname, bool asflat)
{
// Initialize
- SetName(name);
- this.fullName = filepathname; //mxd
+ this.isFlat = asflat; //mxd
+ SetName(name, filepathname);
if(asflat)
{
@@ -62,15 +62,24 @@ namespace CodeImp.DoomBuilder.Data
public FileImage(string name, string filepathname, bool asflat, float scalex, float scaley)
{
// Initialize
- this.fullName = filepathname; //mxd
this.scale.x = scalex;
this.scale.y = scaley;
- SetName(name);
+ this.isFlat = asflat; //mxd
+ SetName(name, filepathname);
- if(asflat)
- probableformat = ImageDataFormat.DOOMFLAT;
- else
- probableformat = ImageDataFormat.DOOMPICTURE;
+ probableformat = (asflat ? ImageDataFormat.DOOMFLAT : ImageDataFormat.DOOMPICTURE);
+
+ // We have no destructor
+ GC.SuppressFinalize(this);
+ }
+
+ //mxd. Constructor for loading internal images
+ internal FileImage(string name, string filepathname)
+ {
+ // Initialize
+ SetName(name, filepathname, true);
+
+ probableformat = ImageDataFormat.DOOMPICTURE;
// We have no destructor
GC.SuppressFinalize(this);
@@ -80,6 +89,43 @@ namespace CodeImp.DoomBuilder.Data
#region ================== Methods
+ //mxd: name is relative path to the image ("\Textures\sometexture.png")
+ //mxd: filepathname is absolute path to the image ("D:\Doom\MyCoolProject\Textures\sometexture.png")
+ //mxd: also, zdoom uses '/' as directory separator char.
+ private void SetName(string name, string filepathname)
+ {
+ SetName(name, filepathname, General.Map.Options.UseLongTextureNames);
+ }
+
+ private void SetName(string name, string filepathname, bool uselongtexturenames)
+ {
+ name = name.Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
+
+ if(!uselongtexturenames)
+ {
+ this.name = Path.GetFileNameWithoutExtension(name.ToUpperInvariant());
+ if(this.name.Length > DataManager.CLASIC_IMAGE_NAME_LENGTH)
+ this.name = this.name.Substring(0, DataManager.CLASIC_IMAGE_NAME_LENGTH);
+ this.virtualname = Path.Combine(Path.GetDirectoryName(name), this.name).Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
+ this.displayname = this.name;
+ this.longname = Lump.MakeLongName(this.name); //mxd
+ }
+ else
+ {
+ this.name = name;
+ this.virtualname = name;
+ this.displayname = Path.GetFileNameWithoutExtension(name);
+ this.longname = Lump.MakeLongName(name);
+ hasLongName = true;
+ }
+
+ this.fullname = filepathname;
+ if(General.Settings.CapitalizeTextureNames && !string.IsNullOrEmpty(this.displayname))
+ {
+ this.displayname = this.displayname.ToUpperInvariant();
+ }
+ }
+
// This loads the image
protected override void LocalLoadImage()
{
@@ -91,24 +137,30 @@ namespace CodeImp.DoomBuilder.Data
// Load file data
if(bitmap != null) bitmap.Dispose(); bitmap = null;
- MemoryStream filedata = new MemoryStream(File.ReadAllBytes(fullName));
+ MemoryStream filedata = new MemoryStream(File.ReadAllBytes(fullname));
// Get a reader for the data
IImageReader reader = ImageDataFormat.GetImageReader(filedata, probableformat, General.Map.Data.Palette);
- if(!(reader is UnknownImageReader)) {
+ if(!(reader is UnknownImageReader))
+ {
// Load the image
filedata.Seek(0, SeekOrigin.Begin);
- try { bitmap = reader.ReadAsBitmap(filedata); } catch(InvalidDataException) {
+ try { bitmap = reader.ReadAsBitmap(filedata); }
+ catch(InvalidDataException)
+ {
// Data cannot be read!
bitmap = null;
}
}
// Not loaded?
- if(bitmap == null) {
- General.ErrorLogger.Add(ErrorType.Error, "Image file '" + fullName + "' data format could not be read, while loading image '" + this.Name + "'. Is this a valid picture file at all?");
+ if(bitmap == null)
+ {
+ General.ErrorLogger.Add(ErrorType.Error, "Image file '" + fullname + "' data format could not be read, while loading image '" + this.Name + "'. Is this a valid picture file at all?");
loadfailed = true;
- } else {
+ }
+ else
+ {
// Get width and height
width = bitmap.Size.Width;
height = bitmap.Size.Height;
diff --git a/Source/Core/Data/FlatImage.cs b/Source/Core/Data/FlatImage.cs
index 3e6158af..e70f7ab2 100644
--- a/Source/Core/Data/FlatImage.cs
+++ b/Source/Core/Data/FlatImage.cs
@@ -33,6 +33,7 @@ namespace CodeImp.DoomBuilder.Data
{
// Initialize
SetName(name);
+ isFlat = true; //mxd
// We have no destructor
GC.SuppressFinalize(this);
@@ -51,7 +52,7 @@ namespace CodeImp.DoomBuilder.Data
lock(this)
{
// Get the lump data stream
- Stream lumpdata = General.Map.Data.GetFlatData(Name);
+ Stream lumpdata = General.Map.Data.GetFlatData(Name, hasLongName);
if(lumpdata != null)
{
// Copy lump data to memory
diff --git a/Source/Core/Data/HighResImage.cs b/Source/Core/Data/HighResImage.cs
index c6e901a3..e003f1c1 100644
--- a/Source/Core/Data/HighResImage.cs
+++ b/Source/Core/Data/HighResImage.cs
@@ -32,15 +32,14 @@ namespace CodeImp.DoomBuilder.Data
{
#region ================== Variables
- private List patches; //mxd
- private string type;
+ private readonly List patches; //mxd
#endregion
#region ================== Constructor / Disposer
// Constructor
- public HighResImage(string name, string type, int width, int height, float scalex, float scaley, bool worldpanning)
+ public HighResImage(string name, int width, int height, float scalex, float scaley, bool worldpanning, bool isflat)
{
// Initialize
this.width = width;
@@ -49,9 +48,18 @@ namespace CodeImp.DoomBuilder.Data
this.scale.y = scaley;
this.worldpanning = worldpanning;
this.patches = new List(1);
- this.type = type;
+
+ //mxd
+ if (!General.Map.Options.UseLongTextureNames)
+ {
+ if(name.Length > DataManager.CLASIC_IMAGE_NAME_LENGTH)
+ name = name.Substring(0, DataManager.CLASIC_IMAGE_NAME_LENGTH);
+ name = name.ToUpperInvariant();
+ }
+
SetName(name);
- this.fullName = "[TEXTURES]\\" + type + "s\\" + name; //mxd
+ this.virtualname = "[TEXTURES]/" + this.name; //mxd
+ this.isFlat = isflat; //mxd
// We have no destructor
GC.SuppressFinalize(this);
@@ -109,7 +117,7 @@ namespace CodeImp.DoomBuilder.Data
foreach(TexturePatch p in patches)
{
// Get the patch data stream
- Stream patchdata = General.Map.Data.GetPatchData(p.lumpname);
+ Stream patchdata = General.Map.Data.GetPatchData(p.lumpname, p.haslongname);
if(patchdata != null)
{
diff --git a/Source/Core/Data/ImageData.cs b/Source/Core/Data/ImageData.cs
index b47cc176..57390650 100644
--- a/Source/Core/Data/ImageData.cs
+++ b/Source/Core/Data/ImageData.cs
@@ -42,15 +42,18 @@ namespace CodeImp.DoomBuilder.Data
#region ================== Variables
// Properties
- private string name;
- private long longname;
+ protected string name;
+ protected long longname;
protected int width;
protected int height;
protected Vector2D scale;
protected bool worldpanning;
- protected bool usecolorcorrection;
- protected string fullName; //mxd. name with path;
+ private bool usecolorcorrection;
+ protected string fullname; //mxd. name with path;
+ protected string virtualname; //mxd
+ protected string displayname; //mxd
protected bool isFlat; //mxd. if false, it's a texture
+ protected bool hasLongName; //mxd. Texture name is longer than DataManager.CLASIC_IMAGE_NAME_LENGTH
protected bool hasPatchWithSameName; //mxd
// Loading
@@ -81,8 +84,10 @@ namespace CodeImp.DoomBuilder.Data
public string Name { get { return name; } }
public long LongName { get { return longname; } }
- public string FullName { get { return fullName; } } //mxd
- public bool IsFlat { get { return isFlat; } internal set { isFlat = value; } } //mxd
+ public string FullName { get { return fullname; } } //mxd
+ public string VirtualName { get { return virtualname; } } //mxd
+ public string DisplayName { get { return displayname; } } //mxd
+ public bool IsFlat { get { return isFlat; } } //mxd
public bool HasPatchWithSameName { get { return hasPatchWithSameName; } } //mxd
public bool UseColorCorrection { get { return usecolorcorrection; } set { usecolorcorrection = value; } }
public Texture Texture { get { lock(this) { return texture; } } }
@@ -175,11 +180,13 @@ namespace CodeImp.DoomBuilder.Data
}
// This sets the name
- protected void SetName(string name)
+ protected virtual void SetName(string name)
{
this.name = name;
- this.longname = Lump.MakeLongName(name);
- fullName = name; //mxd
+ this.fullname = name; //mxd
+ this.virtualname = name; //mxd
+ this.displayname = name; //mxd
+ this.longname = Lump.MakeLongName(name); //mxd
}
// This unloads the image
@@ -200,18 +207,10 @@ namespace CodeImp.DoomBuilder.Data
{
// Image loaded successfully?
if(!loadfailed && (imagestate == ImageLoadState.Ready) && (bitmap != null))
- {
return bitmap;
- }
+
// Image loading failed?
- else if(loadfailed)
- {
- return Properties.Resources.Failed;
- }
- else
- {
- return Properties.Resources.Hourglass;
- }
+ return (loadfailed ? Properties.Resources.Failed : Properties.Resources.Hourglass);
}
}
@@ -229,8 +228,6 @@ namespace CodeImp.DoomBuilder.Data
// This requests loading the image
protected virtual void LocalLoadImage()
{
- BitmapData bmpdata = null;
-
lock(this)
{
// Bitmap loaded successfully?
@@ -269,6 +266,8 @@ namespace CodeImp.DoomBuilder.Data
// This applies brightness correction on the image
if(usecolorcorrection)
{
+ BitmapData bmpdata = null;
+
try
{
// Try locking the bitmap
@@ -333,8 +332,6 @@ namespace CodeImp.DoomBuilder.Data
// This creates the Direct3D texture
public virtual void CreateTexture()
{
- MemoryStream memstream;
-
lock(this)
{
// Only do this when texture is not created yet
@@ -344,7 +341,7 @@ namespace CodeImp.DoomBuilder.Data
if(loadfailed) img = Properties.Resources.Failed;
// Write to memory stream and read from memory
- memstream = new MemoryStream((img.Size.Width * img.Size.Height * 4) + 4096);
+ MemoryStream memstream = new MemoryStream((img.Size.Width * img.Size.Height * 4) + 4096);
img.Save(memstream, ImageFormat.Bmp);
memstream.Seek(0, SeekOrigin.Begin);
if(dynamictexture)
diff --git a/Source/Core/Data/ImageDataFormat.cs b/Source/Core/Data/ImageDataFormat.cs
index 25bf3780..d342f624 100644
--- a/Source/Core/Data/ImageDataFormat.cs
+++ b/Source/Core/Data/ImageDataFormat.cs
@@ -32,19 +32,22 @@ namespace CodeImp.DoomBuilder.Data
public const int DOOMCOLORMAP = 3; // Could be Doom Colormap format (raw 8-bit pixel palette mapping)
// File format signatures
- private static readonly int[] PNG_SIGNATURE = new int[] { 137, 80, 78, 71, 13, 10, 26, 10 };
- private static readonly int[] GIF_SIGNATURE = new int[] { 71, 73, 70 };
- private static readonly int[] BMP_SIGNATURE = new int[] { 66, 77 };
- private static readonly int[] DDS_SIGNATURE = new int[] { 68, 68, 83, 32 };
- private static readonly int[] JPG_SIGNATURE = new int[] { 255, 216, 255 }; //mxd
- private static readonly int[] TGA_SIGNATURE = new int[] { 0, 0, 2, 0 }; //mxd
- private static readonly int[] PCX_SIGNATURE = new int[] { 10, 5, 1, 8 }; //mxd
+ private static readonly int[] PNG_SIGNATURE = new[] { 137, 80, 78, 71, 13, 10, 26, 10 };
+ private static readonly int[] GIF_SIGNATURE = new[] { 71, 73, 70 };
+ private static readonly int[] BMP_SIGNATURE = new[] { 66, 77 };
+ private static readonly int[] DDS_SIGNATURE = new[] { 68, 68, 83, 32 };
+ private static readonly int[] JPG_SIGNATURE = new[] { 255, 216, 255 }; //mxd
+ private static readonly int[] TGA_SIGNATURE = new[] { 0, 0, 2, 0 }; //mxd
+ private static readonly int[] PCX_SIGNATURE = new[] { 10, 5, 1, 8 }; //mxd
// This check image data and returns the appropriate image reader
public static IImageReader GetImageReader(Stream data, int guessformat, Playpal palette)
{
+ if(data == null) return new UnknownImageReader(); //mxd
+
// Data long enough to check for signatures?
- if(data.Length > 10) {
+ if(data.Length > 10)
+ {
// Check for PNG signature
data.Seek(0, SeekOrigin.Begin);
if(CheckSignature(data, PNG_SIGNATURE))
@@ -82,7 +85,8 @@ namespace CodeImp.DoomBuilder.Data
}
// Could it be a doom picture?
- switch(guessformat) {
+ switch(guessformat)
+ {
case DOOMPICTURE:
// Check if data is valid for a doom picture
data.Seek(0, SeekOrigin.Begin);
diff --git a/Source/Core/Data/PK3FileImage.cs b/Source/Core/Data/PK3FileImage.cs
index f9edf3e1..e627c7e0 100644
--- a/Source/Core/Data/PK3FileImage.cs
+++ b/Source/Core/Data/PK3FileImage.cs
@@ -28,20 +28,20 @@ namespace CodeImp.DoomBuilder.Data
{
#region ================== Variables
- private PK3Reader datareader;
- private int probableformat;
+ private readonly PK3Reader datareader;
+ private readonly int probableformat;
#endregion
#region ================== Constructor / Disposer
// Constructor
- internal PK3FileImage(PK3Reader datareader, string name, string filepathname, bool asflat)
+ internal PK3FileImage(PK3Reader datareader, string filepathname, bool asflat)
{
// Initialize
this.datareader = datareader;
- SetName(name);
- this.fullName = filepathname;
+ this.isFlat = asflat; //mxd
+ SetName(filepathname);
if(asflat)
{
@@ -64,6 +64,33 @@ namespace CodeImp.DoomBuilder.Data
#region ================== Methods
+ //mxd: filepathname is relative path to the image ("Textures\sometexture.png")
+ protected override void SetName(string filepathname)
+ {
+ if(!General.Map.Options.UseLongTextureNames)
+ {
+ this.name = Path.GetFileNameWithoutExtension(filepathname.ToUpperInvariant());
+ if(this.name.Length > DataManager.CLASIC_IMAGE_NAME_LENGTH)
+ this.name = this.name.Substring(0, DataManager.CLASIC_IMAGE_NAME_LENGTH);
+ this.displayname = this.name;
+ this.longname = Lump.MakeLongName(this.name); //mxd
+ }
+ else
+ {
+ this.name = filepathname.Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
+ this.displayname = Path.GetFileNameWithoutExtension(name);
+ this.longname = Lump.MakeLongName(this.name);
+ this.hasLongName = true;
+ }
+
+ this.virtualname = filepathname.Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
+ this.fullname = filepathname;
+ if(General.Settings.CapitalizeTextureNames && !string.IsNullOrEmpty(this.displayname))
+ {
+ this.displayname = this.displayname.ToUpperInvariant();
+ }
+ }
+
// This loads the image
protected override void LocalLoadImage()
{
@@ -74,37 +101,44 @@ namespace CodeImp.DoomBuilder.Data
{
// Load file data
if(bitmap != null) bitmap.Dispose(); bitmap = null;
- MemoryStream filedata = datareader.LoadFile(fullName); //mxd
-
- // Get a reader for the data
- IImageReader reader = ImageDataFormat.GetImageReader(filedata, probableformat, General.Map.Data.Palette);
- if(!(reader is UnknownImageReader))
+ MemoryStream filedata = datareader.LoadFile(fullname); //mxd
+
+ if(filedata != null)
{
- // Load the image
- filedata.Seek(0, SeekOrigin.Begin);
- try { bitmap = reader.ReadAsBitmap(filedata); }
- catch(InvalidDataException)
+ // Get a reader for the data
+ IImageReader reader = ImageDataFormat.GetImageReader(filedata, probableformat, General.Map.Data.Palette);
+ if(!(reader is UnknownImageReader))
{
- // Data cannot be read!
- bitmap = null;
+ // Load the image
+ filedata.Seek(0, SeekOrigin.Begin);
+ try
+ {
+ bitmap = reader.ReadAsBitmap(filedata);
+ }
+ catch (InvalidDataException)
+ {
+ // Data cannot be read!
+ bitmap = null;
+ }
}
+
+ // Not loaded?
+ if(bitmap == null)
+ {
+ General.ErrorLogger.Add(ErrorType.Error, "Image file '" + fullname + "' data format could not be read, while loading texture '" + this.Name + "'");
+ loadfailed = true;
+ }
+ else
+ {
+ // Get width and height from image
+ width = bitmap.Size.Width;
+ height = bitmap.Size.Height;
+ }
+
+ filedata.Dispose();
}
-
- // Not loaded?
- if(bitmap == null)
- {
- General.ErrorLogger.Add(ErrorType.Error, "Image file '" + fullName + "' data format could not be read, while loading texture '" + this.Name + "'");
- loadfailed = true;
- }
- else
- {
- // Get width and height from image
- width = bitmap.Size.Width;
- height = bitmap.Size.Height;
- }
-
+
// Pass on to base
- filedata.Dispose();
base.LocalLoadImage();
}
}
diff --git a/Source/Core/Data/PK3Reader.cs b/Source/Core/Data/PK3Reader.cs
index e68f7e26..ae6412a2 100644
--- a/Source/Core/Data/PK3Reader.cs
+++ b/Source/Core/Data/PK3Reader.cs
@@ -75,7 +75,7 @@ namespace CodeImp.DoomBuilder.Data
MemoryStream s = new MemoryStream();
reader.WriteEntryTo(s);
- sevenzipentries.Add(reader.Entry.FilePath.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar), s.ToArray());
+ sevenzipentries.Add(reader.Entry.FilePath.ToLowerInvariant(), s.ToArray());
fileentries.Add(new DirectoryFileEntry(reader.Entry.FilePath));
}
@@ -142,17 +142,25 @@ namespace CodeImp.DoomBuilder.Data
#region ================== Textures
// This finds and returns a patch stream
- public override Stream GetPatchData(string pname)
+ public override Stream GetPatchData(string pname, bool longname)
{
// Error when suspended
if(issuspended) throw new Exception("Data reader is suspended");
// Find in any of the wad files
// Note the backward order, because the last wad's images have priority
- for(int i = wads.Count - 1; i >= 0; i--)
+ if (!longname) //mxd. Patches with long names can't be in wads
{
- Stream data = wads[i].GetPatchData(pname);
- if(data != null) return data;
+ for (int i = wads.Count - 1; i >= 0; i--)
+ {
+ Stream data = wads[i].GetPatchData(pname, false);
+ if (data != null) return data;
+ }
+ }
+ else
+ {
+ //mxd. Long names are absolute
+ return (FileExists(pname) ? LoadFile(pname) : null);
}
if (General.Map.Config.MixTexturesFlats)
@@ -178,17 +186,25 @@ namespace CodeImp.DoomBuilder.Data
}
// This finds and returns a textue stream
- public override Stream GetTextureData(string pname)
+ public override Stream GetTextureData(string pname, bool longname)
{
// Error when suspended
if(issuspended) throw new Exception("Data reader is suspended");
// Find in any of the wad files
// Note the backward order, because the last wad's images have priority
- for(int i = wads.Count - 1; i >= 0; i--)
+ if (!longname) //mxd. Textures with long names can't be in wads
{
- Stream data = wads[i].GetTextureData(pname);
- if(data != null) return data;
+ for (int i = wads.Count - 1; i >= 0; i--)
+ {
+ Stream data = wads[i].GetTextureData(pname, false);
+ if (data != null) return data;
+ }
+ }
+ else
+ {
+ //mxd. Long names are absolute
+ return (FileExists(pname) ? LoadFile(pname) : null);
}
// Find in textures directory
@@ -285,12 +301,14 @@ namespace CodeImp.DoomBuilder.Data
#region ================== Voxels (mxd)
//mxd. This finds and returns a voxel stream or null if no voxel was found
- public override Stream GetVoxelData(string name) {
+ public override Stream GetVoxelData(string name)
+ {
// Error when suspended
if(issuspended) throw new Exception("Data reader is suspended");
// Find in any of the wad files
- for(int i = wads.Count - 1; i >= 0; i--) {
+ for(int i = wads.Count - 1; i >= 0; i--)
+ {
Stream voxel = wads[i].GetVoxelData(name);
if(voxel != null) return voxel;
}
@@ -299,7 +317,8 @@ namespace CodeImp.DoomBuilder.Data
// Find in sprites directory
string filename = FindFirstFile(VOXELS_DIR, pfilename, true);
- if((filename != null) && FileExists(filename)) {
+ if((filename != null) && FileExists(filename))
+ {
return LoadFile(filename);
}
@@ -318,18 +337,18 @@ namespace CodeImp.DoomBuilder.Data
}
// This creates an image
- protected override ImageData CreateImage(string name, string filename, int imagetype)
+ protected override ImageData CreateImage(string filename, int imagetype)
{
switch(imagetype)
{
case ImageDataFormat.DOOMFLAT:
- return new PK3FileImage(this, name, filename, true);
+ return new PK3FileImage(this, filename, true);
case ImageDataFormat.DOOMPICTURE:
- return new PK3FileImage(this, name, filename, false);
+ return new PK3FileImage(this, filename, false);
case ImageDataFormat.DOOMCOLORMAP:
- return new ColormapImage(name);
+ return new ColormapImage(Path.GetFileNameWithoutExtension(filename));
default:
throw new ArgumentException("Invalid image format specified!");
@@ -355,7 +374,8 @@ namespace CodeImp.DoomBuilder.Data
}
//mxd. This returns all files in a given directory which title starts with given title
- protected override string[] GetAllFilesWhichTitleStartsWith(string path, string title) {
+ protected override string[] GetAllFilesWhichTitleStartsWith(string path, string title)
+ {
return files.GetAllFilesWhichTitleStartsWith(path, title).ToArray();
}
@@ -391,24 +411,24 @@ namespace CodeImp.DoomBuilder.Data
internal override MemoryStream LoadFile(string filename)
{
MemoryStream filedata = null;
+ string fn = filename.Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar); //mxd
//mxd. This works waaaaaay faster with 7z archive
- if (archivetype == ArchiveType.SevenZip)
+ if (archivetype == ArchiveType.SevenZip)
{
- if (sevenzipentries.ContainsKey(filename))
- filedata = new MemoryStream(sevenzipentries[filename]);
+ fn = fn.ToLowerInvariant();
+ if (sevenzipentries.ContainsKey(fn)) filedata = new MemoryStream(sevenzipentries[fn]);
}
else
{
UpdateArchive(true);
-
+
foreach (var entry in archive.Entries)
{
if (entry.IsDirectory) continue;
// Is this the entry we are looking for?
- string entryname = entry.FilePath.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
- if (string.Compare(entryname, filename, true) == 0)
+ if(string.Compare(entry.FilePath, fn, true) == 0)
{
filedata = new MemoryStream();
entry.WriteTo(filedata);
diff --git a/Source/Core/Data/PK3StructuredReader.cs b/Source/Core/Data/PK3StructuredReader.cs
index 3946e9c8..53aaed50 100644
--- a/Source/Core/Data/PK3StructuredReader.cs
+++ b/Source/Core/Data/PK3StructuredReader.cs
@@ -261,34 +261,6 @@ namespace CodeImp.DoomBuilder.Data
return null;
}
-
- //mxd
- public override string GetPatchLocation(string pname) {
- // Error when suspended
- if (issuspended) throw new Exception("Data reader is suspended");
-
- if (General.Map.Config.MixTexturesFlats)
- {
- // Find in directories ZDoom expects them to be
- foreach (string loc in PatchLocations)
- {
- string path = Path.Combine(loc, Path.GetDirectoryName(pname));
- string filename = FindFirstFile(path, Path.GetFileName(pname), true);
- if (!string.IsNullOrEmpty(filename) && FileExists(filename))
- return filename;
- }
- }
- else
- {
- // Find in patches directory
- string path = Path.Combine(PATCHES_DIR, Path.GetDirectoryName(pname));
- string filename = FindFirstFile(path, Path.GetFileName(pname), true);
- if (!string.IsNullOrEmpty(filename) && FileExists(filename))
- return filename;
- }
-
- return pname;
- }
#endregion
@@ -346,15 +318,20 @@ namespace CodeImp.DoomBuilder.Data
}
//mxd.
- public override Stream GetFlatData(string pname) {
+ public override Stream GetFlatData(string pname, bool longname)
+ {
// Error when suspended
if(issuspended) throw new Exception("Data reader is suspended");
// Find in any of the wad files
// Note the backward order, because the last wad's images have priority
- for(int i = wads.Count - 1; i > -1; i--) {
- Stream data = wads[i].GetFlatData(pname);
- if(data != null) return data;
+ if(!longname) //mxd. Flats with long names can't be in wads
+ {
+ for (int i = wads.Count - 1; i > -1; i--)
+ {
+ Stream data = wads[i].GetFlatData(pname, false);
+ if (data != null) return data;
+ }
}
// Nothing found
@@ -488,18 +465,18 @@ namespace CodeImp.DoomBuilder.Data
#region ================== Modeldef (mxd)
//mxd
- public override Dictionary GetModeldefData() {
+ public override Dictionary GetModeldefData()
+ {
// Error when suspended
if (issuspended) throw new Exception("Data reader is suspended");
//modedef should be in root folder
- string[] allFiles = GetAllFiles("", false);
+ string[] files = GetAllFiles("", false);
Dictionary streams = new Dictionary(StringComparer.Ordinal);
- foreach (string s in allFiles) {
- if (s.ToLowerInvariant().IndexOf("modeldef") != -1) {
+ foreach (string s in files) {
+ if (s.ToLowerInvariant().IndexOf("modeldef") != -1)
streams.Add(s, LoadFile(s));
- }
}
return streams;
@@ -510,34 +487,37 @@ namespace CodeImp.DoomBuilder.Data
#region ================== Voxeldef (mxd)
//mxd. This returns the list of voxels, which can be used without VOXELDEF definition
- public override string[] GetVoxelNames() {
+ public override string[] GetVoxelNames()
+ {
// Error when suspended
if(issuspended) throw new Exception("Data reader is suspended");
string[] files = GetAllFiles("voxels", false);
List voxels = new List();
- Regex spriteName = new Regex(SPRITE_NAME_PATTERN);
+ Regex spritename = new Regex(SPRITE_NAME_PATTERN);
- for(int i = 0; i < files.Length; i++) {
- string s = Path.GetFileNameWithoutExtension(files[i]).ToUpperInvariant();
- if(spriteName.IsMatch(s)) voxels.Add(s);
+ foreach (string t in files)
+ {
+ string s = Path.GetFileNameWithoutExtension(t).ToUpperInvariant();
+ if(spritename.IsMatch(s)) voxels.Add(s);
}
return voxels.ToArray();
}
//mxd
- public override KeyValuePair GetVoxeldefData() {
+ public override KeyValuePair GetVoxeldefData()
+ {
// Error when suspended
if(issuspended) throw new Exception("Data reader is suspended");
//voxeldef should be in root folder
string[] files = GetAllFiles("", false);
- foreach(string s in files) {
- if(Path.GetFileNameWithoutExtension(s).ToUpperInvariant() == "VOXELDEF") {
+ foreach(string s in files)
+ {
+ if(Path.GetFileNameWithoutExtension(s).ToUpperInvariant() == "VOXELDEF")
return new KeyValuePair(s, LoadFile(s));
- }
}
return new KeyValuePair();
@@ -548,19 +528,21 @@ namespace CodeImp.DoomBuilder.Data
#region ================== (Z)MAPINFO (mxd)
//mxd
- public override Dictionary GetMapinfoData() {
- Dictionary streams = new Dictionary(StringComparer.Ordinal);
+ public override Dictionary GetMapinfoData()
+ {
// Error when suspended
if (issuspended) throw new Exception("Data reader is suspended");
//mapinfo should be in root folder
- string[] allFiles = GetAllFiles("", false);
- string fileName;
+ Dictionary streams = new Dictionary(StringComparer.Ordinal);
+ string[] files = GetAllFiles("", false);
+ string filename;
//try to find (z)mapinfo
- foreach (string s in allFiles) {
- fileName = s.ToLowerInvariant();
- if (fileName.IndexOf("zmapinfo") != -1 || fileName.IndexOf("mapinfo") != -1)
+ foreach (string s in files)
+ {
+ filename = Path.GetFileNameWithoutExtension(s.ToLowerInvariant());
+ if(filename == "zmapinfo" || filename == "mapinfo")
streams.Add(s, LoadFile(s));
}
@@ -572,29 +554,31 @@ namespace CodeImp.DoomBuilder.Data
#region ================== GLDEFS (mxd)
//mxd
- public override Dictionary GetGldefsData(GameType gameType) {
+ public override Dictionary GetGldefsData(GameType gametype)
+ {
// Error when suspended
if (issuspended) throw new Exception("Data reader is suspended");
Dictionary streams = new Dictionary(StringComparer.Ordinal);
//at least one of gldefs should be in root folder
- string[] allFiles = GetAllFiles("", false);
+ string[] files = GetAllFiles("", false);
//try to load game specific GLDEFS first
- string lumpName;
- if (gameType != GameType.UNKNOWN) {
- lumpName = Gldefs.GLDEFS_LUMPS_PER_GAME[(int)gameType].ToLowerInvariant();
- foreach (string s in allFiles) {
- if (s.ToLowerInvariant().IndexOf(lumpName) != -1)
+ if (gametype != GameType.UNKNOWN)
+ {
+ string lumpname = Gldefs.GLDEFS_LUMPS_PER_GAME[(int)gametype].ToLowerInvariant();
+ foreach (string s in files)
+ {
+ if (s.ToLowerInvariant().IndexOf(lumpname) != -1)
streams.Add(s, LoadFile(s));
}
}
- //can be several entries
- lumpName = "gldefs";
- foreach (string s in allFiles) {
- if (s.ToLowerInvariant().IndexOf(lumpName) != -1)
+ // Can be several entries
+ foreach (string s in files)
+ {
+ if(s.ToLowerInvariant().IndexOf("gldefs") != -1)
streams.Add(s, LoadFile(s));
}
@@ -602,7 +586,8 @@ namespace CodeImp.DoomBuilder.Data
}
//mxd
- public override Dictionary GetGldefsData(string location) {
+ public override Dictionary GetGldefsData(string location)
+ {
// Error when suspended
if (issuspended) throw new Exception("Data reader is suspended");
@@ -620,30 +605,24 @@ namespace CodeImp.DoomBuilder.Data
private ICollection LoadDirectoryImages(string path, int imagetype, bool includesubdirs)
{
List images = new List();
- string name;
// Go for all files
string[] files = GetAllFiles(path, includesubdirs);
foreach(string f in files)
{
//mxd. Skip IMGZ files
- if(Path.GetExtension(f).ToUpperInvariant() == ".IMGZ") continue;
+ string ext = Path.GetExtension(f);
+ if(!string.IsNullOrEmpty(ext) && ext.ToUpperInvariant() == ".IMGZ") continue;
- // Make the texture name from filename without extension
- name = Path.GetFileNameWithoutExtension(f);
-
- if (string.IsNullOrEmpty(name))
+ if(string.IsNullOrEmpty(Path.GetFileNameWithoutExtension(f)))
{
// Can't load image without name
General.ErrorLogger.Add(ErrorType.Error, "Can't load an unnamed texture from \"" + path + "\". Please consider giving names to your resources.");
}
else
{
- if(name.Length > General.Map.Config.MaxTextureNameLength) name = name.Substring(0, General.Map.Config.MaxTextureNameLength);
- if(General.Settings.CapitalizeTextureNames) name = name.ToUpperInvariant(); //mxd
-
// Add image to list
- images.Add(CreateImage(name, f, imagetype));
+ images.Add(CreateImage(f, imagetype));
}
}
@@ -664,7 +643,7 @@ namespace CodeImp.DoomBuilder.Data
}
// This must create an image
- protected abstract ImageData CreateImage(string name, string filename, int imagetype);
+ protected abstract ImageData CreateImage(string filename, int imagetype);
// This must return all files in a given directory
protected abstract string[] GetAllFiles(string path, bool subfolders);
diff --git a/Source/Core/Data/SimpleTextureImage.cs b/Source/Core/Data/SimpleTextureImage.cs
index e5e3e04f..ccac03b2 100644
--- a/Source/Core/Data/SimpleTextureImage.cs
+++ b/Source/Core/Data/SimpleTextureImage.cs
@@ -70,7 +70,7 @@ namespace CodeImp.DoomBuilder.Data
{
// Get the patch data stream
if(bitmap != null) bitmap.Dispose(); bitmap = null;
- patchdata = General.Map.Data.GetTextureData(lumpname);
+ patchdata = General.Map.Data.GetTextureData(lumpname, hasLongName);
if(patchdata != null)
{
// Copy patch data to memory
diff --git a/Source/Core/Data/TextureImage.cs b/Source/Core/Data/TextureImage.cs
index c24f5ad3..69c0a216 100644
--- a/Source/Core/Data/TextureImage.cs
+++ b/Source/Core/Data/TextureImage.cs
@@ -106,7 +106,7 @@ namespace CodeImp.DoomBuilder.Data
foreach(TexturePatch p in patches)
{
// Get the patch data stream
- patchdata = General.Map.Data.GetPatchData(p.lumpname);
+ patchdata = General.Map.Data.GetPatchData(p.lumpname, p.haslongname);
if(patchdata != null)
{
// Copy patch data to memory
diff --git a/Source/Core/Data/TexturePatch.cs b/Source/Core/Data/TexturePatch.cs
index 79229b99..77a86d9c 100644
--- a/Source/Core/Data/TexturePatch.cs
+++ b/Source/Core/Data/TexturePatch.cs
@@ -16,6 +16,7 @@
#region ================== Namespaces
+using System.IO;
using CodeImp.DoomBuilder.Rendering;
using CodeImp.DoomBuilder.ZDoom;
@@ -45,17 +46,18 @@ namespace CodeImp.DoomBuilder.Data
internal struct TexturePatch
{
- public string lumpname;
- public int x;
- public int y;
- public bool flipx;
- public bool flipy;
- public int rotate;
+ public readonly string lumpname;
+ public readonly int x;
+ public readonly int y;
+ public readonly bool flipx;
+ public readonly bool flipy;
+ public readonly bool haslongname; //mxd
+ public readonly int rotate;
public PixelColor blend;
- public float alpha;
- public TexturePathRenderStyle style;
- public TexturePathBlendStyle blendstyle; //mxd
- public float tintammount;//mxd
+ public readonly float alpha;
+ public readonly TexturePathRenderStyle style;
+ public readonly TexturePathBlendStyle blendstyle; //mxd
+ public readonly float tintammount;//mxd
// Constructor for simple patches
public TexturePatch(string lumpname, int x, int y)
@@ -72,6 +74,7 @@ namespace CodeImp.DoomBuilder.Data
this.style = TexturePathRenderStyle.Copy;
this.blendstyle = TexturePathBlendStyle.None;//mxd
this.tintammount = 0; //mxd
+ this.haslongname = false; //mxd
}
//mxd. Constructor for hires patches
@@ -88,9 +91,11 @@ namespace CodeImp.DoomBuilder.Data
this.style = patch.RenderStyle;
this.blendstyle = patch.BlendStyle;
this.tintammount = patch.TintAmmount;
+ this.haslongname = (Path.GetFileNameWithoutExtension(this.lumpname) != this.lumpname);
//mxd. Check data so we don't perform unneeded operations later on
- if(this.alpha == 1.0f) {
+ if(this.alpha == 1.0f)
+ {
if(this.style == TexturePathRenderStyle.Blend || this.style == TexturePathRenderStyle.CopyAlpha || this.style == TexturePathRenderStyle.CopyNewAlpha || this.style == TexturePathRenderStyle.Overlay)
this.style = TexturePathRenderStyle.Copy;
}
diff --git a/Source/Core/Data/WADReader.cs b/Source/Core/Data/WADReader.cs
index da66b1b1..b9d686a0 100644
--- a/Source/Core/Data/WADReader.cs
+++ b/Source/Core/Data/WADReader.cs
@@ -536,28 +536,32 @@ namespace CodeImp.DoomBuilder.Data
}
// This finds and returns a patch stream
- public override Stream GetPatchData(string pname)
+ public override Stream GetPatchData(string pname, bool longname)
{
- Lump lump;
-
// Error when suspended
if(issuspended) throw new Exception("Data reader is suspended");
+ if(longname) return null; //mxd
+ Lump lump;
// mxd. First strictly read patches between P_START and P_END
- foreach(LumpRange range in patchranges) {
+ foreach(LumpRange range in patchranges)
+ {
lump = file.FindLump(pname, range.start, range.end);
if(lump != null) return lump.Stream;
}
- if (!strictpatches) {
+ if (!strictpatches)
+ {
//mxd. Find the lump anywhere EXCEPT flat ranges (the way it's done in ZDoom)
- foreach (LumpRange range in invertedflatranges) {
+ foreach (LumpRange range in invertedflatranges)
+ {
lump = file.FindLump(pname, range.start, range.end);
if(lump != null) return lump.Stream;
}
// Find the lump anywhere IN flat ranges
- foreach (LumpRange range in flatranges) {
+ foreach (LumpRange range in flatranges)
+ {
lump = file.FindLump(pname, range.start, range.end);
if(lump != null) return lump.Stream;
}
@@ -567,12 +571,12 @@ namespace CodeImp.DoomBuilder.Data
}
// This finds and returns a texture stream
- public override Stream GetTextureData(string pname)
+ public override Stream GetTextureData(string pname, bool longname)
{
- Lump lump;
-
// Error when suspended
if(issuspended) throw new Exception("Data reader is suspended");
+ if(longname) return null; //mxd
+ Lump lump;
// Find the lump in ranges
foreach(LumpRange range in textureranges)
@@ -589,19 +593,23 @@ namespace CodeImp.DoomBuilder.Data
#region ================== Flats
//mxd. This loads the flats
- public override ICollection LoadFlats() {
+ public override ICollection LoadFlats()
+ {
// Error when suspended
if(issuspended) throw new Exception("Data reader is suspended");
List images = new List();
FlatImage image;
- foreach(LumpRange range in flatranges){
+ foreach(LumpRange range in flatranges)
+ {
if(range.end < range.start + 2) continue;
- for(int i = range.start + 1; i < range.end; i++) {
+ for(int i = range.start + 1; i < range.end; i++)
+ {
// Lump not zero-length?
- if(file.Lumps[i].Length > 0) {
+ if(file.Lumps[i].Length > 0)
+ {
// Make the image object
image = new FlatImage(file.Lumps[i].Name);
@@ -613,7 +621,8 @@ namespace CodeImp.DoomBuilder.Data
// Load TEXTURES lump file
int lumpindex = file.FindLumpIndex("TEXTURES");
- while(lumpindex > -1) {
+ while(lumpindex > -1)
+ {
MemoryStream filedata = new MemoryStream(file.Lumps[lumpindex].Stream.ReadAllBytes());
WADReader.LoadHighresFlats(filedata, "TEXTURES", ref images, null, null);
filedata.Dispose();
@@ -654,11 +663,11 @@ namespace CodeImp.DoomBuilder.Data
}
// This finds and returns a patch stream
- public override Stream GetFlatData(string pname)
+ public override Stream GetFlatData(string pname, bool longname)
{
// Error when suspended
if(issuspended) throw new Exception("Data reader is suspended");
-
+ if(longname) return null; //mxd
Lump lump;
// Find the lump in ranges
diff --git a/Source/Core/Editing/CopyPasteManager.cs b/Source/Core/Editing/CopyPasteManager.cs
index 494c0d82..ab38596d 100644
--- a/Source/Core/Editing/CopyPasteManager.cs
+++ b/Source/Core/Editing/CopyPasteManager.cs
@@ -230,7 +230,7 @@ namespace CodeImp.DoomBuilder.Editing
// Write data to stream
MemoryStream memstream = new MemoryStream();
ClipboardStreamWriter writer = new ClipboardStreamWriter(); //mxd
- writer.Write(copyset, memstream);
+ writer.Write(copyset, memstream, General.Map.Options.UseLongTextureNames);
// Set on clipboard
Clipboard.SetData(CLIPBOARD_DATA_FORMAT, memstream);
@@ -293,6 +293,10 @@ namespace CodeImp.DoomBuilder.Editing
// Convert UDMF fields back to flags and activations, if needed
if(!(General.Map.FormatInterface is UniversalMapSetIO)) General.Map.Map.TranslateFromUDMF();
+
+ //mxd. Translate texture names if needed
+ if(reader.UseLongTextureNames != General.Map.Options.UseLongTextureNames)
+ General.Map.Map.TranslateTextureNames(General.Map.Options.UseLongTextureNames, true);
// Modify tags and actions if preferred
if(options.ChangeTags == PasteOptions.TAGS_REMOVE) Tools.RemoveMarkedTags();
diff --git a/Source/Core/Editing/GridSetup.cs b/Source/Core/Editing/GridSetup.cs
index 2f0df40b..be4f484c 100644
--- a/Source/Core/Editing/GridSetup.cs
+++ b/Source/Core/Editing/GridSetup.cs
@@ -17,7 +17,9 @@
#region ================== Namespaces
using System;
+using System.IO;
using System.Windows.Forms;
+using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Windows;
using CodeImp.DoomBuilder.IO;
using CodeImp.DoomBuilder.Actions;
@@ -129,7 +131,7 @@ namespace CodeImp.DoomBuilder.Editing
}
// Read settings from configuration
- internal void ReadFromConfig(Configuration cfg, string path)
+ internal void ReadFromConfig(Configuration cfg, string path, bool uselongtexturenames)
{
// Read settings
background = cfg.ReadSetting(path + ".background", "");
@@ -140,6 +142,9 @@ namespace CodeImp.DoomBuilder.Editing
backscaley = cfg.ReadSetting(path + ".backscaley", 100) / 100.0f;
gridsize = cfg.ReadSetting(path + ".gridsize", DEFAULT_GRID_SIZE);
+ //mxd. Translate background name?
+ TranslateBackgroundName(uselongtexturenames);
+
// Setup
SetGridSize(gridsize);
LinkBackground();
@@ -172,6 +177,23 @@ namespace CodeImp.DoomBuilder.Editing
LinkBackground();
}
+ //mxd
+ internal void TranslateBackgroundName(bool uselongtexturenames)
+ {
+ if(string.IsNullOrEmpty(background)) return;
+
+ switch(backsource)
+ {
+ case SOURCE_TEXTURES:
+ background = (uselongtexturenames ? General.Map.Data.GetFullTextureName(background) : MapSet.GetShortTextureName(background));
+ break;
+
+ case SOURCE_FLATS:
+ background = (uselongtexturenames ? General.Map.Data.GetFullFlatName(background) : MapSet.GetShortTextureName(background));
+ break;
+ }
+ }
+
// This sets the background view
internal void SetBackgroundView(int offsetx, int offsety, float scalex, float scaley)
{
@@ -200,7 +222,7 @@ namespace CodeImp.DoomBuilder.Editing
break;
case SOURCE_FILE:
- backimage = new FileImage(background, background, false, 1.0f, 1.0f);
+ backimage = new FileImage(Path.GetFileNameWithoutExtension(background), background, false, 1.0f, 1.0f);
break;
}
diff --git a/Source/Core/GZBuilder/Controls/MultiSelectTreeview.cs b/Source/Core/GZBuilder/Controls/MultiSelectTreeview.cs
index 8c6bc323..03c2c7ae 100644
--- a/Source/Core/GZBuilder/Controls/MultiSelectTreeview.cs
+++ b/Source/Core/GZBuilder/Controls/MultiSelectTreeview.cs
@@ -908,6 +908,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
{
components = new System.ComponentModel.Container();
DoubleBuffered = true; //mxd
+ SetStyle(ControlStyles.OptimizedDoubleBuffer, true); //mxd
}
#endregion
diff --git a/Source/Core/GZBuilder/Controls/PairedIntControl.Designer.cs b/Source/Core/GZBuilder/Controls/PairedIntControl.Designer.cs
index 638a94fc..da2d6128 100644
--- a/Source/Core/GZBuilder/Controls/PairedIntControl.Designer.cs
+++ b/Source/Core/GZBuilder/Controls/PairedIntControl.Designer.cs
@@ -26,20 +26,32 @@
///
private void InitializeComponent() {
this.label = new System.Windows.Forms.Label();
+ this.bReset = new System.Windows.Forms.Button();
this.value1 = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.value2 = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
- this.bReset = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label
//
this.label.Location = new System.Drawing.Point(0, 6);
this.label.Name = "label";
- this.label.Size = new System.Drawing.Size(87, 14);
+ this.label.Size = new System.Drawing.Size(86, 14);
this.label.TabIndex = 40;
this.label.Text = "Upper Offset:";
this.label.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
+ // bReset
+ //
+ this.bReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.bReset.Image = global::CodeImp.DoomBuilder.Properties.Resources.Reset;
+ this.bReset.Location = new System.Drawing.Point(220, 1);
+ this.bReset.Name = "bReset";
+ this.bReset.Size = new System.Drawing.Size(23, 23);
+ this.bReset.TabIndex = 43;
+ this.bReset.UseVisualStyleBackColor = true;
+ this.bReset.Visible = false;
+ this.bReset.Click += new System.EventHandler(this.bReset_Click);
+ //
// value1
//
this.value1.AllowDecimal = false;
@@ -48,7 +60,8 @@
this.value1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.value1.ButtonStep = 1;
this.value1.ButtonStepFloat = 1F;
- this.value1.Location = new System.Drawing.Point(89, 1);
+ this.value1.ButtonStepsWrapAround = false;
+ this.value1.Location = new System.Drawing.Point(87, 1);
this.value1.Name = "value1";
this.value1.Size = new System.Drawing.Size(62, 24);
this.value1.StepValues = null;
@@ -64,7 +77,8 @@
this.value2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.value2.ButtonStep = 1;
this.value2.ButtonStepFloat = 1F;
- this.value2.Location = new System.Drawing.Point(157, 1);
+ this.value2.ButtonStepsWrapAround = false;
+ this.value2.Location = new System.Drawing.Point(155, 1);
this.value2.Name = "value2";
this.value2.Size = new System.Drawing.Size(62, 24);
this.value2.StepValues = null;
@@ -72,28 +86,16 @@
this.value2.Tag = "offsety_top";
this.value2.WhenTextChanged += new System.EventHandler(this.value1_WhenTextChanged);
//
- // bReset
- //
- this.bReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.bReset.Image = global::CodeImp.DoomBuilder.Properties.Resources.Reset;
- this.bReset.Location = new System.Drawing.Point(222, 1);
- this.bReset.Name = "bReset";
- this.bReset.Size = new System.Drawing.Size(23, 23);
- this.bReset.TabIndex = 43;
- this.bReset.UseVisualStyleBackColor = true;
- this.bReset.Visible = false;
- this.bReset.Click += new System.EventHandler(this.bReset_Click);
- //
// PairedIntControl
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.bReset);
this.Controls.Add(this.value1);
this.Controls.Add(this.value2);
this.Controls.Add(this.label);
this.Name = "PairedIntControl";
- this.Size = new System.Drawing.Size(249, 26);
+ this.Size = new System.Drawing.Size(268, 26);
this.ResumeLayout(false);
}
diff --git a/Source/Core/General/ErrorLogger.cs b/Source/Core/General/ErrorLogger.cs
index e2a4516c..f93b1f12 100644
--- a/Source/Core/General/ErrorLogger.cs
+++ b/Source/Core/General/ErrorLogger.cs
@@ -87,18 +87,23 @@ namespace CodeImp.DoomBuilder
case ErrorType.Error:
erroradded = true;
prefix = "ERROR: ";
+#if DEBUG
+ DebugConsole.WriteLine(DebugMessageType.Error, message);
+#endif
break;
case ErrorType.Warning:
warningadded = true;
prefix = "WARNING: ";
+#if DEBUG
+ DebugConsole.WriteLine(DebugMessageType.Warning, message);
+#endif
break;
}
changed = true;
+
General.WriteLogLine(prefix + message);
-
- //mxd
- General.MainWindow.SetWarningsCount(errors.Count, erroradded);
+ General.MainWindow.SetWarningsCount(errors.Count, erroradded); //mxd
}
}
diff --git a/Source/Core/General/General.cs b/Source/Core/General/General.cs
index a1b7d453..46b4e461 100644
--- a/Source/Core/General/General.cs
+++ b/Source/Core/General/General.cs
@@ -998,14 +998,14 @@ namespace CodeImp.DoomBuilder
internal static void NewMap()
{
//mxd
- if(map != null && map.Launcher.GameEngineRunning) {
+ if(map != null && map.Launcher.GameEngineRunning)
+ {
ShowWarningMessage("Cannot create a map while game engine is running" + Environment.NewLine + "Please close '" + map.ConfigSettings.TestProgram + "' first.", MessageBoxButtons.OK);
return;
}
MapOptions newoptions = new MapOptions();
- MapOptionsForm optionswindow;
-
+
// Cancel volatile mode, if any
editing.DisengageVolatileMode();
@@ -1013,7 +1013,7 @@ namespace CodeImp.DoomBuilder
if(AskSaveMap())
{
// Open map options dialog
- optionswindow = new MapOptionsForm(newoptions, true);
+ MapOptionsForm optionswindow = new MapOptionsForm(newoptions, true);
if(optionswindow.ShowDialog(mainwindow) == DialogResult.OK)
{
// Display status
@@ -1030,9 +1030,8 @@ namespace CodeImp.DoomBuilder
// Let the plugins know
plugins.OnMapNewBegin();
- // Set this to false so we can see if errors are added
- //General.ErrorLogger.IsErrorAdded = false;
- errorlogger.Clear(); //mxd
+ // Clear old errors (mxd)
+ errorlogger.Clear();
// Create map manager with given options
map = new MapManager();
@@ -1195,6 +1194,26 @@ namespace CodeImp.DoomBuilder
ChangeMapForm changemapwindow = new ChangeMapForm(map.FilePathName, map.Options);
if(changemapwindow.ShowDialog(mainwindow) != DialogResult.OK) return;
+ // If resources don't match, perform regular map loading
+ bool resourcesmismatch = changemapwindow.Options.Resources.Count != map.Options.Resources.Count;
+ if (!resourcesmismatch)
+ {
+ for(int i = 0; i < changemapwindow.Options.Resources.Count; i++)
+ {
+ if(changemapwindow.Options.Resources[i].location != map.Options.Resources[i].location)
+ {
+ resourcesmismatch = true;
+ break;
+ }
+ }
+ }
+
+ if(resourcesmismatch)
+ {
+ OpenMapFileWithOptions(map.FilePathName, changemapwindow.Options);
+ return;
+ }
+
// Display status
mainwindow.DisplayStatus(StatusType.Busy, "Switching to map '" + changemapwindow.Options.CurrentName + "'...");
WriteLogLine("Switching to map '" + changemapwindow.Options.CurrentName + "'...");
@@ -1363,7 +1382,7 @@ namespace CodeImp.DoomBuilder
result = map.SaveSettingsFile(map.FilePathName);
// Display status
- mainwindow.DisplayStatus(StatusType.Info, "Map is up to date. No saving required.");
+ mainwindow.DisplayStatus(StatusType.Info, "Map is up to date. Updated map settings file.");
// All done
mainwindow.UpdateInterface();
@@ -1894,24 +1913,14 @@ namespace CodeImp.DoomBuilder
// This shows an image in a panel either zoomed or centered depending on size
public static void DisplayZoomedImage(Panel panel, Image image)
{
- // Set the image
- panel.BackgroundImage = image;
-
// Image not null?
if(image != null)
{
- // Small enough to fit in panel?
- if((image.Size.Width < panel.ClientRectangle.Width) &&
- (image.Size.Height < panel.ClientRectangle.Height))
- {
- // Display centered
- panel.BackgroundImageLayout = ImageLayout.Center;
- }
- else
- {
- // Display zoomed
- panel.BackgroundImageLayout = ImageLayout.Zoom;
- }
+ // Set the image
+ panel.BackgroundImage = image;
+
+ // Display zoomed
+ panel.BackgroundImageLayout = ImageLayout.Zoom;
}
}
diff --git a/Source/Core/General/MapManager.cs b/Source/Core/General/MapManager.cs
index 91b0f106..b19bac76 100644
--- a/Source/Core/General/MapManager.cs
+++ b/Source/Core/General/MapManager.cs
@@ -413,6 +413,17 @@ namespace CodeImp.DoomBuilder {
// Remove unused sectors
map.RemoveUnusedSectors(true);
+ //mxd. Translate to long or short texture names.
+ bool nameschanged = map.TranslateTextureNames(options.UseLongTextureNames, false);
+ grid.TranslateBackgroundName(options.UseLongTextureNames);
+
+ //mxd. Sector textures may've been changed
+ if (nameschanged)
+ {
+ data.UpdateUsedTextures();
+ General.Map.IsChanged = true;
+ }
+
// Update structures
options.ApplyGridSettings();
map.UpdateConfiguration();
@@ -445,8 +456,23 @@ namespace CodeImp.DoomBuilder {
}
//mxd. This switches to another map in the same wad
- internal bool InitializeSwitchMap(MapOptions options)
+ internal bool InitializeSwitchMap(MapOptions options)
{
+ bool uselongtexturenames = this.options.UseLongTextureNames;
+
+ // Does not compute! (we don't reload resources, so it can potentially
+ // lead to texture lookup FIALS if there are non-WAD resources)
+ if(uselongtexturenames != options.UseLongTextureNames &&
+ MessageBox.Show(General.MainWindow,
+ "Texture names in the map you are opening will be translated to "
+ + (uselongtexturenames ? "long" : "short") + " texture names."
+ + (!uselongtexturenames ? " This may lead to texture and flat name conflicts." : "")
+ + " Do you want to continue?",
+ Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.No)
+ {
+ return false;
+ }
+
this.changed = false;
this.options = options;
@@ -508,7 +534,16 @@ namespace CodeImp.DoomBuilder {
ChangeMapSet(newmap);
- data.UpdateUsedTextures();
+ //mxd. Translate texture names
+ bool nameschanged = map.TranslateTextureNames(uselongtexturenames, false);
+ grid.TranslateBackgroundName(uselongtexturenames);
+
+ //mxd. Sector textures may've been changed
+ if (nameschanged)
+ {
+ data.UpdateUsedTextures();
+ General.Map.IsChanged = true;
+ }
//mxd. check script names
UpdateScriptNames();
@@ -1875,7 +1910,7 @@ namespace CodeImp.DoomBuilder {
foreach (Thing t in General.Map.Map.Things)
for(int i = 0; i < t.Args.Length; i++) t.Args[i] = 0;
}
- General.Map.Map.UpdateCustomLinedefColors();
+ map.UpdateCustomLinedefColors();
// Update interface
General.MainWindow.SetupInterface();
@@ -1886,6 +1921,17 @@ namespace CodeImp.DoomBuilder {
ReloadResources();
UpdateScriptNames(); //mxd
+ //mxd. Translate texture names
+ bool nameschanged = map.TranslateTextureNames(options.UseLongTextureNames, false);
+ grid.TranslateBackgroundName(options.UseLongTextureNames);
+
+ //mxd. Sector textures may've been changed
+ if (nameschanged)
+ {
+ data.UpdateUsedTextures();
+ General.Map.IsChanged = true;
+ }
+
// Done
General.MainWindow.DisplayReady();
General.MainWindow.RedrawDisplay(); //mxd
@@ -1950,7 +1996,7 @@ namespace CodeImp.DoomBuilder {
Cursor.Current = Cursors.AppStarting;
// Make undo for the snapping
- General.Map.UndoRedo.CreateUndo("Snap vertices");
+ undoredo.CreateUndo("Snap vertices");
int snappedCount = 0;
List movedVerts = new List();
diff --git a/Source/Core/IO/ClipboardStreamReader.cs b/Source/Core/IO/ClipboardStreamReader.cs
index 8a2949f1..a7cc5f1c 100644
--- a/Source/Core/IO/ClipboardStreamReader.cs
+++ b/Source/Core/IO/ClipboardStreamReader.cs
@@ -29,6 +29,14 @@ namespace CodeImp.DoomBuilder.IO
public Dictionary Flags;
}
+ private bool uselongtexturenames; //mxd
+
+ #endregion
+
+ #region ================== Properties
+
+ public bool UseLongTextureNames { get { return uselongtexturenames; } } //mxd
+
#endregion
#region ================== Reading
@@ -38,6 +46,7 @@ namespace CodeImp.DoomBuilder.IO
BinaryReader reader = new BinaryReader(stream);
// Read the map
+ uselongtexturenames = reader.ReadBoolean(); //mxd
Dictionary vertexlink = ReadVertices(map, reader);
Dictionary sectorlink = ReadSectors(map, reader);
Dictionary sidedeflink = ReadSidedefs(reader);
diff --git a/Source/Core/IO/ClipboardStreamWriter.cs b/Source/Core/IO/ClipboardStreamWriter.cs
index 0e9f63e3..20876b41 100644
--- a/Source/Core/IO/ClipboardStreamWriter.cs
+++ b/Source/Core/IO/ClipboardStreamWriter.cs
@@ -80,12 +80,12 @@ namespace CodeImp.DoomBuilder.IO
#region ================== Writing
- public void Write(MapSet map, Stream stream) {
- Write(map.Vertices, map.Linedefs, map.Sidedefs, map.Sectors, map.Things, stream);
+ public void Write(MapSet map, Stream stream, bool longtexturenames) {
+ Write(map.Vertices, map.Linedefs, map.Sidedefs, map.Sectors, map.Things, stream, longtexturenames);
}
public void Write(ICollection vertices, ICollection linedefs, ICollection sidedefs,
- ICollection sectors, ICollection things, Stream stream) {
+ ICollection sectors, ICollection things, Stream stream, bool longtexturenames) {
// Create collections
Dictionary vertexids = new Dictionary();
Dictionary sidedefids = new Dictionary();
@@ -98,6 +98,7 @@ namespace CodeImp.DoomBuilder.IO
BinaryWriter writer = new BinaryWriter(stream);
// Write the data structures to stream
+ writer.Write(longtexturenames); //mxd
WriteVertices(vertices, writer);
WriteSectors(sectors, writer);
WriteSidedefs(sidedefs, writer, sectorids);
diff --git a/Source/Core/IO/Lump.cs b/Source/Core/IO/Lump.cs
index dd1b6766..7377f7aa 100644
--- a/Source/Core/IO/Lump.cs
+++ b/Source/Core/IO/Lump.cs
@@ -19,6 +19,7 @@
using System;
using System.Text;
using System.IO;
+using CodeImp.DoomBuilder.Data;
#endregion
@@ -107,7 +108,7 @@ namespace CodeImp.DoomBuilder.IO
#region ================== Methods
// This returns the long value for a 8 byte texture name
- public static unsafe long MakeLongName(string name)
+ /*public static unsafe long MakeLongName(string name)
{
long value = 0;
byte[] namebytes = Encoding.ASCII.GetBytes(name.Trim().ToUpper());
@@ -120,6 +121,17 @@ namespace CodeImp.DoomBuilder.IO
}
return value;
+ }*/
+
+ //mxd. This returns (hopefully) unique hash value for a texture name of any length
+ public static long MakeLongName(string name)
+ {
+ name = name.Trim().ToUpper();
+ if(name.Length > DataManager.CLASIC_IMAGE_NAME_LENGTH && General.Map != null && General.Map.Options != null && !General.Map.Options.UseLongTextureNames)
+ {
+ name = name.Substring(0, DataManager.CLASIC_IMAGE_NAME_LENGTH);
+ }
+ return MurmurHash2.Hash(name);
}
// This makes the normal name from fixed name
diff --git a/Source/Core/IO/UniversalParser.cs b/Source/Core/IO/UniversalParser.cs
index d455c3af..6ca60ef0 100644
--- a/Source/Core/IO/UniversalParser.cs
+++ b/Source/Core/IO/UniversalParser.cs
@@ -392,7 +392,7 @@ namespace CodeImp.DoomBuilder.IO
// Add it to struct
UniversalEntry entry = new UniversalEntry(key.ToString().Trim().ToLowerInvariant(), ival);
cs.Add(entry);
- matches.Add(data[line], entry);
+ if(!matches.ContainsKey(data[line])) matches.Add(data[line], entry);
}
catch(OverflowException)
{
@@ -405,7 +405,7 @@ namespace CodeImp.DoomBuilder.IO
// Add it to struct
UniversalEntry entry = new UniversalEntry(key.ToString().Trim().ToLowerInvariant(), lval);
cs.Add(entry);
- matches.Add(data[line], entry);
+ if(!matches.ContainsKey(data[line])) matches.Add(data[line], entry);
}
catch(OverflowException)
{
@@ -440,7 +440,7 @@ namespace CodeImp.DoomBuilder.IO
// Add it to struct
UniversalEntry entry = new UniversalEntry(key.ToString().Trim().ToLowerInvariant(), fval);
cs.Add(entry);
- matches.Add(data[line], entry);
+ if(!matches.ContainsKey(data[line])) matches.Add(data[line], entry);
}
else
{
@@ -453,7 +453,7 @@ namespace CodeImp.DoomBuilder.IO
// Add it to struct
UniversalEntry entry = new UniversalEntry(key.ToString().Trim().ToLowerInvariant(), ival);
cs.Add(entry);
- matches.Add(data[line], entry);
+ if(!matches.ContainsKey(data[line])) matches.Add(data[line], entry);
}
catch(OverflowException)
{
@@ -466,7 +466,7 @@ namespace CodeImp.DoomBuilder.IO
// Add it to struct
UniversalEntry entry = new UniversalEntry(key.ToString().Trim().ToLowerInvariant(), lval);
cs.Add(entry);
- matches.Add(data[line], entry);
+ if(!matches.ContainsKey(data[line])) matches.Add(data[line], entry);
}
catch(OverflowException)
{
@@ -574,7 +574,7 @@ namespace CodeImp.DoomBuilder.IO
// Add string to struct
UniversalEntry entry = new UniversalEntry(key.ToString().Trim().ToLowerInvariant(), val.ToString());
cs.Add(entry);
- matches.Add(data[line], entry);
+ if(!matches.ContainsKey(data[line])) matches.Add(data[line], entry);
// End of assignment
pm = PM_ASSIGNMENT;
@@ -611,14 +611,14 @@ namespace CodeImp.DoomBuilder.IO
// Add boolean true
UniversalEntry t = new UniversalEntry(key.ToString().Trim().ToLowerInvariant(), true);
cs.Add(t);
- matches.Add(data[line], t);
+ if(!matches.ContainsKey(data[line])) matches.Add(data[line], t);
break;
case "false":
// Add boolean false
UniversalEntry f = new UniversalEntry(key.ToString().Trim().ToLowerInvariant(), false);
cs.Add(f);
- matches.Add(data[line], f);
+ if(!matches.ContainsKey(data[line])) matches.Add(data[line], f);
break;
default:
diff --git a/Source/Core/IO/UniversalStreamReader.cs b/Source/Core/IO/UniversalStreamReader.cs
index d65db2d9..91dc3d99 100644
--- a/Source/Core/IO/UniversalStreamReader.cs
+++ b/Source/Core/IO/UniversalStreamReader.cs
@@ -133,13 +133,13 @@ namespace CodeImp.DoomBuilder.IO
public MapSet Read(MapSet map, Stream stream)
{
StreamReader reader = new StreamReader(stream, Encoding.ASCII);
- Dictionary vertexlink;
- Dictionary sectorlink;
UniversalParser textmap = new UniversalParser();
textmap.StrictChecking = strictchecking;
+#if !DEBUG
try
{
+#endif
// Read UDMF from stream
List data = new List(100);
while(!reader.EndOfStream)
@@ -160,16 +160,18 @@ namespace CodeImp.DoomBuilder.IO
else
{
// Read the map
- vertexlink = ReadVertices(map, textmap);
- sectorlink = ReadSectors(map, textmap);
+ Dictionary vertexlink = ReadVertices(map, textmap);
+ Dictionary sectorlink = ReadSectors(map, textmap);
ReadLinedefs(map, textmap, vertexlink, sectorlink);
ReadThings(map, textmap);
}
+#if !DEBUG
}
catch(Exception e)
{
General.ShowErrorMessage("Unexpected error reading UDMF map data. " + e.GetType().Name + ": " + e.Message, MessageBoxButtons.OK);
}
+#endif
return map;
}
@@ -326,12 +328,12 @@ namespace CodeImp.DoomBuilder.IO
{
// Read fields
string where = "linedef " + ld.Index + (front ? " front sidedef " : " back sidedef ") + index;
- int offsetx = GetCollectionEntry(sc, "offsetx", false, 0, where);
- int offsety = GetCollectionEntry(sc, "offsety", false, 0, where);
- string thigh = GetCollectionEntry(sc, "texturetop", false, "-", where);
- string tlow = GetCollectionEntry(sc, "texturebottom", false, "-", where);
- string tmid = GetCollectionEntry(sc, "texturemiddle", false, "-", where);
- int sector = GetCollectionEntry(sc, "sector", true, 0, where);
+ int offsetx = GetCollectionEntry(sc, "offsetx", false, 0, where);
+ int offsety = GetCollectionEntry(sc, "offsety", false, 0, where);
+ string thigh = GetCollectionEntry(sc, "texturetop", false, "-", where);
+ string tlow = GetCollectionEntry(sc, "texturebottom", false, "-", where);
+ string tmid = GetCollectionEntry(sc, "texturemiddle", false, "-", where);
+ int sector = GetCollectionEntry(sc, "sector", true, 0, where);
//mxd. Flags
Dictionary stringflags = new Dictionary(StringComparer.Ordinal);
@@ -359,13 +361,11 @@ namespace CodeImp.DoomBuilder.IO
// This reads the sectors
private Dictionary ReadSectors(MapSet map, UniversalParser textmap)
{
- Dictionary link;
-
// Get list of entries
List collections = GetNamedCollections(textmap.Root, "sector");
// Create lookup table
- link = new Dictionary(collections.Count);
+ Dictionary link = new Dictionary(collections.Count);
// Go for all collections
map.SetCapacity(0, 0, 0, map.Sectors.Count + collections.Count, 0);
@@ -419,13 +419,11 @@ namespace CodeImp.DoomBuilder.IO
// This reads the vertices
private Dictionary ReadVertices(MapSet map, UniversalParser textmap)
{
- Dictionary link;
-
// Get list of entries
List collections = GetNamedCollections(textmap.Root, "vertex");
// Create lookup table
- link = new Dictionary(collections.Count);
+ Dictionary link = new Dictionary(collections.Count);
// Go for all collections
map.SetCapacity(map.Vertices.Count + collections.Count, 0, 0, 0, 0);
diff --git a/Source/Core/Map/MapOptions.cs b/Source/Core/Map/MapOptions.cs
index a0b60bab..29810d82 100644
--- a/Source/Core/Map/MapOptions.cs
+++ b/Source/Core/Map/MapOptions.cs
@@ -79,6 +79,8 @@ namespace CodeImp.DoomBuilder.Map
private bool overridefloorheight;
private bool overrideceilheight;
private bool overridebrightness;
+
+ private bool uselongtexturenames; //mxd
#endregion
@@ -129,6 +131,8 @@ namespace CodeImp.DoomBuilder.Map
public bool OverrideFloorHeight { get { return overridefloorheight; } set { overridefloorheight = value; } }
public bool OverrideCeilingHeight { get { return overrideceilheight; } set { overrideceilheight = value; } }
public bool OverrideBrightness { get { return overridebrightness; } set { overridebrightness = value; } }
+
+ public bool UseLongTextureNames { get { return uselongtexturenames; } set { uselongtexturenames = value; } } //mxd
#endregion
@@ -211,6 +215,8 @@ namespace CodeImp.DoomBuilder.Map
overrideceilheight = this.mapconfig.ReadSetting("overrideceilheight", false);
overridebrightness = this.mapconfig.ReadSetting("overridebrightness", false);
+ uselongtexturenames = this.mapconfig.ReadSetting("uselongtexturenames", false); //mxd
+
// Resources
IDictionary reslist = this.mapconfig.ReadSetting("resources", new Hashtable());
foreach(DictionaryEntry mp in reslist)
@@ -295,11 +301,13 @@ namespace CodeImp.DoomBuilder.Map
General.Map.Map.WriteSelectionGroups(mapconfig);
//mxd. Save Tag Labels
- if(tagLabels.Count > 0) {
+ if(tagLabels.Count > 0)
+ {
ListDictionary tagLabelsData = new ListDictionary();
int counter = 1;
- foreach(KeyValuePair group in tagLabels){
+ foreach(KeyValuePair group in tagLabels)
+ {
ListDictionary data = new ListDictionary();
data.Add("tag", group.Key);
data.Add("label", group.Value);
@@ -330,6 +338,8 @@ namespace CodeImp.DoomBuilder.Map
mapconfig.WriteSetting("overrideceilheight", overrideceilheight);
mapconfig.WriteSetting("overridebrightness", overridebrightness);
+ mapconfig.WriteSetting("uselongtexturenames", uselongtexturenames); //mxd
+
//mxd. Write script compiler
if(!string.IsNullOrEmpty(scriptcompiler))
mapconfig.WriteSetting("scriptcompiler", scriptcompiler);
@@ -416,7 +426,7 @@ namespace CodeImp.DoomBuilder.Map
// This loads the grid settings
internal void ApplyGridSettings()
{
- General.Map.Grid.ReadFromConfig(mapconfig, "grid");
+ General.Map.Grid.ReadFromConfig(mapconfig, "grid", uselongtexturenames);
}
//mxd. This reads stored selection groups from the map configuration
diff --git a/Source/Core/Map/MapSet.cs b/Source/Core/Map/MapSet.cs
index 86cbf8e6..e1e103f1 100644
--- a/Source/Core/Map/MapSet.cs
+++ b/Source/Core/Map/MapSet.cs
@@ -28,6 +28,7 @@ using CodeImp.DoomBuilder.IO;
using CodeImp.DoomBuilder.Types;
using CodeImp.DoomBuilder.Windows;
using CodeImp.DoomBuilder.VisualModes;
+using CodeImp.DoomBuilder.Data;
#endregion
@@ -3204,6 +3205,151 @@ namespace CodeImp.DoomBuilder.Map
foreach(Thing t in things) if(t.Marked) t.TranslateFromUDMF();
}
+ //mxd
+ internal bool TranslateTextureNames(bool uselongnames, bool markedonly)
+ {
+ if (markedonly)
+ {
+ List markedsectors = GetMarkedSectors(true);
+ List markedsides = GetMarkedSidedefs(true);
+ if(uselongnames) return TranslateToLongTextureNames(markedsectors, markedsides);
+ return TranslateToShortTextureNames(markedsectors, markedsides);
+ }
+ else
+ {
+ if(uselongnames) return TranslateToLongTextureNames(sectors, sidedefs);
+ return TranslateToShortTextureNames(sectors, sidedefs);
+ }
+ }
+
+ //mxd
+ private bool TranslateToLongTextureNames(IEnumerable sectors, IEnumerable sidedefs)
+ {
+ bool changed = false;
+
+ foreach (Sector s in sectors)
+ {
+ if (s.FloorTexture != "-")
+ {
+ string ft = General.Map.Data.GetFullFlatName(s.FloorTexture);
+ if (ft != s.FloorTexture)
+ {
+ s.SetFloorTexture(ft);
+ changed = true;
+ }
+ }
+ if (s.CeilTexture != "-")
+ {
+ string ct = General.Map.Data.GetFullFlatName(s.CeilTexture);
+ if (ct != s.CeilTexture)
+ {
+ s.SetCeilTexture(ct);
+ changed = true;
+ }
+ }
+ }
+
+ foreach (Sidedef s in sidedefs)
+ {
+ if (s.HighTexture != "-")
+ {
+ string ht = General.Map.Data.GetFullTextureName(s.HighTexture);
+ if (ht != s.HighTexture)
+ {
+ s.SetTextureHigh(ht);
+ changed = true;
+ }
+ }
+ if (s.MiddleTexture != "-")
+ {
+ string mt = General.Map.Data.GetFullTextureName(s.MiddleTexture);
+ if (mt != s.MiddleTexture)
+ {
+ s.SetTextureMid(mt);
+ changed = true;
+ }
+ }
+ if (s.LowTexture != "-")
+ {
+ string lt = General.Map.Data.GetFullTextureName(s.LowTexture);
+ if (lt != s.LowTexture)
+ {
+ s.SetTextureLow(lt);
+ changed = true;
+ }
+ }
+ }
+
+ return changed;
+ }
+
+ private bool TranslateToShortTextureNames(IEnumerable sectors, IEnumerable sidedefs)
+ {
+ bool changed = false;
+
+ foreach(Sector s in sectors)
+ {
+ if(s.FloorTexture != "-")
+ {
+ string ft = GetShortTextureName(s.FloorTexture);
+ if (ft != s.FloorTexture)
+ {
+ s.SetFloorTexture(ft);
+ changed = true;
+ }
+ }
+ if(s.CeilTexture != "-")
+ {
+ string ct = GetShortTextureName(s.CeilTexture);
+ if (ct != s.CeilTexture)
+ {
+ s.SetCeilTexture(ct);
+ changed = true;
+ }
+ }
+ }
+
+ foreach(Sidedef s in sidedefs)
+ {
+ if(s.HighTexture != "-")
+ {
+ string ht = GetShortTextureName(s.HighTexture);
+ if (ht != s.HighTexture)
+ {
+ s.SetTextureHigh(ht);
+ changed = true;
+ }
+ }
+ if(s.MiddleTexture != "-")
+ {
+ string mt = GetShortTextureName(s.MiddleTexture);
+ if (mt != s.MiddleTexture)
+ {
+ s.SetTextureMid(mt);
+ changed = true;
+ }
+ }
+ if(s.LowTexture != "-")
+ {
+ string lt = GetShortTextureName(s.LowTexture);
+ if (lt != s.LowTexture)
+ {
+ s.SetTextureLow(lt);
+ changed = true;
+ }
+ }
+ }
+
+ return changed;
+ }
+
+ internal static string GetShortTextureName(string name)
+ {
+ string shortname = Path.GetFileNameWithoutExtension(name).ToUpperInvariant();
+ if (shortname.Length > DataManager.CLASIC_IMAGE_NAME_LENGTH) shortname = shortname.Substring(0, DataManager.CLASIC_IMAGE_NAME_LENGTH);
+ return shortname;
+ }
+
/// This removes unused vertices.
public void RemoveUnusedVertices()
{
diff --git a/Source/Core/Windows/ChangeMapForm.cs b/Source/Core/Windows/ChangeMapForm.cs
index d2620efb..37ecafab 100644
--- a/Source/Core/Windows/ChangeMapForm.cs
+++ b/Source/Core/Windows/ChangeMapForm.cs
@@ -11,7 +11,8 @@ namespace CodeImp.DoomBuilder.Windows
{
public partial class ChangeMapForm : DelayedForm
{
- private readonly MapOptions options;
+ private MapOptions options;
+ private Configuration mapsettings;
private readonly string filepathname;
public MapOptions Options { get { return options; } }
@@ -58,19 +59,36 @@ namespace CodeImp.DoomBuilder.Windows
// Make an array for the map names
List mapnames = new List();
+ // Open the Map Settings configuration
+ string dbsfile = filepathname.Substring(0, filepathname.Length - 4) + ".dbs";
+ if (File.Exists(dbsfile))
+ {
+ try
+ {
+ mapsettings = new Configuration(dbsfile, true);
+ }
+ catch (Exception)
+ {
+ mapsettings = new Configuration(true);
+ }
+ }
+ else
+ {
+ mapsettings = new Configuration(true);
+ }
+
//mxd. Get Proper configuration
ConfigurationInfo ci = General.GetConfigurationInfo(options.ConfigFile);
- Configuration cfg = ci.Configuration;
-
+
// Get the map lump names
- IDictionary maplumpnames = cfg.ReadSetting("maplumpnames", new Hashtable());
+ IDictionary maplumpnames = ci.Configuration.ReadSetting("maplumpnames", new Hashtable());
// Count how many required lumps we have to find
foreach(DictionaryEntry ml in maplumpnames) {
// Ignore the map header (it will not be found because the name is different)
if(ml.Key.ToString() != MapManager.CONFIG_MAP_HEADER) {
// Read lump setting and count it
- if(cfg.ReadSetting("maplumpnames." + ml.Key + ".required", false))
+ if(ci.Configuration.ReadSetting("maplumpnames." + ml.Key + ".required", false))
lumpsrequired++;
}
}
@@ -88,7 +106,7 @@ namespace CodeImp.DoomBuilder.Windows
maplumpnames.Contains(wadfile.Lumps[scanindex + checkoffset].Name)) {
// Count the lump when it is marked as required
lumpname = wadfile.Lumps[scanindex + checkoffset].Name;
- if(cfg.ReadSetting("maplumpnames." + lumpname + ".required", false))
+ if(ci.Configuration.ReadSetting("maplumpnames." + lumpname + ".required", false))
lumpsfound++;
// Check the next lump
@@ -147,9 +165,9 @@ namespace CodeImp.DoomBuilder.Windows
General.ShowWarningMessage("Map '" + options.LevelName + "' is already loaded!", MessageBoxButtons.OK);
return;
}
-
- options.CurrentName = mapslist.SelectedItems[0].Text;
- options.PreviousName = string.Empty;
+
+ // Create new map options
+ options = new MapOptions(mapsettings, mapslist.SelectedItems[0].Text);
// Hide window
this.DialogResult = DialogResult.OK;
diff --git a/Source/Core/Windows/GridSetupForm.cs b/Source/Core/Windows/GridSetupForm.cs
index a561fdc3..b1257d6c 100644
--- a/Source/Core/Windows/GridSetupForm.cs
+++ b/Source/Core/Windows/GridSetupForm.cs
@@ -18,6 +18,7 @@
using System;
using System.Drawing;
+using System.IO;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Data;
using CodeImp.DoomBuilder.Editing;
@@ -84,10 +85,8 @@ namespace CodeImp.DoomBuilder.Windows
// Browse texture
private void selecttexture_Click(object sender, EventArgs e)
{
- string result;
-
// Browse for texture
- result = TextureBrowserForm.Browse(this, backgroundname, false);
+ string result = TextureBrowserForm.Browse(this, backgroundname, false);
if(result != null)
{
// Set this texture as background
@@ -102,10 +101,8 @@ namespace CodeImp.DoomBuilder.Windows
// Browse flat
private void selectflat_Click(object sender, EventArgs e)
{
- string result;
-
// Browse for flat
- result = TextureBrowserForm.Browse(this, backgroundname, true); //mxd. was FlatBrowserForm
+ string result = TextureBrowserForm.Browse(this, backgroundname, true);
if(result != null)
{
// Set this flat as background
@@ -126,7 +123,7 @@ namespace CodeImp.DoomBuilder.Windows
// Set this file as background
backgroundname = browsefile.FileName;
backgroundsource = GridSetup.SOURCE_FILE;
- ImageData img = new FileImage(backgroundname, backgroundname, false, 1.0f, 1.0f);
+ ImageData img = new FileImage(Path.GetFileNameWithoutExtension(backgroundname), backgroundname, false, 1.0f, 1.0f);
img.LoadImage();
General.DisplayZoomedImage(backgroundimage, new Bitmap(img.GetBitmap()));
img.Dispose();
diff --git a/Source/Core/Windows/LinedefEditForm.Designer.cs b/Source/Core/Windows/LinedefEditForm.Designer.cs
index bf5849a8..be8971ba 100644
--- a/Source/Core/Windows/LinedefEditForm.Designer.cs
+++ b/Source/Core/Windows/LinedefEditForm.Designer.cs
@@ -451,12 +451,12 @@ namespace CodeImp.DoomBuilder.Windows
this.frontgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.frontgroup.Controls.Add(this.frontside);
- this.frontgroup.Controls.Add(this.frontTextureOffset);
this.frontgroup.Controls.Add(this.frontsector);
this.frontgroup.Controls.Add(label11);
this.frontgroup.Controls.Add(this.frontlow);
this.frontgroup.Controls.Add(this.frontmid);
this.frontgroup.Controls.Add(this.fronthigh);
+ this.frontgroup.Controls.Add(this.frontTextureOffset);
this.frontgroup.Controls.Add(label5);
this.frontgroup.Controls.Add(label4);
this.frontgroup.Controls.Add(label3);
@@ -475,7 +475,7 @@ namespace CodeImp.DoomBuilder.Windows
this.frontTextureOffset.Label = "Texture Offset:";
this.frontTextureOffset.Location = new System.Drawing.Point(3, 65);
this.frontTextureOffset.Name = "frontTextureOffset";
- this.frontTextureOffset.Size = new System.Drawing.Size(247, 26);
+ this.frontTextureOffset.Size = new System.Drawing.Size(268, 26);
this.frontTextureOffset.TabIndex = 41;
this.frontTextureOffset.OnValuesChanged += new System.EventHandler(this.frontTextureOffset_OnValuesChanged);
//
@@ -541,13 +541,13 @@ namespace CodeImp.DoomBuilder.Windows
//
this.backgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.backgroup.Controls.Add(this.backTextureOffset);
this.backgroup.Controls.Add(this.backside);
this.backgroup.Controls.Add(this.backsector);
this.backgroup.Controls.Add(label12);
this.backgroup.Controls.Add(this.backlow);
this.backgroup.Controls.Add(this.backmid);
this.backgroup.Controls.Add(this.backhigh);
+ this.backgroup.Controls.Add(this.backTextureOffset);
this.backgroup.Controls.Add(label8);
this.backgroup.Controls.Add(label9);
this.backgroup.Controls.Add(label10);
@@ -566,7 +566,7 @@ namespace CodeImp.DoomBuilder.Windows
this.backTextureOffset.Label = "Texture Offset:";
this.backTextureOffset.Location = new System.Drawing.Point(3, 65);
this.backTextureOffset.Name = "backTextureOffset";
- this.backTextureOffset.Size = new System.Drawing.Size(247, 28);
+ this.backTextureOffset.Size = new System.Drawing.Size(268, 28);
this.backTextureOffset.TabIndex = 42;
this.backTextureOffset.OnValuesChanged += new System.EventHandler(this.backTextureOffset_OnValuesChanged);
//
@@ -648,7 +648,6 @@ namespace CodeImp.DoomBuilder.Windows
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "LinedefEditForm";
- this.Opacity = 0;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
diff --git a/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs b/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs
index cc65ee4d..c904cdb8 100644
--- a/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs
+++ b/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs
@@ -30,17 +30,12 @@ namespace CodeImp.DoomBuilder.Windows
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.Label label2;
- System.Windows.Forms.Label label3;
- System.Windows.Forms.Label label4;
- System.Windows.Forms.Label label5;
- System.Windows.Forms.Label label8;
- System.Windows.Forms.Label label9;
- System.Windows.Forms.Label label10;
System.Windows.Forms.Label label11;
System.Windows.Forms.Label label12;
System.Windows.Forms.Label label7;
System.Windows.Forms.Label label14;
System.Windows.Forms.Label label6;
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LinedefEditFormUDMF));
this.labelLightFront = new System.Windows.Forms.Label();
this.cancel = new System.Windows.Forms.Button();
this.apply = new System.Windows.Forms.Button();
@@ -74,59 +69,56 @@ namespace CodeImp.DoomBuilder.Windows
this.missingactivation = new System.Windows.Forms.PictureBox();
this.idgroup = new System.Windows.Forms.GroupBox();
this.tagSelector = new CodeImp.DoomBuilder.GZBuilder.Controls.TagSelector();
- this.tabsidedefs = new System.Windows.Forms.TabPage();
- this.splitter = new System.Windows.Forms.SplitContainer();
+ this.tabfront = new System.Windows.Forms.TabPage();
this.frontside = new System.Windows.Forms.CheckBox();
this.frontgroup = new System.Windows.Forms.GroupBox();
+ this.frontflagsgroup = new System.Windows.Forms.GroupBox();
+ this.flagsFront = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl();
+ this.frontscalegroup = new System.Windows.Forms.GroupBox();
+ this.pfcFrontScaleTop = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
+ this.pfcFrontScaleBottom = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
+ this.pfcFrontScaleMid = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
+ this.groupBox6 = new System.Windows.Forms.GroupBox();
this.frontTextureOffset = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl();
- this.cbLightAbsoluteFront = new System.Windows.Forms.CheckBox();
- this.lightFront = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
+ this.pfcFrontOffsetTop = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
+ this.pfcFrontOffsetMid = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
+ this.pfcFrontOffsetBottom = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
+ this.groupBox5 = new System.Windows.Forms.GroupBox();
this.frontsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.customfrontbutton = new System.Windows.Forms.Button();
+ this.lightFront = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
+ this.cbLightAbsoluteFront = new System.Windows.Forms.CheckBox();
this.frontlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl();
this.frontmid = new CodeImp.DoomBuilder.Controls.TextureSelectorControl();
this.fronthigh = new CodeImp.DoomBuilder.Controls.TextureSelectorControl();
- this.udmfPropertiesFront = new System.Windows.Forms.TabControl();
- this.tabFrontOffsets = new System.Windows.Forms.TabPage();
- this.pfcFrontScaleBottom = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
- this.pfcFrontScaleMid = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
- this.pfcFrontScaleTop = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
- this.pfcFrontOffsetBottom = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
- this.pfcFrontOffsetMid = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
- this.pfcFrontOffsetTop = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
- this.tabFrontFlags = new System.Windows.Forms.TabPage();
- this.flagsFront = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl();
+ this.tabback = new System.Windows.Forms.TabPage();
this.backside = new System.Windows.Forms.CheckBox();
this.backgroup = new System.Windows.Forms.GroupBox();
- this.backTextureOffset = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl();
- this.cbLightAbsoluteBack = new System.Windows.Forms.CheckBox();
- this.labelLightBack = new System.Windows.Forms.Label();
- this.lightBack = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
+ this.groupBox4 = new System.Windows.Forms.GroupBox();
this.backsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.custombackbutton = new System.Windows.Forms.Button();
+ this.lightBack = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
+ this.labelLightBack = new System.Windows.Forms.Label();
+ this.cbLightAbsoluteBack = new System.Windows.Forms.CheckBox();
+ this.backflagsgroup = new System.Windows.Forms.GroupBox();
+ this.flagsBack = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl();
+ this.backscalegroup = new System.Windows.Forms.GroupBox();
+ this.pfcBackScaleTop = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
+ this.pfcBackScaleBottom = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
+ this.pfcBackScaleMid = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.pfcBackOffsetTop = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
+ this.pfcBackOffsetMid = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
+ this.pfcBackOffsetBottom = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
+ this.backTextureOffset = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl();
this.backlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl();
this.backmid = new CodeImp.DoomBuilder.Controls.TextureSelectorControl();
this.backhigh = new CodeImp.DoomBuilder.Controls.TextureSelectorControl();
- this.udmfPropertiesBack = new System.Windows.Forms.TabControl();
- this.tabBackOffsets = new System.Windows.Forms.TabPage();
- this.pfcBackScaleMid = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
- this.pfcBackScaleTop = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
- this.pfcBackScaleBottom = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
- this.pfcBackOffsetBottom = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
- this.pfcBackOffsetMid = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
- this.pfcBackOffsetTop = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl();
- this.tabBackFlags = new System.Windows.Forms.TabPage();
- this.flagsBack = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl();
this.tabcustom = new System.Windows.Forms.TabPage();
this.fieldslist = new CodeImp.DoomBuilder.Controls.FieldsEditorControl();
+ this.imagelist = new System.Windows.Forms.ImageList(this.components);
this.tooltip = new System.Windows.Forms.ToolTip(this.components);
label2 = new System.Windows.Forms.Label();
- label3 = new System.Windows.Forms.Label();
- label4 = new System.Windows.Forms.Label();
- label5 = new System.Windows.Forms.Label();
- label8 = new System.Windows.Forms.Label();
- label9 = new System.Windows.Forms.Label();
- label10 = new System.Windows.Forms.Label();
label11 = new System.Windows.Forms.Label();
label12 = new System.Windows.Forms.Label();
label7 = new System.Windows.Forms.Label();
@@ -141,18 +133,18 @@ namespace CodeImp.DoomBuilder.Windows
this.activationGroup.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.missingactivation)).BeginInit();
this.idgroup.SuspendLayout();
- this.tabsidedefs.SuspendLayout();
- this.splitter.Panel1.SuspendLayout();
- this.splitter.Panel2.SuspendLayout();
- this.splitter.SuspendLayout();
+ this.tabfront.SuspendLayout();
this.frontgroup.SuspendLayout();
- this.udmfPropertiesFront.SuspendLayout();
- this.tabFrontOffsets.SuspendLayout();
- this.tabFrontFlags.SuspendLayout();
+ this.frontflagsgroup.SuspendLayout();
+ this.frontscalegroup.SuspendLayout();
+ this.groupBox6.SuspendLayout();
+ this.groupBox5.SuspendLayout();
+ this.tabback.SuspendLayout();
this.backgroup.SuspendLayout();
- this.udmfPropertiesBack.SuspendLayout();
- this.tabBackOffsets.SuspendLayout();
- this.tabBackFlags.SuspendLayout();
+ this.groupBox4.SuspendLayout();
+ this.backflagsgroup.SuspendLayout();
+ this.backscalegroup.SuspendLayout();
+ this.groupBox1.SuspendLayout();
this.tabcustom.SuspendLayout();
this.SuspendLayout();
//
@@ -165,63 +157,9 @@ namespace CodeImp.DoomBuilder.Windows
label2.TabIndex = 9;
label2.Text = "Action:";
//
- // label3
- //
- label3.Location = new System.Drawing.Point(252, 18);
- label3.Name = "label3";
- label3.Size = new System.Drawing.Size(83, 16);
- label3.TabIndex = 3;
- label3.Text = "Upper";
- label3.TextAlign = System.Drawing.ContentAlignment.TopCenter;
- //
- // label4
- //
- label4.Location = new System.Drawing.Point(343, 18);
- label4.Name = "label4";
- label4.Size = new System.Drawing.Size(83, 16);
- label4.TabIndex = 4;
- label4.Text = "Middle";
- label4.TextAlign = System.Drawing.ContentAlignment.TopCenter;
- //
- // label5
- //
- label5.Location = new System.Drawing.Point(434, 18);
- label5.Name = "label5";
- label5.Size = new System.Drawing.Size(83, 16);
- label5.TabIndex = 5;
- label5.Text = "Lower";
- label5.TextAlign = System.Drawing.ContentAlignment.TopCenter;
- //
- // label8
- //
- label8.Location = new System.Drawing.Point(437, 18);
- label8.Name = "label8";
- label8.Size = new System.Drawing.Size(83, 16);
- label8.TabIndex = 5;
- label8.Text = "Lower";
- label8.TextAlign = System.Drawing.ContentAlignment.TopCenter;
- //
- // label9
- //
- label9.Location = new System.Drawing.Point(346, 18);
- label9.Name = "label9";
- label9.Size = new System.Drawing.Size(83, 16);
- label9.TabIndex = 4;
- label9.Text = "Middle";
- label9.TextAlign = System.Drawing.ContentAlignment.TopCenter;
- //
- // label10
- //
- label10.Location = new System.Drawing.Point(255, 18);
- label10.Name = "label10";
- label10.Size = new System.Drawing.Size(83, 16);
- label10.TabIndex = 3;
- label10.Text = "Upper";
- label10.TextAlign = System.Drawing.ContentAlignment.TopCenter;
- //
// label11
//
- label11.Location = new System.Drawing.Point(8, 42);
+ label11.Location = new System.Drawing.Point(14, 26);
label11.Name = "label11";
label11.Size = new System.Drawing.Size(80, 14);
label11.TabIndex = 13;
@@ -230,7 +168,7 @@ namespace CodeImp.DoomBuilder.Windows
//
// label12
//
- label12.Location = new System.Drawing.Point(8, 42);
+ label12.Location = new System.Drawing.Point(14, 26);
label12.Name = "label12";
label12.Size = new System.Drawing.Size(80, 14);
label12.TabIndex = 16;
@@ -266,7 +204,7 @@ namespace CodeImp.DoomBuilder.Windows
//
// labelLightFront
//
- this.labelLightFront.Location = new System.Drawing.Point(8, 101);
+ this.labelLightFront.Location = new System.Drawing.Point(14, 54);
this.labelLightFront.Name = "labelLightFront";
this.labelLightFront.Size = new System.Drawing.Size(80, 14);
this.labelLightFront.TabIndex = 25;
@@ -338,7 +276,7 @@ namespace CodeImp.DoomBuilder.Windows
this.scriptNumbers.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.scriptNumbers.BackColor = System.Drawing.Color.LemonChiffon;
this.scriptNumbers.FormattingEnabled = true;
- this.scriptNumbers.Location = new System.Drawing.Point(407, 55);
+ this.scriptNumbers.Location = new System.Drawing.Point(407, 57);
this.scriptNumbers.Name = "scriptNumbers";
this.scriptNumbers.Size = new System.Drawing.Size(120, 22);
this.scriptNumbers.TabIndex = 39;
@@ -349,7 +287,7 @@ namespace CodeImp.DoomBuilder.Windows
this.scriptNames.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.scriptNames.BackColor = System.Drawing.Color.Honeydew;
this.scriptNames.FormattingEnabled = true;
- this.scriptNames.Location = new System.Drawing.Point(283, 55);
+ this.scriptNames.Location = new System.Drawing.Point(283, 57);
this.scriptNames.Name = "scriptNames";
this.scriptNames.Size = new System.Drawing.Size(120, 22);
this.scriptNames.TabIndex = 38;
@@ -357,7 +295,7 @@ namespace CodeImp.DoomBuilder.Windows
// arg2
//
this.arg2.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.arg2.Location = new System.Drawing.Point(153, 55);
+ this.arg2.Location = new System.Drawing.Point(153, 57);
this.arg2.Name = "arg2";
this.arg2.Size = new System.Drawing.Size(120, 24);
this.arg2.TabIndex = 2;
@@ -365,7 +303,7 @@ namespace CodeImp.DoomBuilder.Windows
// arg1
//
this.arg1.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.arg1.Location = new System.Drawing.Point(153, 29);
+ this.arg1.Location = new System.Drawing.Point(153, 30);
this.arg1.Name = "arg1";
this.arg1.Size = new System.Drawing.Size(120, 24);
this.arg1.TabIndex = 1;
@@ -389,14 +327,14 @@ namespace CodeImp.DoomBuilder.Windows
// arg4
//
this.arg4.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.arg4.Location = new System.Drawing.Point(398, 29);
+ this.arg4.Location = new System.Drawing.Point(398, 30);
this.arg4.Name = "arg4";
this.arg4.Size = new System.Drawing.Size(120, 24);
this.arg4.TabIndex = 4;
//
// arg1label
//
- this.arg1label.Location = new System.Drawing.Point(-32, 34);
+ this.arg1label.Location = new System.Drawing.Point(-32, 35);
this.arg1label.Name = "arg1label";
this.arg1label.Size = new System.Drawing.Size(179, 14);
this.arg1label.TabIndex = 33;
@@ -416,7 +354,7 @@ namespace CodeImp.DoomBuilder.Windows
//
// arg2label
//
- this.arg2label.Location = new System.Drawing.Point(-32, 60);
+ this.arg2label.Location = new System.Drawing.Point(-32, 62);
this.arg2label.Name = "arg2label";
this.arg2label.Size = new System.Drawing.Size(179, 14);
this.arg2label.TabIndex = 35;
@@ -426,7 +364,7 @@ namespace CodeImp.DoomBuilder.Windows
//
// arg4label
//
- this.arg4label.Location = new System.Drawing.Point(213, 34);
+ this.arg4label.Location = new System.Drawing.Point(213, 35);
this.arg4label.Name = "arg4label";
this.arg4label.Size = new System.Drawing.Size(179, 14);
this.arg4label.TabIndex = 34;
@@ -525,9 +463,11 @@ namespace CodeImp.DoomBuilder.Windows
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tabs.Controls.Add(this.tabproperties);
- this.tabs.Controls.Add(this.tabsidedefs);
+ this.tabs.Controls.Add(this.tabfront);
+ this.tabs.Controls.Add(this.tabback);
this.tabs.Controls.Add(this.tabcustom);
this.tabs.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.tabs.ImageList = this.imagelist;
this.tabs.Location = new System.Drawing.Point(10, 10);
this.tabs.Margin = new System.Windows.Forms.Padding(1);
this.tabs.Name = "tabs";
@@ -644,43 +584,25 @@ namespace CodeImp.DoomBuilder.Windows
this.tagSelector.Size = new System.Drawing.Size(444, 35);
this.tagSelector.TabIndex = 0;
//
- // tabsidedefs
+ // tabfront
//
- this.tabsidedefs.Controls.Add(this.splitter);
- this.tabsidedefs.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.tabsidedefs.Location = new System.Drawing.Point(4, 23);
- this.tabsidedefs.Name = "tabsidedefs";
- this.tabsidedefs.Padding = new System.Windows.Forms.Padding(5);
- this.tabsidedefs.Size = new System.Drawing.Size(549, 621);
- this.tabsidedefs.TabIndex = 1;
- this.tabsidedefs.Text = " Sidedefs ";
- this.tabsidedefs.UseVisualStyleBackColor = true;
- //
- // splitter
- //
- this.splitter.Dock = System.Windows.Forms.DockStyle.Fill;
- this.splitter.IsSplitterFixed = true;
- this.splitter.Location = new System.Drawing.Point(5, 5);
- this.splitter.Name = "splitter";
- this.splitter.Orientation = System.Windows.Forms.Orientation.Horizontal;
- //
- // splitter.Panel1
- //
- this.splitter.Panel1.Controls.Add(this.frontside);
- this.splitter.Panel1.Controls.Add(this.frontgroup);
- //
- // splitter.Panel2
- //
- this.splitter.Panel2.Controls.Add(this.backside);
- this.splitter.Panel2.Controls.Add(this.backgroup);
- this.splitter.Size = new System.Drawing.Size(539, 611);
- this.splitter.SplitterDistance = 302;
- this.splitter.TabIndex = 3;
+ this.tabfront.Controls.Add(this.frontside);
+ this.tabfront.Controls.Add(this.frontgroup);
+ this.tabfront.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.tabfront.ForeColor = System.Drawing.SystemColors.ControlText;
+ this.tabfront.ImageIndex = 0;
+ this.tabfront.Location = new System.Drawing.Point(4, 23);
+ this.tabfront.Name = "tabfront";
+ this.tabfront.Padding = new System.Windows.Forms.Padding(5);
+ this.tabfront.Size = new System.Drawing.Size(549, 621);
+ this.tabfront.TabIndex = 1;
+ this.tabfront.Text = " Front ";
+ this.tabfront.UseVisualStyleBackColor = true;
//
// frontside
//
this.frontside.AutoSize = true;
- this.frontside.Location = new System.Drawing.Point(15, 1);
+ this.frontside.Location = new System.Drawing.Point(20, 6);
this.frontside.Name = "frontside";
this.frontside.Size = new System.Drawing.Size(75, 18);
this.frontside.TabIndex = 0;
@@ -693,151 +615,74 @@ namespace CodeImp.DoomBuilder.Windows
this.frontgroup.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.frontgroup.Controls.Add(this.frontTextureOffset);
- this.frontgroup.Controls.Add(this.cbLightAbsoluteFront);
- this.frontgroup.Controls.Add(this.labelLightFront);
- this.frontgroup.Controls.Add(this.lightFront);
- this.frontgroup.Controls.Add(this.frontsector);
- this.frontgroup.Controls.Add(this.customfrontbutton);
- this.frontgroup.Controls.Add(label11);
+ this.frontgroup.Controls.Add(this.frontflagsgroup);
+ this.frontgroup.Controls.Add(this.frontscalegroup);
+ this.frontgroup.Controls.Add(this.groupBox6);
+ this.frontgroup.Controls.Add(this.groupBox5);
this.frontgroup.Controls.Add(this.frontlow);
this.frontgroup.Controls.Add(this.frontmid);
this.frontgroup.Controls.Add(this.fronthigh);
- this.frontgroup.Controls.Add(this.udmfPropertiesFront);
- this.frontgroup.Controls.Add(label5);
- this.frontgroup.Controls.Add(label4);
- this.frontgroup.Controls.Add(label3);
this.frontgroup.Enabled = false;
- this.frontgroup.Location = new System.Drawing.Point(3, 3);
+ this.frontgroup.Location = new System.Drawing.Point(8, 8);
this.frontgroup.Name = "frontgroup";
- this.frontgroup.Size = new System.Drawing.Size(535, 296);
+ this.frontgroup.Size = new System.Drawing.Size(535, 605);
this.frontgroup.TabIndex = 1;
this.frontgroup.TabStop = false;
this.frontgroup.Text = " ";
//
- // frontTextureOffset
+ // frontflagsgroup
//
- this.frontTextureOffset.ButtonStep = 16;
- this.frontTextureOffset.DefaultValue = 0;
- this.frontTextureOffset.Label = "Texture Offset:";
- this.frontTextureOffset.Location = new System.Drawing.Point(3, 65);
- this.frontTextureOffset.Name = "frontTextureOffset";
- this.frontTextureOffset.Size = new System.Drawing.Size(247, 26);
- this.frontTextureOffset.TabIndex = 41;
- this.frontTextureOffset.OnValuesChanged += new System.EventHandler(this.frontTextureOffset_OnValuesChanged);
+ this.frontflagsgroup.Controls.Add(this.flagsFront);
+ this.frontflagsgroup.Location = new System.Drawing.Point(12, 409);
+ this.frontflagsgroup.Name = "frontflagsgroup";
+ this.frontflagsgroup.Size = new System.Drawing.Size(290, 190);
+ this.frontflagsgroup.TabIndex = 45;
+ this.frontflagsgroup.TabStop = false;
+ this.frontflagsgroup.Text = " Flags: ";
//
- // cbLightAbsoluteFront
+ // flagsFront
//
- this.cbLightAbsoluteFront.AutoSize = true;
- this.cbLightAbsoluteFront.Location = new System.Drawing.Point(158, 100);
- this.cbLightAbsoluteFront.Name = "cbLightAbsoluteFront";
- this.cbLightAbsoluteFront.Size = new System.Drawing.Size(69, 18);
- this.cbLightAbsoluteFront.TabIndex = 27;
- this.cbLightAbsoluteFront.Tag = "lightabsolute";
- this.cbLightAbsoluteFront.Text = "Absolute";
- this.cbLightAbsoluteFront.UseVisualStyleBackColor = true;
- this.cbLightAbsoluteFront.CheckedChanged += new System.EventHandler(this.cbLightAbsoluteFront_CheckedChanged);
+ this.flagsFront.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.flagsFront.AutoScroll = true;
+ this.flagsFront.Columns = 2;
+ this.flagsFront.Location = new System.Drawing.Point(16, 16);
+ this.flagsFront.Name = "flagsFront";
+ this.flagsFront.Size = new System.Drawing.Size(269, 168);
+ this.flagsFront.TabIndex = 0;
+ this.flagsFront.VerticalSpacing = 3;
+ this.flagsFront.OnValueChanged += new System.EventHandler(this.flagsFront_OnValueChanged);
//
- // lightFront
+ // frontscalegroup
//
- this.lightFront.AllowDecimal = false;
- this.lightFront.AllowNegative = true;
- this.lightFront.AllowRelative = true;
- this.lightFront.ButtonStep = 16;
- this.lightFront.ButtonStepFloat = 1F;
- this.lightFront.ButtonStepsWrapAround = false;
- this.lightFront.Location = new System.Drawing.Point(90, 96);
- this.lightFront.Name = "lightFront";
- this.lightFront.Size = new System.Drawing.Size(62, 24);
- this.lightFront.StepValues = null;
- this.lightFront.TabIndex = 26;
- this.lightFront.Tag = "";
- this.lightFront.WhenTextChanged += new System.EventHandler(this.lightFront_WhenTextChanged);
+ this.frontscalegroup.Controls.Add(this.pfcFrontScaleTop);
+ this.frontscalegroup.Controls.Add(this.pfcFrontScaleBottom);
+ this.frontscalegroup.Controls.Add(this.pfcFrontScaleMid);
+ this.frontscalegroup.Location = new System.Drawing.Point(12, 291);
+ this.frontscalegroup.Name = "frontscalegroup";
+ this.frontscalegroup.Size = new System.Drawing.Size(290, 112);
+ this.frontscalegroup.TabIndex = 44;
+ this.frontscalegroup.TabStop = false;
+ this.frontscalegroup.Text = " Texture Scale: ";
//
- // frontsector
+ // pfcFrontScaleTop
//
- this.frontsector.AllowDecimal = false;
- this.frontsector.AllowNegative = false;
- this.frontsector.AllowRelative = false;
- this.frontsector.ButtonStep = 1;
- this.frontsector.ButtonStepFloat = 1F;
- this.frontsector.ButtonStepsWrapAround = false;
- this.frontsector.Location = new System.Drawing.Point(90, 35);
- this.frontsector.Name = "frontsector";
- this.frontsector.Size = new System.Drawing.Size(130, 24);
- this.frontsector.StepValues = null;
- this.frontsector.TabIndex = 14;
- //
- // customfrontbutton
- //
- this.customfrontbutton.Location = new System.Drawing.Point(90, 126);
- this.customfrontbutton.Name = "customfrontbutton";
- this.customfrontbutton.Size = new System.Drawing.Size(130, 25);
- this.customfrontbutton.TabIndex = 3;
- this.customfrontbutton.Text = "Custom fields...";
- this.customfrontbutton.UseVisualStyleBackColor = true;
- this.customfrontbutton.Click += new System.EventHandler(this.customfrontbutton_Click);
- //
- // frontlow
- //
- this.frontlow.Location = new System.Drawing.Point(434, 37);
- this.frontlow.MultipleTextures = false;
- this.frontlow.Name = "frontlow";
- this.frontlow.Required = false;
- this.frontlow.Size = new System.Drawing.Size(83, 112);
- this.frontlow.TabIndex = 6;
- this.frontlow.TextureName = "";
- this.frontlow.OnValueChanged += new System.EventHandler(this.frontlow_OnValueChanged);
- //
- // frontmid
- //
- this.frontmid.Location = new System.Drawing.Point(343, 37);
- this.frontmid.MultipleTextures = false;
- this.frontmid.Name = "frontmid";
- this.frontmid.Required = false;
- this.frontmid.Size = new System.Drawing.Size(83, 112);
- this.frontmid.TabIndex = 5;
- this.frontmid.TextureName = "";
- this.frontmid.OnValueChanged += new System.EventHandler(this.frontmid_OnValueChanged);
- //
- // fronthigh
- //
- this.fronthigh.Location = new System.Drawing.Point(252, 37);
- this.fronthigh.MultipleTextures = false;
- this.fronthigh.Name = "fronthigh";
- this.fronthigh.Required = false;
- this.fronthigh.Size = new System.Drawing.Size(83, 112);
- this.fronthigh.TabIndex = 4;
- this.fronthigh.TextureName = "";
- this.fronthigh.OnValueChanged += new System.EventHandler(this.fronthigh_OnValueChanged);
- //
- // udmfPropertiesFront
- //
- this.udmfPropertiesFront.Controls.Add(this.tabFrontOffsets);
- this.udmfPropertiesFront.Controls.Add(this.tabFrontFlags);
- this.udmfPropertiesFront.ItemSize = new System.Drawing.Size(100, 19);
- this.udmfPropertiesFront.Location = new System.Drawing.Point(6, 169);
- this.udmfPropertiesFront.Margin = new System.Windows.Forms.Padding(1);
- this.udmfPropertiesFront.Name = "udmfPropertiesFront";
- this.udmfPropertiesFront.SelectedIndex = 0;
- this.udmfPropertiesFront.Size = new System.Drawing.Size(525, 123);
- this.udmfPropertiesFront.TabIndex = 24;
- //
- // tabFrontOffsets
- //
- this.tabFrontOffsets.Controls.Add(this.pfcFrontScaleBottom);
- this.tabFrontOffsets.Controls.Add(this.pfcFrontScaleMid);
- this.tabFrontOffsets.Controls.Add(this.pfcFrontScaleTop);
- this.tabFrontOffsets.Controls.Add(this.pfcFrontOffsetBottom);
- this.tabFrontOffsets.Controls.Add(this.pfcFrontOffsetMid);
- this.tabFrontOffsets.Controls.Add(this.pfcFrontOffsetTop);
- this.tabFrontOffsets.Location = new System.Drawing.Point(4, 23);
- this.tabFrontOffsets.Name = "tabFrontOffsets";
- this.tabFrontOffsets.Padding = new System.Windows.Forms.Padding(3);
- this.tabFrontOffsets.Size = new System.Drawing.Size(517, 96);
- this.tabFrontOffsets.TabIndex = 0;
- this.tabFrontOffsets.Text = " Offsets & Scale ";
- this.tabFrontOffsets.UseVisualStyleBackColor = true;
+ this.pfcFrontScaleTop.AllowDecimal = true;
+ this.pfcFrontScaleTop.AllowValueLinking = true;
+ this.pfcFrontScaleTop.ButtonStep = 1;
+ this.pfcFrontScaleTop.ButtonStepFloat = 0.1F;
+ this.pfcFrontScaleTop.DefaultValue = 1F;
+ this.pfcFrontScaleTop.Field1 = "scalex_top";
+ this.pfcFrontScaleTop.Field2 = "scaley_top";
+ this.pfcFrontScaleTop.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+ this.pfcFrontScaleTop.Label = "Upper Scale:";
+ this.pfcFrontScaleTop.LinkValues = false;
+ this.pfcFrontScaleTop.Location = new System.Drawing.Point(6, 19);
+ this.pfcFrontScaleTop.Name = "pfcFrontScaleTop";
+ this.pfcFrontScaleTop.Size = new System.Drawing.Size(270, 30);
+ this.pfcFrontScaleTop.TabIndex = 38;
+ this.pfcFrontScaleTop.OnValuesChanged += new System.EventHandler(this.pfcFrontScaleTop_OnValuesChanged);
//
// pfcFrontScaleBottom
//
@@ -851,7 +696,7 @@ namespace CodeImp.DoomBuilder.Windows
this.pfcFrontScaleBottom.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.pfcFrontScaleBottom.Label = "Lower Scale:";
this.pfcFrontScaleBottom.LinkValues = false;
- this.pfcFrontScaleBottom.Location = new System.Drawing.Point(245, 65);
+ this.pfcFrontScaleBottom.Location = new System.Drawing.Point(6, 78);
this.pfcFrontScaleBottom.Name = "pfcFrontScaleBottom";
this.pfcFrontScaleBottom.Size = new System.Drawing.Size(270, 32);
this.pfcFrontScaleBottom.TabIndex = 40;
@@ -869,65 +714,35 @@ namespace CodeImp.DoomBuilder.Windows
this.pfcFrontScaleMid.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.pfcFrontScaleMid.Label = "Middle Scale:";
this.pfcFrontScaleMid.LinkValues = false;
- this.pfcFrontScaleMid.Location = new System.Drawing.Point(245, 36);
+ this.pfcFrontScaleMid.Location = new System.Drawing.Point(6, 49);
this.pfcFrontScaleMid.Name = "pfcFrontScaleMid";
this.pfcFrontScaleMid.Size = new System.Drawing.Size(270, 32);
this.pfcFrontScaleMid.TabIndex = 39;
this.pfcFrontScaleMid.OnValuesChanged += new System.EventHandler(this.pfcFrontScaleMid_OnValuesChanged);
//
- // pfcFrontScaleTop
+ // groupBox6
//
- this.pfcFrontScaleTop.AllowDecimal = true;
- this.pfcFrontScaleTop.AllowValueLinking = true;
- this.pfcFrontScaleTop.ButtonStep = 1;
- this.pfcFrontScaleTop.ButtonStepFloat = 0.1F;
- this.pfcFrontScaleTop.DefaultValue = 1F;
- this.pfcFrontScaleTop.Field1 = "scalex_top";
- this.pfcFrontScaleTop.Field2 = "scaley_top";
- this.pfcFrontScaleTop.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
- this.pfcFrontScaleTop.Label = "Upper Scale:";
- this.pfcFrontScaleTop.LinkValues = false;
- this.pfcFrontScaleTop.Location = new System.Drawing.Point(245, 6);
- this.pfcFrontScaleTop.Name = "pfcFrontScaleTop";
- this.pfcFrontScaleTop.Size = new System.Drawing.Size(270, 30);
- this.pfcFrontScaleTop.TabIndex = 38;
- this.pfcFrontScaleTop.OnValuesChanged += new System.EventHandler(this.pfcFrontScaleTop_OnValuesChanged);
+ this.groupBox6.Controls.Add(this.frontTextureOffset);
+ this.groupBox6.Controls.Add(this.pfcFrontOffsetTop);
+ this.groupBox6.Controls.Add(this.pfcFrontOffsetMid);
+ this.groupBox6.Controls.Add(this.pfcFrontOffsetBottom);
+ this.groupBox6.Location = new System.Drawing.Point(12, 142);
+ this.groupBox6.Name = "groupBox6";
+ this.groupBox6.Size = new System.Drawing.Size(290, 143);
+ this.groupBox6.TabIndex = 43;
+ this.groupBox6.TabStop = false;
+ this.groupBox6.Text = " Texture Offsets: ";
//
- // pfcFrontOffsetBottom
+ // frontTextureOffset
//
- this.pfcFrontOffsetBottom.AllowDecimal = true;
- this.pfcFrontOffsetBottom.AllowValueLinking = false;
- this.pfcFrontOffsetBottom.ButtonStep = 1;
- this.pfcFrontOffsetBottom.ButtonStepFloat = 16F;
- this.pfcFrontOffsetBottom.DefaultValue = 0F;
- this.pfcFrontOffsetBottom.Field1 = "offsetx_bottom";
- this.pfcFrontOffsetBottom.Field2 = "offsety_bottom";
- this.pfcFrontOffsetBottom.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
- this.pfcFrontOffsetBottom.Label = "Lower Offset:";
- this.pfcFrontOffsetBottom.LinkValues = false;
- this.pfcFrontOffsetBottom.Location = new System.Drawing.Point(-5, 65);
- this.pfcFrontOffsetBottom.Name = "pfcFrontOffsetBottom";
- this.pfcFrontOffsetBottom.Size = new System.Drawing.Size(270, 30);
- this.pfcFrontOffsetBottom.TabIndex = 37;
- this.pfcFrontOffsetBottom.OnValuesChanged += new System.EventHandler(this.pfcFrontOffsetBottom_OnValuesChanged);
- //
- // pfcFrontOffsetMid
- //
- this.pfcFrontOffsetMid.AllowDecimal = true;
- this.pfcFrontOffsetMid.AllowValueLinking = false;
- this.pfcFrontOffsetMid.ButtonStep = 1;
- this.pfcFrontOffsetMid.ButtonStepFloat = 16F;
- this.pfcFrontOffsetMid.DefaultValue = 0F;
- this.pfcFrontOffsetMid.Field1 = "offsetx_mid";
- this.pfcFrontOffsetMid.Field2 = "offsety_mid";
- this.pfcFrontOffsetMid.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
- this.pfcFrontOffsetMid.Label = "Middle Offset:";
- this.pfcFrontOffsetMid.LinkValues = false;
- this.pfcFrontOffsetMid.Location = new System.Drawing.Point(-5, 36);
- this.pfcFrontOffsetMid.Name = "pfcFrontOffsetMid";
- this.pfcFrontOffsetMid.Size = new System.Drawing.Size(270, 30);
- this.pfcFrontOffsetMid.TabIndex = 36;
- this.pfcFrontOffsetMid.OnValuesChanged += new System.EventHandler(this.pfcFrontOffsetMid_OnValuesChanged);
+ this.frontTextureOffset.ButtonStep = 16;
+ this.frontTextureOffset.DefaultValue = 0;
+ this.frontTextureOffset.Label = "Sidedef Offset:";
+ this.frontTextureOffset.Location = new System.Drawing.Point(6, 19);
+ this.frontTextureOffset.Name = "frontTextureOffset";
+ this.frontTextureOffset.Size = new System.Drawing.Size(270, 26);
+ this.frontTextureOffset.TabIndex = 41;
+ this.frontTextureOffset.OnValuesChanged += new System.EventHandler(this.frontTextureOffset_OnValuesChanged);
//
// pfcFrontOffsetTop
//
@@ -941,38 +756,168 @@ namespace CodeImp.DoomBuilder.Windows
this.pfcFrontOffsetTop.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.pfcFrontOffsetTop.Label = "Upper Offset:";
this.pfcFrontOffsetTop.LinkValues = false;
- this.pfcFrontOffsetTop.Location = new System.Drawing.Point(-5, 6);
+ this.pfcFrontOffsetTop.Location = new System.Drawing.Point(6, 48);
this.pfcFrontOffsetTop.Name = "pfcFrontOffsetTop";
this.pfcFrontOffsetTop.Size = new System.Drawing.Size(270, 28);
this.pfcFrontOffsetTop.TabIndex = 35;
this.pfcFrontOffsetTop.OnValuesChanged += new System.EventHandler(this.pfcFrontOffsetTop_OnValuesChanged);
//
- // tabFrontFlags
+ // pfcFrontOffsetMid
//
- this.tabFrontFlags.Controls.Add(this.flagsFront);
- this.tabFrontFlags.Location = new System.Drawing.Point(4, 23);
- this.tabFrontFlags.Name = "tabFrontFlags";
- this.tabFrontFlags.Padding = new System.Windows.Forms.Padding(3);
- this.tabFrontFlags.Size = new System.Drawing.Size(517, 96);
- this.tabFrontFlags.TabIndex = 1;
- this.tabFrontFlags.Text = " Flags ";
- this.tabFrontFlags.UseVisualStyleBackColor = true;
+ this.pfcFrontOffsetMid.AllowDecimal = true;
+ this.pfcFrontOffsetMid.AllowValueLinking = false;
+ this.pfcFrontOffsetMid.ButtonStep = 1;
+ this.pfcFrontOffsetMid.ButtonStepFloat = 16F;
+ this.pfcFrontOffsetMid.DefaultValue = 0F;
+ this.pfcFrontOffsetMid.Field1 = "offsetx_mid";
+ this.pfcFrontOffsetMid.Field2 = "offsety_mid";
+ this.pfcFrontOffsetMid.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+ this.pfcFrontOffsetMid.Label = "Middle Offset:";
+ this.pfcFrontOffsetMid.LinkValues = false;
+ this.pfcFrontOffsetMid.Location = new System.Drawing.Point(6, 77);
+ this.pfcFrontOffsetMid.Name = "pfcFrontOffsetMid";
+ this.pfcFrontOffsetMid.Size = new System.Drawing.Size(270, 30);
+ this.pfcFrontOffsetMid.TabIndex = 36;
+ this.pfcFrontOffsetMid.OnValuesChanged += new System.EventHandler(this.pfcFrontOffsetMid_OnValuesChanged);
//
- // flagsFront
+ // pfcFrontOffsetBottom
//
- this.flagsFront.AutoScroll = true;
- this.flagsFront.Columns = 2;
- this.flagsFront.Location = new System.Drawing.Point(15, 6);
- this.flagsFront.Name = "flagsFront";
- this.flagsFront.Size = new System.Drawing.Size(496, 84);
- this.flagsFront.TabIndex = 0;
- this.flagsFront.VerticalSpacing = 3;
- this.flagsFront.OnValueChanged += new System.EventHandler(this.flagsFront_OnValueChanged);
+ this.pfcFrontOffsetBottom.AllowDecimal = true;
+ this.pfcFrontOffsetBottom.AllowValueLinking = false;
+ this.pfcFrontOffsetBottom.ButtonStep = 1;
+ this.pfcFrontOffsetBottom.ButtonStepFloat = 16F;
+ this.pfcFrontOffsetBottom.DefaultValue = 0F;
+ this.pfcFrontOffsetBottom.Field1 = "offsetx_bottom";
+ this.pfcFrontOffsetBottom.Field2 = "offsety_bottom";
+ this.pfcFrontOffsetBottom.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+ this.pfcFrontOffsetBottom.Label = "Lower Offset:";
+ this.pfcFrontOffsetBottom.LinkValues = false;
+ this.pfcFrontOffsetBottom.Location = new System.Drawing.Point(6, 107);
+ this.pfcFrontOffsetBottom.Name = "pfcFrontOffsetBottom";
+ this.pfcFrontOffsetBottom.Size = new System.Drawing.Size(270, 30);
+ this.pfcFrontOffsetBottom.TabIndex = 37;
+ this.pfcFrontOffsetBottom.OnValuesChanged += new System.EventHandler(this.pfcFrontOffsetBottom_OnValuesChanged);
+ //
+ // groupBox5
+ //
+ this.groupBox5.Controls.Add(this.frontsector);
+ this.groupBox5.Controls.Add(label11);
+ this.groupBox5.Controls.Add(this.customfrontbutton);
+ this.groupBox5.Controls.Add(this.lightFront);
+ this.groupBox5.Controls.Add(this.labelLightFront);
+ this.groupBox5.Controls.Add(this.cbLightAbsoluteFront);
+ this.groupBox5.Location = new System.Drawing.Point(12, 19);
+ this.groupBox5.Name = "groupBox5";
+ this.groupBox5.Size = new System.Drawing.Size(290, 117);
+ this.groupBox5.TabIndex = 42;
+ this.groupBox5.TabStop = false;
+ //
+ // frontsector
+ //
+ this.frontsector.AllowDecimal = false;
+ this.frontsector.AllowNegative = false;
+ this.frontsector.AllowRelative = false;
+ this.frontsector.ButtonStep = 1;
+ this.frontsector.ButtonStepFloat = 1F;
+ this.frontsector.ButtonStepsWrapAround = false;
+ this.frontsector.Location = new System.Drawing.Point(96, 19);
+ this.frontsector.Name = "frontsector";
+ this.frontsector.Size = new System.Drawing.Size(130, 24);
+ this.frontsector.StepValues = null;
+ this.frontsector.TabIndex = 14;
+ //
+ // customfrontbutton
+ //
+ this.customfrontbutton.Location = new System.Drawing.Point(96, 79);
+ this.customfrontbutton.Name = "customfrontbutton";
+ this.customfrontbutton.Size = new System.Drawing.Size(130, 25);
+ this.customfrontbutton.TabIndex = 3;
+ this.customfrontbutton.Text = "Custom fields...";
+ this.customfrontbutton.UseVisualStyleBackColor = true;
+ this.customfrontbutton.Click += new System.EventHandler(this.customfrontbutton_Click);
+ //
+ // lightFront
+ //
+ this.lightFront.AllowDecimal = false;
+ this.lightFront.AllowNegative = true;
+ this.lightFront.AllowRelative = true;
+ this.lightFront.ButtonStep = 16;
+ this.lightFront.ButtonStepFloat = 1F;
+ this.lightFront.ButtonStepsWrapAround = false;
+ this.lightFront.Location = new System.Drawing.Point(96, 49);
+ this.lightFront.Name = "lightFront";
+ this.lightFront.Size = new System.Drawing.Size(62, 24);
+ this.lightFront.StepValues = null;
+ this.lightFront.TabIndex = 26;
+ this.lightFront.Tag = "";
+ this.lightFront.WhenTextChanged += new System.EventHandler(this.lightFront_WhenTextChanged);
+ //
+ // cbLightAbsoluteFront
+ //
+ this.cbLightAbsoluteFront.AutoSize = true;
+ this.cbLightAbsoluteFront.Location = new System.Drawing.Point(164, 53);
+ this.cbLightAbsoluteFront.Name = "cbLightAbsoluteFront";
+ this.cbLightAbsoluteFront.Size = new System.Drawing.Size(69, 18);
+ this.cbLightAbsoluteFront.TabIndex = 27;
+ this.cbLightAbsoluteFront.Tag = "lightabsolute";
+ this.cbLightAbsoluteFront.Text = "Absolute";
+ this.cbLightAbsoluteFront.UseVisualStyleBackColor = true;
+ this.cbLightAbsoluteFront.CheckedChanged += new System.EventHandler(this.cbLightAbsoluteFront_CheckedChanged);
+ //
+ // frontlow
+ //
+ this.frontlow.Location = new System.Drawing.Point(309, 415);
+ this.frontlow.MultipleTextures = false;
+ this.frontlow.Name = "frontlow";
+ this.frontlow.Required = false;
+ this.frontlow.Size = new System.Drawing.Size(220, 184);
+ this.frontlow.TabIndex = 6;
+ this.frontlow.TextureName = "";
+ this.frontlow.UsePreviews = false;
+ this.frontlow.OnValueChanged += new System.EventHandler(this.frontlow_OnValueChanged);
+ //
+ // frontmid
+ //
+ this.frontmid.Location = new System.Drawing.Point(309, 217);
+ this.frontmid.MultipleTextures = false;
+ this.frontmid.Name = "frontmid";
+ this.frontmid.Required = false;
+ this.frontmid.Size = new System.Drawing.Size(220, 184);
+ this.frontmid.TabIndex = 5;
+ this.frontmid.TextureName = "";
+ this.frontmid.UsePreviews = false;
+ this.frontmid.OnValueChanged += new System.EventHandler(this.frontmid_OnValueChanged);
+ //
+ // fronthigh
+ //
+ this.fronthigh.Location = new System.Drawing.Point(309, 19);
+ this.fronthigh.MultipleTextures = false;
+ this.fronthigh.Name = "fronthigh";
+ this.fronthigh.Required = false;
+ this.fronthigh.Size = new System.Drawing.Size(220, 184);
+ this.fronthigh.TabIndex = 4;
+ this.fronthigh.TextureName = "";
+ this.fronthigh.UsePreviews = false;
+ this.fronthigh.OnValueChanged += new System.EventHandler(this.fronthigh_OnValueChanged);
+ //
+ // tabback
+ //
+ this.tabback.Controls.Add(this.backside);
+ this.tabback.Controls.Add(this.backgroup);
+ this.tabback.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.tabback.ImageIndex = 1;
+ this.tabback.Location = new System.Drawing.Point(4, 23);
+ this.tabback.Name = "tabback";
+ this.tabback.Padding = new System.Windows.Forms.Padding(5);
+ this.tabback.Size = new System.Drawing.Size(549, 621);
+ this.tabback.TabIndex = 3;
+ this.tabback.Text = " Back ";
+ this.tabback.UseVisualStyleBackColor = true;
//
// backside
//
this.backside.AutoSize = true;
- this.backside.Location = new System.Drawing.Point(15, 1);
+ this.backside.Location = new System.Drawing.Point(20, 6);
this.backside.Name = "backside";
this.backside.Size = new System.Drawing.Size(74, 18);
this.backside.TabIndex = 0;
@@ -985,76 +930,34 @@ namespace CodeImp.DoomBuilder.Windows
this.backgroup.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.backgroup.Controls.Add(this.backTextureOffset);
- this.backgroup.Controls.Add(this.cbLightAbsoluteBack);
- this.backgroup.Controls.Add(this.labelLightBack);
- this.backgroup.Controls.Add(this.lightBack);
- this.backgroup.Controls.Add(this.backsector);
- this.backgroup.Controls.Add(this.custombackbutton);
- this.backgroup.Controls.Add(label12);
+ this.backgroup.Controls.Add(this.groupBox4);
+ this.backgroup.Controls.Add(this.backflagsgroup);
+ this.backgroup.Controls.Add(this.backscalegroup);
+ this.backgroup.Controls.Add(this.groupBox1);
this.backgroup.Controls.Add(this.backlow);
this.backgroup.Controls.Add(this.backmid);
this.backgroup.Controls.Add(this.backhigh);
- this.backgroup.Controls.Add(label8);
- this.backgroup.Controls.Add(label9);
- this.backgroup.Controls.Add(label10);
- this.backgroup.Controls.Add(this.udmfPropertiesBack);
this.backgroup.Enabled = false;
- this.backgroup.Location = new System.Drawing.Point(3, 3);
+ this.backgroup.Location = new System.Drawing.Point(8, 8);
this.backgroup.Name = "backgroup";
- this.backgroup.Size = new System.Drawing.Size(535, 299);
+ this.backgroup.Size = new System.Drawing.Size(535, 605);
this.backgroup.TabIndex = 1;
this.backgroup.TabStop = false;
this.backgroup.Text = " ";
//
- // backTextureOffset
+ // groupBox4
//
- this.backTextureOffset.ButtonStep = 16;
- this.backTextureOffset.DefaultValue = 0;
- this.backTextureOffset.Label = "Texture Offset:";
- this.backTextureOffset.Location = new System.Drawing.Point(3, 65);
- this.backTextureOffset.Name = "backTextureOffset";
- this.backTextureOffset.Size = new System.Drawing.Size(247, 28);
- this.backTextureOffset.TabIndex = 42;
- this.backTextureOffset.OnValuesChanged += new System.EventHandler(this.backTextureOffset_OnValuesChanged);
- //
- // cbLightAbsoluteBack
- //
- this.cbLightAbsoluteBack.AutoSize = true;
- this.cbLightAbsoluteBack.Location = new System.Drawing.Point(158, 100);
- this.cbLightAbsoluteBack.Name = "cbLightAbsoluteBack";
- this.cbLightAbsoluteBack.Size = new System.Drawing.Size(69, 18);
- this.cbLightAbsoluteBack.TabIndex = 30;
- this.cbLightAbsoluteBack.Tag = "lightabsolute";
- this.cbLightAbsoluteBack.Text = "Absolute";
- this.cbLightAbsoluteBack.UseVisualStyleBackColor = true;
- this.cbLightAbsoluteBack.CheckedChanged += new System.EventHandler(this.cbLightAbsoluteBack_CheckedChanged);
- //
- // labelLightBack
- //
- this.labelLightBack.Location = new System.Drawing.Point(8, 101);
- this.labelLightBack.Name = "labelLightBack";
- this.labelLightBack.Size = new System.Drawing.Size(80, 14);
- this.labelLightBack.TabIndex = 28;
- this.labelLightBack.Tag = "";
- this.labelLightBack.Text = "Brightness:";
- this.labelLightBack.TextAlign = System.Drawing.ContentAlignment.TopRight;
- //
- // lightBack
- //
- this.lightBack.AllowDecimal = false;
- this.lightBack.AllowNegative = true;
- this.lightBack.AllowRelative = true;
- this.lightBack.ButtonStep = 16;
- this.lightBack.ButtonStepFloat = 1F;
- this.lightBack.ButtonStepsWrapAround = false;
- this.lightBack.Location = new System.Drawing.Point(90, 96);
- this.lightBack.Name = "lightBack";
- this.lightBack.Size = new System.Drawing.Size(62, 24);
- this.lightBack.StepValues = null;
- this.lightBack.TabIndex = 29;
- this.lightBack.Tag = "light";
- this.lightBack.WhenTextChanged += new System.EventHandler(this.lightBack_WhenTextChanged);
+ this.groupBox4.Controls.Add(this.backsector);
+ this.groupBox4.Controls.Add(label12);
+ this.groupBox4.Controls.Add(this.custombackbutton);
+ this.groupBox4.Controls.Add(this.lightBack);
+ this.groupBox4.Controls.Add(this.labelLightBack);
+ this.groupBox4.Controls.Add(this.cbLightAbsoluteBack);
+ this.groupBox4.Location = new System.Drawing.Point(12, 19);
+ this.groupBox4.Name = "groupBox4";
+ this.groupBox4.Size = new System.Drawing.Size(290, 117);
+ this.groupBox4.TabIndex = 46;
+ this.groupBox4.TabStop = false;
//
// backsector
//
@@ -1064,7 +967,7 @@ namespace CodeImp.DoomBuilder.Windows
this.backsector.ButtonStep = 1;
this.backsector.ButtonStepFloat = 1F;
this.backsector.ButtonStepsWrapAround = false;
- this.backsector.Location = new System.Drawing.Point(90, 35);
+ this.backsector.Location = new System.Drawing.Point(96, 19);
this.backsector.Name = "backsector";
this.backsector.Size = new System.Drawing.Size(130, 24);
this.backsector.StepValues = null;
@@ -1072,7 +975,7 @@ namespace CodeImp.DoomBuilder.Windows
//
// custombackbutton
//
- this.custombackbutton.Location = new System.Drawing.Point(90, 126);
+ this.custombackbutton.Location = new System.Drawing.Point(96, 79);
this.custombackbutton.Name = "custombackbutton";
this.custombackbutton.Size = new System.Drawing.Size(130, 25);
this.custombackbutton.TabIndex = 3;
@@ -1080,84 +983,79 @@ namespace CodeImp.DoomBuilder.Windows
this.custombackbutton.UseVisualStyleBackColor = true;
this.custombackbutton.Click += new System.EventHandler(this.custombackbutton_Click);
//
- // backlow
+ // lightBack
//
- this.backlow.Location = new System.Drawing.Point(437, 37);
- this.backlow.MultipleTextures = false;
- this.backlow.Name = "backlow";
- this.backlow.Required = false;
- this.backlow.Size = new System.Drawing.Size(83, 112);
- this.backlow.TabIndex = 6;
- this.backlow.TextureName = "";
- this.backlow.OnValueChanged += new System.EventHandler(this.backlow_OnValueChanged);
+ this.lightBack.AllowDecimal = false;
+ this.lightBack.AllowNegative = true;
+ this.lightBack.AllowRelative = true;
+ this.lightBack.ButtonStep = 16;
+ this.lightBack.ButtonStepFloat = 1F;
+ this.lightBack.ButtonStepsWrapAround = false;
+ this.lightBack.Location = new System.Drawing.Point(96, 49);
+ this.lightBack.Name = "lightBack";
+ this.lightBack.Size = new System.Drawing.Size(62, 24);
+ this.lightBack.StepValues = null;
+ this.lightBack.TabIndex = 29;
+ this.lightBack.Tag = "light";
+ this.lightBack.WhenTextChanged += new System.EventHandler(this.lightBack_WhenTextChanged);
//
- // backmid
+ // labelLightBack
//
- this.backmid.Location = new System.Drawing.Point(346, 37);
- this.backmid.MultipleTextures = false;
- this.backmid.Name = "backmid";
- this.backmid.Required = false;
- this.backmid.Size = new System.Drawing.Size(83, 112);
- this.backmid.TabIndex = 5;
- this.backmid.TextureName = "";
- this.backmid.OnValueChanged += new System.EventHandler(this.backmid_OnValueChanged);
+ this.labelLightBack.Location = new System.Drawing.Point(14, 54);
+ this.labelLightBack.Name = "labelLightBack";
+ this.labelLightBack.Size = new System.Drawing.Size(80, 14);
+ this.labelLightBack.TabIndex = 28;
+ this.labelLightBack.Tag = "";
+ this.labelLightBack.Text = "Brightness:";
+ this.labelLightBack.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
- // backhigh
+ // cbLightAbsoluteBack
//
- this.backhigh.Location = new System.Drawing.Point(255, 37);
- this.backhigh.MultipleTextures = false;
- this.backhigh.Name = "backhigh";
- this.backhigh.Required = false;
- this.backhigh.Size = new System.Drawing.Size(83, 112);
- this.backhigh.TabIndex = 4;
- this.backhigh.TextureName = "";
- this.backhigh.OnValueChanged += new System.EventHandler(this.backhigh_OnValueChanged);
+ this.cbLightAbsoluteBack.AutoSize = true;
+ this.cbLightAbsoluteBack.Location = new System.Drawing.Point(164, 53);
+ this.cbLightAbsoluteBack.Name = "cbLightAbsoluteBack";
+ this.cbLightAbsoluteBack.Size = new System.Drawing.Size(69, 18);
+ this.cbLightAbsoluteBack.TabIndex = 30;
+ this.cbLightAbsoluteBack.Tag = "lightabsolute";
+ this.cbLightAbsoluteBack.Text = "Absolute";
+ this.cbLightAbsoluteBack.UseVisualStyleBackColor = true;
+ this.cbLightAbsoluteBack.CheckedChanged += new System.EventHandler(this.cbLightAbsoluteBack_CheckedChanged);
//
- // udmfPropertiesBack
+ // backflagsgroup
//
- this.udmfPropertiesBack.Controls.Add(this.tabBackOffsets);
- this.udmfPropertiesBack.Controls.Add(this.tabBackFlags);
- this.udmfPropertiesBack.ItemSize = new System.Drawing.Size(100, 19);
- this.udmfPropertiesBack.Location = new System.Drawing.Point(6, 172);
- this.udmfPropertiesBack.Margin = new System.Windows.Forms.Padding(1);
- this.udmfPropertiesBack.Name = "udmfPropertiesBack";
- this.udmfPropertiesBack.SelectedIndex = 0;
- this.udmfPropertiesBack.Size = new System.Drawing.Size(525, 123);
- this.udmfPropertiesBack.TabIndex = 25;
+ this.backflagsgroup.Controls.Add(this.flagsBack);
+ this.backflagsgroup.Location = new System.Drawing.Point(12, 409);
+ this.backflagsgroup.Name = "backflagsgroup";
+ this.backflagsgroup.Size = new System.Drawing.Size(290, 190);
+ this.backflagsgroup.TabIndex = 45;
+ this.backflagsgroup.TabStop = false;
+ this.backflagsgroup.Text = " Flags ";
//
- // tabBackOffsets
+ // flagsBack
//
- this.tabBackOffsets.Controls.Add(this.pfcBackScaleMid);
- this.tabBackOffsets.Controls.Add(this.pfcBackScaleTop);
- this.tabBackOffsets.Controls.Add(this.pfcBackScaleBottom);
- this.tabBackOffsets.Controls.Add(this.pfcBackOffsetBottom);
- this.tabBackOffsets.Controls.Add(this.pfcBackOffsetMid);
- this.tabBackOffsets.Controls.Add(this.pfcBackOffsetTop);
- this.tabBackOffsets.Location = new System.Drawing.Point(4, 23);
- this.tabBackOffsets.Name = "tabBackOffsets";
- this.tabBackOffsets.Padding = new System.Windows.Forms.Padding(3);
- this.tabBackOffsets.Size = new System.Drawing.Size(517, 96);
- this.tabBackOffsets.TabIndex = 0;
- this.tabBackOffsets.Text = " Offsets & Scale ";
- this.tabBackOffsets.UseVisualStyleBackColor = true;
+ this.flagsBack.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.flagsBack.AutoScroll = true;
+ this.flagsBack.Columns = 2;
+ this.flagsBack.Location = new System.Drawing.Point(16, 16);
+ this.flagsBack.Name = "flagsBack";
+ this.flagsBack.Size = new System.Drawing.Size(269, 168);
+ this.flagsBack.TabIndex = 1;
+ this.flagsBack.VerticalSpacing = 3;
+ this.flagsBack.OnValueChanged += new System.EventHandler(this.flagsBack_OnValueChanged);
//
- // pfcBackScaleMid
+ // backscalegroup
//
- this.pfcBackScaleMid.AllowDecimal = true;
- this.pfcBackScaleMid.AllowValueLinking = true;
- this.pfcBackScaleMid.ButtonStep = 1;
- this.pfcBackScaleMid.ButtonStepFloat = 0.1F;
- this.pfcBackScaleMid.DefaultValue = 1F;
- this.pfcBackScaleMid.Field1 = "scalex_mid";
- this.pfcBackScaleMid.Field2 = "scaley_mid";
- this.pfcBackScaleMid.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
- this.pfcBackScaleMid.Label = "Middle Scale:";
- this.pfcBackScaleMid.LinkValues = false;
- this.pfcBackScaleMid.Location = new System.Drawing.Point(245, 36);
- this.pfcBackScaleMid.Name = "pfcBackScaleMid";
- this.pfcBackScaleMid.Size = new System.Drawing.Size(270, 32);
- this.pfcBackScaleMid.TabIndex = 39;
- this.pfcBackScaleMid.OnValuesChanged += new System.EventHandler(this.pfcBackScaleMid_OnValuesChanged);
+ this.backscalegroup.Controls.Add(this.pfcBackScaleTop);
+ this.backscalegroup.Controls.Add(this.pfcBackScaleBottom);
+ this.backscalegroup.Controls.Add(this.pfcBackScaleMid);
+ this.backscalegroup.Location = new System.Drawing.Point(12, 291);
+ this.backscalegroup.Name = "backscalegroup";
+ this.backscalegroup.Size = new System.Drawing.Size(290, 112);
+ this.backscalegroup.TabIndex = 44;
+ this.backscalegroup.TabStop = false;
+ this.backscalegroup.Text = " Texture Scale";
//
// pfcBackScaleTop
//
@@ -1171,7 +1069,7 @@ namespace CodeImp.DoomBuilder.Windows
this.pfcBackScaleTop.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.pfcBackScaleTop.Label = "Upper Scale:";
this.pfcBackScaleTop.LinkValues = false;
- this.pfcBackScaleTop.Location = new System.Drawing.Point(245, 6);
+ this.pfcBackScaleTop.Location = new System.Drawing.Point(6, 19);
this.pfcBackScaleTop.Name = "pfcBackScaleTop";
this.pfcBackScaleTop.Size = new System.Drawing.Size(270, 30);
this.pfcBackScaleTop.TabIndex = 38;
@@ -1189,47 +1087,42 @@ namespace CodeImp.DoomBuilder.Windows
this.pfcBackScaleBottom.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.pfcBackScaleBottom.Label = "Lower Scale:";
this.pfcBackScaleBottom.LinkValues = false;
- this.pfcBackScaleBottom.Location = new System.Drawing.Point(245, 65);
+ this.pfcBackScaleBottom.Location = new System.Drawing.Point(6, 78);
this.pfcBackScaleBottom.Name = "pfcBackScaleBottom";
this.pfcBackScaleBottom.Size = new System.Drawing.Size(270, 32);
this.pfcBackScaleBottom.TabIndex = 40;
this.pfcBackScaleBottom.OnValuesChanged += new System.EventHandler(this.pfcBackScaleBottom_OnValuesChanged);
//
- // pfcBackOffsetBottom
+ // pfcBackScaleMid
//
- this.pfcBackOffsetBottom.AllowDecimal = true;
- this.pfcBackOffsetBottom.AllowValueLinking = false;
- this.pfcBackOffsetBottom.ButtonStep = 1;
- this.pfcBackOffsetBottom.ButtonStepFloat = 16F;
- this.pfcBackOffsetBottom.DefaultValue = 0F;
- this.pfcBackOffsetBottom.Field1 = "offsetx_bottom";
- this.pfcBackOffsetBottom.Field2 = "offsety_bottom";
- this.pfcBackOffsetBottom.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
- this.pfcBackOffsetBottom.Label = "Lower Offset:";
- this.pfcBackOffsetBottom.LinkValues = false;
- this.pfcBackOffsetBottom.Location = new System.Drawing.Point(-5, 65);
- this.pfcBackOffsetBottom.Name = "pfcBackOffsetBottom";
- this.pfcBackOffsetBottom.Size = new System.Drawing.Size(270, 30);
- this.pfcBackOffsetBottom.TabIndex = 37;
- this.pfcBackOffsetBottom.OnValuesChanged += new System.EventHandler(this.pfcBackOffsetBottom_OnValuesChanged);
+ this.pfcBackScaleMid.AllowDecimal = true;
+ this.pfcBackScaleMid.AllowValueLinking = true;
+ this.pfcBackScaleMid.ButtonStep = 1;
+ this.pfcBackScaleMid.ButtonStepFloat = 0.1F;
+ this.pfcBackScaleMid.DefaultValue = 1F;
+ this.pfcBackScaleMid.Field1 = "scalex_mid";
+ this.pfcBackScaleMid.Field2 = "scaley_mid";
+ this.pfcBackScaleMid.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+ this.pfcBackScaleMid.Label = "Middle Scale:";
+ this.pfcBackScaleMid.LinkValues = false;
+ this.pfcBackScaleMid.Location = new System.Drawing.Point(6, 49);
+ this.pfcBackScaleMid.Name = "pfcBackScaleMid";
+ this.pfcBackScaleMid.Size = new System.Drawing.Size(270, 32);
+ this.pfcBackScaleMid.TabIndex = 39;
+ this.pfcBackScaleMid.OnValuesChanged += new System.EventHandler(this.pfcBackScaleMid_OnValuesChanged);
//
- // pfcBackOffsetMid
+ // groupBox1
//
- this.pfcBackOffsetMid.AllowDecimal = true;
- this.pfcBackOffsetMid.AllowValueLinking = false;
- this.pfcBackOffsetMid.ButtonStep = 1;
- this.pfcBackOffsetMid.ButtonStepFloat = 16F;
- this.pfcBackOffsetMid.DefaultValue = 0F;
- this.pfcBackOffsetMid.Field1 = "offsetx_mid";
- this.pfcBackOffsetMid.Field2 = "offsety_mid";
- this.pfcBackOffsetMid.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
- this.pfcBackOffsetMid.Label = "Middle Offset:";
- this.pfcBackOffsetMid.LinkValues = false;
- this.pfcBackOffsetMid.Location = new System.Drawing.Point(-5, 36);
- this.pfcBackOffsetMid.Name = "pfcBackOffsetMid";
- this.pfcBackOffsetMid.Size = new System.Drawing.Size(270, 30);
- this.pfcBackOffsetMid.TabIndex = 36;
- this.pfcBackOffsetMid.OnValuesChanged += new System.EventHandler(this.pfcBackOffsetMid_OnValuesChanged);
+ this.groupBox1.Controls.Add(this.pfcBackOffsetTop);
+ this.groupBox1.Controls.Add(this.pfcBackOffsetMid);
+ this.groupBox1.Controls.Add(this.pfcBackOffsetBottom);
+ this.groupBox1.Controls.Add(this.backTextureOffset);
+ this.groupBox1.Location = new System.Drawing.Point(12, 142);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(290, 143);
+ this.groupBox1.TabIndex = 43;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = " Texture Offsets ";
//
// pfcBackOffsetTop
//
@@ -1243,33 +1136,94 @@ namespace CodeImp.DoomBuilder.Windows
this.pfcBackOffsetTop.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.pfcBackOffsetTop.Label = "Upper Offset:";
this.pfcBackOffsetTop.LinkValues = false;
- this.pfcBackOffsetTop.Location = new System.Drawing.Point(-5, 6);
+ this.pfcBackOffsetTop.Location = new System.Drawing.Point(6, 48);
this.pfcBackOffsetTop.Name = "pfcBackOffsetTop";
this.pfcBackOffsetTop.Size = new System.Drawing.Size(270, 28);
this.pfcBackOffsetTop.TabIndex = 35;
this.pfcBackOffsetTop.OnValuesChanged += new System.EventHandler(this.pfcBackOffsetTop_OnValuesChanged);
//
- // tabBackFlags
+ // pfcBackOffsetMid
//
- this.tabBackFlags.Controls.Add(this.flagsBack);
- this.tabBackFlags.Location = new System.Drawing.Point(4, 23);
- this.tabBackFlags.Name = "tabBackFlags";
- this.tabBackFlags.Padding = new System.Windows.Forms.Padding(3);
- this.tabBackFlags.Size = new System.Drawing.Size(517, 96);
- this.tabBackFlags.TabIndex = 1;
- this.tabBackFlags.Text = " Flags ";
- this.tabBackFlags.UseVisualStyleBackColor = true;
+ this.pfcBackOffsetMid.AllowDecimal = true;
+ this.pfcBackOffsetMid.AllowValueLinking = false;
+ this.pfcBackOffsetMid.ButtonStep = 1;
+ this.pfcBackOffsetMid.ButtonStepFloat = 16F;
+ this.pfcBackOffsetMid.DefaultValue = 0F;
+ this.pfcBackOffsetMid.Field1 = "offsetx_mid";
+ this.pfcBackOffsetMid.Field2 = "offsety_mid";
+ this.pfcBackOffsetMid.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+ this.pfcBackOffsetMid.Label = "Middle Offset:";
+ this.pfcBackOffsetMid.LinkValues = false;
+ this.pfcBackOffsetMid.Location = new System.Drawing.Point(6, 77);
+ this.pfcBackOffsetMid.Name = "pfcBackOffsetMid";
+ this.pfcBackOffsetMid.Size = new System.Drawing.Size(270, 30);
+ this.pfcBackOffsetMid.TabIndex = 36;
+ this.pfcBackOffsetMid.OnValuesChanged += new System.EventHandler(this.pfcBackOffsetMid_OnValuesChanged);
//
- // flagsBack
+ // pfcBackOffsetBottom
//
- this.flagsBack.AutoScroll = true;
- this.flagsBack.Columns = 2;
- this.flagsBack.Location = new System.Drawing.Point(15, 6);
- this.flagsBack.Name = "flagsBack";
- this.flagsBack.Size = new System.Drawing.Size(496, 84);
- this.flagsBack.TabIndex = 1;
- this.flagsBack.VerticalSpacing = 3;
- this.flagsBack.OnValueChanged += new System.EventHandler(this.flagsBack_OnValueChanged);
+ this.pfcBackOffsetBottom.AllowDecimal = true;
+ this.pfcBackOffsetBottom.AllowValueLinking = false;
+ this.pfcBackOffsetBottom.ButtonStep = 1;
+ this.pfcBackOffsetBottom.ButtonStepFloat = 16F;
+ this.pfcBackOffsetBottom.DefaultValue = 0F;
+ this.pfcBackOffsetBottom.Field1 = "offsetx_bottom";
+ this.pfcBackOffsetBottom.Field2 = "offsety_bottom";
+ this.pfcBackOffsetBottom.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+ this.pfcBackOffsetBottom.Label = "Lower Offset:";
+ this.pfcBackOffsetBottom.LinkValues = false;
+ this.pfcBackOffsetBottom.Location = new System.Drawing.Point(6, 107);
+ this.pfcBackOffsetBottom.Name = "pfcBackOffsetBottom";
+ this.pfcBackOffsetBottom.Size = new System.Drawing.Size(270, 30);
+ this.pfcBackOffsetBottom.TabIndex = 37;
+ this.pfcBackOffsetBottom.OnValuesChanged += new System.EventHandler(this.pfcBackOffsetBottom_OnValuesChanged);
+ //
+ // backTextureOffset
+ //
+ this.backTextureOffset.ButtonStep = 16;
+ this.backTextureOffset.DefaultValue = 0;
+ this.backTextureOffset.Label = "Sidedef Offset:";
+ this.backTextureOffset.Location = new System.Drawing.Point(6, 19);
+ this.backTextureOffset.Name = "backTextureOffset";
+ this.backTextureOffset.Size = new System.Drawing.Size(270, 28);
+ this.backTextureOffset.TabIndex = 42;
+ this.backTextureOffset.OnValuesChanged += new System.EventHandler(this.backTextureOffset_OnValuesChanged);
+ //
+ // backlow
+ //
+ this.backlow.Location = new System.Drawing.Point(309, 415);
+ this.backlow.MultipleTextures = false;
+ this.backlow.Name = "backlow";
+ this.backlow.Required = false;
+ this.backlow.Size = new System.Drawing.Size(220, 184);
+ this.backlow.TabIndex = 6;
+ this.backlow.TextureName = "";
+ this.backlow.UsePreviews = false;
+ this.backlow.OnValueChanged += new System.EventHandler(this.backlow_OnValueChanged);
+ //
+ // backmid
+ //
+ this.backmid.Location = new System.Drawing.Point(309, 217);
+ this.backmid.MultipleTextures = false;
+ this.backmid.Name = "backmid";
+ this.backmid.Required = false;
+ this.backmid.Size = new System.Drawing.Size(220, 184);
+ this.backmid.TabIndex = 5;
+ this.backmid.TextureName = "";
+ this.backmid.UsePreviews = false;
+ this.backmid.OnValueChanged += new System.EventHandler(this.backmid_OnValueChanged);
+ //
+ // backhigh
+ //
+ this.backhigh.Location = new System.Drawing.Point(309, 19);
+ this.backhigh.MultipleTextures = false;
+ this.backhigh.Name = "backhigh";
+ this.backhigh.Required = false;
+ this.backhigh.Size = new System.Drawing.Size(220, 184);
+ this.backhigh.TabIndex = 4;
+ this.backhigh.TextureName = "";
+ this.backhigh.UsePreviews = false;
+ this.backhigh.OnValueChanged += new System.EventHandler(this.backhigh_OnValueChanged);
//
// tabcustom
//
@@ -1304,6 +1258,13 @@ namespace CodeImp.DoomBuilder.Windows
this.fieldslist.TypeColumnWidth = 100;
this.fieldslist.ValueColumnVisible = true;
//
+ // imagelist
+ //
+ this.imagelist.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imagelist.ImageStream")));
+ this.imagelist.TransparentColor = System.Drawing.Color.Transparent;
+ this.imagelist.Images.SetKeyName(0, "Check.png");
+ this.imagelist.Images.SetKeyName(1, "SearchClear.png");
+ //
// tooltip
//
this.tooltip.AutomaticDelay = 10;
@@ -1347,22 +1308,22 @@ namespace CodeImp.DoomBuilder.Windows
this.activationGroup.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.missingactivation)).EndInit();
this.idgroup.ResumeLayout(false);
- this.tabsidedefs.ResumeLayout(false);
- this.splitter.Panel1.ResumeLayout(false);
- this.splitter.Panel1.PerformLayout();
- this.splitter.Panel2.ResumeLayout(false);
- this.splitter.Panel2.PerformLayout();
- this.splitter.ResumeLayout(false);
+ this.tabfront.ResumeLayout(false);
+ this.tabfront.PerformLayout();
this.frontgroup.ResumeLayout(false);
- this.frontgroup.PerformLayout();
- this.udmfPropertiesFront.ResumeLayout(false);
- this.tabFrontOffsets.ResumeLayout(false);
- this.tabFrontFlags.ResumeLayout(false);
+ this.frontflagsgroup.ResumeLayout(false);
+ this.frontscalegroup.ResumeLayout(false);
+ this.groupBox6.ResumeLayout(false);
+ this.groupBox5.ResumeLayout(false);
+ this.groupBox5.PerformLayout();
+ this.tabback.ResumeLayout(false);
+ this.tabback.PerformLayout();
this.backgroup.ResumeLayout(false);
- this.backgroup.PerformLayout();
- this.udmfPropertiesBack.ResumeLayout(false);
- this.tabBackOffsets.ResumeLayout(false);
- this.tabBackFlags.ResumeLayout(false);
+ this.groupBox4.ResumeLayout(false);
+ this.groupBox4.PerformLayout();
+ this.backflagsgroup.ResumeLayout(false);
+ this.backscalegroup.ResumeLayout(false);
+ this.groupBox1.ResumeLayout(false);
this.tabcustom.ResumeLayout(false);
this.ResumeLayout(false);
@@ -1379,7 +1340,7 @@ namespace CodeImp.DoomBuilder.Windows
private CodeImp.DoomBuilder.Controls.ActionSelectorControl action;
private System.Windows.Forms.TabControl tabs;
private System.Windows.Forms.TabPage tabproperties;
- private System.Windows.Forms.TabPage tabsidedefs;
+ private System.Windows.Forms.TabPage tabfront;
private System.Windows.Forms.GroupBox frontgroup;
private System.Windows.Forms.CheckBox frontside;
private System.Windows.Forms.CheckBox backside;
@@ -1405,7 +1366,6 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.Label arg3label;
private System.Windows.Forms.Label arg2label;
private System.Windows.Forms.Label arg4label;
- private System.Windows.Forms.SplitContainer splitter;
private System.Windows.Forms.Button customfrontbutton;
private System.Windows.Forms.Button custombackbutton;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox frontsector;
@@ -1413,9 +1373,6 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.CheckBox cbArgStr;
private System.Windows.Forms.ComboBox scriptNames;
private CodeImp.DoomBuilder.GZBuilder.Controls.TagSelector tagSelector;
- private System.Windows.Forms.TabControl udmfPropertiesFront;
- private System.Windows.Forms.TabPage tabFrontOffsets;
- private System.Windows.Forms.TabPage tabFrontFlags;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox lightFront;
private System.Windows.Forms.CheckBox cbLightAbsoluteFront;
private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcFrontOffsetTop;
@@ -1424,15 +1381,12 @@ namespace CodeImp.DoomBuilder.Windows
private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcFrontScaleBottom;
private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcFrontScaleMid;
private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcFrontScaleTop;
- private System.Windows.Forms.TabControl udmfPropertiesBack;
- private System.Windows.Forms.TabPage tabBackOffsets;
private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcBackScaleBottom;
private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcBackScaleMid;
private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcBackScaleTop;
private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcBackOffsetBottom;
private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcBackOffsetMid;
private CodeImp.DoomBuilder.GZBuilder.Controls.PairedFieldsControl pfcBackOffsetTop;
- private System.Windows.Forms.TabPage tabBackFlags;
private System.Windows.Forms.GroupBox settingsGroup;
private System.Windows.Forms.ComboBox renderStyle;
private System.Windows.Forms.Label labelLightFront;
@@ -1449,5 +1403,15 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.PictureBox missingactivation;
private System.Windows.Forms.ToolTip tooltip;
private System.Windows.Forms.ComboBox lockpick;
+ private System.Windows.Forms.TabPage tabback;
+ private System.Windows.Forms.GroupBox backflagsgroup;
+ private System.Windows.Forms.GroupBox backscalegroup;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.GroupBox groupBox4;
+ private System.Windows.Forms.GroupBox groupBox5;
+ private System.Windows.Forms.GroupBox frontflagsgroup;
+ private System.Windows.Forms.GroupBox frontscalegroup;
+ private System.Windows.Forms.GroupBox groupBox6;
+ private System.Windows.Forms.ImageList imagelist;
}
}
\ No newline at end of file
diff --git a/Source/Core/Windows/LinedefEditFormUDMF.cs b/Source/Core/Windows/LinedefEditFormUDMF.cs
index 78dff048..325dee3e 100644
--- a/Source/Core/Windows/LinedefEditFormUDMF.cs
+++ b/Source/Core/Windows/LinedefEditFormUDMF.cs
@@ -69,8 +69,6 @@ namespace CodeImp.DoomBuilder.Windows
//mxd. Window setup stuff
private static Point location = Point.Empty;
private static int activeTab;
- private static int activeFrontTab;
- private static int activeBackTab;
private struct LinedefProperties //mxd
{
@@ -173,8 +171,6 @@ namespace CodeImp.DoomBuilder.Windows
{
activeTab = 0;
}
- if(activeFrontTab > 0) udmfPropertiesFront.SelectTab(activeFrontTab);
- if(activeBackTab > 0) udmfPropertiesBack.SelectTab(activeBackTab);
}
// Fill flags lists
@@ -278,8 +274,16 @@ namespace CodeImp.DoomBuilder.Windows
labelLightBack.Visible = false;
lightBack.Visible = false;
cbLightAbsoluteBack.Visible = false;
- udmfPropertiesFront.Visible = false;
- udmfPropertiesBack.Visible = false;
+ frontflagsgroup.Enabled = false;
+ backflagsgroup.Enabled = false;
+ frontscalegroup.Enabled = false;
+ backscalegroup.Enabled = false;
+ pfcFrontOffsetTop.Enabled = false;
+ pfcFrontOffsetMid.Enabled = false;
+ pfcFrontOffsetBottom.Enabled = false;
+ pfcBackOffsetTop.Enabled = false;
+ pfcBackOffsetMid.Enabled = false;
+ pfcBackOffsetBottom.Enabled = false;
}
}
@@ -925,6 +929,7 @@ namespace CodeImp.DoomBuilder.Windows
// Enable/disable panel
// NOTE: Also enabled when checkbox is grayed!
frontgroup.Enabled = (frontside.CheckState != CheckState.Unchecked);
+ tabfront.ImageIndex = (frontside.CheckState == CheckState.Unchecked ? 1 : 0);
}
// Back side (un)checked
@@ -933,6 +938,7 @@ namespace CodeImp.DoomBuilder.Windows
// Enable/disable panel
// NOTE: Also enabled when checkbox is grayed!
backgroup.Enabled = (backside.CheckState != CheckState.Unchecked);
+ tabback.ImageIndex = (backside.CheckState == CheckState.Unchecked ? 1 : 0);
}
// Action changes
@@ -1020,8 +1026,6 @@ namespace CodeImp.DoomBuilder.Windows
{
location = this.Location;
activeTab = tabs.SelectedIndex;
- activeFrontTab = udmfPropertiesFront.SelectedIndex;
- activeBackTab = udmfPropertiesBack.SelectedIndex;
}
// Help!
diff --git a/Source/Core/Windows/LinedefEditFormUDMF.resx b/Source/Core/Windows/LinedefEditFormUDMF.resx
index d9fdec64..5be01793 100644
--- a/Source/Core/Windows/LinedefEditFormUDMF.resx
+++ b/Source/Core/Windows/LinedefEditFormUDMF.resx
@@ -123,42 +123,6 @@
False
-
- True
-
-
- False
-
-
- True
-
-
- False
-
-
- True
-
-
- False
-
-
- True
-
-
- False
-
-
- True
-
-
- False
-
-
- True
-
-
- False
-
False
@@ -183,31 +147,55 @@
17, 17
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
True
+
+ 105, 17
+
+
+
+ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
+ LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
+ ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADM
+ CAAAAk1TRnQBSQFMAgEBAgEAARgBAAEYAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
+ AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
+ AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
+ AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
+ AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
+ AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
+ ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
+ AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
+ AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
+ AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
+ AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
+ AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
+ AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
+ AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
+ AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
+ ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
+ Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
+ AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
+ AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
+ AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
+ ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
+ Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
+ AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
+ AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
+ AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
+ AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
+ AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
+ AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/1QAAh8GAAIfKAAB/wHx
+ Af8KAAEfAiYBHwQAAR8CJgEfJgAB/wG7AYsBswH/CAABHwQmAR8CAAEfBCYBHyQAAf8BuwOLAbMB/wcA
+ ASUB3gQmAh8EJgHeASUjAAH/AbsBigOLAa0BswH/BwABJQHeCCYB3gElIwAB/wG7AooDiwKtAbMB/wcA
+ ASUB3gYmAd4BJSMAAf8BtQOKAYsBswGLA60BswH/BwABJQYmASUkAAHzA4oBiwHyAf8BtAKtA7MB/wYA
+ AR8GJgEfJAAB/wG1AYoBtAH/AgAB/wG0Aa0EswH/BAABHwgsAR8kAAH/AfEB/wQAAf8BtAWzAf8CAAEf
+ Ak0CLALeAiwCTQEfKwAB/wG0BLMB8wEAAR8CUwJNAd4CJQHeAk0CUwEfKwAB/wG0ArMBGQIAASUB3gJT
+ Ad4BJQIAASUB3gJTAd4BJSwAAf8BugEZBAABJQLeASUEAAElAt4BJTUAAiUGAAIlYwABQgFNAT4HAAE+
+ AwABKAMAAUADAAEQAwABAQEAAQEFAAGAFwAD/wEABP8EAAL/AucEAAH4Af8CwwQAAfABfwKBBAAB4AE/
+ AYABAQQAAcABHwHAAQMEAAGAAQ8B4AEHBQABBwHwAQ8FAAEDAfABDwQAAQYBAQHgAQcEAAGPAQABwAED
+ BAAB/wKAAQEEAAH/AcECgQQAAf8B4wLDBAAC/wLnBAAE/wQACw==
+
+
\ No newline at end of file
diff --git a/Source/Core/Windows/MainForm.Designer.cs b/Source/Core/Windows/MainForm.Designer.cs
index 91bd40e7..6200881f 100644
--- a/Source/Core/Windows/MainForm.Designer.cs
+++ b/Source/Core/Windows/MainForm.Designer.cs
@@ -413,7 +413,7 @@ namespace CodeImp.DoomBuilder.Windows
this.itemopenmapincurwad.Name = "itemopenmapincurwad";
this.itemopenmapincurwad.Size = new System.Drawing.Size(223, 22);
this.itemopenmapincurwad.Tag = "builder_openmapincurrentwad";
- this.itemopenmapincurwad.Text = "Open Map in current &WAD...";
+ this.itemopenmapincurwad.Text = "Open Map in Current &WAD...";
this.itemopenmapincurwad.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// itemclosemap
@@ -869,7 +869,7 @@ namespace CodeImp.DoomBuilder.Windows
this.itemfittoscreen.Name = "itemfittoscreen";
this.itemfittoscreen.Size = new System.Drawing.Size(209, 22);
this.itemfittoscreen.Tag = "builder_centerinscreen";
- this.itemfittoscreen.Text = "Fit to screen";
+ this.itemfittoscreen.Text = "Fit to Screen";
this.itemfittoscreen.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// itemtoggleinfo
diff --git a/Source/Core/Windows/MapOptionsForm.Designer.cs b/Source/Core/Windows/MapOptionsForm.Designer.cs
index c59a3d82..e43c8a6e 100644
--- a/Source/Core/Windows/MapOptionsForm.Designer.cs
+++ b/Source/Core/Windows/MapOptionsForm.Designer.cs
@@ -41,6 +41,7 @@ namespace CodeImp.DoomBuilder.Windows
this.apply = new System.Windows.Forms.Button();
this.cancel = new System.Windows.Forms.Button();
this.panelres = new System.Windows.Forms.GroupBox();
+ this.uselongtexturenames = new System.Windows.Forms.CheckBox();
this.strictpatches = new System.Windows.Forms.CheckBox();
this.datalocations = new CodeImp.DoomBuilder.Controls.ResourceListEditor();
label3 = new System.Windows.Forms.Label();
@@ -63,12 +64,12 @@ namespace CodeImp.DoomBuilder.Windows
//
// label2
//
- label2.AutoSize = true;
- label2.Location = new System.Drawing.Point(58, 83);
+ label2.Location = new System.Drawing.Point(13, 83);
label2.Name = "label2";
- label2.Size = new System.Drawing.Size(65, 14);
+ label2.Size = new System.Drawing.Size(110, 14);
label2.TabIndex = 7;
label2.Text = "Level name:";
+ label2.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// label1
//
@@ -76,7 +77,7 @@ namespace CodeImp.DoomBuilder.Windows
label1.Name = "label1";
label1.Size = new System.Drawing.Size(110, 14);
label1.TabIndex = 5;
- label1.Text = "Game Configuration:";
+ label1.Text = "Game configuration:";
label1.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// panelsettings
@@ -124,7 +125,7 @@ namespace CodeImp.DoomBuilder.Windows
this.scriptcompilerlabel.Name = "scriptcompilerlabel";
this.scriptcompilerlabel.Size = new System.Drawing.Size(110, 14);
this.scriptcompilerlabel.TabIndex = 11;
- this.scriptcompilerlabel.Text = "Script Type:";
+ this.scriptcompilerlabel.Text = "Script type:";
this.scriptcompilerlabel.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// levelname
@@ -152,7 +153,7 @@ namespace CodeImp.DoomBuilder.Windows
// label4
//
label4.AutoSize = true;
- label4.Location = new System.Drawing.Point(15, 190);
+ label4.Location = new System.Drawing.Point(15, 210);
label4.Name = "label4";
label4.Size = new System.Drawing.Size(312, 42);
label4.TabIndex = 17;
@@ -163,7 +164,7 @@ namespace CodeImp.DoomBuilder.Windows
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.apply.Location = new System.Drawing.Point(297, 378);
+ this.apply.Location = new System.Drawing.Point(297, 400);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(112, 25);
this.apply.TabIndex = 2;
@@ -175,7 +176,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.cancel.Location = new System.Drawing.Point(179, 378);
+ this.cancel.Location = new System.Drawing.Point(179, 400);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(112, 25);
this.cancel.TabIndex = 3;
@@ -187,16 +188,27 @@ namespace CodeImp.DoomBuilder.Windows
//
this.panelres.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
+ this.panelres.Controls.Add(this.uselongtexturenames);
this.panelres.Controls.Add(this.strictpatches);
this.panelres.Controls.Add(this.datalocations);
this.panelres.Controls.Add(label4);
this.panelres.Location = new System.Drawing.Point(12, 130);
this.panelres.Name = "panelres";
- this.panelres.Size = new System.Drawing.Size(397, 240);
+ this.panelres.Size = new System.Drawing.Size(397, 260);
this.panelres.TabIndex = 1;
this.panelres.TabStop = false;
this.panelres.Text = " Resources ";
//
+ // uselongtexturenames
+ //
+ this.uselongtexturenames.AutoSize = true;
+ this.uselongtexturenames.Location = new System.Drawing.Point(15, 51);
+ this.uselongtexturenames.Name = "uselongtexturenames";
+ this.uselongtexturenames.Size = new System.Drawing.Size(140, 18);
+ this.uselongtexturenames.TabIndex = 21;
+ this.uselongtexturenames.Text = "Use long texture names";
+ this.uselongtexturenames.UseVisualStyleBackColor = true;
+ //
// strictpatches
//
this.strictpatches.AutoSize = true;
@@ -212,7 +224,7 @@ namespace CodeImp.DoomBuilder.Windows
this.datalocations.AllowDrop = true;
this.datalocations.DialogOffset = new System.Drawing.Point(40, 20);
this.datalocations.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.datalocations.Location = new System.Drawing.Point(15, 57);
+ this.datalocations.Location = new System.Drawing.Point(15, 75);
this.datalocations.Name = "datalocations";
this.datalocations.Size = new System.Drawing.Size(368, 130);
this.datalocations.TabIndex = 0;
@@ -223,7 +235,7 @@ namespace CodeImp.DoomBuilder.Windows
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
- this.ClientSize = new System.Drawing.Size(421, 411);
+ this.ClientSize = new System.Drawing.Size(421, 433);
this.Controls.Add(this.panelres);
this.Controls.Add(this.cancel);
this.Controls.Add(this.apply);
@@ -259,6 +271,7 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.ComboBox scriptcompiler;
private System.Windows.Forms.Label scriptcompilerlabel;
private System.Windows.Forms.Label examplelabel;
+ private System.Windows.Forms.CheckBox uselongtexturenames;
}
diff --git a/Source/Core/Windows/MapOptionsForm.cs b/Source/Core/Windows/MapOptionsForm.cs
index 4c349e81..b390df62 100644
--- a/Source/Core/Windows/MapOptionsForm.cs
+++ b/Source/Core/Windows/MapOptionsForm.cs
@@ -32,8 +32,8 @@ namespace CodeImp.DoomBuilder.Windows
internal partial class MapOptionsForm : DelayedForm
{
// Variables
- private MapOptions options;
- private bool newmap;
+ private readonly MapOptions options;
+ private readonly bool newmap;
private string previousdefaultmaplumpname; //mxd
// Properties
@@ -169,6 +169,16 @@ namespace CodeImp.DoomBuilder.Windows
return;
}
+ //mxd. Long texture names
+ if(!newmap && !uselongtexturenames.Checked && options.UseLongTextureNames &&
+ MessageBox.Show(this, "Switching to short texture names may lead to texture and flat name conflicts. Do you want to continue?",
+ Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.No)
+ {
+ return;
+ }
+
+ options.UseLongTextureNames = uselongtexturenames.Checked;
+
// Collect information
ConfigurationInfo configinfo = config.SelectedItem as ConfigurationInfo; //mxd
DataLocationList locations = datalocations.GetResources();
@@ -312,6 +322,10 @@ namespace CodeImp.DoomBuilder.Windows
{
scriptcompiler.SelectedIndex = -1;
}
+
+ //mxd. Long texture names
+ uselongtexturenames.Enabled = ci.SupportsLongTextureNames;
+ uselongtexturenames.Checked = (ci.SupportsLongTextureNames && options.UseLongTextureNames);
// Show resources
datalocations.FixedResourceLocationList(ci.Resources);
diff --git a/Source/Core/Windows/MapOptionsForm.resx b/Source/Core/Windows/MapOptionsForm.resx
index 40b321b3..17bdcd9f 100644
--- a/Source/Core/Windows/MapOptionsForm.resx
+++ b/Source/Core/Windows/MapOptionsForm.resx
@@ -129,16 +129,7 @@
False
-
- True
-
False
-
- True
-
-
- True
-
\ No newline at end of file
diff --git a/Source/Core/Windows/OpenMapOptionsForm.Designer.cs b/Source/Core/Windows/OpenMapOptionsForm.Designer.cs
index ba459a50..9e32d969 100644
--- a/Source/Core/Windows/OpenMapOptionsForm.Designer.cs
+++ b/Source/Core/Windows/OpenMapOptionsForm.Designer.cs
@@ -33,6 +33,7 @@ namespace CodeImp.DoomBuilder.Windows
System.Windows.Forms.Label label2;
System.Windows.Forms.Label label3;
this.panelres = new System.Windows.Forms.GroupBox();
+ this.uselongtexturenames = new System.Windows.Forms.CheckBox();
this.strictpatches = new System.Windows.Forms.CheckBox();
this.datalocations = new CodeImp.DoomBuilder.Controls.ResourceListEditor();
this.apply = new System.Windows.Forms.Button();
@@ -58,7 +59,7 @@ namespace CodeImp.DoomBuilder.Windows
label1.Name = "label1";
label1.Size = new System.Drawing.Size(120, 14);
label1.TabIndex = 14;
- label1.Text = "Game Configuration:";
+ label1.Text = "Game configuration:";
label1.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// label2
@@ -73,7 +74,7 @@ namespace CodeImp.DoomBuilder.Windows
// label3
//
label3.AutoSize = true;
- label3.Location = new System.Drawing.Point(14, 191);
+ label3.Location = new System.Drawing.Point(14, 210);
label3.Name = "label3";
label3.Size = new System.Drawing.Size(312, 42);
label3.TabIndex = 17;
@@ -85,16 +86,27 @@ namespace CodeImp.DoomBuilder.Windows
//
this.panelres.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
+ this.panelres.Controls.Add(this.uselongtexturenames);
this.panelres.Controls.Add(this.strictpatches);
this.panelres.Controls.Add(this.datalocations);
this.panelres.Controls.Add(label3);
this.panelres.Location = new System.Drawing.Point(12, 246);
this.panelres.Name = "panelres";
- this.panelres.Size = new System.Drawing.Size(396, 240);
+ this.panelres.Size = new System.Drawing.Size(396, 264);
this.panelres.TabIndex = 2;
this.panelres.TabStop = false;
this.panelres.Text = " Resources ";
//
+ // uselongtexturenames
+ //
+ this.uselongtexturenames.AutoSize = true;
+ this.uselongtexturenames.Location = new System.Drawing.Point(14, 51);
+ this.uselongtexturenames.Name = "uselongtexturenames";
+ this.uselongtexturenames.Size = new System.Drawing.Size(140, 18);
+ this.uselongtexturenames.TabIndex = 20;
+ this.uselongtexturenames.Text = "Use long texture names";
+ this.uselongtexturenames.UseVisualStyleBackColor = true;
+ //
// strictpatches
//
this.strictpatches.AutoSize = true;
@@ -110,7 +122,7 @@ namespace CodeImp.DoomBuilder.Windows
this.datalocations.AllowDrop = true;
this.datalocations.DialogOffset = new System.Drawing.Point(40, 20);
this.datalocations.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.datalocations.Location = new System.Drawing.Point(14, 58);
+ this.datalocations.Location = new System.Drawing.Point(14, 75);
this.datalocations.Name = "datalocations";
this.datalocations.Size = new System.Drawing.Size(368, 127);
this.datalocations.TabIndex = 0;
@@ -118,7 +130,7 @@ namespace CodeImp.DoomBuilder.Windows
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.apply.Location = new System.Drawing.Point(296, 496);
+ this.apply.Location = new System.Drawing.Point(296, 517);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(112, 25);
this.apply.TabIndex = 3;
@@ -130,7 +142,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.cancel.Location = new System.Drawing.Point(178, 495);
+ this.cancel.Location = new System.Drawing.Point(178, 516);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(112, 25);
this.cancel.TabIndex = 4;
@@ -191,7 +203,7 @@ namespace CodeImp.DoomBuilder.Windows
this.scriptcompilerlabel.Name = "scriptcompilerlabel";
this.scriptcompilerlabel.Size = new System.Drawing.Size(120, 14);
this.scriptcompilerlabel.TabIndex = 18;
- this.scriptcompilerlabel.Text = "Script Type:";
+ this.scriptcompilerlabel.Text = "Script type:";
this.scriptcompilerlabel.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// OpenMapOptionsForm
@@ -200,7 +212,7 @@ namespace CodeImp.DoomBuilder.Windows
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
- this.ClientSize = new System.Drawing.Size(420, 530);
+ this.ClientSize = new System.Drawing.Size(420, 551);
this.Controls.Add(this.scriptcompiler);
this.Controls.Add(this.scriptcompilerlabel);
this.Controls.Add(this.mapslist);
@@ -239,6 +251,7 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.CheckBox strictpatches;
private System.Windows.Forms.ComboBox scriptcompiler;
private System.Windows.Forms.Label scriptcompilerlabel;
+ private System.Windows.Forms.CheckBox uselongtexturenames;
}
diff --git a/Source/Core/Windows/OpenMapOptionsForm.cs b/Source/Core/Windows/OpenMapOptionsForm.cs
index 33ff22a9..f36a3099 100644
--- a/Source/Core/Windows/OpenMapOptionsForm.cs
+++ b/Source/Core/Windows/OpenMapOptionsForm.cs
@@ -324,6 +324,10 @@ namespace CodeImp.DoomBuilder.Windows
scriptcompilerlabel.Enabled = false;
}
+ //mxd. Long texture names
+ uselongtexturenames.Enabled = ci.SupportsLongTextureNames;
+ uselongtexturenames.Checked = (ci.SupportsLongTextureNames && options.UseLongTextureNames);
+
// Show configuration resources
datalocations.FixedResourceLocationList(ci.Resources);
}
@@ -339,6 +343,15 @@ namespace CodeImp.DoomBuilder.Windows
config.Focus();
return;
}
+
+ //mxd. Use long texture names?
+ if (uselongtexturenames.Enabled && !options.UseLongTextureNames && uselongtexturenames.Checked &&
+ MessageBox.Show(this, "Switching to long texture names can make the map incompatible with some map editors and game engines. Do you want to continue?",
+ Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.No)
+ {
+ return;
+ }
+ options.UseLongTextureNames = uselongtexturenames.Checked;
// Collect information
ConfigurationInfo configinfo = (config.SelectedItem as ConfigurationInfo); //mxd
@@ -464,7 +477,8 @@ namespace CodeImp.DoomBuilder.Windows
datalocations.EditResourceLocationList(listedlocations);
//mxd. Select script compiler
- if (!string.IsNullOrEmpty(options.ScriptCompiler) && General.CompiledScriptConfigs.ContainsKey(options.ScriptCompiler)) {
+ if (!string.IsNullOrEmpty(options.ScriptCompiler) && General.CompiledScriptConfigs.ContainsKey(options.ScriptCompiler))
+ {
scriptconfig = options.ScriptCompiler;
}
else
@@ -473,6 +487,9 @@ namespace CodeImp.DoomBuilder.Windows
if(!string.IsNullOrEmpty(defaultscriptconfig) && General.CompiledScriptConfigs.ContainsKey(defaultscriptconfig))
scriptconfig = defaultscriptconfig;
}
+
+ //mxd. Long texture names
+ if(uselongtexturenames.Enabled) uselongtexturenames.Checked = options.UseLongTextureNames;
}
//mxd. Select proper script compiler
diff --git a/Source/Core/Windows/OpenMapOptionsForm.resx b/Source/Core/Windows/OpenMapOptionsForm.resx
index 2fcaef72..3907cb47 100644
--- a/Source/Core/Windows/OpenMapOptionsForm.resx
+++ b/Source/Core/Windows/OpenMapOptionsForm.resx
@@ -126,19 +126,7 @@
False
-
- True
-
False
-
- True
-
-
- True
-
-
- True
-
\ No newline at end of file
diff --git a/Source/Core/Windows/PreferencesForm.Designer.cs b/Source/Core/Windows/PreferencesForm.Designer.cs
index 3b60e7e4..842f993e 100644
--- a/Source/Core/Windows/PreferencesForm.Designer.cs
+++ b/Source/Core/Windows/PreferencesForm.Designer.cs
@@ -1892,6 +1892,7 @@ namespace CodeImp.DoomBuilder.Windows
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "PreferencesForm";
+ this.Opacity = 0;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
diff --git a/Source/Core/Windows/SectorEditFormUDMF.Designer.cs b/Source/Core/Windows/SectorEditFormUDMF.Designer.cs
index 12f31f66..56b2cfb2 100644
--- a/Source/Core/Windows/SectorEditFormUDMF.Designer.cs
+++ b/Source/Core/Windows/SectorEditFormUDMF.Designer.cs
@@ -129,7 +129,7 @@
groupaction.Controls.Add(this.tagSelector);
groupaction.Location = new System.Drawing.Point(7, 341);
groupaction.Name = "groupaction";
- groupaction.Size = new System.Drawing.Size(436, 71);
+ groupaction.Size = new System.Drawing.Size(490, 71);
groupaction.TabIndex = 2;
groupaction.TabStop = false;
groupaction.Text = " Identification: ";
@@ -138,7 +138,7 @@
//
this.tagSelector.Location = new System.Drawing.Point(6, 21);
this.tagSelector.Name = "tagSelector";
- this.tagSelector.Size = new System.Drawing.Size(424, 35);
+ this.tagSelector.Size = new System.Drawing.Size(478, 35);
this.tagSelector.TabIndex = 0;
//
// groupeffect
@@ -160,7 +160,7 @@
groupeffect.Controls.Add(label8);
groupeffect.Location = new System.Drawing.Point(7, 160);
groupeffect.Name = "groupeffect";
- groupeffect.Size = new System.Drawing.Size(436, 175);
+ groupeffect.Size = new System.Drawing.Size(490, 175);
groupeffect.TabIndex = 1;
groupeffect.TabStop = false;
groupeffect.Text = " Effects: ";
@@ -170,7 +170,7 @@
this.fadeColor.DefaultValue = 0;
this.fadeColor.Field = "fadecolor";
this.fadeColor.Label = "Fade:";
- this.fadeColor.Location = new System.Drawing.Point(223, 111);
+ this.fadeColor.Location = new System.Drawing.Point(241, 111);
this.fadeColor.Name = "fadeColor";
this.fadeColor.Size = new System.Drawing.Size(207, 31);
this.fadeColor.TabIndex = 30;
@@ -181,7 +181,7 @@
this.lightColor.DefaultValue = 16777215;
this.lightColor.Field = "lightcolor";
this.lightColor.Label = "Light:";
- this.lightColor.Location = new System.Drawing.Point(223, 82);
+ this.lightColor.Location = new System.Drawing.Point(241, 82);
this.lightColor.Name = "lightColor";
this.lightColor.Size = new System.Drawing.Size(207, 29);
this.lightColor.TabIndex = 29;
@@ -247,7 +247,7 @@
//
this.soundSequence.Location = new System.Drawing.Point(125, 55);
this.soundSequence.Name = "soundSequence";
- this.soundSequence.Size = new System.Drawing.Size(271, 20);
+ this.soundSequence.Size = new System.Drawing.Size(325, 20);
this.soundSequence.TabIndex = 2;
//
// gravity
@@ -276,7 +276,7 @@
// browseeffect
//
this.browseeffect.Image = global::CodeImp.DoomBuilder.Properties.Resources.List;
- this.browseeffect.Location = new System.Drawing.Point(402, 26);
+ this.browseeffect.Location = new System.Drawing.Point(456, 26);
this.browseeffect.Name = "browseeffect";
this.browseeffect.Size = new System.Drawing.Size(28, 25);
this.browseeffect.TabIndex = 1;
@@ -293,7 +293,7 @@
this.effect.GeneralizedOptions = null;
this.effect.Location = new System.Drawing.Point(68, 28);
this.effect.Name = "effect";
- this.effect.Size = new System.Drawing.Size(328, 21);
+ this.effect.Size = new System.Drawing.Size(382, 21);
this.effect.TabIndex = 0;
this.effect.Value = 402;
//
@@ -320,7 +320,7 @@
groupfloorceiling.Controls.Add(this.floorheight);
groupfloorceiling.Location = new System.Drawing.Point(7, 6);
groupfloorceiling.Name = "groupfloorceiling";
- groupfloorceiling.Size = new System.Drawing.Size(188, 148);
+ groupfloorceiling.Size = new System.Drawing.Size(242, 148);
groupfloorceiling.TabIndex = 0;
groupfloorceiling.TabStop = false;
groupfloorceiling.Text = " Heights: ";
@@ -432,7 +432,7 @@
this.tabs.Margin = new System.Windows.Forms.Padding(1);
this.tabs.Name = "tabs";
this.tabs.SelectedIndex = 0;
- this.tabs.Size = new System.Drawing.Size(457, 445);
+ this.tabs.Size = new System.Drawing.Size(511, 445);
this.tabs.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
this.tabs.TabIndex = 1;
//
@@ -446,7 +446,7 @@
this.tabproperties.Location = new System.Drawing.Point(4, 23);
this.tabproperties.Name = "tabproperties";
this.tabproperties.Padding = new System.Windows.Forms.Padding(3);
- this.tabproperties.Size = new System.Drawing.Size(449, 418);
+ this.tabproperties.Size = new System.Drawing.Size(503, 418);
this.tabproperties.TabIndex = 0;
this.tabproperties.Text = "Properties";
this.tabproperties.UseVisualStyleBackColor = true;
@@ -456,7 +456,7 @@
this.groupBox3.Controls.Add(this.flags);
this.groupBox3.Location = new System.Drawing.Point(201, 6);
this.groupBox3.Name = "groupBox3";
- this.groupBox3.Size = new System.Drawing.Size(242, 148);
+ this.groupBox3.Size = new System.Drawing.Size(296, 148);
this.groupBox3.TabIndex = 3;
this.groupBox3.TabStop = false;
this.groupBox3.Text = " Flags: ";
@@ -467,7 +467,7 @@
this.flags.Columns = 1;
this.flags.Location = new System.Drawing.Point(15, 21);
this.flags.Name = "flags";
- this.flags.Size = new System.Drawing.Size(222, 121);
+ this.flags.Size = new System.Drawing.Size(275, 121);
this.flags.TabIndex = 5;
this.flags.VerticalSpacing = 2;
//
@@ -478,7 +478,7 @@
this.tabSurfaces.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabSurfaces.Location = new System.Drawing.Point(4, 23);
this.tabSurfaces.Name = "tabSurfaces";
- this.tabSurfaces.Size = new System.Drawing.Size(449, 418);
+ this.tabSurfaces.Size = new System.Drawing.Size(503, 418);
this.tabSurfaces.TabIndex = 2;
this.tabSurfaces.Text = "Surfaces";
this.tabSurfaces.UseVisualStyleBackColor = true;
@@ -503,7 +503,7 @@
this.groupBox2.Controls.Add(this.floortex);
this.groupBox2.Location = new System.Drawing.Point(3, 212);
this.groupBox2.Name = "groupBox2";
- this.groupBox2.Size = new System.Drawing.Size(443, 203);
+ this.groupBox2.Size = new System.Drawing.Size(497, 203);
this.groupBox2.TabIndex = 55;
this.groupBox2.TabStop = false;
this.groupBox2.Text = " Floor: ";
@@ -511,7 +511,7 @@
// cbUseFloorLineAngles
//
this.cbUseFloorLineAngles.AutoSize = true;
- this.cbUseFloorLineAngles.Location = new System.Drawing.Point(236, 147);
+ this.cbUseFloorLineAngles.Location = new System.Drawing.Point(181, 147);
this.cbUseFloorLineAngles.Name = "cbUseFloorLineAngles";
this.cbUseFloorLineAngles.Size = new System.Drawing.Size(115, 18);
this.cbUseFloorLineAngles.TabIndex = 57;
@@ -522,9 +522,9 @@
//
// floorAngleControl
//
- this.floorAngleControl.Angle = 0;
+ this.floorAngleControl.Angle = -360;
this.floorAngleControl.AngleOffset = 90;
- this.floorAngleControl.Location = new System.Drawing.Point(186, 132);
+ this.floorAngleControl.Location = new System.Drawing.Point(6, 132);
this.floorAngleControl.Name = "floorAngleControl";
this.floorAngleControl.Size = new System.Drawing.Size(44, 44);
this.floorAngleControl.TabIndex = 56;
@@ -532,7 +532,7 @@
//
// label7
//
- this.label7.Location = new System.Drawing.Point(29, 88);
+ this.label7.Location = new System.Drawing.Point(24, 88);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(80, 14);
this.label7.TabIndex = 54;
@@ -542,7 +542,7 @@
//
// label10
//
- this.label10.Location = new System.Drawing.Point(29, 178);
+ this.label10.Location = new System.Drawing.Point(24, 178);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(80, 14);
this.label10.TabIndex = 52;
@@ -558,7 +558,7 @@
this.floorAlpha.ButtonStep = 1;
this.floorAlpha.ButtonStepFloat = 0.1F;
this.floorAlpha.ButtonStepsWrapAround = false;
- this.floorAlpha.Location = new System.Drawing.Point(118, 173);
+ this.floorAlpha.Location = new System.Drawing.Point(113, 173);
this.floorAlpha.Name = "floorAlpha";
this.floorAlpha.Size = new System.Drawing.Size(62, 24);
this.floorAlpha.StepValues = null;
@@ -567,7 +567,7 @@
//
// label11
//
- this.label11.Location = new System.Drawing.Point(29, 148);
+ this.label11.Location = new System.Drawing.Point(24, 148);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(80, 14);
this.label11.TabIndex = 50;
@@ -583,7 +583,7 @@
this.floorRotation.ButtonStep = 5;
this.floorRotation.ButtonStepFloat = 1F;
this.floorRotation.ButtonStepsWrapAround = false;
- this.floorRotation.Location = new System.Drawing.Point(118, 143);
+ this.floorRotation.Location = new System.Drawing.Point(113, 143);
this.floorRotation.Name = "floorRotation";
this.floorRotation.Size = new System.Drawing.Size(62, 24);
this.floorRotation.StepValues = null;
@@ -594,7 +594,7 @@
// floorLightAbsolute
//
this.floorLightAbsolute.AutoSize = true;
- this.floorLightAbsolute.Location = new System.Drawing.Point(186, 117);
+ this.floorLightAbsolute.Location = new System.Drawing.Point(181, 117);
this.floorLightAbsolute.Name = "floorLightAbsolute";
this.floorLightAbsolute.Size = new System.Drawing.Size(69, 18);
this.floorLightAbsolute.TabIndex = 49;
@@ -604,7 +604,7 @@
//
// label12
//
- this.label12.Location = new System.Drawing.Point(29, 118);
+ this.label12.Location = new System.Drawing.Point(24, 118);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(80, 14);
this.label12.TabIndex = 47;
@@ -620,7 +620,7 @@
this.floorBrightness.ButtonStep = 16;
this.floorBrightness.ButtonStepFloat = 1F;
this.floorBrightness.ButtonStepsWrapAround = false;
- this.floorBrightness.Location = new System.Drawing.Point(118, 113);
+ this.floorBrightness.Location = new System.Drawing.Point(113, 113);
this.floorBrightness.Name = "floorBrightness";
this.floorBrightness.Size = new System.Drawing.Size(62, 24);
this.floorBrightness.StepValues = null;
@@ -632,7 +632,7 @@
//
this.floorRenderStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.floorRenderStyle.FormattingEnabled = true;
- this.floorRenderStyle.Location = new System.Drawing.Point(118, 85);
+ this.floorRenderStyle.Location = new System.Drawing.Point(113, 85);
this.floorRenderStyle.Name = "floorRenderStyle";
this.floorRenderStyle.Size = new System.Drawing.Size(130, 22);
this.floorRenderStyle.TabIndex = 46;
@@ -649,7 +649,7 @@
this.floorScale.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.floorScale.Label = "Texture Scale:";
this.floorScale.LinkValues = false;
- this.floorScale.Location = new System.Drawing.Point(23, 51);
+ this.floorScale.Location = new System.Drawing.Point(18, 51);
this.floorScale.Name = "floorScale";
this.floorScale.Size = new System.Drawing.Size(276, 28);
this.floorScale.TabIndex = 17;
@@ -667,7 +667,7 @@
this.floorOffsets.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.floorOffsets.Label = "Texture Offsets:";
this.floorOffsets.LinkValues = false;
- this.floorOffsets.Location = new System.Drawing.Point(23, 19);
+ this.floorOffsets.Location = new System.Drawing.Point(18, 19);
this.floorOffsets.Name = "floorOffsets";
this.floorOffsets.Size = new System.Drawing.Size(276, 26);
this.floorOffsets.TabIndex = 16;
@@ -675,12 +675,13 @@
//
// floortex
//
- this.floortex.Location = new System.Drawing.Point(305, 19);
+ this.floortex.Location = new System.Drawing.Point(300, 13);
this.floortex.MultipleTextures = false;
this.floortex.Name = "floortex";
- this.floortex.Size = new System.Drawing.Size(132, 105);
+ this.floortex.Size = new System.Drawing.Size(190, 184);
this.floortex.TabIndex = 15;
this.floortex.TextureName = "";
+ this.floortex.UsePreviews = false;
this.floortex.OnValueChanged += new System.EventHandler(this.floortex_OnValueChanged);
//
// groupBox1
@@ -703,7 +704,7 @@
this.groupBox1.Controls.Add(this.ceilingtex);
this.groupBox1.Location = new System.Drawing.Point(3, 3);
this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(443, 203);
+ this.groupBox1.Size = new System.Drawing.Size(497, 203);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = " Ceiling: ";
@@ -711,7 +712,7 @@
// cbUseCeilLineAngles
//
this.cbUseCeilLineAngles.AutoSize = true;
- this.cbUseCeilLineAngles.Location = new System.Drawing.Point(236, 147);
+ this.cbUseCeilLineAngles.Location = new System.Drawing.Point(181, 147);
this.cbUseCeilLineAngles.Name = "cbUseCeilLineAngles";
this.cbUseCeilLineAngles.Size = new System.Drawing.Size(115, 18);
this.cbUseCeilLineAngles.TabIndex = 56;
@@ -722,9 +723,9 @@
//
// ceilAngleControl
//
- this.ceilAngleControl.Angle = 0;
+ this.ceilAngleControl.Angle = -360;
this.ceilAngleControl.AngleOffset = 90;
- this.ceilAngleControl.Location = new System.Drawing.Point(186, 132);
+ this.ceilAngleControl.Location = new System.Drawing.Point(6, 132);
this.ceilAngleControl.Name = "ceilAngleControl";
this.ceilAngleControl.Size = new System.Drawing.Size(44, 44);
this.ceilAngleControl.TabIndex = 55;
@@ -732,7 +733,7 @@
//
// label3
//
- this.label3.Location = new System.Drawing.Point(29, 88);
+ this.label3.Location = new System.Drawing.Point(24, 88);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(80, 14);
this.label3.TabIndex = 54;
@@ -742,7 +743,7 @@
//
// label4
//
- this.label4.Location = new System.Drawing.Point(29, 178);
+ this.label4.Location = new System.Drawing.Point(24, 178);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(80, 14);
this.label4.TabIndex = 52;
@@ -758,7 +759,7 @@
this.ceilAlpha.ButtonStep = 1;
this.ceilAlpha.ButtonStepFloat = 0.1F;
this.ceilAlpha.ButtonStepsWrapAround = false;
- this.ceilAlpha.Location = new System.Drawing.Point(118, 173);
+ this.ceilAlpha.Location = new System.Drawing.Point(113, 173);
this.ceilAlpha.Name = "ceilAlpha";
this.ceilAlpha.Size = new System.Drawing.Size(62, 24);
this.ceilAlpha.StepValues = null;
@@ -767,7 +768,7 @@
//
// label1
//
- this.label1.Location = new System.Drawing.Point(29, 148);
+ this.label1.Location = new System.Drawing.Point(24, 148);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 14);
this.label1.TabIndex = 50;
@@ -783,7 +784,7 @@
this.ceilRotation.ButtonStep = 5;
this.ceilRotation.ButtonStepFloat = 1F;
this.ceilRotation.ButtonStepsWrapAround = false;
- this.ceilRotation.Location = new System.Drawing.Point(118, 143);
+ this.ceilRotation.Location = new System.Drawing.Point(113, 143);
this.ceilRotation.Name = "ceilRotation";
this.ceilRotation.Size = new System.Drawing.Size(62, 24);
this.ceilRotation.StepValues = null;
@@ -794,7 +795,7 @@
// ceilLightAbsolute
//
this.ceilLightAbsolute.AutoSize = true;
- this.ceilLightAbsolute.Location = new System.Drawing.Point(186, 117);
+ this.ceilLightAbsolute.Location = new System.Drawing.Point(181, 117);
this.ceilLightAbsolute.Name = "ceilLightAbsolute";
this.ceilLightAbsolute.Size = new System.Drawing.Size(69, 18);
this.ceilLightAbsolute.TabIndex = 49;
@@ -805,7 +806,7 @@
//
// labelLightFront
//
- this.labelLightFront.Location = new System.Drawing.Point(29, 118);
+ this.labelLightFront.Location = new System.Drawing.Point(24, 118);
this.labelLightFront.Name = "labelLightFront";
this.labelLightFront.Size = new System.Drawing.Size(80, 14);
this.labelLightFront.TabIndex = 47;
@@ -821,7 +822,7 @@
this.ceilBrightness.ButtonStep = 16;
this.ceilBrightness.ButtonStepFloat = 1F;
this.ceilBrightness.ButtonStepsWrapAround = false;
- this.ceilBrightness.Location = new System.Drawing.Point(118, 113);
+ this.ceilBrightness.Location = new System.Drawing.Point(113, 113);
this.ceilBrightness.Name = "ceilBrightness";
this.ceilBrightness.Size = new System.Drawing.Size(62, 24);
this.ceilBrightness.StepValues = null;
@@ -833,7 +834,7 @@
//
this.ceilRenderStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.ceilRenderStyle.FormattingEnabled = true;
- this.ceilRenderStyle.Location = new System.Drawing.Point(118, 85);
+ this.ceilRenderStyle.Location = new System.Drawing.Point(113, 85);
this.ceilRenderStyle.Name = "ceilRenderStyle";
this.ceilRenderStyle.Size = new System.Drawing.Size(130, 22);
this.ceilRenderStyle.TabIndex = 46;
@@ -850,7 +851,7 @@
this.ceilScale.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.ceilScale.Label = "Texture Scale:";
this.ceilScale.LinkValues = false;
- this.ceilScale.Location = new System.Drawing.Point(23, 51);
+ this.ceilScale.Location = new System.Drawing.Point(18, 51);
this.ceilScale.Name = "ceilScale";
this.ceilScale.Size = new System.Drawing.Size(276, 28);
this.ceilScale.TabIndex = 17;
@@ -868,7 +869,7 @@
this.ceilOffsets.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.ceilOffsets.Label = "Texture Offsets:";
this.ceilOffsets.LinkValues = false;
- this.ceilOffsets.Location = new System.Drawing.Point(23, 19);
+ this.ceilOffsets.Location = new System.Drawing.Point(18, 19);
this.ceilOffsets.Name = "ceilOffsets";
this.ceilOffsets.Size = new System.Drawing.Size(276, 26);
this.ceilOffsets.TabIndex = 16;
@@ -876,12 +877,13 @@
//
// ceilingtex
//
- this.ceilingtex.Location = new System.Drawing.Point(305, 19);
+ this.ceilingtex.Location = new System.Drawing.Point(300, 13);
this.ceilingtex.MultipleTextures = false;
this.ceilingtex.Name = "ceilingtex";
- this.ceilingtex.Size = new System.Drawing.Size(132, 105);
+ this.ceilingtex.Size = new System.Drawing.Size(190, 184);
this.ceilingtex.TabIndex = 15;
this.ceilingtex.TextureName = "";
+ this.ceilingtex.UsePreviews = false;
this.ceilingtex.OnValueChanged += new System.EventHandler(this.ceilingtex_OnValueChanged);
//
// tabslopes
@@ -891,7 +893,7 @@
this.tabslopes.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabslopes.Location = new System.Drawing.Point(4, 23);
this.tabslopes.Name = "tabslopes";
- this.tabslopes.Size = new System.Drawing.Size(449, 418);
+ this.tabslopes.Size = new System.Drawing.Size(503, 418);
this.tabslopes.TabIndex = 3;
this.tabslopes.Text = "Slopes";
this.tabslopes.UseVisualStyleBackColor = true;
@@ -901,7 +903,7 @@
this.groupBox5.Controls.Add(this.floorslopecontrol);
this.groupBox5.Location = new System.Drawing.Point(3, 212);
this.groupBox5.Name = "groupBox5";
- this.groupBox5.Size = new System.Drawing.Size(443, 203);
+ this.groupBox5.Size = new System.Drawing.Size(497, 203);
this.groupBox5.TabIndex = 1;
this.groupBox5.TabStop = false;
this.groupBox5.Text = " Floor: ";
@@ -923,7 +925,7 @@
this.groupBox4.Controls.Add(this.ceilingslopecontrol);
this.groupBox4.Location = new System.Drawing.Point(3, 3);
this.groupBox4.Name = "groupBox4";
- this.groupBox4.Size = new System.Drawing.Size(443, 203);
+ this.groupBox4.Size = new System.Drawing.Size(497, 203);
this.groupBox4.TabIndex = 0;
this.groupBox4.TabStop = false;
this.groupBox4.Text = " Ceiling: ";
@@ -947,7 +949,7 @@
this.tabcustom.Location = new System.Drawing.Point(4, 23);
this.tabcustom.Name = "tabcustom";
this.tabcustom.Padding = new System.Windows.Forms.Padding(3);
- this.tabcustom.Size = new System.Drawing.Size(449, 418);
+ this.tabcustom.Size = new System.Drawing.Size(503, 418);
this.tabcustom.TabIndex = 1;
this.tabcustom.Text = "Custom";
this.tabcustom.UseVisualStyleBackColor = true;
@@ -967,7 +969,7 @@
this.fieldslist.Name = "fieldslist";
this.fieldslist.PropertyColumnVisible = true;
this.fieldslist.PropertyColumnWidth = 150;
- this.fieldslist.Size = new System.Drawing.Size(427, 397);
+ this.fieldslist.Size = new System.Drawing.Size(481, 397);
this.fieldslist.TabIndex = 1;
this.fieldslist.TypeColumnVisible = true;
this.fieldslist.TypeColumnWidth = 100;
@@ -977,7 +979,7 @@
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.cancel.Location = new System.Drawing.Point(235, 459);
+ this.cancel.Location = new System.Drawing.Point(289, 459);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(112, 25);
this.cancel.TabIndex = 4;
@@ -988,7 +990,7 @@
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.apply.Location = new System.Drawing.Point(353, 459);
+ this.apply.Location = new System.Drawing.Point(407, 459);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(112, 25);
this.apply.TabIndex = 3;
@@ -1009,7 +1011,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
- this.ClientSize = new System.Drawing.Size(477, 489);
+ this.ClientSize = new System.Drawing.Size(531, 489);
this.Controls.Add(this.cancel);
this.Controls.Add(this.apply);
this.Controls.Add(this.tabs);
@@ -1018,7 +1020,6 @@
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "SectorEditFormUDMF";
- this.Opacity = 0;
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
diff --git a/Source/Core/Windows/SectorEditFormUDMF.resx b/Source/Core/Windows/SectorEditFormUDMF.resx
index 2f82d0ae..ff5055e3 100644
--- a/Source/Core/Windows/SectorEditFormUDMF.resx
+++ b/Source/Core/Windows/SectorEditFormUDMF.resx
@@ -162,4 +162,7 @@
True
+
+ 17, 17
+
\ No newline at end of file
diff --git a/Source/Core/Windows/TextureBrowserForm.cs b/Source/Core/Windows/TextureBrowserForm.cs
index 57ecce12..68de8ef6 100644
--- a/Source/Core/Windows/TextureBrowserForm.cs
+++ b/Source/Core/Windows/TextureBrowserForm.cs
@@ -19,6 +19,7 @@
using System;
using System.Drawing;
using System.Windows.Forms;
+using CodeImp.DoomBuilder.Controls;
using CodeImp.DoomBuilder.IO;
using CodeImp.DoomBuilder.Data;
using CodeImp.DoomBuilder.Config;
@@ -34,11 +35,11 @@ namespace CodeImp.DoomBuilder.Windows
private string selectedname;
private Point lastposition;
private Size lastsize;
- private ListViewGroup usedgroup;
- private ListViewGroup availgroup;
+ private readonly ListViewGroup usedgroup;
+ private readonly ListViewGroup availgroup;
private TreeNode selectedset; //mxd
private string selecttextureonfill;
- private bool browseFlats;
+ private readonly bool browseFlats;
// Properties
public string SelectedName { get { return selectedname; } }
@@ -119,17 +120,22 @@ namespace CodeImp.DoomBuilder.Windows
//mxd. Select the last one that was selected
string selectname = General.Settings.ReadSetting("browserwindow.textureset", "");
TreeNode match;
- if (string.IsNullOrEmpty(selectname)) {
+ if (string.IsNullOrEmpty(selectname))
+ {
match = tvTextureSets.Nodes[tvTextureSets.Nodes.Count - 1];
- } else {
+ }
+ else
+ {
match = findNodeByName(tvTextureSets.Nodes, selectname);
}
- if (match != null) {
+ if (match != null)
+ {
IFilledTextureSet set = (match.Tag as IFilledTextureSet);
-
- foreach (ImageData img in set.Textures) {
- if (img.LongName == longname) {
+ foreach (ImageData img in set.Textures)
+ {
+ if (img.LongName == longname)
+ {
selectedset = match;
break;
}
@@ -137,8 +143,10 @@ namespace CodeImp.DoomBuilder.Windows
}
//mxd. If the selected texture was not found in the last-selected set, try finding it in the other sets
- if (selectedset == null && selecttexture != "-") {
- foreach (TreeNode n in tvTextureSets.Nodes) {
+ if (selectedset == null && selecttexture != "-")
+ {
+ foreach (TreeNode n in tvTextureSets.Nodes)
+ {
selectedset = findTextureByLongName(n, longname);
if (selectedset != null) break;
}
@@ -169,12 +177,15 @@ namespace CodeImp.DoomBuilder.Windows
this.WindowState = (FormWindowState)General.Settings.ReadSetting("browserwindow.windowstate", (int)FormWindowState.Normal);
//mxd
- if (this.WindowState == FormWindowState.Normal) {
+ if (this.WindowState == FormWindowState.Normal)
+ {
Point location = new Point(General.Settings.ReadSetting("browserwindow.positionx", int.MaxValue), General.Settings.ReadSetting("browserwindow.positiony", int.MaxValue));
-
- if (location.X < int.MaxValue && location.Y < int.MaxValue) {
+ if (location.X < int.MaxValue && location.Y < int.MaxValue)
+ {
this.Location = location;
- } else {
+ }
+ else
+ {
this.StartPosition = FormStartPosition.CenterParent;
}
}
@@ -194,7 +205,8 @@ namespace CodeImp.DoomBuilder.Windows
//first search in child nodes
TreeNode match;
- foreach(TreeNode n in node.Nodes) {
+ foreach(TreeNode n in node.Nodes)
+ {
match = findTextureByLongName(n, longname);
if(match != null) return match;
}
@@ -219,7 +231,8 @@ namespace CodeImp.DoomBuilder.Windows
//mxd
private static TreeNode findNodeByName(TreeNodeCollection nodes, string selectname)
{
- foreach (TreeNode n in nodes) {
+ foreach (TreeNode n in nodes)
+ {
if (n.Name == selectname) return n;
TreeNode match = findNodeByName(n.Nodes, selectname);
@@ -232,43 +245,47 @@ namespace CodeImp.DoomBuilder.Windows
private void createNodes(TreeNode root)
{
ResourceTextureSet set = root.Tag as ResourceTextureSet;
- if (set == null) {
+ if (set == null)
+ {
General.ErrorLogger.Add(ErrorType.Error, "Resource " + root.Name + " doesn't have TextureSet!");
return;
}
int imageIndex = set.Location.type + 4;
- string[] separator = new[] { Path.DirectorySeparatorChar.ToString() };
+ char[] separator = new[] { Path.AltDirectorySeparatorChar };
- ImageData[] textures;
+ ImageData[] images;
if (browseFlats)
{
- textures = new ImageData[set.Flats.Count];
- set.Flats.CopyTo(textures, 0);
+ images = new ImageData[set.Flats.Count];
+ set.Flats.CopyTo(images, 0);
}
else
{
- textures = new ImageData[set.Textures.Count];
- set.Textures.CopyTo(textures, 0);
+ images = new ImageData[set.Textures.Count];
+ set.Textures.CopyTo(images, 0);
}
- Array.Sort(textures, sortImageData);
+ Array.Sort(images, sortImageData);
- foreach (ImageData image in textures) {
- string localName = image.FullName.Replace(set.Location.location, "");
- string[] parts = localName.Split(separator, StringSplitOptions.RemoveEmptyEntries);
+ foreach(ImageData image in images)
+ {
+ string[] parts = image.VirtualName.Split(separator, StringSplitOptions.RemoveEmptyEntries);
TreeNode curNode = root;
if (parts.Length == 1) continue;
int localindex = parts[0] == "[TEXTURES]" ? 7 : imageIndex;
- for (int i = 0; i < parts.Length - 1; i++) {
+ for (int i = 0; i < parts.Length - 1; i++)
+ {
string category = parts[i];
//already got such category?
- if (curNode.Nodes.Count > 0 && curNode.Nodes.ContainsKey(category)) {
+ if (curNode.Nodes.Count > 0 && curNode.Nodes.ContainsKey(category))
+ {
curNode = curNode.Nodes[category];
-
- } else { //create a new one
+ }
+ else //create a new one
+ {
TreeNode n = new TreeNode(category) { Name = category, ImageIndex = localindex, SelectedImageIndex = localindex };
curNode.Nodes.Add(n);
@@ -279,9 +296,11 @@ namespace CodeImp.DoomBuilder.Windows
}
//add to current and parent nodes
- if (i == parts.Length - 2) {
+ if (i == parts.Length - 2)
+ {
TreeNode cn = curNode;
- while (cn != root) {
+ while (cn != root)
+ {
ResourceTextureSet curTs = cn.Tag as ResourceTextureSet;
if (image.IsFlat)
curTs.AddFlat(image);
@@ -293,7 +312,8 @@ namespace CodeImp.DoomBuilder.Windows
}
}
- if (root.Nodes.Count == 1 && root.Nodes[0].Nodes.Count > 0) {
+ if (root.Nodes.Count == 1 && root.Nodes[0].Nodes.Count > 0)
+ {
TreeNode[] children = new TreeNode[root.Nodes[0].Nodes.Count];
root.Nodes[0].Nodes.CopyTo(children, 0);
root.Nodes.Clear();
@@ -335,7 +355,8 @@ namespace CodeImp.DoomBuilder.Windows
// Set selected name and close
if(browser.SelectedItem != null)
{
- selectedname = browser.SelectedItem.Text;
+ ImageBrowserItem item = browser.SelectedItem as ImageBrowserItem;
+ selectedname = item.icon.Name;
DialogResult = DialogResult.OK;
}
else
@@ -450,22 +471,25 @@ namespace CodeImp.DoomBuilder.Windows
// Start adding
browser.BeginAdding(false);
- if (browseFlats) {
+ if (browseFlats)
+ {
// Add all available flats
foreach(ImageData img in set.Flats)
- browser.Add(img.Name, img, img, availgroup);
+ browser.Add(img.DisplayName, img, img, availgroup);
// Add all used flats
foreach(ImageData img in set.Flats)
- if(img.UsedInMap) browser.Add(img.Name, img, img, usedgroup);
- }else{
+ if(img.UsedInMap) browser.Add(img.DisplayName, img, img, usedgroup);
+ }
+ else
+ {
// Add all available textures and mark the images for temporary loading
foreach (ImageData img in set.Textures)
- browser.Add(img.Name, img, img, availgroup);
+ browser.Add(img.DisplayName, img, img, availgroup);
// Add all used textures and mark the images for permanent loading
foreach (ImageData img in set.Textures)
- if (img.UsedInMap) browser.Add(img.Name, img, img, usedgroup);
+ if(img.UsedInMap) browser.Add(img.DisplayName, img, img, usedgroup);
}
// Done adding
@@ -496,14 +520,17 @@ namespace CodeImp.DoomBuilder.Windows
}
//mxd
- private void tvTextureSets_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) {
+ private void tvTextureSets_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
+ {
selectedset = e.Node;
FillImagesList();
}
//mxd
- private void tvTextureSets_KeyUp(object sender, KeyEventArgs e) {
- if(tvTextureSets.SelectedNode != selectedset) {
+ private void tvTextureSets_KeyUp(object sender, KeyEventArgs e)
+ {
+ if(tvTextureSets.SelectedNode != selectedset)
+ {
selectedset = tvTextureSets.SelectedNode;
FillImagesList();
}
diff --git a/Source/Core/ZDoom/PatchStructure.cs b/Source/Core/ZDoom/PatchStructure.cs
index 5c9d66b2..3fa6e847 100644
--- a/Source/Core/ZDoom/PatchStructure.cs
+++ b/Source/Core/ZDoom/PatchStructure.cs
@@ -90,6 +90,9 @@ namespace CodeImp.DoomBuilder.ZDoom
return;
}
+ //mxd
+ name = name.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
+
// Now we should find a comma
parser.SkipWhitespace(true);
tokenstr = parser.ReadToken();
diff --git a/Source/Core/ZDoom/TextureStructure.cs b/Source/Core/ZDoom/TextureStructure.cs
index e4369ce3..df2e6f55 100644
--- a/Source/Core/ZDoom/TextureStructure.cs
+++ b/Source/Core/ZDoom/TextureStructure.cs
@@ -70,8 +70,6 @@ namespace CodeImp.DoomBuilder.ZDoom
// Constructor
internal TextureStructure(TexturesParser parser, string typename)
{
- string tokenstr;
-
// Initialize
this.typename = typename;
patches = new List(4);
@@ -92,7 +90,7 @@ namespace CodeImp.DoomBuilder.ZDoom
// Now we should find a comma
parser.SkipWhitespace(true);
- tokenstr = parser.ReadToken();
+ string tokenstr = parser.ReadToken();
if(tokenstr != ",")
{
parser.ReportError("Expected a comma");
@@ -264,7 +262,7 @@ namespace CodeImp.DoomBuilder.ZDoom
if(yscale == 0.0f) scaley = defaultscale; else scaley = 1f / yscale;
// Make texture
- HighResImage tex = new HighResImage(name, typename, width, height, scalex, scaley, worldpanning);
+ HighResImage tex = new HighResImage(name, width, height, scalex, scaley, worldpanning, typename == "flat");
// Add patches
foreach(PatchStructure p in patches)
diff --git a/Source/Core/ZDoom/TexturesParser.cs b/Source/Core/ZDoom/TexturesParser.cs
index 221a55fc..8a369407 100644
--- a/Source/Core/ZDoom/TexturesParser.cs
+++ b/Source/Core/ZDoom/TexturesParser.cs
@@ -19,6 +19,7 @@
using System;
using System.Collections.Generic;
using System.IO;
+using CodeImp.DoomBuilder.Data;
#endregion
@@ -36,9 +37,9 @@ namespace CodeImp.DoomBuilder.ZDoom
#region ================== Variables
- private Dictionary textures;
- private Dictionary flats;
- private Dictionary sprites;
+ private readonly Dictionary textures;
+ private readonly Dictionary flats;
+ private readonly Dictionary sprites;
#endregion
@@ -90,7 +91,7 @@ namespace CodeImp.DoomBuilder.ZDoom
if(this.HasError) break;
// if a limit for the texture name length is set make sure that it's not exceeded
- if((General.Map.Config.MaxTextureNameLength > 0) && (tx.Name.Length > General.Map.Config.MaxTextureNameLength))
+ if(tx.Name.Length > General.Map.Config.MaxTextureNameLength)
{
General.ErrorLogger.Add(ErrorType.Error, "Texture name \"" + tx.Name + "\" too long. Texture names must have a length of " + General.Map.Config.MaxTextureNameLength + " characters or less");
}
@@ -108,9 +109,9 @@ namespace CodeImp.DoomBuilder.ZDoom
if(this.HasError) break;
// if a limit for the sprite name length is set make sure that it's not exceeded
- if((General.Map.Config.MaxTextureNameLength > 0) && (tx.Name.Length > General.Map.Config.MaxTextureNameLength))
+ if(tx.Name.Length > DataManager.CLASIC_IMAGE_NAME_LENGTH)
{
- General.ErrorLogger.Add(ErrorType.Error, "Sprite name \"" + tx.Name + "\" too long. Sprite names must have a length of " + General.Map.Config.MaxTextureNameLength + " characters or less");
+ General.ErrorLogger.Add(ErrorType.Error, "Sprite name \"" + tx.Name + "\" too long. Sprite names must have a length of " + DataManager.CLASIC_IMAGE_NAME_LENGTH + " characters or less");
}
else
{
@@ -125,7 +126,7 @@ namespace CodeImp.DoomBuilder.ZDoom
if(this.HasError) break;
// if a limit for the walltexture name length is set make sure that it's not exceeded
- if((General.Map.Config.MaxTextureNameLength > 0) && (tx.Name.Length > General.Map.Config.MaxTextureNameLength))
+ if(tx.Name.Length > General.Map.Config.MaxTextureNameLength)
{
General.ErrorLogger.Add(ErrorType.Error, "WallTexture name \"" + tx.Name + "\" too long. WallTexture names must have a length of " + General.Map.Config.MaxTextureNameLength + " characters or less");
}
@@ -143,7 +144,7 @@ namespace CodeImp.DoomBuilder.ZDoom
if(this.HasError) break;
// if a limit for the flat name length is set make sure that it's not exceeded
- if((General.Map.Config.MaxTextureNameLength > 0) && (tx.Name.Length > General.Map.Config.MaxTextureNameLength))
+ if(tx.Name.Length > General.Map.Config.MaxTextureNameLength)
{
General.ErrorLogger.Add(ErrorType.Error, "Flat name \"" + tx.Name + "\" too long. Flat names must have a length of " + General.Map.Config.MaxTextureNameLength + " characters or less");
}
diff --git a/Source/Plugins/BuilderModes/FindReplace/FindAnyTextureFlat.cs b/Source/Plugins/BuilderModes/FindReplace/FindAnyTextureFlat.cs
index 8c17907f..49f83d46 100644
--- a/Source/Plugins/BuilderModes/FindReplace/FindAnyTextureFlat.cs
+++ b/Source/Plugins/BuilderModes/FindReplace/FindAnyTextureFlat.cs
@@ -72,7 +72,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
List objs = new List();
// Interpret the replacement
- if(replace && (string.IsNullOrEmpty(replacewith) || replacewith.Length > 8))
+ if(replace && (string.IsNullOrEmpty(replacewith) || replacewith.Length > General.Map.Config.MaxTextureNameLength))
{
MessageBox.Show("Invalid replace value for this search type!", "Find and Replace", MessageBoxButtons.OK, MessageBoxIcon.Error);
return objs.ToArray();
diff --git a/Source/Plugins/BuilderModes/FindReplace/FindSectorFlat.cs b/Source/Plugins/BuilderModes/FindReplace/FindSectorFlat.cs
index fa39cb18..4fd0093e 100644
--- a/Source/Plugins/BuilderModes/FindReplace/FindSectorFlat.cs
+++ b/Source/Plugins/BuilderModes/FindReplace/FindSectorFlat.cs
@@ -65,7 +65,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
List objs = new List();
// Interpret the replacement
- if(replace && (string.IsNullOrEmpty(replacewith) || replacewith.Length > 8))
+ if(replace && (string.IsNullOrEmpty(replacewith) || replacewith.Length > General.Map.Config.MaxTextureNameLength))
{
MessageBox.Show("Invalid replace value for this search type!", "Find and Replace", MessageBoxButtons.OK, MessageBoxIcon.Error);
return objs.ToArray();
diff --git a/Source/Plugins/BuilderModes/FindReplace/FindSidedefTexture.cs b/Source/Plugins/BuilderModes/FindReplace/FindSidedefTexture.cs
index faf1e56f..458779ef 100644
--- a/Source/Plugins/BuilderModes/FindReplace/FindSidedefTexture.cs
+++ b/Source/Plugins/BuilderModes/FindReplace/FindSidedefTexture.cs
@@ -65,7 +65,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
List objs = new List();
// Interpret the replacement
- if(replace && (string.IsNullOrEmpty(replacewith) || replacewith.Length > 8))
+ if(replace && (string.IsNullOrEmpty(replacewith) || replacewith.Length > General.Map.Config.MaxTextureNameLength))
{
MessageBox.Show("Invalid replace value for this search type!", "Find and Replace", MessageBoxButtons.OK, MessageBoxIcon.Error);
return objs.ToArray();
diff --git a/Source/Plugins/BuilderModes/Interface/MenusForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/MenusForm.Designer.cs
index c9bbc999..536c9d2e 100644
--- a/Source/Plugins/BuilderModes/Interface/MenusForm.Designer.cs
+++ b/Source/Plugins/BuilderModes/Interface/MenusForm.Designer.cs
@@ -485,7 +485,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(229, 22);
this.toolStripMenuItem5.Tag = "exporttoobj";
- this.toolStripMenuItem5.Text = "Selection To Wavefront .obj...";
+ this.toolStripMenuItem5.Text = "Selection to Wavefront .obj...";
this.toolStripMenuItem5.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttoncopyproperties