diff --git a/.gitignore b/.gitignore index 863fe651d1ab69d50fb490a968365a01d9027281..002f8559f5c4e36d7222fe1d4c15f4446334b6c0 100644 --- a/.gitignore +++ b/.gitignore @@ -462,3 +462,6 @@ /Build/D3DImm.dll /Build/D3D9.dll /Build/D3D8.dll +/UpgradeLog.htm +/UpgradeLog2.htm +/UpgradeLog3.htm diff --git a/Build/Compilers/ZDoom/acc.exe b/Build/Compilers/ZDoom/acc.exe index a295df1d5995775c500cee526358f6410a266d00..c122f69bd00e657f32d1bbf84e1bd2ee95d0f51b 100644 Binary files a/Build/Compilers/ZDoom/acc.exe and b/Build/Compilers/ZDoom/acc.exe differ diff --git a/Build/Compilers/ZDoom/zdefs.acs b/Build/Compilers/ZDoom/zdefs.acs index e8926ae2674e5543ccc0d940236774fbf1180f3d..10b9b892cc88d62fe974106f94e9a57119573298 100644 --- a/Build/Compilers/ZDoom/zdefs.acs +++ b/Build/Compilers/ZDoom/zdefs.acs @@ -1086,3 +1086,17 @@ #define WARPF_USEPTR 0x2000 #define WARPF_COPYVELOCITY 0x4000 #define WARPF_COPYPITCH 0x8000 + +#define CPXF_ANCESTOR (1 << 0) +#define CPXF_LESSOREQUAL (1 << 1) +#define CPXF_NOZ (1 << 2) +#define CPXF_COUNTDEAD (1 << 3) +#define CPXF_DEADONLY (1 << 4) +#define CPXF_EXACT (1 << 5) +#define CPXF_SETTARGET (1 << 6) +#define CPXF_SETMASTER (1 << 7) +#define CPXF_SETTRACER (1 << 8) +#define CPXF_FARTHEST (1 << 9) +#define CPXF_CLOSEST (1 << 10) +#define CPXF_SETONPTR (1 << 11) +#define CPXF_CHECKSIGHT (1 << 12) diff --git a/Build/Compilers/ZDoom/zspecial.acs b/Build/Compilers/ZDoom/zspecial.acs index e85ca5586c5890693a0010b8157b25acc216bb85..6ac43b5aa5e1c9c58d9bb5e56a92bdff945a3455 100644 --- a/Build/Compilers/ZDoom/zspecial.acs +++ b/Build/Compilers/ZDoom/zspecial.acs @@ -358,12 +358,14 @@ special -88:SetActorRoll(2), -89:ChangeActorRoll(2,3), -90:GetActorRoll(1), - -91:QuakeEx(8,12), + -91:QuakeEx(8,14), -92:Warp(6,11), -93:GetMaxInventory(2), -94:SetSectorDamage(2,5), -95:SetSectorTerrain(3), - -96:SpawnParticle(1,15), + -96:SpawnParticle(1,16), + -97:SetMusicVolume(1), + -98:CheckProximity(3, 6), // Zandronum's -100:ResetMap(0), @@ -393,6 +395,10 @@ special -124:EndDBTransaction(0), -125:GetDBEntries(1), + // -1xx are reserved for Zandronum + -200:CheckClass(1), + -201:DamageActor(6), // [arookas] + // ZDaemon's -19620:GetTeamScore(1), -19621:SetTeamScore(2), diff --git a/Build/Configurations/Eternity_Doom2Doom.cfg b/Build/Configurations/Eternity_Doom2Doom.cfg new file mode 100644 index 0000000000000000000000000000000000000000..ac838ceb811a9f98873b590a2168d85c79349d33 --- /dev/null +++ b/Build/Configurations/Eternity_Doom2Doom.cfg @@ -0,0 +1,61 @@ +/*************************************************************\ + Doom Builder 2 Game Configuration for ZDoom-compatible port +\*************************************************************/ + +// This is required to prevent accidental use of a different configuration +type = "Doom Builder 2 Game Configuration"; + +// This is the title to show for this game +game = "Eternity: Doom 2 (Doom format)"; + +// This is the simplified game engine/sourceport name +engine = "eternity"; + +// ******************************************************* +// * * +// * Note: all the elements that could be factorized * +// * because they were common to ZDoom, GZDoom and * +// * Zandronum have been moved to ZDoom_common.cfg. * +// * * +// ******************************************************* + +// STANDARD DOOM SETTINGS +// Settings common to all games and all map formats +include("Includes\\Doom_common.cfg", "common"); + +// Settings common to Doom map format +include("Includes\\Eternity_common.cfg", "mapformat_doom"); + +// Settings common to Doom games +include("Includes\\Game_Doom.cfg"); + +//mxd. No DECORATE support in Eternity +decorategames = ""; + +// Default thing filters +// (these are not required, just useful for new users) +thingsfilters +{ + include("Includes\\Doom_misc.cfg", "thingsfilters"); +} + +// THING TYPES +// Each engine has its own additional thing types +// Order should always be 1: Game; 2: ZDoom/game; 3: ZDoom/zdoom +thingtypes +{ + // Basic game actors + include("Includes\\Doom_things.cfg"); + include("Includes\\Doom2_things.cfg"); + include("Includes\\Boom_things.cfg"); + include("Includes\\Eternity_things.cfg"); +} + +// ENUMERATIONS +// Each engine has its own additional thing types +// These are enumerated lists for linedef types and UDMF fields. +enums +{ + // Basic game enums + include("Includes\\Doom_misc.cfg", "enums"); +} diff --git a/Build/Configurations/Eternity_DoomUDMF.cfg b/Build/Configurations/Eternity_DoomUDMF.cfg new file mode 100644 index 0000000000000000000000000000000000000000..4f53b6c8871a2acaccfe4867bf9ffaae708644b7 --- /dev/null +++ b/Build/Configurations/Eternity_DoomUDMF.cfg @@ -0,0 +1,57 @@ +/*************************************************************\ + Doom Builder 2 Game Configuration for Eternity on UDMF +\*************************************************************/ + +// This is required to prevent accidental use of a different configuration +type = "Doom Builder 2 Game Configuration"; + +// This is the title to show for this game +game = "Eternity: Doom 2 (UDMF)"; + +// This is the simplified game engine/sourceport name +engine = "eternity"; + +// STANDARD ETERNITY SETTINGS +// Settings common to all games and all map formats +include("Includes\\Eternity_common.cfg", "common"); + +// Settings common to text map format +include("Includes\\Eternity_common.cfg", "mapformat_udmf"); + +// Settings common to Doom games +include("Includes\\Game_Doom.cfg"); + +//mxd. No DECORATE support in Eternity +decorategames = ""; + +// Default thing filters +// (these are not required, just useful for new users) +thingsfilters +{ + include("Includes\\ZDoom_misc.cfg", "thingsfilters_udmf"); +} + +// THING TYPES +// Each engine has its own additional thing types +// Order should always be 1: Game; 2: ZDoom/game; 3: ZDoom/zdoom +thingtypes +{ + // Basic game actors + include("Includes\\Doom_things.cfg"); + include("Includes\\Doom2_things.cfg"); + include("Includes\\Eternity_things.cfg"); +} + +// ENUMERATIONS +// Each engine has its own additional thing types +// These are enumerated lists for linedef types and UDMF fields. +enums +{ + // Basic game enums + include("Includes\\Doom_misc.cfg", "enums"); + // Standard ZDoom enums + include("Includes\\ZDoom_misc.cfg", "enums"); + // Additional ZDoom enums for that game + include("Includes\\ZDoom_misc.cfg", "enums_doom"); + include("Includes\\Eternity_misc.cfg", "enums"); +} diff --git a/Build/Configurations/Hexen_HexenHexen.cfg b/Build/Configurations/Hexen_HexenHexen.cfg index 2de88245321379ed35edd6645b98563e4823e321..574bcd04a2f3b105d4aeb4cedda2f28be9a4adc9 100644 --- a/Build/Configurations/Hexen_HexenHexen.cfg +++ b/Build/Configurations/Hexen_HexenHexen.cfg @@ -32,6 +32,9 @@ include("Includes\\Game_Hexen.cfg"); //mxd. No DECORATE support in vanilla decorategames = ""; +//mxd. Don't do vanilla-style thing rotation angle clamping +doomthingrotationangles = false; + // Default thing filters // (these are not required, just useful for new users) thingsfilters diff --git a/Build/Configurations/Includes/Boom_generalized.cfg b/Build/Configurations/Includes/Boom_generalized.cfg index f2c0f99e63e85cb0b1f2d79bde30bc01d07f4dad..a584e98452a92b9733af37904bba49cd249fb3f2 100644 --- a/Build/Configurations/Includes/Boom_generalized.cfg +++ b/Build/Configurations/Includes/Boom_generalized.cfg @@ -2,18 +2,6 @@ // Generalized sector types gen_sectortypes { - lighting - { - 0 = "Normal"; - 1 = "Light Blinks (randomly)"; - 2 = "Light Blinks (0.5 sec)"; - 3 = "Light Blinks (1 sec)"; - 8 = "Light Glows (1+ sec)"; - 12 = "Light Blinks (0.5 sec sync)"; - 13 = "Light Blinks (1 sec sync)"; - 17 = "Light Flickers (randomly)"; - } - damage { 0 = "None"; diff --git a/Build/Configurations/Includes/Boom_linedefs.cfg b/Build/Configurations/Includes/Boom_linedefs.cfg index d1d25c9ec9e7d00fa6b2a7573511bc0ddb04d586..9889467da1f9979738dcc13d6bd67c56bb2934c3 100644 --- a/Build/Configurations/Includes/Boom_linedefs.cfg +++ b/Build/Configurations/Includes/Boom_linedefs.cfg @@ -107,7 +107,8 @@ floor 213 { - title = "Floor Change Brightness to this Brightness"; + title = "Change Floor Brightness to this Brightness"; + id = "Boom_Transfer_FloorLight"; prefix = ""; } @@ -641,7 +642,8 @@ ceiling 261 { - title = "Ceiling Brightness to this Brightness"; + title = "Change Ceiling Brightness to this Brightness"; + id = "Boom_Transfer_CeilingLight"; prefix = ""; } } diff --git a/Build/Configurations/Includes/Doom_common.cfg b/Build/Configurations/Includes/Doom_common.cfg index c8f96fe5485973e16a4055aa2f9169685bc753e1..5ced9a42bf230da6f8d2fa9b68bfd300964361db 100644 --- a/Build/Configurations/Includes/Doom_common.cfg +++ b/Build/Configurations/Includes/Doom_common.cfg @@ -17,6 +17,9 @@ common defaultflatscale = 1.0f; scaledtextureoffsets = true; + //mxd. Do vanilla-style thing rotation angle clamping + doomthingrotationangles = true; + // Texture sources textures { diff --git a/Build/Configurations/Includes/Doom_sectors.cfg b/Build/Configurations/Includes/Doom_sectors.cfg index c8b96dd1353548f3c2ec0f144208126611d72dc2..77e99eed08824310447b861805aee6c8ca9af13d 100644 --- a/Build/Configurations/Includes/Doom_sectors.cfg +++ b/Build/Configurations/Includes/Doom_sectors.cfg @@ -1,17 +1,17 @@ 0 = "None"; 1 = "Light Blinks (randomly)"; -2 = "Light Blinks (2 Hz)"; -3 = "Light Blinks (1 Hz)"; -4 = "Damage -10 or 20% health and Light Blinks (2 Hz)"; +2 = "Light Blinks (0.5 sec.)"; +3 = "Light Blinks (1 sec.)"; +4 = "Damage -10 or 20% health and Light Blinks (0.5 sec.)"; 5 = "Damage -5 or 10% health"; 7 = "Damage -2 or 5% health"; -8 = "Light Glows (1+ sec)"; +8 = "Light Glows (1+ sec.)"; 9 = "Secret"; -10 = "Door Close Stay (after 30 sec)"; +10 = "Door Close Stay (after 30 sec.)"; 11 = "Damage -10 or 20% health and End level"; -12 = "Light Blinks (1 Hz synchronized)"; -13 = "Light Blinks (2 Hz synchronized)"; -14 = "Door Open Close (opens after 5 min)"; +12 = "Light Blinks (0.5 sec. synchronized)"; +13 = "Light Blinks (1 sec. synchronized)"; +14 = "Door Open Close (opens after 5 min.)"; 16 = "Damage -10 or 20% health"; 17 = "Light Flickers (randomly)"; diff --git a/Build/Configurations/Includes/Eternity_common.cfg b/Build/Configurations/Includes/Eternity_common.cfg new file mode 100644 index 0000000000000000000000000000000000000000..1050c36f383c18cba660dda0bcbe1155adf0aecd --- /dev/null +++ b/Build/Configurations/Includes/Eternity_common.cfg @@ -0,0 +1,358 @@ +// *********************************************************** +// * * +// * These values are mainly for UDMF Eternity * +// * * +// *********************************************************** + +common +{ + // Some common settings + include("Common.cfg"); + + // Default testing parameters + include("Test_params.cfg", "vanilla_mapxx"); // Eternity doesn't yet have +map + + // Action special help (mxd) + actionspecialhelp = "http://eternity.youfailit.net/wiki/Detailed_parameterized_linedef_specification"; + + // FIXME: this info is not on the wiki, but in things.edf + // Thing class help (mxd) + thingclasshelp = "https://github.com/team-eternity/eternity/blob/master/base/doom/things.edf"; + + // Default nodebuilder configurations + defaultsavecompiler = "zdbsp_normal"; + defaulttestcompiler = "zdbsp_fast"; + + // Generalized actions + // generalizedlinedefs is true for Doom format and false for + // the other two, so it's not here. + generalizedsectors = true; + + //mxd. Maximum safe map size check (0 means skip check) + safeboundary = 0; + + // Texture loading options + mixtexturesflats = true; + defaulttexturescale = 1.0f; + defaultflatscale = 1.0f; + scaledtextureoffsets = true; + + //mxd. Sidedefs compression + // ioanch FIXME: what does this do? I made it false + sidedefcompressionignoresaction = false; + + // Texture sources + textures + { + include("Doom_misc.cfg", "textures"); + include("ZDoom_misc.cfg", "textures"); // works for Eternity too + } + + // Patch sources + patches + { + include("Doom_misc.cfg", "patches"); + } + + // Sprite sources + sprites + { + include("Doom_misc.cfg", "sprites"); + } + + // Flat sources + flats + { + include("Doom_misc.cfg", "flats"); + } + + // Colormap sources + colormaps + { + include("Boom_misc.cfg", "colormaps"); + } + + //mxd. Voxel sources + // Not in Eternity +// voxels +// { +// include("ZDoom_misc.cfg", "voxels"); +// } + + // Generalized sector types + gen_sectortypes + { + include("ZDoom_generalized.cfg", "gen_sectortypes"); // same as in ZDOOM + } + + //mxd. Built-in Damage types + // ioanch: From base/things.edf + damagetypes = "Fist Pistol Shotgun Chaingun Plasma BFG BFG_Splash Chainsaw SShotgun BetaBFG BFGBurst Slime Lava Crush Telefrag Falling Suicide Barrel Splash Quake Rocket R_Splash BFG11k_Splash Grenade Hit PlayerMisc Fire"; +} + +mapformat_doom +{ + mixtexturesflats = true; + // The format interface handles the map data format + formatinterface = "DoomMapSetIO"; + + maplumpnames + { + include("Doom_misc.cfg", "doommaplumpnames"); + include("Boom_misc.cfg", "boommaplumpnames"); + } + + // When this is set to true, sectors with the same tag will light up when a line is highlighted + linetagindicatesectors = true; + + // Special linedefs + include("ZDoom_misc.cfg", "speciallinedefs_doomhexen"); + + // Default flags for first new thing + defaultthingflags + { + include("Doom_misc.cfg", "defaultthingflags"); + } + + // Door making + include("ZDoom_misc.cfg", "doormaking_doom"); + + // Generalized actions + generalizedlinedefs = true; + generalizedsectors = true; + + // GENERALIZED LINEDEF TYPES + gen_linedeftypes + { + include("Boom_generalized.cfg", "gen_linedeftypes"); + } + + // GENERALIZED SECTOR TYPES + gen_sectortypes + { + include("Boom_generalized.cfg", "gen_sectortypes"); + include("Eternity_generalized.cfg", "gen_sectortypes"); + } + + // DEFAULT SECTOR BRIGHTNESS LEVELS + sectorbrightness + { + include("Doom_misc.cfg", "sectorbrightness"); + } + + // SECTOR TYPES + sectortypes + { + include("Doom_sectors.cfg"); + } + + // LINEDEF FLAGS + linedefflags + { + include("Doom_misc.cfg", "linedefflags"); + include("Boom_misc.cfg", "linedefflags"); + include("Eternity_misc.cfg", "linedefflags"); + } + + // LINEDEF ACTIVATIONS + linedefactivations + { + } + + // Linedef flags UDMF translation table + // This is needed for copy/paste and prefabs to work properly + // When the UDMF field name is prefixed with ! it is inverted + linedefflagstranslation + { + include("Doom_misc.cfg", "linedefflagstranslation"); + include("Boom_misc.cfg", "linedefflagstranslation"); + } + + // LINEDEF TYPES + linedeftypes + { + include("Doom_linedefs.cfg"); + include("Boom_linedefs.cfg"); + include("Eternity_linedefs.cfg", "doom"); + } + + // THING FLAGS + thingflags + { + include("Doom_misc.cfg", "thingflags"); + include("Boom_misc.cfg", "thingflags"); + include("Eternity_misc.cfg", "thingflags"); + } + + // Thing flags UDMF translation table + // This is needed for copy/paste and prefabs to work properly + // When the UDMF field name is prefixed with ! it is inverted + thingflagstranslation + { + include("Doom_misc.cfg", "thingflagstranslation"); + include("Boom_misc.cfg", "thingflagstranslation"); + } + // How to compare thing flags (for the stuck things error checker) + thingflagscompare + { + include("Boom_misc.cfg", "thingflagscompare"); + } + + // Things flags masks + include("Doom_misc.cfg", "thingflagsmasks"); + +} +// *********************************************************** +// * * +// * Text map format * +// * * +// *********************************************************** + +mapformat_udmf +{ + // The format interface handles the map data format + formatinterface = "UniversalMapSetIO"; + + //mxd. The default script compiler to use + defaultscriptcompiler = "zdoom_acs.cfg"; + + // Enables support for long (> 8 chars) texture names + // 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"; + defaulttestcompiler = "zdbsp_udmf_fast"; + + // ioanch: eternity + engine = "eternity"; // override that so that DB2 uses the correct namespace + + maplumpnames + { + include("UDMF_misc.cfg", "udmfmaplumpnames_begin"); + include("ZDoom_misc.cfg", "udmfmaplumpnames"); + include("UDMF_misc.cfg", "udmfmaplumpnames_end"); + } + + // eternity + universalfields + { + include("Eternity_misc.cfg", "universalfields"); + } + + // When this is set to true, sectors with the same tag will light up when a line is highlighted + linetagindicatesectors = false; + + // Special linedefs + include("ZDoom_misc.cfg", "speciallinedefs_udmf"); // same in EE + + // Default flags for first new thing + defaultthingflags + { + include("Eternity_misc.cfg", "defaultthingflags_udmf"); + } + + // Door making + include("Eternity_misc.cfg", "doormaking_udmf"); + + // Generalized actions + generalizedlinedefs = false; + + // SECTOR FLAGS + sectorflags + { + include("Eternity_misc.cfg", "sectorflags_udmf"); + } + + // DEFAULT SECTOR BRIGHTNESS LEVELS + sectorbrightness + { + include("ZDoom_misc.cfg", "sectorbrightness"); + } + + // SECTOR TYPES + sectortypes + { + include("Eternity_misc.cfg", "sectors_udmf"); + } + + // SECTOR RENSERSTYLES + sectorrenderstyles + { + include("UDMF_misc.cfg", "sectorrenderstyles"); + } + + // LINEDEF FLAGS + linedefflags + { + include("Eternity_misc.cfg", "linedefflags_udmf"); + } + + // LINEDEF ACTIVATIONS + linedefactivations + { + include("Eternity_misc.cfg", "linedefactivations_udmf"); + } + + //mxd. Linedef flags UDMF translation table + // This is needed for copy/paste and prefabs to work properly + // When the UDMF field name is prefixed with ! it is inverted + linedefflagstranslation + { + include("Doom_misc.cfg", "linedefflagstranslation"); + include("Hexen_misc.cfg", "linedefflagstranslation"); + include("ZDoom_misc.cfg", "linedefflagstranslation"); + } + + // LINEDEF RENSERSTYLES + linedefrenderstyles + { + include("UDMF_misc.cfg", "linedefrenderstyles"); + } + + //SIDEDEF FLAGS + sidedefflags + { + include("Eternity_misc.cfg", "sidedefflags"); + } + + // THING FLAGS + thingflags + { + include("Eternity_misc.cfg", "thingflags_udmf"); + } + + // THING RENSERSTYLES + thingrenderstyles + { + include("UDMF_misc.cfg", "thingrenderstyles"); + } + + // How to compare thing flags (for the stuck things error checker) + thingflagscompare + { + include("Eternity_misc.cfg", "thingflagscompare_udmf"); + } + + //mxd. Thing flags UDMF translation table + // This is needed for copy/paste and prefabs to work properly + // When the UDMF field name is prefixed with ! it is inverted + thingflagstranslation + { + include("Doom_misc.cfg", "thingflagstranslation"); + include("Hexen_misc.cfg", "thingflagstranslation"); + include("ZDoom_misc.cfg", "thingflagstranslation"); + } + + // Things flags masks + include("Hexen_misc.cfg", "thingflagsmasks"); + + // LINEDEF TYPES + linedeftypes + { + include("Hexen_linedefs.cfg"); + include("Eternity_linedefs.cfg", "udmf"); + } + +} \ No newline at end of file diff --git a/Build/Configurations/Includes/Eternity_generalized.cfg b/Build/Configurations/Includes/Eternity_generalized.cfg new file mode 100644 index 0000000000000000000000000000000000000000..667307d42f31b8057c9d530e81c77ae1e14e3474 --- /dev/null +++ b/Build/Configurations/Includes/Eternity_generalized.cfg @@ -0,0 +1,14 @@ +gen_sectortypes +{ + allsounds + { + 0 = "sounds in sector are normal"; + 1024 = "sounds in sector are suppressed"; + } + + movementsounds + { + 0 = "floor/ceiling normal"; + 2048 = "floor/ceiling silent"; + } +} \ No newline at end of file diff --git a/Build/Configurations/Includes/Eternity_linedefs.cfg b/Build/Configurations/Includes/Eternity_linedefs.cfg new file mode 100644 index 0000000000000000000000000000000000000000..e5a43540749271f04e88c16ddfeed1f4083551e4 --- /dev/null +++ b/Build/Configurations/Includes/Eternity_linedefs.cfg @@ -0,0 +1,2668 @@ +doom +{ + pillar + { + title = "Pillars"; + 362 + { + title = "Pillar Build"; + prefix = "--"; + } + 363 + { + title = "Pillar Build and Crush"; + prefix = "--"; + } + 364 + { + title = "Pillar Open"; + prefix = "--"; + } + } + polyobject + { + title = "Polyobjects"; + 348 + { + title = "Polyobject Start Line"; + prefix = "--"; + } + 349 + { + title = "Polyobject Explicit Line"; + prefix = "--"; + } + 350 + { + title = "Polyobject door slide"; + prefix = "--"; + } + 351 + { + title = "Polyobject door swing"; + prefix = "--"; + } + 352 + { + title = "Polyobject move"; + prefix = "--"; + } + 353 + { + title = "Polyobject override move"; + prefix = "--"; + } + 354 + { + title = "Polyobject rotate right"; + prefix = "--"; + } + 355 + { + title = "Polyobject override rotate right"; + prefix = "--"; + } + 356 + { + title = "Polyobject rotate left"; + prefix = "--"; + } + 357 + { + title = "Polyobject override rotate left"; + prefix = "--"; + } + } + thing + { + title = "Things"; + 398 + { + title = "Thing spawn"; + prefix = "--"; + } + 399 + { + title = "Thing spawn no fog"; + prefix = "--"; + } + 402 + { + title = "Thing projectile"; + prefix = "--"; + } + 403 + { + title = "Thing projectile gravity"; + prefix = "--"; + } + 404 + { + title = "Thing activate"; + prefix = "--"; + } + 405 + { + title = "Thing deactivate"; + prefix = "--"; + } + 421 + { + title = "Thing change TID"; + prefix = "--"; + } + } + transfer + { + title = "Transfer"; + 281 + { + prefix = "--"; + title = "Transfer floor to 3dmidtex"; + } + 282 + { + prefix = "--"; + title = "Transfer ceiling to 3dmidtex"; + } + } + hereticwind + { + title = "Heretic wind"; + 293 + { + prefix = "--"; + title = "Heretic wind by line vector"; + } + 294 + { + prefix = "--"; + title = "Heretic current by line vector"; + } + } + portal + { + title = "Portal"; + 283 + { + prefix = "--"; + title = "Portal plane ceilings"; + } + 284 + { + prefix = "--"; + title = "Portal plane floors"; + } + 285 + { + prefix = "--"; + title = "Portal plane floors/ceilings"; + } + 286 + { + prefix = "--"; + title = "Portal horizon ceilings"; + } + 287 + { + prefix = "--"; + title = "Portal horizon floors"; + } + 288 + { + prefix = "--"; + title = "Portal horizon floors/ceilings"; + } + 290 + { + prefix = "--"; + title = "Portal skybox ceilings"; + } + 291 + { + prefix = "--"; + title = "Portal skybox floors"; + } + 292 + { + prefix = "--"; + title = "Portal skybox floors/ceilings"; + } + 295 + { + prefix = "--"; + title = "Portal anchored ceilings"; + } + 296 + { + prefix = "--"; + title = "Portal anchored floors"; + } + 297 + { + prefix = "--"; + title = "Portal anchored floors/ceilings"; + } + 298 + { + prefix = "--"; + title = "Portal anchor for 295 and 297"; + } + 299 + { + prefix = "--"; + title = "Portal anchor for 296"; + } + 344 + { + prefix = "--"; + title = "Portal two-way anchored ceilings"; + } + 345 + { + prefix = "--"; + title = "Portal two-way anchored floors"; + } + 346 + { + prefix = "--"; + title = "Portal anchor for 344"; + } + 347 + { + prefix = "--"; + title = "Portal anchor for 345"; + } + 289 + { + prefix = "--"; + title = "Portal transfer"; + } + 358 + { + prefix = "--"; + title = "Portal linked ceilings"; + } + 359 + { + prefix = "--"; + title = "Portal linked floors"; + } + 360 + { + prefix = "--"; + title = "Portal linked anchor for 358"; + } + 361 + { + prefix = "--"; + title = "Portal linked anchor for 359"; + } + 376 + { + prefix = "--"; + title = "Portal linked apply to lines"; + } + 377 + { + prefix = "--"; + title = "Portal linked anchor for 376"; + } + 385 + { + prefix = "--"; + title = "Portal linked apply front sector"; + } + } + + slopes + { + title = "Slopes"; + 386 + { + prefix = "--"; + title = "Slope front sector to floor"; + } + 387 + { + prefix = "--"; + title = "Slope front sector to ceiling"; + } + 388 + { + prefix = "--"; + title = "Slope front sector to floor/ceiling"; + } + 389 + { + prefix = "--"; + title = "Slope back sector to floor"; + } + 390 + { + prefix = "--"; + title = "Slope back sector to ceiling"; + } + 391 + { + prefix = "--"; + title = "Slope back sector to floor/ceiling"; + } + 392 + { + prefix = "--"; + title = "Slope back floor and front ceiling"; + } + 393 + { + prefix = "--"; + title = "Slope back ceiling and front floor"; + } + 394 + { + prefix = "--"; + title = "Slope front floor to tagged slope"; + } + 395 + { + prefix = "--"; + title = "Slope front ceiling to tagged slope"; + } + 396 + { + prefix = "--"; + title = "Slope front floor/ceiling to tagged slope"; + } + } + surfaces + { + title = "Attached surfaces"; + 379 + { + prefix = "--"; + title = "Attach set ceiling control"; + } + 380 + { + prefix = "--"; + title = "Attach set floor control"; + } + 381 + { + prefix = "--"; + title = "Attach floor to control"; + } + 382 + { + prefix = "--"; + title = "Attach ceiling to control"; + } + 383 + { + prefix = "--"; + title = "Attach mirror floor to control"; + } + 384 + { + prefix = "--"; + title = "Attach mirror ceiling to control"; + } + } + + exit + { + title = "Exit"; + 400 + { + prefix = "--"; + title = "Teleport end game"; + } + } + + scripts + { + title = "Scripts"; + 280 + { + prefix = "WR"; + title = "Script start"; + } + 273 + { + prefix = "WR"; + title = "Script start 1-way"; + } + 274 + { + prefix = "W1"; + title = "Script start"; + } + 275 + { + prefix = "W1"; + title = "Script start 1-way"; + } + 276 + { + prefix = "SR"; + title = "Script start"; + } + 277 + { + prefix = "S1"; + title = "Script start"; + } + 278 + { + prefix = "GR"; + title = "Script start"; + } + 279 + { + prefix = "G1"; + title = "Script start"; + } + 365 + { + prefix = "--"; + title = "Script execute param"; + } + 366 + { + prefix = "--"; + title = "Script suspend param"; + } + 367 + { + prefix = "--"; + title = "Script terminate param"; + } + } + extradata + { + title = "ExtraData"; + 270 + { + prefix = "--"; + title = "ExtraData linedef"; + } + } +} + +udmf +{ + polyobj + { + title = "Polyobjects"; + + 87 + { + title = "Polyobject Stop"; + id = "Polyobj_Stop"; + arg0 + { + title = "Polyobject Number"; + type = 25; + } + } + } + + line + { + title = "Line"; + + 9 + { + title = "Line Horizon"; + id = "Line_Horizon"; + requiresactivation = false; + } + + } + + door + { + + 249 + { + title = "Door Close Wait Open"; + id = "Door_CloseWaitOpen"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "flat_speeds"; + default = 16; + } + arg2 + { + title = "Delay"; + type = 11; + enum = "generic_door_delays"; + default = 34; + } + arg3 + { + title = "Light Tag"; + type = 13; + } + } + } + + floor + { + 37 + { + title = "Floor Move to Value"; + id = "Floor_MoveToValue"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Target Height"; + } + arg3 + { + title = "Change"; + type = 11; + enum = "change"; + } + arg4 + { + title = "Crush Damage"; + } + } + + 138 + { + title = "Floor Waggle"; + id = "Floor_Waggle"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Amplitude"; + } + arg2 + { + title = "Frequency"; + } + arg3 + { + title = "Phase Offset (0-63)"; + } + arg4 + { + title = "Duration"; + type = 11; + enum = "delay_seconds"; + default = 5; + } + } + + 200 + { + title = "Floor Generic Change"; + id = "Generic_Floor"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Movement Amount"; + } + arg3 + { + title = "Target"; + type = 11; + enum + { + 0 = "Move by Movement Amount"; + 1 = "Highest neighboring floor"; + 2 = "Lowest neighboring floor"; + 3 = "Nearest neighboring floor"; + 4 = "Lowest neighboring ceiling"; + 5 = "Sector ceiling"; + 6 = "Move by the height of sector's shortest lower texture"; + } + } + arg4 + { + title = "Flags"; + type = 26; + enum + { + 0 = "Don't copy anything"; + 1 = "Copy floor texture, remove sector special"; + 2 = "Copy floor texture"; + 3 = "Copy floor texture and special"; + } + flags + { + 4 = "Use numeric model if set, trigger model if not"; + 8 = "Raise floor if set, lower it if not"; + 16 = "Inflict crushing damage"; + } + } + } + + 235 + { + title = "Transfer Floor Texture and Special form Back Side"; + id = "Floor_TransferTrigger"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + } + 236 + { + title = "Transfer Floor Texture and Special using Numeric Change Model"; + id = "Floor_TransferNumeric"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + } + 238 + { + title = "Floor Raise to Lowest Ceiling"; + id = "Floor_RaiseToLowestCeiling"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Change"; + type = 11; + enum = "change"; + } + arg3 + { + title = "Crushing Damage"; + } + arg4 + { + title = "Gap to ceiling"; + } + } + + 240 + { + title = "Floor Raise by Texture"; + id = "Floor_RaiseByTexture"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Change"; + type = 11; + enum = "change"; + } + } + + 242 + { + title = "Floor Lower to Highest Floor (ZDoom)"; + id = "Floor_LowerToHighest"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Adjust Target Height"; + } + arg3 + { + title = "Force Adjust"; + type = 11; + enum = "noyes"; + } + } + + 256 + { + title = "Floor Lower to Highest Floor"; + id = "Floor_LowerToHighestEE"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Change"; + type = 11; + enum = "change"; + } + } + + 250 + { + title = "Floor Donut"; + id = "Floor_Donut"; + + arg0 + { + title = "Center Sector Tag"; + type = 13; + } + arg1 + { + title = "Pillar Lower Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Stairs Raise Speed"; + type = 11; + enum = "stair_speeds"; + default = 4; + } + } + + 251 + { + title = "Floor and Ceiling Lower and Raise"; + id = "FloorAndCeiling_LowerRaise"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Floor Lowering Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Ceiling Raising Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg3 + { + title = "Emulate Boom Bug"; + type = 11; + enum + { + 0 = "No"; + 1998 = "Yes"; + } + } + } + } + + stairs + { + + + 217 + { + title = "Stairs Build up (Doom mode)"; + id = "Stairs_BuildUpDoom"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "stair_speeds"; + default = 4; + } + arg2 + { + title = "Step Height"; + } + arg3 + { + title = "Build Step Delay"; + type = 11; + enum = "delay_tics"; + default = 35; + } + arg4 + { + title = "Reset Delay"; + type = 11; + enum = "reset_tics"; + } + } + } + + + pillar + { + 94 // Pillar_BuildAndCrush + { + arg3 + { + title = "Crush Damage"; + default = 100; + } + arg4 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + } + } + + ceiling + { + title = "Ceiling"; + + 42 // Ceiling Crusher Start + { + arg3 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + } + 43 // Ceiling Crush Once + { + arg3 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + + } + + 97 + { + title = "Ceiling Lower And Crush Dist"; + id = "Ceiling_LowerAndCrushDist"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + + } + + arg2 + { + title = "Crush Damage"; + default = 100; + } + + arg3 + { + title = "Lip"; + } + + arg4 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + } + + 104 + { + title = "Ceiling Crush And Raise Dist"; + id = "Ceiling_CrushAndRaiseSilentDist"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + + arg1 + { + title = "Lip"; + } + + arg2 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + + arg3 + { + title = "Crush Damage"; + default = 100; + } + + arg4 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + } + + 45 // Ceiling Crush Once and Open + { + arg3 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + + } + 47 + { + title = "Ceiling Move to Value"; + id = "Ceiling_MoveToValue"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Target Height"; + } + arg3 + { + title = "Change"; + type = 11; + enum = "change"; + } + } + + 192 + { + title = "Ceiling Lower to Highest Floor"; + id = "Ceiling_LowerToHighestFloor"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Change"; + type = 11; + enum = "change"; + } + arg3 + { + title = "Crushing Damage"; + } + arg4 + { + title = "Gap to Floor"; + } + } + 193 + { + title = "Ceiling Lower Instantly by Value * 8"; + id = "Ceiling_LowerInstant"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg2 + { + title = "Lower by (* 8)"; + } + } + 194 + { + title = "Ceiling Raise Instantly by Value * 8"; + id = "Ceiling_RaiseInstant"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg2 + { + title = "Raise by (* 8)"; + } + } + 195 + { + title = "Ceiling Crush Once and Open A"; + id = "Ceiling_CrushRaiseAndStayA"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Lower Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Raise Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg3 + { + title = "Crush Damage"; + default = 100; + } + arg4 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + + } + 196 + { + title = "Ceiling Crush Start A"; + id = "Ceiling_CrushAndRaiseA"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Lower Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Raise Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg3 + { + title = "Crush Damage"; + default = 100; + } + arg4 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + + } + 197 + { + title = "Ceiling Crush Start A (silent)"; + id = "Ceiling_CrushAndRaiseSilentA"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Lower Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Raise Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg3 + { + title = "Crush Damage"; + default = 100; + } + arg4 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + + } + 198 + { + title = "Ceiling Raise by Value * 8"; + id = "Ceiling_RaiseByValueTimes8"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Raise by (* 8)"; + } + } + 199 + { + title = "Ceiling Lower by Value * 8"; + id = "Ceiling_LowerByValueTimes8"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Lower by (* 8)"; + } + } + + 201 + { + title = "Ceiling Generic Change"; + id = "Generic_Ceiling"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Movement Amount"; + } + arg3 + { + title = "Target"; + type = 11; + enum + { + 0 = "Move by Movement Amount"; + 1 = "Highest neighboring ceiling"; + 2 = "Lowest neighboring ceiling"; + 3 = "Nearest neighboring ceiling"; + 4 = "Highest neighboring floor"; + 5 = "Sector floor"; + 6 = "Move by the height of sector's shortest upper texture"; + } + } + arg4 + { + title = "Flags"; + type = 26; + enum + { + 0 = "Don't copy anything"; + 1 = "Copy ceiling texture, remove sector special"; + 2 = "Copy ceiling texture"; + 3 = "Copy ceiling texture and special"; + } + flags + { + 4 = "Use numeric model if set, trigger model if not"; + 8 = "Raise ceiling if set, lower it if not"; + 16 = "Inflict crushing damage"; + } + } + } + 205 + { + title = "Ceiling Generic Crush (Doom mode)"; + id = "Generic_Crusher"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Lowering Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Raising Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg3 + { + title = "Silent"; + type = 11; + enum = "noyes"; + } + arg4 + { + title = "Crush Damage"; + default = 100; + } + } + 252 + { + title = "Ceiling Raise to Nearest Ceiling"; + id = "Ceiling_RaiseToNearest"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Change"; + type = 11; + enum = "change"; + } + } + 253 + { + title = "Ceiling Lower to Lowest Ceiling"; + id = "Ceiling_LowerToLowest"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Change"; + type = 11; + enum = "change"; + } + arg3 + { + title = "Crushing damage"; + } + } + 254 + { + title = "Ceiling Lower to Floor"; + id = "Ceiling_LowerToFloor"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Change"; + type = 11; + enum = "change"; + } + arg3 + { + title = "Crushing Damage"; + } + arg4 + { + title = "Gap to Floor"; + } + } + 255 + { + title = "Ceiling Crush Once and Open A (silent)"; + id = "Ceiling_CrushRaiseAndStaySilA"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Lowering Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Raising Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg3 + { + title = "Crush Damage"; + default = 100; + } + arg4 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + } + } + + transfer + { + title = "Transfer"; + + 209 + { + title = "Transfer Heights"; + id = "Transfer_Heights"; + requiresactivation = false; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + } + + 210 + { + title = "Transfer Floor Brightness"; + id = "Transfer_FloorLight"; + requiresactivation = false; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + } + 211 + { + title = "Transfer Ceiling Brightness"; + id = "Transfer_CeilingLight"; + requiresactivation = false; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + } + } + + platform + { + 206 + { + title = "Platform Lower Wait Raise (lip)"; + id = "Plat_DownWaitUpStayLip"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Reverse Delay (tics)"; + type = 11; + enum = "delay_tics"; + default = 35; + } + arg3 + { + title = "Lip Amount"; + } + } + 207 + { + title = "Platform Perpetual Move (lip)"; + id = "Plat_PerpetualRaiseLip"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Reverse Delay (tics)"; + type = 11; + enum = "delay_tics"; + default = 35; + } + arg3 + { + title = "Lip Amount"; + } + } + 228 + { + title = "Platform Raise Tx0"; + id = "Plat_RaiseAndStayTx0"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Lockout Mode"; + type = 11; + enum + { + 0 = "Lockout in Heretic only"; + 1 = "Don't lockout"; + 2 = "Lockout in all games"; + } + } + } + 230 + { + title = "Platform Raise by Value Tx (* 8)"; + id = "Plat_UpByValueStayTx"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Raise by (* 8)"; + } + } + 231 + { + title = "Platform Toggle Ceiling"; + id = "Plat_ToggleCeiling"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + } + } + + teleport + { + title = "Teleport"; + + 71 // Teleport_NoFog + { + arg1 + { + title = "Teleport Dest. angle usage"; + type = 11; + enum + { + 0 = "Don't change angle and velocity (Hexen-compat)"; + 1 = "Always use the teleport exit's angle (Strife-compat)"; + 2 = "Adjust relatively to the teleport exit's angle, but in the wrong direction (Boom-compat)"; + 3 = "Adjust relatively to the teleport exit's angle (Boom-fixed)"; + } + } + arg3 + { + title = "Keep rel. Height"; + type = 11; + enum = "noyes"; + } + } + 74 // Teleport_NewMap + { + arg2 + { + title = "Keep Orientation"; + type = 11; + enum = "noyes"; + } + } + 215 + { + title = "Teleport to Line"; + id = "Teleport_Line"; + + arg1 + { + title = "Target Line Tag"; + type = 15; + } + arg2 + { + title = "Reverse Angle"; + type = 11; + enum = "noyes"; + } + } + } + + thing + { + 17 + { + title = "Thing Raise"; + id = "Thing_Raise"; + + arg0 + { + title = "Thing Tag"; + type = 14; + } + } + 19 + { + title = "Thing Stop"; + id = "Thing_Stop"; + + arg0 + { + title = "Thing Tag"; + type = 14; + } + } + 72 // ThrustThing + { + arg2 + { + title = "No Limit"; + type = 11; + enum = "noyes"; + } + arg3 + { + title = "Target Thing Tag"; + type = 14; + } + } + 73 // DamageThing + { + arg1 + { + title = "Death"; + type = 11; + enum = "death_types"; + } + } + 119 + { + title = "Damage Thing by Tag"; + id = "Thing_Damage"; + + arg0 + { + title = "Thing Tag"; + type = 14; + } + arg1 + { + title = "Damage"; + default = 100; + } + arg2 + { + title = "Death"; + type = 11; + enum = "death_types"; + } + } + 128 + { + title = "Thing Thrust Z"; + id = "ThrustThingZ"; + + arg0 + { + title = "Thing Tag"; + type = 14; + } + arg1 + { + title = "Force"; + } + arg2 + { + title = "Down/Up"; + type = 11; + enum = "updown"; + } + arg3 + { + title = "Set/Add"; + type = 11; + enum = "setadd"; + } + } + 135 // Thing_Spawn + { + arg3 + { + title = "New Thing Tag"; + type = 14; + } + } + 137 // Thing_SpawnNoFog + { + arg3 + { + title = "New Thing Tag"; + type = 14; + } + } + 176 + { + title = "Change Thing Tag"; + id = "Thing_ChangeTID"; + + arg0 + { + title = "Old Thing Tag"; + type = 14; + } + arg1 + { + title = "New Thing Tag"; + type = 14; + } + } + 248 + { + title = "Heal Thing"; + id = "HealThing"; + + arg0 + { + title = "Heal Amount"; + } + arg1 + { + title = "Max health"; + } + } + + } + + script + { + title = "Script"; + + 83 // Script Locked Execute + { + arg4 // Key Number + { + type = 11; + enum = "keys"; + } + } + 84 + { + title = "Script Execute with Result"; + id = "ACS_ExecuteWithResult"; + + arg0 + { + title = "Script Number"; + } + arg1 + { + title = "Script Argument 1"; + } + arg2 + { + title = "Script Argument 2"; + } + arg3 + { + title = "Script Argument 3"; + } + arg4 + { + title = "Script Argument 4"; + } + } + 226 + { + title = "Script Execute Always"; + id = "ACS_ExecuteAlways"; + + arg0 + { + title = "Script Number"; + } + + arg1 + { + title = "Map Number"; + } + + arg2 + { + title = "Script Argument 1"; + } + + arg3 + { + title = "Script Argument 2"; + } + + arg4 + { + title = "Script Argument 3"; + } + } + } + + end + { + 243 + { + title = "End Normal"; + id = "Exit_Normal"; + + arg0 + { + title = "Position"; + } + } + 244 + { + title = "End Secret"; + id = "Exit_Secret"; + + arg0 + { + title = "Position"; + } + } + } + + scroll + { + title = "Scroll"; + + 100 //Scroll_Texture_Left + { + arg1 + { + title = "Sidedef Part"; + type = 12; + enum = "sidedef_part"; + } + } + + 101 //Scroll_Texture_Right + { + arg1 + { + title = "Sidedef Part"; + type = 12; + enum = "sidedef_part"; + } + } + + 102 //Scroll_Texture_Up + { + arg1 + { + title = "Sidedef Part"; + type = 12; + enum = "sidedef_part"; + } + } + + 103 //Scroll_Texture_Down + { + arg1 + { + title = "Sidedef Part"; + type = 12; + enum = "sidedef_part"; + } + } + + 222 + { + title = "Scroll Texture Model"; + id = "Scroll_Texture_Model"; + requiresactivation = false; + + arg1 + { + title = "Options"; + type = 12; + enum + { + 1 = "Displacement"; + 2 = "Accelerative"; + } + } + } + + 223 + { + title = "Scroll Floor"; + id = "Scroll_Floor"; + requiresactivation = false; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Options"; + type = 12; + enum + { + 1 = "Displacement"; + 2 = "Accelerative"; + 4 = "Scroll by linedef dx/dy"; + } + } + arg2 + { + title = "Scroll"; + type = 11; + enum + { + 0 = "Texture only"; + 1 = "Things only"; + 2 = "Both"; + } + } + arg3 + { + title = "Horizontal Speed"; + default = 128; + type = 11; + enum = "sector_scroll_speeds_x"; + } + arg4 + { + title = "Vertical Speed"; + default = 128; + type = 11; + enum = "sector_scroll_speeds_y"; + } + } + 224 + { + title = "Scroll Ceiling"; + id = "Scroll_Ceiling"; + requiresactivation = false; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Options"; + type = 12; + enum + { + 1 = "Displacement"; + 2 = "Accelerative"; + 4 = "Scroll by linedef dx/dy"; + } + } + arg3 + { + title = "Horizontal Speed"; + default = 128; + type = 11; + enum = "sector_scroll_speeds_x"; + } + arg4 + { + title = "Vertical Speed"; + default = 128; + type = 11; + enum = "sector_scroll_speeds_y"; + } + } + 225 + { + title = "Scroll Texture by Offsets"; + id = "Scroll_Texture_Offsets"; + requiresactivation = false; + + arg0 + { + title = "Sidedef Part"; + type = 12; + enum = "sidedef_part"; + } + } + } + + + light + { + 232 + { + title = "Light Strobe (Doom mode)"; + id = "Light_StrobeDoom"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Brightest Duration (tics)"; + type = 11; + enum = "delay_tics"; + default = 35; + } + arg2 + { + title = "Darkest Duration (tics)"; + type = 11; + enum = "delay_tics"; + default = 35; + } + } + 233 + { + title = "Light Change to Darkest Neightbour"; + id = "Light_MinNeighbor"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + } + 234 + { + title = "Light Change to Brightest Neightbour"; + id = "Light_MaxNeighbor"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + } + } + + sector + { + title = "Sector"; + + 48 + { + title = "Sector Attach 3D Midtex"; + id = "Sector_Attach3dMidtex"; + requiresactivation = false; + + arg0 + { + title = "Line Tag"; + type = 15; + } + arg1 + { + title = "Sector Tag"; + type = 13; + } + arg2 + { + title = "Floor / Ceiling"; + type = 11; + enum = "floorceiling"; + } + } + + 57 + { + title = "Sector Set Portal"; + id = "Sector_SetPortal"; + requiresactivation = false; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Portal Type"; + type = 11; + enum + { + 0 = "Link to portal with same tag"; + 1 = "Copy portal from second tag"; + 2 = "Eternity-style skybox portal"; + 3 = "Plane portal"; + 4 = "Horizon portal"; + 5 = "Copy portal to line"; + 6 = "Linked portal"; + } + } + arg2 + { + title = "Plane"; + type = 11; + enum + { + 0 = "Floor"; + 1 = "Ceiling"; + 2 = "Both"; + 3 = "Any (\"Copy portal\" types only)"; + } + } + arg3 + { + title = "Misc"; + tooltip = "For type 0 portal: specifies whether the line belongs to the sector viewed\nthrough the portal (1) or the sector in which the portal is seen (0).\nFor type 1 portal: specifies the sector tag of the portal to copy."; + } + arg4 + { + title = "Opacity"; + } + } + 185 + { + title = "Sector Rotate Flat"; + id = "Sector_SetRotation"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Floor Angle"; + type = 8; + } + arg2 + { + title = "Ceiling Angle"; + type = 8; + } + } + 186 + { + title = "Sector Ceiling Panning"; + id = "Sector_SetCeilingPanning"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Horizontal Integral"; + } + arg2 + { + title = "Horizontal Fractional"; + } + arg3 + { + title = "Vertical Integral"; + } + arg4 + { + title = "Vertical Fractional"; + } + } + 187 + { + title = "Sector Floor Panning"; + id = "Sector_SetFloorPanning"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Horizontal Integral"; + } + arg2 + { + title = "Horizontal Fractional"; + } + arg3 + { + title = "Vertical Integral"; + } + arg4 + { + title = "Vertical Fractional"; + } + } + 188 + { + title = "Sector Ceiling Scale"; + id = "Sector_SetCeilingScale"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Horizontal Integral"; + } + arg2 + { + title = "Horizontal Fractional"; + } + arg3 + { + title = "Vertical Integral"; + } + arg4 + { + title = "Vertical Fractional"; + } + } + 189 + { + title = "Sector Floor Scale"; + id = "Sector_SetFloorScale"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Horizontal Integral"; + } + arg2 + { + title = "Horizontal Fractional"; + } + arg3 + { + title = "Vertical Integral"; + } + arg4 + { + title = "Vertical Fractional"; + } + } + 218 + { + title = "Sector Wind"; + id = "Sector_SetWind"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Wind Strength"; + } + arg2 + { + title = "Wind Angle"; + type = 22; + } + arg3 + { + title = "Use Line Vector"; + type = 11; + enum = "noyes"; + } + } + 219 + { + title = "Sector Friction"; + id = "Sector_SetFriction"; + requiresactivation = false; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Friction Amount"; + type = 11; + enum + { + 0 = "Use Line Length"; + 1 = "Very Sludgy"; + 50 = "Sludgy"; + 100 = "Normal"; + 200 = "Icy"; + 255 = "Very Icy"; + } + } + } + + 220 + { + title = "Sector Current"; + id = "Sector_SetCurrent"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Current Strength"; + } + arg2 + { + title = "Current Angle"; + type = 22; + } + arg3 + { + title = "Use Line Vector"; + type = 11; + enum = "noyes"; + } + } + } + + change + { + title = "Change"; + + 179 + { + title = "Change Skill"; + id = "ChangeSkill"; + + arg0 + { + title = "New Skill Level"; + type = 11; + enum + { + 0 = "Very Easy"; + 1 = "Easy"; + 2 = "Normal"; + 3 = "Hard"; + 4 = "Nightmare!"; + } + } + } + } + + plane + { + title = "Plane"; + + 181 + { + title = "Plane Align (slope)"; + id = "Plane_Align"; + requiresactivation = false; + + arg0 + { + title = "Align Floor"; + type = 11; + enum + { + 0 = "None"; + 1 = "Front"; + 2 = "Back"; + } + } + arg1 + { + title = "Align Ceiling"; + type = 11; + enum + { + 0 = "None"; + 1 = "Front"; + 2 = "Back"; + } + } + } + } + + static + { + title = "Static"; + + 190 + { + title = "Static Init"; + id = "Static_Init"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Property"; + type = 11; + enum + { + 0 = "Set the gravity to the length of the linedef"; + 1 = "Set the light or fog color in a sector"; + 2 = "Set damage to the length of the linedef"; + 3 = "Define a sector link"; + 255 = "Use the line's upper texture as the sky in any tagged sectors"; + } + } + arg2 + { + title = "Flip Sky / Ceiling"; + } + arg3 + { + title = "Movement Type"; + } + } + } + + elevator + { + title = "Elevator"; + + 245 + { + title = "Elevator Raise to Nearest Floor"; + id = "Elevator_RaiseToNearest"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + } + 246 + { + title = "Elevator Move to Activated Floor"; + id = "Elevator_MoveToFloor"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + } + 247 + { + title = "Elevator Lower to Nearest Floor"; + id = "Elevator_LowerToNearest"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + } + } + polyobj + { + 1 // Polyobject Start Line + { + arg3 + { + title = "Set Line ID"; + type = 0; + } + } + 5 // Polyobject Explicit Line + { + arg4 + { + title = "Set Line ID"; + type = 0; + } + } + } + plane + { + 181 //Plane_Align + { + arg2 + { + title = "Set Line ID"; + type = 0; + } + } + } + scroll + { + 52 //Scroll_Wall + { + arg0 + { + title = "Set Line ID"; + type = 0; + } + } + 221 //Scroll_Texture_Both + { + arg0 + { + title = "Line ID"; + type = 0; + } + } + 222 //Scroll_Texture_Model + { + arg0 + { + title = "Set Line ID"; + type = 0; + } + } + } + sector + { + 48 //Sector_Attach3dMidtex + { + arg0 + { + title = "Line ID"; + type = 0; + } + } + } + teleport + { + 215 //Teleport_Line + { + arg0 + { + title = "Line ID"; + type = 0; + } + arg1 + { + title = "Target Line ID"; + type = 0; + } + } + } +} \ No newline at end of file diff --git a/Build/Configurations/Includes/Eternity_misc.cfg b/Build/Configurations/Includes/Eternity_misc.cfg new file mode 100644 index 0000000000000000000000000000000000000000..3b289567f14e2eaf95ba47930b64ed7831c00e2d --- /dev/null +++ b/Build/Configurations/Includes/Eternity_misc.cfg @@ -0,0 +1,4217 @@ +linedefflags +{ + 1024 = "3D middle texture"; +} + +thingflags +{ + 128 = "Friendly"; + 512 = "Dormant"; +} + +/* +ADDITIONAL UNIVERSAL DOOM MAP FORMAT FIELD DEFINITIONS +Only add fields here that Doom Builder does not edit with its own user-interface! +The "default" field must match the UDMF specifications! + +Field data types: +0 = integer * +1 = float +2 = string +3 = bool +4 = linedef action (integer) * +5 = sector effect (integer) * +6 = texture (string) +7 = flat (string) +8 = angle in degrees (integer) +9 = angle in radians (float) +10 = XXRRGGBB color (integer) +11 = enum option (integer) * +12 = enum bits (integer) * +13 = sector tag (integer) * +14 = thing tag (integer) * +15 = linedef tag (integer) * +16 = enum option (string) +17 = angle in degrees (float) +22 = byte angle (integer) +*/ +universalfields +{ + linedef + { + comment + { + type = 2; + default = ""; + } + } + + sidedef + { + comment + { + type = 2; + default = ""; + } + } + + thing + { + comment + { + type = 2; + default = ""; + } + } + + sector + { + comment + { + type = 2; + default = ""; + } + } +} + +defaultthingflags_udmf +{ + skill1; + skill2; + skill3; + skill4; + skill5; + single; + coop; + dm; + class1; + class2; + class3; +} + +doormaking_udmf +{ + makedooraction = 12; // See linedeftypes + makedoorflags { playeruse; repeatspecial; } + makedoorarg0 = 0; + makedoorarg1 = 16; + makedoorarg2 = 150; + makedoorarg3 = 0; + makedoorarg4 = 0; +} + +sectorflags_udmf +{ + secret = "Secret"; + lightfloorabsolute = "Floor light setting is absolute"; + lightceilingabsolute = "Ceiling light setting is absolute"; + damage_endgodmode = "Damage disables god mode cheat"; + damage_exitlevel = "Damage and exit level when < 10%"; + damageterraineffect = "Spawn terrain splashes on damage"; + portal_ceil_disabled = "Disable ceiling portal"; + portal_ceil_norender = "Don't display ceiling portal"; + portal_ceil_nopass = "Blocking ceiling linked portal"; + portal_ceil_blocksound = "Ceiling linked portal blocks sound"; + portal_ceil_useglobaltex = "Ceiling portal uses global texture"; + portal_floor_disabled = "Disable floor portal"; + portal_floor_norender = "Don't display floor portal"; + portal_floor_nopass = "Blocking floor linked portal"; + portal_floor_blocksound = "Floor portal blocks sound"; + portal_floor_useglobaltex = "Floor portal uses global texture"; +} + +// These are instead of Doom sector types in UDMF and Hexen format +sectors_udmf +{ + 0 = "None"; + 1 = "Light Phased"; + 2 = "Light Sequence Start"; + 3 = "Light Sequence Special 1"; + 4 = "Light Sequence Special 2"; + 40 = "Wind East weak"; + 41 = "Wind East medium"; + 42 = "Wind East strong"; + 43 = "Wind North weak"; + 44 = "Wind North medium"; + 45 = "Wind North strong"; + 46 = "Wind South weak"; + 47 = "Wind South medium"; + 48 = "Wind South strong"; + 49 = "Wind West weak"; + 50 = "Wind West medium"; + 51 = "Wind West strong"; + 65 = "Light Flicker"; + 66 = "Light Strobe Fast"; + 67 = "Light Strobe Slow"; + 68 = "Light Strobe Hurt -20% health"; + 69 = "Damage Hellslime -10% health"; + 71 = "Damage Nukage -5% health"; + 72 = "Light Glow"; + 74 = "Sector Door Close (30 sec)"; + 75 = "Damage End Level -20% health"; + 76 = "Light StrobeSlowSync"; + 77 = "Light StrobeFastSync"; + 78 = "Sector Door Raise (5 min)"; + 79 = "Low Friction"; + 80 = "Damage Super Hellslime -20% health"; + 81 = "Light Fire Flicker"; + 82 = "Damage -5% health (no protection)"; + 83 = "Damage -8% health (no protection)"; + 84 = "Scroll east + -2 or -5% health (no protection)"; + 85 = "Damage Sludge -4% health"; + 225 = "Carry East Slow"; + 226 = "Carry East Med.Slow"; + 227 = "Carry East Medium"; + 228 = "Carry East Med.Fast"; + 229 = "Carry East Fast"; + 230 = "Carry North Slow"; + 231 = "Carry North Med.Slow"; + 232 = "Carry North Medium"; + 233 = "Carry North Med.Fast"; + 234 = "Carry North Fast"; + 235 = "Carry South Slow"; + 236 = "Carry South Med.Slow"; + 237 = "Carry South Medium"; + 238 = "Carry South Med.Fast"; + 239 = "Carry South Fast"; + 240 = "Carry West Slow"; + 241 = "Carry West Med.Slow"; + 242 = "Carry West Medium"; + 243 = "Carry West Med.Fast"; + 244 = "Carry West Fast"; +} + +linedefflags_udmf +{ + twosided = "Doublesided"; + dontpegtop = "Upper unpegged"; + dontpegbottom = "Lower unpegged"; + blocking = "Impassable"; + blockeverything = "Block everything"; + blockmonsters = "Block monsters"; + blocksound = "Block sound"; + jumpover = "Jump-over railing"; + clipmidtex = "Clip middle texture"; + midtex3d = "Walkable middle texture"; + midtex3dimpassible = "Projectile shoot-through middle texture"; + mapped = "Initially shown on map"; + secret = "Shown as 1-sided on map"; + dontdraw = "Not shown on map"; + translucent = "Translucent (obsolete)"; + zoneboundary = "Sound zone boundary"; +} + +linedefactivations_udmf +{ + repeatspecial = "Repeatable action"; + playeruse = "When player presses use"; + playercross = "When player walks over"; + playerpush = "When player bumps"; + monsteruse = "When monster presses use"; + monstercross = "When monster walks over"; + monsterpush = "When monsters bumps"; + missilecross = "When projectile crosses"; + impact = "On projectile impact"; + passuse = "Pass use on"; + firstsideonly = "Front side only"; +} + +sidedefflags +{ + +} + +// Basic UDMF stuff. +thingflags_udmf +{ + skill1 = "Skill 1"; + skill2 = "Skill 2"; + skill3 = "Skill 3"; + skill4 = "Skill 4"; + skill5 = "Skill 5"; + single = "Singleplayer"; + coop = "Cooperative"; + dm = "Deathmatch"; + friend = "Friendly (MBF logic)"; + strifeally = "Friendly (Strife logic)"; + ambush = "Ambush players"; + standing = "Stand still"; + dormant = "Dormant"; + translucent = "Translucent (25%)"; + invisible = "Invisible"; +} + +// How thing flags should be compared (for the stuck thing error check) +thingflagscompare_udmf +{ + skills + { + skill1; + skill2; + skill3; + skill4; + skill5; + } + + gamemodes + { + single { requiredgroups = "skills"; } + coop { requiredgroups = "skills"; } + dm { ignoredgroups = "skills"; } + } + + classes + { + class1; + class2; + class3; + } +} + +linedefs_eternity_udmf +{ + polyobj + { + title = "Polyobjects"; + + 59 + { + title = "Polyobject Move to Spot (override)"; + id = "Polyobj_OR_MoveToSpot"; + arg0 + { + title = "Polyobject Number"; + type = 25; + } + arg1 + { + title = "Speed (mu. per octic)"; + type = 11; + enum = "stair_speeds"; + default = 16; + } + arg2 + { + title = "Target MapSpot Tag"; + type = 14; + targetclasses = "MapSpot,MapSpotGravity"; + } + } + 86 + { + title = "Polyobject Move to Spot"; + id = "Polyobj_MoveToSpot"; + arg0 + { + title = "Polyobject Number"; + type = 25; + } + arg1 + { + title = "Speed (mu. per octic)"; + type = 11; + enum = "stair_speeds"; + default = 16; + } + arg2 + { + title = "Target MapSpot Tag"; + type = 14; + targetclasses = "MapSpot,MapSpotGravity"; + } + } + 87 + { + title = "Polyobject Stop"; + id = "Polyobj_Stop"; + arg0 + { + title = "Polyobject Number"; + type = 25; + } + } + 88 + { + title = "Polyobject Move to"; + id = "Polyobj_MoveTo"; + arg0 + { + title = "Polyobject Number"; + type = 25; + } + arg1 + { + title = "Speed (mu. per octic)"; + type = 11; + enum = "stair_speeds"; + default = 16; + } + arg2 + { + title = "Target X Pos"; + } + arg3 + { + title = "Target Y Pos"; + } + } + 89 + { + title = "Polyobject Move to (override)"; + id = "Polyobj_OR_MoveTo"; + arg0 + { + title = "Polyobject Number"; + type = 25; + } + arg1 + { + title = "Speed (mu. per octic)"; + type = 11; + enum = "stair_speeds"; + default = 16; + } + arg2 + { + title = "Target X Pos"; + } + arg3 + { + title = "Target Y Pos"; + } + } + } + + line + { + title = "Line"; + + 9 + { + title = "Line Horizon"; + id = "Line_Horizon"; + requiresactivation = false; + } + 121 // Line Identification + { + arg1 + { + title = "Flags"; + type = 12; + enum + { + 1 = "Sound zone boundary"; + 2 = "Jump-over railing"; + 4 = "Block floating monsters"; + 8 = "Clip middle texture"; + 16 = "Wrap middle texture"; + 32 = "Walkable middle texture"; + 64 = "Switch height check"; + 128 = "Front side only"; + } + } + arg4 + { + title = "Line ID High"; + } + } + 182 + { + title = "Line Mirror"; + id = "Line_Mirror"; + requiresactivation = false; + } + 156 + { + title = "Line Set Portal"; + id = "Line_SetPortal"; + requiresactivation = false; + + arg0 + { + title = "Exit Line Tag"; + tooltip = "The tag number of the line that will act as the \"exit\" of the current portal"; + type = 15; + } + arg2 + { + title = "Portal Type"; + type = 11; + enum + { + 0 = "Visual only"; + 1 = "Visual + simple teleporter"; + 2 = "Interactive"; + 3 = "Static (Eternity style)"; + } + } + arg3 + { + title = "Plane Align"; + tooltip = "Determines how the planes at the other side of the portal are relative to this line"; + type = 11; + enum + { + 0 = "None"; + 1 = "Floors"; + 2 = "Ceilings"; + } + } + } + 107 + { + title = "Line Set Portal Target"; + id = "Line_SetPortalTarget"; + + arg0 + { + title = "Source Line Tag"; + type = 15; + } + arg1 + { + title = "Target Line Tag"; + type = 15; + } + } + } + + door + { + 14 + { + title = "Door Animated"; + id = "Door_Animated"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Animation Speed"; + type = 11; + enum = "door_speeds"; + default = 16; + } + arg2 + { + title = "Close Delay"; + type = 11; + enum = "reset_tics"; + default = 150; + } + arg3 + { + title = "Lock"; + type = 11; + enum = "keys"; + } + } + 202 + { + title = "Door Generic"; + id = "Generic_Door"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "flat_speeds"; + default = 16; + } + arg2 + { + title = "Type"; + type = 26; + enum + { + 0 = "Open Close"; + 1 = "Open Stay"; + 2 = "Close Open"; + 3 = "Close Stay"; + } + flags + { + 64 = "No retrigger"; + 128 = "Tag is light tag"; + } + } + arg3 + { + title = "Delay"; + type = 11; + enum = "generic_door_delays"; + default = 34; + } + arg4 + { + title = "Lock"; + type = 11; + enum = "keys"; + } + } + + 249 + { + title = "Door Close Wait Open"; + id = "Door_CloseWaitOpen"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "flat_speeds"; + default = 16; + } + arg2 + { + title = "Delay"; + type = 11; + enum = "generic_door_delays"; + default = 34; + } + arg3 + { + title = "Light Tag"; + type = 13; + } + } + } + + autosave + { + title = "Autosave"; + + 15 + { + title = "Autosave"; + id = "Autosave"; + } + } + + floor + { + 28 // Floor Crusher Start + { + arg3 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + } + 37 + { + title = "Floor Move to Value"; + id = "Floor_MoveToValue"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Target Height"; + } + arg3 + { + title = "Negative Height"; + type = 11; + enum = "noyes"; + } + } + + 138 + { + title = "Floor Waggle"; + id = "Floor_Waggle"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Amplitude"; + } + arg2 + { + title = "Frequency"; + } + arg3 + { + title = "Phase Offset (0-63)"; + } + arg4 + { + title = "Duration"; + type = 11; + enum = "delay_seconds"; + default = 5; + } + } + + 200 + { + title = "Floor Generic Change"; + id = "Generic_Floor"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Movement Amount"; + } + arg3 + { + title = "Target"; + type = 11; + enum + { + 0 = "Move by Movement Amount"; + 1 = "Highest neighboring floor"; + 2 = "Lowest neighboring floor"; + 3 = "Nearest neighboring floor"; + 4 = "Lowest neighboring ceiling"; + 5 = "Sector ceiling"; + 6 = "Move by the height of sector's shortest lower texture"; + } + } + arg4 + { + title = "Flags"; + type = 26; + enum + { + 0 = "Don't copy anything"; + 1 = "Copy floor texture, remove sector special"; + 2 = "Copy floor texture"; + 3 = "Copy floor texture and special"; + } + flags + { + 4 = "Use numeric model if set, trigger model if not"; + 8 = "Raise floor if set, lower it if not"; + 16 = "Inflict crushing damage"; + } + } + } + + 235 + { + title = "Transfer Floor Texture and Special form Back Side"; + id = "Floor_TransferTrigger"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + } + 236 + { + title = "Transfer Floor Texture and Special using Numeric Change Model"; + id = "Floor_TransferNumeric"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + } + 238 + { + title = "Floor Raise to Lowest Ceiling"; + id = "Floor_RaiseToLowestCeiling"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + } + 239 + { + title = "Floor Raise by TxTy"; + id = "Floor_RaiseByValueTxTy"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Raise by"; + } + } + + 240 + { + title = "Floor Raise by Texture"; + id = "Floor_RaiseByTexture"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + } + + 241 + { + title = "Floor Lower to Lowest TxTy"; + id = "Floor_LowerToLowestTxTy"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + } + + 242 + { + title = "Floor Lower to Highest Floor"; + id = "Floor_LowerToHighest"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Adjust Target Height"; + } + arg3 + { + title = "Force Adjust"; + type = 11; + enum = "noyes"; + } + } + 250 + { + title = "Floor Donut"; + id = "Floor_Donut"; + + arg0 + { + title = "Center Sector Tag"; + type = 13; + } + arg1 + { + title = "Pillar Lower Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Stairs Raise Speed"; + type = 11; + enum = "stair_speeds"; + default = 4; + } + } + + 251 + { + title = "Floor and Ceiling Lower and Raise"; + id = "FloorAndCeiling_LowerRaise"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Floor Lowering Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Ceiling Raising Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg3 + { + title = "Emulate Boom Bug"; + type = 11; + enum + { + 0 = "No"; + 1998 = "Yes"; + } + } + } + } + + stairs + { + 204 + { + title = "Stairs Generic Build"; + id = "Generic_Stairs"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "stair_speeds"; + default = 4; + } + arg2 + { + title = "Step Height"; + } + arg3 + { + title = "Options"; + type = 12; + enum + { + 1 = "Upwards"; + 2 = "Ignore Floor Texture"; + } + } + arg4 + { + title = "Reset Delay"; + type = 11; + enum = "reset_tics"; + } + } + + 217 + { + title = "Stairs Build up (Doom mode)"; + id = "Stairs_BuildUpDoom"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "stair_speeds"; + default = 4; + } + arg2 + { + title = "Step Height"; + } + arg3 + { + title = "Build Step Delay"; + type = 11; + enum = "delay_tics"; + default = 35; + } + arg4 + { + title = "Reset Delay"; + type = 11; + enum = "reset_tics"; + } + } + } + + + pillar + { + 94 // Pillar_BuildAndCrush + { + arg3 + { + title = "Crush Damage"; + default = 100; + } + arg4 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + } + } + + + forcefield + { + title = "Forcefield"; + + 33 + { + title = "Forcefield Set"; + id = "ForceField"; + requiresactivation = false; + } + 34 + { + title = "Forcefield Remove"; + id = "ClearForceField"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + } + } + + + ceiling + { + title = "Ceiling"; + + 38 + { + title = "Ceiling Waggle"; + id = "Ceiling_Waggle"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Amplitude (in 1/8 mu.)"; + default = 128; + } + arg2 + { + title = "Frequency"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg3 + { + title = "Phase Offset (0-63)"; + } + arg4 + { + title = "Duration"; + type = 11; + enum = "delay_seconds"; + default = 5; + } + } + 42 // Ceiling Crusher Start + { + arg3 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + } + 43 // Ceiling Crush Once + { + arg3 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + + } + + 97 + { + title = "Ceiling Lower And Crush Dist"; + id = "Ceiling_LowerAndCrushDist"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + + } + + arg2 + { + title = "Crush Damage"; + default = 100; + } + + arg3 + { + title = "Lip"; + } + + arg4 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + } + + 104 + { + title = "Ceiling Crush And Raise Dist"; + id = "Ceiling_CrushAndRaiseSilentDist"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + + arg1 + { + title = "Lip"; + } + + arg2 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + + arg3 + { + title = "Crush Damage"; + default = 100; + } + + arg4 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + } + + 45 // Ceiling Crush Once and Open + { + arg3 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + + } + 47 + { + title = "Ceiling Move to Value"; + id = "Ceiling_MoveToValue"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Target Height"; + } + arg3 + { + title = "Negative Height"; + type = 11; + enum = "noyes"; + } + } + 169 + { + title = "Ceiling Generic Crush (Hexen mode)"; + id = "Generic_Crusher2"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Lower Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Raise Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg3 + { + title = "Silent"; + type = 11; + enum = "noyes"; + } + arg4 + { + title = "Crush Damage"; + default = 100; + } + } + 192 + { + title = "Ceiling Lower to Highest Floor"; + id = "Ceiling_LowerToHighestFloor"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + } + 193 + { + title = "Ceiling Lower Instantly by Value * 8"; + id = "Ceiling_LowerInstant"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg2 + { + title = "Lower by (* 8)"; + } + } + 194 + { + title = "Ceiling Raise Instantly by Value * 8"; + id = "Ceiling_RaiseInstant"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg2 + { + title = "Raise by (* 8)"; + } + } + 195 + { + title = "Ceiling Crush Once and Open A"; + id = "Ceiling_CrushRaiseAndStayA"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Lower Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Raise Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg3 + { + title = "Crush Damage"; + default = 100; + } + arg4 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + + } + 196 + { + title = "Ceiling Crush Start A"; + id = "Ceiling_CrushAndRaiseA"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Lower Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Raise Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg3 + { + title = "Crush Damage"; + default = 100; + } + arg4 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + + } + 197 + { + title = "Ceiling Crush Start A (silent)"; + id = "Ceiling_CrushAndRaiseSilentA"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Lower Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Raise Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg3 + { + title = "Crush Damage"; + default = 100; + } + arg4 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + + } + 198 + { + title = "Ceiling Raise by Value * 8"; + id = "Ceiling_RaiseByValueTimes8"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Raise by (* 8)"; + } + } + 199 + { + title = "Ceiling Lower by Value * 8"; + id = "Ceiling_LowerByValueTimes8"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Lower by (* 8)"; + } + } + + 201 + { + title = "Ceiling Generic Change"; + id = "Generic_Ceiling"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Movement Amount"; + } + arg3 + { + title = "Target"; + type = 11; + enum + { + 0 = "Move by Movement Amount"; + 1 = "Highest neighboring ceiling"; + 2 = "Lowest neighboring ceiling"; + 3 = "Nearest neighboring ceiling"; + 4 = "Highest neighboring floor"; + 5 = "Sector floor"; + 6 = "Move by the height of sector's shortest upper texture"; + } + } + arg4 + { + title = "Flags"; + type = 26; + enum + { + 0 = "Don't copy anything"; + 1 = "Copy ceiling texture, remove sector special"; + 2 = "Copy ceiling texture"; + 3 = "Copy ceiling texture and special"; + } + flags + { + 4 = "Use numeric model if set, trigger model if not"; + 8 = "Raise ceiling if set, lower it if not"; + 16 = "Inflict crushing damage"; + } + } + } + 205 + { + title = "Ceiling Generic Crush (Doom mode)"; + id = "Generic_Crusher"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Lowering Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Raising Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg3 + { + title = "Silent"; + type = 11; + enum = "noyes"; + } + arg4 + { + title = "Crush Damage"; + default = 100; + } + } + 252 + { + title = "Ceiling Raise to Nearest Ceiling"; + id = "Ceiling_RaiseToNearest"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + } + 253 + { + title = "Ceiling Lower to Lowest Ceiling"; + id = "Ceiling_LowerToLowest"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + } + 254 + { + title = "Ceiling Lower to Floor"; + id = "Ceiling_LowerToFloor"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + } + 255 + { + title = "Ceiling Crush Once and Open A (silent)"; + id = "Ceiling_CrushRaiseAndStaySilA"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Lowering Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Raising Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg3 + { + title = "Crush Damage"; + default = 100; + } + arg4 + { + title = "Crush Mode"; + type = 11; + enum = "crush_mode"; + } + } + } + + breakable + { + title = "Breakable"; + + 49 + { + title = "Breakable Glass"; + id = "GlassBreak"; + + arg0 + { + title = "Spawn Glass Shards"; + type = 11; + enum = "yesno"; + } + } + } + + transfer + { + title = "Transfer"; + + 50 + { + title = "Transfer Brightness Level"; + id = "ExtraFloor_LightOnly"; + requiresactivation = false; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Options"; + type = 11; + enum + { + 0 = "From control sector's ceiling down to the top of another type 0 light"; + 1 = "From control sector's ceiling down to control sector's floor"; + 2 = "From control sector's ceiling down to the top of another extra light"; + } + } + } + 209 + { + title = "Transfer Heights"; + id = "Transfer_Heights"; + requiresactivation = false; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Options"; + type = 12; + enum + { + 0 = "Boom mode"; + 1 = "Use fake ceiling/floor"; + 2 = "Draw fake floor only"; + 4 = "Inside sector only"; + 8 = "Swimmable below fake"; + 16 = "Do not draw"; + 32 = "Keep lighting"; + } + } + } + + 210 + { + title = "Transfer Floor Brightness"; + id = "Transfer_FloorLight"; + requiresactivation = false; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + } + 211 + { + title = "Transfer Ceiling Brightness"; + id = "Transfer_CeilingLight"; + requiresactivation = false; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + } + 16 + { + title = "Transfer Wall Brightness"; + id = "Transfer_WallLight"; + requiresactivation = false; + + arg0 + { + title = "Line Tag"; + type = 15; + } + arg1 + { + title = "Flags"; + type = 12; + enum + { + 1 = "Transfer light level to front side"; + 2 = "Transfer light level to back side"; + 4 = "Ignore fake contrast"; + } + } + } + + } + + platform + { + 172 + { + title = "Platform Raise to Nearest Wait Lower"; + id = "Plat_UpNearestWaitDownStay"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Reverse Delay (tics)"; + type = 11; + enum = "delay_tics"; + default = 35; + } + } + 203 + { + title = "Platform Generic Change"; + id = "Generic_Lift"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Reverse Delay (tics)"; + type = 11; + enum = "delay_tics"; + default = 35; + } + arg3 + { + title = "Type"; + type = 11; + enum = "generic_lift_types"; + } + arg4 + { + title = "Movement Amount"; + } + } + 206 + { + title = "Platform Lower Wait Raise (lip)"; + id = "Plat_DownWaitUpStayLip"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Reverse Delay (tics)"; + type = 11; + enum = "delay_tics"; + default = 35; + } + arg3 + { + title = "Lip Amount"; + } + arg4 + { + title = "Sound Type"; + type = 11; + enum = "plat_sound"; + } + } + 207 + { + title = "Platform Perpetual Move (lip)"; + id = "Plat_PerpetualRaiseLip"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Reverse Delay (tics)"; + type = 11; + enum = "delay_tics"; + default = 35; + } + arg3 + { + title = "Lip Amount"; + } + } + 228 + { + title = "Platform Raise Tx0"; + id = "Plat_RaiseAndStayTx0"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Lockout Mode"; + type = 11; + enum + { + 0 = "Lockout in Heretic only"; + 1 = "Don't lockout"; + 2 = "Lockout in all games"; + } + } + } + 230 + { + title = "Platform Raise by Value Tx (* 8)"; + id = "Plat_UpByValueStayTx"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + arg2 + { + title = "Raise by (* 8)"; + } + } + 231 + { + title = "Platform Toggle Ceiling"; + id = "Plat_ToggleCeiling"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + } + } + + teleport + { + title = "Teleport"; + + 39 + { + title = "Teleport to Pain State (silent)"; + id = "Teleport_ZombieChanger"; + + arg0 + { + title = "Target Teleport Dest. Tag"; + type = 14; + targetclasses = "TeleportDest,TeleportDest2,TeleportDest3"; + } + arg1 + { + title = "Target Sector Tag"; + type = 13; + } + } + 70 // Teleport + { + arg2 + { + title = "Source Fog"; + type = 11; + enum = "yesno"; + } + } + 71 // Teleport_NoFog + { + arg1 + { + title = "Teleport Dest. angle usage"; + type = 11; + enum + { + 0 = "Don't change angle and velocity (Hexen-compat)"; + 1 = "Always use the teleport exit's angle (Strife-compat)"; + 2 = "Adjust relatively to the teleport exit's angle, but in the wrong direction (Boom-compat)"; + 3 = "Adjust relatively to the teleport exit's angle (Boom-fixed)"; + } + } + arg3 + { + title = "Keep rel. Height"; + type = 11; + enum = "noyes"; + } + } + 74 // Teleport_NewMap + { + arg2 + { + title = "Keep Orientation"; + type = 11; + enum = "noyes"; + } + } + 76 + { + title = "Teleport Other"; + id = "TeleportOther"; + + arg0 + { + title = "Thing Tag"; + type = 14; + } + arg1 + { + title = "Target MapSpot Tag"; + type = 14; + targetclasses = "MapSpot,MapSpotGravity"; + } + arg2 + { + title = "Fog"; + type = 11; + enum = "noyes"; + } + } + 77 + { + title = "Teleport Group"; + id = "TeleportGroup"; + + arg0 + { + title = "Thing Tag"; + tooltip = "The TID of the actor(s) to teleport.\nIf 0, teleports the activator only."; + type = 14; + } + arg1 + { + title = "Source Teleport Dest. Tag"; + type = 14; + targetclasses = "TeleportDest,TeleportDest2,TeleportDest3"; + } + arg2 + { + title = "Target Teleport Dest. Tag"; + type = 14; + targetclasses = "TeleportDest,TeleportDest2,TeleportDest3"; + } + arg3 + { + title = "Move Source"; + type = 11; + enum = "noyes"; + } + arg4 + { + title = "Fog"; + type = 11; + enum = "noyes"; + } + } + 78 + { + title = "Teleport in Sector"; + id = "TeleportInSector"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Source Tag"; + tooltip = "The spot relative to which to teleport."; + type = 14; + } + arg2 + { + title = "Target Teleport Dest. Tag"; + type = 14; + targetclasses = "TeleportDest,TeleportDest2,TeleportDest3"; + } + arg3 + { + title = "Fog"; + type = 11; + enum = "noyes"; + } + arg4 + { + title = "Group Thing Tag"; + tooltip = "The TID of the thing(s) to teleport.\nIf 0, teleports all actors in the sector"; + type = 14; + } + } + 154 + { + title = "Teleport (no Stop)"; + id = "Teleport_NoStop"; + + arg0 + { + title = "Target Teleport Dest. Tag"; + type = 14; + targetclasses = "TeleportDest,TeleportDest2,TeleportDest3"; + } + arg1 + { + title = "Target Sector Tag"; + type = 13; + } + arg2 + { + title = "Fog"; + type = 11; + enum = "yesno"; + } + } + 215 + { + title = "Teleport to Line"; + id = "Teleport_Line"; + + arg1 + { + title = "Target Line Tag"; + type = 15; + } + arg2 + { + title = "Reverse Angle"; + type = 11; + enum = "noyes"; + } + } + } + + thing + { + 17 + { + title = "Thing Raise"; + id = "Thing_Raise"; + + arg0 + { + title = "Thing Tag"; + type = 14; + } + } + 18 + { + title = "Start Conversation"; + id = "StartConversation"; + + arg0 + { + title = "Thing Tag"; + type = 14; + } + arg1 + { + title = "Face Talker"; + type = 11; + enum = "noyes"; + default = 1; + } + } + 19 + { + title = "Thing Stop"; + id = "Thing_Stop"; + + arg0 + { + title = "Thing Tag"; + type = 14; + } + } + 72 // ThrustThing + { + arg2 + { + title = "No Limit"; + type = 11; + enum = "noyes"; + } + arg3 + { + title = "Target Thing Tag"; + type = 14; + } + } + 73 // DamageThing + { + arg1 + { + title = "Death"; + type = 11; + enum = "death_types"; + } + } + 79 + { + title = "Set Conversation"; + id = "Thing_SetConversation"; + arg0 + { + title = "Thing Tag"; + type = 14; + } + arg1 + { + title = "Conversation ID"; + } + } + 119 + { + title = "Damage Thing by Tag"; + id = "Thing_Damage"; + + arg0 + { + title = "Thing Tag"; + type = 14; + } + arg1 + { + title = "Damage"; + default = 100; + } + arg2 + { + title = "Death"; + type = 11; + enum = "death_types"; + } + } + 125 + { + title = "Move Thing"; + id = "Thing_Move"; + + arg0 + { + title = "Thing Tag"; + type = 14; + } + arg1 + { + title = "Target Thing Tag"; + type = 14; + } + arg2 + { + title = "Fog"; + type = 11; + enum = "yesno"; + } + } + 127 + { + title = "Thing Set Special"; + id = "Thing_SetSpecial"; + + arg0 + { + title = "Thing Tag"; + type = 14; + } + arg1 + { + title = "Special"; + type = 4; + } + arg2 + { + title = "Arg 1"; + } + arg3 + { + title = "Arg 2"; + } + arg4 + { + title = "Arg 3"; + } + } + 128 + { + title = "Thing Thrust Z"; + id = "ThrustThingZ"; + + arg0 + { + title = "Thing Tag"; + type = 14; + } + arg1 + { + title = "Force"; + } + arg2 + { + title = "Down/Up"; + type = 11; + enum = "updown"; + } + arg3 + { + title = "Set/Add"; + type = 11; + enum = "setadd"; + } + } + 135 // Thing_Spawn + { + arg3 + { + title = "New Thing Tag"; + type = 14; + } + } + 137 // Thing_SpawnNoFog + { + arg3 + { + title = "New Thing Tag"; + type = 14; + } + } + 139 + { + title = "Spawn Thing Facing"; + id = "Thing_SpawnFacing"; + + arg0 + { + title = "Mapspot Tag"; + type = 14; + targetclasses = "MapSpot,MapSpotGravity"; + } + arg1 + { + title = "Spawn Thing"; + type = 11; + enum = "spawnthing"; + } + arg2 + { + title = "Fog"; + type = 11; + enum = "yesno"; + } + arg3 + { + title = "New Thing Tag"; + type = 14; + } + } + 175 + { + title = "Spawn Projectile (Intercept)"; + id = "Thing_ProjectileIntercept"; + + arg0 + { + title = "Mapspot Tag"; + type = 14; + targetclasses = "MapSpot,MapSpotGravity"; + } + arg1 + { + title = "Projectile Type"; + type = 11; + enum = "spawn_projectile"; + } + arg2 + { + title = "Speed"; + } + arg3 + { + title = "Target Thing Tag"; + type = 14; + } + arg4 + { + title = "New Thing Tag"; + type = 14; + } + } + 176 + { + title = "Change Thing Tag"; + id = "Thing_ChangeTID"; + + arg0 + { + title = "Old Thing Tag"; + type = 14; + } + arg1 + { + title = "New Thing Tag"; + type = 14; + } + } + 177 + { + title = "Thing Hate"; + id = "Thing_Hate"; + + arg0 + { + title = "Hater Tag"; + type = 14; + } + arg1 + { + title = "Hatee Tag"; + type = 14; + } + arg2 + { + title = "Hate"; + type = 11; + enum + { + 0 = "Target only"; + 1 = "Target and Player"; + 2 = "Forced Target and Player"; + 3 = "Hunt Target and Player"; + 4 = "Forced Hunt Target and Player"; + 5 = "Target, Ignore Player"; + 6 = "Forced Target, Ignore Player"; + } + } + } + 178 + { + title = "Spawn Aimed Projectile"; + id = "Thing_ProjectileAimed"; + + arg0 + { + title = "Mapspot Tag"; + type = 14; + targetclasses = "MapSpot,MapSpotGravity"; + } + arg1 + { + title = "Projectile Type"; + type = 11; + enum = "spawn_projectile"; + } + arg2 + { + title = "Speed"; + } + arg3 + { + title = "Target Thing Tag"; + type = 14; + } + arg4 + { + title = "New Thing Tag"; + type = 14; + } + } + 180 + { + title = "Set Thing Translation"; + id = "Thing_SetTranslation"; + + arg0 + { + title = "Thing Tag"; + type = 14; + } + arg1 + { + title = "Translation Index"; + } + } + 229 + { + title = "Thing Set Goal"; + id = "Thing_SetGoal"; + + arg0 + { + title = "Monster Thing Tag"; + type = 14; + } + arg1 + { + title = "Target Thing Tag"; + type = 14; + } + arg2 + { + title = "Delay"; + type = 11; + enum + { + 0 = "No Delay"; + 1 = "1 Second"; + 2 = "2 Seconds"; + 3 = "3 Seconds"; + 5 = "5 Seconds"; + 10 = "10 Seconds"; + 15 = "15 Seconds"; + 20 = "20 Seconds"; + 25 = "25 Seconds"; + 30 = "30 Seconds"; + 60 = "1 Minute"; + } + } + arg3 + { + title = "Don't Chase Target"; + type = 11; + enum = "falsetrue"; + } + } + 248 + { + title = "Heal Thing"; + id = "HealThing"; + + arg0 + { + title = "Heal Amount"; + } + } + + } + + script + { + title = "Script"; + + 83 // Script Locked Execute + { + arg4 // Key Number + { + type = 11; + enum = "keys"; + } + } + 84 + { + title = "Script Execute with Result"; + id = "ACS_ExecuteWithResult"; + + arg0 + { + title = "Script Number"; + } + arg1 + { + title = "Script Argument 1"; + } + arg2 + { + title = "Script Argument 2"; + } + arg3 + { + title = "Script Argument 3"; + } + arg4 + { + title = "Script Argument 4"; + } + } + 85 + { + title = "Script Locked Execute (Door message)"; + id = "ACS_LockedExecuteDoor"; + + arg0 + { + title = "Script Number"; + } + + arg1 + { + title = "Map Number"; + } + + arg2 + { + title = "Script Argument 1"; + } + + arg3 + { + title = "Script Argument 2"; + } + + arg4 + { + title = "Key Number"; + type = 11; + enum = "keys"; + } + } + 158 + { + title = "FraggleScript Execute"; + id = "FS_Execute"; + + arg0 + { + title = "Script Number"; + } + arg1 + { + title = "Side"; + type = 11; + enum + { + 0 = "Both"; + 1 = "Front"; + } + } + arg2 + { + title = "Key"; + type = 11; + enum = "keys"; + } + arg3 + { + title = "Message"; + type = 11; + enum + { + 0 = "Open door"; + 1 = "Activate object"; + } + } + } + 226 + { + title = "Script Execute Always"; + id = "ACS_ExecuteAlways"; + + arg0 + { + title = "Script Number"; + } + + arg1 + { + title = "Map Number"; + } + + arg2 + { + title = "Script Argument 1"; + } + + arg3 + { + title = "Script Argument 2"; + } + + arg4 + { + title = "Script Argument 3"; + } + } + } + + end + { + 243 + { + title = "End Normal"; + id = "Exit_Normal"; + + arg0 + { + title = "Position"; + } + } + 244 + { + title = "End Secret"; + id = "Exit_Secret"; + + arg0 + { + title = "Position"; + } + } + } + + scroll + { + title = "Scroll"; + + 52 + { + title = "Scroll Wall"; + id = "Scroll_Wall"; + requiresactivation = false; + + arg0 + { + title = "Line Tag"; + type = 15; + } + arg1 + { + title = "Horizontal speed"; + } + arg2 + { + title = "Vertical speed"; + } + arg3 + { + title = "Side"; + type = 11; + enum = "frontback"; + } + arg4 + { + title = "Flags"; + type = 12; + enum + { + 1 = "Scroll upper"; + 2 = "Scroll middle"; + 4 = "Scroll lower"; + } + } + } + + 100 //Scroll_Texture_Left + { + arg1 + { + title = "Sidedef Part"; + type = 12; + enum = "sidedef_part"; + } + } + + 101 //Scroll_Texture_Right + { + arg1 + { + title = "Sidedef Part"; + type = 12; + enum = "sidedef_part"; + } + } + + 102 //Scroll_Texture_Up + { + arg1 + { + title = "Sidedef Part"; + type = 12; + enum = "sidedef_part"; + } + } + + 103 //Scroll_Texture_Down + { + arg1 + { + title = "Sidedef Part"; + type = 12; + enum = "sidedef_part"; + } + } + + 221 + { + title = "Scroll Texture Both"; + id = "Scroll_Texture_Both"; + requiresactivation = false; + + arg0 + { + title = "Line Tag"; + type = 15; + } + arg1 + { + title = "Left Speed"; + type = 11; + enum = "scroll_speeds"; + } + arg2 + { + title = "Right Speed"; + type = 11; + enum = "scroll_speeds"; + } + arg3 + { + title = "Down Speed"; + type = 11; + enum = "scroll_speeds"; + } + arg4 + { + title = "Up Speed"; + type = 11; + enum = "scroll_speeds"; + } + } + 222 + { + title = "Scroll Texture Model"; + id = "Scroll_Texture_Model"; + requiresactivation = false; + + arg1 + { + title = "Options"; + type = 12; + enum + { + 1 = "Displacement"; + 2 = "Accelerative"; + } + } + } + + 223 + { + title = "Scroll Floor"; + id = "Scroll_Floor"; + requiresactivation = false; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Options"; + type = 12; + enum + { + 1 = "Displacement"; + 2 = "Accelerative"; + 4 = "Scroll by linedef dx/dy"; + } + } + arg2 + { + title = "Scroll"; + type = 11; + enum + { + 0 = "Texture only"; + 1 = "Things only"; + 2 = "Both"; + } + } + arg3 + { + title = "Horizontal Speed"; + default = 128; + type = 11; + enum = "sector_scroll_speeds_x"; + } + arg4 + { + title = "Vertical Speed"; + default = 128; + type = 11; + enum = "sector_scroll_speeds_y"; + } + } + 224 + { + title = "Scroll Ceiling"; + id = "Scroll_Ceiling"; + requiresactivation = false; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Options"; + type = 12; + enum + { + 1 = "Displacement"; + 2 = "Accelerative"; + 4 = "Scroll by linedef dx/dy"; + } + } + arg3 + { + title = "Horizontal Speed"; + default = 128; + type = 11; + enum = "sector_scroll_speeds_x"; + } + arg4 + { + title = "Vertical Speed"; + default = 128; + type = 11; + enum = "sector_scroll_speeds_y"; + } + } + 225 + { + title = "Scroll Texture by Offsets"; + id = "Scroll_Texture_Offsets"; + requiresactivation = false; + + arg0 + { + title = "Sidedef Part"; + type = 12; + enum = "sidedef_part"; + } + } + } + + + light + { + 109 + { + title = "Lightning Control"; + id = "Light_ForceLightning"; + + arg0 + { + title = "Mode"; + type = 11; + enum + { + 0 = "Enable Lightning Mode"; + 1 = "Flash Once"; + 2 = "Terminate Lightning Mode"; + } + } + } + 117 + { + title = "Light Stop"; + id = "Light_Stop"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + } + 232 + { + title = "Light Strobe (Doom mode)"; + id = "Light_StrobeDoom"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Brightest Duration (tics)"; + type = 11; + enum = "delay_tics"; + default = 35; + } + arg2 + { + title = "Darkest Duration (tics)"; + type = 11; + enum = "delay_tics"; + default = 35; + } + } + 233 + { + title = "Light Change to Darkest Neightbour"; + id = "Light_MinNeighbor"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + } + 234 + { + title = "Light Change to Brightest Neightbour"; + id = "Light_MaxNeighbor"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + } + } + + sector + { + title = "Sector"; + + 48 + { + title = "Sector Attach 3D Midtex"; + id = "Sector_Attach3dMidtex"; + requiresactivation = false; + + arg0 + { + title = "Line Tag"; + type = 15; + } + arg1 + { + title = "Sector Tag"; + type = 13; + } + arg2 + { + title = "Floor / Ceiling"; + type = 11; + enum = "floorceiling"; + } + } + 51 + { + title = "Sector Set Link"; + id = "Sector_SetLink"; + + arg0 + { + title = "Control Sector Tag"; + type = 13; + } + arg1 + { + title = "Target Sector Tag"; + type = 13; + } + arg2 + { + title = "Floor / Ceiling"; + type = 11; + enum = "floorceiling"; + } + arg3 + { + title = "Move Type"; + type = 12; + enum + { + 0 = "Unlink target sector(s) from the control sector"; + 1 = "Link target sector's floor to the specified surface of the control sector"; + 2 = "Link target sector's ceiling to the specified surface of the control sector"; + 4 = "Target floor movement is the opposite direction as the control sector's surface (requires bit 1)"; + 8 = "Target ceiling movement is the opposite direction as the control sector's surface (requires bit 2)"; + } + } + } + + 98 + { + title = "Sector Set Translucent"; + id = "Sector_SetTranslucent"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Floor / Ceiling"; + type = 11; + enum = "floorceiling"; + } + arg2 + { + title = "Opacity"; + } + arg3 + { + title = "Translucency Type"; + type = 11; + enum + { + 0 = "Normal"; + 1 = "Additive"; + } + } + } + + 54 + { + title = "Sector Change Flags"; + id = "Sector_ChangeFlags"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Set Flags"; + type = 12; + enum = "sector_flags"; + } + arg2 + { + title = "Clear Flags"; + type = 12; + enum = "sector_flags"; + } + } + 57 + { + title = "Sector Set Portal"; + id = "Sector_SetPortal"; + requiresactivation = false; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Portal Type"; + type = 11; + enum + { + 0 = "Link to portal with same tag"; + 1 = "Copy portal from second tag"; + 2 = "Eternity-style skybox portal"; + 3 = "Plane portal"; + 4 = "Horizon portal"; + 5 = "Copy portal to line"; + 6 = "Interactive portal"; + } + } + arg2 + { + title = "Plane"; + type = 11; + enum + { + 0 = "Floor"; + 1 = "Ceiling"; + 2 = "Both"; + 3 = "Any (\"Copy portal\" types only)"; + } + } + arg3 + { + title = "Misc"; + tooltip = "For type 0 portal: specifies whether the line belongs to the sector viewed\nthrough the portal (1) or the sector in which the portal is seen (0).\nFor type 1 portal: specifies the sector tag of the portal to copy."; + } + arg4 + { + title = "Opacity"; + } + } + 58 + { + title = "Sector Copy Scroller"; + id = "Sector_CopyScroller"; + requiresactivation = false; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Scroller Type"; + type = 12; + enum + { + 1 = "Copy ceiling scroller"; + 2 = "Copy floor scroller"; + 4 = "Copy carrying effect"; + } + } + } + 160 + { + title = "Sector Set 3D Floor"; + id = "Sector_Set3dFloor"; + requiresactivation = false; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Type"; + type = 26; + default = 1; + enum + { + 0 = "Vavoom-Style"; + 1 = "Solid"; + 2 = "Swimmable"; + 3 = "Non-Solid"; + } + flags + { + 4 = "Render-Inside"; + 16 = "Invert Visibility Rules"; + 32 = "Invert Shootability Rules"; + } + } + arg2 + { + title = "Flags"; + type = 12; + enum + { + 1 = "Disable light effects"; + 2 = "Restrict light inside"; + 4 = "Fog effect (GZDoom only)"; + 8 = "Ignore bottom height"; + 16 = "Use upper texture"; + 32 = "Use lower texture"; + 64 = "Additive transluency"; + 512 = "Fade effect (no view blend)"; + 1024 = "Reset light effects"; + } + } + arg3 + { + title = "Opacity"; + default = 255; + } + } + 161 + { + title = "Sector Set Contents (Vavoom compatibility)"; + id = "Sector_SetContents"; + + arg0 + { + title = "Type"; + type = 11; + enum + { + 0 = "Empty"; + 1 = "Water"; + 2 = "Lava"; + 3 = "Nukage"; + 4 = "Slime"; + 5 = "Hellslime"; + 6 = "Blood"; + 7 = "Sludge"; + 8 = "Hazard"; + 9 = "Boom-style water"; + } + } + arg1 + { + title = "Translucency Percent"; + } + arg2 + { + title = "Flags"; + type = 12; + enum + { + 1 = "Don't block movement"; + 2 = "Don't block sight"; + 4 = "Don't block shooting"; + 8 = "Additive translucency"; + } + } + } + 185 + { + title = "Sector Rotate Flat"; + id = "Sector_SetRotation"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Floor Angle"; + type = 8; + } + arg2 + { + title = "Ceiling Angle"; + type = 8; + } + } + 186 + { + title = "Sector Ceiling Panning"; + id = "Sector_SetCeilingPanning"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Horizontal Integral"; + } + arg2 + { + title = "Horizontal Fractional"; + } + arg3 + { + title = "Vertical Integral"; + } + arg4 + { + title = "Vertical Fractional"; + } + } + 187 + { + title = "Sector Floor Panning"; + id = "Sector_SetFloorPanning"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Horizontal Integral"; + } + arg2 + { + title = "Horizontal Fractional"; + } + arg3 + { + title = "Vertical Integral"; + } + arg4 + { + title = "Vertical Fractional"; + } + } + 188 + { + title = "Sector Ceiling Scale"; + id = "Sector_SetCeilingScale"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Horizontal Integral"; + } + arg2 + { + title = "Horizontal Fractional"; + } + arg3 + { + title = "Vertical Integral"; + } + arg4 + { + title = "Vertical Fractional"; + } + } + 189 + { + title = "Sector Floor Scale"; + id = "Sector_SetFloorScale"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Horizontal Integral"; + } + arg2 + { + title = "Horizontal Fractional"; + } + arg3 + { + title = "Vertical Integral"; + } + arg4 + { + title = "Vertical Fractional"; + } + } + 212 + { + title = "Sector Color"; + id = "Sector_SetColor"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Red"; + } + arg2 + { + title = "Green"; + } + arg3 + { + title = "Blue"; + } + arg4 + { + title = "Desaturation"; + } + } + 213 + { + title = "Sector Fade"; + id = "Sector_SetFade"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Red"; + } + arg2 + { + title = "Green"; + } + arg3 + { + title = "Blue"; + } + } + 214 + { + title = "Sector Damage"; + id = "Sector_SetDamage"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Damage Amount"; + default = 15; + } + arg2 + { + title = "Death"; + type = 11; + enum = "death_types"; + } + } + 216 + { + title = "Sector Gravity"; + id = "Sector_SetGravity"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Gravity Integral"; + } + arg2 + { + title = "Gravity Fractional"; + } + } + + 218 + { + title = "Sector Wind"; + id = "Sector_SetWind"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Wind Strength"; + } + arg2 + { + title = "Wind Angle"; + type = 22; + } + arg3 + { + title = "Use Line Vector"; + type = 11; + enum = "noyes"; + } + } + 219 + { + title = "Sector Friction"; + id = "Sector_SetFriction"; + requiresactivation = false; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Friction Amount"; + type = 11; + enum + { + 0 = "Use Line Length"; + 1 = "Very Sludgy"; + 50 = "Sludgy"; + 100 = "Normal"; + 200 = "Icy"; + 255 = "Very Icy"; + } + } + } + + 220 + { + title = "Sector Current"; + id = "Sector_SetCurrent"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Current Strength"; + } + arg2 + { + title = "Current Angle"; + type = 22; + } + arg3 + { + title = "Use Line Vector"; + type = 11; + enum = "noyes"; + } + } + } + + alert + { + title = "Alert"; + + 173 + { + title = "Alert monsters"; + id = "NoiseAlert"; + + arg0 + { + title = "Target Tag"; + type = 14; + } + arg1 + { + title = "Emitter Tag"; + type = 14; + } + } + } + + communicator + { + title = "Communicator"; + + 174 + { + title = "Communicator Message"; + id = "SendToCommunicator"; + + arg0 + { + title = "Message ID"; + } + arg1 + { + title = "Front Side Only"; + type = 11; + enum = "noyes"; + } + arg2 + { + title = "Print Activator Name"; + type = 11; + enum = "noyes"; + } + arg3 + { + title = "Add to Log"; + type = 11; + enum = "yesno"; + } + } + } + + change + { + title = "Change"; + + 157 + { + title = "Set Global Fog Parameter (GZDoom only)"; + id = "SetGlobalFogParameter"; + + arg0 + { + title = "Property"; + type = 11; + enum + { + 0 = "Density"; + 1 = "Outside density"; + 2 = "Skyfog"; + } + } + arg1 + { + title = "Value"; + } + } + 179 + { + title = "Change Skill"; + id = "ChangeSkill"; + + arg0 + { + title = "New Skill Level"; + type = 11; + enum + { + 0 = "Very Easy"; + 1 = "Easy"; + 2 = "Normal"; + 3 = "Hard"; + 4 = "Nightmare!"; + } + } + } + } + + plane + { + title = "Plane"; + + 118 + { + title = "Plane Copy (slope)"; + id = "Plane_Copy"; + requiresactivation = false; + + arg0 + { + title = "Front Floor Tag"; + type = 13; + } + arg1 + { + title = "Front Ceiling Tag"; + type = 13; + } + arg2 + { + title = "Back Floor Tag"; + type = 13; + } + arg3 + { + title = "Back Ceiling Tag"; + type = 13; + } + arg4 + { + title = "Share Slope"; + type = 12; + enum + { + 1 = "Front floor to back sector"; + 2 = "Back floor to front sector"; + 4 = "Front ceiling to back sector"; + 8 = "Back ceiling to front sector"; + } + } + } + 159 + { + title = "Plane Reflection (OpenGL only)"; + id = "Sector_SetPlaneReflection"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Floor Reflectiveness"; + } + arg2 + { + title = "Ceiling Reflectiveness"; + } + } + 181 + { + title = "Plane Align (slope)"; + id = "Plane_Align"; + requiresactivation = false; + + arg0 + { + title = "Align Floor"; + type = 11; + enum + { + 0 = "None"; + 1 = "Front"; + 2 = "Back"; + } + } + arg1 + { + title = "Align Ceiling"; + type = 11; + enum + { + 0 = "None"; + 1 = "Front"; + 2 = "Back"; + } + } + } + } + + static + { + title = "Static"; + + 190 + { + title = "Static Init"; + id = "Static_Init"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Property"; + type = 11; + enum + { + 0 = "Set the gravity to the length of the linedef"; + 1 = "Set the light or fog color in a sector"; + 2 = "Set damage to the length of the linedef"; + 3 = "Define a sector link"; + 255 = "Use the line's upper texture as the sky in any tagged sectors"; + } + } + arg2 + { + title = "Flip Sky / Ceiling"; + } + arg3 + { + title = "Movement Type"; + } + } + } + + player + { + title = "Player"; + + 191 + { + title = "Set Player Property"; + id = "SetPlayerProperty"; + + arg0 + { + title = "Target"; + type = 11; + enum + { + 0 = "Activator"; + 1 = "Everyone"; + } + } + arg1 + { + title = "Enable"; + type = 11; + enum = "noyes"; + } + arg2 + { + title = "Property"; + type = 11; + enum + { + 0 = "PROP_FROZEN"; + 1 = "PROP_NOTARGET"; + 2 = "PROP_INSTANTWEAPONSWITCH"; + 3 = "PROP_FLY"; + 4 = "PROP_TOTALLYFROZEN"; + 16 = "PROP_BUDDHA"; + } + } + } + } + + translucent + { + title = "Translucent"; + + 208 + { + title = "Translucent Line"; + id = "TranslucentLine"; + requiresactivation = false; + + arg1 + { + title = "Opacity"; + default = 128; + } + arg2 + { + title = "Additive"; + type = 11; + enum = "noyes"; + } + } + } + + point + { + title = "Point"; + + 227 + { + title = "Point Pusher/Puller Set Force"; + id = "PointPush_SetForce"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Thing Tag"; + type = 14; + } + arg2 + { + title = "Strength"; + } + arg3 + { + title = "Use Line Vector"; + type = 11; + enum = "noyes"; + } + } + } + + camera + { + title = "Camera"; + + 237 + { + title = "Change Camera"; + id = "ChangeCamera"; + + arg0 + { + title = "Thing Tag"; + type = 14; + } + arg1 + { + title = "Target"; + type = 11; + enum + { + 0 = "Activator"; + 1 = "Everyone"; + } + } + arg2 + { + title = "Movement Cancels"; + type = 11; + enum = "noyes"; + } + } + } + + elevator + { + title = "Elevator"; + + 245 + { + title = "Elevator Raise to Nearest Floor"; + id = "Elevator_RaiseToNearest"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + } + 246 + { + title = "Elevator Move to Activated Floor"; + id = "Elevator_MoveToFloor"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + } + 247 + { + title = "Elevator Lower to Nearest Floor"; + id = "Elevator_LowerToNearest"; + + arg0 + { + title = "Sector Tag"; + type = 13; + } + arg1 + { + title = "Movement Speed"; + type = 11; + enum = "plat_speeds"; + default = 16; + } + } + } + line + { + 156 // Line_SetPortal + { + arg1 + { + title = "This Line Tag"; + tooltip = "The tag number of the current line"; + type = 15; + } + } + } + polyobj + { + 1 // Polyobject Start Line + { + arg3 + { + title = "Set Line ID"; + type = 0; + } + } + 5 // Polyobject Explicit Line + { + arg4 + { + title = "Set Line ID"; + type = 0; + } + } + } + plane + { + 181 //Plane_Align + { + arg2 + { + title = "Set Line ID"; + type = 0; + } + } + } + scroll + { + 52 //Scroll_Wall + { + arg0 + { + title = "Set Line ID"; + type = 0; + } + } + 221 //Scroll_Texture_Both + { + arg0 + { + title = "Line ID"; + type = 0; + } + } + 222 //Scroll_Texture_Model + { + arg0 + { + title = "Set Line ID"; + type = 0; + } + } + } + sector + { + 48 //Sector_Attach3dMidtex + { + arg0 + { + title = "Line ID"; + type = 0; + } + } + 160 //Sector_Set3dFloor + { + arg1 + { + title = "Type"; + type = 26; + default = 1; + enum + { + 0 = "Vavoom-Style"; + 1 = "Solid"; + 2 = "Swimmable"; + 3 = "Non-Solid"; + } + flags + { + 4 = "Render-Inside"; + 8 = "Use Arg5 as Line ID"; + 16 = "Invert Visibility Rules"; + 32 = "Invert Shootability Rules"; + } + } + arg4 + { + title = "Line ID / Hi-Tag"; + } + } + } + teleport + { + 215 //Teleport_Line + { + arg0 + { + title = "Line ID"; + type = 0; + } + arg1 + { + title = "Target Line ID"; + type = 0; + } + } + } + transfer + { + 16 //Transfer_WallLight + { + arg0 + { + title = "Line ID"; + type = 0; + } + } + } + translucent + { + 208 //TranslucentLine + { + arg0 + { + title = "Set Line ID"; + type = 0; + } + arg3 + { + title = "Flags"; + type = 12; + enum + { + 1 = "Sound boundary"; + 2 = "Railing"; + 4 = "Block floating monsters"; + 8 = "Clip mid texture"; + 16 = "Wrap mid texture"; + 32 = "3D mid texture"; + 64 = "Check switch height"; + } + } + } + } + // No Line_SetIdentification in UDMF! + line + { + 121 = NULL; + } +} + +enums +{ + change + { + 0 = "No texture or type change"; + 1 = "Copy texture, zero type; trigger model"; + 2 = "Copy texture, zero type; numeric model"; + 3 = "Copy texture, preserve type; trigger model"; + 4 = "Copy texture, preserve type; numeric model"; + 5 = "Copy texture and type; trigger model"; + 6 = "Copy texture and type; numeric model"; + } +} \ No newline at end of file diff --git a/Build/Configurations/Includes/Eternity_things.cfg b/Build/Configurations/Includes/Eternity_things.cfg new file mode 100644 index 0000000000000000000000000000000000000000..a30c2b29efc5bd34c843ff4711373fc71ea20d17 --- /dev/null +++ b/Build/Configurations/Includes/Eternity_things.cfg @@ -0,0 +1,124 @@ +monsters +{ + 888 + { + title = "Dog"; + sprite = "internal:dog"; + class = "MBFHelperDog"; + width = 12; + height = 28; + } +} + +eternity +{ + color = 8; // Grey + arrow = 1; + title = "Eternity Items"; + width = 0; + height = 0; + sort = 1; + fixedsize = true; + + 5003 + { + title = "Camera spot"; + class = "SMMUCameraSpot"; + } + 1200 + { + title = "Enviro sequence 0"; + } + 1300 + { + title = "Enviro sequence param"; + } + 1400 + { + title = "Sector sequence 0"; + } + 1500 + { + title = "Sector sequence param"; + } + 5004 + { + title = "ExtraData thing"; + } + 5006 + { + title = "Skybox camera"; + class = "EESkyboxCam"; + } + 5007 + { + title = "Particle Drip"; + class = "EEParticleDrip"; + } + 9001 + { + title = "Map spot"; + class = "EEMapSpot"; + } + 9013 + { + title = "Map spot gravity"; + class = "EEMapSpotGravity"; + } + 9027 + { + title = "Particle fountain red"; + } + 9028 + { + title = "Particle fountain green"; + } + 9029 + { + title = "Particle fountain blue"; + } + 9030 + { + title = "Particle fountain yellow"; + } + 9031 + { + title = "Particle fountain purple"; + } + 9032 + { + title = "Particle fountain black"; + } + 9033 + { + title = "Particle fountain white"; + } + 9300t + { + title = "Polyobject anchor"; + class = "EEPolyObjAnchor"; + } + 9301 + { + title = "Polyobject spawn spot"; + class = "EEPolyObjSpawnSpot"; + } + 9302 + { + title = "Polyobject spawn spot crush"; + class = "EEPolyObjSpawnSpotCrush"; + } + 9303 + { + title = "Polyobject spawn spot damage"; + class = "EEPolyObjSpawnSpotDamage"; + } + 14001 + { + title = "Ambience 1"; + } + 14065 + { + title = "Ambience param"; + } +} \ No newline at end of file diff --git a/Build/Configurations/Includes/GZDoom_things.cfg b/Build/Configurations/Includes/GZDoom_things.cfg index 185892cbbfa093a4c81558a340f8bdfc74b2108b..ddfdff99bc8efb3bdc126c8fca5deefa36ba2e98 100644 --- a/Build/Configurations/Includes/GZDoom_things.cfg +++ b/Build/Configurations/Includes/GZDoom_things.cfg @@ -468,7 +468,11 @@ gzdoom { zdoom { - blocking = 2; - 5004 = "Map Spot (FraggleScript)"; + 5004 + { + title = "Map Spot (FraggleScript)"; + sprite = "internal:MapSpot"; + class = "FS_MapSpot"; + } } } \ No newline at end of file diff --git a/Build/Configurations/Includes/Hexen_linedefs.cfg b/Build/Configurations/Includes/Hexen_linedefs.cfg index 7994c8f8775303b4c47b743fe7ba273c8c02c316..28fc86823dcc7583d5e661d95bcaa10e910675a7 100644 --- a/Build/Configurations/Includes/Hexen_linedefs.cfg +++ b/Build/Configurations/Includes/Hexen_linedefs.cfg @@ -1,4 +1,3 @@ - misc { @@ -401,7 +400,7 @@ door title = "Movement Speed"; type = 11; enum = "door_speeds"; - default = 32; + default = 16; } arg2 @@ -427,7 +426,7 @@ door title = "Movement Speed"; type = 11; enum = "door_speeds"; - default = 32; + default = 16; } arg2 @@ -453,7 +452,7 @@ door title = "Movement Speed"; type = 11; enum = "door_speeds"; - default = 32; + default = 16; } arg2 @@ -461,7 +460,7 @@ door title = "Close Delay"; type = 11; enum = "reset_tics"; - default = 105; + default = 150; } arg3 @@ -487,7 +486,7 @@ door title = "Movement Speed"; type = 11; enum = "door_speeds"; - default = 32; + default = 16; } arg2 @@ -495,7 +494,7 @@ door title = "Close Delay"; type = 11; enum = "reset_tics"; - default = 105; + default = 150; } arg3 @@ -1453,8 +1452,9 @@ teleport arg0 { - title = "Target MapSpot Tag"; + title = "Target Teleport Dest. Tag"; type = 14; + targetclasses = "TeleportDest,TeleportDest2,TeleportDest3"; } arg1 @@ -1471,8 +1471,9 @@ teleport arg0 { - title = "Target MapSpot Tag"; + title = "Target Teleport Dest. Tag"; type = 14; + targetclasses = "TeleportDest,TeleportDest2,TeleportDest3"; } arg1 @@ -1501,7 +1502,7 @@ teleport arg1 { - title = "Position"; + title = "Tgt Player Start Arg0"; } } } @@ -1608,6 +1609,7 @@ thing { title = "MapSpot Tag"; type = 14; + targetclasses = "MapSpot,MapSpotGravity"; } arg1 @@ -1643,6 +1645,7 @@ thing { title = "MapSpot Tag"; type = 14; + targetclasses = "MapSpot,MapSpotGravity"; } arg1 @@ -1668,6 +1671,7 @@ thing { title = "MapSpot Tag"; type = 14; + targetclasses = "MapSpot,MapSpotGravity"; } arg1 @@ -1703,6 +1707,7 @@ thing { title = "Target MapSpot Tag"; type = 14; + targetclasses = "MapSpot,MapSpotGravity"; } arg1 @@ -2183,5 +2188,4 @@ sector title = "Sound Number"; } } -} - +} \ No newline at end of file diff --git a/Build/Configurations/Includes/Hexen_things.cfg b/Build/Configurations/Includes/Hexen_things.cfg index 2135c09b61ee7be273ff4dca9bff06d0b05b1adf..a50b32a15f9f3b74e3a870c7a0446599ceed4708 100644 --- a/Build/Configurations/Includes/Hexen_things.cfg +++ b/Build/Configurations/Includes/Hexen_things.cfg @@ -1,4 +1,3 @@ - players { color = 10; // Light Green @@ -519,23 +518,23 @@ puzzle } 9014 { - title = "Flame mask"; + title = "Flame Mask"; sprite = "ASK2A0"; } 9015 { - title = "Glaive seal"; + title = "Glaive Seal"; sprite = "AFWPA0"; } 9016 { - title = "Holy relic"; + title = "Holy Relic"; sprite = "ACWPA0"; width = 10; } 9017 { - title = "Sigil of the magus"; + title = "Sigil of the Magus"; sprite = "AMWPA0"; width = 10; } @@ -666,6 +665,7 @@ obstacles title = "Bell"; sprite = "BBLLA0"; width = 56; + hangs = 1; } 103 { @@ -1518,6 +1518,7 @@ other title = "Polyobject Anchor"; sprite = "internal:anchor"; fixedrotation = true; + error = 0; // Can be outside of map geometry } 3001 { @@ -1622,6 +1623,16 @@ other } 112 = "Spawn Fly"; 113 = "Spawn Leaf"; - 9001 = "Map Spot"; - 9013 = "Map Spot (gravity)"; + 9001 + { + title = "Map Spot"; + sprite = "internal:MapSpot"; + class = "MapSpot"; + } + 9013 + { + title = "Map Spot (gravity)"; + sprite = "internal:MapSpotGravity"; + class = "MapSpotGravity"; + } } diff --git a/Build/Configurations/Includes/Strife_linedefs.cfg b/Build/Configurations/Includes/Strife_linedefs.cfg index b50a06ecdb46acf4851fb2abc8ec518159731e21..0bea96f7c5e460449ea264258212268595b7ae93 100644 --- a/Build/Configurations/Includes/Strife_linedefs.cfg +++ b/Build/Configurations/Includes/Strife_linedefs.cfg @@ -1375,7 +1375,7 @@ forcefield 147 { title = "ForceField Remove Around Tagged Sector"; - prefix = "SR"; + prefix = "S1"; } 148 diff --git a/Build/Configurations/Includes/Strife_things.cfg b/Build/Configurations/Includes/Strife_things.cfg index 03bef754e838ccd7724b6e80080a52510df0e842..c27aac7e560d12478e72fe03b21509de6f616865 100644 --- a/Build/Configurations/Includes/Strife_things.cfg +++ b/Build/Configurations/Includes/Strife_things.cfg @@ -401,7 +401,7 @@ ammunition 153 { - title = "Phoshorus-Grenade Rounds"; + title = "Phosphorus-Grenade Rounds"; sprite = "GRN2A0"; } diff --git a/Build/Configurations/Includes/ZDoom_common.cfg b/Build/Configurations/Includes/ZDoom_common.cfg index 40d67a7919771bc8d935770d5eb2aaff3b9b7e90..d76c76adbcd2215e02ca2f0dee962bf90b6b6524 100644 --- a/Build/Configurations/Includes/ZDoom_common.cfg +++ b/Build/Configurations/Includes/ZDoom_common.cfg @@ -27,12 +27,18 @@ common // generalizedlinedefs is true for Doom format and false for // the other two, so it's not here. generalizedsectors = true; + + //mxd. Maximum safe map size check (0 means skip check) + safeboundary = 0; // Texture loading options mixtexturesflats = true; defaulttexturescale = 1.0f; defaultflatscale = 1.0f; scaledtextureoffsets = true; + + //mxd. Sidedefs compression + sidedefcompressionignoresaction = true; // Texture sources textures diff --git a/Build/Configurations/Includes/ZDoom_generalized.cfg b/Build/Configurations/Includes/ZDoom_generalized.cfg index f9f67c071decaee41ad52dc2c9fa4af70236df9f..18b8981f0c0d90ca0acbb06caa8258b0bc1a71ad 100644 --- a/Build/Configurations/Includes/ZDoom_generalized.cfg +++ b/Build/Configurations/Includes/ZDoom_generalized.cfg @@ -2,111 +2,12 @@ // Generalized sector types gen_sectortypes { - effect - { - 0 = "Normal"; - 1 = "Light Phased"; - 2 = "Light Sequence Start"; - 3 = "Light Sequence Special 1"; - 4 = "Light Sequence Special 2"; - 21 = "Light Phased"; - 22 = "Light Sequence Start"; - 23 = "Light Sequence Special 1"; - 24 = "Light Sequence Special 2"; - 26 = "Stairs Special 1"; - 27 = "Stairs Special 2"; - 65 = "Light Flicker"; - 66 = "Light Strobe Fast"; - 67 = "Light Strobe Slow"; - 68 = "Light Strobe Hurt"; - 69 = "Damage Hellslime"; - 71 = "Damage Nukage"; - 72 = "Light Glow"; - 74 = "Sector Door Close (30 sec)"; - 75 = "Damage End Level"; - 76 = "Light StrobeSlowSync"; - 77 = "Light StrobeFastSync"; - 78 = "Sector Door Raise (5 min)"; - 79 = "Low Friction"; - 80 = "Damage Super Hellslime"; - 81 = "Light Fire Flicker"; - 82 = "Damage -2 or -5% health (no protection)"; - 83 = "Damage -4 or -8% health (no protection)"; - 84 = "Scroll east + -2 or -5% health (no protection)"; - 87 = "Sector uses outside fog"; - 105 = "Delayed damage weak"; - 115 = "Instant death"; - 116 = "Delayed damage strong"; - 118 = "Carry player by tag"; - 196 = "Healing Sector"; - 197 = "Lightning Outdoor"; - 198 = "Lightning Indoor 2"; - 199 = "Lightning Indoor 1"; - 200 = "Sky 2 (MAPINFO)"; - 201 = "Scroll North (slow)"; - 202 = "Scroll North (medium)"; - 203 = "Scroll North (fast)"; - 204 = "Scroll East (slow)"; - 205 = "Scroll East (medium)"; - 206 = "Scroll East (fast)"; - 207 = "Scroll South (slow)"; - 208 = "Scroll South (medium)"; - 209 = "Scroll South (fast)"; - 210 = "Scroll West (slow)"; - 211 = "Scroll West (medium)"; - 212 = "Scroll West (fast)"; - 213 = "Scroll NorthWest (slow)"; - 214 = "Scroll NorthWest (medium)"; - 215 = "Scroll NorthWest (fast)"; - 216 = "Scroll NorthEast (slow)"; - 217 = "Scroll NorthEast (medium)"; - 218 = "Scroll NorthEast (fast)"; - 219 = "Scroll SouthEast (slow)"; - 220 = "Scroll SouthEast (medium)"; - 221 = "Scroll SouthEast (fast)"; - 222 = "Scroll SouthWest (slow)"; - 223 = "Scroll SouthWest (medium)"; - 224 = "Scroll SouthWest (fast)"; - 40 = "Wind East weak"; - 41 = "Wind East medium"; - 42 = "Wind East strong"; - 43 = "Wind North weak"; - 44 = "Wind North medium"; - 45 = "Wind North strong"; - 46 = "Wind South weak"; - 47 = "Wind South medium"; - 48 = "Wind South strong"; - 49 = "Wind West weak"; - 50 = "Wind West medium"; - 51 = "Wind West strong"; - 225 = "Carry East Slow"; - 226 = "Carry East Med.Slow"; - 227 = "Carry East Medium"; - 228 = "Carry East Med.Fast"; - 229 = "Carry East Fast"; - 230 = "Carry North Slow"; - 231 = "Carry North Med.Slow"; - 232 = "Carry North Medium"; - 233 = "Carry North Med.Fast"; - 234 = "Carry North Fast"; - 235 = "Carry South Slow"; - 236 = "Carry South Med.Slow"; - 237 = "Carry South Medium"; - 238 = "Carry South Med.Fast"; - 239 = "Carry South Fast"; - 240 = "Carry West Slow"; - 241 = "Carry West Med.Slow"; - 242 = "Carry West Medium"; - 243 = "Carry West Med.Fast"; - 244 = "Carry West Fast"; - } - damage { 0 = "None"; - 256 = "Damage 5 per second"; - 512 = "Damage 10 per second"; - 768 = "Damage 20 per second"; + 256 = "5 per second"; + 512 = "10 per second"; + 768 = "20 per second"; } secret diff --git a/Build/Configurations/Includes/ZDoom_linedefs.cfg b/Build/Configurations/Includes/ZDoom_linedefs.cfg index d3cae5b2abf9b1e816bfdea6f06ef575156bf9c8..c88a3ee6a87b2948c17ababe1a59972f67af354b 100644 --- a/Build/Configurations/Includes/ZDoom_linedefs.cfg +++ b/Build/Configurations/Includes/ZDoom_linedefs.cfg @@ -1,4 +1,3 @@ - // NOTE: This config contains four structures for different linedefs systems: Doom, Hexen and UDMF. // The ZDoom structure is common to Hexen and UDMF and contains the bulk of the definitions. // The Hexen and UDMF structures contain only the little tweaks needed for these formats. @@ -481,6 +480,7 @@ zdoom { title = "Target MapSpot Tag"; type = 14; + targetclasses = "MapSpot,MapSpotGravity"; } } 86 @@ -502,6 +502,7 @@ zdoom { title = "Target MapSpot Tag"; type = 14; + targetclasses = "MapSpot,MapSpotGravity"; } } 87 @@ -639,6 +640,47 @@ zdoom } } } + 107 + { + title = "Line Set Portal Target"; + id = "Line_SetPortalTarget"; + + arg0 + { + title = "Source Line Tag"; + type = 15; + } + arg1 + { + title = "Target Line Tag"; + type = 15; + } + } + + 55 + { + title = "Line Set Blocking"; + id = "Line_SetBlocking"; + + arg0 + { + title = "Target Line Tag"; + type = 15; + } + arg1 + { + title = "Set Flags"; + type = 12; + enum = "linesetblockingflags"; + } + arg2 + { + title = "Clear Flags"; + type = 12; + enum = "linesetblockingflags"; + } + } + } door @@ -658,14 +700,14 @@ zdoom title = "Animation Speed"; type = 11; enum = "door_speeds"; - default = 32; + default = 16; } arg2 { title = "Close Delay"; type = 11; enum = "reset_tics"; - default = 140; + default = 150; } arg3 { @@ -851,21 +893,30 @@ zdoom { title = "Target"; type = 11; - enum = "generic_floor_target"; + enum + { + 0 = "Move by Movement Amount"; + 1 = "Highest neighboring floor"; + 2 = "Lowest neighboring floor"; + 3 = "Nearest neighboring floor"; + 4 = "Lowest neighboring ceiling"; + 5 = "Sector ceiling"; + 6 = "Move by the height of sector's shortest lower texture"; + } } arg4 { - title = "Options"; + title = "Flags"; type = 12; enum { - 0 = "No change"; - 1 = "Zero sector's special"; - 2 = "Change sector's floor texture"; - 3 = "Change sector's special"; + 0 = "Don't copy anything"; + 1 = "Copy floor texture, remove sector special"; + 2 = "Copy floor texture"; + 3 = "Copy floor texture and special"; 4 = "Use numeric model if set, trigger model if not"; 8 = "Raise floor if set, lower it if not"; - 16 = "Cause crushing damage"; + 16 = "Inflict crushing damage"; } } } @@ -1622,21 +1673,30 @@ zdoom { title = "Target"; type = 11; - enum = "generic_ceiling_target"; + enum + { + 0 = "Move by Movement Amount"; + 1 = "Highest neighboring ceiling"; + 2 = "Lowest neighboring ceiling"; + 3 = "Nearest neighboring ceiling"; + 4 = "Highest neighboring floor"; + 5 = "Sector floor"; + 6 = "Move by the height of sector's shortest upper texture"; + } } arg4 { - title = "Options"; + title = "Flags"; type = 12; enum { - 0 = "No change"; - 1 = "Zero sector's special"; - 2 = "Change sector's ceiling texture"; - 3 = "Change sector's special"; + 0 = "Don't copy anything"; + 1 = "Copy ceiling texture, remove sector special"; + 2 = "Copy ceiling texture"; + 3 = "Copy ceiling texture and special"; 4 = "Use numeric model if set, trigger model if not"; 8 = "Raise ceiling if set, lower it if not"; - 16 = "Cause crushing damage"; + 16 = "Inflict crushing damage"; } } } @@ -2092,8 +2152,9 @@ zdoom arg0 { - title = "Target MapSpot Tag"; + title = "Target Teleport Dest. Tag"; type = 14; + targetclasses = "TeleportDest,TeleportDest2,TeleportDest3"; } arg1 { @@ -2112,6 +2173,18 @@ zdoom } 71 // Teleport_NoFog { + arg1 + { + title = "Teleport Dest. angle usage"; + type = 11; + enum + { + 0 = "Don't change angle and velocity (Hexen-compat)"; + 1 = "Always use the teleport exit's angle (Strife-compat)"; + 2 = "Adjust relatively to the teleport exit's angle, but in the wrong direction (Boom-compat)"; + 3 = "Adjust relatively to the teleport exit's angle (Boom-fixed)"; + } + } arg3 { title = "Keep rel. Height"; @@ -2142,6 +2215,7 @@ zdoom { title = "Target MapSpot Tag"; type = 14; + targetclasses = "MapSpot,MapSpotGravity"; } arg2 { @@ -2158,17 +2232,20 @@ zdoom arg0 { title = "Thing Tag"; + tooltip = "The TID of the actor(s) to teleport.\nIf 0, teleports the activator only."; type = 14; } arg1 { title = "Source Teleport Dest. Tag"; type = 14; + targetclasses = "TeleportDest,TeleportDest2,TeleportDest3"; } arg2 { title = "Target Teleport Dest. Tag"; type = 14; + targetclasses = "TeleportDest,TeleportDest2,TeleportDest3"; } arg3 { @@ -2195,13 +2272,15 @@ zdoom } arg1 { - title = "Source MapSpot Tag"; + title = "Source Tag"; + tooltip = "The spot relative to which to teleport."; type = 14; } arg2 { - title = "Target MapSpot Tag"; + title = "Target Teleport Dest. Tag"; type = 14; + targetclasses = "TeleportDest,TeleportDest2,TeleportDest3"; } arg3 { @@ -2212,6 +2291,7 @@ zdoom arg4 { title = "Group Thing Tag"; + tooltip = "The TID of the thing(s) to teleport.\nIf 0, teleports all actors in the sector"; type = 14; } } @@ -2222,8 +2302,9 @@ zdoom arg0 { - title = "Target MapSpot Tag"; + title = "Target Teleport Dest. Tag"; type = 14; + targetclasses = "TeleportDest,TeleportDest2,TeleportDest3"; } arg1 { @@ -2459,6 +2540,7 @@ zdoom { title = "Mapspot Tag"; type = 14; + targetclasses = "MapSpot,MapSpotGravity"; } arg1 { @@ -2487,6 +2569,7 @@ zdoom { title = "Mapspot Tag"; type = 14; + targetclasses = "MapSpot,MapSpotGravity"; } arg1 { @@ -2565,6 +2648,7 @@ zdoom { title = "Mapspot Tag"; type = 14; + targetclasses = "MapSpot,MapSpotGravity"; } arg1 { @@ -3275,6 +3359,7 @@ zdoom 3 = "Plane portal"; 4 = "Horizon portal"; 5 = "Copy portal to line"; + 6 = "Interactive portal"; } } arg2 @@ -3286,12 +3371,13 @@ zdoom 0 = "Floor"; 1 = "Ceiling"; 2 = "Both"; - 3 = "Any (Copy portal type only)"; + 3 = "Any (\"Copy portal\" types only)"; } } arg3 { title = "Misc"; + tooltip = "For type 0 portal: specifies whether the line belongs to the sector viewed\nthrough the portal (1) or the sector in which the portal is seen (0).\nFor type 1 portal: specifies the sector tag of the portal to copy."; } arg4 { @@ -3323,7 +3409,7 @@ zdoom } 160 { - title = "Sector 3D Floor (OpenGL only)"; + title = "Sector Set 3D Floor"; id = "Sector_Set3dFloor"; requiresactivation = false; @@ -3356,11 +3442,13 @@ zdoom { 1 = "Disable light effects"; 2 = "Restrict light inside"; - 4 = "Fog effect"; + 4 = "Fog effect (GZDoom only)"; 8 = "Ignore bottom height"; 16 = "Use upper texture"; 32 = "Use lower texture"; 64 = "Additive transluency"; + 512 = "Fade effect (no view blend)"; + 1024 = "Reset light effects"; } } arg3 @@ -4304,4 +4392,4 @@ udmf { 121 = NULL; } -} +} \ No newline at end of file diff --git a/Build/Configurations/Includes/ZDoom_misc.cfg b/Build/Configurations/Includes/ZDoom_misc.cfg index c1f17c0a99f1fcf8ef6efb5255fdee1897ea90c1..6d5dcfeae674abd72e47c79dd03f89f9453f1f82 100644 --- a/Build/Configurations/Includes/ZDoom_misc.cfg +++ b/Build/Configurations/Includes/ZDoom_misc.cfg @@ -732,46 +732,20 @@ enums 4 = "Lower"; } - generic_floor_target + linesetblockingflags { - 0 = "Relative offset"; - 1 = "Highest neighbor"; - 2 = "Lowest neighbor"; - 3 = "Nearest neighbor"; - 4 = "Lowest neighbor"; - 5 = "Ceiling"; - 6 = "Shortest lower texture"; - } - - generic_ceiling_target - { - 0 = "Relative offset"; - 1 = "Highest neighbor"; - 2 = "Lowest neighbor"; - 3 = "Nearest neighbor"; - 4 = "Highest neighbor"; - 5 = "Floor"; - 6 = "Shortest lower texture"; - } - - generic_door_types - { - 0 = "Open Close"; - 1 = "Open Stay"; - 2 = "Close Open"; - 3 = "Close Stay"; - 64 = "Open Close (no retrigger)"; - 65 = "Open Stay (no retrigger)"; - 66 = "Close Open (no retrigger)"; - 67 = "Close Stay (no retrigger)"; - 128 = "Open Close (tag is light tag)"; - 129 = "Open Stay (tag is light tag)"; - 130 = "Close Open (tag is light tag)"; - 131 = "Close Stay (tag is light tag)"; - 192 = "Open Close (no retrigger, tag is light tag)"; - 193 = "Open Stay (no retrigger, tag is light tag)"; - 194 = "Close Open (no retrigger, tag is light tag)"; - 195 = "Close Stay (no retrigger, tag is light tag)"; + 0 = "None"; + 1 = "Block creatures"; + 2 = "Block monsters"; + 4 = "Block players"; + 8 = "Block floating creatures"; + 16 = "Block projectiles"; + 32 = "Block all of the above"; + 64 = "Strife railing"; + 128 = "Block use action"; + 256 = "Block monster line of sight"; + 512 = "Block hitscan attacks"; + 1024 = "Block sound"; } generic_lift_types @@ -876,6 +850,7 @@ enums 70 = "70: 2 Seconds"; 105 = "105: 3 Seconds"; 140 = "140: 4 Seconds"; + 150 = "150: Doom default"; 175 = "175: 5 Seconds"; 210 = "210: 6 Seconds"; 245 = "245: 7 Seconds"; @@ -1421,20 +1396,20 @@ enums_hexen 0 = "Yorick's skull"; 1 = "Heart of D'Sparil"; 2 = "Ruby Planet"; - 3 = "Emerald Planet (1)"; - 4 = "Emerald Planet (2)"; - 5 = "Sapphire Planet (1)"; - 6 = "Sapphire Planet (2)"; + 3 = "Emerald Planet 1"; + 4 = "Emerald Planet 2"; + 5 = "Sapphire Planet 1"; + 6 = "Sapphire Planet 2"; 7 = "Daemon Codex"; 8 = "Liber Obscura"; 9 = "Flame Mask"; 10 = "Glaive Seal"; 11 = "Holy Relic"; 12 = "Sigil of the Magus"; - 13 = "Iron gear"; - 14 = "Brass gear"; - 15 = "Brass and iron gear"; - 16 = "Silver and brass gear"; + 13 = "Clock Gear (steel)"; + 14 = "Clock Gear (bronze)"; + 15 = "Clock Gear (steel and bronze)"; + 16 = "Clock Gear (bronze and steel)"; } } @@ -1930,3 +1905,25 @@ doormaking_udmf makedoorarg4 = 0; } +//mxd. Ambient sound thing args (because copy-pasting those 66 times is not fun) +ambientsoundthing_args +{ + arg1 + { + title = "Volume"; + type = 11; + enum = "sound_volume"; + } + arg2 + { + title = "Min. Fading Distance"; + } + arg3 + { + title = "Max. Heard Distance"; + } + arg4 + { + title = "Distance Multiplier"; + } +} \ No newline at end of file diff --git a/Build/Configurations/Includes/ZDoom_sectors.cfg b/Build/Configurations/Includes/ZDoom_sectors.cfg index e2fad793b4f24676de84f495f0f9e81f7ed83f83..35241a60a0314dbeb22055d6c5ef8aeebc94cd42 100644 --- a/Build/Configurations/Includes/ZDoom_sectors.cfg +++ b/Build/Configurations/Includes/ZDoom_sectors.cfg @@ -52,10 +52,12 @@ zdoom 84 = "Scroll east + -2 or -5% health (no protection)"; 85 = "Damage Sludge -4% health"; 87 = "Sector uses outside fog"; + 90 = "Skybox sector (GZDoom only)"; 105 = "Delayed damage weak (hazardcount +2/16 per second)"; 115 = "Instant death"; 116 = "Delayed damage strong (hazardcount +4/16 per second)"; 118 = "Carry player by tag"; + 195 = "Hidden Sector (automap)"; 196 = "Healing Sector"; 197 = "Lightning Outdoor"; 198 = "Lightning Indoor 2"; diff --git a/Build/Configurations/Includes/ZDoom_things.cfg b/Build/Configurations/Includes/ZDoom_things.cfg index a8cdb86b6c1a75b8ab6d0a97c2b580fac0b32c15..45d85e9d05e0a5ba860cc0d5f00cb73008e1e136 100644 --- a/Build/Configurations/Includes/ZDoom_things.cfg +++ b/Build/Configurations/Includes/ZDoom_things.cfg @@ -121,70 +121,326 @@ zdoom } } - 14001 = "Ambient Sound 01"; - 14002 = "Ambient Sound 02"; - 14003 = "Ambient Sound 03"; - 14004 = "Ambient Sound 04"; - 14005 = "Ambient Sound 05"; - 14006 = "Ambient Sound 06"; - 14007 = "Ambient Sound 07"; - 14008 = "Ambient Sound 08"; - 14009 = "Ambient Sound 09"; - 14010 = "Ambient Sound 10"; - 14011 = "Ambient Sound 11"; - 14012 = "Ambient Sound 12"; - 14013 = "Ambient Sound 13"; - 14014 = "Ambient Sound 14"; - 14015 = "Ambient Sound 15"; - 14016 = "Ambient Sound 16"; - 14017 = "Ambient Sound 17"; - 14018 = "Ambient Sound 18"; - 14019 = "Ambient Sound 19"; - 14020 = "Ambient Sound 20"; - 14021 = "Ambient Sound 21"; - 14022 = "Ambient Sound 22"; - 14023 = "Ambient Sound 23"; - 14024 = "Ambient Sound 24"; - 14025 = "Ambient Sound 25"; - 14026 = "Ambient Sound 26"; - 14027 = "Ambient Sound 27"; - 14028 = "Ambient Sound 28"; - 14029 = "Ambient Sound 29"; - 14030 = "Ambient Sound 30"; - 14031 = "Ambient Sound 31"; - 14032 = "Ambient Sound 32"; - 14033 = "Ambient Sound 33"; - 14034 = "Ambient Sound 34"; - 14035 = "Ambient Sound 35"; - 14036 = "Ambient Sound 36"; - 14037 = "Ambient Sound 37"; - 14038 = "Ambient Sound 38"; - 14039 = "Ambient Sound 39"; - 14040 = "Ambient Sound 40"; - 14041 = "Ambient Sound 41"; - 14042 = "Ambient Sound 42"; - 14043 = "Ambient Sound 43"; - 14044 = "Ambient Sound 44"; - 14045 = "Ambient Sound 45"; - 14046 = "Ambient Sound 46"; - 14047 = "Ambient Sound 47"; - 14048 = "Ambient Sound 48"; - 14049 = "Ambient Sound 49"; - 14050 = "Ambient Sound 50"; - 14051 = "Ambient Sound 51"; - 14052 = "Ambient Sound 52"; - 14053 = "Ambient Sound 53"; - 14054 = "Ambient Sound 54"; - 14055 = "Ambient Sound 55"; - 14056 = "Ambient Sound 56"; - 14057 = "Ambient Sound 57"; - 14058 = "Ambient Sound 58"; - 14059 = "Ambient Sound 59"; - 14060 = "Ambient Sound 60"; - 14061 = "Ambient Sound 61"; - 14062 = "Ambient Sound 62"; - 14063 = "Ambient Sound 63"; - 14064 = "Ambient Sound 64"; + 14001 + { + title = "Ambient Sound 01"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14002 + { + title = "Ambient Sound 02"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14003 + { + title = "Ambient Sound 03"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14004 + { + title = "Ambient Sound 04"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14005 + { + title = "Ambient Sound 05"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14006 + { + title = "Ambient Sound 06"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14007 + { + title = "Ambient Sound 07"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14008 + { + title = "Ambient Sound 08"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14009 + { + title = "Ambient Sound 09"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14010 + { + title = "Ambient Sound 10"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14011 + { + title = "Ambient Sound 11"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14012 + { + title = "Ambient Sound 12"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14013 + { + title = "Ambient Sound 13"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14014 + { + title = "Ambient Sound 14"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14015 + { + title = "Ambient Sound 15"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14016 + { + title = "Ambient Sound 16"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14017 + { + title = "Ambient Sound 17"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14018 + { + title = "Ambient Sound 18"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14019 + { + title = "Ambient Sound 19"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14020 + { + title = "Ambient Sound 20"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14021 + { + title = "Ambient Sound 21"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14022 + { + title = "Ambient Sound 22"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14023 + { + title = "Ambient Sound 23"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14024 + { + title = "Ambient Sound 24"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14025 + { + title = "Ambient Sound 25"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14026 + { + title = "Ambient Sound 26"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14027 + { + title = "Ambient Sound 27"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14028 + { + title = "Ambient Sound 28"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14029 + { + title = "Ambient Sound 29"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14030 + { + title = "Ambient Sound 30"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14031 + { + title = "Ambient Sound 31"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14032 + { + title = "Ambient Sound 32"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14033 + { + title = "Ambient Sound 33"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14034 + { + title = "Ambient Sound 34"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14035 + { + title = "Ambient Sound 35"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14036 + { + title = "Ambient Sound 36"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14037 + { + title = "Ambient Sound 37"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14038 + { + title = "Ambient Sound 38"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14039 + { + title = "Ambient Sound 39"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14040 + { + title = "Ambient Sound 40"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14041 + { + title = "Ambient Sound 41"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14042 + { + title = "Ambient Sound 42"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14043 + { + title = "Ambient Sound 43"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14044 + { + title = "Ambient Sound 44"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14045 + { + title = "Ambient Sound 45"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14046 + { + title = "Ambient Sound 46"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14047 + { + title = "Ambient Sound 47"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14048 + { + title = "Ambient Sound 48"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14049 + { + title = "Ambient Sound 49"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14050 + { + title = "Ambient Sound 50"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14051 + { + title = "Ambient Sound 51"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14052 + { + title = "Ambient Sound 52"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14053 + { + title = "Ambient Sound 53"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14054 + { + title = "Ambient Sound 54"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14055 + { + title = "Ambient Sound 55"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14056 + { + title = "Ambient Sound 56"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14057 + { + title = "Ambient Sound 57"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14058 + { + title = "Ambient Sound 58"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14059 + { + title = "Ambient Sound 59"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14060 + { + title = "Ambient Sound 60"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14061 + { + title = "Ambient Sound 61"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14062 + { + title = "Ambient Sound 62"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14063 + { + title = "Ambient Sound 63"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } + 14064 + { + title = "Ambient Sound 64"; + include("ZDoom_misc.cfg", "ambientsoundthing_args"); + } 14065 { @@ -194,24 +450,7 @@ zdoom { title = "Ambient Sound Index"; } - arg1 - { - title = "Volume"; - type = 11; - enum = "sound_volume"; - } - arg2 - { - title = "Min. Fading Distance"; - } - arg3 - { - title = "Max. Heard Distance"; - } - arg4 - { - title = "Distance Multiplier"; - } + include("ZDoom_misc.cfg", "ambientsoundthing_args"); } 14066 @@ -236,24 +475,7 @@ zdoom { title = "Ambient Sound Index"; } - arg1 - { - title = "Volume"; - type = 11; - enum = "sound_volume"; - } - arg2 - { - title = "Min. Fading Distance"; - } - arg3 - { - title = "Max. Heard Distance"; - } - arg4 - { - title = "Distance Multiplier"; - } + include("ZDoom_misc.cfg", "ambientsoundthing_args"); } 14101 = "Music Changer 01"; @@ -941,7 +1163,7 @@ zdoom height = 8; arg0 { - title = "Line"; + title = "Line Tag"; type = 15; } } @@ -953,7 +1175,7 @@ zdoom height = 4; arg0 { - title = "Line"; + title = "Line Tag"; type = 15; } } @@ -1091,6 +1313,7 @@ zdoom sprite = "internal:anchor"; class = "$PolyAnchor"; fixedrotation = true; + error = 0; // Can be outside of map geometry } 9301 diff --git a/Build/Configurations/SRB2-22.cfg b/Build/Configurations/SRB2-22.cfg index 1061e36a6fc03f33c7716280e1a3ff0c78825882..06924db6b93926119c005785e3bfcf43382d941b 100644 --- a/Build/Configurations/SRB2-22.cfg +++ b/Build/Configurations/SRB2-22.cfg @@ -41,6 +41,12 @@ linetagindicatesectors = true; // The format interface handles the map data format - DoomMapSetIO for SRB2DB2, SRB2MapSetIO for Zone Builder formatinterface = "SRB2MapSetIO"; + +//Maximum safe map size check (0 means skip check) +safeboundary = 0; + +//Don't do vanilla-style thing rotation angle clamping +doomthingrotationangles = false; //Sky textures for vanilla maps defaultskytextures @@ -2518,6 +2524,7 @@ linedeftypes prefix = "(439)"; flags8text = "[3] Set delay by backside sector"; flags64text = "[6] Only existing"; + flags8192text = "[13] Use backside textures"; } 440 @@ -5011,10 +5018,10 @@ thingtypes } } - invisible + ambience { color = 15; // White - title = "Misc. Invisible"; + title = "Ambience"; width = 8; height = 16; sprite = "UNKNA0"; @@ -5084,6 +5091,15 @@ thingtypes title = "Machine Ambience"; sprite = "internal:ambiance"; } + } + + invisible + { + color = 15; // White + title = "Misc. Invisible"; + width = 8; + height = 16; + sprite = "UNKNA0"; 750 { @@ -5168,6 +5184,7 @@ thingtypes angletext = "Tag"; fixedrotation = 1; tagthing = true; + unflippable = true; } 761 @@ -5177,6 +5194,7 @@ thingtypes angletext = "Tag"; fixedrotation = 1; tagthing = true; + unflippable = true; } 762 @@ -5186,6 +5204,7 @@ thingtypes angletext = "Tag"; fixedrotation = 1; tagthing = true; + unflippable = true; } 780 { @@ -6508,14 +6527,14 @@ thingtypes { arrow = 1; title = "Hoop (Generic)"; - sprite = "HOOPA0"; + sprite = "internal:nightshoop"; width = 80; height = 160; unflippable = true; centerHitbox = true; flagsvaluetext = "Height"; angletext = "Pitch/Yaw"; - fixedrotation = 1; + parametertext = "Degrees?"; } 1706 { @@ -6570,11 +6589,13 @@ thingtypes flags2text = "[2] Radius +32"; flags4text = "[4] Radius +64"; flags8text = "[8] Radius +128"; - sprite = "HOOPA0"; + sprite = "internal:nightshoop"; width = 80; height = 160; unflippable = true; centerHitbox = true; + angletext = "Pitch/Yaw"; + parametertext = "Degrees?"; } 1714 { diff --git a/Build/ScintillaNET.3.5.dll b/Build/ScintillaNET.3.5.dll index 773ca2da851e9bc7335fb691ebd04877dc5ed639..cc5c6d3280e9744dddf2048b8740e8c9738a880f 100644 Binary files a/Build/ScintillaNET.3.5.dll and b/Build/ScintillaNET.3.5.dll differ diff --git a/Build/Scripting/ZDoom_ACS.cfg b/Build/Scripting/ZDoom_ACS.cfg index 2982cfe89d911dd0b2816060cf24ae6e72b4adc6..738f93bf5514502ef42dd5524918cb58c6dccc0e 100644 --- a/Build/Scripting/ZDoom_ACS.cfg +++ b/Build/Scripting/ZDoom_ACS.cfg @@ -106,10 +106,13 @@ keywords CheckActorFloorTexture = "bool CheckActorFloorTexture(int tid, str texture)"; CheckActorInventory = "int CheckActorInventory(int tid, str inventory_item)\nChecks the given actor's inventory for the item specified by inventory_item"; CheckActorProperty = "bool CheckActorProperty(int tid, int property, [int|float|str] value)"; + CheckActorState = "bool CheckActorState(int tid, str statename[, bool exact = false])"; + CheckClass = "bool CheckClass(str classname)"; CheckFlag = "bool CheckFlag(int tid, str flag)\nChecks to see if the actor with the matching tid has the specified actor flag set.\nIf tid is 0, the check is performed on the activator of the script."; CheckFont = "bool CheckFont(str fontname)"; CheckInventory = "int CheckInventory(str inventory_item)\nChecks the inventory of the actor who activated the script for the item specified by inventory_item"; CheckPlayerCamera = "int CheckPlayerCamera(int player)"; + CheckProximity = "bool CheckProximity(int tid, str classname, float distance[, int count = 1[, int flags = 0[, int pointer = AAPTR_DEFAULT]]])"; CheckSight = "bool CheckSight(int source, int dest, int flags)"; CheckWeapon = "bool CheckWeapon(str weapon)\nChecks if player's active weapon is the weapon with specified class name."; ClassifyActor = "int ClassifyActor(int tid)"; @@ -120,6 +123,7 @@ keywords //ConsoleCommand = "void ConsoleCommand(str command)"; Cos = "fixed Cos(int angle)"; CreateTranslation = "void CreateTranslation(int transnumber, a:b=c:d, ...)"; + DamageActor = "int DamageActor(int targettid, int targetptr, int inflictortid, int inflictorptr, int damage, str damagetype)"; DamageThing = "DamageThing(amount, mod)"; Delay = "void Delay(int tics)"; Door_Animated = "Door_Animated(tag, speed, delay, lock)"; @@ -222,7 +226,8 @@ keywords GetSectorUDMFInt = "int GetSectorUDMFInt(int tag, str key)"; GetSideUDMFFixed = "fixed GetSideUDMFFixed(int lineid, bool side, str key)"; GetSideUDMFInt = "int GetSideUDMFInt(int lineid, bool side, str key)"; - GetSigilPieces = "int GetSigilPieces(void)\nReturns the number of Sigil pieces that are held by the player"; + GetSigilPieces = "int GetSigilPieces()\nReturns the number of Sigil pieces that are held by the player"; + GetSpriteRotation = "int GetSpriteRotation(int ptr)"; GetThingUDMFFixed = "fixed GetThingUDMFFixed(int thingid, str key)"; GetThingUDMFInt = "int GetThingUDMFInt(int thingid, str key)"; GetUserArray = "void GetUserArray(int tid, str name, int pos)"; @@ -256,6 +261,7 @@ keywords Line_AlignCeiling = "Line_AlignCeiling(lineid, side)"; Line_AlignFloor = "Line_AlignFloor(lineid, side)"; Line_SetBlocking = "Line_SetBlocking(lineid, setflags, clearflags)"; + Line_SetPortalTarget = "Line_SetPortalTarget(sourcelineid, targetlineid)"; Line_SetTextureOffset = "Line_SetTextureOffset(lineid, x, y, side, flags)"; Line_SetTextureScale = "Line_SetTextureScale(lineid, x, y, side, flags)"; LineSide = "int LineSide(void)"; @@ -308,7 +314,7 @@ keywords PolyWait = "void PolyWait(int polyid)"; Print = "void Print(type:expression)\nPrint will print something to the screen.\nPrint will only display for the activator of the script\nFor printing to all players, use PrintBold."; PrintBold = "void PrintBold(type:expression)\nThis is exactly the same as Print, except all players will see the printed text\non the screen instead of just the activator of the script."; - QuakeEx = "bool QuakeEx(int tid, int intensityX, int intensityY, int intensityZ, int duration, int damrad, int tremrad, str sound[, int flags = 0[, float mulwavex = 1.0[, float mulwavey = 1.0[, float mulwavez = 1.0]]]])"; + QuakeEx = "bool QuakeEx(int tid, int intensityX, int intensityY, int intensityZ, int duration, int damrad, int tremrad, str sound[, int flags = 0[, float mulwavex = 1.0[, float mulwavey = 1.0[, float mulwavez = 1.0[, int falloff = 0[, int highpoint = 0]]]]]])"; Radius_Quake = "Radius_Quake(intensity, duration, damrad, tremrad, tid)"; Radius_Quake2 = "void Radius_Quake2(int tid, int intensity, int duration, int damrad, int tremrad, str sound)"; Random = "int Random(int min, int max)"; @@ -372,6 +378,7 @@ keywords SetMarineWeapon = "void SetMarineWeapon(int tid, int weapon)\nSets a Scripted Marine's weapon on the fly.\nweapon: one of MARINEWEAPON_ flags"; SetMugShotState = "void SetMugShotState(str state)\nSets the state of the mug shot in SBARINFO status bars.\nThe state you set will only be interrupted by damage or if the player\npicks up a weapon, provided the mugshot supports it."; SetMusic = "void SetMusic(str song[, int order[, int unused]])"; + SetMusicVolume = "void SetMusicVolume(float volume)"; SetPlayerProperty = "SetPlayerProperty(who, set, which)"; SetPointer = "bool SetPointer(int assign_slot, int tid[, int pointer_selector[, int flags]])\nSet the value of one of the caller's stored pointers."; SetResultValue = "void SetResultValue(int value)"; @@ -494,6 +501,7 @@ properties LIGHTNING; NET; OPEN; + REOPEN; RESPAWN; Restart; return; @@ -548,6 +556,7 @@ constants APROP_Damage; APROP_DamageFactor; APROP_DamageMultiplier; + APROP_DamageType; APROP_DeathSound; APROP_Dormant; APROP_Dropped; @@ -656,6 +665,19 @@ constants CLASS_CLERIC; CLASS_FIGHTER; CLASS_MAGE; + CPXF_ANCESTOR; + CPXF_LESSOREQUAL; + CPXF_NOZ; + CPXF_COUNTDEAD; + CPXF_DEADONLY; + CPXF_EXACT; + CPXF_SETTARGET; + CPXF_SETMASTER; + CPXF_SETTRACER; + CPXF_FARTHEST; + CPXF_CLOSEST; + CPXF_SETONPTR; + CPXF_CHECKSIGHT; CR_BLACK; CR_BLUE; CR_BRICK; diff --git a/Build/Scripting/ZDoom_DECORATE.cfg b/Build/Scripting/ZDoom_DECORATE.cfg index 194679dc8852f6930ff1dc4cc57b40882fc963e0..3dd73f43c4ef8e6529126fbedb6bbd0965f6ac4f 100644 --- a/Build/Scripting/ZDoom_DECORATE.cfg +++ b/Build/Scripting/ZDoom_DECORATE.cfg @@ -75,21 +75,21 @@ keywords A_ClearLastHeard = "A_ClearLastHeard"; A_ClearSoundTarget = "A_ClearSoundTarget"; A_ClearTarget = "A_ClearTarget"; - A_DamageChildren = "A_DamageChildren(int amount[, str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"]]]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; - A_DamageMaster = "A_DamageMaster(int amount[, str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"]]]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; - A_DamageSelf = "A_DamageSelf(int amount[, str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"]]]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; - A_DamageSiblings = "A_DamageSiblings(int amount[, str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"]]]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; - A_DamageTarget = "A_DamageTarget(int amount[, str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"]]]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; - A_DamageTracer = "A_DamageTracer(int amount[, str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"]]]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; + A_DamageChildren = "A_DamageChildren(int amount[, str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"[, int src = AAPTR_DEFAULT[, int inflictor = AAPTR_DEFAULT]]]]]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; + A_DamageMaster = "A_DamageMaster(int amount[, str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"[, int src = AAPTR_DEFAULT[, int inflictor = AAPTR_DEFAULT]]]]]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; + A_DamageSelf = "A_DamageSelf(int amount[, str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"[, int src = AAPTR_DEFAULT[, int inflictor = AAPTR_DEFAULT]]]]]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; + A_DamageSiblings = "A_DamageSiblings(int amount[, str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"[, int src = AAPTR_DEFAULT[, int inflictor = AAPTR_DEFAULT]]]]]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; + A_DamageTarget = "A_DamageTarget(int amount[, str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"[, int src = AAPTR_DEFAULT[, int inflictor = AAPTR_DEFAULT]]]]]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; + A_DamageTracer = "A_DamageTracer(int amount[, str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"[, int src = AAPTR_DEFAULT[, int inflictor = AAPTR_DEFAULT]]]]]])\namount: amount of damage to inflict. Use a negative value to heal.\ndamagetype: the type of damage to inflict.\nflags: DMSS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; A_Die = "A_Die[(str damagetype = \"none\")]"; A_FaceTarget = "A_FaceTarget[(float angle = 0.0[, float pitch = 270.0])]\nA_FaceTarget([float max_turn = 0.0[, float max_pitch = 270.0[, float ang_offset = 0.0[, float pitch_offset = 0.0[, int flags = 0[, float z_add = 0.0]]]]]])"; A_FaceMaster = "A_FaceMaster[(float angle = 0.0[, float pitch = 270.0])]\nA_FaceMaster([float max_turn = 0.0[, float max_pitch = 270.0[, float ang_offset = 0.0[, float pitch_offset = 0.0[, int flags = 0[, float z_add = 0.0]]]]]])"; A_FastChase = "A_FastChase"; - A_KillChildren = "A_KillChildren[(str damagetype = \"None\"[, int flags = 0[, str filter = \"None\[, str species = \"None\]]])]\ndamagetype: if the actor dies, the actor will enter a death state based on damagetype if present (or pain state if using NODAMAGE).\nflags: KILS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; - A_KillMaster = "A_KillMaster[(str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"]]])]\ndamagetype: if the actor dies, the actor will enter a death state based on damagetype if present (or pain state if using NODAMAGE).\nflags: KILS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; - A_KillSiblings = "A_KillSiblings[(str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"]]])]\ndamagetype: if the actor dies, the actor will enter a death state based on damagetype if present (or pain state if using NODAMAGE).\nflags: KILS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; - A_KillTarget = "A_KillTarget[(str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"]]])]\ndamagetype: if the actor dies, the actor will enter a death state based on damagetype if present (or pain state if using NODAMAGE).\nflags: KILS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; - A_KillTracer = "A_KillTracer[(str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"]]])]\ndamagetype: if the actor dies, the actor will enter a death state based on damagetype if present (or pain state if using NODAMAGE).\nflags: KILS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; + A_KillChildren = "A_KillChildren[(str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"[, int src = AAPTR_DEFAULT[, int inflictor = AAPTR_DEFAULT]]]]])]\ndamagetype: if the actor dies, the actor will enter a death state based on damagetype if present (or pain state if using NODAMAGE).\nflags: KILS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; + A_KillMaster = "A_KillMaster[(str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"[, int src = AAPTR_DEFAULT[, int inflictor = AAPTR_DEFAULT]]]]])]\ndamagetype: if the actor dies, the actor will enter a death state based on damagetype if present (or pain state if using NODAMAGE).\nflags: KILS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; + A_KillSiblings = "A_KillSiblings[(str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"[, int src = AAPTR_DEFAULT[, int inflictor = AAPTR_DEFAULT]]]]])]\ndamagetype: if the actor dies, the actor will enter a death state based on damagetype if present (or pain state if using NODAMAGE).\nflags: KILS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; + A_KillTarget = "A_KillTarget[(str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"[, int src = AAPTR_DEFAULT[, int inflictor = AAPTR_DEFAULT]]]]])]\ndamagetype: if the actor dies, the actor will enter a death state based on damagetype if present (or pain state if using NODAMAGE).\nflags: KILS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; + A_KillTracer = "A_KillTracer[(str damagetype = \"None\"[, int flags = 0[, str filter = \"None\"[, str species = \"None\"[, int src = AAPTR_DEFAULT[, int inflictor = AAPTR_DEFAULT]]]]])]\ndamagetype: if the actor dies, the actor will enter a death state based on damagetype if present (or pain state if using NODAMAGE).\nflags: KILS flags.\nfilter: the actor class to damage.\nspecies: the actor species to damage."; A_Look = "A_Look"; A_Look2 = "A_Look2"; A_LookEx = "A_LookEx(int flags, float minseedist, float maxseedist, float maxheardist, float fov, state seestate)"; @@ -105,7 +105,6 @@ keywords A_SentinelBob = "A_SentinelBob"; A_SetTeleFog = "A_SetTeleFog(str telefogsourceclass, str telefogdestclass)"; A_Srcr2Decide = "A_Srcr2Decide"; - A_SwapTeleFog = "A_SwapTeleFog"; A_TurretLook = "A_TurretLook"; A_Teleport = "state A_Teleport[(str teleportstate = \"Teleport\"[, str targettype = \"BossSpot\"[, str fogtype = \"TeleportFog\"[, int flags = 0[, float mindist = 0.0[, float maxdist = 0.0[, int pointer = AAPTR_DEFAULT]]]]]])]\nbool A_Teleport[(str teleportstate = \"Teleport\"[, str targettype = \"BossSpot\"[, str fogtype = \"TeleportFog\"[, int flags = 0[, float mindist = 0.0[, float maxdist = 0.0[, int pointer = AAPTR_DEFAULT]]]]]])]"; A_VileChase = "A_VileChase"; @@ -113,7 +112,7 @@ keywords //Generic monster attacks A_CustomMissile = "A_CustomMissile(str missiletype[, float spawnheight = 0.0[, int spawnofs_horiz = 0[, int angle = 0[, int aimflags = 0[, int pitch = 0[, int target = AAPTR_TARGET]]]]]])"; A_CustomBulletAttack = "A_CustomBulletAttack(float horz_spread, float vert_spread, int numbullets, int damageperbullet[, str pufftype = \"BulletPuff\"[, float range = 0.0[, int flags = 0[, int target = AAPTR_TARGET]]]])"; - A_CustomRailgun = "A_CustomRailgun(int damage[, int offset[, color ringcolor[, color corecolor[, int flags = 0[, bool aim = false[, float maxdiff = 0.0[, str pufftype = \"\"[, float spread_xy = 0.0[, float spread_z = 0.0[, float range = 8192[, int duration = 35[, float sparsity = 1.0[, float driftspeed = 1.0[, str spawnclass = \"\"[, float spawnofs_z = 0[, int spiraloffset = 270]]]]]]]]]]]]]]]])"; + A_CustomRailgun = "A_CustomRailgun(int damage[, int offset[, color ringcolor[, color corecolor[, int flags = 0[, bool aim = false[, float maxdiff = 0.0[, str pufftype = \"\"[, float spread_xy = 0.0[, float spread_z = 0.0[, float range = 8192[, int duration = 35[, float sparsity = 1.0[, float driftspeed = 1.0[, str spawnclass = \"\"[, float spawnofs_z = 0[, int spiraloffset = 270[, int actorpiercelimit = 0]]]]]]]]]]]]]]]]])"; A_CustomMeleeAttack = "A_CustomMeleeAttack[(int damage = 0[, str meleesound = \"\"[, str misssound = \"\"[, str damagetype = \"Melee\"[, bool bleed = true]]]])]"; A_CustomComboAttack = "A_CustomComboAttack(str missiletype, float spawnheight, int damage, str meleesound[, str damagetype = \"Melee\"[, bool bleed = true]])"; A_MonsterRefire = "state A_MonsterRefire(int chancecontinue, str abortstate)"; @@ -150,6 +149,7 @@ keywords A_PrintBold = "A_PrintBold(str text[, float time = 0.0[, str fontname = \"SmallFont\"]])"; A_Log = "A_Log(str text)"; A_LogInt = "A_LogInt(int number)"; + A_LogFloat = "A_LogFloat(float number)"; //Special actions A_BossDeath = "A_BossDeath"; A_KeenDie = "A_KeenDie[(int tag = 666)]"; @@ -162,7 +162,7 @@ keywords A_PlayerSkinCheck = "state A_PlayerSkinCheck(str state)"; A_SkullPop = "A_SkullPop[(str type = \"BloodySkull\")]"; A_Quake = "A_Quake(int intensity, int duration, int damageradius, int tremorradius[, str sound = \"world/quake\"])"; - A_QuakeEx = "A_QuakeEx(int intensityX, int intensityY, int intensityZ, int duration, int damrad, int tremrad[, str sound = \"world/quake\"[, int flags = 0[, float mulwavex = 1.0[, float mulwavey = 1.0[, float mulwavez = 1.0]]]]])"; + A_QuakeEx = "A_QuakeEx(int intensityX, int intensityY, int intensityZ, int duration, int damrad, int tremrad[, str sound = \"world/quake\"[, int flags = 0[, float mulwavex = 1.0[, float mulwavey = 1.0[, float mulwavez = 1.0[, int falloff = 0[, int highpoint = 0[, float rollintensity = 0.0[, float rollwave = 0.0]]]]]]]]])"; //Spawn functions A_TossGib = "A_TossGib"; A_SpawnDebris = "A_SpawnDebris(str type[, bool translation = false[, float horizontal_vel = 1.0[, float vertical_vel = 1.0]]])"; @@ -170,7 +170,7 @@ keywords A_SpawnItemEx = "bool A_SpawnItemEx(str type[, float xoffset = 0.0[, float yoffset = 0.0[, float zoffset = 0.0[, float xvelocity = 0.0[, float yvelocity = 0.0[, float zvelocity = 0.0[, float angle = 0.0[, int flags = 0[, int skipchance = 0[, int tid = 0]]]]]]]]]])"; A_SpawnParticle = "A_SpawnParticle(color color[, int flags = 0[, int lifetime = 35[, int size = 1[, float angle = 0.0[, float xoff = 0.0[, float yoff = 0.0[, float zoff = 0.0[, float velx = 0.0[, float vely = 0.0[, float velz = 0.0[, float accelx = 0.0[, float accely = 0.0[, float accelz = 0.0[, float startalpha = 1.0[, float fadestep = -1.0]]]]]]]]]]]]]]])"; //State jumps - A_CheckBlock = "state A_CheckBlock(str block[, int flags = 0[, int pointer = AAPTR_TARGET]])"; + A_CheckBlock = "state A_CheckBlock(str block[, int flags = 0[, int pointer = AAPTR_TARGET[, float xoff = 0.0[, float yoff = 0.0[, float zoff = 0.0[, float angle = 0.0]]]]]])"; A_CheckCeiling = "state A_CheckCeiling(str state)\nstate A_CheckCeiling(int offset)"; A_CheckFloor = "state A_CheckFloor(str state)\nstate A_CheckFloor(int offset)"; A_CheckFlag = "state A_CheckFlag(str flagname, state label[, int check_pointer = AAPTR_DEFAULT])"; @@ -238,7 +238,7 @@ keywords A_SetRipMin = "A_SetRipMin(int min)"; A_SetRipMax = "A_SetRipMax(int max)"; A_SetRoll = "A_SetRoll(float roll[, int flags = 0[, int pointer = AAPTR_DEFAULT]])"; - A_SetScale = "A_SetScale(float scaleX[, float scaleY = scaleX[, int pointer = AAPTR_DEFAULT]])"; + A_SetScale = "A_SetScale(float scaleX[, float scaleY = scaleX[, int pointer = AAPTR_DEFAULT[, bool usezero = false]]])"; A_SetShadow = "A_SetShadow"; A_SetShootable = "A_SetShootable"; A_SetSolid = "A_SetSolid"; @@ -248,6 +248,9 @@ keywords A_SetTics = "A_SetTics(int tics)"; A_SetTranslucent = "A_SetTranslucent(float alpha[, int mode = 0])"; A_SetUserVar = "A_SetUserVar(str name, int value)"; + A_SetUserVarFloat = "A_SetUserVarFloat(str name, float value)"; + A_SetVisibleRotation = "A_SetVisibleRotation(float anglestart[, float angleend = 0.0[, float pitchstart = 0.0[, float pitchend = 0.0[, int flags = 0[, int ptr = AAPTR_DEFAULT]]]]]])"; + A_SwapTeleFog = "A_SwapTeleFog"; A_TransferPointer = "A_TransferPointer(int source, int recipient, int sourcefield, int recipientfield[, int flags])\nflags: PTROP flags."; A_UnHideThing = "A_UnHideThing"; A_UnsetFloat = "A_UnsetFloat"; @@ -280,9 +283,10 @@ keywords A_DropInventory = "A_DropInventory(str type)"; A_DropItem = "A_DropItem(str item[, int dropamount = -1[, int chance = 256]])\nThe calling actor drops the specified item.\nThis works in a similar way to the DropItem actor property."; A_SelectWeapon = "bool A_SelectWeapon(str type)"; - A_RadiusGive = "int A_RadiusGive(str item, float distance, int flags[, int amount = 0[, str filter = \"None\"[, str species = \"None\"[, float mindist = 0]]]])\nflags: RGF flags."; + A_RadiusGive = "int A_RadiusGive(str item, float distance, int flags[, int amount = 0[, str filter = \"None\"[, str species = \"None\"[, int mindist = 0[, int limit = 0]]]]])\nflags: RGF flags."; //Weapon functions A_WeaponReady = "A_WeaponReady[(int flags = 0)]\nflags: WRF flags."; + A_WeaponOffset = "A_WeaponOffset[(float x = 0[, float y = 32[, int flags = 0])]\nflags: WOF flags."; A_Lower = "A_Lower"; A_Raise = "A_Raise"; A_ReFire = "A_ReFire[(str state = \"Hold\")]"; @@ -296,6 +300,9 @@ keywords A_Light1 = "A_Light1"; A_Light2 = "A_Light2"; A_LightInverse = "A_LightInverse"; + A_Overlay = "A_Overlay(int layer[, state start])"; + A_OverlayFlags = "A_OverlayFlags(int layer, int flags, bool set)\nflags: PSPF flags."; + A_OverlayOffset = "A_OverlayOffset[(int layer = 0[, float x = 0.0f[, float y = 32.0f[, int flags = 0]]]])]\nflags: WOF flags."; A_Recoil = "A_Recoil(float force)"; A_ZoomFactor = "A_ZoomFactor[(float zoom = 1.0[, int flags = 0])]\nflags: ZOOM flags."; A_SetCrosshair = "A_SetCrosshair(int number)"; @@ -304,8 +311,8 @@ keywords A_Saw = "A_Saw[(str fullsound = \"weapons/sawfull\"[, str hitsound = \"weapons/sawhit\"[, int damage = 0[, str pufftype = \"BulletPuff\"[, int flags = 0[, float range = 65.0[, float spread_xy = 2.8125[, float spread_z = 0.0[, float lifesteal = 0.0[, int lifestealmax = 0[, str armorbonustype = \"ArmorBonus\"]]]]]]]]]])]"; A_CustomPunch = "A_CustomPunch(int damage[, bool norandom = false[, int flags = 0[, str pufftype = \"BulletPuff\"[, float range = 64.0[, float lifesteal = 0.0[, int lifestealmax = 0[, str armorbonustype = \"ArmorBonus\"[, str meleesound[, str misssound]]]]]]]]])"; A_FireBullets = "A_FireBullets(int spread_horz, int spread_vert, int numbullets, int damage[, str pufftype = \"\"[, int flags = FBF_USEAMMO[, float range = 0.0]]])"; - A_FireCustomMissile = "A_FireCustomMissile(str missiletype[, int angle = 0[, bool useammo = false[, int spawnofs_horz = 0[, int spawnheight = 0[, int flags = 0[, angle pitch = 0]]]]]])"; - A_RailAttack = "A_RailAttack(int damage[, int spawnofs_horz[, bool useammo[, str ringcolor[, str corecolor[, int flags[, int maxdiff[, str pufftype[, float spread_xy = 0.0[, float spread_z = 0.0[, float range = 8192.0[, int duration = 35[, float sparsity = 1.0[, float driftspeed = 1.0[, str spawnclass[, float spawnofs_z = 0.0[, int spiraloffset = 270]]]]]]]]]]]]]]]])"; + A_FireCustomMissile = "A_FireCustomMissile(str missiletype[, int angle = 0[, bool useammo = false[, float spawnofs_horz = 0.0[, int spawnheight = 0[, int flags = 0[, angle pitch = 0]]]]]])"; + A_RailAttack = "A_RailAttack(int damage[, int spawnofs_horz[, bool useammo[, str ringcolor[, str corecolor[, int flags[, int maxdiff[, str pufftype[, float spread_xy = 0.0[, float spread_z = 0.0[, float range = 8192.0[, int duration = 35[, float sparsity = 1.0[, float driftspeed = 1.0[, str spawnclass[, float spawnofs_z = 0.0[, int spiraloffset = 270[, int actorpiercelimit = 0]]]]]]]]]]]]]]]]])"; A_FireAssaultGun = "A_FireAssaultGun"; A_FireBFG = "A_FireBFG"; A_FireOldBFG = "A_FireOldBFG"; @@ -368,7 +375,7 @@ keywords 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.0[, str blasteffect = \"BlastEffect\"[, str blastsound = \"BlastRadius\"]]]]])]\nA_Blast[(int flags = 0[, int strength = 255[, float radius = 255.0[, float speed = 20.0[, str blasteffect = \"BlastEffect\"[, str blastsound = \"BlastRadius\"]]]]])]"; + A_Blast = "A_Blast[(int flags = 0[, float strength = 255.0[, float radius = 255.0[, float speed = 20.0[, str blasteffect = \"BlastEffect\"[, str blastsound = \"BlastRadius\"]]]]])]"; A_BishopMissileWeave = "A_BishopMissileWeave"; A_DropWeaponPieces = "A_DropWeaponPieces(str actorclass1, str actorclass2, str actorclass3)"; A_Feathers = "A_Feathers"; @@ -379,10 +386,21 @@ keywords A_RocketInFlight = "A_RocketInFlight"; A_SetGravity = "A_SetGravity(float gravity)\nSets the amount of gravity for the calling actor."; A_SetUserArray = "A_SetUserArray(str name, int index, int value)"; + A_SetUserArrayFloat = "A_SetUserArrayFloat(str name, int index, float value)"; A_ShootGun = "A_ShootGun"; A_SPosAttackUseAtkSound = "A_SPosAttackUseAtkSound"; //Mathematical functions abs = "abs(x)\nReturns the absolute value of x."; + exp = "exp(x)\nReturns the base-e exponential function of x, which is e raised to the power x."; + log = "log(x)\nReturns the natural logarithm of x - the opposite of exp."; + log10 = "log10(x)\nReturns the common (base-10) logarithm of x."; + ceil = "ceil(x)\nRounds the number upward to the next closest integer."; + floor = "floor(x)\nRounds the number downward to the next closest integer."; + sqrt = "sqrt(x)\nReturns the square root of x."; + min = "min(x1, ...)\nGets the smallest value of all values listed.\nCan take any amount of numbers, and can solve both ints and floats."; + max = "max(x1, ...)\nGets the largest value of all values listed.\nCan take any amount of numbers, and can solve both ints and floats."; + clamp = "clamp(src, min, max)\nReturns src within the range of min and max inclusively. All parameters can be ints or floats."; +//Trigonometry functions sin = "sin(x)\nTrigonometry function, x must be in degrees."; cos = "cos(x)\nTrigonometry function, x must be in degrees."; tan = "tan(x)\nTrigonometry function, x must be in degrees."; @@ -392,15 +410,9 @@ keywords sinh = "sinh(x)\nTrigonometry function, x must be in radians."; cosh = "cosh(x)\nTrigonometry function, x must be in radians."; tanh = "tanh(x)\nTrigonometry function, x must be in radians."; - exp = "exp(x)\nReturns the base-e exponential function of x, which is e raised to the power x."; - log = "log(x)\nReturns the natural logarithm of x - the opposite of exp."; - log10 = "log10(x)\nReturns the common (base-10) logarithm of x."; - ceil = "ceil(x)\nRounds the number upward to the next closest integer."; - floor = "floor(x)\nRounds the number downward to the next closest integer."; - sqrt = "sqrt(x)\nReturns the square root of x."; - min = "min(x1, ...)\nGets the smallest value of all values listed.\nCan take any amount of numbers, and can solve both ints and floats."; - max = "max(x1, ...)\nGets the largest value of all values listed.\nCan take any amount of numbers, and can solve both ints and floats."; - clamp = "clamp(src, min, max)\nReturns src within the range of min and max inclusively. All parameters can be ints or floats."; + atan2 = "atan2(y, x)\nTrigonometry function, Returns an angle in degrees."; + VectorAngle = "VectorAngle(x, y)\nTrigonometry function."; + GetAngle = "GetAngle(bool relative[, int ptr_target = AAPTR_TARGET])\nGets the angle in degrees (normalized to -180..180)"; //Randum number functions random = "int random[identifier](min, max)\nReturns a random integer value between min and max."; random2 = "int random2[identifier](mask)\nReturns a random integer value between -mask and +mask."; @@ -415,8 +427,15 @@ keywords IsPointerEqual = "bool IsPointerEqual(int ptr1, int ptr2)"; CountInv = "int CountInv(str itemclassname[, int ptr_select = AAPTR_DEFAULT])"; GetDistance = "float GetDistance(bool checkz[, int ptr_select = AAPTR_TARGET])"; + GetGibHealth = "int GetGibHealth()"; + GetMissileDamage = "int GetMissileDamage(int mask, int add[, int pointer = AAPTR_DEFAULT])"; + GetPlayerInput = "int GetPlayerInput(int numinput[, int ptr = AAPTR_DEFAULT])"; GetSpawnHealth = "int GetSpawnHealth()"; + GetZAt = "float GetZAt([float x = 0.0[, float y = 0.0[, float angle = 0.0[, int flags = 0[, int pick_pointer = AAPTR_TARGET]]]]])"; GetGibHealth = "int GetGibHealth()"; + GetCrouchFactor = "float GetCrouchFactor(int ptr = AAPTR_PLAYER1)"; + GetCVar = "int GetCVar(str name)"; + GetUserCVar = "int GetUserCVar(int playernum, str name)"; } properties @@ -524,6 +543,10 @@ properties TeleFogDestType; Threshold; DefThreshold; + VisibleAngleStart; + VisibleAngleEnd; + VisiblePitchStart; + VisiblePitchEnd; //Collision and 'Physics' Radius; Height; @@ -566,6 +589,11 @@ properties Decal; StencilColor; FloatBobPhase; + DistanceCheck; + SpriteAngle; + SpriteRotation; + VisibleAngles; + VisiblePitch; //Obituaries HitObituary; Obituary; @@ -718,13 +746,30 @@ properties constants { +//rendering + FLATSPRITE; + ROLLSPRITE; + WALLSPRITE; + DONTFLIP; + ROLLCENTER; + SPRITEANGLE; + MASKROTATION; + ABSMASKANGLE; + ABSMASKPITCH; //pointers AAPTR_DEFAULT; AAPTR_NULL; AAPTR_TARGET; AAPTR_MASTER; AAPTR_TRACER; - AAPTR_PLAYER; + AAPTR_PLAYER1; + AAPTR_PLAYER2; + AAPTR_PLAYER3; + AAPTR_PLAYER4; + AAPTR_PLAYER5; + AAPTR_PLAYER6; + AAPTR_PLAYER7; + AAPTR_PLAYER8; AAPTR_PLAYER_GETTARGET; AAPTR_PLAYER_GETCONVERSATION; //A_SpawnItemEx flags @@ -783,6 +828,9 @@ constants FBF_EXPLICITANGLE; FBF_NOPITCH; FBF_NORANDOMPUFFZ; + FBF_PUFFTARGET; + FBF_PUFFMASTER; + FBF_PUFFTRACER; //monster flags PAF_NOSKULLATTACK; PAF_AIMFACING; @@ -1074,6 +1122,9 @@ constants CBAF_NOPITCH; CBAF_NORANDOM; CBAF_NORANDOMPUFFZ; + CBAF_PUFFTARGET; + CBAF_PUFFMASTER; + CBAF_PUFFTRACER; CBF_NOLINES; CBF_SETTARGET; CBF_SETMASTER; @@ -1081,11 +1132,18 @@ constants CBF_SETONPTR; CBF_DROPOFF; CBF_NOACTORS; + CBF_ABSOLUTEPOS; + CBF_ABSOLUTEANGLE; CHF_DONTMOVE; CHF_FASTCHASE; CHF_NIGHTMAREFAST; CHF_NOPLAYACTIVE; CHF_RESURRECT; + CHF_NORANDOMTURN; + CHF_NODIRECTIONTURN; + CHF_NOPOSTATTACKTURN; + CHF_STOPIFBLOCKED; + CHF_DONTTURN; CLOFF_AIM_VERT_NOOFFSET; CLOFF_ALLOWNULL; CLOFF_BEYONDTARGET; @@ -1133,6 +1191,7 @@ constants DMSS_EXFILTER; DMSS_EXSPECIES; DMSS_EITHER; + DMSS_INFLICTORDMGTYPE; FMDF_NOPITCH; FMDF_NOANGLE; FMDF_INTERPOLATE; @@ -1206,6 +1265,7 @@ constants RTF_AFFECTSOURCE; RTF_NOIMPACTDAMAGE; RTF_NOTMISSILE; + RTF_THRUSTZ; SF_NOPULLIN; SF_NORANDOM; SF_NOTURN; @@ -1220,6 +1280,7 @@ constants SMF_PRECISE; SPF_FORCECLAMP; SPF_INTERPOLATE; + SPF_NOTIMEFREEZE; TF_TELEFRAG; TF_RANDOMDECIDE; TF_FORCED; @@ -1308,4 +1369,39 @@ constants QF_WAVE; QF_MAX; QF_FULLINTENSITY; +//GetZAt flags + GZF_ABSOLUTEPOS; + GZF_ABSOLUTEANG; + GZF_CEILING; + GZF_3DRESTRICT; + GZF_NOPORTALS; + GZF_NO3DFLOOR; +//A_WeaponOffset flags + WOF_KEEPX; + WOF_KEEPY; + WOF_ADD; +//A_OverlayFlags flags + PSPF_ADDWEAPON; + PSPF_ADDBOB; + PSPF_POWDOUBLE; + PSPF_CVARFAST; + PSPF_FLIP; +//A_BFGSpray flags + BFGF_MISSILEORIGIN; + BFGF_HURTSOURCE; +//A_RadiusDamageSelf flags + RDSF_BFGDAMAGE; +//GetAngle flags + GAF_RELATIVE; + GAF_SWITCH; +//A_CopySpriteFrame flags + CPSF_NOSPRITE; + CPSF_NOFRAME; +//A_SetVisibleRotation flags + VRF_NOANGLESTART; + VRF_NOANGLEEND; + VRF_NOPITCHSTART; + VRF_NOPITCHEND; + VRF_NOANGLE; + VRF_NOPITCH; } diff --git a/Build/SharpCompress.3.5.dll b/Build/SharpCompress.3.5.dll index 56828e26f04d5d20322f77b963d47ca1aff95a30..8814e9fde8996f19250f1aeadd51dd569dcdfdfc 100644 Binary files a/Build/SharpCompress.3.5.dll and b/Build/SharpCompress.3.5.dll differ diff --git a/Build/Sprites/BRNGA0.png b/Build/Sprites/BRNGA0.png deleted file mode 100644 index e0bfde5a92b62717d54d621bf9328275f575ea9b..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/BRNGA0.png and /dev/null differ diff --git a/Build/Sprites/PIKAA0.png b/Build/Sprites/PIKAA0.png deleted file mode 100644 index 5a5796d7607f2e6df3fad4719ae599e358b4dbf9..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/PIKAA0.png and /dev/null differ diff --git a/Build/Sprites/PIKBA0.png b/Build/Sprites/PIKBA0.png deleted file mode 100644 index 896149ff889c24109f7383fc01ab5fd70ec92a25..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/PIKBA0.png and /dev/null differ diff --git a/Build/Sprites/PIKEA0.png b/Build/Sprites/PIKEA0.png deleted file mode 100644 index 297ce2a46f277d3337b67d1ba8cc4846e47f7216..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/PIKEA0.png and /dev/null differ diff --git a/Build/Sprites/PIKGA0.png b/Build/Sprites/PIKGA0.png deleted file mode 100644 index ea97f6192ab4b8cf04ce9ac307a455b41c4da490..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/PIKGA0.png and /dev/null differ diff --git a/Build/Sprites/PIKRA0.png b/Build/Sprites/PIKRA0.png deleted file mode 100644 index 240c523042447696587d668b138d1c71589bdaf7..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/PIKRA0.png and /dev/null differ diff --git a/Build/Sprites/PIKSA0.png b/Build/Sprites/PIKSA0.png deleted file mode 100644 index 5d0dd7c1be2a5cd7ee10f20c17e25acef530bba4..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/PIKSA0.png and /dev/null differ diff --git a/Build/Sprites/RNGAA0.png b/Build/Sprites/RNGAA0.png deleted file mode 100644 index 08c118f3e9b049e39cf76da08468ce723af6a748..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/RNGAA0.png and /dev/null differ diff --git a/Build/Sprites/RNGBA0.png b/Build/Sprites/RNGBA0.png deleted file mode 100644 index eb972bfb6db80bead47a8c62e4a4ef4e1df9dab6..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/RNGBA0.png and /dev/null differ diff --git a/Build/Sprites/RNGEA0.png b/Build/Sprites/RNGEA0.png deleted file mode 100644 index fee51ebeb51cea81ff9915063286d71f8d5cdb77..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/RNGEA0.png and /dev/null differ diff --git a/Build/Sprites/RNGGA0.png b/Build/Sprites/RNGGA0.png deleted file mode 100644 index 1fdbe1d5651a6ceacc856f606212a0d503f2f0fa..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/RNGGA0.png and /dev/null differ diff --git a/Build/Sprites/RNGIA0.png b/Build/Sprites/RNGIA0.png deleted file mode 100644 index 5ea8052502cdb241d89e9f911b97fc8c01ef9fcb..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/RNGIA0.png and /dev/null differ diff --git a/Build/Sprites/RNGRA0.png b/Build/Sprites/RNGRA0.png deleted file mode 100644 index f48f020388e7f9d7d887116c83d25488faf77341..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/RNGRA0.png and /dev/null differ diff --git a/Build/Sprites/RNGSA0.png b/Build/Sprites/RNGSA0.png deleted file mode 100644 index 9a0d7275e2b059cb3241c0c53c51c24ad50090e4..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/RNGSA0.png and /dev/null differ diff --git a/Build/Sprites/RRNGA0.png b/Build/Sprites/RRNGA0.png deleted file mode 100644 index ead9890087d4a96dde78898215ce2d784567264b..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/RRNGA0.png and /dev/null differ diff --git a/Build/Sprites/TRNGA0b.png b/Build/Sprites/TRNGA0b.png deleted file mode 100644 index d86c10c65fe1082aecc5e3b8cb87aa42cafd7e35..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/TRNGA0b.png and /dev/null differ diff --git a/Build/Sprites/TRNGA0r.png b/Build/Sprites/TRNGA0r.png deleted file mode 100644 index 8119fd93c2b9108aa03c70c503d06ff5f8e09d64..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/TRNGA0r.png and /dev/null differ diff --git a/Build/Sprites/ZDoomGoldWand.png b/Build/Sprites/ZDoomGoldWand.png deleted file mode 100644 index f887f04c65d070bff04ff7b7d19354a91daf471a..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/ZDoomGoldWand.png and /dev/null differ diff --git a/Build/Sprites/ZDoomPistol.png b/Build/Sprites/ZDoomPistol.png deleted file mode 100644 index 74ff02360e95494dfa244cb90a2d5f5d570be7d2..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/ZDoomPistol.png and /dev/null differ diff --git a/Build/Sprites/ZandFlagBlue.png b/Build/Sprites/ZandFlagBlue.png deleted file mode 100644 index 0a5d993e014f42bd0c0d36f107df9fa9a3508996..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/ZandFlagBlue.png and /dev/null differ diff --git a/Build/Sprites/ZandFlagGold.png b/Build/Sprites/ZandFlagGold.png deleted file mode 100644 index d53364393eed084aa2af1f920967962aef883509..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/ZandFlagGold.png and /dev/null differ diff --git a/Build/Sprites/ZandFlagGreen.png b/Build/Sprites/ZandFlagGreen.png deleted file mode 100644 index 45815c18ec3645a0e594035c985a3d1dbe1d76d8..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/ZandFlagGreen.png and /dev/null differ diff --git a/Build/Sprites/ZandFlagRed.png b/Build/Sprites/ZandFlagRed.png deleted file mode 100644 index 27bd2e87e58a77d5e4e71d21408d0f96c6dd8e9b..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/ZandFlagRed.png and /dev/null differ diff --git a/Build/Sprites/ZandFlagWhite.png b/Build/Sprites/ZandFlagWhite.png deleted file mode 100644 index c12a857e3acb3696c83454baf921e204e936e04a..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/ZandFlagWhite.png and /dev/null differ diff --git a/Build/Sprites/ZandRuneDrain.png b/Build/Sprites/ZandRuneDrain.png deleted file mode 100644 index 52336d0054e7facf7703f4b3d9bd9ca2b6770d1b..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/ZandRuneDrain.png and /dev/null differ diff --git a/Build/Sprites/ZandRuneHaste.png b/Build/Sprites/ZandRuneHaste.png deleted file mode 100644 index 542961288d28490f18738c80a8347d298ee034a5..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/ZandRuneHaste.png and /dev/null differ diff --git a/Build/Sprites/ZandRuneHighJump.png b/Build/Sprites/ZandRuneHighJump.png deleted file mode 100644 index 66263d1ac8f01eae7a57c6fda606c984022dcf13..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/ZandRuneHighJump.png and /dev/null differ diff --git a/Build/Sprites/ZandRuneProsperity.png b/Build/Sprites/ZandRuneProsperity.png deleted file mode 100644 index 9f5f6e23cc630b15c1739804c467447964100034..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/ZandRuneProsperity.png and /dev/null differ diff --git a/Build/Sprites/ZandRuneRage.png b/Build/Sprites/ZandRuneRage.png deleted file mode 100644 index 409c397fdc536d7c2a449c5a194cd94656602b64..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/ZandRuneRage.png and /dev/null differ diff --git a/Build/Sprites/ZandRuneReflection.png b/Build/Sprites/ZandRuneReflection.png deleted file mode 100644 index ec662f13d3cd05ee8a2f64e508791255ae257963..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/ZandRuneReflection.png and /dev/null differ diff --git a/Build/Sprites/ZandRuneRegeneration.png b/Build/Sprites/ZandRuneRegeneration.png deleted file mode 100644 index 5c99fe6c8200be54c8babcd62b7b9150a2d2068a..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/ZandRuneRegeneration.png and /dev/null differ diff --git a/Build/Sprites/ZandRuneResistance.png b/Build/Sprites/ZandRuneResistance.png deleted file mode 100644 index 55a50a3dbfebe4868cfd47572b78e1142a3c55f8..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/ZandRuneResistance.png and /dev/null differ diff --git a/Build/Sprites/ZandRuneSpread.png b/Build/Sprites/ZandRuneSpread.png deleted file mode 100644 index e7de298da3c6c08aa04af569d301f98a73e5b87c..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/ZandRuneSpread.png and /dev/null differ diff --git a/Build/Sprites/ZandRuneStrength.png b/Build/Sprites/ZandRuneStrength.png deleted file mode 100644 index f5b0e476b46991cfe5a76f845a0a711460670c20..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/ZandRuneStrength.png and /dev/null differ diff --git a/Build/Sprites/hunt.png b/Build/Sprites/hunt.png deleted file mode 100644 index d1681583e1a6ad4a43675a2148c0ac77fafaad7b..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/hunt.png and /dev/null differ diff --git a/Build/Sprites/nightshoop.png b/Build/Sprites/nightshoop.png new file mode 100644 index 0000000000000000000000000000000000000000..31cd052fd5bfbcf0b972c27055fb8e3b46d90056 Binary files /dev/null and b/Build/Sprites/nightshoop.png differ diff --git a/Build/Sprites/token.png b/Build/Sprites/token.png deleted file mode 100644 index f3ba06fbb937317f7442fe40eedfd24a2d6b4343..0000000000000000000000000000000000000000 Binary files a/Build/Sprites/token.png and /dev/null differ diff --git a/Build/Textures/ThingTexture2D.png b/Build/Textures/ThingTexture2D.png new file mode 100644 index 0000000000000000000000000000000000000000..9a9420ab3ff0fc99185a1a46d67bfa38707d8d5a Binary files /dev/null and b/Build/Textures/ThingTexture2D.png differ diff --git a/Build/Textures/ThingTexture2Dold.png b/Build/Textures/ThingTexture2Dold.png new file mode 100644 index 0000000000000000000000000000000000000000..9d53dfff1e7978766825b35afc60389e45e129c7 Binary files /dev/null and b/Build/Textures/ThingTexture2Dold.png differ diff --git a/Help/gc_argumentsettings.html b/Help/gc_argumentsettings.html index 0682a74606a0ae79f02b3ace5a9f61da0513a98e..53aa405a82a33569b7990cb53ceb06ccc065d0b6 100644 --- a/Help/gc_argumentsettings.html +++ b/Help/gc_argumentsettings.html @@ -1,3 +1,4 @@ +<<<<<<< HEAD <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> @@ -94,3 +95,112 @@ arg0 </p> </div> </body> +======= +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> +<head> +<title>Game Configuration - Linedefs Settings</title> +<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> +<link rel="stylesheet" type="text/css" href="default.css" media="screen" title="Default" /> +</head> +<body> +<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e"> + <param name="keyword" value="Configurations"> + <param name="keyword" value="Game Configurations"> + <param name="keyword" value="Action"> + <param name="keyword" value="Argument"> +</object> +<div id="title"> + <h1>Game Configuration - Action Argument Settings</h1> +</div> +<div id="contents"> + <p> <b class="fat">title</b> (string)<br /> + Sets the title of this argument.<br /> + Argument title can be also set in <a href="gc_decoratekeys.html#argtitle">DECORATE</a>.<br /> + <br /> + <b class="fat"><a name="argtooltip" id="argtooltip"></a>tooltip</b> (string) - <span class="red">GZDB only</span><br /> + Allows to specify a tooltip text displayed for a <a href="gc_thingsettings.html#argtooltip">Thing</a> or Linedef argument definition. Newline character ("\n") can be used to format the text.<br /> + Argument tooltips can be also set in <a href="gc_decoratekeys.html#argtooltip">DECORATE</a>.<br /> + <strong>Example:</strong> </p> + <pre>arg1 +{ + title = "Mirror Polyobj Number"; + <span class="blue">tooltip = "Polyobject that will mirror\nthis one's movements.";</span> +}</pre> + <br /> + <b class="fat"><a name="argtype" id="argtype"></a>type</b> (integer)<br /> + Sets the type of this argument. This changes the behaviour of Argument inputs in <a href="w_linedefedit.html">Linedef</a> and <a href="w_thingedit.html">Thing Edit</a> windows.<br /> + Argument type can be also set in <a href="gc_decoratekeys.html#argtype">DECORATE</a>.<br /> + <strong>Supported values are:</strong><br /> + <br /> + <ul style="list-style-type:none"> + <li>0 = Integer (default)</li> + <li>4 = Action special</li> + <li>5 = Sector effect</li> + <li>8 = Angle in degrees</li> + <li>10 = XXRRGGBB color</li> + <li>11 = Enum option</li> + <li>12 = Enum bits</li> + <li>13 = Sector tag</li> + <li>14 = Thing tag</li> + <li>15 = Linedef tag</li> + <li>22 = Byte angle (<span class="red">GZDB only</span>)</li> + <li>23 = Thing Radius (<span class="red">GZDB only</span>)</li> + <li>24 = Thing Height (<span class="red">GZDB only</span>)</li> + </ul> + <p><b class="fat">targetclasses</b> (string) - <span class="red">GZDB only</span><br /> + When set, only things of given classes will be shown in the argument dropdown list. Used only when argument <strong>type</strong> is 14.<br /> + The value can be either a thing class name of a comma-separated list of thing class names:<br /> + <pre> +arg0 +{ + title = "MapSpot Tag"; + type = 14; + <span class="blue">targetclasses = "MapSpot,MapSpotGravity";</span> +} +</pre> + <p><b class="fat">enum</b> (structure or string)<br /> + Provides a list of predefined values to display for this argument. Used only when argument <strong>type</strong> is 11 or 12.<br /> + The value can be either a name of a predefined enum:<br /> + <pre> +arg0 +{ + title = "Volume"; + type = 11; + <span class="blue">enum = "sound_volume";</span> +} +</pre> + or an explicit definition:<br /> + <pre> +arg0 +{ + title = "Apply to"; + type = 11; + <span class="blue">enum + { + 0 = "Floor and Ceiling"; + 1 = "Ceiling"; + 2 = "Floor"; + }</span> +} +</pre> + Enums can be also set in <a href="gc_decoratekeys.html#argenum">DECORATE</a>.<br /> + <br /> + <b class="fat">default</b> (integer) - <span class="red">GZDB only</span><br /> + Sets the default value for a Thing or Linedef argument definition.<br /> + Default value can be also set in <a href="gc_decoratekeys.html#argdefault">DECORATE</a>.<br /> + <strong>Example:</strong> + </p> + <pre>9038 +{ + title = "ColorSetter"; + arg0 + { + title = "Red"; + <span class="blue">default = 255;</span> + } +}</pre> + </p> +</div> +</body> +>>>>>>> dddb1bbf (Added, Game configurations: added "targetclasses" argument property. Can be used with argument type 14 (Thing Tag). When set, only things of given classes will be shown in the argument dropdown list in Edit Things window.) diff --git a/Help/gc_basicsettings.html b/Help/gc_basicsettings.html index 6a6904c997fdcab25c7f3dbcb5651d9ac6b332ec..db657433f82eb30f54a857ba4b480bcaab581729 100644 --- a/Help/gc_basicsettings.html +++ b/Help/gc_basicsettings.html @@ -78,66 +78,98 @@ skills 5 = "Nightmare!"; } </pre> - <br /> - <b class="fat">linetagindicatesectors</b> (boolean)<br /> - When <b>true</b>, Doom Builder will highlight sectors associated with the same tag number when a line is highlighted. This is only really useful for Doom format maps, because Hexen format and UDMF format has no single tag on linedefs (in those formats, the arguments of the linedef's action can be tags, which also works to highlight sectors).<br /> -Default value is <b>false</b>.<br /> - <br /> - <b class="fat">singlesidedflag</b> (integer or string)<br /> - This lets Doom Builder know the <a href="gc_linedefflags.html">linedef flag</a> that indicates a line with only one side. Doom Builder will set this flag value on a linedef when it changes a line to become single sided and removes the flag from a linedef when it becomes double sided. Plugins can also use this information to perform operations on linedefs. For map formats that use numeric flags (Doom and Hexen) this must be an integer flag value. For map formats that use named flags (UDMF), this must be a string indicating the name of the flag.<br /> - <br /> - <b class="fat">doublesidedflag</b> (integer or string)<br /> - This lets Doom Builder know the <a href="gc_linedefflags.html">linedef flag</a> that indicates a line with two sides. Doom Builder will set this flag value on a linedef when it changes a line to become double sided and removes the flag from a linedef when it becomes single sided. Plugins can also use this information to perform operations on linedefs. For map formats that use numeric flags (Doom and Hexen) this must be an integer flag value. For map formats that use named flags (UDMF), this must be a string indicating the name of the flag.<br /> - <br /> - <b class="fat">impassableflag</b> (integer or string)<br /> - This lets Doom Builder know the <a href="gc_linedefflags.html">linedef flag</a> that indicates a line which blocks players and monsters. Doom Builder uses this to give the line a special color and plugins can use this information to perform operations related to blocking sound lines. For map formats that use numeric flags (Doom and Hexen) this must be an integer specifying the flag value of the Impassable flag. For map formats that use named flags (UDMF), this must be a string indicating the name of the Impassable flag.<br /> - <br /> - <b class="fat">defaultwalltexture</b> (string) - <span class="red">GZDB only</span>.<br /> - Name of a texture to use on sidedefs when creating a new sector.<br /> -<b>"STARTAN"</b>.<br /> - <br /> - <b class="fat">defaultfloortexture</b> (string) - <span class="red">GZDB only</span>.<br /> - Name of a flat to use on the floor when creating a new sector.<br /> - Default value is <b>"FLOOR0_1"</b>.<br /> - <br /> - <b class="fat">defaultceilingtexture</b> (string) - <span class="red">GZDB only</span>.<br /> - Name of a flat to use on the ceiling when creating a new sector.<br /> - Default value is <b>"CEIL1_1"</b>.<br /> - <br /> - <b class="fat">makedoortrack</b> (string)<br /> - Name of a texture to use on the walls when making a door.<br /> - Default value is <b>"-"</b> (no texture).<br /> - <br /> - <b class="fat">makedoordoor</b> (string) - <span class="red">GZDB only</span>.<br /> - Name of a texture to use as the door texture when making a door.<br /> - Default value is <b>"-"</b> (no texture).<br /> - <br /> - <b class="fat">makedoorceil</b> (string) - <span class="red">GZDB only</span>.<br /> - Name of a texture to use as the door's ceiling texture when making a door.<br /> - Default value is <b>"-"</b> (no texture).<br /> - <br /> - <b class="fat">makedooraction</b> (integer)<br /> - Linedef action number to put on the lines when making a door.<br /> - <br /> - <b class="fat">makedoorarg#</b> (0 .. 4) (integer)<br /> - Arguments for the linedef action number to put on the lines when making a door.<br /> - <br /> - <b class="fat">doomlightlevels</b> (boolean)<br /> - Set this to <b>false</b> to use linear lighting in Doom Builder. Normally Doom Builder uses a simulation of Doom's light levels. -<br />Default value is <b>true</b>.<br /> - <br /> - <b class="fat">start3dmode</b> (integer)<br /> - Thing type number that Doom Builder will use to keep your Visual Mode camera position stored in the map. Doom Builder will place a single thing of this type in your map and move it along as you move in Visual Mode.<br /> - <br /> - <b class="fat">skyflatname</b> (string)<br /> - Name of the flat that is interpreted as sky (meaning there is no ceiling). Doom Builder and plugins can use this information for various purposes. - <br />Default value is <b>"F_SKY1"</b>.<br /> - <br /> - <b class="fat">defaultskytextures</b> (structure) - <span class="red">GZDB only</span>.<br /> - Defines the relationship between map names and sky texture names used by vanilla maps.<br /> - <br /> - <strong>Example:</strong> - <pre> + <br /> + <b class="fat">damagetypes</b> (string) - <span class="red">GZDB only</span>.<br /> + Space-separated list of built-in damage types. This list is combined with DamageTypes parsed from DECORATE.<br /> + <br /> + <strong>Example:</strong> + <pre> +damagetypes = "None BFGSplash Drowning Slime"; +</pre> + <br /> + <b class="fat">linetagindicatesectors</b> (boolean)<br /> + When <b>true</b>, Doom Builder will highlight sectors associated with the same tag number when a line is highlighted. This is only really useful for Doom format maps, because Hexen format and UDMF format has no single tag on linedefs (in those formats, the arguments of the linedef's action can be tags, which also works to highlight sectors).<br /> + Default value is <b>false</b>.<br /> + <br /> + <b class="fat">singlesidedflag</b> (integer or string)<br /> + This lets Doom Builder know the <a href="gc_linedefflags.html">linedef flag</a> that indicates a line with only one side. Doom Builder will set this flag value on a linedef when it changes a line to become single sided and removes the flag from a linedef when it becomes double sided. Plugins can also use this information to perform operations on linedefs. For map formats that use numeric flags (Doom and Hexen) this must be an integer flag value. For map formats that use named flags (UDMF), this must be a string indicating the name of the flag.<br /> + <br /> + <b class="fat">doublesidedflag</b> (integer or string)<br /> + This lets Doom Builder know the <a href="gc_linedefflags.html">linedef flag</a> that indicates a line with two sides. Doom Builder will set this flag value on a linedef when it changes a line to become double sided and removes the flag from a linedef when it becomes single sided. Plugins can also use this information to perform operations on linedefs. For map formats that use numeric flags (Doom and Hexen) this must be an integer flag value. For map formats that use named flags (UDMF), this must be a string indicating the name of the flag.<br /> + <br /> + <b class="fat">impassableflag</b> (integer or string)<br /> + This lets Doom Builder know the <a href="gc_linedefflags.html">linedef flag</a> that indicates a line which blocks players and monsters. Doom Builder uses this to give the line a special color and plugins can use this information to perform operations related to blocking sound lines. For map formats that use numeric flags (Doom and Hexen) this must be an integer specifying the flag value of the Impassable flag. For map formats that use named flags (UDMF), this must be a string indicating the name of the Impassable flag.<br /> + <br /> + <b class="fat">leftboundary</b> (integer)<br /> + Left map boundary.<br /> + Default value is <b>-32768</b>.<br /> + <br /> + <b class="fat">rightboundary</b> (integer)<br /> + Right map boundary.<br /> + Default value is <b>32767</b>.<br /> + <br /> + <b class="fat">topboundary</b> (integer)<br /> + Top map boundary.<br /> + Default value is <b>32767</b>.<br /> + <br /> + <b class="fat">bottomboundary</b> (integer)<br /> + Bottom map boundary.<br /> + Default value is <b>-32768</b>.<br /> + <br /> + <b class="fat">safeboundary</b> (integer) - <span class="red">GZDB only</span>.<br /> + Maximum map bounding box size considered to be safe by "Check map size" <a href="e_mapanalysis.html">error check</a>. Setting this to <b>0</b> disables the check.<br /> + Default value is <b>32767</b>.<br /> + <br /> + <b class="fat">defaultwalltexture</b> (string) - <span class="red">GZDB only</span>.<br /> + Name of a texture to use on sidedefs when creating a new sector.<br /> + Default value is <b>"STARTAN"</b>.<br /> + <br /> + <b class="fat">defaultfloortexture</b> (string) - <span class="red">GZDB only</span>.<br /> + Name of a flat to use on the floor when creating a new sector.<br /> + Default value is <b>"FLOOR0_1"</b>.<br /> + <br /> + <b class="fat">defaultceilingtexture</b> (string) - <span class="red">GZDB only</span>.<br /> + Name of a flat to use on the ceiling when creating a new sector.<br /> + Default value is <b>"CEIL1_1"</b>.<br /> + <br /> + <b class="fat">makedoortrack</b> (string)<br /> + Name of a texture to use on the walls when making a door.<br /> + Default value is <b>"-"</b> (no texture).<br /> + <br /> + <b class="fat">makedoordoor</b> (string) - <span class="red">GZDB only</span>.<br /> + Name of a texture to use as the door texture when making a door.<br /> + Default value is <b>"-"</b> (no texture).<br /> + <br /> + <b class="fat">makedoorceil</b> (string) - <span class="red">GZDB only</span>.<br /> + Name of a texture to use as the door's ceiling texture when making a door.<br /> + Default value is <b>"-"</b> (no texture).<br /> + <br /> + <b class="fat">makedooraction</b> (integer)<br /> + Linedef action number to put on the lines when making a door.<br /> + <br /> + <b class="fat">makedoorarg#</b> (0 .. 4) (integer)<br /> + Arguments for the linedef action number to put on the lines when making a door.<br /> + <br /> + <b class="fat">doomlightlevels</b> (boolean)<br /> + Set this to <b>false</b> to use linear lighting in Doom Builder. Normally Doom Builder uses a simulation of Doom's light levels.<br /> + Default value is <b>true</b>.<br /> + <br /> + <b class="fat">doomthingrotationangles</b> (boolean) - <span class="red">GZDB only</span>.<br /> + When set to <b>true</b>, editor actions related to changing thing angle will snap the resulting angle to 45 degree increments.<br /> + Default value is <b>false</b>.<br /> + <br /> + <b class="fat">start3dmode</b> (integer)<br /> + Thing type number that Doom Builder will use to keep your Visual Mode camera position stored in the map. Doom Builder will place a single thing of this type in your map and move it along as you move in Visual Mode.<br /> + <br /> + <b class="fat">skyflatname</b> (string)<br /> + Name of the flat that is interpreted as sky (meaning there is no ceiling). Doom Builder and plugins can use this information for various purposes. <br /> + Default value is <b>"F_SKY1"</b>.<br /> + <br /> + <b class="fat">defaultskytextures</b> (structure) - <span class="red">GZDB only</span>.<br /> + Defines the relationship between map names and sky texture names used by vanilla maps.<br /> + <br /> + <strong>Example:</strong> + <pre> defaultskytextures { SKY1 = "MAP01,MAP02,MAP03,MAP04,MAP05"; @@ -145,10 +177,15 @@ defaultskytextures SKY3 = "MAP21,MAP22,MAP23,MAP24,MAP25"; } </pre> - <br /> -<b class="fat">longtexturenames</b> (boolean) - <span class="red">GZDB only</span>.<br /> - Enables support for long (> 8 chars) texture names. This is used by GZDoom Builder to limit the input fields in the user interface and to check the validity of texture names in resources. This setting should only be enabled for UDMF game configurations. Enabling this setting will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3 This does NOT determine the actual limitation on the texture names in the map file format.<br />Default value is <b>false</b>.<br /> - <br /> + <br /> + <b class="fat">longtexturenames</b> (boolean) - <span class="red">GZDB only</span>.<br /> + Enables support for long (> 8 chars) texture names. This is used by GZDoom Builder to limit the input fields in the user interface and to check the validity of texture names in resources. This setting should only be enabled for UDMF game configurations. Enabling this setting will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3 This does NOT determine the actual limitation on the texture names in the map file format.<br /> + Default value is <b>false</b>.<br /> + <br /> + <b class="fat">sidedefcompressionignoresaction</b> (boolean) - <span class="red">GZDB only</span>.<br /> + When set to true, sidedefs will be compressed regardless of linedef action or tag(s) (DB2 behaviour, can potentially cause problems when target source port doesn't decompress sidedefs).<br /> + When set to false, sidedefs, which belong to a line with an action or non-zero tag(s), will be skipped when compressing sidedefs.<br /> + Default value is <b>false</b>.<br /> </p> </div> </body> diff --git a/Help/gzdb/features/all_modes/synch_camera.html b/Help/gzdb/features/all_modes/synch_camera.html index 51e057abec26446b944572c1e9d3d1bf131d0bb6..36def4be6c2b3946447bfcfc315403158c1fda9b 100644 --- a/Help/gzdb/features/all_modes/synch_camera.html +++ b/Help/gzdb/features/all_modes/synch_camera.html @@ -27,6 +27,9 @@ <p><img src="synch_cam3.jpg" alt="" width="740" height="515" /></p> <p>If you leave Visual mode now, the map will be centered at Visual camera's location:</p> <p><img src="synch_cam4.jpg" alt="" width="736" height="512" /></p> - <p>If you don't like this behaviour, you can disable it in the <a href="../../../w_preferences.html">Preferences window</a>.</p> + <p>If you don't like this behaviour, disable "<b>Synchronize camera position between 2D and 3D modes</b>" <a href="../../../w_preferences.html">Preferences</a> option.</p> + <h2>Additional keys:</h2> + <p>Holding <b>Shift</b> while switching to/from Visual mode will also synchronize selected map elements.<br /> + Holding <b>Ctrl</b> while switching to/from Visual mode will temporarily disable camera synchronization (works only when "<b>Synchronize camera position between 2D and 3D modes</b>" <a href="../../../w_preferences.html">Preferences</a> option is enabled).</p> </div> </body> diff --git a/Help/gzdb/features/classic_modes/draw_grid_tri.jpg b/Help/gzdb/features/classic_modes/draw_grid_tri.jpg index 68817542e7ea8886f6e1ebe0d98f2b6b3847954c..6cd5d922c829ba816bf75b1c578aeaa2e3d3db5c 100644 Binary files a/Help/gzdb/features/classic_modes/draw_grid_tri.jpg and b/Help/gzdb/features/classic_modes/draw_grid_tri.jpg differ diff --git a/Help/gzdb/features/classic_modes/mode_drawcurve.html b/Help/gzdb/features/classic_modes/mode_drawcurve.html index 948a54d2c2fbc3ecec128c630a419a484e4a891e..5a2bdd767ea0aface3e9547289d2d0c4d46a406e 100644 --- a/Help/gzdb/features/classic_modes/mode_drawcurve.html +++ b/Help/gzdb/features/classic_modes/mode_drawcurve.html @@ -25,7 +25,9 @@ This mode lets you draw various curve shapes. <br> <b>Default key:</b> Ctrl-Alt-D.<br> <b>Additional actions:</b> Increase Subdivision Level, Decrease Subdivision Level.<br><br> You can activate this mode by pressing <strong>Ctrl-Alt-D</strong> (default key).<br> -You can use the side panel or "<strong>Increase Subdivision Level</strong>" and "<strong>Decrease Subdivision Level</strong>" actions to control how detailed the curve is: +Press "<strong>Continuous drawing</strong>" button on the mode panel to disable automatic switching to previous editing mode after finishing drawing.<br> +Press "<strong>Auto-finish drawing</strong>" button on the mode panel to automatically finish drawing when currently drawn lines and already existing level geometry form a closed shape.<br> +You can use the mode panel or "<strong>Increase Subdivision Level</strong>" and "<strong>Decrease Subdivision Level</strong>" actions to control how detailed the curve is: <br> <img src="draw_curve.jpg" /></div> </body> diff --git a/Help/gzdb/features/classic_modes/mode_drawellipse.html b/Help/gzdb/features/classic_modes/mode_drawellipse.html index 8c81f820f61f6f278259f53146918968d51f2151..2fb75b987dc202c774cd06b98f295613ca9ad608 100644 --- a/Help/gzdb/features/classic_modes/mode_drawellipse.html +++ b/Help/gzdb/features/classic_modes/mode_drawellipse.html @@ -21,14 +21,15 @@ This mode lets you draw various ellipsoid shapes.<br> <b>Menu path:</b> Mode -> Draw Ellipse.<br> <b>Action category:</b> Drawing.<br> <b>Default key:</b> Ctrl-Alt-D.<br> - <b>Additional actions:</b> Increase Subdivision Level, Decrease Subdivision Level, Increase Corners Bevel, Decrease Corners Bevel.<br> + <b>Additional actions:</b> Increase Subdivision Level, Decrease Subdivision Level, Increase Corners Bevel, Decrease Corners Bevel, Rotate Clockwise, Rotate Counterclockwise.<br> <br> You can activate this mode by pressing <strong>Alt-Shift-D</strong> (default key).<br> - You can use the side panel or "<strong>Increase Subdivision Level</strong>" and "<strong>Decrease Subdivision Level</strong>" actions to control the number of sides ellipse has: - <br> + Press "<strong>Continuous drawing</strong>" button on the mode panel to disable automatic switching to previous editing mode after finishing drawing.<br> + You can use the mode panel or "<strong>Rotate Clockwise</strong>" and "<strong>Rotate Counterclockwise</strong>" actions to rotate the shape.<br> + You can use the mode panel or "<strong>Increase Subdivision Level</strong>" and "<strong>Decrease Subdivision Level</strong>" actions to control the number of sides ellipse has.<br> <img src="draw_ellipse1.jpg" /> <br> - You can use side panel or "<strong>Increase Corners Bevel</strong>" and "<strong>Decrease Corners Bevel</strong>" actions to bevel the ellipse: <br> + You can use mode panel or "<strong>Increase Corners Bevel</strong>" and "<strong>Decrease Corners Bevel</strong>" actions to bevel the ellipse: <br> <img src="draw_ellipse2.jpg" /> <br> When using "<strong>Increase/Decrease Corners Bevel</strong>" actions, the bevel increment is based on the current grid size.</p> diff --git a/Help/gzdb/features/classic_modes/mode_drawgrid.html b/Help/gzdb/features/classic_modes/mode_drawgrid.html index 2d06dc1fbc03a3a6d7b1913ab277f8864e667ddf..19654ae148f2f799ac77a8b70a6fbabef12cf708 100644 --- a/Help/gzdb/features/classic_modes/mode_drawgrid.html +++ b/Help/gzdb/features/classic_modes/mode_drawgrid.html @@ -24,8 +24,9 @@ <b>Default key:</b> none.<br /> <b>Additional actions:</b> Increase Subdivision Level, Decrease Subdivision Level, Increase Corners Bevel, Decrease Corners Bevel.</p> <p>You can use the side panel or "<strong>Increase/Decrease Subdivision Level</strong>" and "<strong>Increase/Decrease Corners Bevel</strong>" actions to change the number of horizontal and vertical slices.<br /> - Check "<strong>Lock slices to grid</strong>" to match slices number to current grid size.<br /> - Check "<strong>Triangulate</strong>" if you want to create triangles instead of quads:</p> + Change "<strong>Lock slices to grid</strong>" setting to match slices number to current grid size horizontally, vertically or in both directions.<br /> + Check "<strong>Triangulate</strong>" if you want to create triangles instead of quads.<br /> + Check "<strong>Continuous drawing</strong>" to disable automatic switching to previous editing mode after finishing drawing.</p> <p><img src="draw_grid_tri.jpg" alt="" /></p> </div> </body> diff --git a/Help/gzdb/features/classic_modes/mode_drawrect.html b/Help/gzdb/features/classic_modes/mode_drawrect.html index ed12653dff8b7aaa611434ffb2f9bba76cfa680c..1efd0aa91d4011bf5831eec5a922be96ac75d6e4 100644 --- a/Help/gzdb/features/classic_modes/mode_drawrect.html +++ b/Help/gzdb/features/classic_modes/mode_drawrect.html @@ -21,9 +21,11 @@ This mode lets you draw various rectangle shapes.<br> <b>Menu path:</b> Mode -> Draw Rectangle.<br /> <b>Action category:</b> Drawing.<br> <b>Default key:</b> Ctrl-Shift-D.<br> -<b>Additional actions:</b> Increase Subdivision Level, Decrease Subdivision Level, Increase Corners Bevel, Decrease Corners Bevel.<br><br> +<b>Additional actions:</b> Increase Subdivision Level, Decrease Subdivision Level, Increase Corners Bevel, Decrease Corners Bevel.<br> +<br> You can activate this mode by pressing <strong>Ctrl-Shift-D</strong> (default key).<br> -You can use the side panel or "<strong>Increase/Decrease Subdivision Level</strong>" and "<strong>Increase/Decrease Corners Bevel</strong>" actions to change corner bevel amount and detail level: +Press "<strong>Continuous drawing</strong>" button on the mode panel to disable automatic switching to previous editing mode after finishing drawing.<br> +You can use the mode panel or "<strong>Increase/Decrease Subdivision Level</strong>" and "<strong>Increase/Decrease Corners Bevel</strong>" actions to change corner bevel amount and detail level: <br> <img src="draw_rectangle1.jpg" /> <br> diff --git a/Help/gzdb/features/classic_modes/mode_soundenvironment.html b/Help/gzdb/features/classic_modes/mode_soundenvironment.html index 1fe5196453e625fdc43641dbd889d47a05f20496..147d8c5822d08f3e5cdd9213105c5249dd27512e 100644 --- a/Help/gzdb/features/classic_modes/mode_soundenvironment.html +++ b/Help/gzdb/features/classic_modes/mode_soundenvironment.html @@ -23,7 +23,8 @@ <br> <b>Action category:</b> Modes.<br> <b>Default key:</b> none.<br><br> -This mode shows the sound environments in ZDoom maps (both Hexen format and UDMF). The gray areas do not belong to a sound environment.<br><br> +This mode shows the sound environments in ZDoom UDMF maps. The gray areas do not belong to a sound environment.<br> +<br> The mode also supplies a docker that supplies information about the sound environments. It will display the sound environments, the SoundEnvironment things belonging to them and also the lines that are limit the sound environments. Clicking on the sound environments, things or lines in the list will center the map view on those objects. <br><br> diff --git a/Help/gzdb/features/general/menu_renderingtoolbar.jpg b/Help/gzdb/features/general/menu_renderingtoolbar.jpg index 312620b27c3578c90339350d1d3fd2926ebe497c..ffc0c3816ba21cf1313e5ef6ad01cbea19d57d4f 100644 Binary files a/Help/gzdb/features/general/menu_renderingtoolbar.jpg and b/Help/gzdb/features/general/menu_renderingtoolbar.jpg differ diff --git a/Help/gzdb/features/general/rendering_toolbar.html b/Help/gzdb/features/general/rendering_toolbar.html index 1a9e7de38f31d5d8d31f976d05f72424ad68da4a..5aa8c494cb8415db41ef518c7f6a6cf7a6bdd914 100644 --- a/Help/gzdb/features/general/rendering_toolbar.html +++ b/Help/gzdb/features/general/rendering_toolbar.html @@ -19,16 +19,16 @@ <div id="contents"> <img src="menu_renderingtoolbar.jpg" /> - <p>The Rendering toolbar allows you to toggle several GZDoom Builder's features:</p> + <p>The <strong>Rendering toolbar</strong> allows you to toggle several enhanced rendering features:</p> <ol> - <li>Toggles models, dynamic lights and fog rendering in Visual mode.</li> - <li>Toggles between available dynamic lights rendering modes in Visual mode.</li> - <li>Toggles between available model rendering modes.</li> - <li>Toggles fog rendering in Visual mode.</li> + <li>Allows to select dynamic lights rendering mode used in <a href="../../../e_visual.html">Visual mode</a>.</li> + <li>Allows to select model rendering mode.</li> + <li>Toggles fog rendering in <a href="../../../e_visual.html">Visual mode</a>.</li> + <li>Toggles sky rendering in <a href="../../../e_visual.html">Visual mode</a>.</li> <li>Toggles <a href="../all_modes/event_lines.html">Event lines</a>.</li> - <li>Toggles <a href="../visual_mode/visual_verts.html">Visual vertices</a> in Visual mode (UDMF only).</li> + <li>Toggles <a href="../visual_mode/visual_verts.html">Visual vertices</a> in <a href="../../../e_visual.html">Visual mode</a> (UDMF only).</li> </ol> - <p>Most of these settings can also be toggled using actions from "<strong>Rendering</strong>" category.<br /> - You can toggle currently enabled rendering effects using "<strong>Toggle GZDoom effects</strong>" action.</p> + <p>Most of these settings can also be toggled using actions found in "<strong>Rendering</strong>" category or appropriate <strong>View menu</strong> items.<br /> + You can toggle rendering effects using "<strong>Toggle Enhanced Effects</strong>" action.</p> </div> </body> diff --git a/Help/gzdb/text_lumps.html b/Help/gzdb/text_lumps.html index 8898be2a0cc657af11e84904155a1cc10de5d863..22c204154dd349056365dd2407ef10a8393aec04 100644 --- a/Help/gzdb/text_lumps.html +++ b/Help/gzdb/text_lumps.html @@ -22,7 +22,11 @@ </div> <div id="contents"> - <p>GZDoom Builder will automatically load data from the following lumps if they are present in the map's resources.</p> + <p>GZDoom Builder will automatically load data from the following lumps if they are present in the map's resources:</p> + <h2>DECORATE:</h2> + Actor definitions are loaded and used to poulate Things list. Extra parameters can be assigned using <a href="../gc_decoratekeys.html">special comments</a>.<br /> + DamageTypes are loaded and used in the "Damage Type" drop-down of the Edit Sector window (UDMF only). + <a name="textures" id="textures"></a><h2>TEXTURES:</h2> You can use "<strong>//$GZDB_SKIP</strong>" special comment to abort parsing of the current file. Useful if you don't want textures from certain files or parts of files to show up in the <a href="w_imagesbrowser.html">Image Browser</a> or want to increase resource loading speed.<br /><br /> GZDoom Builder adds support for the following TEXTURES parameters: @@ -53,6 +57,15 @@ <h2>SNDSEQ:</h2> Sound Sequence and Sound Sequence Group definitions are loaded and can be selected in the "Sound sequence" drop-down of the Edit Sector window (UDMF only). + + <h2>TERRAIN:</h2> + Terrain names are loaded and used in the floor and ceiling "Terrain" drop-downs of the Edit Sector window (UDMF only). + + <h2>X11R6RGB:</h2> + Colors are loaded and used by other text parsers where appropriate. + + <h2>CVARINFO:</h2> + CVARs are loaded. Currently the editor uses them only for "DistanceCheck" DECORATE property support. <a name="modeldef" id="modeldef"></a> <h2>MODELDEF:</h2> diff --git a/Source/Core/Actions/Action.cs b/Source/Core/Actions/Action.cs index 0037f23ae510835609363aa5fdef0294e8324fee..59304b388e96c13784b6a1553e1ae2200b35a831 100644 --- a/Source/Core/Actions/Action.cs +++ b/Source/Core/Actions/Action.cs @@ -133,15 +133,19 @@ namespace CodeImp.DoomBuilder.Actions int button = key & ~((int)Keys.Control | (int)Keys.Shift | (int)Keys.Alt); // When the button is a control key, then remove the control itsself - if((button == (int)Keys.ControlKey) || - (button == (int)Keys.ShiftKey)) + if((button == (int)Keys.ControlKey) || (button == (int)Keys.ShiftKey) || (button == (int)Keys.Alt)) { ctrl = 0; key = key & ~((int)Keys.Control | (int)Keys.Shift | (int)Keys.Alt); } - // Determine control prefix - if(ctrl != 0) ctrlprefix = conv.ConvertToString(key); + //mxd. Determine control prefix + if(ctrl != 0) + { + if((key & (int)Keys.Control) != 0) ctrlprefix += "Ctrl+"; + if((key & (int)Keys.Alt) != 0) ctrlprefix += "Alt+"; + if((key & (int)Keys.Shift) != 0) ctrlprefix += "Shift+"; + } // Check if button is special switch(button) diff --git a/Source/Core/Actions/ActionManager.cs b/Source/Core/Actions/ActionManager.cs index ee882570ed81b8227483ab08e5bfcc1fa9583bb4..fc529358fff8648e583aef6d6969feb638245c00 100644 --- a/Source/Core/Actions/ActionManager.cs +++ b/Source/Core/Actions/ActionManager.cs @@ -172,7 +172,6 @@ namespace CodeImp.DoomBuilder.Actions // Done with the resource actionsreader.Dispose(); - actionsdata.Dispose(); break; //mxd. Usually we have a single "Actions.cfg", right? } } diff --git a/Source/Core/Actions/HintsManager.cs b/Source/Core/Actions/HintsManager.cs index 5c4a7fc8ebd68ad7a2586c6608a6fcf0c437ee58..c9f5c0974af465c314ac2c3e22b0ce416a45ed55 100644 --- a/Source/Core/Actions/HintsManager.cs +++ b/Source/Core/Actions/HintsManager.cs @@ -63,12 +63,11 @@ namespace CodeImp.DoomBuilder.Actions List<string> lines = new List<string>(2); // Get a stream from the resource - using(Stream data = asm.GetManifestResourceStream(rn)) + Stream data = asm.GetManifestResourceStream(rn); + if(data == null) return; + using(StreamReader reader = new StreamReader(data, Encoding.ASCII)) { - using(StreamReader reader = new StreamReader(data, Encoding.ASCII)) - { - while(!reader.EndOfStream) lines.Add(reader.ReadLine()); - } + while(!reader.EndOfStream) lines.Add(reader.ReadLine()); } Dictionary<string, List<string>> group = new Dictionary<string, List<string>>(StringComparer.Ordinal); @@ -119,7 +118,7 @@ namespace CodeImp.DoomBuilder.Actions //add the last class hints.Add(asmname + classname, ProcessHints(group)); - break; + return; } } } diff --git a/Source/Core/Builder.csproj b/Source/Core/Builder.csproj index 4fe9de579e3b72b73840d9f78b9cd7935ef0726b..70c252692e1ffc662ddce23635cce5c0ce4ee905 100644 --- a/Source/Core/Builder.csproj +++ b/Source/Core/Builder.csproj @@ -73,7 +73,7 @@ <PlatformTarget>x86</PlatformTarget> <UseVSHostingProcess>false</UseVSHostingProcess> <ErrorReport>prompt</ErrorReport> - <DefineConstants>TRACE</DefineConstants> + <DefineConstants>TRACE;PROFILE</DefineConstants> </PropertyGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. @@ -550,11 +550,13 @@ <Compile Include="Rendering\WorldVertex.cs" /> </ItemGroup> <ItemGroup> - <Reference Include="JetBrains.Profiler.Core.Api, Version=1.3.1661.20096, Culture=neutral, PublicKeyToken=1010a0d8d6380325" Condition=" '$(Configuration)|$(Platform)' == 'Debug + Profiler|x86' Or '$(Configuration)|$(Platform)' == 'Release + Profiler|x86' " /> - <Reference Include="ScintillaNET.3.5, Version=3.5.6.0, Culture=neutral, processorArchitecture=x86"> + <Reference Include="JetBrains.Profiler.Core.Api, Version=1.3.1661.20096, Culture=neutral, PublicKeyToken=1010a0d8d6380325" Condition=" '$(Configuration)|$(Platform)' == 'Debug + Profiler|x86' Or '$(Configuration)|$(Platform)' == 'Release + Profiler|x86' "> + <SpecificVersion>False</SpecificVersion> + </Reference> + <Reference Include="ScintillaNET.3.5, Version=3.5.8.0, Culture=neutral, processorArchitecture=x86"> <Private>False</Private> </Reference> - <Reference Include="SharpCompress.3.5, Version=0.11.2.0, Culture=neutral, processorArchitecture=x86"> + <Reference Include="SharpCompress.3.5, Version=0.11.5.0, Culture=neutral, processorArchitecture=x86"> <Private>False</Private> </Reference> <Reference Include="SlimDX, Version=2.0.13.43, Culture=neutral, PublicKeyToken=b1b0c32fd1ffe4f9, processorArchitecture=x86" /> @@ -712,7 +714,7 @@ </EmbeddedResource> <EmbeddedResource Include="Resources\Actions.cfg" /> <EmbeddedResource Include="Resources\display2d.fx" /> - <EmbeddedResource Include="Resources\Thing2D.png" /> + <EmbeddedResource Include="Resources\ThingTexture2D.png" /> <EmbeddedResource Include="Resources\things2d.fx" /> <EmbeddedResource Include="Resources\world3d.fx" /> </ItemGroup> @@ -758,6 +760,9 @@ <Compile Include="Controls\ArgumentsControl.Designer.cs"> <DependentUpon>ArgumentsControl.cs</DependentUpon> </Compile> + <Compile Include="Controls\BufferedTreeView.cs"> + <SubType>Component</SubType> + </Compile> <Compile Include="Controls\ButtonsNumericTextboxDesigner.cs" /> <Compile Include="Controls\CollapsibleSplitContainer.cs"> <SubType>Component</SubType> @@ -838,6 +843,9 @@ <Compile Include="Controls\ToolStripNumericUpDown.cs"> <SubType>Component</SubType> </Compile> + <Compile Include="Controls\TransparentListView.cs"> + <SubType>Component</SubType> + </Compile> <Compile Include="Controls\TransparentPanel.cs"> <SubType>Component</SubType> </Compile> @@ -917,6 +925,8 @@ <Compile Include="GZBuilder\Rendering\SizelessVisualThingCage.cs" /> <Compile Include="GZBuilder\Rendering\ThingBoundingBox.cs" /> <Compile Include="GZBuilder\Data\ThingCopyData.cs" /> + <Compile Include="Map\MergeGeometryMode.cs" /> + <Compile Include="Map\SectorBuilder.cs" /> <Compile Include="GZBuilder\Rendering\VisualVertexHandle.cs" /> <Compile Include="GZBuilder\Geometry\Line3D.cs" /> <Compile Include="GZBuilder\GZDoom\DecorateParserSE.cs" /> @@ -950,6 +960,7 @@ <Compile Include="Map\MapElementCollection.cs" /> <Compile Include="Map\SplitLineBehavior.cs" /> <Compile Include="Rendering\CommentType.cs" /> + <Compile Include="Rendering\CustomTextLabel.cs" /> <Compile Include="Rendering\SurfaceBufferSet.cs" /> <Compile Include="Rendering\SurfaceEntry.cs" /> <Compile Include="Rendering\SurfaceEntryCollection.cs" /> @@ -1140,10 +1151,16 @@ <None Include="Resources\About.png" /> <None Include="Resources\Configuration.png" /> <EmbeddedResource Include="Resources\Black.png" /> + <None Include="Resources\Angle1.png" /> + <None Include="Resources\Angle2.png" /> + <None Include="Resources\Angle3.png" /> + <None Include="Resources\Angle4.png" /> + <None Include="Resources\Angle5.png" /> + <None Include="Resources\Angle6.png" /> + <None Include="Resources\Angle7.png" /> <Content Include="Resources\DB2.ico" /> <None Include="Resources\GZDB2.ico" /> <None Include="Resources\fog.png" /> - <None Include="Resources\fx.png" /> <None Include="Resources\GZDB_Logo_small.png" /> <None Include="Resources\InfoLine.png" /> <None Include="Resources\Keyboard.png" /> @@ -1173,10 +1190,14 @@ <None Include="Resources\MixedThings.png" /> <None Include="Resources\LinedefColorPresets.png" /> <EmbeddedResource Include="Resources\MissingSky3D.png" /> + <None Include="Resources\MergeGeo.png" /> + <None Include="Resources\MergeGeoClassic.png" /> + <None Include="Resources\MergeGeoRemoveLines.png" /> <Content Include="Resources\Model.png" /> <None Include="Resources\ModelDisabled.png" /> <None Include="Resources\ModelFiltered.png" /> <Content Include="Resources\Model_selected.png" /> + <None Include="Resources\SplitSectors.png" /> <None Include="Resources\ScriptProperty.png" /> <None Include="Resources\TextWhitespace.png" /> <None Include="Resources\TextIndent.png" /> @@ -1368,9 +1389,7 @@ <SubType>Designer</SubType> <DependentUpon>ThingsFiltersForm.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Resources\Font.png" /> <EmbeddedResource Include="Resources\White.png" /> - <EmbeddedResource Include="Resources\Font.cfg" /> <EmbeddedResource Include="Windows\UpdateForm.resx"> <DependentUpon>UpdateForm.cs</DependentUpon> </EmbeddedResource> diff --git a/Source/Core/Compilers/Compiler.cs b/Source/Core/Compilers/Compiler.cs index bbc18bfeaca6f0f233a4ef10b352e7e73ed53255..8d1e7a393c61f9eefa8d95cdbe81fbca49d6b6f5 100644 --- a/Source/Core/Compilers/Compiler.cs +++ b/Source/Core/Compilers/Compiler.cs @@ -100,7 +100,7 @@ namespace CodeImp.DoomBuilder.Compilers if(!isdisposed) { Exception deleteerror; - float starttime = Clock.CurrentTime; + long starttime = Clock.CurrentTime; do { diff --git a/Source/Core/Config/AllTexturesSet.cs b/Source/Core/Config/AllTexturesSet.cs index 3afaf557da0c1e53529843dca307951194349b80..c0b95abc06576df26f9f33de66c9c06d2705565c 100644 --- a/Source/Core/Config/AllTexturesSet.cs +++ b/Source/Core/Config/AllTexturesSet.cs @@ -16,6 +16,7 @@ #region ================== Namespaces +using System; using System.Collections.Generic; using CodeImp.DoomBuilder.Data; @@ -27,22 +28,22 @@ namespace CodeImp.DoomBuilder.Config { #region ================== Constants - public const string NAME = "All"; + private const string NAME = "All"; #endregion #region ================== Variables // Matching textures and flats - private List<ImageData> textures; - private List<ImageData> flats; + private Dictionary<string, ImageData> textures; + private Dictionary<string, ImageData> flats; #endregion #region ================== Properties - public ICollection<ImageData> Textures { get { return textures; } } - public ICollection<ImageData> Flats { get { return flats; } } + public ICollection<ImageData> Textures { get { return textures.Values; } } + public ICollection<ImageData> Flats { get { return flats.Values; } } #endregion @@ -52,8 +53,8 @@ namespace CodeImp.DoomBuilder.Config public AllTextureSet() { this.name = NAME; - this.textures = new List<ImageData>(); - this.flats = new List<ImageData>(); + this.textures = new Dictionary<string, ImageData>(StringComparer.Ordinal); + this.flats = new Dictionary<string, ImageData>(StringComparer.Ordinal); } #endregion @@ -62,12 +63,15 @@ namespace CodeImp.DoomBuilder.Config internal void AddTexture(ImageData image) { - textures.Add(image); + //mxd. Use short name when adding a texture with "classic" name to override same-named textures + // with textures loaded from directory/pk3 containters + textures[image.DisplayName.Length > 8 ? image.Name : image.ShortName] = image; } internal void AddFlat(ImageData image) { - flats.Add(image); + //mxd. Same with flats + flats[image.DisplayName.Length > 8 ? image.Name : image.ShortName] = image; } #endregion diff --git a/Source/Core/Config/ArgumentInfo.cs b/Source/Core/Config/ArgumentInfo.cs index 7187af1c1d36e65ac68d9214a422de7a1d6dcf69..ba23733d35f86e608998446a6bae064bc2f06b3c 100644 --- a/Source/Core/Config/ArgumentInfo.cs +++ b/Source/Core/Config/ArgumentInfo.cs @@ -16,6 +16,7 @@ #region ================== Namespaces +using System; using System.Collections; using System.Collections.Generic; using System.Globalization; @@ -40,6 +41,7 @@ namespace CodeImp.DoomBuilder.Config private readonly int type; private EnumList enumlist; private readonly object defaultvalue; //mxd + private readonly HashSet<string> targetclasses; //mxd #endregion @@ -49,6 +51,7 @@ namespace CodeImp.DoomBuilder.Config public string ToolTip { get { return tooltip; } } //mxd public bool Used { get { return used; } } public int Type { get { return type; } } + public HashSet<string> TargetClasses { get { return targetclasses; } } //mxd public EnumList Enum { get { return enumlist; } internal set { enumlist = value; } } public object DefaultValue { get { return defaultvalue; } } //mxd @@ -67,6 +70,18 @@ namespace CodeImp.DoomBuilder.Config this.type = cfg.ReadSetting(argspath + ".arg" + istr + ".type", 0); this.defaultvalue = cfg.ReadSetting(argspath + ".arg" + istr + ".default", 0); //mxd + //mxd. Check for TargetClass? + this.targetclasses = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase); + if(this.type == (int)UniversalType.ThingTag) + { + string s = cfg.ReadSetting(argspath + ".arg" + istr + ".targetclasses", string.Empty); + if(!string.IsNullOrEmpty(s)) + { + foreach(string tclass in s.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries)) + targetclasses.Add(tclass.Trim()); + } + } + // Determine enum type IDictionary argdic = cfg.ReadSetting(argspath + ".arg" + istr, new Hashtable()); if(argdic.Contains("enum")) @@ -75,7 +90,7 @@ namespace CodeImp.DoomBuilder.Config if(argdic["enum"] is IDictionary) { // Create anonymous enum - this.enumlist = new EnumList(argdic["enum"] as IDictionary); + this.enumlist = new EnumList((IDictionary)argdic["enum"]); } else { diff --git a/Source/Core/Config/GameConfiguration.cs b/Source/Core/Config/GameConfiguration.cs index 3727e1094a8d2930fae3fb09f52cdb1a002e2e0a..b41fbeaf4db967c1e636462c40cb2686b82a9f47 100644 --- a/Source/Core/Config/GameConfiguration.cs +++ b/Source/Core/Config/GameConfiguration.cs @@ -23,7 +23,6 @@ using System.Globalization; using CodeImp.DoomBuilder.IO; using CodeImp.DoomBuilder.Map; using CodeImp.DoomBuilder.Editing; - using CodeImp.DoomBuilder.GZBuilder.Data; using CodeImp.DoomBuilder.Data; @@ -86,9 +85,12 @@ namespace CodeImp.DoomBuilder.Config private readonly int rightboundary; private readonly int topboundary; private readonly int bottomboundary; + private readonly int safeboundary; //mxd private readonly bool doomlightlevels; + private readonly bool doomthingrotationangles; //mxd private readonly string actionspecialhelp; //mxd private readonly string thingclasshelp; //mxd + private readonly bool sidedefcompressionignoresaction; //mxd // Skills private readonly List<SkillInfo> skills; @@ -212,9 +214,12 @@ namespace CodeImp.DoomBuilder.Config public int RightBoundary { get { return rightboundary; } } public int TopBoundary { get { return topboundary; } } public int BottomBoundary { get { return bottomboundary; } } + public int SafeBoundary { get { return safeboundary; } } //mxd public bool DoomLightLevels { get { return doomlightlevels; } } + public bool DoomThingRotationAngles { get { return doomthingrotationangles; } } //mxd. When set to true, thing rotation angles will be clamped to the nearest 45 deg increment public string ActionSpecialHelp { get { return actionspecialhelp; } } //mxd public string ThingClassHelp { get { return thingclasshelp; } } //mxd + internal bool SidedefCompressionIgnoresAction { get { return sidedefcompressionignoresaction; } } //mxd // Skills public List<SkillInfo> Skills { get { return skills; } } @@ -369,9 +374,12 @@ namespace CodeImp.DoomBuilder.Config rightboundary = cfg.ReadSetting("rightboundary", 32767); topboundary = cfg.ReadSetting("topboundary", 32767); bottomboundary = cfg.ReadSetting("bottomboundary", -32768); + safeboundary = cfg.ReadSetting("safeboundary", 32767); //mxd doomlightlevels = cfg.ReadSetting("doomlightlevels", true); + doomthingrotationangles = cfg.ReadSetting("doomthingrotationangles", false); //mxd actionspecialhelp = cfg.ReadSetting("actionspecialhelp", string.Empty); //mxd thingclasshelp = cfg.ReadSetting("thingclasshelp", string.Empty); //mxd + sidedefcompressionignoresaction = cfg.ReadSetting("sidedefcompressionignoresaction", false); //mxd defaultLinedefActivation = cfg.ReadSetting("defaultlinedefactivation", ""); //mxd for(int i = 0; i < Linedef.NUM_ARGS; i++) makedoorargs[i] = cfg.ReadSetting("makedoorarg" + i.ToString(CultureInfo.InvariantCulture), 0); @@ -734,7 +742,7 @@ namespace CodeImp.DoomBuilder.Config IDictionary dic = cfg.ReadSetting("sectortypes", new Hashtable()); foreach(DictionaryEntry de in dic) { - // Try paring the action number + // Try parsing the action number int actionnumber; if(int.TryParse(de.Key.ToString(), NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, @@ -790,10 +798,11 @@ namespace CodeImp.DoomBuilder.Config foreach(DictionaryEntry de in dic) { // Check for valid structure - if(de.Value is IDictionary) + IDictionary value = de.Value as IDictionary; + if(value != null) { // Add option - geneffectoptions.Add(new GeneralizedOption("gen_sectortypes", "", de.Key.ToString(), de.Value as IDictionary)); + geneffectoptions.Add(new GeneralizedOption("gen_sectortypes", "", de.Key.ToString(), value)); } else { @@ -1046,7 +1055,8 @@ namespace CodeImp.DoomBuilder.Config } // This checks if an action is generalized or predefined - public static bool IsGeneralized(int action, List<GeneralizedCategory> categories) + public static bool IsGeneralized(int action) { return IsGeneralized(action, General.Map.Config.GenActionCategories); } + public static bool IsGeneralized(int action, IEnumerable<GeneralizedCategory> categories) { // Only actions above 0 if(action > 0) @@ -1082,41 +1092,90 @@ namespace CodeImp.DoomBuilder.Config } //mxd - public static bool IsGeneralizedSectorEffect(int effect, IEnumerable<GeneralizedOption> options) + public static bool IsGeneralizedSectorEffect(int effect) { return IsGeneralizedSectorEffect(effect, General.Map.Config.GenEffectOptions); } + public static bool IsGeneralizedSectorEffect(int effect, List<GeneralizedOption> options) { if(effect == 0) return false; - foreach(GeneralizedOption option in options) + + int cureffect = effect; + for(int i = options.Count - 1; i > -1; i--) { - foreach(GeneralizedBit bit in option.Bits) + for(int j = options[i].Bits.Count - 1; j > -1; j--) { - if(bit.Index > 0 && (effect & bit.Index) == bit.Index) return true; + GeneralizedBit bit = options[i].Bits[j]; + if(bit.Index > cureffect) continue; + if(bit.Index > 0 && (cureffect & bit.Index) == bit.Index) return true; + cureffect -= bit.Index; } } return false; } + //mxd + public static HashSet<int> GetGeneralizedSectorEffectBits(int effect) { return GetGeneralizedSectorEffectBits(effect, General.Map.Config.GenEffectOptions); } + public static HashSet<int> GetGeneralizedSectorEffectBits(int effect, List<GeneralizedOption> options) + { + HashSet<int> result = new HashSet<int>(); + if(effect > 0) + { + int cureffect = effect; + for(int i = options.Count - 1; i > -1; i--) + { + for(int j = options[i].Bits.Count - 1; j > -1; j--) + { + GeneralizedBit bit = options[i].Bits[j]; + if(bit.Index > 0 && (cureffect & bit.Index) == bit.Index) + { + cureffect -= bit.Index; + result.Add(bit.Index); + } + } + } + + if(cureffect > 0) result.Add(cureffect); + } + + return result; + } + //mxd public string GetGeneralizedSectorEffectName(int effect) { if(effect == 0) return "None"; - string title = "Unknown"; + string title = "Unknown generalized effect"; int matches = 0; - foreach(GeneralizedOption option in geneffectoptions) + int nongeneralizedeffect = effect; + + // Check all options, in bigger to smaller order + for(int i = geneffectoptions.Count - 1; i > -1; i--) { - foreach(GeneralizedBit bit in option.Bits) + for(int j = geneffectoptions[i].Bits.Count - 1; j > -1; j--) { - if(bit.Index > 0 && (effect & bit.Index) == bit.Index) + GeneralizedBit bit = geneffectoptions[i].Bits[j]; + if(bit.Index > 0 && (effect & bit.Index) == bit.Index) { - title = option.Name + ": " + bit.Title; + title = geneffectoptions[i].Name + ": " + bit.Title; + nongeneralizedeffect -= bit.Index; matches++; break; } } } - return (matches > 1 ? "Generalized (" + matches + " effects)" : title); + // Make generalized effect title + string gentitle = (matches > 1 ? "Generalized (" + matches + " effects)" : title); + + // Generalized effect only + if(nongeneralizedeffect <= 0) return gentitle; + + // Classic and generalized effects + if(General.Map.Config.SectorEffects.ContainsKey(nongeneralizedeffect)) + return General.Map.Config.SectorEffects[nongeneralizedeffect].Title + " + " + gentitle; + + if(matches > 0) return "Unknown effect + " + gentitle; + return "Unknown effect"; } // This checks if a specific edit mode class is listed diff --git a/Source/Core/Config/GeneralizedCategory.cs b/Source/Core/Config/GeneralizedCategory.cs index 417db8aca69e1eb9252a7d6229919f270d5de79c..a2a04792e14a1d6620ed615b4f449f740b28b830 100644 --- a/Source/Core/Config/GeneralizedCategory.cs +++ b/Source/Core/Config/GeneralizedCategory.cs @@ -55,13 +55,29 @@ namespace CodeImp.DoomBuilder.Config foreach(DictionaryEntry de in opts) { // Is this an option and not just some value? - if(de.Value is IDictionary) + IDictionary value = de.Value as IDictionary; + if(value != null) { // Add the option - this.options.Add(new GeneralizedOption(structure, name, de.Key.ToString(), (IDictionary)de.Value)); + this.options.Add(new GeneralizedOption(structure, name, de.Key.ToString(), value)); } } + //mxd. Sort by bits step + if(this.options.Count > 1) + { + this.options.Sort(delegate(GeneralizedOption o1, GeneralizedOption o2) + { + if(o1.BitsStep > o2.BitsStep) return 1; + if(o1.BitsStep == o2.BitsStep) + { + if(o1 != o2) General.ErrorLogger.Add(ErrorType.Error, "\"" + o1.Name + "\" and \"" + o2.Name + "\" generalized categories have the same bit step (" + o1.BitsStep + ")!"); + return 0; + } + return -1; + }); + } + // We have no destructor GC.SuppressFinalize(this); } diff --git a/Source/Core/Config/GeneralizedOption.cs b/Source/Core/Config/GeneralizedOption.cs index 794292d9213fde345e49fd502029fc0b6a512dd8..1b621b356802f3ebce22af4b13b521d3b0a8fcfb 100644 --- a/Source/Core/Config/GeneralizedOption.cs +++ b/Source/Core/Config/GeneralizedOption.cs @@ -39,6 +39,8 @@ namespace CodeImp.DoomBuilder.Config // Properties private string name; private List<GeneralizedBit> bits; + private int bitstep; //mxd + public int BitsStep { get { return bitstep; } } // mxd. Each subsequent value is incremented by this number #endregion @@ -82,6 +84,20 @@ namespace CodeImp.DoomBuilder.Config // Sort the list bits.Sort(); + + //mxd. Determine and check increment steps + if(bits.Count > 1) + { + // Use the second bit as the structure's step + bitstep = bits[1].Index; + + // Check the rest of the values + //for(int i = 1; i < bits.Count; i++) + //{ + // if(bits[i].Index - bits[i - 1].Index != bitstep) + // General.ErrorLogger.Add(ErrorType.Warning, "Structure \"" + fullpath + "." + name + "\" contains options with mixed increments (option \"" + bits[i].Title + "\" increment (" + (bits[i - 1].Index - bits[i].Index) + ") doesn't match the structure increment (" + bitstep + "))."); + //} + } // We have no destructor GC.SuppressFinalize(this); diff --git a/Source/Core/Config/PasteOptions.cs b/Source/Core/Config/PasteOptions.cs index d1d63b6b0173dcda7de30d30f32bf925edb07ed1..09a0221940ccb673477a3a10b5c2ad0afccad206 100644 --- a/Source/Core/Config/PasteOptions.cs +++ b/Source/Core/Config/PasteOptions.cs @@ -36,7 +36,6 @@ namespace CodeImp.DoomBuilder.Config private int changetags; // See TAGS_ constants private bool removeactions; - private bool adjustheights; #endregion @@ -44,7 +43,6 @@ namespace CodeImp.DoomBuilder.Config public int ChangeTags { get { return changetags; } set { changetags = value; } } public bool RemoveActions { get { return removeactions; } set { removeactions = value; } } - public bool AdjustHeights { get { return adjustheights; } set { adjustheights = value; } } #endregion @@ -60,7 +58,6 @@ namespace CodeImp.DoomBuilder.Config { this.changetags = p.changetags; this.removeactions = p.removeactions; - this.adjustheights = p.adjustheights; } #endregion @@ -78,7 +75,6 @@ namespace CodeImp.DoomBuilder.Config { changetags = cfg.ReadSetting(path + ".changetags", 0); removeactions = cfg.ReadSetting(path + ".removeactions", false); - adjustheights = cfg.ReadSetting(path + ".adjustheights", true); } // This writes to configuration @@ -86,7 +82,6 @@ namespace CodeImp.DoomBuilder.Config { cfg.WriteSetting(path + ".changetags", changetags); cfg.WriteSetting(path + ".removeactions", removeactions); - cfg.WriteSetting(path + ".adjustheights", adjustheights); } #endregion diff --git a/Source/Core/Config/ProgramConfiguration.cs b/Source/Core/Config/ProgramConfiguration.cs index c85fae6facf29003ee74a6831afa255e67cb317f..d502f5d40de3ebcf5eee59e43a43130ebc8d8325 100644 --- a/Source/Core/Config/ProgramConfiguration.cs +++ b/Source/Core/Config/ProgramConfiguration.cs @@ -19,11 +19,11 @@ using System; using System.Collections; using System.Collections.Generic; -using CodeImp.DoomBuilder.IO; using System.IO; +using System.Reflection; using System.Windows.Forms; +using CodeImp.DoomBuilder.IO; using CodeImp.DoomBuilder.Map; -using System.Reflection; using CodeImp.DoomBuilder.Plugins; using CodeImp.DoomBuilder.Rendering; @@ -50,6 +50,9 @@ namespace CodeImp.DoomBuilder.Config private float visualmousesensy; private int imagebrightness; private float doublesidedalpha; + private float activethingsalpha; //mxd + private float inactivethingsalpha; //mxd + private float hiddenthingsalpha; //mxd private byte doublesidedalphabyte; private int nightscircleprecision; private float backgroundalpha; @@ -87,6 +90,10 @@ namespace CodeImp.DoomBuilder.Config private bool locatetexturegroup; //mxd private bool keeptexturefilterfocused; //mxd private SplitLineBehavior splitlinebehavior; //mxd + private MergeGeometryMode mergegeomode; //mxd + private bool splitjoinedsectors; //mxd + private bool usehighlight; //mxd + private bool switchviewmodes; //mxd //mxd. Script editor settings private string scriptfontname; @@ -102,8 +109,13 @@ namespace CodeImp.DoomBuilder.Config private bool scriptshowfolding; //mxd private bool scriptautoshowautocompletion; //mxd - //mxd - private ModelRenderMode gzDrawModelsMode; + //mxd. Text labels settings + private string textlabelfontname; + private int textlabelfontsize; + private bool textlabelfontbold; + + //mxd + private ModelRenderMode gzDrawModelsMode; private LightRenderMode gzDrawLightsMode; private bool gzDrawFog; private bool gzDrawSky; @@ -112,8 +124,6 @@ namespace CodeImp.DoomBuilder.Config private bool gzShowEventLines; private bool gzOldHighlightMode; private int gzMaxDynamicLights; - private float gzDynamicLightRadius; - private float gzDynamicLightIntensity; private bool gzStretchView; private float gzVertexScale2D; private bool gzShowVisualVertices; @@ -121,7 +131,7 @@ namespace CodeImp.DoomBuilder.Config private string lastUsedConfigName; private string lastUsedMapFolder; private bool gzMarkExtraFloors; - private bool gzdoomrenderingeffects = true; //mxd + private bool enhancedrenderingeffects = true; //mxd private bool srb2renderingeffects = true; //sphere private bool showcolormaps = true; private bool drawCrosshair; @@ -161,7 +171,10 @@ namespace CodeImp.DoomBuilder.Config public int ImageBrightness { get { return imagebrightness; } internal set { imagebrightness = value; } } public float DoubleSidedAlpha { get { return doublesidedalpha; } internal set { doublesidedalpha = value; doublesidedalphabyte = (byte)(doublesidedalpha * 255f); } } public byte DoubleSidedAlphaByte { get { return doublesidedalphabyte; } } - public int NiGHTSCirclePrecision { get { return nightscircleprecision; } internal set { nightscircleprecision = value; } } + public int NiGHTSCirclePrecision { get { return nightscircleprecision; } internal set { nightscircleprecision = value; } } + public float ActiveThingsAlpha { get { return activethingsalpha; } internal set { activethingsalpha = value; } } //mxd + public float InactiveThingsAlpha { get { return inactivethingsalpha; } internal set { inactivethingsalpha = value; } } //mxd + public float HiddenThingsAlpha { get { return hiddenthingsalpha; } internal set { hiddenthingsalpha = value; } } //mxd public float BackgroundAlpha { get { return backgroundalpha; } internal set { backgroundalpha = value; } } public float VisualMouseSensX { get { return visualmousesensx; } internal set { visualmousesensx = value; } } public float VisualMouseSensY { get { return visualmousesensy; } internal set { visualmousesensy = value; } } @@ -199,23 +212,44 @@ namespace CodeImp.DoomBuilder.Config public bool LocateTextureGroup { get { return locatetexturegroup; } internal set { locatetexturegroup = value; } } //mxd public bool KeepTextureFilterFocused { get { return keeptexturefilterfocused; } internal set { keeptexturefilterfocused = value; } } //mxd public SplitLineBehavior SplitLineBehavior { get { return splitlinebehavior; } set { splitlinebehavior = value; } } //mxd + public MergeGeometryMode MergeGeometryMode { get { return mergegeomode; } internal set { mergegeomode = value; } } //mxd + public bool SplitJoinedSectors { get { return splitjoinedsectors; } internal set { splitjoinedsectors = value; } } //mxd + + //mxd. Highlight mode + public bool UseHighlight + { + get { return usehighlight; } + set + { + usehighlight = value; + General.Map.Renderer3D.ShowSelection = General.Settings.UseHighlight; + General.Map.Renderer3D.ShowHighlight = General.Settings.UseHighlight; + } + } - //mxd. Script editor settings - public string ScriptFontName { get { return scriptfontname; } internal set { scriptfontname = value; } } - public int ScriptFontSize { get { return scriptfontsize; } internal set { scriptfontsize = value; } } - public bool ScriptFontBold { get { return scriptfontbold; } internal set { scriptfontbold = value; } } - public bool ScriptOnTop { get { return scriptontop; } internal set { scriptontop = value; } } - public bool ScriptAutoIndent { get { return scriptautoindent; } internal set { scriptautoindent = value; } } - public bool ScriptAllmanStyle { get { return scriptallmanstyle; } internal set { scriptallmanstyle = value; } } //mxd - public bool ScriptUseTabs { get { return scriptusetabs; } internal set { scriptusetabs = value; } } //mxd - public int ScriptTabWidth { get { return scripttabwidth; } internal set { scripttabwidth = value; } } - public bool ScriptAutoCloseBrackets { get { return scriptautoclosebrackets; } internal set { scriptautoclosebrackets = value; } } //mxd - public bool ScriptShowLineNumbers { get { return scriptshowlinenumbers; } internal set { scriptshowlinenumbers = value; } } //mxd - public bool ScriptShowFolding { get { return scriptshowfolding; } internal set { scriptshowfolding = value; } } //mxd - public bool ScriptAutoShowAutocompletion { get { return scriptautoshowautocompletion; } internal set { scriptautoshowautocompletion = value; } } //mxd - - //mxd - public ModelRenderMode GZDrawModelsMode { get { return gzDrawModelsMode; } internal set { gzDrawModelsMode = value; } } + public bool SwitchViewModes { get { return switchviewmodes; } set { switchviewmodes = value; } } //mxd + + //mxd. Script editor settings + public string ScriptFontName { get { return scriptfontname; } internal set { scriptfontname = value; } } + public int ScriptFontSize { get { return scriptfontsize; } internal set { scriptfontsize = value; } } + public bool ScriptFontBold { get { return scriptfontbold; } internal set { scriptfontbold = value; } } + public bool ScriptOnTop { get { return scriptontop; } internal set { scriptontop = value; } } + public bool ScriptAutoIndent { get { return scriptautoindent; } internal set { scriptautoindent = value; } } + public bool ScriptAllmanStyle { get { return scriptallmanstyle; } internal set { scriptallmanstyle = value; } } //mxd + public bool ScriptUseTabs { get { return scriptusetabs; } internal set { scriptusetabs = value; } } //mxd + public int ScriptTabWidth { get { return scripttabwidth; } internal set { scripttabwidth = value; } } + public bool ScriptAutoCloseBrackets { get { return scriptautoclosebrackets; } internal set { scriptautoclosebrackets = value; } } //mxd + public bool ScriptShowLineNumbers { get { return scriptshowlinenumbers; } internal set { scriptshowlinenumbers = value; } } //mxd + public bool ScriptShowFolding { get { return scriptshowfolding; } internal set { scriptshowfolding = value; } } //mxd + public bool ScriptAutoShowAutocompletion { get { return scriptautoshowautocompletion; } internal set { scriptautoshowautocompletion = value; } } //mxd + + //mxd. Text labels settings + public string TextLabelFontName { get { return textlabelfontname; } internal set { textlabelfontname = value; } } + public int TextLabelFontSize { get { return textlabelfontsize; } internal set { textlabelfontsize = value; } } + public bool TextLabelFontBold { get { return textlabelfontbold; } internal set { textlabelfontbold = value; } } + + //mxd + public ModelRenderMode GZDrawModelsMode { get { return gzDrawModelsMode; } internal set { gzDrawModelsMode = value; } } public LightRenderMode GZDrawLightsMode { get { return gzDrawLightsMode; } internal set { gzDrawLightsMode = value; } } public bool GZDrawFog { get { return gzDrawFog; } internal set { gzDrawFog = value; } } public bool GZDrawSky { get { return gzDrawSky; } internal set { gzDrawSky = value; } } @@ -224,8 +258,6 @@ namespace CodeImp.DoomBuilder.Config public bool GZShowEventLines { get { return gzShowEventLines; } internal set { gzShowEventLines = value; } } public bool GZOldHighlightMode { get { return gzOldHighlightMode; } internal set { gzOldHighlightMode = value; } } public int GZMaxDynamicLights { get { return gzMaxDynamicLights; } internal set { gzMaxDynamicLights = value; } } - public float GZDynamicLightRadius { get { return gzDynamicLightRadius; } internal set { gzDynamicLightRadius = value; } } - public float GZDynamicLightIntensity { get { return gzDynamicLightIntensity; } internal set { gzDynamicLightIntensity = value; } } public bool GZStretchView { get { return gzStretchView; } internal set { gzStretchView = value; } } public float GZVertexScale2D { get { return gzVertexScale2D; } internal set { gzVertexScale2D = value; } } public bool GZShowVisualVertices { get { return gzShowVisualVertices; } internal set { gzShowVisualVertices = value; } } @@ -233,7 +265,7 @@ namespace CodeImp.DoomBuilder.Config public string LastUsedConfigName { get { return lastUsedConfigName; } internal set { lastUsedConfigName = value; } } public string LastUsedMapFolder { get { return lastUsedMapFolder; } internal set { lastUsedMapFolder = value; } } public bool GZMarkExtraFloors { get { return gzMarkExtraFloors; } internal set { gzMarkExtraFloors = value; } } - public bool GZDoomRenderingEffects { get { return gzdoomrenderingeffects; } set { gzdoomrenderingeffects = value; } } //mxd + public bool EnhancedRenderingEffects { get { return enhancedrenderingeffects; } set { enhancedrenderingeffects = value; } } //mxd public bool SRB2RenderingEffects { get { return srb2renderingeffects; } set { srb2renderingeffects = value; } } //sphere public bool ShowColormaps { get { return showcolormaps; } set { showcolormaps = value; } } //mxd public bool DrawCrosshair { get { return drawCrosshair; } internal set { drawCrosshair = value; } } @@ -299,7 +331,10 @@ namespace CodeImp.DoomBuilder.Config doublesidedalpha = cfg.ReadSetting("doublesidedalpha", 0.4f); doublesidedalphabyte = (byte)(doublesidedalpha * 255f); nightscircleprecision = cfg.ReadSetting("nightscircleprecision", 360); - backgroundalpha = cfg.ReadSetting("backgroundalpha", 1.0f); + activethingsalpha = cfg.ReadSetting("activethingsalpha", Presentation.THINGS_ALPHA); //mxd + inactivethingsalpha = cfg.ReadSetting("inactivethingsalpha", Presentation.THINGS_BACK_ALPHA); //mxd + hiddenthingsalpha = cfg.ReadSetting("hiddenthingsalpha", Presentation.THINGS_HIDDEN_ALPHA); //mxd + backgroundalpha = cfg.ReadSetting("backgroundalpha", 1.0f); qualitydisplay = cfg.ReadSetting("qualitydisplay", true); testmonsters = cfg.ReadSetting("testmonsters", true); defaultviewmode = cfg.ReadSetting("defaultviewmode", (int)ViewMode.Normal); @@ -333,21 +368,30 @@ namespace CodeImp.DoomBuilder.Config showtexturesizes = cfg.ReadSetting("showtexturesizes", true); locatetexturegroup = cfg.ReadSetting("locatetexturegroup", true); //mxd keeptexturefilterfocused = cfg.ReadSetting("keeptexturefilterfocused", true); //mxd - splitlinebehavior = (SplitLineBehavior) General.Clamp(cfg.ReadSetting("splitlinebehavior", 0), 0, 3); //mxd - - //mxd. Script editor - scriptfontname = cfg.ReadSetting("scriptfontname", "Courier New"); - scriptfontsize = cfg.ReadSetting("scriptfontsize", 10); - scriptfontbold = cfg.ReadSetting("scriptfontbold", false); - scriptontop = cfg.ReadSetting("scriptontop", true); - scriptautoindent = cfg.ReadSetting("scriptautoindent", true); - scriptallmanstyle = cfg.ReadSetting("scriptallmanstyle", false); //mxd - scriptusetabs = cfg.ReadSetting("scriptusetabs", true); //mxd - scripttabwidth = cfg.ReadSetting("scripttabwidth", 4); - scriptautoclosebrackets = cfg.ReadSetting("scriptautoclosebrackets", true); //mxd - scriptshowlinenumbers = cfg.ReadSetting("scriptshowlinenumbers", true); //mxd - scriptshowfolding = cfg.ReadSetting("scriptshowfolding", true); //mxd - scriptautoshowautocompletion = cfg.ReadSetting("scriptautoshowautocompletion", true); //mxd + splitlinebehavior = (SplitLineBehavior)General.Clamp(cfg.ReadSetting("splitlinebehavior", 0), 0, Enum.GetValues(typeof(SplitLineBehavior)).Length - 1); //mxd + mergegeomode = (MergeGeometryMode)General.Clamp(cfg.ReadSetting("mergegeometrymode", (int)MergeGeometryMode.REPLACE), 0, Enum.GetValues(typeof(MergeGeometryMode)).Length - 1); //mxd + splitjoinedsectors = cfg.ReadSetting("splitjoinedsectors", true); //mxd + usehighlight = cfg.ReadSetting("usehighlight", true); //mxd + switchviewmodes = cfg.ReadSetting("switchviewmodes", false); //mxd + + //mxd. Script editor + scriptfontname = cfg.ReadSetting("scriptfontname", "Courier New"); + scriptfontsize = cfg.ReadSetting("scriptfontsize", 10); + scriptfontbold = cfg.ReadSetting("scriptfontbold", false); + scriptontop = cfg.ReadSetting("scriptontop", true); + scriptautoindent = cfg.ReadSetting("scriptautoindent", true); + scriptallmanstyle = cfg.ReadSetting("scriptallmanstyle", false); + scriptusetabs = cfg.ReadSetting("scriptusetabs", true); + scripttabwidth = cfg.ReadSetting("scripttabwidth", 4); + scriptautoclosebrackets = cfg.ReadSetting("scriptautoclosebrackets", true); + scriptshowlinenumbers = cfg.ReadSetting("scriptshowlinenumbers", true); + scriptshowfolding = cfg.ReadSetting("scriptshowfolding", true); + scriptautoshowautocompletion = cfg.ReadSetting("scriptautoshowautocompletion", true); + + //mxd. Text labels + textlabelfontname = cfg.ReadSetting("textlabelfontname", "Microsoft Sans Serif"); + textlabelfontsize = cfg.ReadSetting("textlabelfontsize", 10); + textlabelfontbold = cfg.ReadSetting("textlabelfontbold", false); //mxd gzDrawModelsMode = (ModelRenderMode)cfg.ReadSetting("gzdrawmodels", (int)ModelRenderMode.ALL); @@ -359,8 +403,6 @@ namespace CodeImp.DoomBuilder.Config gzShowEventLines = cfg.ReadSetting("gzshoweventlines", true); gzOldHighlightMode = cfg.ReadSetting("gzoldhighlightmode", false); gzMaxDynamicLights = cfg.ReadSetting("gzmaxdynamiclights", 16); - gzDynamicLightRadius = cfg.ReadSetting("gzdynamiclightradius", 1.0f); - gzDynamicLightIntensity = cfg.ReadSetting("gzdynamiclightintensity", 1.0f); gzStretchView = cfg.ReadSetting("gzstretchview", true); gzVertexScale2D = cfg.ReadSetting("gzvertexscale2d", 1.0f); gzShowVisualVertices = cfg.ReadSetting("gzshowvisualvertices", true); @@ -415,7 +457,10 @@ namespace CodeImp.DoomBuilder.Config cfg.WriteSetting("testmonsters", testmonsters); cfg.WriteSetting("doublesidedalpha", doublesidedalpha); cfg.WriteSetting("nightscircleprecision", nightscircleprecision); - cfg.WriteSetting("backgroundalpha", backgroundalpha); + cfg.WriteSetting("activethingsalpha", activethingsalpha); //mxd + cfg.WriteSetting("inactivethingsalpha", inactivethingsalpha); //mxd + cfg.WriteSetting("hiddenthingsalpha", hiddenthingsalpha); //mxd + cfg.WriteSetting("backgroundalpha", backgroundalpha); cfg.WriteSetting("defaultviewmode", defaultviewmode); cfg.WriteSetting("classicbilinear", classicbilinear); cfg.WriteSetting("visualbilinear", visualbilinear); @@ -448,20 +493,29 @@ namespace CodeImp.DoomBuilder.Config cfg.WriteSetting("locatetexturegroup", locatetexturegroup); //mxd cfg.WriteSetting("keeptexturefilterfocused", keeptexturefilterfocused); //mxd cfg.WriteSetting("splitlinebehavior", (int)splitlinebehavior); //mxd - - //mxd. Script editor - cfg.WriteSetting("scriptfontname", scriptfontname); - cfg.WriteSetting("scriptfontsize", scriptfontsize); - cfg.WriteSetting("scriptfontbold", scriptfontbold); - cfg.WriteSetting("scriptontop", scriptontop); - cfg.WriteSetting("scriptusetabs", scriptusetabs); //mxd - cfg.WriteSetting("scripttabwidth", scripttabwidth); - cfg.WriteSetting("scriptautoindent", scriptautoindent); - cfg.WriteSetting("scriptallmanstyle", scriptallmanstyle); //mxd - cfg.WriteSetting("scriptautoclosebrackets", scriptautoclosebrackets); //mxd - cfg.WriteSetting("scriptshowlinenumbers", scriptshowlinenumbers); //mxd - cfg.WriteSetting("scriptshowfolding", scriptshowfolding); //mxd - cfg.WriteSetting("scriptautoshowautocompletion", scriptautoshowautocompletion); //mxd + cfg.WriteSetting("mergegeometrymode", (int)mergegeomode); //mxd + cfg.WriteSetting("splitjoinedsectors", splitjoinedsectors); //mxd + cfg.WriteSetting("usehighlight", usehighlight); //mxd + cfg.WriteSetting("switchviewmodes", switchviewmodes); //mxd + + //mxd. Script editor + cfg.WriteSetting("scriptfontname", scriptfontname); + cfg.WriteSetting("scriptfontsize", scriptfontsize); + cfg.WriteSetting("scriptfontbold", scriptfontbold); + cfg.WriteSetting("scriptontop", scriptontop); + cfg.WriteSetting("scriptusetabs", scriptusetabs); + cfg.WriteSetting("scripttabwidth", scripttabwidth); + cfg.WriteSetting("scriptautoindent", scriptautoindent); + cfg.WriteSetting("scriptallmanstyle", scriptallmanstyle); + cfg.WriteSetting("scriptautoclosebrackets", scriptautoclosebrackets); + cfg.WriteSetting("scriptshowlinenumbers", scriptshowlinenumbers); + cfg.WriteSetting("scriptshowfolding", scriptshowfolding); + cfg.WriteSetting("scriptautoshowautocompletion", scriptautoshowautocompletion); + + //mxd. Text labels + cfg.WriteSetting("textlabelfontname", textlabelfontname); + cfg.WriteSetting("textlabelfontsize", textlabelfontsize); + cfg.WriteSetting("textlabelfontbold", textlabelfontbold); //mxd cfg.WriteSetting("gzdrawmodels", (int)gzDrawModelsMode); @@ -473,8 +527,6 @@ namespace CodeImp.DoomBuilder.Config cfg.WriteSetting("gzoldhighlightmode", gzOldHighlightMode); cfg.WriteSetting("gztoolbargzdoom", gzToolbarGZDoom); cfg.WriteSetting("gzmaxdynamiclights", gzMaxDynamicLights); - cfg.WriteSetting("gzdynamiclightradius", gzDynamicLightRadius); - cfg.WriteSetting("gzdynamiclightintensity", gzDynamicLightIntensity); cfg.WriteSetting("gzstretchview", gzStretchView); cfg.WriteSetting("gzvertexscale2d", gzVertexScale2D); cfg.WriteSetting("gzshowvisualvertices", gzShowVisualVertices); diff --git a/Source/Core/Config/ScriptConfiguration.cs b/Source/Core/Config/ScriptConfiguration.cs index f389cfcfaded5724bcb900fdb66f0d7809366a99..859fb4f15c4b7a6b1ff9da4536c3aa3f655a1ab0 100644 --- a/Source/Core/Config/ScriptConfiguration.cs +++ b/Source/Core/Config/ScriptConfiguration.cs @@ -48,9 +48,7 @@ namespace CodeImp.DoomBuilder.Config { #region ================== Constants - private const string WORD_CHARS = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; //mxd - - #endregion + #endregion #region ================== Variables @@ -62,8 +60,8 @@ namespace CodeImp.DoomBuilder.Config // Editor settings private readonly string description; private readonly int codepage; - private readonly string wordchars; //mxd. Characters to be threated as part of a word by Scintilla - private readonly string[] extensions; + private readonly string extrawordchars; //mxd. Extra characters to be threated as part of a word by Scintilla + private readonly string[] extensions; private readonly bool casesensitive; private readonly int insertcase; private readonly Lexer lexer; @@ -115,8 +113,8 @@ namespace CodeImp.DoomBuilder.Config public string ArrayClose { get { return arrayclose; } } //mxd public string ArgumentDelimiter { get { return argumentdelimiter; } } public string Terminator { get { return terminator; } } - public string WordCharacters { get { return wordchars; } } //mxd - public ScriptType ScriptType { get { return scripttype; } } //mxd + public string ExtraWordCharacters { get { return extrawordchars; } } //mxd + public ScriptType ScriptType { get { return scripttype; } } //mxd // Collections public ICollection<string> Keywords { get { return keywordkeyssorted; } } @@ -163,8 +161,8 @@ namespace CodeImp.DoomBuilder.Config terminator = ""; description = "Plain text"; scripttype = ScriptType.UNKNOWN; //mxd - wordchars = WORD_CHARS; //mxd - extensions = new[] { "txt" }; + extrawordchars = ""; //mxd + extensions = new[] { "txt" }; } // Constructor @@ -201,7 +199,7 @@ namespace CodeImp.DoomBuilder.Config argumentdelimiter = cfg.ReadSetting("argumentdelimiter", ""); terminator = cfg.ReadSetting("terminator", ""); scripttype = (ScriptType)cfg.ReadSetting("scripttype", (int)ScriptType.UNKNOWN); //mxd - wordchars = WORD_CHARS + cfg.ReadSetting("extrawordchars", ""); //mxd + extrawordchars = cfg.ReadSetting("extrawordchars", ""); //mxd //mxd. Make braces array if (!string.IsNullOrEmpty(functionopen)) braces.Add(functionopen[0]); diff --git a/Source/Core/Config/ThingTypeInfo.cs b/Source/Core/Config/ThingTypeInfo.cs index 3fd08b78c2ded81645516256cce88c495b21fb53..fb65b74b46e7b3e9792419c7a8763365203efe88 100644 --- a/Source/Core/Config/ThingTypeInfo.cs +++ b/Source/Core/Config/ThingTypeInfo.cs @@ -41,6 +41,7 @@ namespace CodeImp.DoomBuilder.Config public const int THING_ERROR_NONE = 0; public const int THING_ERROR_INSIDE = 1; public const int THING_ERROR_INSIDE_STUCK = 2; + private const float THING_FIXED_SIZE = 14f; //mxd #endregion @@ -232,7 +233,7 @@ namespace CodeImp.DoomBuilder.Config this.args[i] = new ArgumentInfo(cfg, "thingtypes." + cat.Name + "." + key, i, enums); // Safety - if(this.radius < 4f) this.radius = 16f; + if(this.radius < 4f || this.fixedsize) this.radius = THING_FIXED_SIZE; if(this.hangs && this.absolutez) this.hangs = false; //mxd // Make long name for sprite lookup @@ -287,8 +288,8 @@ namespace CodeImp.DoomBuilder.Config this.flagsvaluetext = cat.FlagsValueText; this.parametertext = cat.ParameterText; - // Safety - if (this.radius < 4f) this.radius = 8f; + // Safety + if(this.radius < 4f || this.fixedsize) this.radius = THING_FIXED_SIZE; if(this.hangs && this.absolutez) this.hangs = false; //mxd // Make long name for sprite lookup @@ -341,8 +342,7 @@ namespace CodeImp.DoomBuilder.Config this.flagsvaluetext = cat.FlagsValueText; this.parametertext = cat.ParameterText; - // Safety - if (this.radius < 4f) this.radius = 8f; + // Safety if(this.hangs && this.absolutez) this.hangs = false; //mxd // Apply settings from actor @@ -392,8 +392,7 @@ namespace CodeImp.DoomBuilder.Config this.flagsvaluetext = cat.FlagsValueText; this.parametertext = cat.ParameterText; - // Safety - if (this.radius < 4f) this.radius = 8f; + // Safety if(this.hangs && this.absolutez) this.hangs = false; //mxd // Apply settings from actor @@ -618,7 +617,7 @@ namespace CodeImp.DoomBuilder.Config this.bright = actor.GetFlagValue("bright", false); // Safety - if(this.radius < 4f) this.radius = 8f; + if(this.radius < 4f || this.fixedsize) this.radius = THING_FIXED_SIZE; if(this.spritescale.Width == 0.0f) this.spritescale.Width = 1.0f; if(this.spritescale.Height == 0.0f) this.spritescale.Height = 1.0f; diff --git a/Source/Core/Controls/ActionSelectorControl.cs b/Source/Core/Controls/ActionSelectorControl.cs index a60f746eb83b3dbc4e3a49d53713cfd7afd04a14..35870d72c46ff877dc7c547eb379ecf32421ccda 100644 --- a/Source/Core/Controls/ActionSelectorControl.cs +++ b/Source/Core/Controls/ActionSelectorControl.cs @@ -221,6 +221,11 @@ namespace CodeImp.DoomBuilder.Controls list.SelectedIndex = itemindex; list.Refresh(); } + //mxd. This may be generalized effect, and it may've changed + else if(itemindex == -1) + { + list.Refresh(); + } // Raise change event //mxd. This HAS to be raised during Edit form setup, otherwise TypeHandlers in ArgumentBoxes won't be initialized diff --git a/Source/Core/Controls/ArgumentBox.Designer.cs b/Source/Core/Controls/ArgumentBox.Designer.cs index 5703ce224b814b238830718169b1960ef71c4b8a..4237d66fe00499d3190c2b56e05991ec9fc2829e 100644 --- a/Source/Core/Controls/ArgumentBox.Designer.cs +++ b/Source/Core/Controls/ArgumentBox.Designer.cs @@ -28,18 +28,24 @@ namespace CodeImp.DoomBuilder.Controls /// </summary> private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.combobox = new System.Windows.Forms.ComboBox(); this.button = new System.Windows.Forms.Button(); this.scrollbuttons = new System.Windows.Forms.VScrollBar(); + this.tooltip = new System.Windows.Forms.ToolTip(this.components); this.SuspendLayout(); // // combobox // this.combobox.DropDownWidth = 130; + this.combobox.ForeColor = System.Drawing.SystemColors.HotTrack; this.combobox.Location = new System.Drawing.Point(0, 2); this.combobox.Name = "combobox"; this.combobox.Size = new System.Drawing.Size(149, 21); this.combobox.TabIndex = 0; + this.tooltip.SetToolTip(this.combobox, "Use ++ or -- prefixes to change by given value.\r\nUse +++ or --- prefixes to incre" + + "mentally change by given value.\r\nUse < or > prefixes to decrementally or increme" + + "ntally set given value."); this.combobox.Validating += new System.ComponentModel.CancelEventHandler(this.combobox_Validating); this.combobox.TextChanged += new System.EventHandler(this.combobox_TextChanged); // @@ -86,5 +92,6 @@ namespace CodeImp.DoomBuilder.Controls private System.Windows.Forms.ComboBox combobox; private System.Windows.Forms.Button button; private System.Windows.Forms.VScrollBar scrollbuttons; + private System.Windows.Forms.ToolTip tooltip; } } diff --git a/Source/Core/Controls/ArgumentBox.cs b/Source/Core/Controls/ArgumentBox.cs index 04e9a0390a6a3f096ae1d4b35f844da871d220c2..07e524220ee9c2e268eca5da84d4a374dcd0ab12 100644 --- a/Source/Core/Controls/ArgumentBox.cs +++ b/Source/Core/Controls/ArgumentBox.cs @@ -89,7 +89,7 @@ namespace CodeImp.DoomBuilder.Controls private void combobox_Validating(object sender, CancelEventArgs e) { string str = combobox.Text.Trim().ToLowerInvariant(); - str = str.TrimStart('+', '-'); + str = str.TrimStart('+', '-', '<', '>'); // Anything in the box? if(combobox.Text.Trim().Length > 0) @@ -132,6 +132,13 @@ namespace CodeImp.DoomBuilder.Controls private void combobox_TextChanged(object sender, EventArgs e) { scrollbuttons.Enabled = !CheckIsRelative(); + + //mxd. Update button image? + if(typehandler.DynamicImage) + { + combobox_Validating(sender, new CancelEventArgs()); + button.Image = typehandler.BrowseImage; + } } // Mouse wheel used @@ -259,36 +266,72 @@ namespace CodeImp.DoomBuilder.Controls // This checks if the number is relative public bool CheckIsRelative() { - // Prefixed with ++ or --? - return (combobox.Text.Trim().StartsWith("++") || combobox.Text.Trim().StartsWith("--")); + // Prefixed with +++, ---, <, >, ++ or --? + string str = combobox.Text.Trim(); + return (str.StartsWith("+++") || str.StartsWith("---") + || str.StartsWith("++") || str.StartsWith("--") + || str.StartsWith("<") || str.StartsWith(">")); } // This returns the selected value - public int GetResult(int original) + public int GetResult(int original) { return GetResult(original, 0); } //mxd + public int GetResult(int original, int step) { int result; // Strip prefixes string str = combobox.Text.Trim().ToLowerInvariant(); - str = str.TrimStart('+', '-'); + string numstr = str.TrimStart('+', '-', '<', '>'); //mxd // Anything in the box? - if(combobox.Text.Trim().Length > 0) + if(numstr.Length > 0) { + //mxd. Prefixed with +++? + if(str.StartsWith("+++")) + { + // Add offset to number + int num; + if(!int.TryParse(numstr, out num)) num = 0; + result = original + num * step; + } + //mxd. Prefixed with ---? + else if(str.StartsWith("---")) + { + // Subtract offset from number + int num; + if(!int.TryParse(numstr, out num)) num = 0; + result = original - num * step; + } + // mxd. Prefixed with <? + else if(str.StartsWith("<")) + { + // Incremental decrease + int num; + if(!int.TryParse(numstr, out num)) num = 0; + result = num - step; + } + // mxd. Prefixed with >? + else if(str.StartsWith(">")) + { + // Incremental increase + int num; + if(!int.TryParse(numstr, out num)) num = 0; + result = num + step; + } // Prefixed with ++? - if(combobox.Text.Trim().StartsWith("++")) + else if(str.StartsWith("++")) { // Add number to original int num; - if(!int.TryParse(str, out num)) num = 0; + if(!int.TryParse(numstr, out num)) num = 0; result = original + num; } // Prefixed with --? - else if(combobox.Text.Trim().StartsWith("--")) + else if(str.StartsWith("--")) { // Subtract number from original int num; - if(!int.TryParse(str, out num)) num = 0; + if(!int.TryParse(numstr, out num)) num = 0; result = original - num; } else diff --git a/Source/Core/Controls/ArgumentBox.resx b/Source/Core/Controls/ArgumentBox.resx index 9f6cd25509d2c83cf2653a1e91949c14c7156175..3951bc8ed0e7c929c9bdd118208aaeeda43f5590 100644 --- a/Source/Core/Controls/ArgumentBox.resx +++ b/Source/Core/Controls/ArgumentBox.resx @@ -120,6 +120,9 @@ <metadata name="combobox.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> + <metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> <metadata name="button.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> diff --git a/Source/Core/Controls/ArgumentsControl.cs b/Source/Core/Controls/ArgumentsControl.cs index fe9b817a38392d8341528c52d439179e481687be..870035c4d2011fb5b2c0c090d179d32846c61082 100644 --- a/Source/Core/Controls/ArgumentsControl.cs +++ b/Source/Core/Controls/ArgumentsControl.cs @@ -26,12 +26,24 @@ namespace CodeImp.DoomBuilder.Controls #endregion + #region ================== Enums + + private enum ArgZeroMode + { + DEFAULT, + SCRIPT_NUMBER, + SCRIPT_NAME, + } + + #endregion + #region ================== Variables private string arg0str; private bool havearg0str; private int action; private ArgumentInfo[] arginfo; + private ArgZeroMode argzeromode; #endregion @@ -121,74 +133,88 @@ namespace CodeImp.DoomBuilder.Controls #region ================== Apply - public void Apply(Linedef l) + public void Apply(Linedef l, int step) { //mxd. Script name/number handling - if(scriptnumbers.Visible) + // We can't rely on control visibility here, because all controlls will be invisible if ArgumentsControl is invisible + // (for example, when a different tab is selected) + switch(argzeromode) { - //apply script number - if(!string.IsNullOrEmpty(scriptnumbers.Text)) - { - if(scriptnumbers.SelectedItem != null) - l.Args[0] = ((ScriptItem)((ColoredComboBoxItem)scriptnumbers.SelectedItem).Value).Index; - else if(!int.TryParse(scriptnumbers.Text.Trim(), out l.Args[0])) - l.Args[0] = 0; + // Apply arg0str + case ArgZeroMode.SCRIPT_NAME: + if(!string.IsNullOrEmpty(scriptnames.Text)) + l.Fields["arg0str"] = new UniValue(UniversalType.String, scriptnames.Text); + break; + + // Apply script number + case ArgZeroMode.SCRIPT_NUMBER: + if(!string.IsNullOrEmpty(scriptnumbers.Text)) + { + if(scriptnumbers.SelectedItem != null) + l.Args[0] = ((ScriptItem)((ColoredComboBoxItem)scriptnumbers.SelectedItem).Value).Index; + else if(!int.TryParse(scriptnumbers.Text.Trim(), out l.Args[0])) + l.Args[0] = 0; + + if(l.Fields.ContainsKey("arg0str")) l.Fields.Remove("arg0str"); + } + break; + // Apply classic arg + case ArgZeroMode.DEFAULT: + l.Args[0] = arg0.GetResult(l.Args[0], step); if(l.Fields.ContainsKey("arg0str")) l.Fields.Remove("arg0str"); - } - } - else if(scriptnames.Visible) - { - // Apply arg0str - if(!string.IsNullOrEmpty(scriptnames.Text)) - l.Fields["arg0str"] = new UniValue(UniversalType.String, scriptnames.Text); - } - else - { - l.Args[0] = arg0.GetResult(l.Args[0]); - if(l.Fields.ContainsKey("arg0str")) l.Fields.Remove("arg0str"); + break; + + default: throw new NotImplementedException("Unknown ArgZeroMode"); } // Apply the rest of args - l.Args[1] = arg1.GetResult(l.Args[1]); - l.Args[2] = arg2.GetResult(l.Args[2]); - l.Args[3] = arg3.GetResult(l.Args[3]); - l.Args[4] = arg4.GetResult(l.Args[4]); + l.Args[1] = arg1.GetResult(l.Args[1], step); + l.Args[2] = arg2.GetResult(l.Args[2], step); + l.Args[3] = arg3.GetResult(l.Args[3], step); + l.Args[4] = arg4.GetResult(l.Args[4], step); } - public void Apply(Thing t) + public void Apply(Thing t, int step) { //mxd. Script name/number handling - if(scriptnumbers.Visible) + // We can't rely on control visibility here, because all controlls will be invisible if ArgumentsControl is invisible + // (for example, when a different tab is selected) + switch(argzeromode) { - //apply script number - if(!string.IsNullOrEmpty(scriptnumbers.Text)) - { - if(scriptnumbers.SelectedItem != null) - t.Args[0] = ((ScriptItem)((ColoredComboBoxItem)scriptnumbers.SelectedItem).Value).Index; - else if(!int.TryParse(scriptnumbers.Text.Trim(), out t.Args[0])) - t.Args[0] = 0; + // Apply arg0str + case ArgZeroMode.SCRIPT_NAME: + if(!string.IsNullOrEmpty(scriptnames.Text)) + t.Fields["arg0str"] = new UniValue(UniversalType.String, scriptnames.Text); + break; + + // Apply script number + case ArgZeroMode.SCRIPT_NUMBER: + if(!string.IsNullOrEmpty(scriptnumbers.Text)) + { + if(scriptnumbers.SelectedItem != null) + t.Args[0] = ((ScriptItem)((ColoredComboBoxItem)scriptnumbers.SelectedItem).Value).Index; + else if(!int.TryParse(scriptnumbers.Text.Trim(), out t.Args[0])) + t.Args[0] = 0; + + if(t.Fields.ContainsKey("arg0str")) t.Fields.Remove("arg0str"); + } + break; + // Apply classic arg + case ArgZeroMode.DEFAULT: + t.Args[0] = arg0.GetResult(t.Args[0], step); if(t.Fields.ContainsKey("arg0str")) t.Fields.Remove("arg0str"); - } - } - else if(scriptnames.Visible) - { - // Apply arg0str - if(!string.IsNullOrEmpty(scriptnames.Text)) - t.Fields["arg0str"] = new UniValue(UniversalType.String, scriptnames.Text); - } - else - { - t.Args[0] = arg0.GetResult(t.Args[0]); - if(t.Fields.ContainsKey("arg0str")) t.Fields.Remove("arg0str"); + break; + + default: throw new NotImplementedException("Unknown ArgZeroMode"); } // Apply the rest of args - t.Args[1] = arg1.GetResult(t.Args[1]); - t.Args[2] = arg2.GetResult(t.Args[2]); - t.Args[3] = arg3.GetResult(t.Args[3]); - t.Args[4] = arg4.GetResult(t.Args[4]); + t.Args[1] = arg1.GetResult(t.Args[1], step); + t.Args[2] = arg2.GetResult(t.Args[2], step); + t.Args[3] = arg3.GetResult(t.Args[3], step); + t.Args[4] = arg4.GetResult(t.Args[4], step); } #endregion @@ -270,6 +296,7 @@ namespace CodeImp.DoomBuilder.Controls // Update named script name if(shownamedscripts) { + argzeromode = ArgZeroMode.SCRIPT_NAME; if(General.Map.NamedScripts.ContainsKey(arg0str)) { int i = 0; @@ -293,6 +320,7 @@ namespace CodeImp.DoomBuilder.Controls else { // Update numbered script name + argzeromode = ArgZeroMode.SCRIPT_NUMBER; int a0 = arg0.GetResult(0); if(General.Map.NumberedScripts.ContainsKey(a0)) { @@ -322,6 +350,7 @@ namespace CodeImp.DoomBuilder.Controls scriptnames.Visible = false; scriptnumbers.Visible = false; cbuseargstr.Checked = false; + argzeromode = ArgZeroMode.DEFAULT; } arg0.Visible = (!scriptnames.Visible && !scriptnumbers.Visible); @@ -436,6 +465,7 @@ namespace CodeImp.DoomBuilder.Controls scriptnames.Visible = cbuseargstr.Checked; scriptnumbers.Visible = !cbuseargstr.Checked; arg0label.Text = (cbuseargstr.Checked ? "Script Name:" : "Script Number:"); + argzeromode = (cbuseargstr.Checked ? ArgZeroMode.SCRIPT_NAME : ArgZeroMode.SCRIPT_NUMBER); } private void scriptnumbers_TextChanged(object sender, EventArgs e) diff --git a/Source/Plugins/SoundPropagationMode/BufferedTreeView.cs b/Source/Core/Controls/BufferedTreeView.cs similarity index 85% rename from Source/Plugins/SoundPropagationMode/BufferedTreeView.cs rename to Source/Core/Controls/BufferedTreeView.cs index 4763de11c499f880cabbf45d2ba4eee5529fd5c7..ac32c8074c13535947d795082a1706a53cce5e7e 100644 --- a/Source/Plugins/SoundPropagationMode/BufferedTreeView.cs +++ b/Source/Core/Controls/BufferedTreeView.cs @@ -5,20 +5,23 @@ using System.Runtime.InteropServices; // As per http://stackoverflow.com/questions/10362988/treeview-flickering // Gets rid of the flickering default TreeView -namespace CodeImp.DoomBuilder.SoundPropagationMode +namespace CodeImp.DoomBuilder.Controls { public class BufferedTreeView : TreeView { - protected override void OnHandleCreated(EventArgs e) - { - SendMessage(this.Handle, TVM_SETEXTENDEDSTYLE, (IntPtr)TVS_EX_DOUBLEBUFFER, (IntPtr)TVS_EX_DOUBLEBUFFER); - base.OnHandleCreated(e); - } // Pinvoke: private const int TVM_SETEXTENDEDSTYLE = 0x1100 + 44; - private const int TVM_GETEXTENDEDSTYLE = 0x1100 + 45; + //private const int TVM_GETEXTENDEDSTYLE = 0x1100 + 45; private const int TVS_EX_DOUBLEBUFFER = 0x0004; + [DllImport("user32.dll")] private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wp, IntPtr lp); + + // Methods + protected override void OnHandleCreated(EventArgs e) + { + SendMessage(this.Handle, TVM_SETEXTENDEDSTYLE, (IntPtr)TVS_EX_DOUBLEBUFFER, (IntPtr)TVS_EX_DOUBLEBUFFER); + base.OnHandleCreated(e); + } } -} \ No newline at end of file +} diff --git a/Source/Core/Controls/ButtonsNumericTextbox.cs b/Source/Core/Controls/ButtonsNumericTextbox.cs index 03bb13fbf7098a2f3ca717bd19d692a98f08db33..cc4efe183539060df61e92ff9ee90d6ff970e6ef 100644 --- a/Source/Core/Controls/ButtonsNumericTextbox.cs +++ b/Source/Core/Controls/ButtonsNumericTextbox.cs @@ -55,6 +55,7 @@ namespace CodeImp.DoomBuilder.Controls public bool AllowNegative { get { return textbox.AllowNegative; } set { textbox.AllowNegative = value; } } public bool AllowRelative { get { return textbox.AllowRelative; } set { textbox.AllowRelative = value; } } public int MaximumValue { get { return textbox.MaximumValue; } set { textbox.MaximumValue = value; } } + public bool AllowExpressions { get { return textbox.AllowExpressions; } set { textbox.AllowExpressions = value; } } //mxd/mgr_inz_rafal public int ButtonStep { get { return stepsize; } set { stepsize = value; } } public float ButtonStepFloat { get { return stepsizeFloat; } set { stepsizeFloat = value; } } //mxd. This is used when AllowDecimal is true public float ButtonStepBig { get { return stepsizeBig; } set { stepsizeBig = value; } } //mxd diff --git a/Source/Core/Controls/ColorControl.cs b/Source/Core/Controls/ColorControl.cs index 98b07e7ee874dcdd9efa479aba7d3c3fd3488c22..01dafa4b1c36594cf87d3bae80a5ac76fb93b309 100644 --- a/Source/Core/Controls/ColorControl.cs +++ b/Source/Core/Controls/ColorControl.cs @@ -51,6 +51,7 @@ namespace CodeImp.DoomBuilder.Controls { // Apply new color panel.BackColor = dialog.Color; + //mxd. Dispatch Event if(ColorChanged != null) ColorChanged(this, EventArgs.Empty); } @@ -59,14 +60,10 @@ namespace CodeImp.DoomBuilder.Controls // Resized private void ColorControl_Resize(object sender, EventArgs e) { - try - { - button.Left = ClientSize.Width - button.Width; - panel.Left = ClientSize.Width - button.Width - panel.Width - 3; - label.Left = 0; - label.Width = panel.Left; - } - catch(Exception) { } + button.Left = ClientSize.Width - button.Width; + panel.Left = ClientSize.Width - button.Width - panel.Width - 3; + label.Left = 0; + label.Width = panel.Left; } // Mouse pressed on button diff --git a/Source/Core/Controls/DebugConsole.cs b/Source/Core/Controls/DebugConsole.cs index 5a396acd37add2ceadff3d6df162a01320df076b..44cad170109b2c897db64857a06e399a9fd5c388 100644 --- a/Source/Core/Controls/DebugConsole.cs +++ b/Source/Core/Controls/DebugConsole.cs @@ -41,6 +41,7 @@ namespace CodeImp.DoomBuilder private DebugMessageType filters; private static long starttime = -1; + private static int counter; private static DebugConsole me; #endregion @@ -48,6 +49,7 @@ namespace CodeImp.DoomBuilder #region ================== Properties public bool AlwaysOnTop { get { return alwaysontop.Checked; } } + public static int Counter { get { return counter; } } #endregion @@ -154,11 +156,37 @@ namespace CodeImp.DoomBuilder else message = message.TrimEnd() + " " + duration + " ms."; +#if DEBUG WriteLine(DebugMessageType.SPECIAL, message); +#else + General.ShowErrorMessage(message, MessageBoxButtons.OK, false); +#endif starttime = -1; } + public static void IncrementCounter() { IncrementCounter(1); } + public static void IncrementCounter(int incrementby) + { + counter += incrementby; + } + + public static void ResetCounter() { ResetCounter(string.Empty); } + public static void ResetCounter(string message) + { + if(!string.IsNullOrEmpty(message)) + { + if(message.Contains("%")) + message = message.Replace("%", counter.ToString()); + else + message = message.TrimEnd() + ": " + counter; + + WriteLine(DebugMessageType.SPECIAL, message); + } + + counter = 0; + } + public static void StartProfiler() { #if PROFILE diff --git a/Source/Core/Controls/DockersControl.cs b/Source/Core/Controls/DockersControl.cs index 9eb48928394af28452b1814b5ac8c73e47ad6bb0..40f71f048199a8b53db15cce98f56c09967bcba7 100644 --- a/Source/Core/Controls/DockersControl.cs +++ b/Source/Core/Controls/DockersControl.cs @@ -190,7 +190,7 @@ namespace CodeImp.DoomBuilder.Controls } // This adds a docker - public void Add(Docker d) + public void Add(Docker d, bool notify) { // Set up page TabPage page = new TabPage(d.Title); @@ -202,7 +202,11 @@ namespace CodeImp.DoomBuilder.Controls d.Control.Dock = DockStyle.Fill; tabs.TabPages.Add(page); page.ResumeLayout(true); - if(iscollapsed) tabs.SelectedIndex = -1; + if(iscollapsed) + { + tabs.SelectedIndex = -1; + if(notify) tabs.PlayNotifyAnimation(tabs.TabPages.Count - 1); //mxd + } // Go for all controls to add events Queue<Control> todo = new Queue<Control>(); diff --git a/Source/Core/Controls/DockersTabsControl.cs b/Source/Core/Controls/DockersTabsControl.cs index 608b155747d1fbd56bf434851afece7655fa6462..3abd0c384c9f01c620112538bdbbc183cbcff949 100644 --- a/Source/Core/Controls/DockersTabsControl.cs +++ b/Source/Core/Controls/DockersTabsControl.cs @@ -31,12 +31,19 @@ namespace CodeImp.DoomBuilder.Controls { #region ================== Constants + private const int NOTIFY_BLINK_COUNT = 8; //mxd + #endregion #region ================== Variables private int highlighttab; private readonly StringFormat stringformat; + + //mxd. Tab notify anmimation + private int notifytab; + private int notifycounter; + private Timer notifytimer; #endregion @@ -54,12 +61,24 @@ namespace CodeImp.DoomBuilder.Controls stringformat = new StringFormat {Alignment = StringAlignment.Center, HotkeyPrefix = HotkeyPrefix.None, LineAlignment = StringAlignment.Center}; highlighttab = -1; + + //mxd. Tab notify anmimation + notifytimer = new Timer { Interval = 500 }; + notifytimer.Tick += NotifyTimerOnTick; } #endregion #region ================== Methods + //mxd. Start notify animation + internal void PlayNotifyAnimation(int tabindex) + { + notifytab = tabindex; + notifycounter = 1; + notifytimer.Start(); + } + //mxd private void DrawTab(Graphics graphics, int index) { @@ -100,8 +119,18 @@ namespace CodeImp.DoomBuilder.Controls { Rectangle bgbounds = new Rectangle(0, 0, bounds.Width, bounds.Height + 1); bgbounds.Inflate(-1, 0); - renderer.DrawBackground(g, bgbounds); - g.DrawString(this.TabPages[index].Text, this.Font, SystemBrushes.ControlText, new RectangleF(bgbounds.Location, bounds.Size), stringformat); + + // Use alternate colors on odd numbers + if(notifytab == index && notifycounter % 2 != 0) + { + g.FillRectangle(SystemBrushes.Highlight, bgbounds); + g.DrawString(this.TabPages[index].Text, this.Font, SystemBrushes.ControlLightLight, new RectangleF(bgbounds.Location, bounds.Size), stringformat); + } + else + { + renderer.DrawBackground(g, bgbounds); + g.DrawString(this.TabPages[index].Text, this.Font, SystemBrushes.ControlText, new RectangleF(bgbounds.Location, bounds.Size), stringformat); + } } // Rotate image? @@ -117,11 +146,29 @@ namespace CodeImp.DoomBuilder.Controls } graphics.DrawImage(drawimage, bounds.X, bounds.Y); + drawimage.Dispose(); } #endregion #region ================== Events + + //mxd. Stop notify animation if user selects animated tab + protected override void OnSelectedIndexChanged(EventArgs e) + { + // Stop animation + if(notifytab != -1 && this.SelectedIndex == notifytab) + { + notifytimer.Stop(); + notifytab = -1; + + // Redraw needed? + if(notifycounter % 2 != 0) this.Invalidate(); + notifycounter = 0; + } + + base.OnSelectedIndexChanged(e); + } //mxd. Redrawing needed protected override void OnPaint(PaintEventArgs e) @@ -194,25 +241,35 @@ namespace CodeImp.DoomBuilder.Controls // Tabs don't process keys protected override void OnKeyDown(KeyEventArgs ke) { - if(this.Parent is DockersControl) - { - // Only absorb the key press when no focused on an input control, otherwise - // the input controls may not receive certain keys such as delete and arrow keys - DockersControl docker = (this.Parent as DockersControl); - if(!docker.IsFocused) ke.Handled = true; - } + DockersControl docker = this.Parent as DockersControl; + + // Only absorb the key press when no focused on an input control, otherwise + // the input controls may not receive certain keys such as delete and arrow keys + if(docker != null && !docker.IsFocused) ke.Handled = true; } - + // Tabs don't process keys protected override void OnKeyUp(KeyEventArgs e) { - if(this.Parent is DockersControl) + DockersControl docker = this.Parent as DockersControl; + + // Only absorb the key press when no focused on an input control, otherwise + // the input controls may not receive certain keys such as delete and arrow keys + if(docker != null && !docker.IsFocused) e.Handled = true; + } + + //mxd. Update notyfy animation + private void NotifyTimerOnTick(object sender, EventArgs eventArgs) + { + if(notifycounter++ == NOTIFY_BLINK_COUNT) { - // Only absorb the key press when no focused on an input control, otherwise - // the input controls may not receive certain keys such as delete and arrow keys - DockersControl docker = (this.Parent as DockersControl); - if(!docker.IsFocused) e.Handled = true; + notifytimer.Stop(); + notifycounter = 0; + notifytab = -1; } + + // Trigger redraw + this.Invalidate(); } #endregion diff --git a/Source/Core/Controls/FieldsEditorControl.cs b/Source/Core/Controls/FieldsEditorControl.cs index dc095c27332753207b77b715c8c522f4f9b70b66..6901af33002c1228752829c6bd53b6a722ebe2ec 100644 --- a/Source/Core/Controls/FieldsEditorControl.cs +++ b/Source/Core/Controls/FieldsEditorControl.cs @@ -802,7 +802,9 @@ namespace CodeImp.DoomBuilder.Controls if(row is FieldsEditorRow) { // Browse - (row as FieldsEditorRow).Browse(this.ParentForm); + FieldsEditorRow frow = (FieldsEditorRow)row; + frow.Browse(this.ParentForm); + if(frow.TypeHandler.DynamicImage) browsebutton.Image = frow.TypeHandler.BrowseImage; //mxd fieldslist.Focus(); } } @@ -867,10 +869,10 @@ namespace CodeImp.DoomBuilder.Controls private void ApplyEnums(bool hide) { // Enums combobox shown? - if((enumscombo.Visible) && (enumscombo.Tag is FieldsEditorRow)) + if(enumscombo.Visible && (enumscombo.Tag is FieldsEditorRow)) { // Get the row - FieldsEditorRow frow = (enumscombo.Tag as FieldsEditorRow); + FieldsEditorRow frow = (FieldsEditorRow)enumscombo.Tag; // Take the selected value and apply it ApplyValue(frow, enumscombo.Text); diff --git a/Source/Core/Controls/ImageBrowserItem.cs b/Source/Core/Controls/ImageBrowserItem.cs index cb262cfb2a3ca2d5b745f6c6dfa7438583711145..767f0c009fdada994060648c255e61d54198e09d 100644 --- a/Source/Core/Controls/ImageBrowserItem.cs +++ b/Source/Core/Controls/ImageBrowserItem.cs @@ -134,19 +134,21 @@ namespace CodeImp.DoomBuilder.Controls if(General.Settings.ShowTextureSizes && !string.IsNullOrEmpty(imagesize)) { // Setup - Font sizefont = new Font(this.ListView.Font.FontFamily, this.ListView.Font.SizeInPoints - 1); - textsize = g.MeasureString(imagesize, sizefont, bounds.Width * 2); - textpos = new PointF(bounds.Left + textsize.Width / 2, bounds.Top + 1); - imagerect = new Rectangle(bounds.Left + 1, bounds.Top + 1, (int)textsize.Width, (int)textsize.Height); - - // Draw - using(SolidBrush labelbg = new SolidBrush(Color.FromArgb(196, base.ListView.ForeColor))) - { - g.FillRectangle(labelbg, imagerect); - } - using(SolidBrush labelcolor = new SolidBrush(base.ListView.BackColor)) + using(Font sizefont = new Font(this.ListView.Font.FontFamily, this.ListView.Font.SizeInPoints - 1)) { - g.DrawString(imagesize, sizefont, labelcolor, textpos, format); + textsize = g.MeasureString(imagesize, sizefont, bounds.Width * 2); + textpos = new PointF(bounds.Left + textsize.Width / 2, bounds.Top + 1); + imagerect = new Rectangle(bounds.Left + 1, bounds.Top + 1, (int)textsize.Width, (int)textsize.Height); + + // Draw + using(SolidBrush labelbg = new SolidBrush(Color.FromArgb(196, base.ListView.ForeColor))) + { + g.FillRectangle(labelbg, imagerect); + } + using(SolidBrush labelcolor = new SolidBrush(base.ListView.BackColor)) + { + g.DrawString(imagesize, sizefont, labelcolor, textpos, format); + } } } } diff --git a/Source/Core/Controls/LinedefInfoPanel.Designer.cs b/Source/Core/Controls/LinedefInfoPanel.Designer.cs index 119f622c2aa9dc46bee1dbc7211c94f7aa1a76e6..b09e832c642b2014e5ba7f25344ecea6c924d215 100644 --- a/Source/Core/Controls/LinedefInfoPanel.Designer.cs +++ b/Source/Core/Controls/LinedefInfoPanel.Designer.cs @@ -109,7 +109,7 @@ namespace CodeImp.DoomBuilder.Controls this.backlowname = new System.Windows.Forms.Label(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.flagsPanel = new System.Windows.Forms.GroupBox(); - this.flags = new System.Windows.Forms.ListView(); + this.flags = new CodeImp.DoomBuilder.Controls.TransparentListView(); this.infopanel.SuspendLayout(); this.frontpanel.SuspendLayout(); this.flowLayoutPanelFront.SuspendLayout(); @@ -1017,7 +1017,7 @@ namespace CodeImp.DoomBuilder.Controls this.flags.Name = "flags"; this.flags.Scrollable = false; this.flags.ShowGroups = false; - this.flags.Size = new System.Drawing.Size(443, 73); + this.flags.Size = new System.Drawing.Size(443, 88); this.flags.TabIndex = 0; this.flags.UseCompatibleStateImageBehavior = false; this.flags.View = System.Windows.Forms.View.List; @@ -1145,7 +1145,7 @@ namespace CodeImp.DoomBuilder.Controls private System.Windows.Forms.Label labelTextureBackBottom; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; private System.Windows.Forms.GroupBox flagsPanel; - private System.Windows.Forms.ListView flags; + private CodeImp.DoomBuilder.Controls.TransparentListView flags; private System.Windows.Forms.Label taglabel; private System.Windows.Forms.Label anglelabel; private System.Windows.Forms.Label lengthlabel; diff --git a/Source/Core/Controls/LinedefInfoPanel.cs b/Source/Core/Controls/LinedefInfoPanel.cs index cf18a4e298dbb589f1f8e2c00aff525e560cc916..6fecec35fe6b66f19d9d6b384947e22e51f12271 100644 --- a/Source/Core/Controls/LinedefInfoPanel.cs +++ b/Source/Core/Controls/LinedefInfoPanel.cs @@ -96,6 +96,7 @@ namespace CodeImp.DoomBuilder.Controls if(!General.Map.FormatInterface.HasBuiltInActivations && General.Map.FormatInterface.HasNumericLinedefActivations) //Hexen map format? { activation.Visible = true; + activationlabel.Text = "Activation:"; activationlabel.Visible = true; taglabel.Visible = false; tag.Visible = false; @@ -115,8 +116,49 @@ namespace CodeImp.DoomBuilder.Controls } else { - activation.Visible = false; - activationlabel.Visible = false; + if(General.Map.UDMF) + { + // Hijack activation labels to show lock numer... + activationlabel.Text = "Lock:"; + activationlabel.Visible = true; + activation.Visible = true; + + int locknum = l.Fields.GetValue("locknumber", 0); + if(locknum != 0) + { + activationlabel.Enabled = true; + activation.Enabled = true; + + if(General.Map.Config.Enums.ContainsKey("keys")) + { + foreach(EnumItem item in General.Map.Config.Enums["keys"]) + { + if(item.GetIntValue() == locknum) + { + activation.Text = locknum + " - " + item.Title; + break; + } + } + } + else + { + activation.Text = locknum.ToString(); + } + } + else + { + activationlabel.Enabled = false; + activation.Enabled = false; + activation.Text = "None"; + } + } + else + { + // Should be Doom map format + activationlabel.Visible = false; + activation.Visible = false; + } + taglabel.Visible = true; tag.Visible = true; @@ -155,10 +197,14 @@ namespace CodeImp.DoomBuilder.Controls peggedness = "None"; // Linedef info +#if DEBUG + infopanel.Text = " Linedef " + l.Index + " (vert. " + l.Start.Index + " - vert. " + l.End.Index + ") "; +#else infopanel.Text = " Linedef " + l.Index + " "; +#endif action.Text = act.ToString(); length.Text = l.Length.ToString("0.##"); - angle.Text = General.ClampAngle(l.AngleDeg - 90) + "\u00B0"; + angle.Text = l.AngleDeg - 90 + "\u00B0"; unpegged.Text = peggedness; unpegged.Enabled = (peggedness != "None"); //mxd peglabel.Enabled = (peggedness != "None"); //mxd @@ -512,7 +558,17 @@ namespace CodeImp.DoomBuilder.Controls flagsPanel.Visible = (flags.Items.Count > 0); if(flags.Items.Count > 0) { - flags.Width = flags.GetItemRect(0).Width * (int)Math.Ceiling(flags.Items.Count / 4.0f); + Rectangle rect = flags.GetItemRect(0); + int itemspercolumn = 1; + + // Check how many items per column we have... + for(int i = 1; i < flags.Items.Count; i++) + { + if(flags.GetItemRect(i).X != rect.X) break; + itemspercolumn++; + } + + flags.Width = rect.Width * (int)Math.Ceiling(flags.Items.Count / (float)itemspercolumn); flagsPanel.Width = flags.Width + flags.Left * 2; } diff --git a/Source/Core/Controls/NumericTextbox.cs b/Source/Core/Controls/NumericTextbox.cs index 4aa829a07b50e6aad9a60784a8bb9f12dc8a28fa..864e5f7483ff5fd08a57dbc449b5a6b07eb488b9 100644 --- a/Source/Core/Controls/NumericTextbox.cs +++ b/Source/Core/Controls/NumericTextbox.cs @@ -18,6 +18,7 @@ using System; using System.ComponentModel; +using System.Data; using System.Drawing; using System.Globalization; using System.Windows.Forms; @@ -30,6 +31,8 @@ namespace CodeImp.DoomBuilder.Controls { #region ================== Constants + private const int ROUNDING_PRECISION = 4; //mxd + #endregion #region ================== Variables @@ -38,9 +41,13 @@ namespace CodeImp.DoomBuilder.Controls private bool allowrelative; // Allow ++, --, * and / prefix for relative changes private bool allowdecimal; // Allow decimal (float) numbers private int maximumvalue = System.Int32.MaxValue; + private bool allowexpressions; // mxd/mgr_inz_rafal. Allow expressions private bool controlpressed; private int incrementstep; //mxd. Step for +++ and --- prefixes - private readonly ToolTip tooltip; //mxd + private ToolTip tooltip; //mxd + + //mxd. Used to compute expressions + private static DataTable datatable = new DataTable(); #endregion @@ -50,6 +57,7 @@ namespace CodeImp.DoomBuilder.Controls public bool AllowRelative { get { return allowrelative; } set { allowrelative = value; UpdateTextboxStyle(); } } public bool AllowDecimal { get { return allowdecimal; } set { allowdecimal = value; } } public int MaximumValue { get { return maximumvalue; } set { maximumvalue = value; } } + public bool AllowExpressions { get { return allowexpressions; } set { allowexpressions = value; } } //mxd/mgr_inz_rafal #endregion @@ -59,11 +67,23 @@ namespace CodeImp.DoomBuilder.Controls public NumericTextbox() { this.ImeMode = ImeMode.Off; + this.incrementstep = 1; //mxd //mxd. Setup tooltip this.tooltip = new ToolTip { AutomaticDelay = 100, AutoPopDelay = 8000, InitialDelay = 100, ReshowDelay = 100 }; } + //mxd + protected override void Dispose(bool disposing) + { + if(disposing) + { + tooltip.Dispose(); + tooltip = null; + } + base.Dispose(disposing); + } + #endregion #region ================== Methods @@ -85,14 +105,19 @@ namespace CodeImp.DoomBuilder.Controls // When a key is pressed protected override void OnKeyPress(KeyPressEventArgs e) { - incrementstep = 0; //mxd + incrementstep = 1; //mxd string allowedchars = "0123456789\b"; // Determine allowed chars if(allownegative) allowedchars += CultureInfo.CurrentCulture.NumberFormat.NegativeSign; if(allowrelative) allowedchars += "+-*/"; //mxd + if(allowexpressions) + { + allowedchars += "()"; //mxd/mgr_inz_rafal + if(!allowrelative) allowedchars += "+-*/"; //mxd + } if(controlpressed) allowedchars += "\u0018\u0003\u0016"; - if(allowdecimal || this.Text.StartsWith("*") || this.Text.StartsWith("/")) //mxd + if(allowdecimal || allowexpressions || this.Text.StartsWith("*") || this.Text.StartsWith("/")) //mxd allowedchars += CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator; // Check if key is not allowed @@ -101,7 +126,7 @@ namespace CodeImp.DoomBuilder.Controls // Cancel this e.Handled = true; } - else + else if(!allowexpressions) { //mxd. Check if * or / is pressed if(e.KeyChar == '*' || e.KeyChar == '/') @@ -170,6 +195,22 @@ namespace CodeImp.DoomBuilder.Controls base.OnKeyPress(e); } + //mxd + protected override void OnTextChanged(EventArgs e) + { + // Validate expression + if(allowexpressions) + { + // Check if expression is valid. We may want "++" and "--" on their own... + if(IsValidResult(StripPrefixes(this.Text)) || this.Text == "++" || this.Text == "--") + this.ForeColor = (allowrelative ? SystemColors.HotTrack : SystemColors.WindowText); + else + this.ForeColor = Color.DarkRed; + } + + base.OnTextChanged(e); + } + // Validate contents protected override void OnValidating(CancelEventArgs e) { @@ -180,29 +221,55 @@ namespace CodeImp.DoomBuilder.Controls base.OnValidating(e); return; } - - // Strip prefixes - string textpart = this.Text.Replace("+", "").Replace("*", "").Replace("/", ""); //mxd - if(!allownegative) textpart = textpart.Replace("-", ""); - - // No numbers left? - if(textpart.Length == 0) + + if(allowexpressions) //mxd { - // Make the textbox empty - this.Text = ""; - } + if(!IsValidResult(StripPrefixes(this.Text))) + { + // Make the textbox empty + this.Text = ""; + } + } + else + { + // Strip prefixes + string textpart = this.Text.Replace("+", "").Replace("*", "").Replace("/", ""); //mxd + if(!allownegative) + textpart = textpart.Replace("-", ""); + + // No numbers left? + if(textpart.Length == 0) + { + // Make the textbox empty + this.Text = ""; + } + } // Call base base.OnValidating(e); } + + //mxd + private string StripPrefixes(string input) + { + if(allowrelative) + { + // Strip prefixes + if(input.StartsWith("+++") || input.StartsWith("---")) return input.Substring(3); + if(input.StartsWith("++") || input.StartsWith("--")) return input.Substring(2); + if(input.StartsWith("*") || input.StartsWith("/")) return input.Substring(1); + } + + return input; + } // This checks if the number is relative public bool CheckIsRelative() { // Prefixed with +++, ---, ++, --, * or /? return ( (this.Text.Length > 3 && (this.Text.StartsWith("+++") || this.Text.StartsWith("---"))) || //mxd - (this.Text.Length > 2 && (this.Text.StartsWith("++") || this.Text.StartsWith("--") || this.Text.StartsWith("**") || this.Text.StartsWith("//"))) || //mxd - (this.Text.Length > 1 && (this.Text.StartsWith("*") || this.Text.StartsWith("/"))) ); //mxd + (this.Text.Length > 2 && (this.Text.StartsWith("++") || this.Text.StartsWith("--") )) || //mxd + (this.Text.Length > 1 && (this.Text.StartsWith("*") || this.Text.StartsWith("/"))) ); //mxd } //mxd. This determines the result value @@ -214,85 +281,7 @@ namespace CodeImp.DoomBuilder.Controls //mxd. This determines the result value public int GetResult(int original, int step) { - string textpart = this.Text; - - // Strip prefixes - textpart = textpart.Replace("+", "").Replace("-", "").Replace("*", "").Replace("/", ""); //mxd - - // Any numbers left? - if(textpart.Length > 0) - { - int result; - - //mxd. Prefixed with +++? - if(this.Text.StartsWith("+++")) - { - // Add number to original - int.TryParse(textpart, out result); - int newvalue = original + result * step; - if (newvalue > maximumvalue) newvalue = maximumvalue; - return newvalue; - } - //mxd. Prefixed with ---? - if(this.Text.StartsWith("---")) - { - // Subtract number from original - int.TryParse(textpart, out result); - int newvalue = original - result * step; - if (!allownegative && (newvalue < 0)) newvalue = 0; - return newvalue; - } - // Prefixed with ++? - if(this.Text.StartsWith("++")) - { - // Add number to original - int.TryParse(textpart, out result); - int newvalue = original + result; - if (newvalue > maximumvalue) newvalue = maximumvalue; - return newvalue; - } - // Prefixed with --? - if(this.Text.StartsWith("--")) - { - // Subtract number from original - int.TryParse(textpart, out result); - int newvalue = original - result; - if (!allownegative && (newvalue < 0)) newvalue = 0; - return newvalue; - } - //mxd. Prefixed with *? - if(this.Text.StartsWith("*")) - { - // Multiply original by number - float resultf; - float.TryParse(textpart, NumberStyles.Float, CultureInfo.CurrentCulture, out resultf); - int newvalue = (int)Math.Round(original * resultf); - if (newvalue > maximumvalue) newvalue = maximumvalue; - if (!allownegative && (newvalue < 0)) newvalue = 0; - return newvalue; - } - //mxd. Prefixed with /? - if(this.Text.StartsWith("/")) - { - // Divide original by number - float resultf; - float.TryParse(textpart, NumberStyles.Float, CultureInfo.CurrentCulture, out resultf); - if(resultf == 0) return original; - int newvalue = (int)Math.Round(original / resultf); - if (newvalue > maximumvalue) newvalue = maximumvalue; - if (!allownegative && (newvalue < 0)) newvalue = 0; - return newvalue; - } - - //mxd. Return the new value - if(!int.TryParse(this.Text, out result)) return original; - if (result > maximumvalue) return maximumvalue; - if (!allownegative && (result < 0)) return 0; - return result; - } - - // Nothing given, keep original value - return original; + return (int)Math.Round(GetResultFloat(original, step)); } //mxd. This determines the result value @@ -305,68 +294,97 @@ namespace CodeImp.DoomBuilder.Controls public float GetResultFloat(float original, int step) { // Strip prefixes - string textpart = this.Text.Replace("+", "").Replace("-", "").Replace("*", "").Replace("/", ""); //mxd; + string textpart = StripPrefixes(this.Text); // Any numbers left? if(textpart.Length > 0) { float result; - - //mxd. Prefixed with +++? - if(this.Text.StartsWith("+++")) - { - // Add number to original - if(!float.TryParse(textpart, NumberStyles.Float, CultureInfo.CurrentCulture, out result)) result = 0; - return original + result * step; - } - //mxd. Prefixed with ---? - if(this.Text.StartsWith("---")) - { - // Subtract number from original - if(!float.TryParse(textpart, NumberStyles.Float, CultureInfo.CurrentCulture, out result)) result = 0; - float newvalue = original - result * step; - if(!allownegative && (newvalue < 0)) newvalue = 0; - return newvalue; - } - // Prefixed with ++? - if(this.Text.StartsWith("++")) + if(allowrelative) { - // Add number to original - if(!float.TryParse(textpart, NumberStyles.Float, CultureInfo.CurrentCulture, out result)) result = 0; - return original + result; - } - // Prefixed with --? - if(this.Text.StartsWith("--")) - { - // Subtract number from original - if(!float.TryParse(textpart, NumberStyles.Float, CultureInfo.CurrentCulture, out result)) result = 0; - float newvalue = original - result; - if(!allownegative && (newvalue < 0)) newvalue = 0; - return newvalue; - } - //mxd. Prefixed with *? - if(this.Text.StartsWith("*")) - { - // Multiply original by number - if(!float.TryParse(textpart, NumberStyles.Float, CultureInfo.CurrentCulture, out result)) result = 0; - float newvalue = original * result; - if(!allownegative && (newvalue < 0)) newvalue = 0; - return newvalue; - } - //mxd. Prefixed with /? - if(this.Text.StartsWith("/")) - { - // Divide original by number - if(!float.TryParse(textpart, NumberStyles.Float, CultureInfo.CurrentCulture, out result) || result == 0) return original; - float newvalue = (float)Math.Round(original / result, 3); - if(!allownegative && (newvalue < 0)) newvalue = 0; - return newvalue; + //mxd. Prefixed with +++? + if(this.Text.StartsWith("+++")) + { + // Add number to original + if(TryGetResultValue(textpart, out result)) + return original + result * step; + + // Keep original value + return original; + } + + //mxd. Prefixed with ---? + if(this.Text.StartsWith("---")) + { + // Subtract number from original + if(TryGetResultValue(textpart, out result)) + { + float newvalue = original - result * step; + return (!allownegative && (newvalue < 0)) ? original : newvalue; + } + + // Keep original value + return original; + } + + // Prefixed with ++? + if(this.Text.StartsWith("++")) + { + // Add number to original + if(TryGetResultValue(textpart, out result)) + return original + result; + + // Keep original value + return original; + } + + // Prefixed with --? + if(this.Text.StartsWith("--")) + { + // Subtract number from original + if(TryGetResultValue(textpart, out result)) + { + float newvalue = original - result; + return (!allownegative && (newvalue < 0)) ? original : newvalue; + } + + // Keep original value + return original; + } + + //mxd. Prefixed with *? + if(this.Text.StartsWith("*")) + { + // Multiply original by number + if(TryGetResultValue(textpart, out result)) + { + float newvalue = (float)Math.Round(original * result, ROUNDING_PRECISION); + return (!allownegative && (newvalue < 0f)) ? original : newvalue; + } + + // Keep original value + return original; + } + + //mxd. Prefixed with /? + if(this.Text.StartsWith("/")) + { + // Divide original by number + if(TryGetResultValue(textpart, out result)) + { + if(result == 0.0f) return original; + float newvalue = (float)Math.Round(original / result, ROUNDING_PRECISION); + return (!allownegative && (newvalue < 0f)) ? original : newvalue; + } + + // Keep original value + return original; + } } //mxd. Return the new value - if(!float.TryParse(this.Text, NumberStyles.Float, CultureInfo.CurrentCulture, out result)) return original; - if(!allownegative && (result < 0)) return 0; - return result; + if(TryGetResultValue(textpart, out result)) + return (!allownegative && (result < 0f)) ? original : result; } // Nothing given, keep original value @@ -374,20 +392,50 @@ namespace CodeImp.DoomBuilder.Controls } //mxd - public void UpdateTextboxStyle() + private bool IsValidResult(string expression) { - UpdateTextboxStyle(string.Empty); + float unused; + return TryGetResultValue(expression, out unused); } //mxd - public void UpdateTextboxStyle(string tip) + private bool TryGetResultValue(string expression, out float value) + { + //Compute expression + if(allowexpressions) + { + try { expression = datatable.Compute(expression, null).ToString(); } + catch + { + value = 0f; + return false; + } + } + + // Parse result + return float.TryParse(expression, NumberStyles.Float, CultureInfo.InvariantCulture, out value); + } + + //mxd + public void UpdateTextboxStyle() { UpdateTextboxStyle(string.Empty); } + public void UpdateTextboxStyle(string tip) { this.ForeColor = (allowrelative ? SystemColors.HotTrack : SystemColors.WindowText); - if(allowrelative) + if(allowrelative || allowexpressions) { - tooltip.SetToolTip(this, "Use ++ or -- prefixes to change by given value." + Environment.NewLine + - "Use +++ or --- prefixes to incrementally change by given value." + Environment.NewLine + - "Use * or / prefixes to multiply or divide by given value." + Environment.NewLine + tip); + string s = string.Empty; + if(allowexpressions) + { + s += "You can use expressions. Example: (128+64)*2.5" + Environment.NewLine; + } + if(allowrelative) + { + s += "Use ++ or -- prefixes to change by given value." + Environment.NewLine + + "Use +++ or --- prefixes to incrementally change by given value." + Environment.NewLine + + "Use * or / prefixes to multiply or divide by given value." + Environment.NewLine; + } + + tooltip.SetToolTip(this, s + tip); } else if(!string.IsNullOrEmpty(tip)) { diff --git a/Source/Core/Controls/PasteOptionsControl.Designer.cs b/Source/Core/Controls/PasteOptionsControl.Designer.cs index 9c59e1aff0774935cdcbdbb61929307e90352c78..19cc80ee19b38f4ac3033bd6f636bdc3506ec863 100644 --- a/Source/Core/Controls/PasteOptionsControl.Designer.cs +++ b/Source/Core/Controls/PasteOptionsControl.Designer.cs @@ -28,39 +28,14 @@ namespace CodeImp.DoomBuilder.Controls /// </summary> private void InitializeComponent() { - this.sectorheightsgroup = new System.Windows.Forms.GroupBox(); - this.adjustheights = new System.Windows.Forms.CheckBox(); this.tagsgroup = new System.Windows.Forms.GroupBox(); this.removeactions = new System.Windows.Forms.CheckBox(); this.removetags = new System.Windows.Forms.RadioButton(); this.renumbertags = new System.Windows.Forms.RadioButton(); this.keeptags = new System.Windows.Forms.RadioButton(); - this.sectorheightsgroup.SuspendLayout(); this.tagsgroup.SuspendLayout(); this.SuspendLayout(); // - // sectorheightsgroup - // - this.sectorheightsgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.sectorheightsgroup.Controls.Add(this.adjustheights); - this.sectorheightsgroup.Location = new System.Drawing.Point(0, 138); - this.sectorheightsgroup.Name = "sectorheightsgroup"; - this.sectorheightsgroup.Size = new System.Drawing.Size(443, 50); - this.sectorheightsgroup.TabIndex = 3; - this.sectorheightsgroup.TabStop = false; - this.sectorheightsgroup.Text = " Floor and Ceiling heights "; - // - // adjustheights - // - this.adjustheights.AutoSize = true; - this.adjustheights.Location = new System.Drawing.Point(30, 24); - this.adjustheights.Name = "adjustheights"; - this.adjustheights.Size = new System.Drawing.Size(292, 17); - this.adjustheights.TabIndex = 0; - this.adjustheights.Text = "Adjust heights to match relatively with surrounding sector"; - this.adjustheights.UseVisualStyleBackColor = true; - // // tagsgroup // this.tagsgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) @@ -123,12 +98,9 @@ namespace CodeImp.DoomBuilder.Controls // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.sectorheightsgroup); this.Controls.Add(this.tagsgroup); this.Name = "PasteOptionsControl"; - this.Size = new System.Drawing.Size(443, 208); - this.sectorheightsgroup.ResumeLayout(false); - this.sectorheightsgroup.PerformLayout(); + this.Size = new System.Drawing.Size(443, 139); this.tagsgroup.ResumeLayout(false); this.tagsgroup.PerformLayout(); this.ResumeLayout(false); @@ -137,8 +109,6 @@ namespace CodeImp.DoomBuilder.Controls #endregion - private System.Windows.Forms.GroupBox sectorheightsgroup; - private System.Windows.Forms.CheckBox adjustheights; private System.Windows.Forms.GroupBox tagsgroup; private System.Windows.Forms.CheckBox removeactions; private System.Windows.Forms.RadioButton removetags; diff --git a/Source/Core/Controls/PasteOptionsControl.cs b/Source/Core/Controls/PasteOptionsControl.cs index 5e08e4215cdd25575ce5f4f8f649e990b1c35b86..34a719234681cd2b616c1d65ee9b09318e6ae111 100644 --- a/Source/Core/Controls/PasteOptionsControl.cs +++ b/Source/Core/Controls/PasteOptionsControl.cs @@ -53,7 +53,6 @@ namespace CodeImp.DoomBuilder.Controls renumbertags.Checked = (options.ChangeTags == 1); removetags.Checked = (options.ChangeTags == 2); removeactions.Checked = options.RemoveActions; - adjustheights.Checked = options.AdjustHeights; } // This returns the options as set by the user @@ -62,14 +61,10 @@ namespace CodeImp.DoomBuilder.Controls PasteOptions options = new PasteOptions(); // Collect settings - if(keeptags.Checked) - options.ChangeTags = 0; - else if(renumbertags.Checked) - options.ChangeTags = 1; - else if(removetags.Checked) - options.ChangeTags = 2; + if(keeptags.Checked) options.ChangeTags = 0; + else if(renumbertags.Checked) options.ChangeTags = 1; + else if(removetags.Checked) options.ChangeTags = 2; options.RemoveActions = removeactions.Checked; - options.AdjustHeights = adjustheights.Checked; return options; } diff --git a/Source/Core/Controls/RenderTargetControl.cs b/Source/Core/Controls/RenderTargetControl.cs index ae049ef0570c88b3ffe9084f1c4f12e2a767f208..b75a36d2b22b5e27a61b1f00ce5ddea33aad07f3 100644 --- a/Source/Core/Controls/RenderTargetControl.cs +++ b/Source/Core/Controls/RenderTargetControl.cs @@ -32,7 +32,7 @@ namespace CodeImp.DoomBuilder.Controls #region ================== Variables - private readonly ToolTip tip; //mxd + private ToolTip tooltip; //mxd #endregion @@ -52,11 +52,18 @@ namespace CodeImp.DoomBuilder.Controls this.SetStyle(ControlStyles.FixedHeight, true); //mxd. Create tooltip - tip = new ToolTip(); - tip.UseAnimation = false; - tip.UseFading = false; - tip.InitialDelay = 0; - tip.AutoPopDelay = 9000; + tooltip = new ToolTip { UseAnimation = false, UseFading = false, InitialDelay = 0, AutoPopDelay = 9000 }; + } + + //mxd + protected override void Dispose(bool disposing) + { + if(disposing) + { + tooltip.Dispose(); + tooltip = null; + } + base.Dispose(disposing); } #endregion @@ -122,14 +129,14 @@ namespace CodeImp.DoomBuilder.Controls //mxd. This shows tooltip at given position public void ShowToolTip(string title, string text, int x, int y) { - tip.ToolTipTitle = title; - tip.Show(text, this, x, y); + tooltip.ToolTipTitle = title; + tooltip.Show(text, this, x, y); } //mxd. This hides it public void HideToolTip() { - tip.Hide(this); + tooltip.Hide(this); } #endregion diff --git a/Source/Core/Controls/ScriptDocumentTab.cs b/Source/Core/Controls/ScriptDocumentTab.cs index ba1f0a4bf7c037a65fddd099752b1e92e55dba4c..8bced73140569968a05405025f67c3d06c32ec88 100644 --- a/Source/Core/Controls/ScriptDocumentTab.cs +++ b/Source/Core/Controls/ScriptDocumentTab.cs @@ -490,13 +490,13 @@ namespace CodeImp.DoomBuilder.Controls editor.GrabFocus(); } - //mxd - private void functionbar_SelectedIndexChanged(object sender, EventArgs e) - { - if (!preventchanges && editor.FunctionBar.SelectedItem is ScriptItem) - { - ScriptItem si = editor.FunctionBar.SelectedItem as ScriptItem; - editor.EnsureLineVisible(editor.LineFromPosition(si.CursorPosition)); + //mxd + private void functionbar_SelectedIndexChanged(object sender, EventArgs e) + { + if(!preventchanges && editor.FunctionBar.SelectedItem is ScriptItem) + { + ScriptItem si = (ScriptItem)editor.FunctionBar.SelectedItem; + editor.EnsureLineVisible(editor.LineFromPosition(si.CursorPosition)); editor.SelectionStart = si.CursorPosition; editor.SelectionEnd = si.CursorPosition; diff --git a/Source/Core/Controls/ScriptEditorControl.cs b/Source/Core/Controls/ScriptEditorControl.cs index 14bcc86b71c9e931f8b01351799e8dba4a705280..3e1573b217de04e7688a8a309cf764b53cb7fb9f 100644 --- a/Source/Core/Controls/ScriptEditorControl.cs +++ b/Source/Core/Controls/ScriptEditorControl.cs @@ -69,6 +69,8 @@ namespace CodeImp.DoomBuilder.Controls private const string LEXERS_RESOURCE = "Lexers.cfg"; private const int MAX_BACKTRACK_LENGTH = 200; private const int HIGHLIGHT_INDICATOR = 8; //mxd. Indicators 0-7 could be in use by a lexer so we'll use indicator 8 to highlight words. + private const string ENTRY_POSITION_MARKER = "[EP]"; //mxd + private const string LINE_BREAK_MARKER = "[LB]"; //mxd #endregion @@ -335,7 +337,6 @@ namespace CodeImp.DoomBuilder.Controls // Done with the resource lexersreader.Dispose(); - lexersdata.Dispose(); } //mxd. We are done here @@ -352,8 +353,9 @@ namespace CodeImp.DoomBuilder.Controls if(!lexercfg.SettingExists(lexername)) throw new InvalidOperationException("Unknown lexer " + scriptconfig.Lexer + " specified in script configuration!"); scriptedit.Lexer = scriptconfig.Lexer; - //mxd. Set word chars - scriptedit.SetWordChars(scriptconfig.WordCharacters); + //mxd. Set extra word chars? + if(!string.IsNullOrEmpty(scriptconfig.ExtraWordCharacters)) + scriptedit.WordChars += scriptconfig.ExtraWordCharacters; // Set the default style and settings scriptedit.Styles[Style.Default].Font = General.Settings.ScriptFontName; @@ -679,16 +681,33 @@ namespace CodeImp.DoomBuilder.Controls public void InsertSnippet(string[] lines) { // Insert the snippet + List<string> processedlines = new List<string>(lines.Length); int curline = scriptedit.LineFromPosition(scriptedit.SelectionStart); int indent = scriptedit.Lines[scriptedit.CurrentLine].Indentation; string tabs = Environment.NewLine + GetIndentationString(indent); string spaces = new String(' ', General.Settings.ScriptTabWidth); + string[] linebreak = { LINE_BREAK_MARKER }; int entrypos = -1; int entryline = -1; - string[] processedlines = ProcessLineBreaks(lines); + + // Process line breaks + foreach(string line in lines) + { + if(line.IndexOf(linebreak[0], StringComparison.Ordinal) != -1) + { + if(General.Settings.ScriptAllmanStyle) + processedlines.AddRange(line.Split(linebreak, StringSplitOptions.RemoveEmptyEntries)); + else + processedlines.Add(line.Replace(linebreak[0], " ")); + } + else + { + processedlines.Add(line); + } + } // Process special chars, try to find entry position marker - for(int i = 0; i < lines.Length; i++) + for(int i = 0; i < processedlines.Count; i++) { if(!scriptedit.UseTabs) processedlines[i] = processedlines[i].Replace("\t", spaces); @@ -706,7 +725,7 @@ namespace CodeImp.DoomBuilder.Controls } // Replace the text - string text = string.Join(tabs, processedlines); + string text = string.Join(tabs, processedlines.ToArray()); scriptedit.SelectionStart = scriptedit.WordStartPosition(scriptedit.CurrentPosition, true); scriptedit.SelectionEnd = scriptedit.WordEndPosition(scriptedit.CurrentPosition, true); scriptedit.ReplaceSelection(text); @@ -714,7 +733,10 @@ namespace CodeImp.DoomBuilder.Controls // Move the cursor if we had the [EP] marker if(entrypos != -1) { - scriptedit.SetEmptySelection(scriptedit.Lines[entryline].EndPosition - entrypos - 2); + // Count from the end of the line, because I don't see a reliable way to count indentation chars... + int pos = scriptedit.Lines[entryline].EndPosition - entrypos; + if(scriptedit.Lines[entryline].Text.EndsWith(Environment.NewLine)) pos -= 2; + scriptedit.SetEmptySelection(pos); } } @@ -957,30 +979,6 @@ namespace CodeImp.DoomBuilder.Controls scriptedit.Markers[(int)index].Symbol = MarkerSymbol.RgbaImage; } - //mxd. This converts [LB] markers to line breaks if necessary - private static string[] ProcessLineBreaks(string[] lines) - { - List<string> result = new List<string>(lines.Length); - string[] separator = new[] { "[LB]" }; - - foreach(string line in lines) - { - if(line.IndexOf(separator[0], StringComparison.Ordinal) != -1) - { - if(General.Settings.ScriptAllmanStyle) - result.AddRange(line.Split(separator, StringSplitOptions.RemoveEmptyEntries)); - else - result.Add(line.Replace(separator[0], " ")); - } - else - { - result.Add(line); - } - } - - return result.ToArray(); - } - //mxd. Autocompletion handling (https://github.com/jacobslusser/ScintillaNET/wiki/Basic-Autocompletion) private bool ShowAutoCompletionList() { diff --git a/Source/Core/Controls/SectorInfoPanel.Designer.cs b/Source/Core/Controls/SectorInfoPanel.Designer.cs index 10e8512c38aaa5092de64548a8b4ecc24d377f2e..03764a2297e284e13c51e17b9299238a050c0aef 100644 --- a/Source/Core/Controls/SectorInfoPanel.Designer.cs +++ b/Source/Core/Controls/SectorInfoPanel.Designer.cs @@ -71,7 +71,7 @@ namespace CodeImp.DoomBuilder.Controls this.labelFloorTextureSize = new System.Windows.Forms.Label(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.flagsPanel = new System.Windows.Forms.GroupBox(); - this.flags = new System.Windows.Forms.ListView(); + this.flags = new CodeImp.DoomBuilder.Controls.TransparentListView(); label13 = new System.Windows.Forms.Label(); label5 = new System.Windows.Forms.Label(); this.sectorinfo.SuspendLayout(); @@ -128,7 +128,7 @@ namespace CodeImp.DoomBuilder.Controls this.taglabel.Text = "Tag:"; this.taglabel.TextAlign = System.Drawing.ContentAlignment.TopRight; // - // labelEffect + // effectlabel // this.effectlabel.Location = new System.Drawing.Point(8, 19); this.effectlabel.Name = "effectlabel"; @@ -531,7 +531,7 @@ namespace CodeImp.DoomBuilder.Controls this.flags.Name = "flags"; this.flags.Scrollable = false; this.flags.ShowGroups = false; - this.flags.Size = new System.Drawing.Size(443, 73); + this.flags.Size = new System.Drawing.Size(443, 88); this.flags.TabIndex = 0; this.flags.UseCompatibleStateImageBehavior = false; this.flags.View = System.Windows.Forms.View.List; @@ -600,7 +600,7 @@ namespace CodeImp.DoomBuilder.Controls private System.Windows.Forms.Label labelFade; private System.Windows.Forms.Label labelLight; private System.Windows.Forms.GroupBox flagsPanel; - private System.Windows.Forms.ListView flags; + private CodeImp.DoomBuilder.Controls.TransparentListView flags; private System.Windows.Forms.Label taglabel; private System.Windows.Forms.Label effectlabel; private System.Windows.Forms.Label labelfloor; diff --git a/Source/Core/Controls/SectorInfoPanel.cs b/Source/Core/Controls/SectorInfoPanel.cs index 66b0cf2a93c696ebd9825f18ad7423748157dc3d..47f61a131a097fea2ea780a3c69ef51753c12108 100644 --- a/Source/Core/Controls/SectorInfoPanel.cs +++ b/Source/Core/Controls/SectorInfoPanel.cs @@ -268,12 +268,13 @@ namespace CodeImp.DoomBuilder.Controls } //rotation - if(s.Fields.ContainsKey("rotationceiling")) + float ceilangle = s.Fields.GetValue("rotationceiling", 0f); + if(ceilangle != 0f) { showExtededCeilingInfo = true; ceilingAngle.Enabled = true; ceilingAngleLabel.Enabled = true; - ceilingAngle.Text = s.Fields["rotationceiling"].Value + "\u00B0"; + ceilingAngle.Text = ceilangle + "\u00B0"; } else { @@ -282,12 +283,13 @@ namespace CodeImp.DoomBuilder.Controls ceilingAngleLabel.Enabled = false; } - if(s.Fields.ContainsKey("rotationfloor")) + float floorangle = s.Fields.GetValue("rotationfloor", 0f); + if(floorangle != 0f) { showExtededFloorInfo = true; floorAngle.Enabled = true; floorAngleLabel.Enabled = true; - floorAngle.Text = s.Fields["rotationfloor"].Value + "\u00B0"; + floorAngle.Text = floorangle + "\u00B0"; } else { @@ -309,7 +311,17 @@ namespace CodeImp.DoomBuilder.Controls flagsPanel.Visible = (flags.Items.Count > 0); if(flags.Items.Count > 0) { - flags.Width = flags.GetItemRect(0).Width * (int)Math.Ceiling(flags.Items.Count / 4.0f); + Rectangle rect = flags.GetItemRect(0); + int itemspercolumn = 1; + + // Check how many items per column we have... + for(int i = 1; i < flags.Items.Count; i++) + { + if(flags.GetItemRect(i).X != rect.X) break; + itemspercolumn++; + } + + flags.Width = rect.Width * (int)Math.Ceiling(flags.Items.Count / (float)itemspercolumn); flagsPanel.Width = flags.Width + flags.Left * 2; } diff --git a/Source/Core/Controls/SectorSlopeControl.Designer.cs b/Source/Core/Controls/SectorSlopeControl.Designer.cs index c86519ca0f460beecf2b549e645af40f363c543d..0744e9d578eda2edd8de42e0b31e68a20e7b3122 100644 --- a/Source/Core/Controls/SectorSlopeControl.Designer.cs +++ b/Source/Core/Controls/SectorSlopeControl.Designer.cs @@ -166,6 +166,7 @@ this.slopeoffset.AllowDecimal = true; this.slopeoffset.AllowNegative = true; this.slopeoffset.AllowRelative = true; + this.slopeoffset.AllowExpressions = true; this.slopeoffset.ButtonStep = 1; this.slopeoffset.ButtonStepBig = 16F; this.slopeoffset.ButtonStepFloat = 8F; diff --git a/Source/Core/Controls/ThingBrowserControl.Designer.cs b/Source/Core/Controls/ThingBrowserControl.Designer.cs index 82d3eeac84c9adc17a23e250fbf05f26fa4c28ff..4df21ec648a09ac8c6475657df53bf71143a4df0 100644 --- a/Source/Core/Controls/ThingBrowserControl.Designer.cs +++ b/Source/Core/Controls/ThingBrowserControl.Designer.cs @@ -153,31 +153,51 @@ namespace CodeImp.DoomBuilder.Controls this.thingimages.Images.SetKeyName(17, "thing17.png"); this.thingimages.Images.SetKeyName(18, "thing18.png"); this.thingimages.Images.SetKeyName(19, "thing19.png"); - this.thingimages.Images.SetKeyName(20, "category00.png"); - this.thingimages.Images.SetKeyName(21, "category01.png"); - this.thingimages.Images.SetKeyName(22, "category02.png"); - this.thingimages.Images.SetKeyName(23, "category03.png"); - this.thingimages.Images.SetKeyName(24, "category04.png"); - this.thingimages.Images.SetKeyName(25, "category05.png"); - this.thingimages.Images.SetKeyName(26, "category06.png"); - this.thingimages.Images.SetKeyName(27, "category07.png"); - this.thingimages.Images.SetKeyName(28, "category08.png"); - this.thingimages.Images.SetKeyName(29, "category09.png"); - this.thingimages.Images.SetKeyName(30, "category10.png"); - this.thingimages.Images.SetKeyName(31, "category11.png"); - this.thingimages.Images.SetKeyName(32, "category12.png"); - this.thingimages.Images.SetKeyName(33, "category13.png"); - this.thingimages.Images.SetKeyName(34, "category14.png"); - this.thingimages.Images.SetKeyName(35, "category15.png"); - this.thingimages.Images.SetKeyName(36, "category16.png"); - this.thingimages.Images.SetKeyName(37, "category17.png"); - this.thingimages.Images.SetKeyName(38, "category18.png"); - this.thingimages.Images.SetKeyName(39, "category19.png"); - this.thingimages.Images.SetKeyName(40, "Warning.png"); - // - // infopanel - // - this.infopanel.Controls.Add(this.fulltypecaption); + this.thingimages.Images.SetKeyName(20, "Warning.png"); + this.thingimages.Images.SetKeyName(21, "category00.png"); + this.thingimages.Images.SetKeyName(22, "category01.png"); + this.thingimages.Images.SetKeyName(23, "category02.png"); + this.thingimages.Images.SetKeyName(24, "category03.png"); + this.thingimages.Images.SetKeyName(25, "category04.png"); + this.thingimages.Images.SetKeyName(26, "category05.png"); + this.thingimages.Images.SetKeyName(27, "category06.png"); + this.thingimages.Images.SetKeyName(28, "category07.png"); + this.thingimages.Images.SetKeyName(29, "category08.png"); + this.thingimages.Images.SetKeyName(30, "category09.png"); + this.thingimages.Images.SetKeyName(31, "category10.png"); + this.thingimages.Images.SetKeyName(32, "category11.png"); + this.thingimages.Images.SetKeyName(33, "category12.png"); + this.thingimages.Images.SetKeyName(34, "category13.png"); + this.thingimages.Images.SetKeyName(35, "category14.png"); + this.thingimages.Images.SetKeyName(36, "category15.png"); + this.thingimages.Images.SetKeyName(37, "category16.png"); + this.thingimages.Images.SetKeyName(38, "category17.png"); + this.thingimages.Images.SetKeyName(39, "category18.png"); + this.thingimages.Images.SetKeyName(40, "category19.png"); + this.thingimages.Images.SetKeyName(41, "category_open00.png"); + this.thingimages.Images.SetKeyName(42, "category_open01.png"); + this.thingimages.Images.SetKeyName(43, "category_open02.png"); + this.thingimages.Images.SetKeyName(44, "category_open03.png"); + this.thingimages.Images.SetKeyName(45, "category_open04.png"); + this.thingimages.Images.SetKeyName(46, "category_open05.png"); + this.thingimages.Images.SetKeyName(47, "category_open06.png"); + this.thingimages.Images.SetKeyName(48, "category_open07.png"); + this.thingimages.Images.SetKeyName(49, "category_open08.png"); + this.thingimages.Images.SetKeyName(50, "category_open09.png"); + this.thingimages.Images.SetKeyName(51, "category_open10.png"); + this.thingimages.Images.SetKeyName(52, "category_open11.png"); + this.thingimages.Images.SetKeyName(53, "category_open12.png"); + this.thingimages.Images.SetKeyName(54, "category_open13.png"); + this.thingimages.Images.SetKeyName(55, "category_open14.png"); + this.thingimages.Images.SetKeyName(56, "category_open15.png"); + this.thingimages.Images.SetKeyName(57, "category_open16.png"); + this.thingimages.Images.SetKeyName(58, "category_open17.png"); + this.thingimages.Images.SetKeyName(59, "category_open18.png"); + this.thingimages.Images.SetKeyName(60, "category_open19.png"); + // + // infopanel + // + this.infopanel.Controls.Add(this.fulltypecaption); this.infopanel.Controls.Add(this.fulltypelabel); this.infopanel.Controls.Add(this.spritepanel); this.infopanel.Controls.Add(this.classname); @@ -280,7 +300,9 @@ namespace CodeImp.DoomBuilder.Controls this.typelist.SelectionsChanged += new System.EventHandler(this.typelist_SelectionsChanged); this.typelist.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.typelist_KeyPress); this.typelist.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.typelist_MouseDoubleClick); - this.typelist.MouseEnter += new System.EventHandler(this.typelist_MouseEnter); + this.typelist.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.typelist_BeforeExpand); + this.typelist.BeforeCollapse += new System.Windows.Forms.TreeViewCancelEventHandler(this.typelist_BeforeCollapse); + this.typelist.MouseEnter += new System.EventHandler(this.typelist_MouseEnter); // // spritetex // diff --git a/Source/Core/Controls/ThingBrowserControl.cs b/Source/Core/Controls/ThingBrowserControl.cs index f4d47f40c43c1cd332fb592faa4ac0e6c97f2093..8ab032e951a08023086be9c0c6cd4e1b33706006 100644 --- a/Source/Core/Controls/ThingBrowserControl.cs +++ b/Source/Core/Controls/ThingBrowserControl.cs @@ -35,7 +35,9 @@ namespace CodeImp.DoomBuilder.Controls { #region ================== Constants - private const int WARNING_ICON_INDEX = 40; //mxd + private const int WARNING_ICON_INDEX = 20; //mxd + private const int FOLDER_ICON_OFFSET = 21; //mxd + private const int FOLDER_OPEN_ICON_OFFSET = 41; //mxd #endregion @@ -125,7 +127,7 @@ namespace CodeImp.DoomBuilder.Controls else { // Set regular icon - if((ti.Color >= 0) && (ti.Color < thingimages.Images.Count)) n.ImageIndex = ti.Color; + if((ti.Color > -1) && (ti.Color < WARNING_ICON_INDEX)) n.ImageIndex = ti.Color; n.SelectedImageIndex = n.ImageIndex; } @@ -142,8 +144,8 @@ namespace CodeImp.DoomBuilder.Controls } else { - cn.ImageIndex = thingimages.Images.Count / 2; // Offset to folder icons - if((tc.Color >= 0) && (tc.Color < thingimages.Images.Count)) cn.ImageIndex += tc.Color; + cn.ImageIndex = FOLDER_ICON_OFFSET; // Offset to folder icons + if((tc.Color > -1) && (tc.Color < WARNING_ICON_INDEX)) cn.ImageIndex += tc.Color; cn.SelectedImageIndex = cn.ImageIndex; } } @@ -552,6 +554,22 @@ namespace CodeImp.DoomBuilder.Controls { General.OpenWebsite(General.Map.Config.ThingClassHelp.Replace("%K", thinginfo.ClassName)); } + + //mxd. Switch to Open Folder icon + private void typelist_BeforeExpand(object sender, TreeViewCancelEventArgs e) + { + // Category node? + if(e.Node.ImageIndex > WARNING_ICON_INDEX) + e.Node.ImageIndex = e.Node.ImageIndex - FOLDER_ICON_OFFSET + FOLDER_OPEN_ICON_OFFSET; + } + + //mxd. Switch to Closed Folder icon + private void typelist_BeforeCollapse(object sender, TreeViewCancelEventArgs e) + { + // Category node? + if(e.Node.ImageIndex > WARNING_ICON_INDEX) + e.Node.ImageIndex = e.Node.ImageIndex - FOLDER_OPEN_ICON_OFFSET + FOLDER_ICON_OFFSET; + } #endregion } diff --git a/Source/Core/Controls/ThingBrowserControl.resx b/Source/Core/Controls/ThingBrowserControl.resx index c52320903e6581a2f0a29724091dc2eaafe53fcf..49a0c3c574d62bfbb805b6fc1da1adffe7b00739 100644 --- a/Source/Core/Controls/ThingBrowserControl.resx +++ b/Source/Core/Controls/ThingBrowserControl.resx @@ -124,861 +124,1154 @@ <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 - ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADW - yQAAAk1TRnQBSQFMAgEBKQEAAdQBAQHUAQEBEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA - AwABsAMAAQEBAAEgBgABsP8AEwADFgEeAykBPgMsAUQDLAFDAywBQwMsAUMDKwFCAysBQgMrAUIDKgFB - AyoBQAMpAT8DKQE+AygBPQMoAT0DIQEwwAADVQGwAnYBewHpAXECewHqAXMBewF9AeoBdgJ8AekBdgF8 - AYAB6QF2AYABgQHpAXsCgQHpAXsCgQHpAXkBfQGEAegBeQJ9AegBdwJ7AecBdAF4AXsB5wF0AXcBewHn - AXQBdwF4AecDWQG+wAADKQE/AWkCbwHkAVIB9QL/AUsB8gL/AUwB7gL/AUoB6wL/AUgB7wL/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EDAcABAwHAAQMBwAEDAcABAwHAAQMBgAEBAYABAQGAAQEBgAEBAYABAQGAAQEBgAEB AYABAQGAAQEBgAEBAYABAQGAAQEBgAEBAYABAQGAAQEBgAEBAYABAQGAAQEBgAEBAYABAQGAAQEBgAEB AYABAQGAAQEBwAEDAcABAwHAAQMBwAEDAcABAwHAAQMBwAEDAcABAwHgAQcB4AEHAeABBwHgAQcB+AEf - AfgBHwH4AR8B+AEfCP8L + AfgBHwH4AR8B+AEfEP8B+AEfAfgBHwH4AR8B+AEfAeABBwHgAQcB4AEHAeABBwHAAQMBwAEDAcABAwHA + AQMBwAEDAcABAwHAAQMBwAEDAYABAQGAAQEBgAEBAYABAQGAAQEBgAEBAYABAQGAAQEBgAEBAYABAQGA + AQEBgAEBAYABAQGAAQEBgAEBAYABAQGAAQEBgAEBAYABAQGAAQEBgAEBAYABAQGAAQEBgAEBAcABAwHA + AQMBwAEDAcABAwHAAQMBwAEDAcABAwHAAQMB4AEHAeABBwHgAQcB4AEHAfgBHwH4AR8B+AEfAfgBHwj/ + Cw== </value> </data> <metadata name="updatetimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> diff --git a/Source/Core/Controls/ThingInfoPanel.Designer.cs b/Source/Core/Controls/ThingInfoPanel.Designer.cs index e979ce4d214b4aa235806222b5bdb95300143476..ade33ddbe3569ec22f698678e396b0eeccca7a58 100644 --- a/Source/Core/Controls/ThingInfoPanel.Designer.cs +++ b/Source/Core/Controls/ThingInfoPanel.Designer.cs @@ -59,7 +59,7 @@ namespace CodeImp.DoomBuilder.Controls this.spritename = new System.Windows.Forms.Label(); this.panel1 = new System.Windows.Forms.Panel(); this.flagsPanel = new System.Windows.Forms.GroupBox(); - this.flags = new System.Windows.Forms.ListView(); + this.flags = new CodeImp.DoomBuilder.Controls.TransparentListView(); this.flagsvalue = new System.Windows.Forms.Label(); this.flagsvaluelabel = new System.Windows.Forms.Label(); this.spritetex = new CodeImp.DoomBuilder.Controls.ConfigurablePictureBox(); @@ -407,7 +407,7 @@ namespace CodeImp.DoomBuilder.Controls this.flags.Name = "flags"; this.flags.Scrollable = false; this.flags.ShowGroups = false; - this.flags.Size = new System.Drawing.Size(556, 73); + this.flags.Size = new System.Drawing.Size(556, 88); this.flags.TabIndex = 0; this.flags.UseCompatibleStateImageBehavior = false; this.flags.View = System.Windows.Forms.View.List; @@ -500,7 +500,7 @@ namespace CodeImp.DoomBuilder.Controls private System.Windows.Forms.Label arg1; private System.Windows.Forms.GroupBox infopanel; private System.Windows.Forms.GroupBox flagsPanel; - private System.Windows.Forms.ListView flags; + private CodeImp.DoomBuilder.Controls.TransparentListView flags; private System.Windows.Forms.Label flagsvalue; private System.Windows.Forms.Label flagsvaluelabel; private System.Windows.Forms.Label labelangle; diff --git a/Source/Core/Controls/ThingInfoPanel.cs b/Source/Core/Controls/ThingInfoPanel.cs index d10c548f00e1e0e380a99f8861f54edd99d96145..2b97c9c1fe3ae257a7d4e2d1a92cf96894ea60d3 100644 --- a/Source/Core/Controls/ThingInfoPanel.cs +++ b/Source/Core/Controls/ThingInfoPanel.cs @@ -17,6 +17,7 @@ #region ================== Namespaces using System; +using System.Drawing; using System.Globalization; using System.Windows.Forms; using CodeImp.DoomBuilder.Data; @@ -237,9 +238,20 @@ namespace CodeImp.DoomBuilder.Controls } //mxd. Flags panel visibility and size - if (flags.Items.Count > 0) + flagsPanel.Visible = (flags.Items.Count > 0 || flagsvaluelabel.Enabled); + if(flags.Items.Count > 0) { - flags.Width = flags.GetItemRect(0).Width * (int)Math.Ceiling(flags.Items.Count / 4.0f); + Rectangle rect = flags.GetItemRect(0); + int itemspercolumn = 1; + + // Check how many items per column we have... + for(int i = 1; i < flags.Items.Count; i++) + { + if(flags.GetItemRect(i).X != rect.X) break; + itemspercolumn++; + } + + flags.Width = rect.Width * (int)Math.Ceiling(flags.Items.Count / (float)itemspercolumn); flagsPanel.Width = flags.Width + flags.Left * 2; } diff --git a/Source/Core/Controls/ToolStripNumericUpDown.cs b/Source/Core/Controls/ToolStripNumericUpDown.cs index 000094290d8e35b87ee891b524d7fdf3c2aba4e0..b405c689825de1a3950ead7a92946949b5b54e68 100644 --- a/Source/Core/Controls/ToolStripNumericUpDown.cs +++ b/Source/Core/Controls/ToolStripNumericUpDown.cs @@ -12,6 +12,7 @@ namespace CodeImp.DoomBuilder.Controls public decimal Value { get { return nud.Value; } set { nud.Value = value; } } public decimal Minimum { get { return nud.Minimum; } set { nud.Minimum = value; } } public decimal Maximum { get { return nud.Maximum; } set { nud.Maximum = value; } } + public decimal Increment { get { return nud.Increment; } set { nud.Increment = value; } } private NumericUpDown nud; diff --git a/Source/Core/Controls/TransparentListView.cs b/Source/Core/Controls/TransparentListView.cs new file mode 100644 index 0000000000000000000000000000000000000000..f21c1631b25248d41682c161ef05bd8694a64593 --- /dev/null +++ b/Source/Core/Controls/TransparentListView.cs @@ -0,0 +1,23 @@ +using System.Windows.Forms; + +namespace CodeImp.DoomBuilder.Controls +{ + public class TransparentListView : ListView + { + protected override CreateParams CreateParams + { + get + { + CreateParams cp = base.CreateParams; + cp.ExStyle |= 0x00000020; //WS_EX_TRANSPARENT + + return cp; + } + } + + protected override void OnPaintBackground(PaintEventArgs pevent) + { + // Don't paint background + } + } +} diff --git a/Source/Core/Data/DataManager.cs b/Source/Core/Data/DataManager.cs index 2fa1425c7e1963a184b64492507cb643f7a93fc3..e2849e7879ba77a54af818bc1017332d1ddceacb 100644 --- a/Source/Core/Data/DataManager.cs +++ b/Source/Core/Data/DataManager.cs @@ -22,6 +22,7 @@ using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.IO; +using System.Runtime.InteropServices; using System.Linq; using System.Threading; using System.Windows.Forms; @@ -102,6 +103,7 @@ namespace CodeImp.DoomBuilder.Data private Dictionary<string, ImageData> internalsprites; private ImageData whitetexture; private ImageData blacktexture; //mxd + private ImageData thingtexture; //mxd //mxd. Sky textures private CubeTexture skybox; // GZDoom skybox @@ -119,8 +121,8 @@ namespace CodeImp.DoomBuilder.Data private Dictionary<int, ThingTypeInfo> thingtypes; // Timing - private float loadstarttime; - private float loadfinishtime; + private long loadstarttime; + private long loadfinishtime; // Disposing private bool isdisposed; @@ -152,6 +154,7 @@ namespace CodeImp.DoomBuilder.Data public ImageData CrosshairBusy3D { get { return crosshairbusy; } } public ImageData WhiteTexture { get { return whitetexture; } } public ImageData BlackTexture { get { return blacktexture; } } //mxd + public ImageData ThingTexture { get { return thingtexture; } } //mxd public ImageData[] CommentTextures { get { return commenttextures; } } //mxd internal CubeTexture SkyBox { get { return skybox; } } //mxd public List<ThingCategory> ThingCategories { get { return thingcategories; } } @@ -239,6 +242,8 @@ namespace CodeImp.DoomBuilder.Data whitetexture = null; blacktexture.Dispose(); //mxd blacktexture = null; //mxd + thingtexture.Dispose(); //mxd + thingtexture = null; //mxd unknownimage.Dispose(); //mxd unknownimage = null; //mxd for (int i = 0; i < commenttextures.Length; i++) //mxd @@ -555,6 +560,12 @@ namespace CodeImp.DoomBuilder.Data internalsprites = null; mapinfo = null; //mxd } + + //mxd. Called before Clock is reset + internal void OnBeforeClockReset() + { + if(loadstarttime > 0) loadstarttime -= Clock.CurrentTime; + } #endregion @@ -728,12 +739,6 @@ namespace CodeImp.DoomBuilder.Data } else { - if(notifiedbusy) - { - notifiedbusy = false; - General.SendMessage(General.MainWindow.Handle, (int)MainForm.ThreadMessages.UpdateStatus, 0, 0); - } - // Timing if(loadfinishtime == 0) { @@ -744,8 +749,22 @@ namespace CodeImp.DoomBuilder.Data } loadfinishtime = Clock.CurrentTime; - float deltatimesec = (loadfinishtime - loadstarttime) / 1000.0f; - General.WriteLogLine("Resources loading took " + deltatimesec.ToString("########0.00") + " seconds"); + string deltatimesec = ((loadfinishtime - loadstarttime) / 1000.0f).ToString("########0.00"); + General.WriteLogLine("Resources loading took " + deltatimesec + " seconds"); + loadstarttime = 0; //mxd + + //mxd. Show more detailed message + if(notifiedbusy) + { + notifiedbusy = false; + IntPtr strptr = Marshal.StringToCoTaskMemAuto(deltatimesec); + General.SendMessage(General.MainWindow.Handle, (int)MainForm.ThreadMessages.ResourcesLoaded, strptr.ToInt32(), 0); + } + } + else if(notifiedbusy) //mxd. Sould never happen (?) + { + notifiedbusy = false; + General.SendMessage(General.MainWindow.Handle, (int)MainForm.ThreadMessages.UpdateStatus, 0, 0); } // Wait longer to release CPU resources @@ -1128,11 +1147,15 @@ namespace CodeImp.DoomBuilder.Data //mxd private void LoadInternalTextures() { - missingtexture3d = LoadInternalTexture("MissingTexture3D.png"); //mxd - unknowntexture3d = LoadInternalTexture("UnknownTexture3D.png"); //mxd - hourglass3d = LoadInternalTexture("Hourglass3D.png"); //mxd - crosshair = LoadInternalTexture("Crosshair.png"); //mxd - crosshairbusy = LoadInternalTexture("CrosshairBusy.png"); //mxd + missingtexture3d = LoadInternalTexture("MissingTexture3D.png"); + unknowntexture3d = LoadInternalTexture("UnknownTexture3D.png"); + thingtexture = LoadInternalTexture("ThingTexture2D.png"); + hourglass3d = LoadInternalTexture("Hourglass3D.png"); + crosshair = LoadInternalTexture("Crosshair.png"); + crosshairbusy = LoadInternalTexture("CrosshairBusy.png"); + + thingtexture.UseColorCorrection = false; + thingtexture.CreateTexture(); } //mxd diff --git a/Source/Core/Data/DataReader.cs b/Source/Core/Data/DataReader.cs index 60dc4823394c22dcb6bc127ce1e9e4b1c239afec..6691e7d01acf85f103e12045c716d4612458663b 100644 --- a/Source/Core/Data/DataReader.cs +++ b/Source/Core/Data/DataReader.cs @@ -16,6 +16,7 @@ #region ================== Namespaces +using System; using System.Collections.Generic; using System.IO; using CodeImp.DoomBuilder.Config; @@ -25,7 +26,7 @@ using CodeImp.DoomBuilder.GZBuilder.Data; namespace CodeImp.DoomBuilder.Data { - internal abstract class DataReader + internal abstract class DataReader : IDisposable { #region ================== Constants diff --git a/Source/Core/Data/FlatImage.cs b/Source/Core/Data/FlatImage.cs index b098a67c0ed280f47c9486ceeaa56bb6378af690..70a3fa2837c9c78fbdb43e012be75256b6ea52c4 100644 --- a/Source/Core/Data/FlatImage.cs +++ b/Source/Core/Data/FlatImage.cs @@ -57,9 +57,14 @@ namespace CodeImp.DoomBuilder.Data if(lumpdata != null) { // Copy lump data to memory - lumpdata.Seek(0, SeekOrigin.Begin); byte[] membytes = new byte[(int)lumpdata.Length]; - lumpdata.Read(membytes, 0, (int)lumpdata.Length); + + lock(lumpdata) //mxd + { + lumpdata.Seek(0, SeekOrigin.Begin); + lumpdata.Read(membytes, 0, (int)lumpdata.Length); + } + MemoryStream mem = new MemoryStream(membytes); mem.Seek(0, SeekOrigin.Begin); diff --git a/Source/Core/Data/HighResImage.cs b/Source/Core/Data/HighResImage.cs index 9cb1a82b8d2b6d67c7ca56bd695cdddb940ee56b..182d4a669556896d08967d0262a07646c36211f6 100644 --- a/Source/Core/Data/HighResImage.cs +++ b/Source/Core/Data/HighResImage.cs @@ -151,9 +151,14 @@ namespace CodeImp.DoomBuilder.Data if(patchdata != null) { // Copy patch data to memory - patchdata.Seek(0, SeekOrigin.Begin); byte[] membytes = new byte[(int)patchdata.Length]; - patchdata.Read(membytes, 0, (int)patchdata.Length); + + lock(patchdata) //mxd + { + patchdata.Seek(0, SeekOrigin.Begin); + patchdata.Read(membytes, 0, (int)patchdata.Length); + } + MemoryStream mem = new MemoryStream(membytes); mem.Seek(0, SeekOrigin.Begin); diff --git a/Source/Core/Data/PreviewManager.cs b/Source/Core/Data/PreviewManager.cs index 47c5e169e07c00a96a865dd24c4a4eed222472e5..f8795551084c36a68fee65a2a930b5b2b673c59b 100644 --- a/Source/Core/Data/PreviewManager.cs +++ b/Source/Core/Data/PreviewManager.cs @@ -41,15 +41,16 @@ namespace CodeImp.DoomBuilder.Data #region ================== Variables // Dimensions of a single preview image - private int maxpreviewwidth = 64; - private int maxpreviewheight = 64; + private readonly int maxpreviewwidth; + private readonly int maxpreviewheight; // Images private List<Bitmap> images; // Processing private Queue<ImageData> imageque; - + private static object syncroot = new object(); //mxd + // Disposing private bool isdisposed; @@ -196,7 +197,7 @@ namespace CodeImp.DoomBuilder.Data targetpos.Y += (maxpreviewheight - image.Height) >> 1; // Draw from atlas to target - lock(image) + lock(syncroot) { target.DrawImageUnscaled(image, targetpos.X, targetpos.Y); } @@ -211,7 +212,7 @@ namespace CodeImp.DoomBuilder.Data lock(images) { image = images[previewindex]; } // Make a copy - lock(image) + lock(syncroot) { return new Bitmap(image); } diff --git a/Source/Core/Data/SimpleTextureImage.cs b/Source/Core/Data/SimpleTextureImage.cs index 7f74073745aa3be7d96a6cf60eec1c04d092e3f9..39b1d0bc1d11d6e8dcc08fb1c133bfee992035c7 100644 --- a/Source/Core/Data/SimpleTextureImage.cs +++ b/Source/Core/Data/SimpleTextureImage.cs @@ -70,9 +70,14 @@ namespace CodeImp.DoomBuilder.Data if(patchdata != null) { // Copy patch data to memory - patchdata.Seek(0, SeekOrigin.Begin); byte[] membytes = new byte[(int)patchdata.Length]; - patchdata.Read(membytes, 0, (int)patchdata.Length); + + lock(patchdata) //mxd + { + patchdata.Seek(0, SeekOrigin.Begin); + patchdata.Read(membytes, 0, (int)patchdata.Length); + } + MemoryStream mem = new MemoryStream(membytes); mem.Seek(0, SeekOrigin.Begin); diff --git a/Source/Core/Data/SpriteImage.cs b/Source/Core/Data/SpriteImage.cs index 9e1e870ff5cba0e8b46a1f32049a21fb485ecc05..de052751de9b86d4ce41354f5ee3e54f97083259 100644 --- a/Source/Core/Data/SpriteImage.cs +++ b/Source/Core/Data/SpriteImage.cs @@ -84,9 +84,14 @@ namespace CodeImp.DoomBuilder.Data if(lumpdata != null) { // Copy lump data to memory - lumpdata.Seek(0, SeekOrigin.Begin); byte[] membytes = new byte[(int)lumpdata.Length]; - lumpdata.Read(membytes, 0, (int)lumpdata.Length); + + lock(lumpdata) //mxd + { + lumpdata.Seek(0, SeekOrigin.Begin); + lumpdata.Read(membytes, 0, (int)lumpdata.Length); + } + MemoryStream mem = new MemoryStream(membytes); mem.Seek(0, SeekOrigin.Begin); diff --git a/Source/Core/Data/TextureImage.cs b/Source/Core/Data/TextureImage.cs index 768bf7f24a3764254c99f361302a4bb18bd971f0..c84d7d51f017dea8c55a63c17d7b32613605ecec 100644 --- a/Source/Core/Data/TextureImage.cs +++ b/Source/Core/Data/TextureImage.cs @@ -106,9 +106,14 @@ namespace CodeImp.DoomBuilder.Data if(patchdata != null) { // Copy patch data to memory - patchdata.Seek(0, SeekOrigin.Begin); byte[] membytes = new byte[(int)patchdata.Length]; - patchdata.Read(membytes, 0, (int)patchdata.Length); + + lock(patchdata) //mxd + { + patchdata.Seek(0, SeekOrigin.Begin); + patchdata.Read(membytes, 0, (int)patchdata.Length); + } + MemoryStream mem = new MemoryStream(membytes); mem.Seek(0, SeekOrigin.Begin); diff --git a/Source/Core/Data/WADReader.cs b/Source/Core/Data/WADReader.cs index 6443a08885cbe70dafdb703c0e99c29f4cb320ba..abf603d5d6c9ced2d67f45f87b4da3c2d0b0b1d6 100644 --- a/Source/Core/Data/WADReader.cs +++ b/Source/Core/Data/WADReader.cs @@ -81,7 +81,7 @@ namespace CodeImp.DoomBuilder.Data // Initialize file = new WAD(location.location, true); - is_iwad = (file.Type == WAD.TYPE_IWAD); + is_iwad = file.IsIWAD; strictpatches = dl.option1; patchranges = new List<LumpRange>(); spriteranges = new List<LumpRange>(); @@ -171,7 +171,7 @@ namespace CodeImp.DoomBuilder.Data public override void Resume() { file = new WAD(location.location, true); - is_iwad = (file.Type == WAD.TYPE_IWAD); + is_iwad = file.IsIWAD; base.Resume(); } diff --git a/Source/Core/Editing/ClassicMode.cs b/Source/Core/Editing/ClassicMode.cs index 2b38cc965d267625ffb253827d42f29eac3b23e3..648e5c8e0b62814efb67c3558389bd6503d521cc 100644 --- a/Source/Core/Editing/ClassicMode.cs +++ b/Source/Core/Editing/ClassicMode.cs @@ -17,7 +17,9 @@ #region ================== Namespaces using System; +using System.Collections.Generic; using System.Drawing; +using System.Linq; using System.Windows.Forms; using CodeImp.DoomBuilder.Actions; using CodeImp.DoomBuilder.Geometry; @@ -68,7 +70,8 @@ namespace CodeImp.DoomBuilder.Editing // Selection protected bool selecting; protected bool selectpressed; //mxd - private Vector2D selectstart; + protected bool editpressed; //mxd + protected Vector2D selectstart; protected RectangleF selectionrect; protected MarqueSelectionMode marqueSelectionMode; //mxd @@ -119,10 +122,9 @@ namespace CodeImp.DoomBuilder.Editing this.renderer2d = (Renderer2D)General.Map.Renderer2D; // If the current mode is a ClassicMode, copy mouse properties - if(General.Editing.Mode is ClassicMode) + ClassicMode oldmode = General.Editing.Mode as ClassicMode; + if(oldmode != null) { - ClassicMode oldmode = General.Editing.Mode as ClassicMode; - // Copy mouse properties mousepos = oldmode.mousepos; mousemappos = oldmode.mousemappos; @@ -206,8 +208,11 @@ namespace CodeImp.DoomBuilder.Editing // This scrolls anywhere private void ScrollBy(float deltax, float deltay) { + //mxd. Don't stroll too far from map boundaries + Vector2D offset = ClampViewOffset(renderer2d.OffsetX + deltax, renderer2d.OffsetY + deltay); + // Scroll now - renderer2d.PositionView(renderer2d.OffsetX + deltax, renderer2d.OffsetY + deltay); + renderer2d.PositionView(offset.x, offset.y); this.OnViewChanged(); // Redraw @@ -215,7 +220,7 @@ namespace CodeImp.DoomBuilder.Editing // Determine new unprojected mouse coordinates mousemappos = renderer2d.DisplayToMap(mousepos); - General.MainWindow.UpdateCoordinates(mousemappos); + General.MainWindow.UpdateCoordinates(mousemappos, true); } // This sets the view to be centered at x,y @@ -263,9 +268,10 @@ namespace CodeImp.DoomBuilder.Editing // Calculate view position difference Vector2D diff = ((clientsize / newscale) - (clientsize / renderer2d.Scale)) * zoompos; + Vector2D offset = ClampViewOffset(renderer2d.OffsetX - diff.x, renderer2d.OffsetY + diff.y); //mxd // Zoom now - renderer2d.PositionView(renderer2d.OffsetX - diff.x, renderer2d.OffsetY + diff.y); + renderer2d.PositionView(offset.x, offset.y); renderer2d.ScaleView(newscale); this.OnViewChanged(); @@ -279,6 +285,15 @@ namespace CodeImp.DoomBuilder.Editing if(mouseinside) OnMouseMove(new MouseEventArgs(mousebuttons, 0, (int)mousepos.x, (int)mousepos.y, 0)); } + //mxd. Makes sure given offset stays within map boundaries + private static Vector2D ClampViewOffset(float x, float y) + { + Vector2D diff = new Vector2D(x, y); + Vector2D safediff = new Vector2D(General.Clamp(diff.x, General.Map.Config.LeftBoundary, General.Map.Config.RightBoundary), + General.Clamp(diff.y, General.Map.Config.BottomBoundary, General.Map.Config.TopBoundary)); + return diff - (diff - safediff); + } + //mxd. This changes current grid size based on current zoom level internal void MatchGridSizeToDisplayScale() { @@ -461,7 +476,7 @@ namespace CodeImp.DoomBuilder.Editing #region ================== Processing // Processing - public override void OnProcess(float deltatime) + public override void OnProcess(long deltatime) { base.OnProcess(deltatime); @@ -512,7 +527,7 @@ namespace CodeImp.DoomBuilder.Editing mousebuttons = MouseButtons.None; // Determine new unprojected mouse coordinates - General.MainWindow.UpdateCoordinates(mousemappos); + General.MainWindow.UpdateCoordinates(mousemappos, true); // Let the base class know base.OnMouseLeave(e); @@ -529,7 +544,7 @@ namespace CodeImp.DoomBuilder.Editing mousebuttons = e.Button; // Update labels in main window - General.MainWindow.UpdateCoordinates(mousemappos); + General.MainWindow.UpdateCoordinates(mousemappos, true); // Holding a button? if(e.Button != MouseButtons.None) @@ -589,6 +604,26 @@ namespace CodeImp.DoomBuilder.Editing base.OnMouseUp(e); } + //mxd + public override void OnKeyDown(KeyEventArgs e) + { + // Update marque color when modifier keys are pressed + if(selecting && (e.Control || e.Shift) && marqueSelectionMode != GetMultiSelectionMode()) + OnUpdateMultiSelection(); + + base.OnKeyDown(e); + } + + //mxd + public override void OnKeyUp(KeyEventArgs e) + { + // Update marque color when modifier keys are released + if(selecting && (!e.Control || !e.Shift) && marqueSelectionMode != GetMultiSelectionMode()) + OnUpdateMultiSelection(); + + base.OnKeyUp(e); + } + /// <summary> /// Automatically called when dragging operation starts. /// </summary> @@ -614,7 +649,7 @@ namespace CodeImp.DoomBuilder.Editing } // This sets the view mode - private static void SetViewMode(ViewMode mode) + internal static void SetViewMode(ViewMode mode) { General.Map.CRenderer2D.SetViewMode(mode); General.MainWindow.UpdateInterface(); @@ -634,9 +669,10 @@ namespace CodeImp.DoomBuilder.Editing if(renderer.StartOverlay(true)) { //mxd. Center 2d view on camera position in 3d view - if(General.Settings.GZSynchCameras && General.Editing.PreviousMode != null && General.Editing.PreviousMode.IsSubclassOf(typeof (VisualMode))) + if(General.Settings.GZSynchCameras && !General.Interface.CtrlState + && General.Editing.PreviousMode != null && General.Editing.PreviousMode.IsSubclassOf(typeof(VisualMode))) { - Vector2D campos = new Vector2D(General.Map.VisualCamera.Position.x, General.Map.VisualCamera.Position.y); + Vector2D campos = ClampViewOffset(General.Map.VisualCamera.Position.x, General.Map.VisualCamera.Position.y); renderer2d.PositionView(campos.x, campos.y); } @@ -697,7 +733,7 @@ namespace CodeImp.DoomBuilder.Editing if(s == null) { - General.MainWindow.DisplayStatus(StatusType.Warning, "Can't test from current position: cursor is not inside sector!"); + General.MainWindow.DisplayStatus(StatusType.Warning, "Can't test from current position: mouse cursor must be inside a sector!"); return false; } @@ -736,6 +772,7 @@ namespace CodeImp.DoomBuilder.Editing [BeginAction("classicedit", BaseAction = true)] protected virtual void OnEditBegin() { + editpressed = true; //mxd } /// <summary> @@ -745,6 +782,7 @@ namespace CodeImp.DoomBuilder.Editing [EndAction("classicedit", BaseAction = true)] protected virtual void OnEditEnd() { + editpressed = false; //mxd } /// <summary> @@ -795,6 +833,8 @@ namespace CodeImp.DoomBuilder.Editing /// </summary> protected virtual void OnUpdateMultiSelection() { + marqueSelectionMode = GetMultiSelectionMode(); //mxd + selectionrect.X = selectstart.x; selectionrect.Y = selectstart.y; selectionrect.Width = mousemappos.x - selectstart.x; @@ -813,6 +853,12 @@ namespace CodeImp.DoomBuilder.Editing } } + //mxd + protected virtual MarqueSelectionMode GetMultiSelectionMode() + { + return MarqueSelectionMode.SELECT; + } + /// <summary> /// Call this to draw the selection on the overlay layer. /// Must call renderer.StartOverlay first! @@ -915,6 +961,28 @@ namespace CodeImp.DoomBuilder.Editing SetViewMode(ViewMode.CeilingTextures); } + //mxd + [BeginAction("nextviewmode", BaseAction = true)] + protected virtual void NextViewMode() + { + List<ViewMode> vmodes = new List<ViewMode>(Enum.GetValues(typeof(ViewMode)).Cast<ViewMode>()); + int curmode = vmodes.IndexOf(General.Map.Renderer2D.ViewMode); + curmode = (curmode == vmodes.Count - 1 ? 0 : ++curmode); + + SetViewMode(vmodes[curmode]); + } + + //mxd + [BeginAction("previousviewmode", BaseAction = true)] + protected virtual void PreviousViewMode() + { + List<ViewMode> vmodes = new List<ViewMode>(Enum.GetValues(typeof(ViewMode)).Cast<ViewMode>()); + int curmode = vmodes.IndexOf(General.Map.Renderer2D.ViewMode); + curmode = (curmode == 0 ? vmodes.Count - 1 : --curmode); + + SetViewMode(vmodes[curmode]); + } + //mxd [BeginAction("centeroncoordinates", BaseAction = true)] protected virtual void CenterOnCoordinates() @@ -929,6 +997,17 @@ namespace CodeImp.DoomBuilder.Editing } } + //mxd + [BeginAction("togglehighlight", BaseAction = true)] + protected virtual void ToggleHighlight() + { + General.Settings.UseHighlight = !General.Settings.UseHighlight; + General.Interface.DisplayStatus(StatusType.Action, "Highlight is now " + (General.Settings.UseHighlight ? "ON" : "OFF") + "."); + + // Redraw display to show changes + General.Interface.RedrawDisplay(); + } + #endregion } diff --git a/Source/Core/Editing/CopyPasteManager.cs b/Source/Core/Editing/CopyPasteManager.cs index 618f0cc0639b2f04f8fb61f070dd6938b665478c..a42b6e2567ed1233ad8d419001233bb98c979243 100644 --- a/Source/Core/Editing/CopyPasteManager.cs +++ b/Source/Core/Editing/CopyPasteManager.cs @@ -26,6 +26,7 @@ using CodeImp.DoomBuilder.Geometry; using CodeImp.DoomBuilder.GZBuilder.Data; using CodeImp.DoomBuilder.IO; using CodeImp.DoomBuilder.Map; +using CodeImp.DoomBuilder.Types; using CodeImp.DoomBuilder.Windows; #endregion @@ -37,6 +38,7 @@ namespace CodeImp.DoomBuilder.Editing #region ================== Constants private const string CLIPBOARD_DATA_FORMAT = "GZDOOM_BUILDER_GEOMETRY"; + private const string CLIPBOARD_DATA_FORMAT_DB2 = "DOOM_BUILDER_GEOMETRY"; #endregion @@ -275,8 +277,11 @@ namespace CodeImp.DoomBuilder.Editing // Check if possible to copy/paste if(General.Editing.Mode.Attributes.AllowCopyPaste) { + bool havepastedata = Clipboard.ContainsData(CLIPBOARD_DATA_FORMAT); //mxd + bool havedb2pastedata = Clipboard.ContainsData(CLIPBOARD_DATA_FORMAT_DB2); //mxd + // Anything to paste? - if(Clipboard.ContainsData(CLIPBOARD_DATA_FORMAT)) + if(havepastedata || havedb2pastedata) { // Cancel volatile mode General.Editing.DisengageVolatileMode(); @@ -295,22 +300,42 @@ namespace CodeImp.DoomBuilder.Editing General.Map.Map.ClearAllMarks(true); // Read from clipboard - using(Stream memstream = (Stream)Clipboard.GetData(CLIPBOARD_DATA_FORMAT)) + if(havepastedata) { - // Rewind before use - memstream.Seek(0, SeekOrigin.Begin); - - // Read data stream - ClipboardStreamReader reader = new ClipboardStreamReader(); //mxd - General.Map.Map.BeginAddRemove(); - bool success = reader.Read(General.Map.Map, memstream); - General.Map.Map.EndAddRemove(); - if(!success) //mxd + using(Stream memstream = (Stream)Clipboard.GetData(CLIPBOARD_DATA_FORMAT)) + { + // Rewind before use + memstream.Seek(0, SeekOrigin.Begin); + + // Read data stream + ClipboardStreamReader reader = new ClipboardStreamReader(); //mxd + General.Map.Map.BeginAddRemove(); + bool success = reader.Read(General.Map.Map, memstream); + General.Map.Map.EndAddRemove(); + if(!success) //mxd + { + General.Map.UndoRedo.WithdrawUndo(); // This will also mess with the marks... + General.Map.Map.ClearAllMarks(true); // So re-mark all current geometry... + } + } + } + // mxd. DB2/DB64 interop + else if(havedb2pastedata) + { + using(Stream memstream = (Stream)Clipboard.GetData(CLIPBOARD_DATA_FORMAT_DB2)) { - General.Map.UndoRedo.WithdrawUndo(); // This will also mess with the marks... - General.Map.Map.ClearAllMarks(true); // So re-mark all current geometry... + // Read data stream + UniversalStreamReader reader = new UniversalStreamReader(new Dictionary<MapElementType, Dictionary<string, UniversalType>>()); + reader.StrictChecking = false; + General.Map.Map.BeginAddRemove(); + reader.Read(General.Map.Map, memstream); + General.Map.Map.EndAddRemove(); } } + else + { + throw new NotImplementedException("Unknown clipboard data format!"); + } // The new geometry is not marked, so invert the marks to get it marked General.Map.Map.InvertAllMarks(); diff --git a/Source/Core/Editing/EditMode.cs b/Source/Core/Editing/EditMode.cs index 4bb035992039f53dcbd6d3a580fa24498252ed4c..a6e7775327c909ebdb36d35e6206dd3c4fb7bf58 100644 --- a/Source/Core/Editing/EditMode.cs +++ b/Source/Core/Editing/EditMode.cs @@ -45,7 +45,7 @@ namespace CodeImp.DoomBuilder.Editing #region ================== Variables // Attributes - private EditModeAttribute attributes; + protected EditModeAttribute attributes; //mxd. private -> protected // Disposing protected bool isdisposed; @@ -245,7 +245,8 @@ namespace CodeImp.DoomBuilder.Editing public virtual void OnPresentDisplay() { } // Processing events - public virtual void OnProcess(float deltatime) { } + public virtual void OnProcess(long deltatime) { } + public virtual void OnClockReset() { } //mxd // Generic events public virtual void OnReloadResources() { } diff --git a/Source/Core/Editing/EditModeInfo.cs b/Source/Core/Editing/EditModeInfo.cs index a2360355d9e3a4eb0d6750a361c5b625da74e643..12c4b71a15fd1bb42f7f47c2956d3a263990882c 100644 --- a/Source/Core/Editing/EditModeInfo.cs +++ b/Source/Core/Editing/EditModeInfo.cs @@ -17,10 +17,13 @@ #region ================== Namespaces using System; +using System.Collections.Generic; using System.Drawing; using System.IO; +using System.Linq; using CodeImp.DoomBuilder.Actions; using CodeImp.DoomBuilder.Plugins; +using CodeImp.DoomBuilder.Rendering; using CodeImp.DoomBuilder.VisualModes; #endregion @@ -140,33 +143,38 @@ namespace CodeImp.DoomBuilder.Editing } } - // This switches to the mode by user command - // (when user presses shortcut key) + // This switches to the mode by user command (when user presses shortcut key) public void UserSwitchToMode() { // Only when a map is opened if(General.Map != null) { - // Switching from volatile mode to volatile mode? - if((General.Editing.Mode != null) && General.Editing.Mode.Attributes.Volatile && this.attribs.Volatile) + //mxd. Not the same mode? + if(type != General.Editing.Mode.GetType()) { - // First cancel previous volatile mode - General.Editing.CancelVolatileMode(); + // Switching from volatile mode to a different volatile mode? + if((General.Editing.Mode != null) && General.Editing.Mode.Attributes.Volatile && this.attribs.Volatile) + { + // First cancel previous volatile mode + General.Editing.CancelVolatileMode(); + } + + // Create instance + EditMode newmode = plugin.CreateObject<EditMode>(type); + + //mxd. Switch mode? + if(newmode != null) General.Editing.ChangeMode(newmode); } - - // When in VisualMode and switching to the same VisualMode, then we switch back to the previous classic mode - if((General.Editing.Mode is VisualMode) && (type == General.Editing.Mode.GetType())) + // When in VisualMode and switching to the same VisualMode, switch back to the previous classic mode + else if(General.Editing.Mode is VisualMode) { // Switch back to last classic mode General.Editing.ChangeMode(General.Editing.PreviousClassicMode.Name); } - else + //mxd. Switch between view floor and view ceiling textures? + else if(General.Editing.Mode is ClassicMode && General.Settings.SwitchViewModes) { - // Create instance - EditMode newmode = plugin.CreateObject<EditMode>(type); - - //mxd. Switch mode? - if(newmode != null) General.Editing.ChangeMode(newmode); + ClassicMode.SetViewMode(General.Map.Renderer2D.ViewMode == ViewMode.FloorTextures ? ViewMode.CeilingTextures : ViewMode.FloorTextures); } } } diff --git a/Source/Core/Editing/GridSetup.cs b/Source/Core/Editing/GridSetup.cs index fd0eb749169e6da85d63e7d1ebf44a8d3416b783..3b1ce050403c45fdc81d74418fc2efd5d71bc22c 100644 --- a/Source/Core/Editing/GridSetup.cs +++ b/Source/Core/Editing/GridSetup.cs @@ -30,7 +30,7 @@ using CodeImp.DoomBuilder.Geometry; namespace CodeImp.DoomBuilder.Editing { - public class GridSetup + public class GridSetup : IDisposable { #region ================== Constants @@ -95,12 +95,12 @@ namespace CodeImp.DoomBuilder.Editing } // Disposer - internal void Dispose() + public void Dispose() { if(!isdisposed) { // Dispose image if needed - if(backimage is FileImage) (backimage as FileImage).Dispose(); + if(backimage is FileImage) backimage.Dispose(); // Clean up backimage = null; @@ -208,7 +208,7 @@ namespace CodeImp.DoomBuilder.Editing internal void LinkBackground() { // Dispose image if needed - if(backimage is FileImage) (backimage as FileImage).Dispose(); + if(backimage is FileImage) backimage.Dispose(); // Where to load background from? switch(backsource) diff --git a/Source/Core/Editing/UndoManager.cs b/Source/Core/Editing/UndoManager.cs index aab46cc098fff645ccf8a06168dc1f61986a9321..be9ab1539da34b656a53826ffcee325a25747b2f 100644 --- a/Source/Core/Editing/UndoManager.cs +++ b/Source/Core/Editing/UndoManager.cs @@ -202,20 +202,13 @@ namespace CodeImp.DoomBuilder.Editing ClearRedos(); General.WriteLogLine("All undo and redo levels cleared."); - //mxd - if (ss != null) - { - ss.Dispose(); - ss = null; - } - if (stream != null) - { - stream.Dispose(); - stream = null; - } - - // Done - isdisposed = true; + //mxd + if(snapshot != null) { snapshot.Dispose(); snapshot = null; } + if(ss != null) { ss.Dispose(); ss = null; } + if(stream != null) { stream.Dispose(); stream = null; } + + // Done + isdisposed = true; } } diff --git a/Source/Core/GZBuilder/Controls/AngleControl.cs b/Source/Core/GZBuilder/Controls/AngleControl.cs index f971c4ae2afbb452095d3296851f55eb53d84d5c..41961e5eb566ffba607807acbc387f2040ba40eb 100644 --- a/Source/Core/GZBuilder/Controls/AngleControl.cs +++ b/Source/Core/GZBuilder/Controls/AngleControl.cs @@ -33,6 +33,8 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls private Point startClick; //JBR + private bool doomangleclamping; + //UI colors private readonly Color fillColor = SystemColors.Window; private readonly Color fillInactiveColor = SystemColors.Control; @@ -53,6 +55,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls public int Angle { get { return (angle == NO_ANGLE ? NO_ANGLE : angle - angleoffset); } set { angle = (value == NO_ANGLE ? NO_ANGLE : value + angleoffset); this.Refresh(); } } public int AngleOffset { get { return angleoffset; } set { angleoffset = value; this.Refresh(); } } + public bool DoomAngleClamping { get { return doomangleclamping; } set { doomangleclamping = value; } } public const int NO_ANGLE = int.MinValue; [Description("Allow loop changing, setting to false will restore old behaviour.")] @@ -295,7 +298,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls startClick = new Point(e.X, e.Y); int thisAngle = XYToDegrees(startClick, origin); - if (e.Button == MouseButtons.Left) + if(e.Button == MouseButtons.Left || doomangleclamping) { thisAngle = (int)Math.Round(thisAngle / 45f) * 45; if(thisAngle == 360) thisAngle = 0; diff --git a/Source/Core/GZBuilder/Controls/ColorFieldsControl.cs b/Source/Core/GZBuilder/Controls/ColorFieldsControl.cs index b3beb7ec4e6b5093357144654cf53d0bbd1a689c..dfbab2380087bf53923ce8909315bba4d9529dbb 100644 --- a/Source/Core/GZBuilder/Controls/ColorFieldsControl.cs +++ b/Source/Core/GZBuilder/Controls/ColorFieldsControl.cs @@ -2,10 +2,10 @@ using System; using System.Drawing; -using System.Windows.Forms; using System.Globalization; -using CodeImp.DoomBuilder.Rendering; +using System.Windows.Forms; using CodeImp.DoomBuilder.Map; +using CodeImp.DoomBuilder.Rendering; #endregion @@ -15,93 +15,109 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls { #region ================== Events - public event EventHandler OnValueChanged; //mxd + public event EventHandler OnValueChanged; #endregion #region ================== Variables - private int defaultValue; + private int defaultvalue; private string field; - private bool blockUpdate; + private bool blockupdate; + private bool blockevents; #endregion #region ================== Properties - public int DefaultValue { get { return defaultValue; } set { defaultValue = value; } } + public int DefaultValue { get { return defaultvalue; } set { defaultvalue = value; } } public string Label { get { return cpColor.Label; } set { cpColor.Label = value; } } public string Field { get { return field; } set { field = value; } } #endregion - + + #region ================== Constructor + public ColorFieldsControl() { InitializeComponent(); } - public void SetValueFrom(UniFields fields) - { - string newValue = String.Format("{0:X6}", UniFields.GetInteger(fields, field, defaultValue)); - tbColor.Text = ((!string.IsNullOrEmpty(tbColor.Text) && tbColor.Text != newValue) ? "" : newValue); - CheckColor(); - } + #endregion + + #region ================== Methods - public void ApplyTo(UniFields fields, int oldValue) + public void SetValueFrom(UniFields fields, bool first) { - if(string.IsNullOrEmpty(tbColor.Text)) + blockevents = true; + + string colorval = String.Format("{0:X6}", UniFields.GetInteger(fields, field, defaultvalue)); + if(first) { - UniFields.SetInteger(fields, field, oldValue, defaultValue); - } - else + tbColor.Text = colorval; + } + else if(!string.IsNullOrEmpty(tbColor.Text) && colorval != tbColor.Text) { - UniFields.SetInteger(fields, field, (cpColor.Color.ToInt() & 0x00ffffff), defaultValue); + blockupdate = true; + tbColor.Text = string.Empty; + cpColor.Color = PixelColor.FromInt(defaultvalue).WithAlpha(255); + blockupdate = false; + + CheckColor(); } + + blockevents = false; + } + + public void ApplyTo(UniFields fields, int oldvalue) + { + int colorval = !string.IsNullOrEmpty(tbColor.Text) ? (cpColor.Color.ToInt() & 0x00FFFFFF) : oldvalue; + UniFields.SetInteger(fields, field, colorval, defaultvalue); } private void CheckColor() { - bool changed = string.IsNullOrEmpty(tbColor.Text) || (cpColor.Color.ToInt() & 0x00ffffff) != defaultValue; + bool changed = string.IsNullOrEmpty(tbColor.Text) || (cpColor.Color.ToInt() & 0x00FFFFFF) != defaultvalue; bReset.Visible = changed; - tbColor.ForeColor = changed ? SystemColors.WindowText : SystemColors.GrayText; + tbColor.ForeColor = (changed ? SystemColors.WindowText : SystemColors.GrayText); } + #endregion + #region ================== Events private void bReset_Click(object sender, EventArgs e) { - cpColor.Color = PixelColor.FromInt(defaultValue).WithAlpha(255); + cpColor.Focus(); // Otherwise the focus will go to cpColor's textbox, which is not what we want + cpColor.Color = PixelColor.FromInt(defaultvalue).WithAlpha(255); cpColor_ColorChanged(this, EventArgs.Empty); } private void cpColor_ColorChanged(object sender, EventArgs e) { - if(blockUpdate) return; + if(blockupdate) return; - blockUpdate = true; - tbColor.Text = String.Format("{0:X6}", (cpColor.Color.ToInt() & 0x00ffffff)); - blockUpdate = false; + blockupdate = true; + tbColor.Text = String.Format("{0:X6}", (cpColor.Color.ToInt() & 0x00FFFFFF)); + blockupdate = false; CheckColor(); - if(OnValueChanged != null) OnValueChanged(this, EventArgs.Empty); + if(!blockevents && OnValueChanged != null) OnValueChanged(this, EventArgs.Empty); } private void tbColor_TextChanged(object sender, EventArgs e) { - if(blockUpdate) return; - int colorVal; - - if(int.TryParse(tbColor.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out colorVal)) + if(blockupdate) return; + + int colorval; + if(int.TryParse(tbColor.Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out colorval)) { - colorVal = General.Clamp(colorVal, 0, 16777215); - - blockUpdate = true; - cpColor.Color = PixelColor.FromInt(colorVal).WithAlpha(255); - blockUpdate = false; + colorval = General.Clamp(colorval, 0, 0xFFFFFF); + cpColor.Color = PixelColor.FromInt(colorval).WithAlpha(255); } CheckColor(); - if(OnValueChanged != null) OnValueChanged(this, EventArgs.Empty); + if(!blockevents && OnValueChanged != null) OnValueChanged(this, EventArgs.Empty); } #endregion diff --git a/Source/Core/GZBuilder/Controls/MultiSelectTreeview.cs b/Source/Core/GZBuilder/Controls/MultiSelectTreeview.cs index c19ab83b3d7c62bf5bc3c7b52dd2611393c0c542..8ff6188e268dd19c82f28f13798a390646937d81 100644 --- a/Source/Core/GZBuilder/Controls/MultiSelectTreeview.cs +++ b/Source/Core/GZBuilder/Controls/MultiSelectTreeview.cs @@ -72,6 +72,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Windows.Forms; +using CodeImp.DoomBuilder.Controls; #endregion @@ -128,7 +129,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls /// The TreeView control is a regular treeview with multi-selection capability. /// </summary> [ToolboxItem(true)] - public class MultiSelectTreeview : TreeView + public class MultiSelectTreeview : BufferedTreeView { public event TreeViewEventHandler AfterDeselect; public event TreeViewEventHandler BeforeDeselect; diff --git a/Source/Core/GZBuilder/Controls/PairedFieldsControl.Designer.cs b/Source/Core/GZBuilder/Controls/PairedFieldsControl.Designer.cs index 46427a6b5aced62ae484e750e838b7d71d1d10fd..8521f081e0960e95965b5b87b4ec559f01322835 100644 --- a/Source/Core/GZBuilder/Controls/PairedFieldsControl.Designer.cs +++ b/Source/Core/GZBuilder/Controls/PairedFieldsControl.Designer.cs @@ -60,6 +60,7 @@ this.value1.AllowDecimal = false; this.value1.AllowNegative = true; this.value1.AllowRelative = true; + this.value1.AllowExpressions = true; this.value1.ButtonStep = 1; this.value1.ButtonStepFloat = 1F; this.value1.ButtonStepsWrapAround = false; @@ -76,6 +77,7 @@ this.value2.AllowDecimal = false; this.value2.AllowNegative = true; this.value2.AllowRelative = true; + this.value2.AllowExpressions = true; this.value2.ButtonStep = 1; this.value2.ButtonStepFloat = 1F; this.value2.ButtonStepsWrapAround = false; diff --git a/Source/Core/GZBuilder/Controls/PairedFloatControl.Designer.cs b/Source/Core/GZBuilder/Controls/PairedFloatControl.Designer.cs index f4d4ab7eaf8643fc2076c90cb6d0753757493b70..729d980209521fdbfe2de8ca3b2a1448c2f8a97e 100644 --- a/Source/Core/GZBuilder/Controls/PairedFloatControl.Designer.cs +++ b/Source/Core/GZBuilder/Controls/PairedFloatControl.Designer.cs @@ -39,6 +39,7 @@ this.value1.AllowDecimal = true; this.value1.AllowNegative = true; this.value1.AllowRelative = true; + this.value1.AllowExpressions = true; this.value1.ButtonStep = 1; this.value1.ButtonStepFloat = 1F; this.value1.ButtonStepsWrapAround = false; @@ -56,6 +57,7 @@ this.value2.AllowDecimal = true; this.value2.AllowNegative = true; this.value2.AllowRelative = true; + this.value2.AllowExpressions = true; this.value2.ButtonStep = 1; this.value2.ButtonStepFloat = 1F; this.value2.ButtonStepsWrapAround = false; diff --git a/Source/Core/GZBuilder/Controls/PairedIntControl.Designer.cs b/Source/Core/GZBuilder/Controls/PairedIntControl.Designer.cs index 5a0b91aed4bca323869bd9f03b4534cefa37fbe1..27a17e1496c4cbf62378b438ae8a35549c228a09 100644 --- a/Source/Core/GZBuilder/Controls/PairedIntControl.Designer.cs +++ b/Source/Core/GZBuilder/Controls/PairedIntControl.Designer.cs @@ -49,6 +49,7 @@ this.value1.AllowDecimal = false; this.value1.AllowNegative = true; this.value1.AllowRelative = true; + this.value1.AllowExpressions = true; this.value1.ButtonStep = 1; this.value1.ButtonStepFloat = 1F; this.value1.ButtonStepsWrapAround = false; @@ -65,6 +66,7 @@ this.value2.AllowDecimal = false; this.value2.AllowNegative = true; this.value2.AllowRelative = true; + this.value2.AllowExpressions = true; this.value2.ButtonStep = 1; this.value2.ButtonStepFloat = 1F; this.value2.ButtonStepsWrapAround = false; diff --git a/Source/Core/GZBuilder/Controls/TagSelector.Designer.cs b/Source/Core/GZBuilder/Controls/TagSelector.Designer.cs index 2e5ea4b709491b7b38ee7737fc65fee4a0ed0faf..d4ac3ecb99168b162ec6c9a1ef3f15315fcfa5c8 100644 --- a/Source/Core/GZBuilder/Controls/TagSelector.Designer.cs +++ b/Source/Core/GZBuilder/Controls/TagSelector.Designer.cs @@ -35,6 +35,7 @@ this.unusedTag = new System.Windows.Forms.Button(); this.tooltip = new System.Windows.Forms.ToolTip(this.components); this.clear = new System.Windows.Forms.Button(); + this.buttons = new System.Windows.Forms.VScrollBar(); this.SuspendLayout(); // // label1 @@ -58,7 +59,7 @@ this.cbTagPicker.FormattingEnabled = true; this.cbTagPicker.Location = new System.Drawing.Point(42, 7); this.cbTagPicker.Name = "cbTagPicker"; - this.cbTagPicker.Size = new System.Drawing.Size(165, 21); + this.cbTagPicker.Size = new System.Drawing.Size(150, 21); this.cbTagPicker.TabIndex = 1; // // newTag @@ -101,10 +102,23 @@ this.clear.UseVisualStyleBackColor = true; this.clear.Click += new System.EventHandler(this.clear_Click); // + // buttons + // + this.buttons.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttons.LargeChange = 10000; + this.buttons.Location = new System.Drawing.Point(192, 5); + this.buttons.Maximum = 10000; + this.buttons.Minimum = -10000; + this.buttons.Name = "buttons"; + this.buttons.Size = new System.Drawing.Size(18, 24); + this.buttons.TabIndex = 5; + this.buttons.ValueChanged += new System.EventHandler(this.buttons_ValueChanged); + // // TagSelector // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.Controls.Add(this.buttons); this.Controls.Add(this.clear); this.Controls.Add(this.unusedTag); this.Controls.Add(this.newTag); @@ -126,5 +140,6 @@ private System.Windows.Forms.Button unusedTag; private System.Windows.Forms.ToolTip tooltip; private System.Windows.Forms.Button clear; + private System.Windows.Forms.VScrollBar buttons; } } diff --git a/Source/Core/GZBuilder/Controls/TagSelector.cs b/Source/Core/GZBuilder/Controls/TagSelector.cs index 937e0f6564cae1f5cd5065ba087b18d9c091ba39..e4096ba3615d9e42f3b1df1f9839d5bac0e06c4a 100644 --- a/Source/Core/GZBuilder/Controls/TagSelector.cs +++ b/Source/Core/GZBuilder/Controls/TagSelector.cs @@ -257,7 +257,24 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls clear.Left = this.Width - clear.Width - clear.Margin.Right; unusedTag.Left = clear.Left - unusedTag.Margin.Right - unusedTag.Width; newTag.Left = unusedTag.Left - newTag.Margin.Right - newTag.Width; - cbTagPicker.Width = newTag.Left - cbTagPicker.Margin.Right - cbTagPicker.Left; + buttons.Left = newTag.Left - newTag.Margin.Left - buttons.Width; + cbTagPicker.Width = buttons.Left - cbTagPicker.Margin.Right - cbTagPicker.Left; + } + + //mxd + private void buttons_ValueChanged(object sender, EventArgs e) + { + if(buttons.Value == 0) return; + + ValidateTag(); + + if(!valid) tag = 0; + else tag = General.Clamp(tag + (buttons.Value < 0 ? 1 : -1), General.Map.FormatInterface.MinTag, General.Map.FormatInterface.MaxTag); + + cbTagPicker.SelectedIndex = -1; + cbTagPicker.Text = tag.ToString(); + buttons.Value = 0; + valid = true; } #endregion diff --git a/Source/Core/GZBuilder/Controls/TagsSelector.Designer.cs b/Source/Core/GZBuilder/Controls/TagsSelector.Designer.cs index 733e6b96d91b970c486a1d5fad6bba975f154642..7efb149548ee7543a36ff50d60349c02fb653f7e 100644 --- a/Source/Core/GZBuilder/Controls/TagsSelector.Designer.cs +++ b/Source/Core/GZBuilder/Controls/TagsSelector.Designer.cs @@ -37,6 +37,7 @@ this.clearalltags = new System.Windows.Forms.Button(); this.tagslist = new System.Windows.Forms.LinkLabel(); this.label1 = new System.Windows.Forms.Label(); + this.buttons = new System.Windows.Forms.VScrollBar(); this.SuspendLayout(); // // curtaglabel @@ -60,7 +61,7 @@ this.tagpicker.FormattingEnabled = true; this.tagpicker.Location = new System.Drawing.Point(65, 7); this.tagpicker.Name = "tagpicker"; - this.tagpicker.Size = new System.Drawing.Size(230, 21); + this.tagpicker.Size = new System.Drawing.Size(210, 21); this.tagpicker.TabIndex = 1; this.tagpicker.TextChanged += new System.EventHandler(this.tagpicker_TextChanged); // @@ -151,10 +152,23 @@ this.label1.TabIndex = 6; this.label1.Text = "Tags:"; // + // buttons + // + this.buttons.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttons.LargeChange = 10000; + this.buttons.Location = new System.Drawing.Point(278, 5); + this.buttons.Maximum = 10000; + this.buttons.Minimum = -10000; + this.buttons.Name = "buttons"; + this.buttons.Size = new System.Drawing.Size(18, 24); + this.buttons.TabIndex = 11; + this.buttons.ValueChanged += new System.EventHandler(this.buttons_ValueChanged); + // // TagsSelector // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.Controls.Add(this.buttons); this.Controls.Add(this.clearalltags); this.Controls.Add(this.clear); this.Controls.Add(this.addtag); @@ -186,5 +200,6 @@ private System.Windows.Forms.Button addtag; private System.Windows.Forms.Button clear; private System.Windows.Forms.Button clearalltags; + private System.Windows.Forms.VScrollBar buttons; } } diff --git a/Source/Core/GZBuilder/Controls/TagsSelector.cs b/Source/Core/GZBuilder/Controls/TagsSelector.cs index 427fb979e05aea5de37e244931b9067b3c7b41e8..4b4db965e8af2e675a080877dcb63e8d6122d5b7 100644 --- a/Source/Core/GZBuilder/Controls/TagsSelector.cs +++ b/Source/Core/GZBuilder/Controls/TagsSelector.cs @@ -426,11 +426,43 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls clear.Left = this.Width - clear.Width - clear.Margin.Right; unusedtag.Left = clear.Left - unusedtag.Margin.Right - unusedtag.Width; newtag.Left = unusedtag.Left - newtag.Margin.Right - newtag.Width; - tagpicker.Width = newtag.Left - tagpicker.Margin.Right - tagpicker.Left; + buttons.Left = newtag.Left - newtag.Margin.Left - buttons.Width; + tagpicker.Width = buttons.Left - tagpicker.Margin.Right - tagpicker.Left; removetag.Left = clear.Left; addtag.Left = removetag.Left - addtag.Margin.Right - addtag.Width; } + //mxd + private void buttons_ValueChanged(object sender, EventArgs e) + { + if(buttons.Value == 0) return; + + int tag = 0; + bool valid = false; + + // Get current tag + if(tagpicker.SelectedItem != null) + { + TagInfo info = (TagInfo) tagpicker.SelectedItem; + tag = info.Tag; + valid = true; + } + else + { + string text = tagpicker.Text.Trim(); + if(!string.IsNullOrEmpty(text) && int.TryParse(text, out tag)) + valid = true; + } + + // Increment it + if(valid) tag = General.Clamp(tag + (buttons.Value < 0 ? 1 : -1), General.Map.FormatInterface.MinTag, General.Map.FormatInterface.MaxTag); + + // Apply it + tagpicker.SelectedIndex = -1; + tagpicker.Text = tag.ToString(); + buttons.Value = 0; + } + #endregion } } \ No newline at end of file diff --git a/Source/Core/GZBuilder/Data/EngineInfo.cs b/Source/Core/GZBuilder/Data/EngineInfo.cs index de217051c5689406022c1735be3bcfff9be4c5f8..f63ffa005c71e7585e4f2562cd5dabed99122b59 100644 --- a/Source/Core/GZBuilder/Data/EngineInfo.cs +++ b/Source/Core/GZBuilder/Data/EngineInfo.cs @@ -1,65 +1,106 @@ -using System; +#region ================== Namespaces + +using System; using System.Drawing; using System.IO; +#endregion + namespace CodeImp.DoomBuilder.GZBuilder.Data { public class EngineInfo : IDisposable { - // Disposing - private bool isdisposed; + #region ================== Constants + + public const string DEFAULT_ENGINE_NAME = "Engine with no name"; + + #endregion - public const string DEFAULT_ENGINE_NAME = "Engine with no name"; - + #region ================== Variables + + // Settings private string testprogramname; - public string TestProgramName { get { return testprogramname; } set { testprogramname = value; CheckProgramName(); } } - public string TestProgram; + private string testprogram; + private Bitmap icon; public string TestParameters; public bool CustomParameters; public int TestSkill; public string TestSkin; public int TestGametype; public bool TestShortPaths; - private Bitmap icon; - public Bitmap TestProgramIcon { get { return icon; } } - public EngineInfo() + // Disposing + private bool isdisposed; + + #endregion + + #region ================== Properties + + public string TestProgramName { get { return testprogramname; } set { testprogramname = value; CheckProgramName(); } } + public string TestProgram { get { return testprogram; } set { testprogram = value; CheckProgramName(); } } + public Bitmap TestProgramIcon { get { if(icon == null) UpdateIcon(); return icon; } } + + #endregion + + #region ================== Constructors / Disposer + + public EngineInfo() { testprogramname = DEFAULT_ENGINE_NAME; } - public EngineInfo(EngineInfo other) + public EngineInfo(EngineInfo other) { testprogramname = other.TestProgramName; - TestProgram = other.TestProgram; + testprogram = other.testprogram; TestParameters = other.TestParameters; CustomParameters = other.CustomParameters; TestSkill = other.TestSkill; TestSkin = other.TestSkin; TestGametype = other.TestGametype; TestShortPaths = other.TestShortPaths; - icon = other.icon; + + UpdateIcon(); } + public void Dispose() + { + // Not already disposed? + if(!isdisposed) + { + // Clean up + icon.Dispose(); + + // Done + isdisposed = true; + } + } + + #endregion + + #region ================== Methods + private void CheckProgramName() { - if(testprogramname == DEFAULT_ENGINE_NAME && !String.IsNullOrEmpty(TestProgram)) + if(testprogramname == DEFAULT_ENGINE_NAME && !String.IsNullOrEmpty(testprogram)) { // Get engine name from path - testprogramname = Path.GetFileNameWithoutExtension(TestProgram); + testprogramname = Path.GetFileNameWithoutExtension(testprogram); } + } - // Update icon + private void UpdateIcon() + { if(icon != null) { icon.Dispose(); icon = null; } - if(File.Exists(TestProgram)) + if(File.Exists(testprogram)) { - Icon i = Icon.ExtractAssociatedIcon(TestProgram); - icon = (i != null ? i.ToBitmap() : new Bitmap(Properties.Resources.Question)); + Icon i = Icon.ExtractAssociatedIcon(testprogram); + icon = new Bitmap(i != null ? i.ToBitmap() : Properties.Resources.Question); } else { @@ -67,17 +108,6 @@ namespace CodeImp.DoomBuilder.GZBuilder.Data } } - public void Dispose() - { - // Not already disposed? - if (!isdisposed) - { - // Clean up - icon.Dispose(); - - // Done - isdisposed = true; - } - } - } + #endregion + } } diff --git a/Source/Core/GZBuilder/Windows/TagStatisticsForm.Designer.cs b/Source/Core/GZBuilder/Windows/TagStatisticsForm.Designer.cs index dd4821be4f195a18c3c55e2284f92bce24461eff..7c31da1c6c788aea6a345b95c23cdce8799f54bb 100644 --- a/Source/Core/GZBuilder/Windows/TagStatisticsForm.Designer.cs +++ b/Source/Core/GZBuilder/Windows/TagStatisticsForm.Designer.cs @@ -84,7 +84,6 @@ this.dataGridView.Size = new System.Drawing.Size(477, 256); this.dataGridView.TabIndex = 3; this.dataGridView.CellMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView_CellMouseClick); - this.dataGridView.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView_CellMouseDoubleClick); // // TagColumn // @@ -188,7 +187,7 @@ this.MinimizeBox = false; this.MinimumSize = new System.Drawing.Size(120, 80); this.Name = "TagStatisticsForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.Text = "Tag statistics"; diff --git a/Source/Core/GZBuilder/Windows/TagStatisticsForm.cs b/Source/Core/GZBuilder/Windows/TagStatisticsForm.cs index ebae71aef4afdd845c1ab3a0baa66ac7ffc0c7bd..5e1837b83308702be9b0eb26baa2fa0c002c0172 100644 --- a/Source/Core/GZBuilder/Windows/TagStatisticsForm.cs +++ b/Source/Core/GZBuilder/Windows/TagStatisticsForm.cs @@ -168,7 +168,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows return list; } - private static void ShowSelection(List<Vector2D> points) + private static void ShowSelection(IEnumerable<Vector2D> points) { RectangleF area = MapSet.CreateEmptyArea(); @@ -193,11 +193,8 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows area.Inflate(100f, 100f); // Zoom to area - if(General.Editing.Mode is ClassicMode) - { - ClassicMode editmode = (General.Editing.Mode as ClassicMode); - editmode.CenterOnArea(area, 0.6f); - } + ClassicMode mode = General.Editing.Mode as ClassicMode; + if(mode != null) mode.CenterOnArea(area, 0.6f); } #endregion @@ -206,7 +203,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows private void apply_Click(object sender, EventArgs e) { - //refill TagLabels with table data + // Refill TagLabels with table data dataGridView.Sort(TagColumn, ListSortDirection.Ascending); General.Map.Options.TagLabels.Clear(); @@ -235,13 +232,13 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows int tag = (int)dataGridView.Rows[e.RowIndex].Cells[0].Value; if(e.ColumnIndex == 2) //sectors - { + { + // Deselect everything + General.Map.Map.ClearAllSelected(); + List<Sector> list = GetSectorsWithTag(tag, (int)dataGridView.Rows[e.RowIndex].Cells[2].Value); if(list.Count > 0) { - General.Map.Map.ClearSelectedSectors(); - General.Map.Map.ClearSelectedLinedefs(); - List<Vector2D> points = new List<Vector2D>(); General.Editing.ChangeMode("SectorsMode"); ClassicMode mode = (ClassicMode)General.Editing.Mode; @@ -259,15 +256,20 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows ShowSelection(points); } + else + { + General.Interface.RedrawDisplay(); + } } else if(e.ColumnIndex == 3) //linedefs - { + { + // Deselect everything + General.Map.Map.ClearAllSelected(); + List<Linedef> list = GetLinedefsWithTag(tag, (int)dataGridView.Rows[e.RowIndex].Cells[3].Value); if(list.Count > 0) { - General.Map.Map.ClearSelectedSectors(); - General.Map.Map.ClearSelectedLinedefs(); - + General.Editing.ChangeMode("LinedefsMode"); List<Vector2D> points = new List<Vector2D>(); foreach(Linedef l in list) { @@ -277,19 +279,24 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows } General.Map.Map.Update(); - General.Editing.ChangeMode("LinedefsMode"); ShowSelection(points); } + else + { + General.Interface.RedrawDisplay(); + } } else if(e.ColumnIndex == 4) //things - { + { + // Deselect everything + General.Map.Map.ClearAllSelected(); + List<Thing> list = GetThingsWithTag(tag, (int)dataGridView.Rows[e.RowIndex].Cells[4].Value); - if(list.Count > 0) + if(list.Count > 0) { - General.Map.Map.ClearSelectedThings(); - + General.Editing.ChangeMode("ThingsMode"); List<Vector2D> points = new List<Vector2D>(); - foreach(Thing t in list) + foreach(Thing t in list) { t.Selected = true; @@ -302,12 +309,13 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows } General.Map.Map.Update(); - General.Editing.ChangeMode("ThingsMode"); ShowSelection(points); } + else + { + General.Interface.RedrawDisplay(); + } } - - } else if(e.Button == MouseButtons.Right) //open properties window { @@ -347,84 +355,6 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows } } - private void dataGridView_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) - { - if(e.ColumnIndex < 2 || e.RowIndex == -1) return; - int tag = (int)dataGridView.Rows[e.RowIndex].Cells[0].Value; - - if(e.ColumnIndex == 2) //sectors - { - List<Sector> list = GetSectorsWithTag(tag, (int)dataGridView.Rows[e.RowIndex].Cells[2].Value); - if(list.Count > 0) - { - General.Map.Map.ClearSelectedSectors(); - General.Map.Map.ClearSelectedLinedefs(); - - List<Vector2D> points = new List<Vector2D>(); - foreach(Sector s in list) - { - s.Selected = true; - - foreach(Sidedef sd in s.Sidedefs) - { - points.Add(sd.Line.Start.Position); - points.Add(sd.Line.End.Position); - } - } - - General.Map.Map.Update(); - General.Editing.ChangeMode("SectorsMode"); - ShowSelection(points); - } - } - else if(e.ColumnIndex == 3) //linedefs - { - List<Linedef> list = GetLinedefsWithTag(tag, (int)dataGridView.Rows[e.RowIndex].Cells[3].Value); - if(list.Count > 0) - { - General.Map.Map.ClearSelectedSectors(); - General.Map.Map.ClearSelectedLinedefs(); - - List<Vector2D> points = new List<Vector2D>(); - foreach(Linedef l in list) - { - l.Selected = true; - points.Add(l.Start.Position); - points.Add(l.End.Position); - } - - General.Map.Map.Update(); - General.Editing.ChangeMode("LinedefsMode"); - ShowSelection(points); - } - } - else if(e.ColumnIndex == 4) //things - { - List<Thing> list = GetThingsWithTag(tag, (int)dataGridView.Rows[e.RowIndex].Cells[4].Value); - if(list.Count > 0) - { - General.Map.Map.ClearSelectedThings(); - - List<Vector2D> points = new List<Vector2D>(); - foreach(Thing t in list) - { - t.Selected = true; - - Vector2D p = t.Position; - points.Add(p); - points.Add(p + new Vector2D(t.Size * 2.0f, t.Size * 2.0f)); - points.Add(p + new Vector2D(t.Size * 2.0f, -t.Size * 2.0f)); - points.Add(p + new Vector2D(-t.Size * 2.0f, t.Size * 2.0f)); - points.Add(p + new Vector2D(-t.Size * 2.0f, -t.Size * 2.0f)); - } - - General.Map.Map.Update(); - General.Editing.ChangeMode("ThingsMode"); - ShowSelection(points); - } - } - } - private void TagStatisticsForm_FormClosing(object sender, FormClosingEventArgs e) { size = this.Size; diff --git a/Source/Core/GZBuilder/Windows/ThingStatisticsForm.Designer.cs b/Source/Core/GZBuilder/Windows/ThingStatisticsForm.Designer.cs index e3f58199e975955833b9cdc724532b00e90ad08a..7ff4a88b260acca1830523689f4c3dbfa5147999 100644 --- a/Source/Core/GZBuilder/Windows/ThingStatisticsForm.Designer.cs +++ b/Source/Core/GZBuilder/Windows/ThingStatisticsForm.Designer.cs @@ -157,7 +157,7 @@ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; this.MinimizeBox = false; this.Name = "ThingStatisticsForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.Text = "Thing statistics"; diff --git a/Source/Core/GZBuilder/Windows/ThingStatisticsForm.cs b/Source/Core/GZBuilder/Windows/ThingStatisticsForm.cs index 22eebf07f3515871ef33f67b1b414ea769735628..ed7b1c3b1cac4130030d1f5eabfcdf5ef3c1c4f4 100644 --- a/Source/Core/GZBuilder/Windows/ThingStatisticsForm.cs +++ b/Source/Core/GZBuilder/Windows/ThingStatisticsForm.cs @@ -111,11 +111,8 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows area.Inflate(100f, 100f); // Zoom to area - if(General.Editing.Mode is ClassicMode) - { - ClassicMode editmode = (General.Editing.Mode as ClassicMode); - editmode.CenterOnArea(area, 0.6f); - } + ClassicMode mode = General.Editing.Mode as ClassicMode; + if(mode != null) mode.CenterOnArea(area, 0.6f); } private void dataGridView_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) diff --git a/Source/Core/GZBuilder/md3/ModelReader.cs b/Source/Core/GZBuilder/md3/ModelReader.cs index bc831fefd4f8a9ee765999053e183c396d013770..a015e3508685b20939ddce053d9e75a790136c03 100644 --- a/Source/Core/GZBuilder/md3/ModelReader.cs +++ b/Source/Core/GZBuilder/md3/ModelReader.cs @@ -71,7 +71,6 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3 //done ms.Close(); - ms.Dispose(); break; } } @@ -126,7 +125,6 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3 } ms.Close(); - ms.Dispose(); //got errors? if(!String.IsNullOrEmpty(result.Errors)) @@ -912,7 +910,6 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3 Bitmap bitmap = fir.ReadAsBitmap(ms); ms.Close(); - ms.Dispose(); if(bitmap != null) { @@ -931,7 +928,6 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3 texture = Texture.FromStream(device, ms); ms.Close(); - ms.Dispose(); } return texture; diff --git a/Source/Core/General/Clock.cs b/Source/Core/General/Clock.cs index 85b39312d162fabbcbbbaf6d262e0088a025416b..a11efcf3cb406579f48b5a2054848db2012f8e58 100644 --- a/Source/Core/General/Clock.cs +++ b/Source/Core/General/Clock.cs @@ -21,6 +21,13 @@ namespace CodeImp.DoomBuilder public static class Clock { // This queries the system for the current time - public static float CurrentTime { get { return Configuration.Timer.ElapsedMilliseconds; } } + public static long CurrentTime { get { return Configuration.Timer.ElapsedMilliseconds; } } + + //mxd. Timer needs to be reset from time to time (like, every 2 days of continuously running the editor) to prevent float precision degradation. + internal static void Reset() + { + Configuration.Timer.Reset(); + Configuration.Timer.Start(); + } } } diff --git a/Source/Core/General/General.cs b/Source/Core/General/General.cs index 8307d02ddf1c330d04fd2c6c0a821d70101e9eee..a1bb5869d541edf68aea9d1750e4bd127091a483 100644 --- a/Source/Core/General/General.cs +++ b/Source/Core/General/General.cs @@ -21,6 +21,7 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; +using System.Globalization; using System.IO; using System.Reflection; using System.Runtime.InteropServices; @@ -68,22 +69,22 @@ namespace CodeImp.DoomBuilder [DllImport("user32.dll", SetLastError = true)] internal static extern bool MessageBeep(MessageBeepType type); - [DllImport("kernel32.dll")] - internal extern static IntPtr LoadLibrary(string filename); + //[DllImport("kernel32.dll")] + //internal extern static IntPtr LoadLibrary(string filename); - [DllImport("kernel32.dll")] - internal extern static bool FreeLibrary(IntPtr moduleptr); + //[DllImport("kernel32.dll")] + //internal extern static bool FreeLibrary(IntPtr moduleptr); - [DllImport("user32.dll")] - internal static extern IntPtr CreateWindowEx(uint exstyle, string classname, string windowname, uint style, + //[DllImport("user32.dll")] + /*internal static extern IntPtr CreateWindowEx(uint exstyle, string classname, string windowname, uint style, int x, int y, int width, int height, IntPtr parentptr, int menu, - IntPtr instanceptr, string param); + IntPtr instanceptr, string param);*/ - [DllImport("user32.dll")] - internal static extern bool DestroyWindow(IntPtr windowptr); + //[DllImport("user32.dll")] + //internal static extern bool DestroyWindow(IntPtr windowptr); - [DllImport("user32.dll")] - internal static extern int SetWindowPos(IntPtr windowptr, int insertafterptr, int x, int y, int cx, int cy, int flags); + //[DllImport("user32.dll")] + //internal static extern int SetWindowPos(IntPtr windowptr, int insertafterptr, int x, int y, int cx, int cy, int flags); [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern uint GetShortPathName([MarshalAs(UnmanagedType.LPTStr)] string longpath, [MarshalAs(UnmanagedType.LPTStr)]StringBuilder shortpath, uint buffersize); @@ -231,6 +232,7 @@ namespace CodeImp.DoomBuilder public static bool NoSettings { get { return nosettings; } } public static EditingManager Editing { get { return editing; } } public static ErrorLogger ErrorLogger { get { return errorlogger; } } + internal static int PendingUpdateRev; //mxd #endregion @@ -535,12 +537,14 @@ namespace CodeImp.DoomBuilder // Enable OS visual styles Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); //mxd - //Application.DoEvents(); // This must be here to work around a .NET bug - //ToolStripManager.Renderer = new ToolStripProfessionalRenderer(new TanColorTable()); + Application.SetCompatibleTextRenderingDefault(false); //mxd + //Application.DoEvents(); // This must be here to work around a .NET bug - // Hook to DLL loading failure event - AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; + //mxd. Set CultureInfo + Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; + + // Hook to DLL loading failure event + AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; // Set current thread name Thread.CurrentThread.Name = "Main Application"; @@ -993,7 +997,7 @@ namespace CodeImp.DoomBuilder // Terminate properly? if(properexit) { - General.WriteLogLine("Termination requested"); + General.WriteLogLine(PendingUpdateRev != 0 ? "Program update requested" : "Termination requested"); // Unbind static methods from actions General.Actions.UnbindMethods(typeof(General)); @@ -1018,7 +1022,14 @@ namespace CodeImp.DoomBuilder if(mainwindow != null) { mainwindow.Dispose(); mainwindow = null; } if(actions != null) { actions.Dispose(); actions = null; } if(types != null) { types.Dispose(); types = null; } - try { D3DDevice.Terminate(); } catch(Exception) { } + try { D3DDevice.Terminate(); } catch { } + + //mxd. Launch the updater? + if(PendingUpdateRev != 0) + { + General.WriteLogLine("Initiating update to R" + PendingUpdateRev + "..."); + Process.Start(Path.Combine(apppath, "Updater.exe"), "-rev " + PendingUpdateRev); + } // Application ends here and now General.WriteLogLine("Termination done"); @@ -1109,6 +1120,9 @@ namespace CodeImp.DoomBuilder } else mainwindow.DisplayReady(); + + //mxd. Also reset the clock... + MainWindow.ResetClock(); Cursor.Current = Cursors.Default; } @@ -1181,7 +1195,10 @@ namespace CodeImp.DoomBuilder openfile.Filter = "WAD Files (*.wad)|*.wad|All Files|*"; openfile.Title = "Open Map"; if(!string.IsNullOrEmpty(settings.LastUsedMapFolder) && Directory.Exists(settings.LastUsedMapFolder)) //mxd - openfile.InitialDirectory = settings.LastUsedMapFolder; //mxd + { + openfile.RestoreDirectory = true; + openfile.InitialDirectory = settings.LastUsedMapFolder; + } openfile.AddExtension = false; openfile.CheckFileExists = true; openfile.Multiselect = false; @@ -1338,9 +1355,9 @@ namespace CodeImp.DoomBuilder mainwindow.AddHintsDocker(); //mxd //mxd. Center map in screen or on stored coordinates. Done here to avoid the view jerking around when updating the interface. - if(Editing.Mode is ClassicMode) + ClassicMode mode = Editing.Mode as ClassicMode; + if(mode != null) { - ClassicMode mode = Editing.Mode as ClassicMode; if(options != null && options.ViewPosition.IsFinite() && !float.IsNaN(options.ViewScale)) mode.CenterOnCoordinates(options.ViewPosition, options.ViewScale); else @@ -1443,6 +1460,9 @@ namespace CodeImp.DoomBuilder Cursor.Current = Cursors.Default; } + //mxd. Also reset the clock... + MainWindow.ResetClock(); + return result; } @@ -1468,6 +1488,12 @@ namespace CodeImp.DoomBuilder savefile.OverwritePrompt = true; savefile.ValidateNames = true; savefile.FileName = map.FileTitle; //mxd + if(map.FilePathName.Length > 0) //mxd + { + savefile.RestoreDirectory = true; + savefile.InitialDirectory = Path.GetDirectoryName(map.FilePathName); + } + if(savefile.ShowDialog(mainwindow) == DialogResult.OK) { // Check if we're saving to the same file as the original. @@ -1521,6 +1547,10 @@ namespace CodeImp.DoomBuilder } savefile.Dispose(); + + //mxd. Also reset the clock... + MainWindow.ResetClock(); + return result; } @@ -1586,6 +1616,10 @@ namespace CodeImp.DoomBuilder } savefile.Dispose(); + + //mxd. Also reset the clock... + MainWindow.ResetClock(); + return result; } @@ -1750,13 +1784,17 @@ namespace CodeImp.DoomBuilder //mxd. This clamps angle between 0 and 359 public static int ClampAngle(int angle) { - return (angle + 360) % 360; + angle %= 360; + if(angle < 0) angle += 360; + return angle; } //mxd. This clamps angle between 0 and 359 public static float ClampAngle(float angle) { - return (angle + 360) % 360; + angle %= 360; + if(angle < 0) angle += 360; + return angle; } //mxd diff --git a/Source/Core/General/Launcher.cs b/Source/Core/General/Launcher.cs index 762ff71c51e6f0ec37d1f02768c715b89cdbaaa2..4d4f92cac58e6167b0c02bda2ef0ebc62dcd7a4a 100644 --- a/Source/Core/General/Launcher.cs +++ b/Source/Core/General/Launcher.cs @@ -387,6 +387,21 @@ namespace CodeImp.DoomBuilder // Clean up temp file CleanTempFile(General.Map); + if(General.Map != null) + { + // Device reset may be needed... + if(General.Editing.Mode is ClassicMode) + { + General.Map.Graphics.Reset(); + General.MainWindow.RedrawDisplay(); + } + /*else if(General.Editing.Mode is VisualMode) + { + General.MainWindow.StopExclusiveMouseInput(); + General.MainWindow.StartExclusiveMouseInput(); + }*/ + } + General.Plugins.OnMapSaveEnd(SavePurpose.Testing); General.MainWindow.FocusDisplay(); if(General.Editing.Mode is ClassicMode) General.MainWindow.RedrawDisplay(); diff --git a/Source/Core/General/MapManager.cs b/Source/Core/General/MapManager.cs index 4c73a207e3cd6517cdd583baef9c491edf5620f2..c962083d5dc04e2f498dcece1aa2beb9d7d301e7 100644 --- a/Source/Core/General/MapManager.cs +++ b/Source/Core/General/MapManager.cs @@ -48,6 +48,7 @@ namespace CodeImp.DoomBuilder internal const string TEMP_MAP_HEADER = "TEMPMAP"; internal const string BUILD_MAP_HEADER = "MAP01"; public const string CONFIG_MAP_HEADER = "~MAP"; + private const int REPLACE_TARGET_MAP = -1; //mxd #endregion @@ -400,8 +401,7 @@ namespace CodeImp.DoomBuilder // Copy the map lumps to the temp file General.WriteLogLine("Copying map lumps to temporary file..."); - CopyLumpsByType(mapwad, options.CurrentName, tempwad, TEMP_MAP_HEADER, - true, true, true, true); + CopyLumpsByType(mapwad, options.CurrentName, tempwad, TEMP_MAP_HEADER, REPLACE_TARGET_MAP, true, true, true, true); // Close the map file mapwad.Dispose(); @@ -426,6 +426,10 @@ namespace CodeImp.DoomBuilder //mxd. Sector textures may've been changed if(nameschanged) data.UpdateUsedTextures(); + //mxd. Flip linedefs with only back side + int flipsdone = MapSet.FlipBackwardLinedefs(map.Linedefs); + if(flipsdone > 0) General.WriteLogLine(flipsdone + " single-sided linedefs were flipped."); + // Update structures options.ApplyGridSettings(); map.UpdateConfiguration(); @@ -504,7 +508,7 @@ namespace CodeImp.DoomBuilder // Copy the map lumps to the temp file General.WriteLogLine("Copying map lumps to temporary file..."); - CopyLumpsByType(mapwad, options.CurrentName, tempwad, TEMP_MAP_HEADER, true, true, true, true); + CopyLumpsByType(mapwad, options.CurrentName, tempwad, TEMP_MAP_HEADER, REPLACE_TARGET_MAP, true, true, true, true); // Close the map file mapwad.Dispose(); @@ -535,16 +539,29 @@ namespace CodeImp.DoomBuilder // Restore selection groups options.ReadSelectionGroups(); - // Center map in screen or on stored coordinates - if(General.Editing.Mode is ClassicMode) + if(General.Editing.Mode != null) { - ClassicMode mode = General.Editing.Mode as ClassicMode; - mode.OnRedoEnd(); + if(General.Editing.Mode is ClassicMode) + { + ClassicMode mode = (ClassicMode)General.Editing.Mode; + mode.OnRedoEnd(); - if(options.ViewPosition.IsFinite() && !float.IsNaN(options.ViewScale)) - mode.CenterOnCoordinates(options.ViewPosition, options.ViewScale); - else - mode.CenterInScreen(); + // Center map in screen or on stored coordinates + if(options.ViewPosition.IsFinite() && !float.IsNaN(options.ViewScale)) + mode.CenterOnCoordinates(options.ViewPosition, options.ViewScale); + else + mode.CenterInScreen(); + } + else if(General.Editing.Mode is VisualMode) + { + VisualMode mode = (VisualMode)General.Editing.Mode; + + // This will rebuild blockmap, among the other things + General.Editing.Mode.OnReloadResources(); + + // Update camera position + if(options.ViewPosition.IsFinite()) mode.CenterOnCoordinates(options.ViewPosition); + } } // Success @@ -659,22 +676,25 @@ namespace CodeImp.DoomBuilder } } - // Do we need sidedefs compression? - if (map.Sidedefs.Count > io.MaxSidedefs) - { - // Compress sidedefs - General.MainWindow.DisplayStatus(StatusType.Busy, "Compressing sidedefs..."); - outputset.CompressSidedefs(); + // Do we need sidedefs compression? + if(map.Sidedefs.Count > io.MaxSidedefs) + { + // Compress sidedefs + int initialsidescount = outputset.Sidedefs.Count; //mxd + General.MainWindow.DisplayStatus(StatusType.Busy, "Compressing sidedefs..."); + outputset.CompressSidedefs(); - // Check if it still doesnt fit - if (outputset.Sidedefs.Count > io.MaxSidedefs) - { - // Problem! Can't save the map like this! - General.ShowErrorMessage("Unable to save the map: There are too many unique sidedefs!", MessageBoxButtons.OK); - General.MainWindow.DisplayStatus(oldstatus); - return false; - } - } + // Check if it still doesnt + if(outputset.Sidedefs.Count > io.MaxSidedefs) + { + // Problem! Can't save the map like this! + General.ShowErrorMessage("Unable to save the map: there are too many unique sidedefs!" + Environment.NewLine + Environment.NewLine + + "Sidedefs before compresion: " + initialsidescount + Environment.NewLine + + "Sidedefs after compresion: " + outputset.Sidedefs.Count, MessageBoxButtons.OK); + General.MainWindow.DisplayStatus(oldstatus); + return false; + } + } // Check things if (map.Things.Count > io.MaxThings) @@ -729,6 +749,20 @@ namespace CodeImp.DoomBuilder General.WriteLogLine("Saving map to file: " + newfilepathname); + //mxd. Official IWAD check... + WAD hashtest = new WAD(newfilepathname, true); + if(hashtest.IsOfficialIWAD) + { + General.WriteLogLine("Map saving aborted: attempt to modify official IWAD"); + General.ShowErrorMessage("Official IWADs should not be modified.\nConsider making a PWAD instead", MessageBoxButtons.OK); + return false; + } + else + { + hashtest.Dispose(); + hashtest = null; + } + // Scripts changed? bool localscriptschanged = CheckScriptChanged(); @@ -852,6 +886,7 @@ namespace CodeImp.DoomBuilder // Determine original map name string origmapname = (!string.IsNullOrEmpty(options.PreviousName) && purpose != SavePurpose.IntoFile) ? options.PreviousName : options.CurrentName; string origwadfile = string.Empty; //mxd + int mapheaderindex = REPLACE_TARGET_MAP; //mxd. Lump index of the map file header in the source WAD try { @@ -915,7 +950,7 @@ namespace CodeImp.DoomBuilder WAD origwad = new WAD(origwadfile, true); // Create new target file - targetwad = new WAD(newfilepathname); + targetwad = new WAD(newfilepathname) { IsIWAD = origwad.IsIWAD }; //mxd. Let's preserve wad type // Copy all lumps, except the original map GameConfiguration origcfg; //mxd @@ -927,9 +962,12 @@ namespace CodeImp.DoomBuilder { ConfigurationInfo ci = General.GetConfigurationInfo(origmapconfigname); origcfg = new GameConfiguration(ci.Configuration); + + // Needed only once! + origmapconfigname = configinfo.Filename; } - CopyAllLumpsExceptMap(origwad, targetwad, origcfg, origmapname); + mapheaderindex = CopyAllLumpsExceptMap(origwad, targetwad, origcfg, origmapname); // Close original file and delete it origwad.Dispose(); @@ -966,7 +1004,7 @@ namespace CodeImp.DoomBuilder } // Copy map lumps to target file - CopyLumpsByType(tempwad, TEMP_MAP_HEADER, targetwad, origmapname, true, true, includenodes, true); + CopyLumpsByType(tempwad, TEMP_MAP_HEADER, targetwad, origmapname, mapheaderindex, true, true, includenodes, true); // mxd. Was the map renamed? if(options.LevelNameChanged) @@ -1176,7 +1214,7 @@ namespace CodeImp.DoomBuilder // Copy lumps to buildwad General.WriteLogLine("Copying map lumps to temporary build file..."); - CopyLumpsByType(tempwad, TEMP_MAP_HEADER, buildwad, BUILD_MAP_HEADER, true, false, false, true); + CopyLumpsByType(tempwad, TEMP_MAP_HEADER, buildwad, BUILD_MAP_HEADER, REPLACE_TARGET_MAP, true, false, false, true); // Close buildwad buildwad.Dispose(); @@ -1221,7 +1259,7 @@ namespace CodeImp.DoomBuilder { // Copy nodebuilder lumps to temp file General.WriteLogLine("Copying nodebuilder lumps to temporary file..."); - CopyLumpsByType(buildwad, BUILD_MAP_HEADER, tempwad, TEMP_MAP_HEADER, false, false, true, false); + CopyLumpsByType(buildwad, BUILD_MAP_HEADER, tempwad, TEMP_MAP_HEADER, REPLACE_TARGET_MAP, false, false, true, false); } else { @@ -1377,7 +1415,7 @@ namespace CodeImp.DoomBuilder // Create new, emtpy lump General.WriteLogLine(lumpname + " is required! Created empty lump."); - target.Insert(lumpname, insertindex, 0); + target.Insert(lumpname, insertindex, 0, false); } else { @@ -1386,6 +1424,8 @@ namespace CodeImp.DoomBuilder } } } + + target.WriteHeaders(); //mxd } //mxd. This is called on tempwad, which should only have the current map inside it. @@ -1416,13 +1456,16 @@ namespace CodeImp.DoomBuilder foreach(Lump lump in toRemove) target.Remove(lump); } - // This copies all lumps, except those of a specific map - private static void CopyAllLumpsExceptMap(WAD source, WAD target, GameConfiguration mapconfig, string sourcemapname) + // This copies all lumps, except those of a specific map. mxd. Returns the index of skipped map's header lump + private static int CopyAllLumpsExceptMap(WAD source, WAD target, GameConfiguration mapconfig, string sourcemapname) { // Go for all lumps bool skipping = false; - foreach(Lump srclump in source.Lumps) + int headerpos = REPLACE_TARGET_MAP; //mxd + for(int i = 0; i < source.Lumps.Count; i++) { + Lump srclump = source.Lumps[i]; + // Check if we should stop skipping lumps here if(skipping) { @@ -1438,30 +1481,38 @@ namespace CodeImp.DoomBuilder } // Check if we should start skipping lumps here - if(!skipping && (srclump.Name == sourcemapname)) + //TODO: I see a big, but kinda esoteric problem here if the source has several maps with the same name (mxd) + if(!skipping && headerpos == REPLACE_TARGET_MAP && srclump.Name == sourcemapname) { // We have encountered the map header, start skipping! skipping = true; + headerpos = i; } // Not skipping this lump? if(!skipping) { // Copy lump over! - Lump tgtlump = target.Insert(srclump.Name, target.Lumps.Count, srclump.Length); + Lump tgtlump = target.Insert(srclump.Name, target.Lumps.Count, srclump.Length, false); srclump.CopyTo(tgtlump); } } + + target.WriteHeaders(); //mxd + + return headerpos; } // This copies specific map lumps from one WAD to another private void CopyLumpsByType(WAD source, string sourcemapname, WAD target, string targetmapname, + int targetheaderinsertindex, //mxd bool copyrequired, bool copyblindcopy, bool copynodebuild, bool copyscript) { - // Find the map header in target - int tgtheaderindex = target.FindLumpIndex(targetmapname); + // Find the map header in target (mxd. Or use the provided one) + bool replacetargetmap = (targetheaderinsertindex == REPLACE_TARGET_MAP); //mxd + int tgtheaderindex = (replacetargetmap ? target.FindLumpIndex(targetmapname) : targetheaderinsertindex); //mxd if(tgtheaderindex == -1) { // If this header doesnt exists in the target @@ -1491,20 +1542,27 @@ namespace CodeImp.DoomBuilder int sourceindex = FindSpecificLump(source, srclumpname, srcheaderindex, sourcemapname, config.MapLumps); if(sourceindex > -1) { - // Remove lump at target - int lumpindex = RemoveSpecificLump(target, tgtlumpname, tgtheaderindex, targetmapname, config.MapLumps); + //mxd. Don't do this when inserting a map (SaveMap() removes the old version of the map before calling CopyLumpsByType()) + if(replacetargetmap) + { + // Remove lump at target + int lumpindex = RemoveSpecificLump(target, tgtlumpname, tgtheaderindex, targetmapname, config.MapLumps); - // Determine target index - // When original lump was found and removed then insert at that position - // otherwise insert after last insertion position - if(lumpindex > -1) targetindex = lumpindex; else targetindex++; + // Determine target index + // When original lump was found and removed then insert at that position + // otherwise insert after last insertion position + if(lumpindex > -1) targetindex = lumpindex; else targetindex++; + } if(targetindex > target.Lumps.Count) targetindex = target.Lumps.Count; // Copy the lump to the target //General.WriteLogLine(srclumpname + " copying as " + tgtlumpname); Lump lump = source.Lumps[sourceindex]; - Lump newlump = target.Insert(tgtlumpname, targetindex, lump.Length); + Lump newlump = target.Insert(tgtlumpname, targetindex, lump.Length, false); lump.CopyTo(newlump); + + //mxd. We still need to increment targetindex... + if(!replacetargetmap) targetindex++; } else { @@ -1517,6 +1575,8 @@ namespace CodeImp.DoomBuilder } } } + + target.WriteHeaders(); //mxd } } @@ -1766,68 +1826,11 @@ namespace CodeImp.DoomBuilder General.MainWindow.UpdateGZDoomPanel(); } - [BeginAction("gztogglefog")] - internal void ToggleFog() - { - General.Settings.GZDrawFog = !General.Settings.GZDrawFog; - General.MainWindow.DisplayStatus(StatusType.Action, "Fog rendering is " + (General.Settings.GZDrawFog ? "ENABLED" : "DISABLED") + "."); - General.MainWindow.RedrawDisplay(); - General.MainWindow.UpdateGZDoomPanel(); - } - - [BeginAction("gztogglesky")] - internal void ToggleSky() - { - General.Settings.GZDrawSky = !General.Settings.GZDrawSky; - General.MainWindow.DisplayStatus(StatusType.Action, "Sky rendering is " + (General.Settings.GZDrawSky ? "ENABLED" : "DISABLED") + "."); - General.MainWindow.RedrawDisplay(); - General.MainWindow.UpdateGZDoomPanel(); - } - - [BeginAction("gztogglefx")] - internal void ToggleFx() - { - int on = 0; - on += General.Settings.GZDrawFog ? 1 : -1; - on += General.Settings.GZDrawSky ? 1 : -1; - on += General.Settings.GZDrawLightsMode != LightRenderMode.NONE ? 1 : -1; - on += General.Settings.GZDrawModelsMode != ModelRenderMode.NONE ? 1 : -1; - - bool enable = (on < 0); - - General.Settings.GZDrawFog = enable; - General.Settings.GZDrawSky = enable; - General.Settings.GZDrawLightsMode = (enable ? LightRenderMode.ALL : LightRenderMode.NONE); - General.Settings.GZDrawModelsMode = (enable ? ModelRenderMode.ALL : ModelRenderMode.NONE); - General.MainWindow.DisplayStatus(StatusType.Action, "Advanced effects are " + (enable ? "ENABLED" : "DISABLED") + "."); - - General.MainWindow.RedrawDisplay(); - General.MainWindow.UpdateGZDoomPanel(); - } - - [BeginAction("gztoggleeventlines")] - internal void ToggleEventLines() - { - General.Settings.GZShowEventLines = !General.Settings.GZShowEventLines; - General.MainWindow.DisplayStatus(StatusType.Action, "Event lines are " + (General.Settings.GZShowEventLines ? "ENABLED" : "DISABLED") + "."); - General.MainWindow.RedrawDisplay(); - General.MainWindow.UpdateGZDoomPanel(); - } - - [BeginAction("gztogglevisualvertices")] - internal void ToggleVisualVertices() - { - General.Settings.GZShowVisualVertices = !General.Settings.GZShowVisualVertices; - General.MainWindow.DisplayStatus(StatusType.Action, "Visual vertices are " + (General.Settings.GZShowVisualVertices ? "ENABLED" : "DISABLED") + "."); - General.MainWindow.RedrawDisplay(); - General.MainWindow.UpdateGZDoomPanel(); - } - - [BeginAction("gzreloadmodeldef")] - internal void ReloadModeldef() - { - data.ReloadModeldef(); - } + [BeginAction("gzreloadmodeldef")] + internal void ReloadModeldef() + { + data.ReloadModeldef(); + } [BeginAction("gzreloadgldefs")] internal void ReloadGldefs() @@ -2357,7 +2360,13 @@ namespace CodeImp.DoomBuilder General.Plugins.ReloadResources(); // Inform editing mode that the resources are reloaded - if(General.Editing.Mode != null) General.Editing.Mode.OnReloadResources(); + if(General.Editing.Mode != null) + { + General.Editing.Mode.OnReloadResources(); + + //mxd. Also Check appropriate button on interface + General.MainWindow.CheckEditModeButton(General.Editing.Mode.EditModeButtonName); + } // Reset status General.MainWindow.DisplayStatus(oldstatus); @@ -2502,12 +2511,6 @@ namespace CodeImp.DoomBuilder return io.GetType() == t; } - //mxd - public SizeF GetTextSize(string text, float scale) - { - return graphics.Font.GetTextSize(text, scale); - } - //mxd [BeginAction("snapvertstogrid")] private void SnapSelectedMapElementsToGrid() diff --git a/Source/Core/General/UpdateChecker.cs b/Source/Core/General/UpdateChecker.cs index 1bd87f687215490bb8f2ea1c89f65ca82af6e34e..3f0a3388278faf16c011ce50fab4358905587f74 100644 --- a/Source/Core/General/UpdateChecker.cs +++ b/Source/Core/General/UpdateChecker.cs @@ -66,27 +66,23 @@ namespace CodeImp.DoomBuilder // Get remote revision number int remoterev; - using(MemoryStream stream = DownloadWebFile(Path.Combine(url, "Version.txt"))) + MemoryStream stream = DownloadWebFile(Path.Combine(url, "Version.txt")); + if(stream == null) { - if(stream == null) - { - e.Result = "Update check failed: failed to retrieve remote revision info."; - e.Cancel = true; - return; - } + e.Cancel = true; + return; + } - string s; - using(StreamReader reader = new StreamReader(stream)) - { - s = reader.ReadToEnd(); - } + string s; + using(StreamReader reader = new StreamReader(stream)) + { + s = reader.ReadToEnd(); + } - if(!int.TryParse(s, out remoterev)) - { - e.Result = "Update check failed: failed to retrieve remote revision number."; - e.Cancel = true; - return; - } + if(!int.TryParse(s, out remoterev)) + { + e.Cancel = true; + return; } if(remoterev > localrev) diff --git a/Source/Core/Geometry/Angle2D.cs b/Source/Core/Geometry/Angle2D.cs index 36a8bb1b39a327d234d8d095137183b909eec639..bbf84eeb61792fa39d738b19cb6d0e1ef7fef4a4 100644 --- a/Source/Core/Geometry/Angle2D.cs +++ b/Source/Core/Geometry/Angle2D.cs @@ -82,6 +82,53 @@ namespace CodeImp.DoomBuilder.Geometry // Return result return d; } + + //mxd. Slade 3 MathStuff::angle2DRad ripoff... + //Returns the angle between the 2d points [p1], [p2] and [p3] + public static float GetAngle(Vector2D p1, Vector2D p2, Vector2D p3) + { + // From: http://stackoverflow.com/questions/3486172/angle-between-3-points + // modified not to bother converting to degrees + Vector2D ab = new Vector2D(p2.x - p1.x, p2.y - p1.y); + Vector2D cb = new Vector2D(p2.x - p3.x, p2.y - p3.y); + + // dot product + float dot = (ab.x * cb.x + ab.y * cb.y); + + // length square of both vectors + float abSqr = ab.x * ab.x + ab.y * ab.y; + float cbSqr = cb.x * cb.x + cb.y * cb.y; + + // square of cosine of the needed angle + float cosSqr = dot * dot / abSqr / cbSqr; + + // this is a known trigonometric equality: + // cos(alpha * 2) = [ cos(alpha) ]^2 * 2 - 1 + float cos2 = 2.0f * cosSqr - 1.0f; + + // Here's the only invocation of the heavy function. + // It's a good idea to check explicitly if cos2 is within [-1 .. 1] range + float alpha2 = + (cos2 <= -1) ? PI : + (cos2 >= 1) ? 0.0f : + (float)Math.Acos(cos2); + + float rs = alpha2 * 0.5f; + + // Now revolve the ambiguities. + // 1. If dot product of two vectors is negative - the angle is definitely + // above 90 degrees. Still we have no information regarding the sign of the angle. + + // NOTE: This ambiguity is the consequence of our method: calculating the cosine + // of the double angle. This allows us to get rid of calling sqrt. + if(dot < 0) rs = PI - rs; + + // 2. Determine the sign. For this we'll use the Determinant of two vectors. + float det = (ab.x * cb.y - ab.y * cb.x); + if(det < 0) rs = (2.0f * PI) - rs; + + return rs; + } #endregion } diff --git a/Source/Core/Geometry/EarClipPolygon.cs b/Source/Core/Geometry/EarClipPolygon.cs index c2379481f18b810785b1894c383504fb8bf7f6ac..838d7d39b20b07d67b12c3d6b9fffe1e501758ca 100644 --- a/Source/Core/Geometry/EarClipPolygon.cs +++ b/Source/Core/Geometry/EarClipPolygon.cs @@ -109,44 +109,35 @@ namespace CodeImp.DoomBuilder.Geometry } // Point inside the polygon? - // See: http://local.wasp.uwa.edu.au/~pbourke/geometry/insidepoly/ + // See: http://paulbourke.net/geometry/polygonmesh/index.html#insidepoly public bool Intersect(Vector2D p) { Vector2D v1 = base.Last.Value.Position; LinkedListNode<EarClipVertex> n = base.First; uint c = 0; + Vector2D v2; // Go for all vertices while(n != null) { // Get next vertex - Vector2D v2 = n.Value.Position; - - // Determine min/max values - float miny = Math.Min(v1.y, v2.y); - float maxy = Math.Max(v1.y, v2.y); - float maxx = Math.Max(v1.x, v2.x); + v2 = n.Value.Position; // Check for intersection - if((p.y > miny) && (p.y <= maxy)) - { - if(p.x <= maxx) - { - if(v1.y != v2.y) - { - float xint = (p.y - v1.y) * (v2.x - v1.x) / (v2.y - v1.y) + v1.x; - if((v1.x == v2.x) || (p.x <= xint)) c++; - } - } - } - + if(v1.y != v2.y //mxd. If line is not horizontal... + && p.y > (v1.y < v2.y ? v1.y : v2.y) //mxd. ...And test point y intersects with the line y bounds... + && p.y <= (v1.y > v2.y ? v1.y : v2.y) //mxd + && (p.x < (v1.x < v2.x ? v1.x : v2.x) || (p.x <= (v1.x > v2.x ? v1.x : v2.x) //mxd. ...And test point x is to the left of the line, or is inside line x bounds and intersects it + && (v1.x == v2.x || p.x <= ((p.y - v1.y) * (v2.x - v1.x) / (v2.y - v1.y) + v1.x))))) + c++; //mxd. ...Count the line as crossed + // Move to next v1 = v2; n = n.Next; } - // Inside this polygon? - if((c & 0x00000001UL) != 0) + // Inside this polygon when we crossed odd number of polygon lines + if(c % 2 != 0) { // Check if not inside the children foreach(EarClipPolygon child in children) @@ -158,11 +149,9 @@ namespace CodeImp.DoomBuilder.Geometry // Inside polygon! return true; } - else - { - // Not inside the polygon - return false; - } + + // Not inside the polygon + return false; } // This inserts a polygon if it is a child of this one diff --git a/Source/Core/Geometry/InterpolationTools.cs b/Source/Core/Geometry/InterpolationTools.cs index 7d8f2fb9cbfd79938f984da92e2afcfba93cf8e3..79ae9d111fe8c082d1b29111d058f44f8ead6254 100644 --- a/Source/Core/Geometry/InterpolationTools.cs +++ b/Source/Core/Geometry/InterpolationTools.cs @@ -13,7 +13,7 @@ namespace CodeImp.DoomBuilder.Geometry EASE_OUT_SINE, } - public static int Interpolate(float val1, float val2, float delta, Mode mode) + public static float Interpolate(float val1, float val2, float delta, Mode mode) { switch(mode) { @@ -26,45 +26,56 @@ namespace CodeImp.DoomBuilder.Geometry } //Based on Robert Penner's original easing equations (http://www.robertpenner.com/easing/) - public static int Linear(float val1, float val2, float delta) + public static float Linear(float val1, float val2, float delta) { - return (int)Math.Round(delta * val2 + (1.0f - delta) * val1); + return delta * val2 + (1.0f - delta) * val1; } /** * Easing equation function for a sinusoidal (sin(t)) easing in: accelerating from zero velocity. */ - public static int EaseInSine(float val1, float val2, float delta) + public static float EaseInSine(float val1, float val2, float delta) { float f_val1 = val1; float f_val2 = val2 - f_val1; - return (int)Math.Round(-f_val2 * Math.Cos(delta * Angle2D.PIHALF) + f_val2 + f_val1); + return -f_val2 * (float)Math.Cos(delta * Angle2D.PIHALF) + f_val2 + f_val1; } /** * Easing equation function for a sinusoidal (sin(t)) easing out: decelerating from zero velocity. */ - public static int EaseOutSine(float val1, float val2, float delta) + public static float EaseOutSine(float val1, float val2, float delta) { - return (int)Math.Round((val2 - val1) * Math.Sin(delta * Angle2D.PIHALF) + val1); + return (val2 - val1) * (float)Math.Sin(delta * Angle2D.PIHALF) + val1; } /** * Easing equation function for a sinusoidal (sin(t)) easing in/out: acceleration until halfway, then deceleration. */ - public static int EaseInOutSine(float val1, float val2, float delta) + public static float EaseInOutSine(float val1, float val2, float delta) { - return (int)Math.Round(-(val2 - val1) / 2 * (float)(Math.Cos(Math.PI * delta) - 1) + val1); + return -(val2 - val1) / 2 * (float)(Math.Cos(Angle2D.PI * delta) - 1) + val1; } //mxd - public static int InterpolateColor(PixelColor c1, PixelColor c2, float delta) + public static PixelColor InterpolateColor(PixelColor c1, PixelColor c2, float delta) { float invdelta = 1.0f - delta; - byte r = (byte)(c1.r * delta + c2.r * invdelta); - byte g = (byte)(c1.g * delta + c2.g * invdelta); - byte b = (byte)(c1.b * delta + c2.b * invdelta); - return new PixelColor(255, r, g, b).ToInt(); + byte a = (byte)(c1.a * invdelta + c2.a * delta); + byte r = (byte)(c1.r * invdelta + c2.r * delta); + byte g = (byte)(c1.g * invdelta + c2.g * delta); + byte b = (byte)(c1.b * invdelta + c2.b * delta); + return new PixelColor(a, r, g, b); + } + + //mxd + public static PixelColor InterpolateColor(PixelColor c1, PixelColor c2, float delta, Mode mode) + { + byte a = (byte)Math.Round(Interpolate(c1.a, c2.a, delta, mode)); + byte r = (byte)Math.Round(Interpolate(c1.r, c2.r, delta, mode)); + byte g = (byte)Math.Round(Interpolate(c1.g, c2.g, delta, mode)); + byte b = (byte)Math.Round(Interpolate(c1.b, c2.b, delta, mode)); + return new PixelColor(a, r, g, b); } } } diff --git a/Source/Core/Geometry/Line2D.cs b/Source/Core/Geometry/Line2D.cs index abd147940c8cfaef55498816b43354e1f099da3f..61e4db9b6b27f205dbece55075b6b02aa6d775c8 100644 --- a/Source/Core/Geometry/Line2D.cs +++ b/Source/Core/Geometry/Line2D.cs @@ -17,6 +17,7 @@ #region ================== Namespaces using System; +using CodeImp.DoomBuilder.Map; #endregion @@ -65,6 +66,13 @@ namespace CodeImp.DoomBuilder.Geometry this.v1 = new Vector2D(x1, y1); this.v2 = new Vector2D(x2, y2); } + + //mxd. Constructor + public Line2D(Linedef line) + { + this.v1 = line.Start.Position; + this.v2 = line.End.Position; + } #endregion @@ -107,11 +115,35 @@ namespace CodeImp.DoomBuilder.Geometry public static bool GetIntersection(Vector2D v1, Vector2D v2, float x3, float y3, float x4, float y4, out float u_ray) { float u_line; - return GetIntersection(v1, v2, x3, y3, x4, y4, out u_ray, out u_line); + return GetIntersection(v1, v2, x3, y3, x4, y4, out u_ray, out u_line, true); + } + + //mxd. This tests if the line intersects with the given line coordinates + public static bool GetIntersection(Vector2D v1, Vector2D v2, float x3, float y3, float x4, float y4, out float u_ray, bool bounded) + { + float u_line; + return GetIntersection(v1, v2, x3, y3, x4, y4, out u_ray, out u_line, bounded); + } + + //mxd. Gets intersection point between given lines + public static Vector2D GetIntersectionPoint(Line2D line1, Line2D line2, bool bounded) + { + float u_ray, u_line; + if(GetIntersection(line1.v1, line1.v2, line2.v1.x, line2.v1.y, line2.v2.x, line2.v2.y, out u_ray, out u_line, bounded)) + return GetCoordinatesAt(line2.v1, line2.v2, u_ray); + + // No dice... + return new Vector2D(float.NaN, float.NaN); } // This tests if the line intersects with the given line coordinates public static bool GetIntersection(Vector2D v1, Vector2D v2, float x3, float y3, float x4, float y4, out float u_ray, out float u_line) + { + return GetIntersection(v1, v2, x3, y3, x4, y4, out u_ray, out u_line, true); + } + + // This tests if the line intersects with the given line coordinates + public static bool GetIntersection(Vector2D v1, Vector2D v2, float x3, float y3, float x4, float y4, out float u_ray, out float u_line, bool bounded) { // Calculate divider float div = (y4 - y3) * (v2.x - v1.x) - (x4 - x3) * (v2.y - v1.y); @@ -126,7 +158,7 @@ namespace CodeImp.DoomBuilder.Geometry u_ray = ((v2.x - v1.x) * (v1.y - y3) - (v2.y - v1.y) * (v1.x - x3)) / div; // Return if intersecting - if(u_ray < 0.0f || u_ray > 1.0f || u_line < 0.0f || u_line > 1.0f) return false; //mxd + if(bounded && (u_ray < 0.0f || u_ray > 1.0f || u_line < 0.0f || u_line > 1.0f)) return false; //mxd return true; } @@ -229,7 +261,12 @@ namespace CodeImp.DoomBuilder.Geometry public bool GetIntersection(float x3, float y3, float x4, float y4, out float u_ray) { - return Line2D.GetIntersection(v1, v2, x3, y3, x4, y4, out u_ray); + return Line2D.GetIntersection(v1, v2, x3, y3, x4, y4, out u_ray, true); + } + + public bool GetIntersection(float x3, float y3, float x4, float y4, out float u_ray, bool bounded) + { + return Line2D.GetIntersection(v1, v2, x3, y3, x4, y4, out u_ray, bounded); } public bool GetIntersection(float x3, float y3, float x4, float y4, out float u_ray, out float u_line) @@ -244,7 +281,12 @@ namespace CodeImp.DoomBuilder.Geometry public bool GetIntersection(Line2D ray, out float u_ray) { - return Line2D.GetIntersection(v1, v2, ray.v1.x, ray.v1.y, ray.v2.x, ray.v2.y, out u_ray); + return Line2D.GetIntersection(v1, v2, ray.v1.x, ray.v1.y, ray.v2.x, ray.v2.y, out u_ray, true); + } + + public bool GetIntersection(Line2D ray, out float u_ray, bool bounded) + { + return Line2D.GetIntersection(v1, v2, ray.v1.x, ray.v1.y, ray.v2.x, ray.v2.y, out u_ray, bounded); } public bool GetIntersection(Line2D ray, out float u_ray, out float u_line) diff --git a/Source/Core/Geometry/LinedefSide.cs b/Source/Core/Geometry/LinedefSide.cs index a4768b6e86cafcfcd83169b7f1740397f6212bcc..3704865151d3f7c1189fb47a7fa0430254157329 100644 --- a/Source/Core/Geometry/LinedefSide.cs +++ b/Source/Core/Geometry/LinedefSide.cs @@ -35,6 +35,7 @@ namespace CodeImp.DoomBuilder.Geometry private Linedef line; private bool front; + private bool ignore; //mxd #endregion @@ -42,6 +43,7 @@ namespace CodeImp.DoomBuilder.Geometry public Linedef Line { get { return line; } set { line = value; } } public bool Front { get { return front; } set { front = value; } } + public bool Ignore { get { return ignore; } set { ignore = value; } } //mxd #endregion @@ -103,6 +105,16 @@ namespace CodeImp.DoomBuilder.Geometry return (this.line == other.line) && (this.front == other.front); } +#if DEBUG + //mxd. Useful when debugging... + public override string ToString() + { + Sidedef side = (front ? line.Front : line.Back); + Sector sector = (side != null ? side.Sector : null); + return line + " (" + (front ? "front" : "back") + ")" + (sector != null ? ", Sector " + sector.Index : ", no sector"); + } +#endif + #endregion } } diff --git a/Source/Core/Geometry/Plane.cs b/Source/Core/Geometry/Plane.cs index 23d3e87a155a0f7666a389e92bf13337f63c3cff..98bc79fdb76483995ea4454b5b05e890e5bc199f 100644 --- a/Source/Core/Geometry/Plane.cs +++ b/Source/Core/Geometry/Plane.cs @@ -144,8 +144,7 @@ namespace CodeImp.DoomBuilder.Geometry /// </summary> public Vector3D ClosestOnPlane(Vector3D p) { - float d = this.Distance(p); - return p - normal * d; + return p - normal * this.Distance(p); } /// <summary> @@ -171,7 +170,37 @@ namespace CodeImp.DoomBuilder.Geometry { return new Plane(-normal, -offset); } + + //mxd. Addeed to make compiler a bit more happy... + public override int GetHashCode() + { + return base.GetHashCode(); + } + + //mxd. Addeed to make compiler a bit more happy... + public override bool Equals(object obj) + { + if(!(obj is Plane)) return false; + Plane other = (Plane)obj; + return (normal != other.normal) || (offset != other.offset); + } #endregion + + #region ================== Statics (mxd) + + // This compares a vector + public static bool operator ==(Plane a, Plane b) + { + return (a.normal == b.normal) && (a.offset == b.offset); + } + + // This compares a vector + public static bool operator !=(Plane a, Plane b) + { + return (a.normal != b.normal) || (a.offset != b.offset); + } + + #endregion } } diff --git a/Source/Core/Geometry/Tools.cs b/Source/Core/Geometry/Tools.cs index fa6312187322eac68f1c141c32b0f417ab3533e9..118ba3965670a9228c79674fe1636b6038f0d70a 100644 --- a/Source/Core/Geometry/Tools.cs +++ b/Source/Core/Geometry/Tools.cs @@ -59,6 +59,9 @@ namespace CodeImp.DoomBuilder.Geometry #endregion #region ================== Constants + + //mxd + private const float MINIMUM_INTERSECTION_DISTANCE = 0.25f; #endregion @@ -222,8 +225,13 @@ namespace CodeImp.DoomBuilder.Geometry LinedefTracePath tracepath = new LinedefTracePath(innerlines); EarClipPolygon innerpoly = tracepath.MakePolygon(true); + //mxd. Check bbox first... + Vector2D foundsidepoint = foundline.GetSidePoint(foundlinefront); + RectangleF innerbbox = innerpoly.CreateBBox(); + bool outsidebbox = (foundsidepoint.x < innerbbox.Left || foundsidepoint.x > innerbbox.Right || foundsidepoint.y < innerbbox.Top || foundsidepoint.y > innerbbox.Bottom); + // Check if the front of the line is outside the polygon - if(!innerpoly.Intersect(foundline.GetSidePoint(foundlinefront))) + if(outsidebbox || !innerpoly.Intersect(foundsidepoint)) { // Valid hole found! alllines.AddRange(innerlines); @@ -243,6 +251,7 @@ namespace CodeImp.DoomBuilder.Geometry { Linedef scanline = line; bool scanfront = front; + Vector2D sidepoint = line.GetSidePoint(front); //mxd do { @@ -254,8 +263,12 @@ namespace CodeImp.DoomBuilder.Geometry LinedefTracePath tracepath = new LinedefTracePath(pathlines); EarClipPolygon poly = tracepath.MakePolygon(true); + //mxd. Check bbox first... + RectangleF bbox = poly.CreateBBox(); + bool outsidebbox = (sidepoint.x < bbox.Left || sidepoint.x > bbox.Right || sidepoint.y < bbox.Top || sidepoint.y > bbox.Bottom); + // Check if the front of the line is inside the polygon - if(poly.Intersect(line.GetSidePoint(front))) + if(!outsidebbox && poly.Intersect(sidepoint)) { // Outer lines found! alllines.AddRange(pathlines); @@ -279,11 +292,11 @@ namespace CodeImp.DoomBuilder.Geometry // path we received from FindClosestPath! if(foundv == null) throw new Exception("FAIL!"); - // From the right-most vertex trace outward to the right to - // find the next closest linedef, this is based on the idea that - // all sectors are closed. - Vector2D lineoffset = new Vector2D(100.0f, 0.0f); - Line2D testline = new Line2D(foundv.Position, foundv.Position + lineoffset); + // From the right-most vertex trace outward to the right to find the next closest linedef, + // this is based on the idea that all sectors are closed. + + //mxd. Intersection test is bounded, so extend end position x to the right map boundary + Line2D testline = new Line2D(foundv.Position, new Vector2D(General.Map.Config.RightBoundary, foundv.Position.y)); scanline = null; float foundu = float.MaxValue; @@ -302,10 +315,25 @@ namespace CodeImp.DoomBuilder.Geometry // Check if this linedef intersects our test line at a closer range float thisu; ld.Line.GetIntersection(testline, out thisu); - if((thisu > 0.00001f) && (thisu < foundu) && !float.IsNaN(thisu)) + if(!float.IsNaN(thisu) && (thisu > 0.00001f)) { - scanline = ld; - foundu = thisu; + if(thisu < foundu) + { + scanline = ld; + foundu = thisu; + } + //mxd. Special cases: when foundv.y matches ld's start or end y, + // prefer the line, which is clser to being parallel to the x axis + else if(scanline != null && Math.Round(thisu, 4) == Math.Round(foundu, 4)) + { + float ldanglerel, scanlineanglerel; + if(GetRelativeAngle(ld, foundv.Position, out ldanglerel) + && GetRelativeAngle(scanline, foundv.Position, out scanlineanglerel) + && (ldanglerel < scanlineanglerel)) + { + scanline = ld; // foundu already matches + } + } } } } @@ -333,6 +361,26 @@ namespace CodeImp.DoomBuilder.Geometry while(true); } + //mxd. Gets angle between pos and l when pos.y matches l.Start.Position.y or l.End.Position.y + private static bool GetRelativeAngle(Linedef l, Vector2D pos, out float result) + { + if(l.Start.Position.y == pos.y) + { + result = Angle2D.GetAngle(pos, l.Start.Position, l.End.Position); + return true; + } + + if(l.End.Position.y == pos.y) + { + result = Angle2D.GetAngle(pos, l.End.Position, l.Start.Position); + return true; + } + + // We just don't know... + result = float.MaxValue; + return false; + } + /// <summary> /// This finds the closest path from the beginning of a line to the end of the line. /// When turnatends is true, the algorithm will continue at the other side of the @@ -359,7 +407,6 @@ namespace CodeImp.DoomBuilder.Geometry { // Add line to path path.Add(new LinedefSide(nextline, nextfront)); - if(!tracecount.ContainsKey(nextline)) tracecount.Add(nextline, 1); else tracecount[nextline]++; // Determine next vertex to use Vertex v = nextfront ? nextline.End : nextline.Start; @@ -390,12 +437,29 @@ namespace CodeImp.DoomBuilder.Geometry Linedef prevline = nextline; nextline = (lines[0] == nextline ? lines[1] : lines[0]); + //mxd. Try to pick a line with lower tracecount, otherwise we will just walk the same path trise + int curcount = (!tracecount.ContainsKey(nextline) ? 0 : tracecount[nextline]); + + //mxd. Don't pick a different line for start and end lines, otherwise the path can go away from it instead of closing the path + //mxd. Also don't pick a different line for marked lines (these are newly drawn lines, and we don't want to skip them) + if(curcount > 0 && !nextline.Marked && nextline != startline && nextline != endline) + { + foreach(Linedef l in lines) + { + if(l != nextline && l != prevline && (!tracecount.ContainsKey(l) || tracecount[l] < curcount)) + { + nextline = l; + break; + } + } + } + // Are we allowed to trace this line again? if(!tracecount.ContainsKey(nextline) || (tracecount[nextline] < 3)) { // Check if front side changes - if((prevline.Start == nextline.Start) || - (prevline.End == nextline.End)) nextfront = !nextfront; + if(prevline.Start == nextline.Start || prevline.End == nextline.End) + nextfront = !nextfront; } else { @@ -403,6 +467,9 @@ namespace CodeImp.DoomBuilder.Geometry path = null; } } + + //mxd. Increase trace count + if(!tracecount.ContainsKey(nextline)) tracecount.Add(nextline, 1); else tracecount[nextline]++; } // Continue as long as we have not reached the start yet // or we have no next line to trace @@ -551,14 +618,8 @@ namespace CodeImp.DoomBuilder.Geometry newsector.Brightness = General.Settings.DefaultBrightness; } - //mxd. Better any height than none - if (newsector.CeilHeight - newsector.FloorHeight <= 0) - { - newsector.CeilHeight = newsector.FloorHeight + (General.Settings.DefaultCeilingHeight - General.Settings.DefaultFloorHeight); - } - - //mxd. Apply overrides? - if (useOverrides) + //mxd. Apply overrides? + if(useOverrides) { if(General.Map.Options.OverrideCeilingTexture) newsector.SetCeilTexture(General.Map.Options.DefaultCeilingTexture); if(General.Map.Options.OverrideFloorTexture) newsector.SetFloorTexture(General.Map.Options.DefaultFloorTexture); @@ -566,6 +627,11 @@ namespace CodeImp.DoomBuilder.Geometry if(General.Map.Options.OverrideFloorHeight) newsector.FloorHeight = General.Map.Options.CustomFloorHeight; if(General.Map.Options.OverrideBrightness) newsector.Brightness = General.Map.Options.CustomBrightness; } + //mxd. Avoid invalid height + else if(newsector.CeilHeight < newsector.FloorHeight) + { + newsector.CeilHeight = newsector.FloorHeight; + } // Go for all sides to make sidedefs foreach(LinedefSide ls in alllines) @@ -901,6 +967,11 @@ namespace CodeImp.DoomBuilder.Geometry List<Vertex> nonmergeverts = new List<Vertex>(General.Map.Map.Vertices); MapSet map = General.Map.Map; + //mxd. Let's use a blockmap... + RectangleF area = MapSet.CreateArea(oldlines); + BlockMap<BlockEntry> oldlinesmap = new BlockMap<BlockEntry>(area); + oldlinesmap.AddLinedefsSet(oldlines); + General.Map.Map.ClearAllMarks(false); // Any points to do? @@ -945,7 +1016,7 @@ namespace CodeImp.DoomBuilder.Geometry // Check if any other lines intersect this line List<float> intersections = new List<float>(); Line2D measureline = ld.Line; - Dictionary<Linedef, bool> processed = new Dictionary<Linedef, bool>(); //mxd + HashSet<Linedef> processed = new HashSet<Linedef>(); //mxd //mxd foreach(Sector s in map.Sectors) @@ -955,17 +1026,30 @@ namespace CodeImp.DoomBuilder.Geometry { foreach(Sidedef side in s.Sidedefs) { - if(processed.ContainsKey(side.Line)) continue; + if(processed.Contains(side.Line)) continue; if(side.Line == ld) continue; float u; if(side.Line.Line.GetIntersection(measureline, out u)) { if(float.IsNaN(u) || (u <= 0.0f) || (u >= 1.0f)) continue; - intersections.Add(u); + + //mxd. Skip intersection if both start and end of one line are closer than given distance from the other line. + // This allows to avoid creating "unexpected" splits when drawing on top of non-cardinal lines. + + //mxd. Check if both ends of measureline are too close to side.Line.Line + bool valid = (side.Line.Line.GetDistanceToLineSq(measureline.v1, true) > MINIMUM_INTERSECTION_DISTANCE || + side.Line.Line.GetDistanceToLineSq(measureline.v2, true) > MINIMUM_INTERSECTION_DISTANCE); + + //mxd. Check if both ends of side.Line.Line are too close to measureline + valid = (valid && (measureline.GetDistanceToLineSq(side.Line.Line.v1, true) > MINIMUM_INTERSECTION_DISTANCE || + measureline.GetDistanceToLineSq(side.Line.Line.v2, true) > MINIMUM_INTERSECTION_DISTANCE)); + + // Store inersection + if(valid) intersections.Add(u); } - processed.Add(side.Line, false); + processed.Add(side.Line); } } } @@ -1032,7 +1116,7 @@ namespace CodeImp.DoomBuilder.Geometry foreach(Linedef ld in newlines) { Vector2D ldcp = ld.GetCenterPoint(); - Linedef nld = MapSet.NearestLinedef(oldlines, ldcp); + Linedef nld = MapSet.NearestLinedef(oldlinesmap, ldcp); //mxd. Lines collection -> Blockmap if(nld != null) { float ldside = nld.SideOfLine(ldcp); @@ -1069,7 +1153,7 @@ namespace CodeImp.DoomBuilder.Geometry List<LinedefSide> endpoints = new List<LinedefSide>(); // Find out where the start will stitch and create test points - Linedef l1 = MapSet.NearestLinedefRange(oldlines, firstline.Start.Position, MapSet.STITCH_DISTANCE); + Linedef l1 = MapSet.NearestLinedefRange(oldlinesmap, firstline.Start.Position, MapSet.STITCH_DISTANCE); //mxd. Lines collection -> Blockmap Vertex vv1 = null; if(l1 != null) { @@ -1094,7 +1178,7 @@ namespace CodeImp.DoomBuilder.Geometry } // Find out where the end will stitch and create test points - Linedef l2 = MapSet.NearestLinedefRange(oldlines, lastline.End.Position, MapSet.STITCH_DISTANCE); + Linedef l2 = MapSet.NearestLinedefRange(oldlinesmap, lastline.End.Position, MapSet.STITCH_DISTANCE); //mxd. Lines collection -> Blockmap Vertex vv2 = null; if(l2 != null) { @@ -1571,7 +1655,7 @@ namespace CodeImp.DoomBuilder.Geometry else if(l.Front.LowRequired() && l.Front.LongLowTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(l.Front.LongLowTexture)) texture = General.Map.Data.GetTextureImage(l.Front.LongLowTexture); - if(texture != null) + if(texture != null && texture.IsImageLoaded) { int repeatmidtexoffset = General.Map.SRB2 && l.IsFlagSet(General.Map.Config.RepeatMidtextureFlag) ? (l.Front.OffsetX / 4096) * 4096 : 0; l.Front.OffsetX = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)) % texture.Width + repeatmidtexoffset; @@ -1590,7 +1674,7 @@ namespace CodeImp.DoomBuilder.Geometry else if(l.Back.LowRequired() && l.Back.LongLowTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(l.Back.LongLowTexture)) texture = General.Map.Data.GetTextureImage(l.Back.LongLowTexture); - if(texture != null) + if(texture != null && texture.IsImageLoaded) { int repeatmidtexoffset = General.Map.SRB2 && l.IsFlagSet(General.Map.Config.RepeatMidtextureFlag) ? (l.Back.OffsetX / 4096) * 4096 : 0; l.Back.OffsetX = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)) % texture.Width + repeatmidtexoffset; @@ -1613,24 +1697,24 @@ namespace CodeImp.DoomBuilder.Geometry if(l.Front.MiddleRequired() && l.Front.LongMiddleTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(l.Front.LongMiddleTexture)) { ImageData texture = General.Map.Data.GetTextureImage(l.Front.LongMiddleTexture); - float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)) % texture.Width; - + float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)); + if(texture.IsImageLoaded) offset %= texture.Width; if(offset > 0) UniFields.SetFloat(l.Front.Fields, "offsetx_mid", offset); } if(l.Front.HighRequired() && l.Front.LongHighTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(l.Front.LongHighTexture)) { ImageData texture = General.Map.Data.GetTextureImage(l.Front.LongHighTexture); - float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)) % texture.Width; - + float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)); + if(texture.IsImageLoaded) offset %= texture.Width; if(offset > 0) UniFields.SetFloat(l.Front.Fields, "offsetx_top", offset); } if(l.Front.LowRequired() && l.Front.LongLowTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(l.Front.LongLowTexture)) { ImageData texture = General.Map.Data.GetTextureImage(l.Front.LongLowTexture); - float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)) % texture.Width; - + float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)); + if(texture.IsImageLoaded) offset %= texture.Width; if(offset > 0) UniFields.SetFloat(l.Front.Fields, "offsetx_bottom", offset); } } @@ -1640,24 +1724,24 @@ namespace CodeImp.DoomBuilder.Geometry if(l.Back.MiddleRequired() && l.Back.LongMiddleTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(l.Back.LongMiddleTexture)) { ImageData texture = General.Map.Data.GetTextureImage(l.Back.LongMiddleTexture); - float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)) % texture.Width; - + float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)); + if(texture.IsImageLoaded) offset %= texture.Width; if(offset > 0) UniFields.SetFloat(l.Back.Fields, "offsetx_mid", offset); } if(l.Back.HighRequired() && l.Back.LongHighTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(l.Back.LongHighTexture)) { ImageData texture = General.Map.Data.GetTextureImage(l.Back.LongHighTexture); - float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)) % texture.Width; - + float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)); + if(texture.IsImageLoaded) offset %= texture.Width; if(offset > 0) UniFields.SetFloat(l.Back.Fields, "offsetx_top", offset); } if(l.Back.LowRequired() && l.Back.LongLowTexture != MapSet.EmptyLongName && General.Map.Data.GetTextureExists(l.Back.LongLowTexture)) { ImageData texture = General.Map.Data.GetTextureImage(l.Back.LongLowTexture); - float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)) % texture.Width; - + float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)); + if(texture.IsImageLoaded) offset %= texture.Width; if(offset > 0) UniFields.SetFloat(l.Back.Fields, "offsetx_bottom", offset); } } @@ -1829,6 +1913,14 @@ namespace CodeImp.DoomBuilder.Geometry ((sd.LongMiddleTexture == texturelongname) && (sd.MiddleRequired() || sd.LongMiddleTexture != MapSet.EmptyLongName)) ; } + //mxd. This checks if any of the sidedef texture match the given textures + public static bool SidedefTextureMatch(Sidedef sd, HashSet<long> texturelongnames) + { + return (texturelongnames.Contains(sd.LongHighTexture) && sd.HighRequired()) || + (texturelongnames.Contains(sd.LongLowTexture) && sd.LowRequired()) || + (texturelongnames.Contains(sd.LongMiddleTexture) && (sd.MiddleRequired() || sd.LongMiddleTexture != MapSet.EmptyLongName)); + } + //mxd. This converts offsetY from/to "normalized" offset for given wall part public static float GetSidedefOffsetY(Sidedef side, VisualGeometryType part, float offset, float scaleY, bool fromNormalized) { @@ -2143,91 +2235,125 @@ namespace CodeImp.DoomBuilder.Geometry return (int)t.Position.z; } - public static List<Line3D> GetDynamicLightShapes() - { - List<Line3D> circles = new List<Line3D>(); - const int linealpha = 128; - foreach (Thing t in General.Map.Map.Things) - { - int lightid = Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.SRB2Type); - if(lightid == -1) continue; + #endregion - // TODO: this basically duplicates VisualThing.UpdateLight()... - // Determine light radiii - int primaryradius; - int secondaryradius = 0; + #region ================== Sectors (mxd) - if(lightid < GZBuilder.GZGeneral.GZ_LIGHT_TYPES[2]) //if it's gzdoom light - { - int n; - if(lightid < GZBuilder.GZGeneral.GZ_LIGHT_TYPES[0]) n = 0; - else if(lightid < GZBuilder.GZGeneral.GZ_LIGHT_TYPES[1]) n = 10; - else n = 20; - DynamicLightType lightType = (DynamicLightType)(t.SRB2Type - 9800 - n); + public static void SplitOuterSectors(IEnumerable<Linedef> drawnlines) + { + Dictionary<Sector, HashSet<Sidedef>> sectorsidesref = new Dictionary<Sector, HashSet<Sidedef>>(); + HashSet<Sidedef> drawnsides = new HashSet<Sidedef>(); - if(lightType == DynamicLightType.SECTOR) + // Create drawn lines per sector collection + foreach(Linedef l in drawnlines) + { + if(l.Front != null && (l.Front.Sector != null && !SectorWasInvalid(l.Front.Sector))) + { + // Add only multipart sectors + if(l.Front.Sector.Triangles.IslandVertices.Count > 1) { - if(t.Sector == null) t.DetermineSector(); - int scaler = (t.Sector != null ? t.Sector.Brightness / 4 : 2); - primaryradius = (int)Math.Round((t.Args[3] * scaler) * General.Settings.GZDynamicLightRadius); + if(!sectorsidesref.ContainsKey(l.Front.Sector)) sectorsidesref[l.Front.Sector] = new HashSet<Sidedef>(); + sectorsidesref[l.Front.Sector].Add(l.Front); } - else + drawnsides.Add(l.Front); + } + + if(l.Back != null && (l.Back.Sector != null && !SectorWasInvalid(l.Back.Sector))) + { + // Add only multipart sectors + if(l.Back.Sector.Triangles.IslandVertices.Count > 1) { - primaryradius = (int)Math.Round((t.Args[3] * 2) * General.Settings.GZDynamicLightRadius); //works... that.. way in GZDoom - if(lightType > 0) - secondaryradius = (int)Math.Round((t.Args[4] * 2) * General.Settings.GZDynamicLightRadius); + if(!sectorsidesref.ContainsKey(l.Back.Sector)) sectorsidesref[l.Back.Sector] = new HashSet<Sidedef>(); + sectorsidesref[l.Back.Sector].Add(l.Back); } + drawnsides.Add(l.Back); } - else //it's one of vavoom lights + } + + // Split sectors + foreach(KeyValuePair<Sector, HashSet<Sidedef>> group in sectorsidesref) + { + // Sector has all sides selected? + if(group.Key.Sidedefs.Count == group.Value.Count) { - primaryradius = (int)Math.Round((t.Args[0] * 8) * General.Settings.GZDynamicLightRadius); + group.Key.Marked = true; // Sometimes those are not marked... + continue; } - // Check radii... - if(primaryradius < 1 && secondaryradius < 1) continue; - - // Determine light color - PixelColor color; - switch(t.SRB2Type) + // Process all sides + foreach(Sidedef side in group.Value) { - case 1502: // Vavoom light - color = new PixelColor(linealpha, 255, 255, 255); - break; + // Sector was already split? + if(side.Sector != group.Key) continue; - case 1503: // Vavoom colored light - color = new PixelColor(linealpha, (byte)t.Args[1], (byte)t.Args[2], (byte)t.Args[3]); - break; + // Find drawing interior + List<LinedefSide> linedefsides = FindPotentialSectorAt(side.Line, side.IsFront); - default: - color = new PixelColor(linealpha, (byte)t.Args[0], (byte)t.Args[1], (byte)t.Args[2]); - break; - } + // Number of potential sides fewer than the sector has? + if(linedefsides != null && linedefsides.Count > 0 && linedefsides.Count < group.Key.Sidedefs.Count) + { + // Collect sidedefs from new sector shape... + HashSet<Sidedef> newsectorsides = new HashSet<Sidedef>(); + foreach(LinedefSide ls in linedefsides) + { + Sidedef s = (ls.Front ? ls.Line.Front : ls.Line.Back); + if(s != null) newsectorsides.Add(s); + } - // Add lines if visible - const int numsides = 24; - if(primaryradius > 0) circles.AddRange(MakeCircleLines(t.Position, color, primaryradius, numsides)); - if(secondaryradius > 0) circles.AddRange(MakeCircleLines(t.Position, color, secondaryradius, numsides)); - } + // Make new sector only if one of the remaining sector sides was also drawn... + foreach(Sidedef s in group.Key.Sidedefs) + { + if(newsectorsides.Contains(s)) continue; + if(drawnsides.Contains(s)) + { + Sector newsector = MakeSector(linedefsides, null, false); + if(newsector != null) + { + newsector.UpdateCache(); + group.Key.UpdateCache(); + } - // Done - return circles; + // Existing sector may've become invalid + SectorWasInvalid(group.Key); + + break; + } + } + } + } + } } - private static IEnumerable<Line3D> MakeCircleLines(Vector2D pos, PixelColor color, float radius, int numsides) + private static bool SectorWasInvalid(Sector s) { - List<Line3D> result = new List<Line3D>(numsides); - Vector2D start = new Vector2D(pos.x, pos.y + radius); - float anglestep = Angle2D.PI2 / numsides; - - for(int i = 1; i < numsides + 1; i++) + if(s.Sidedefs == null || s.Sidedefs.Count < 3 || s.FlatVertices.Length < 3) { - Vector2D end = pos + new Vector2D((float)Math.Sin(anglestep * i) * radius, (float)Math.Cos(anglestep * i) * radius); - result.Add(new Line3D(start, end, color, false)); - start = end; + // Collect changed lines + HashSet<Linedef> changedlines = new HashSet<Linedef>(); + if(s.Sidedefs != null) + { + foreach(Sidedef side in s.Sidedefs) changedlines.Add(side.Line); + } + + // Delete sector + s.Dispose(); + + // Correct lines + foreach(Linedef l in changedlines) + { + l.ApplySidedFlags(); + if(l.Front == null) + { + l.FlipVertices(); + l.FlipSidedefs(); + } + } + + return true; } - return result; - } + return false; + } #endregion @@ -2277,8 +2403,12 @@ namespace CodeImp.DoomBuilder.Geometry { foreach(Linedef l in frontlines) { - l.FlipVertices(); - l.FlipSidedefs(); + // Skip single-sided lines with only front side + if(l.Back != null) + { + l.FlipVertices(); + l.FlipSidedefs(); + } } } } @@ -2364,15 +2494,13 @@ namespace CodeImp.DoomBuilder.Geometry } //mxd - public static Color GetSectorFadeColor(Sector s) + public static PixelColor GetSectorFadeColor(Sector s) { - if(s.Fields.ContainsKey("fadecolor")) return PixelColor.FromInt(s.Fields.GetValue("fadecolor", 0)).ToColor(); + if(s.Fields.ContainsKey("fadecolor")) return PixelColor.FromInt(s.Fields.GetValue("fadecolor", 0)); if(General.Map.Data.MapInfo.HasOutsideFogColor && s.CeilTexture == General.Map.Config.SkyFlatName) - { - return General.Map.Data.MapInfo.OutsideFogColor.ToColor(); - } - - return (General.Map.Data.MapInfo.HasFadeColor ? General.Map.Data.MapInfo.FadeColor.ToColor() : Color.Black); + return PixelColor.FromColor(General.Map.Data.MapInfo.OutsideFogColor.ToColor()); + + return PixelColor.FromColor(General.Map.Data.MapInfo.HasFadeColor ? General.Map.Data.MapInfo.FadeColor.ToColor() : Color.Black); } #endregion diff --git a/Source/Core/Geometry/Triangulation.cs b/Source/Core/Geometry/Triangulation.cs index ff0f1a98300fe66630a9d036416479484c22ef98..dcb25dc2782e2f0757937b716e1592ad7ff7eaae 100644 --- a/Source/Core/Geometry/Triangulation.cs +++ b/Source/Core/Geometry/Triangulation.cs @@ -374,18 +374,18 @@ namespace CodeImp.DoomBuilder.Geometry Vertex found = null; // Go for all sides to find the right-most side - foreach(KeyValuePair<Sidedef, bool> sd in sides) + foreach(Sidedef sd in sides.Keys) { // First found? - if((found == null) && !ignores.ContainsKey(sd.Key.Line.Start)) found = sd.Key.Line.Start; - if((found == null) && !ignores.ContainsKey(sd.Key.Line.End)) found = sd.Key.Line.End; + if((found == null) && !ignores.ContainsKey(sd.Line.Start)) found = sd.Line.Start; + if((found == null) && !ignores.ContainsKey(sd.Line.End)) found = sd.Line.End; // Compare? if(found != null) { // Check if more to the right than the previous found - if((sd.Key.Line.Start.Position.x > found.Position.x) && !ignores.ContainsKey(sd.Key.Line.Start)) found = sd.Key.Line.Start; - if((sd.Key.Line.End.Position.x > found.Position.x) && !ignores.ContainsKey(sd.Key.Line.End)) found = sd.Key.Line.End; + if((sd.Line.Start.Position.x > found.Position.x) && !ignores.ContainsKey(sd.Line.Start)) found = sd.Line.Start; + if((sd.Line.End.Position.x > found.Position.x) && !ignores.ContainsKey(sd.Line.End)) found = sd.Line.End; } } @@ -779,14 +779,75 @@ namespace CodeImp.DoomBuilder.Geometry // This checks if a given ear is a valid (no intersections from reflex vertices) private static bool CheckValidEar(EarClipVertex[] t, LinkedList<EarClipVertex> reflexes) { + //mxd + Vector2D pos0 = t[0].Position; + Vector2D pos1 = t[1].Position; + Vector2D pos2 = t[2].Position; + Vector2D vpos; + LinkedListNode<EarClipVertex> p; + // Go for all reflex vertices foreach(EarClipVertex rv in reflexes) { // Not one of the triangle corners? - if((rv.Position != t[0].Position) && (rv.Position != t[1].Position) && (rv.Position != t[2].Position)) + if((rv.Position != pos0) && (rv.Position != pos1) && (rv.Position != pos2)) { // Return false on intersection - if(PointInsideTriangle(t, rv.MainListNode)) return false; + + // This checks if a point is inside a triangle + // When the point is on an edge of the triangle, it depends on the lines + // adjacent to the point if it is considered inside or not + // NOTE: vertices in t must be in clockwise order! + + // If the triangle has no area, there can never be a point inside + if(TriangleHasArea(t)) + { + //mxd + pos0 = t[0].Position; + pos1 = t[1].Position; + pos2 = t[2].Position; + p = rv.MainListNode; + vpos = p.Value.Position; + + //mxd. Check bounds first... + if( vpos.x < Math.Min(pos0.x, Math.Min(pos1.x, pos2.x)) || + vpos.x > Math.Max(pos0.x, Math.Max(pos1.x, pos2.x)) || + vpos.y < Math.Min(pos0.y, Math.Min(pos1.y, pos2.y)) || + vpos.y > Math.Max(pos0.y, Math.Max(pos1.y, pos2.y))) continue; + + float lineside01 = Line2D.GetSideOfLine(pos0, pos1, vpos); + float lineside12 = Line2D.GetSideOfLine(pos1, pos2, vpos); + float lineside20 = Line2D.GetSideOfLine(pos2, pos0, vpos); + float u_on_line = 0.5f; + + // If point p is on the line of an edge, find out where on the edge segment p is. + if(lineside01 == 0.0f) + u_on_line = Line2D.GetNearestOnLine(pos0, pos1, vpos); + else if(lineside12 == 0.0f) + u_on_line = Line2D.GetNearestOnLine(pos1, pos2, vpos); + else if(lineside20 == 0.0f) + u_on_line = Line2D.GetNearestOnLine(pos2, pos0, vpos); + + // If any of the lineside results are 0 then that means the point p lies on that edge and we + // need to test if the lines adjacent to the point p are in the triangle or not. + // If the lines are intersecting the triangle, we also consider the point inside. + if(lineside01 == 0.0f || lineside12 == 0.0f || lineside20 == 0.0f) + { + // When the point p is outside the edge segment, then it is not inside the triangle + if(u_on_line < 0.0f || u_on_line > 1.0f) continue; + + // Point p is on an edge segment. We'll have to decide by it's lines if we call it inside or outside the triangle. + LinkedListNode<EarClipVertex> p1 = p.Previous ?? p.List.Last; + if(LineInsideTriangle(t, vpos, p1.Value.Position)) return false; + + LinkedListNode<EarClipVertex> p2 = p.Next ?? p.List.First; + if(LineInsideTriangle(t, vpos, p2.Value.Position)) return false; + + continue; + } + + if(lineside01 < 0.0f && lineside12 < 0.0f && lineside20 < 0.0f) return false; + } } } @@ -797,11 +858,12 @@ namespace CodeImp.DoomBuilder.Geometry // This returns the 3-vertex array triangle for an ear private static EarClipVertex[] GetTriangle(EarClipVertex v) { - EarClipVertex[] t = new EarClipVertex[3]; - t[0] = (v.MainListNode.Previous == null) ? v.MainListNode.List.Last.Value : v.MainListNode.Previous.Value; - t[1] = v; - t[2] = (v.MainListNode.Next == null) ? v.MainListNode.List.First.Value : v.MainListNode.Next.Value; - return t; + return new [] + { + (v.MainListNode.Previous == null) ? v.MainListNode.List.Last.Value : v.MainListNode.Previous.Value, + v, + (v.MainListNode.Next == null) ? v.MainListNode.List.First.Value : v.MainListNode.Next.Value + }; } // This checks if a vertex is reflex (corner > 180 deg) or convex (corner < 180 deg) @@ -811,56 +873,6 @@ namespace CodeImp.DoomBuilder.Geometry return (Line2D.GetSideOfLine(t[0].Position, t[2].Position, t[1].Position) < 0.0f); } - // This checks if a point is inside a triangle - // When the point is on an edge of the triangle, it depends on the lines - // adjacent to the point if it is considered inside or not - // NOTE: vertices in t must be in clockwise order! - private static bool PointInsideTriangle(EarClipVertex[] t, LinkedListNode<EarClipVertex> p) - { - // If the triangle has no area, there can never be a point inside - if(TriangleHasArea(t)) - { - float lineside01 = Line2D.GetSideOfLine(t[0].Position, t[1].Position, p.Value.Position); - float lineside12 = Line2D.GetSideOfLine(t[1].Position, t[2].Position, p.Value.Position); - float lineside20 = Line2D.GetSideOfLine(t[2].Position, t[0].Position, p.Value.Position); - float u_on_line = 0.5f; - - // If point p is on the line of an edge, find out where on the edge segment p is. - if(lineside01 == 0.0f) - u_on_line = Line2D.GetNearestOnLine(t[0].Position, t[1].Position, p.Value.Position); - else if(lineside12 == 0.0f) - u_on_line = Line2D.GetNearestOnLine(t[1].Position, t[2].Position, p.Value.Position); - else if(lineside20 == 0.0f) - u_on_line = Line2D.GetNearestOnLine(t[2].Position, t[0].Position, p.Value.Position); - - // If any of the lineside results are 0 then that means the point p lies on that edge and we - // need to test if the lines adjacent to the point p are in the triangle or not. - // If the lines are intersecting the triangle, we also consider the point inside. - if((lineside01 == 0.0f) || (lineside12 == 0.0f) || (lineside20 == 0.0f)) - { - // When the point p is outside the edge segment, then it is not inside the triangle - if((u_on_line < 0.0f) || (u_on_line > 1.0f)) - return false; - - // Point p is on an edge segment. We'll have to decide by it's lines if we call it inside or outside the triangle. - LinkedListNode<EarClipVertex> p1 = p.Previous ?? p.List.Last; - LinkedListNode<EarClipVertex> p2 = p.Next ?? p.List.First; - if(LineInsideTriangle(t, p.Value.Position, p1.Value.Position)) return true; - if(LineInsideTriangle(t, p.Value.Position, p2.Value.Position)) return true; - - return false; - } - else - { - return (lineside01 < 0.0f) && (lineside12 < 0.0f) && (lineside20 < 0.0f); - } - } - else - { - return false; - } - } - // This checks if a line is inside a triangle (touching the triangle is allowed) // NOTE: We already know p1 is on an edge segment of the triangle private static bool LineInsideTriangle(EarClipVertex[] t, Vector2D p1, Vector2D p2) @@ -877,9 +889,10 @@ namespace CodeImp.DoomBuilder.Geometry // Line is inside triangle, because p2 is return true; } + // Test if p2 is on an edge of the triangle and if it is we would // like to know where on the edge segment p2 is - else if(s01 == 0.0f) + if(s01 == 0.0f) { p2_on_edge = Line2D.GetNearestOnLine(t[0].Position, t[1].Position, p2); p1_on_same_edge = Line2D.GetSideOfLine(t[0].Position, t[1].Position, p1); @@ -912,13 +925,10 @@ namespace CodeImp.DoomBuilder.Geometry Line2D t20 = new Line2D(t[2].Position, t[0].Position); float pu, pt; - // Test intersections - t01.GetIntersection(p, out pu, out pt); - if(!float.IsNaN(pu) && (pu >= 0.0f) && (pu <= 1.0f) && (pt >= 0.0f) && (pt <= 1.0f)) return true; - t12.GetIntersection(p, out pu, out pt); - if(!float.IsNaN(pu) && (pu >= 0.0f) && (pu <= 1.0f) && (pt >= 0.0f) && (pt <= 1.0f)) return true; - t20.GetIntersection(p, out pu, out pt); - if(!float.IsNaN(pu) && (pu >= 0.0f) && (pu <= 1.0f) && (pt >= 0.0f) && (pt <= 1.0f)) return true; + //mxd. Test intersections + if(t01.GetIntersection(p, out pu, out pt)) return true; + if(t12.GetIntersection(p, out pu, out pt)) return true; + if(t20.GetIntersection(p, out pu, out pt)) return true; return false; } @@ -926,24 +936,33 @@ namespace CodeImp.DoomBuilder.Geometry // This checks if the triangle has an area greater than 0 private static bool TriangleHasArea(EarClipVertex[] t) { - return ((t[0].Position.x * (t[1].Position.y - t[2].Position.y) + - t[1].Position.x * (t[2].Position.y - t[0].Position.y) + - t[2].Position.x * (t[0].Position.y - t[1].Position.y)) != 0.0f); + Vector2D tp0 = t[0].Position; + Vector2D tp1 = t[1].Position; + Vector2D tp2 = t[2].Position; + + return ((tp0.x * (tp1.y - tp2.y) + + tp1.x * (tp2.y - tp0.y) + + tp2.x * (tp0.y - tp1.y)) != 0.0f); } // This adds an array of vertices private static void AddTriangleToList(EarClipVertex[] triangle, List<Vector2D> verticeslist, List<Sidedef> sidedefslist, bool last) { - // Create triangle - verticeslist.Add(triangle[0].Position); - sidedefslist.Add(triangle[0].Sidedef); - verticeslist.Add(triangle[1].Position); - sidedefslist.Add(triangle[1].Sidedef); - verticeslist.Add(triangle[2].Position); - if(!last) sidedefslist.Add(null); else sidedefslist.Add(triangle[2].Sidedef); + //mxd + EarClipVertex v0 = triangle[0]; + EarClipVertex v1 = triangle[1]; + EarClipVertex v2 = triangle[2]; + // Create triangle + verticeslist.Add(v0.Position); + sidedefslist.Add(v0.Sidedef); + verticeslist.Add(v1.Position); + sidedefslist.Add(v1.Sidedef); + verticeslist.Add(v2.Position); + sidedefslist.Add(!last ? null : v2.Sidedef); + // Modify the first earclipvertex of this triangle, it no longer lies along a sidedef - triangle[0].Sidedef = null; + v0.Sidedef = null; } #endregion diff --git a/Source/Core/Geometry/Vector2D.cs b/Source/Core/Geometry/Vector2D.cs index 75b9b8776f62985b285f18d38a5ceb47c097f0ce..40f9de063b06c85691ddf53adb03ed33e228f61f 100644 --- a/Source/Core/Geometry/Vector2D.cs +++ b/Source/Core/Geometry/Vector2D.cs @@ -257,8 +257,10 @@ namespace CodeImp.DoomBuilder.Geometry // This calculates the angle public float GetAngle() { - // Calculate and return the angle - return -(float)Math.Atan2(-y, x) + Angle2D.PIHALF; //mxd + //mxd. Let's make sure the angle is in [0 .. PI2] range... + float angle = -(float)Math.Atan2(-y, x) + Angle2D.PIHALF; + if(angle < 0f) angle += Angle2D.PI2; + return angle; } // This calculates the length diff --git a/Source/Core/IO/ClipboardStreamWriter.cs b/Source/Core/IO/ClipboardStreamWriter.cs index 7c7bce25361d9375c1dc53c19db39a40dc019712..c034e75b06b0b856018626fa4c58cb1f43edbde6 100644 --- a/Source/Core/IO/ClipboardStreamWriter.cs +++ b/Source/Core/IO/ClipboardStreamWriter.cs @@ -73,7 +73,6 @@ namespace CodeImp.DoomBuilder.IO // Done udmfcfgreader.Dispose(); - udmfcfg.Dispose(); break; } } diff --git a/Source/Core/IO/ClippedStream.cs b/Source/Core/IO/ClippedStream.cs index 2592cea37ea7862d48ab3ff7971fabc450bb0cb9..f974cc10be1ad4b0f4444aabff2bb078a92c13c7 100644 --- a/Source/Core/IO/ClippedStream.cs +++ b/Source/Core/IO/ClippedStream.cs @@ -222,7 +222,6 @@ namespace CodeImp.DoomBuilder.IO { basestream = null; base.Close(); - this.Dispose(); } // This reads a single byte from the stream diff --git a/Source/Core/IO/UniversalMapSetIO.cs b/Source/Core/IO/UniversalMapSetIO.cs index 105dac525dfdb7acdc2dc4605a8cf81c4828a3fe..01faeb583ec9902c9d52a9e06116f29ce00be91d 100644 --- a/Source/Core/IO/UniversalMapSetIO.cs +++ b/Source/Core/IO/UniversalMapSetIO.cs @@ -90,7 +90,6 @@ namespace CodeImp.DoomBuilder.IO // Done udmfcfgreader.Dispose(); - udmfcfg.Dispose(); break; } } diff --git a/Source/Core/IO/UniversalStreamReader.cs b/Source/Core/IO/UniversalStreamReader.cs index c52666a55c70a3420c032e1fa025cdb3624625e3..858801345b088cef7e4b3e5eb347a418f9813b1e 100644 --- a/Source/Core/IO/UniversalStreamReader.cs +++ b/Source/Core/IO/UniversalStreamReader.cs @@ -118,7 +118,6 @@ namespace CodeImp.DoomBuilder.IO // Done udmfcfgreader.Dispose(); - udmfcfg.Dispose(); break; } } @@ -226,7 +225,7 @@ namespace CodeImp.DoomBuilder.IO // Go for all lines map.SetCapacity(0, map.Linedefs.Count + linescolls.Count, map.Sidedefs.Count + sidescolls.Count, 0, 0); - char[] splitter = new[] { ' ' }; //mxd + char[] splitter = { ' ' }; //mxd for(int i = 0; i < linescolls.Count; i++) { // Read fields @@ -236,7 +235,8 @@ namespace CodeImp.DoomBuilder.IO int v1 = GetCollectionEntry(lc, "v1", true, 0, where); int v2 = GetCollectionEntry(lc, "v2", true, 0, where); - if(!vertexlink.ContainsKey(v1) || !vertexlink.ContainsKey(v2)) { //mxd + if(!vertexlink.ContainsKey(v1) || !vertexlink.ContainsKey(v2)) + { //mxd General.ErrorLogger.Add(ErrorType.Warning, "Linedef " + i + " references one or more invalid vertices. Linedef has been removed."); continue; } @@ -248,7 +248,7 @@ namespace CodeImp.DoomBuilder.IO args[2] = GetCollectionEntry(lc, "arg2", false, 0, where); args[3] = GetCollectionEntry(lc, "arg3", false, 0, where); args[4] = GetCollectionEntry(lc, "arg4", false, 0, where); - int s1 = GetCollectionEntry(lc, "sidefront", true, -1, where); + int s1 = GetCollectionEntry(lc, "sidefront", false, -1, where); int s2 = GetCollectionEntry(lc, "sideback", false, -1, where); //mxd. MoreIDs @@ -509,7 +509,7 @@ namespace CodeImp.DoomBuilder.IO //mxd. Try to find the type from configuration if(setknowncustomtypes) { - type = General.Map.Config.ReadSetting("universalfields." + elementname + "." + e.Key + ".type", -1); + type = General.Map.Options.GetUniversalFieldType(elementname, e.Key, -1); if(type != -1) { @@ -600,8 +600,8 @@ namespace CodeImp.DoomBuilder.IO // Make list foreach(UniversalEntry e in collection) { - if(!(e.Value is UniversalCollection) || (e.Key != entryname)) continue; //mxd - list.Add(e.Value as UniversalCollection); + UniversalCollection uc = e.Value as UniversalCollection; + if(uc != null && e.Key == entryname) list.Add(uc); } return list; diff --git a/Source/Core/IO/UniversalStreamWriter.cs b/Source/Core/IO/UniversalStreamWriter.cs index 947520d41356e2c5d8afff3fafe5fe69263f5c00..60a866a4b2fb20dc2cd6270606df249391278913 100644 --- a/Source/Core/IO/UniversalStreamWriter.cs +++ b/Source/Core/IO/UniversalStreamWriter.cs @@ -97,7 +97,6 @@ namespace CodeImp.DoomBuilder.IO // Done udmfcfgreader.Dispose(); - udmfcfg.Dispose(); break; } } diff --git a/Source/Core/IO/WAD.cs b/Source/Core/IO/WAD.cs index ac5907dc6ded3c4b7cc627a52bf3b4912857bfc0..2818a5be4a12eb9b51d97815a04a11dfbdc08e24 100644 --- a/Source/Core/IO/WAD.cs +++ b/Source/Core/IO/WAD.cs @@ -18,6 +18,7 @@ using System; using System.Collections.Generic; +using System.Security.Cryptography; using System.Text; using System.IO; @@ -30,12 +31,58 @@ namespace CodeImp.DoomBuilder.IO #region ================== Constants // WAD types - public const string TYPE_IWAD = "IWAD"; - public const string TYPE_PWAD = "PWAD"; - public const string TYPE_ZWAD = "ZWAD"; + private const string TYPE_IWAD = "IWAD"; + private const string TYPE_PWAD = "PWAD"; // Encoder public static readonly Encoding ENCODING = Encoding.ASCII; + + //mxd. Official IWAD MD5 hashes + private static readonly HashSet<string> IWAD_HASHES = new HashSet<string> + { + ////// DOOM IWADS ////// + "d9153ced9fd5b898b36cc5844e35b520", // DOOM2 1.666g MD5 + "30e3c2d0350b67bfbf47271970b74b2f", // DOOM2 1.666 MD5 + "ea74a47a791fdef2e9f2ea8b8a9da13b", // DOOM2 1.7 MD5 + "d7a07e5d3f4625074312bc299d7ed33f", // DOOM2 1.7a MD5 + "c236745bb01d89bbb866c8fed81b6f8c", // DOOM2 1.8 MD5 + "25e1459ca71d321525f84628f45ca8cd", // DOOM2 1.9 MD5 + "3cb02349b3df649c86290907eed64e7b", // DOOM2 French MD5 + "c3bea40570c23e511a7ed3ebcd9865f7", // BFG DOOM2 MD5 + + "981b03e6d1dc033301aa3095acc437ce", // DOOM 1.1 MD5 + "792fd1fea023d61210857089a7c1e351", // DOOM 1.2 MD5 + "464e3723a7e7f97039ac9fd057096adb", // DOOM 1.6b MD5 + "54978d12de87f162b9bcc011676cb3c0", // DOOM 1.666 MD5 + "11e1cd216801ea2657723abc86ecb01f", // DOOM 1.8 MD5 + "1cd63c5ddff1bf8ce844237f580e9cf3", // DOOM 1.9 MD5 + "fb35c4a5a9fd49ec29ab6e900572c524", // BFG DOOM MD5 + + "c4fe9fd920207691a9f493668e0a2083", // ULTIMATE DOOM MD5 + + "75c8cf89566741fa9d22447604053bd7", // PLUTONIA MD5 + "3493be7e1e2588bc9c8b31eab2587a04", // PLUTONIA RARE MD5 + + "4e158d9953c79ccf97bd0663244cc6b6", // TNT MD5 + "1d39e405bf6ee3df69a8d2646c8d5c49", // TNT Fixed MD5 + "be626c12b7c9d94b1dfb9c327566b4ff", // PSN TNT MD5 + + ////// HERETIC IWADS ////// + "3117e399cdb4298eaa3941625f4b2923", // HERETIC 1.0 MD5 + "1e4cb4ef075ad344dd63971637307e04", // HERETIC 1.2 MD5 + "66d686b1ed6d35ff103f15dbd30e0341", // HERETIC 1.3 MD5 + + ////// HEXEN IWADS ////// + "c88a2bb3d783e2ad7b599a8e301e099e", // HEXEN Beta MD5 + "b2543a03521365261d0a0f74d5dd90f0", // HEXEN 1.0 MD5 + "abb033caf81e26f12a2103e1fa25453f", // HEXEN 1.1 MD5 + "1077432e2690d390c256ac908b5f4efa", // HEXEN DK 1.0 MD5 + "78d5898e99e220e4de64edaa0e479593", // HEXEN DK 1.1 MD5 + + ////// STRIFE IWADS ////// + "8f2d3a6a289f5d2f2f9c1eec02b47299", // STRIFE 1.0 MD5 + "2fed2031a5b03892106e0f117f17901f", // STRIFE 1.2 MD5 + }; #endregion @@ -48,15 +95,16 @@ namespace CodeImp.DoomBuilder.IO private BinaryWriter writer; // Header - private string type; private int numlumps; private int lumpsoffset; + private bool isiwad; //mxd + private bool isofficialiwad; //mxd // Lumps private List<Lump> lumps; // Status - private readonly bool isreadonly; + private bool isreadonly; private bool isdisposed; #endregion @@ -64,10 +112,11 @@ namespace CodeImp.DoomBuilder.IO #region ================== Properties public string Filename { get { return filename; } } - public string Type { get { return type; } } public Encoding Encoding { get { return ENCODING; } } public bool IsReadOnly { get { return isreadonly; } } public bool IsDisposed { get { return isdisposed; } } + public bool IsIWAD { get { return isiwad; } set { isiwad = value; } } //mxd + public bool IsOfficialIWAD { get { return isofficialiwad; } } //mxd public List<Lump> Lumps { get { return lumps; } } #endregion @@ -132,6 +181,12 @@ namespace CodeImp.DoomBuilder.IO { FileAccess access; FileShare share; + + // Keep filename + filename = pathfilename; + + //mxd + CheckHash(); // Determine if opening for read only if(isreadonly) @@ -147,9 +202,6 @@ namespace CodeImp.DoomBuilder.IO share = FileShare.Read; } - // Keep filename - filename = pathfilename; - // Open the file stream file = File.Open(pathfilename, FileMode.OpenOrCreate, access, share); @@ -158,7 +210,7 @@ namespace CodeImp.DoomBuilder.IO if(!isreadonly) writer = new BinaryWriter(file, ENCODING); // Is the WAD file zero length? - if(file.Length == 0) + if(file.Length < 4) { // Create the headers in file CreateHeaders(); @@ -174,14 +226,15 @@ namespace CodeImp.DoomBuilder.IO private void CreateHeaders() { // Default settings - type = TYPE_PWAD; + isiwad = false; //mxd + isofficialiwad = false; //mxd lumpsoffset = 12; // New lumps array lumps = new List<Lump>(numlumps); // Write the headers - WriteHeaders(); + if(!isreadonly) WriteHeaders(); } // This reads the WAD header and lumps table @@ -194,10 +247,7 @@ namespace CodeImp.DoomBuilder.IO file.Seek(0, SeekOrigin.Begin); // Read WAD type - type = ENCODING.GetString(reader.ReadBytes(4)); - - if (type == TYPE_ZWAD) - throw new IOException("Sorry, can't open ZWADs. Please decompress first."); + isiwad = (ENCODING.GetString(reader.ReadBytes(4)) == TYPE_IWAD); //mxd // Number of lumps numlumps = reader.ReadInt32(); @@ -227,14 +277,14 @@ namespace CodeImp.DoomBuilder.IO } } - // This reads the WAD header and lumps table + // This writes the WAD header and lumps table public void WriteHeaders() { // Seek to beginning file.Seek(0, SeekOrigin.Begin); // Write WAD type - writer.Write(ENCODING.GetBytes(type)); + writer.Write(ENCODING.GetBytes(isiwad ? TYPE_IWAD : TYPE_PWAD)); // Number of lumps writer.Write(numlumps); @@ -254,6 +304,50 @@ namespace CodeImp.DoomBuilder.IO writer.Write(lumps[i].FixedName); } } + + //mxd + private void CheckHash() + { + // Open the file stream + FileStream fs = File.Open(filename, FileMode.OpenOrCreate, FileAccess.Read, FileShare.ReadWrite); + + // Empty file can't be official iwad + if(fs.Length > 4) + { + BinaryReader r = new BinaryReader(fs, ENCODING); + + // Read WAD type + if(ENCODING.GetString(r.ReadBytes(4)) == TYPE_IWAD) + { + // Rewind + r.BaseStream.Position = 0; + + // Check hash + MD5 hasher = MD5.Create(); + byte[] data = hasher.ComputeHash(r.BaseStream); + + // Create a new Stringbuilder to collect the bytes and create a string. + StringBuilder hash = new StringBuilder(); + + // Loop through each byte of the hashed data and format each one as a hexadecimal string. + for(int i = 0; i < data.Length; i++) + { + hash.Append(data[i].ToString("x2")); + } + + isofficialiwad = IWAD_HASHES.Contains(hash.ToString()); + if(!isreadonly && isofficialiwad) isreadonly = true; + } + + // Close the reader + r.Close(); + } + else + { + // Close the file + fs.Dispose(); + } + } // This flushes writing changes /*public void Flush() @@ -272,7 +366,8 @@ namespace CodeImp.DoomBuilder.IO #region ================== Lumps // This creates a new lump in the WAD file - public Lump Insert(string name, int position, int datalength) + public Lump Insert(string name, int position, int datalength) { return Insert(name, position, datalength, true); } //mxd + public Lump Insert(string name, int position, int datalength, bool writeheaders) { // We will be adding a lump numlumps++; @@ -288,7 +383,7 @@ namespace CodeImp.DoomBuilder.IO lumpsoffset += datalength; // Write the new headers - WriteHeaders(); + if(writeheaders) WriteHeaders(); // Return the new lump return lump; @@ -357,15 +452,16 @@ namespace CodeImp.DoomBuilder.IO // This finds a lump by name, returns -1 when not found public int FindLumpIndex(string name, int start, int end) { - if(name.Length > 8) return -1;//mxd. Can't be here. Go away! + if(name.Length > 8 || lumps.Count == 0 || start > lumps.Count - 1) return -1;//mxd. Can't be here. Go away! long longname = Lump.MakeLongName(name); - - // Fix end when it exceeds length - if(end > (lumps.Count - 1)) end = lumps.Count - 1; + + // Fix start/end when they exceed safe bounds + start = Math.Max(start, 0); + end = General.Clamp(end, 0, lumps.Count - 1); // Loop through the lumps - for(int i = start; i <= end; i++) + for (int i = start; i <= end; i++) { // Check if the lump name matches if(lumps[i].LongName == longname) diff --git a/Source/Core/Map/BlockMap.cs b/Source/Core/Map/BlockMap.cs index 6711a9c4b4d77194afc281722de144bdc874616e..38e9058c4cd3a74d8aa9a416ee6d4895fcf081f8 100644 --- a/Source/Core/Map/BlockMap.cs +++ b/Source/Core/Map/BlockMap.cs @@ -105,7 +105,7 @@ namespace CodeImp.DoomBuilder.Map #region ================== Methods // This returns the block coordinates - protected Point GetBlockCoordinates(Vector2D v) + internal Point GetBlockCoordinates(Vector2D v) { return new Point((int)(v.x - range.Left) >> blocksizeshift, (int)(v.y - range.Top) >> blocksizeshift); @@ -119,7 +119,7 @@ namespace CodeImp.DoomBuilder.Map } // This returns true when the given block is inside range - protected bool IsInRange(Point p) + internal bool IsInRange(Point p) { return (p.X >= 0) && (p.X < size.Width) && (p.Y >= 0) && (p.Y < size.Height); } @@ -356,6 +356,9 @@ namespace CodeImp.DoomBuilder.Map // This puts a sector in the blockmap public virtual void AddSector(Sector s) { + //mxd. Check range. Sector can be bigger than blockmap range + if(!range.IntersectsWith(s.BBox)) return; + Point p1 = GetBlockCoordinates(new Vector2D(s.BBox.Left, s.BBox.Top)); Point p2 = GetBlockCoordinates(new Vector2D(s.BBox.Right, s.BBox.Bottom)); p1 = CropToRange(p1); diff --git a/Source/Core/Map/Linedef.cs b/Source/Core/Map/Linedef.cs index 2f953f75531af2bc50da1124e7e2999890e7b4eb..60c6337bb07e33880e4a6e0d1827ec44808efa32 100644 --- a/Source/Core/Map/Linedef.cs +++ b/Source/Core/Map/Linedef.cs @@ -965,6 +965,15 @@ namespace CodeImp.DoomBuilder.Map { return new Dictionary<string, bool>(flags); } + + //mxd. This returns enabled flags + public HashSet<string> GetEnabledFlags() + { + HashSet<string> result = new HashSet<string>(); + foreach(KeyValuePair<string, bool> group in flags) + if(group.Value) result.Add(group.Key); + return result; + } // This clears all flags public void ClearFlags() @@ -1254,23 +1263,23 @@ namespace CodeImp.DoomBuilder.Map public bool Join(Linedef other) { // Check which lines were 2 sided - bool l1was2s = ((other.Front != null) && (other.Back != null)); - bool l2was2s = ((this.Front != null) && (this.Back != null)); + bool otherwas2s = ((other.Front != null) && (other.Back != null)); + bool thiswas2s = ((this.Front != null) && (this.Back != null)); // Get sector references - Sector l1fs = other.front != null ? other.front.Sector : null; - Sector l1bs = other.back != null ? other.back.Sector : null; - Sector l2fs = this.front != null ? this.front.Sector : null; - Sector l2bs = this.back != null ? this.back.Sector : null; + Sector otherfs = (other.front != null ? other.front.Sector : null); + Sector otherbs = (other.back != null ? other.back.Sector : null); + Sector thisfs = (this.front != null ? this.front.Sector : null); + Sector thisbs = (this.back != null ? this.back.Sector : null); // This line has no sidedefs? - if((l2fs == null) && (l2bs == null)) + if((thisfs == null) && (thisbs == null)) { // We have no sidedefs, so we have no influence // Nothing to change on the other line } // Other line has no sidedefs? - else if((l1fs == null) && (l1bs == null)) + else if((otherfs == null) && (otherbs == null)) { // The other has no sidedefs, so it has no influence // Copy my sidedefs to the other @@ -1291,43 +1300,43 @@ namespace CodeImp.DoomBuilder.Map else { // Compare front sectors - if((l1fs != null) && (l1fs == l2fs)) + if((otherfs != null) && (otherfs == thisfs)) { // Copy textures if(other.front != null) other.front.AddTexturesTo(this.back); if(this.front != null) this.front.AddTexturesTo(other.back); - // Change sidedefs + // Change sidedefs? if(!JoinChangeSidedefs(other, true, back)) return false; } // Compare back sectors - else if((l1bs != null) && (l1bs == l2bs)) + else if((otherbs != null) && (otherbs == thisbs)) { // Copy textures if(other.back != null) other.back.AddTexturesTo(this.front); if(this.back != null) this.back.AddTexturesTo(other.front); - // Change sidedefs + // Change sidedefs? if(!JoinChangeSidedefs(other, false, front)) return false; } // Compare front and back - else if((l1fs != null) && (l1fs == l2bs)) + else if((otherfs != null) && (otherfs == thisbs)) { // Copy textures if(other.front != null) other.front.AddTexturesTo(this.front); if(this.back != null) this.back.AddTexturesTo(other.back); - // Change sidedefs + // Change sidedefs? if(!JoinChangeSidedefs(other, true, front)) return false; } // Compare back and front - else if((l1bs != null) && (l1bs == l2fs)) + else if((otherbs != null) && (otherbs == thisfs)) { // Copy textures if(other.back != null) other.back.AddTexturesTo(this.back); if(this.front != null) this.front.AddTexturesTo(other.front); - // Change sidedefs + // Change sidedefs? if(!JoinChangeSidedefs(other, false, back)) return false; } else @@ -1339,19 +1348,17 @@ namespace CodeImp.DoomBuilder.Map if(this.start == other.end) { // Copy textures - if(other.back != null) other.back.AddTexturesTo(this.front); if(this.back != null) this.back.AddTexturesTo(other.front); - // Change sidedefs + // Change sidedefs? if(!JoinChangeSidedefs(other, false, front)) return false; } else { // Copy textures - if(other.back != null) other.back.AddTexturesTo(this.back); if(this.front != null) this.front.AddTexturesTo(other.front); - // Change sidedefs + // Change sidedefs? if(!JoinChangeSidedefs(other, false, back)) return false; } } @@ -1361,21 +1368,25 @@ namespace CodeImp.DoomBuilder.Map // Other line with its back to this? if(other.start == this.end) { - // Copy textures - if(other.back != null) other.back.AddTexturesTo(this.front); - if(this.back != null) this.back.AddTexturesTo(other.front); + if(otherbs == null) + { + // Copy textures + if(other.back != null) other.back.AddTexturesTo(this.front); - // Change sidedefs - if(!JoinChangeSidedefs(other, false, front)) return false; + // Change sidedefs + if(!JoinChangeSidedefs(other, false, front)) return false; + } } else { - // Copy textures - if(other.front != null) other.front.AddTexturesTo(this.front); - if(this.back != null) this.back.AddTexturesTo(other.back); + if(otherfs == null) + { + // Copy textures + if(other.front != null) other.front.AddTexturesTo(this.front); - // Change sidedefs - if(!JoinChangeSidedefs(other, true, front)) return false; + // Change sidedefs + if(!JoinChangeSidedefs(other, true, front)) return false; + } } } else @@ -1390,6 +1401,7 @@ namespace CodeImp.DoomBuilder.Map // Change sidedefs if(!JoinChangeSidedefs(other, false, front)) return false; } + // Both lines face the same way else { // Copy textures @@ -1403,13 +1415,13 @@ namespace CodeImp.DoomBuilder.Map } // Apply single/double sided flags if the double-sided-ness changed - if( (!l1was2s && ((other.Front != null) && (other.Back != null))) || - (l1was2s && ((other.Front == null) || (other.Back == null))) ) + if( (!otherwas2s && (other.Front != null && other.Back != null)) || + (otherwas2s && (other.Front == null || other.Back == null)) ) other.ApplySidedFlags(); // Remove unneeded textures - if(other.front != null) other.front.RemoveUnneededTextures(!(l1was2s && l2was2s)); - if(other.back != null) other.back.RemoveUnneededTextures(!(l1was2s && l2was2s)); + if(other.front != null) other.front.RemoveUnneededTextures(!(otherwas2s && thiswas2s)); + if(other.back != null) other.back.RemoveUnneededTextures(!(otherwas2s && thiswas2s)); } // If either of the two lines was selected, keep the other selected @@ -1468,7 +1480,13 @@ namespace CodeImp.DoomBuilder.Map // String representation public override string ToString() { +#if DEBUG + string starttext = (start != null ? " (" + start : string.Empty); + string endtext = (end != null ? ", " + end + ")" : string.Empty); + return "Linedef " + listindex + (marked ? " (marked)" : "") + starttext + endtext; //mxd +#else return "Linedef " + listindex; +#endif } #endregion @@ -1541,7 +1559,7 @@ namespace CodeImp.DoomBuilder.Map texture = General.Map.Data.GetTextureImage(newline.front.LowTexture); //clamp offsetX - if (texture != null) + if (texture != null && texture.IsImageLoaded) { int repeatmidtexoffset = General.Map.SRB2 && newline.IsFlagSet(General.Map.Config.RepeatMidtextureFlag) ? (newline.front.OffsetX / 4096) * 4096 : 0; newline.front.OffsetX %= texture.Width; @@ -1562,7 +1580,7 @@ namespace CodeImp.DoomBuilder.Map texture = General.Map.Data.GetTextureImage(newline.back.LowTexture); //clamp offsetX - if (texture != null) + if (texture != null && texture.IsImageLoaded) { int repeatmidtexoffset = General.Map.SRB2 && newline.IsFlagSet(General.Map.Config.RepeatMidtextureFlag) ? (newline.back.OffsetX / 4096) * 4096 : 0; newline.back.OffsetX %= texture.Width; diff --git a/Source/Core/Map/MapOptions.cs b/Source/Core/Map/MapOptions.cs index 855321922bbac40d2b49e43c71a6c303dc2821c8..b78a8cad60ea0c5683d8fc53d2f2d3576d3a9955 100644 --- a/Source/Core/Map/MapOptions.cs +++ b/Source/Core/Map/MapOptions.cs @@ -294,16 +294,16 @@ namespace CodeImp.DoomBuilder.Map } } - //mxd. Is that really needed?.. - ~MapOptions() - { - // Clean up - this.resources = null; - this.scriptfilesettings = null; //mxd - this.scriptlumpsettings = null; //mxd - } - - #endregion + //mxd. Is that really needed?.. + /*~MapOptions() + { + // Clean up + this.resources = null; + this.scriptfilesettings = null; //mxd + this.scriptlumpsettings = null; //mxd + }*/ + + #endregion #region ================== Methods @@ -438,16 +438,21 @@ namespace CodeImp.DoomBuilder.Map { ScriptDocumentSettings settings = new ScriptDocumentSettings { FoldLevels = new Dictionary<int, HashSet<int>>() }; - // Copy information from Configuration to ScriptDocumentSaveSettings - if (scfinfo.Contains("filename") && (scfinfo["filename"] is string)) settings.Filename = (string)scfinfo["filename"]; - if (scfinfo.Contains("hash") && (scfinfo["hash"] is long)) settings.Hash = (long)scfinfo["hash"]; - if (scfinfo.Contains("caretposition") && (scfinfo["caretposition"] is int)) settings.CaretPosition = (int)scfinfo["caretposition"]; - if (scfinfo.Contains("firstvisibleline") && (scfinfo["firstvisibleline"] is int)) settings.FirstVisibleLine = (int)scfinfo["firstvisibleline"]; - if (scfinfo.Contains("activetab") && (scfinfo["activetab"] is bool)) settings.IsActiveTab = (bool)scfinfo["activetab"]; - if (scfinfo.Contains("foldlevels") && (scfinfo["foldlevels"] is string)) - { - // 1:12,13,14;2:21,43,36 - string foldstr = (string)scfinfo["foldlevels"]; + // Copy information from Configuration to ScriptDocumentSaveSettings + if(scfinfo.Contains("filename") && (scfinfo["filename"] is string)) settings.Filename = (string)scfinfo["filename"]; + if(scfinfo.Contains("hash")) + { + // Configuration will parse the value as int if it's inside int type bounds. + if(scfinfo["hash"] is int) settings.Hash = (int)scfinfo["hash"]; + else if(scfinfo["hash"] is long) settings.Hash = (long)scfinfo["hash"]; + } + if(scfinfo.Contains("caretposition") && (scfinfo["caretposition"] is int)) settings.CaretPosition = (int)scfinfo["caretposition"]; + if(scfinfo.Contains("firstvisibleline") && (scfinfo["firstvisibleline"] is int)) settings.FirstVisibleLine = (int)scfinfo["firstvisibleline"]; + if(scfinfo.Contains("activetab") && (scfinfo["activetab"] is bool)) settings.IsActiveTab = (bool)scfinfo["activetab"]; + if(scfinfo.Contains("foldlevels") && (scfinfo["foldlevels"] is string)) + { + // 1:12,13,14;2:21,43,36 + string foldstr = (string)scfinfo["foldlevels"]; // Convert string to dictionary if (!string.IsNullOrEmpty(foldstr)) diff --git a/Source/Core/Map/MapSet.cs b/Source/Core/Map/MapSet.cs index 07a8f3f08a26d76ae8f54fedb15b045de6969b26..6f67fe40a6365f6b060386a234abe5ebfb185479 100644 --- a/Source/Core/Map/MapSet.cs +++ b/Source/Core/Map/MapSet.cs @@ -26,6 +26,7 @@ using System.Linq; using CodeImp.DoomBuilder.Config; using CodeImp.DoomBuilder.Geometry; using CodeImp.DoomBuilder.IO; +using CodeImp.DoomBuilder.Rendering; using CodeImp.DoomBuilder.Types; using CodeImp.DoomBuilder.Windows; using CodeImp.DoomBuilder.VisualModes; @@ -46,7 +47,7 @@ namespace CodeImp.DoomBuilder.Map /// <summary>Stiching distance. This is only to get around inaccuracies. Basically, /// geometry only stitches when exactly on top of each other.</summary> - public const float STITCH_DISTANCE = 0.001f; + public const float STITCH_DISTANCE = 0.005f; //mxd. 0.001f is not enough when drawing very long lines... // Virtual sector identification // This contains a character that is invalid in the UDMF standard, but valid @@ -1438,7 +1439,7 @@ namespace CodeImp.DoomBuilder.Map string s = groupinfo["vertices"] as string; if(!string.IsNullOrEmpty(s)) { - List<int> indices = GetIndices(groupinfo["vertices"] as string); + List<int> indices = GetIndices(s); foreach(int index in indices) { if(index > vertices.Length) continue; @@ -1452,7 +1453,7 @@ namespace CodeImp.DoomBuilder.Map string s = groupinfo["linedefs"] as string; if(!string.IsNullOrEmpty(s)) { - List<int> indices = GetIndices(groupinfo["linedefs"] as string); + List<int> indices = GetIndices(s); foreach(int index in indices) { if(index > linedefs.Length) continue; @@ -1466,7 +1467,7 @@ namespace CodeImp.DoomBuilder.Map string s = groupinfo["sectors"] as string; if(!string.IsNullOrEmpty(s)) { - List<int> indices = GetIndices(groupinfo["sectors"] as string); + List<int> indices = GetIndices(s); foreach(int index in indices) { if(index > sectors.Length) continue; @@ -1480,7 +1481,7 @@ namespace CodeImp.DoomBuilder.Map string s = groupinfo["things"] as string; if(!string.IsNullOrEmpty(s)) { - List<int> indices = GetIndices(groupinfo["things"] as string); + List<int> indices = GetIndices(s); foreach(int index in indices) { if(index > things.Length) continue; @@ -1987,10 +1988,36 @@ namespace CodeImp.DoomBuilder.Map return new RectangleF(l, t, r - l, b - t); } + /// <summary>This increases and existing area with the given linedefs.</summary> + public static RectangleF IncreaseArea(RectangleF area, ICollection<Linedef> lines) //mxd + { + float l = area.Left; + float t = area.Top; + float r = area.Right; + float b = area.Bottom; + + // Go for all vertices + foreach(Linedef ld in lines) + { + // Adjust boundaries by vertices + if(ld.Start.Position.x < l) l = ld.Start.Position.x; + if(ld.Start.Position.x > r) r = ld.Start.Position.x; + if(ld.Start.Position.y < t) t = ld.Start.Position.y; + if(ld.Start.Position.y > b) b = ld.Start.Position.y; + if(ld.End.Position.x < l) l = ld.End.Position.x; + if(ld.End.Position.x > r) r = ld.End.Position.x; + if(ld.End.Position.y < t) t = ld.End.Position.y; + if(ld.End.Position.y > b) b = ld.End.Position.y; + } + + // Return a rect + return new RectangleF(l, t, r - l, b - t); + } + /// <summary>This filters lines by a rectangular area.</summary> - public static ICollection<Linedef> FilterByArea(ICollection<Linedef> lines, ref RectangleF area) + public static HashSet<Linedef> FilterByArea(ICollection<Linedef> lines, ref RectangleF area) { - ICollection<Linedef> newlines = new List<Linedef>(lines.Count); + HashSet<Linedef> newlines = new HashSet<Linedef>(); // Go for all lines foreach(Linedef l in lines) @@ -2045,17 +2072,18 @@ namespace CodeImp.DoomBuilder.Map /// <summary> /// Stitches marked geometry with non-marked geometry. Returns false when the operation failed. /// </summary> - public bool StitchGeometry() + public bool StitchGeometry() { return StitchGeometry(MergeGeometryMode.CLASSIC); } //mxd. Compatibility + public bool StitchGeometry(MergeGeometryMode mergemode) { // Find vertices - ICollection<Vertex> movingverts = General.Map.Map.GetMarkedVertices(true); - ICollection<Vertex> fixedverts = General.Map.Map.GetMarkedVertices(false); + HashSet<Vertex> movingverts = new HashSet<Vertex>(General.Map.Map.GetMarkedVertices(true)); + HashSet<Vertex> fixedverts = new HashSet<Vertex>(General.Map.Map.GetMarkedVertices(false)); // Find lines that moved during the drag - ICollection<Linedef> movinglines = LinedefsFromMarkedVertices(false, true, true); + HashSet<Linedef> movinglines = new HashSet<Linedef>(LinedefsFromMarkedVertices(false, true, true)); // Find all non-moving lines - ICollection<Linedef> fixedlines = LinedefsFromMarkedVertices(true, false, false); + HashSet<Linedef> fixedlines = new HashSet<Linedef>(LinedefsFromMarkedVertices(true, false, false)); // Determine area in which we are editing RectangleF editarea = CreateArea(movinglines); @@ -2074,25 +2102,474 @@ namespace CodeImp.DoomBuilder.Map // Split moving lines with unselected vertices ICollection<Vertex> nearbyfixedverts = FilterByArea(fixedverts, ref editarea); - if(!SplitLinesByVertices(movinglines, nearbyfixedverts, STITCH_DISTANCE, movinglines)) + if(!SplitLinesByVertices(movinglines, nearbyfixedverts, STITCH_DISTANCE, movinglines, mergemode)) return false; // Split non-moving lines with selected vertices fixedlines = FilterByArea(fixedlines, ref editarea); - if(!SplitLinesByVertices(fixedlines, movingverts, STITCH_DISTANCE, movinglines)) + if(!SplitLinesByVertices(fixedlines, movingverts, STITCH_DISTANCE, movinglines, mergemode)) return false; + + //mxd. Split moving lines with fixed lines + if(!SplitLinesByLines(fixedlines, movinglines, mergemode)) return false; // Remove looped linedefs RemoveLoopedLinedefs(movinglines); // Join overlapping lines - if(!JoinOverlappingLines(movinglines)) - return false; - + if(!JoinOverlappingLines(movinglines)) return false; + + //mxd. Remove remaining new verts from dragged shape if possible + if(mergemode == MergeGeometryMode.REPLACE) + { + // Collect verts created by splitting. Can't use GetMarkedVertices here, because we are in the middle of AddRemove + HashSet<Vertex> tocheck = new HashSet<Vertex>(); + foreach(Vertex v in vertices) + { + if(v != null && v.Marked && !movingverts.Contains(v)) tocheck.Add(v); + } + + // Remove verts, which are not part of initially dragged verts + foreach(Vertex v in tocheck) + { + if(!v.IsDisposed && v.Linedefs.Count == 2) + { + Linedef ld1 = General.GetByIndex(v.Linedefs, 0); + Linedef ld2 = General.GetByIndex(v.Linedefs, 1); + + Vertex v2 = (ld2.Start == v) ? ld2.End : ld2.Start; + if(ld1.Start == v) ld1.SetStartVertex(v2); else ld1.SetEndVertex(v2); + ld2.Dispose(); + + // Trash vertex + v.Dispose(); + } + } + } + EndAddRemove(); + + // Collect changed lines... We need those in by-vertex-index order + // (otherwise SectorBuilder logic in some cases will incorrectly assign sector propertes) + List<Vertex> markedverts = GetMarkedVertices(true); + List<Linedef> changedlines = new List<Linedef>(markedverts.Count / 2); + HashSet<Linedef> changedlineshash = new HashSet<Linedef>(); + foreach(Vertex v in markedverts) + { + foreach(Linedef l in v.Linedefs) + { + if(!changedlineshash.Contains(l)) + { + changedlines.Add(l); + changedlineshash.Add(l); + } + } + } + + //mxd. Correct sector references + if(mergemode != MergeGeometryMode.CLASSIC) + { + // Linedefs cache needs to be up to date... + Update(true, false); + + // Fix stuff... + CorrectSectorReferences(changedlines, true); + CorrectOuterSides(new HashSet<Linedef>(changedlines)); + + // Mark only fully selected sectors + ClearMarkedSectors(false); + HashSet<Sector> changedsectors = GetSectorsFromLinedefs(changedlines); + foreach(Sector s in changedsectors) s.Marked = true; + } + else + { + FlipBackwardLinedefs(changedlines); + } return true; } + + //mxd. Shameless SLADEMap::correctSectors ripoff... Corrects/builds sectors for all lines in [lines] + private static void CorrectSectorReferences(List<Linedef> lines, bool existing_only) + { + //DebugConsole.Clear(); + //DebugConsole.WriteLine("CorrectSectorReferences for " + lines.Count + " lines"); + + // Create a list of sidedefs to perform sector creation with + List<LinedefSide> edges = new List<LinedefSide>(); + if(existing_only) + { + foreach(Linedef l in lines) + { + // Add only existing sides as edges (or front side if line has none) + if(l.Front != null || l.Back == null) + edges.Add(new LinedefSide(l, true)); + if(l.Back != null) + edges.Add(new LinedefSide(l, false)); + } + } + else + { + foreach(Linedef l in lines) + { + // Add front side + edges.Add(new LinedefSide(l, true)); + + // Add back side if there's a sector + if(General.Map.Map.GetSectorByCoordinates(l.GetSidePoint(false)) != null) + edges.Add(new LinedefSide(l, false)); + } + } + + HashSet<Sidedef> sides_correct = new HashSet<Sidedef>(); + foreach(LinedefSide ls in edges) + { + if(ls.Front && ls.Line.Front != null) + sides_correct.Add(ls.Line.Front); + else if(!ls.Front && ls.Line.Back != null) + sides_correct.Add(ls.Line.Back); + } + + //mxd. Get affected sectors + HashSet<Sector> affectedsectors = new HashSet<Sector>(General.Map.Map.GetSelectedSectors(true)); + affectedsectors.UnionWith(General.Map.Map.GetUnselectedSectorsFromLinedefs(lines)); + + //mxd. Collect their sidedefs + HashSet<Sidedef> sectorsides = new HashSet<Sidedef>(); + foreach(Sector s in affectedsectors) sectorsides.UnionWith(s.Sidedefs); + + // Build sectors + SectorBuilder builder = new SectorBuilder(); + List<Sector> sectors_reused = new List<Sector>(); + + foreach(LinedefSide ls in edges) + { + // Skip if edge is ignored + //DebugConsole.WriteLine((ls.Ignore ? "Ignoring line " : "Processing line ") + ls.Line.Index); + if(ls.Ignore) continue; + + // Run sector builder on current edge + if(!builder.TraceSector(ls.Line, ls.Front)) continue; // Don't create sector if trace failed + + // Find any subsequent edges that were part of the sector created + bool has_existing_lines = false; + bool has_existing_sides = false; + //bool has_zero_sided_lines = false; + bool has_dragged_sides = false; //mxd + List<LinedefSide> edges_in_sector = new List<LinedefSide>(); + foreach(LinedefSide edge in builder.SectorEdges) + { + bool line_is_ours = false; + bool side_exists = (edge.Front ? edge.Line.Front != null : edge.Line.Back != null); //mxd + if(side_exists && sectorsides.Contains(edge.Front ? edge.Line.Front : edge.Line.Back)) + has_dragged_sides = true; //mxd + + foreach(LinedefSide ls2 in edges) + { + if(ls2.Line == edge.Line) + { + line_is_ours = true; + if(ls2.Front == edge.Front) + { + edges_in_sector.Add(ls2); + break; + } + } + } + + if(line_is_ours) + { + //if(edge.Line.Front == null && edge.Line.Back == null) + //has_zero_sided_lines = true; + } + else + { + has_existing_lines = true; + has_existing_sides |= side_exists; //mxd + } + } + + // Pasting or moving a two-sided line into an enclosed void should NOT + // create a new sector out of the entire void. + // Heuristic: if the traced sector includes any edges that are NOT + // "ours", and NONE of those edges already exist, that sector must be + // in an enclosed void, and should not be drawn. + // However, if existing_only is false, the caller expects us to create + // new sides anyway; skip this check. + if(existing_only && has_existing_lines && !has_existing_sides && !has_dragged_sides) + continue; + + // Ignore traced edges when trying to create any further sectors + foreach(LinedefSide ls3 in edges_in_sector) ls3.Ignore = true; + + // Check if sector traced is already valid + if(builder.IsValidSector()) continue; + + // Check if we traced over an existing sector (or part of one) + Sector sector = builder.FindExistingSector(sides_correct); + if(sector != null) + { + // Check if it's already been (re)used + bool reused = false; + foreach(Sector s in sectors_reused) + { + if(s == sector) + { + reused = true; + break; + } + } + + // If we can reuse the sector, do so + if(!reused) + sectors_reused.Add(sector); + else + sector = null; + } + + // Create sector + builder.CreateSector(sector, null); + } + + // Remove any sides that weren't part of a sector + foreach(LinedefSide ls in edges) + { + if(ls.Ignore || ls.Line == null) continue; + + if(ls.Front) + { + if(ls.Line.Front != null) + { + ls.Line.Front.Dispose(); + + // Update doublesided flag + ls.Line.ApplySidedFlags(); + } + } + else + { + if(ls.Line.Back != null) + { + ls.Line.Back.Dispose(); + + // Update doublesided flag + ls.Line.ApplySidedFlags(); + } + } + } + + // Check if any lines need to be flipped + FlipBackwardLinedefs(lines); + + // Find an adjacent sector to copy properties from + Sector sector_copy = null; + foreach(Linedef l in lines) + { + // Check front sector + Sector sector = (l.Front != null ? l.Front.Sector : null); + if(sector != null && !sector.Marked) + { + // Copy this sector if it isn't newly created + sector_copy = sector; + break; + } + + // Check back sector + sector = (l.Back != null ? l.Back.Sector : null); + if(sector != null && !sector.Marked) + { + // Copy this sector if it isn't newly created + sector_copy = sector; + break; + } + } + + // Go through newly created sectors + List<Sector> newsectors = General.Map.Map.GetMarkedSectors(true); //mxd + foreach(Sector s in newsectors) + { + // Skip if sector already has properties + if(s.CeilTexture != "-" || s.FloorTexture != "-" + || s.FloorHeight != General.Settings.DefaultFloorHeight + || s.CeilHeight != General.Settings.DefaultCeilingHeight) + continue; + + // Copy from adjacent sector if any + if(sector_copy != null) + { + sector_copy.CopyPropertiesTo(s); + continue; + } + + // Otherwise, use defaults from game configuration + s.SetFloorTexture(General.Map.Options.DefaultFloorTexture); + s.SetCeilTexture(General.Map.Options.DefaultCeilingTexture); + s.FloorHeight = General.Settings.DefaultFloorHeight; + s.CeilHeight = General.Settings.DefaultCeilingHeight; + s.Brightness = General.Settings.DefaultBrightness; + } + + // Update line textures + List<Sidedef> newsides = General.Map.Map.GetMarkedSidedefs(true); + foreach(Sidedef side in newsides) + { + // Clear any unneeded textures + side.RemoveUnneededTextures(side.Other != null, false, true); + + // Set middle texture if needed + if(side.MiddleRequired() && side.MiddleTexture == "-") + { + // Find adjacent texture (any) + string tex = GetAdjacentMiddleTexture(side.Line.Start); + if(tex == "-") tex = GetAdjacentMiddleTexture(side.Line.End); + + // If no adjacent texture, get default from game configuration + if(tex == "-") tex = General.Settings.DefaultTexture; + + // Set texture + side.SetTextureMid(tex); + } + + // Update sided flags + side.Line.ApplySidedFlags(); + } + + // Remove any extra sectors + General.Map.Map.RemoveUnusedSectors(false); + } + + //mxd. Try to create outer sidedefs if needed + private static void CorrectOuterSides(HashSet<Linedef> changedlines) + { + HashSet<Linedef> linesmissingfront = new HashSet<Linedef>(); + HashSet<Linedef> linesmissingback = new HashSet<Linedef>(); + + // Collect lines without front/back sides + foreach(Linedef line in changedlines) + { + if(line.Back == null) linesmissingback.Add(line); + if(line.Front == null) linesmissingfront.Add(line); + } + + // Anything to do? + if(linesmissingfront.Count == 0 && linesmissingback.Count == 0) return; + + // Let's use a blockmap... + RectangleF area = CreateArea(linesmissingfront); + area = IncreaseArea(area, linesmissingback); + BlockMap<BlockEntry> blockmap = new BlockMap<BlockEntry>(area); + blockmap.AddSectorsSet(General.Map.Map.Sectors); + + // Find sectors to join singlesided lines + Dictionary<Linedef, Sector> linefrontsectorref = new Dictionary<Linedef, Sector>(); + foreach(Linedef line in linesmissingfront) + { + // Line is now inside a sector? + Sector nearest = FindSectorContaining(blockmap, line); + + // We can reattach our line! + if(nearest != null) linefrontsectorref[line] = nearest; + } + + Dictionary<Linedef, Sector> linebacksectorref = new Dictionary<Linedef, Sector>(); + foreach(Linedef line in linesmissingback) + { + // Line is now inside a sector? + Sector nearest = FindSectorContaining(blockmap, line); + + // We can reattach our line! + if(nearest != null) linebacksectorref[line] = nearest; + } + + // Check single-sided lines. Add new sidedefs if necessary + // Key is dragged single-sided line, value is a sector dragged line ended up in. + foreach(KeyValuePair<Linedef, Sector> group in linefrontsectorref) + { + Linedef line = group.Key; + + // Create new sidedef + Sidedef newside = General.Map.Map.CreateSidedef(line, true, group.Value); + + // Copy props from the other side + Sidedef propssource = (line.Front ?? line.Back); + propssource.CopyPropertiesTo(newside); + + // Correct the linedef + if((line.Front == null) && (line.Back != null)) + { + line.FlipVertices(); + line.FlipSidedefs(); + } + + // Adjust textures + if(line.Front != null) line.Front.RemoveUnneededTextures(line.Back != null, false, true); + if(line.Back != null) line.Back.RemoveUnneededTextures(line.Front != null, false, true); + + // Correct the sided flags + line.ApplySidedFlags(); + } + + foreach(KeyValuePair<Linedef, Sector> group in linebacksectorref) + { + Linedef line = group.Key; + + // Create new sidedef + Sidedef newside = General.Map.Map.CreateSidedef(line, false, group.Value); + + // Copy props from the other side + Sidedef propssource = (line.Front ?? line.Back); + propssource.CopyPropertiesTo(newside); + + // Correct the linedef + if((line.Front == null) && (line.Back != null)) + { + line.FlipVertices(); + line.FlipSidedefs(); + } + + // Adjust textures + if(line.Front != null) line.Front.RemoveUnneededTextures(line.Back != null, false, true); + if(line.Back != null) line.Back.RemoveUnneededTextures(line.Front != null, false, true); + + // Correct the sided flags + line.ApplySidedFlags(); + } + } + + //mxd + private static Sector FindSectorContaining(BlockMap<BlockEntry> sectorsmap, Linedef line) + { + HashSet<BlockEntry> blocks = new HashSet<BlockEntry> + { + sectorsmap.GetBlockAt(line.Start.Position), + sectorsmap.GetBlockAt(line.End.Position), + }; + + foreach(BlockEntry be in blocks) + { + foreach(Sector sector in be.Sectors) + { + // Check if target line is inside the found sector + if(sector.Intersect(line.Start.Position, false) && sector.Intersect(line.End.Position, false)) + return sector; + } + } + + return null; + } + + //mxd + private static string GetAdjacentMiddleTexture(Vertex v) + { + // Go through adjacent lines + foreach(Linedef l in v.Linedefs) + { + if(l.Front != null && l.Front.MiddleTexture != "-") return l.Front.MiddleTexture; + if(l.Back != null && l.Back.MiddleTexture != "-") return l.Back.MiddleTexture; + } + + return "-"; + } #endregion @@ -2167,8 +2644,7 @@ namespace CodeImp.DoomBuilder.Map if(l1.Index == l2.Index) continue; // Sharing vertices? - if((l1.End == l2.End) || - (l1.End == l2.Start)) + if(l1.End == l2.End || l1.End == l2.Start) { bool oppositedirection = (l1.End == l2.Start); bool l2marked = l2.Marked; @@ -2183,8 +2659,8 @@ namespace CodeImp.DoomBuilder.Map { l1.FrontInterior = l2.FrontInterior ^ oppositedirection; } - // If l1 is marked as new geometry, we may need to flip it to preserve - // orientation of the original geometry, and update its FrontInterior + // If l1 is marked as new geometry, we may need to flip it to preserve + // orientation of the original geometry, and update its FrontInterior else if(l1.Marked) { if(oppositedirection) @@ -2209,8 +2685,7 @@ namespace CodeImp.DoomBuilder.Map if(l1.Index == l2.Index) continue; // Sharing vertices? - if((l1.Start == l2.End) || - (l1.Start == l2.Start)) + if(l1.Start == l2.End || l1.Start == l2.Start) { bool oppositedirection = (l1.Start == l2.End); bool l2marked = l2.Marked; @@ -2225,8 +2700,8 @@ namespace CodeImp.DoomBuilder.Map { l1.FrontInterior = l2.FrontInterior ^ oppositedirection; } - // If l1 is marked as new geometry, we may need to flip it to preserve - // orientation of the original geometry, and update its FrontInterior + // If l1 is marked as new geometry, we may need to flip it to preserve + // orientation of the original geometry, and update its FrontInterior else if(l1.Marked) { if(oppositedirection) @@ -2266,8 +2741,8 @@ namespace CodeImp.DoomBuilder.Map // Go for all the lines foreach(Linedef l in lines) { - // Check if referencing the same vertex twice - if(l.Start == l.End) + // Check if referencing the same vertex twice (mxd. Or if both verts are null) + if(l.Start == l.End || l.Start.Position == l.End.Position) { // Remove this line while(lines.Remove(l)); @@ -2298,46 +2773,78 @@ namespace CodeImp.DoomBuilder.Map do { + //mxd. Create blockmap + ICollection<Vertex> biggerset, smallerset; + bool keepsmaller; + if(set1.Count > set2.Count) + { + biggerset = set1; + smallerset = set2; + keepsmaller = !keepsecond; + } + else + { + biggerset = set2; + smallerset = set1; + keepsmaller = keepsecond; + } + + RectangleF area = CreateArea(biggerset); + BlockMap<BlockEntry> blockmap = new BlockMap<BlockEntry>(area); + blockmap.AddVerticesSet(biggerset); + // No joins yet joined = false; - // Go for all vertices in the first set - foreach(Vertex v1 in set1) + // Go for all vertices in the smaller set + foreach(Vertex v1 in smallerset) { - // Go for all vertices in the second set - foreach(Vertex v2 in set2) + HashSet<BlockEntry> blocks = new HashSet<BlockEntry> { - // Check if vertices are close enough - if(v1.DistanceToSq(v2.Position) <= joindist2) + blockmap.GetBlockAt(v1.Position), + blockmap.GetBlockAt(new Vector2D(v1.Position.x + joindist, v1.Position.y + joindist)), + blockmap.GetBlockAt(new Vector2D(v1.Position.x + joindist, v1.Position.y - joindist)), + blockmap.GetBlockAt(new Vector2D(v1.Position.x - joindist, v1.Position.y + joindist)), + blockmap.GetBlockAt(new Vector2D(v1.Position.x - joindist, v1.Position.y - joindist)) + }; + + foreach(BlockEntry be in blocks) + { + if(be == null) continue; + foreach(Vertex v2 in be.Vertices) { - // Check if not the same vertex - if(v1 != v2) + // Check if vertices are close enough + if(v1.DistanceToSq(v2.Position) <= joindist2) { - // Move the second vertex to match the first - v2.Move(v1.Position); - - // Check which one to keep - if(keepsecond) + // Check if not the same vertex + if(v1 != v2) { - // Join the first into the second - // Second is kept, first is removed - v1.Join(v2); - set1.Remove(v1); - set2.Remove(v1); - } - else - { - // Join the second into the first - // First is kept, second is removed - v2.Join(v1); - set1.Remove(v2); - set2.Remove(v2); + // Move the second vertex to match the first + v2.Move(v1.Position); + + // Check which one to keep + if(keepsmaller) + { + // Join the first into the second + // Second is kept, first is removed + v1.Join(v2); + biggerset.Remove(v1); + smallerset.Remove(v1); + } + else + { + // Join the second into the first + // First is kept, second is removed + v2.Join(v1); + biggerset.Remove(v2); + smallerset.Remove(v2); + } + + // Count the join + joinsdone++; + joined = true; + break; } - - // Count the join - joinsdone++; - joined = true; - break; } } } @@ -2423,10 +2930,11 @@ namespace CodeImp.DoomBuilder.Map /// <summary>This splits the given lines with the given vertices. All affected lines /// will be added to changedlines. Returns false when the operation failed.</summary> - public static bool SplitLinesByVertices(ICollection<Linedef> lines, ICollection<Vertex> verts, float splitdist, ICollection<Linedef> changedlines) + public static bool SplitLinesByVertices(ICollection<Linedef> lines, ICollection<Vertex> verts, float splitdist, ICollection<Linedef> changedlines) { return SplitLinesByVertices(lines, verts, splitdist, changedlines, MergeGeometryMode.CLASSIC); } + public static bool SplitLinesByVertices(ICollection<Linedef> lines, ICollection<Vertex> verts, float splitdist, ICollection<Linedef> changedlines, MergeGeometryMode mergemode) { - if(verts.Count == 0 || lines.Count == 0) return true; //mxd - + if (verts.Count == 0 || lines.Count == 0) return true; //mxd + float splitdist2 = splitdist * splitdist; //mxd. Create blockmap @@ -2436,6 +2944,9 @@ namespace CodeImp.DoomBuilder.Map blockmap.AddVerticesSet(verts); blockmap.AddLinedefsSet(lines); + HashSet<Vertex> splitverts = new HashSet<Vertex>(); + HashSet<Sector> changedsectors = (mergemode == MergeGeometryMode.REPLACE ? General.Map.Map.GetSectorsFromLinedefs(changedlines) : new HashSet<Sector>()); + foreach (Vertex v in verts) { List<BlockEntry> blocks; @@ -2493,7 +3004,216 @@ namespace CodeImp.DoomBuilder.Map } } } + } + } + } + + //mxd. Remove lines, which are inside affected sectors + if(mergemode == MergeGeometryMode.REPLACE && changedsectors.Count > 0) + { + HashSet<Linedef> alllines = new HashSet<Linedef>(lines); + if(changedlines != null) alllines.UnionWith(changedlines); + + foreach(Linedef l in alllines) l.UpdateCache(); + foreach(Sector s in changedsectors) s.UpdateBBox(); + foreach(Linedef l in alllines) + { + // Remove line when it's start, center and end are inside a changed sector and neither side references it + if(l.Start != null && l.End != null && + (l.Front == null || !changedsectors.Contains(l.Front.Sector)) && + (l.Back == null || !changedsectors.Contains(l.Back.Sector))) + { + foreach(Sector s in changedsectors) + { + if(s.Intersect(l.Start.Position) && s.Intersect(l.End.Position) && s.Intersect(l.GetCenterPoint())) + { + Vertex[] tocheck = { l.Start, l.End }; + while(lines.Remove(l)); + if(changedlines != null) while(changedlines.Remove(l)); + l.Dispose(); + + foreach(Vertex v in tocheck) + { + // If the newly created vertex only has 2 linedefs attached, then merge the linedefs + if(!v.IsDisposed && v.Linedefs.Count == 2 && splitverts.Contains(v)) + { + Linedef ld1 = General.GetByIndex(v.Linedefs, 0); + Linedef ld2 = General.GetByIndex(v.Linedefs, 1); + if(!ld1.Marked && !ld2.Marked) + { + Vertex v2 = (ld2.Start == v) ? ld2.End : ld2.Start; + if(ld1.Start == v) ld1.SetStartVertex(v2); else ld1.SetEndVertex(v2); + while(lines.Remove(ld2)); + if(changedlines != null) while(changedlines.Remove(ld2)); + ld2.Dispose(); + + // Trash vertex + v.Dispose(); + } + } + } + + break; + } + } + } + } + } + + return true; + } + + /// <summary>Splits lines by lines. Adds new lines to the second collection. Returns false when the operation failed.</summary> + public static bool SplitLinesByLines(HashSet<Linedef> lines, HashSet<Linedef> changedlines, MergeGeometryMode mergemode) //mxd + { + if(lines.Count == 0 || changedlines.Count == 0 || mergemode == MergeGeometryMode.CLASSIC) return true; + + // Create blockmap + HashSet<Vertex> verts = new HashSet<Vertex>(); //mxd + foreach(Linedef l in lines) + { + verts.Add(l.Start); + verts.Add(l.End); + } + foreach(Linedef l in changedlines) + { + verts.Add(l.Start); + verts.Add(l.End); + } + + RectangleF area = RectangleF.Union(CreateArea(lines), CreateArea(changedlines)); + BlockMap<BlockEntry> blockmap = new BlockMap<BlockEntry>(area); + blockmap.AddLinedefsSet(lines); + blockmap.AddLinedefsSet(changedlines); + blockmap.AddVerticesSet(verts); //mxd + int bmWidth = blockmap.Size.Width; + int bmHeight = blockmap.Size.Height; + BlockEntry[,] bmap = blockmap.Map; + + //mxd + HashSet<Vertex> splitverts = new HashSet<Vertex>(); + HashSet<Sector> changedsectors = (mergemode == MergeGeometryMode.REPLACE ? General.Map.Map.GetSectorsFromLinedefs(changedlines) : new HashSet<Sector>()); + + // Check for intersections + for(int w = 0; w < bmWidth; w++) + { + for(int h = 0; h < bmHeight; h++) + { + BlockEntry block = bmap[w, h]; + if(block.Lines.Count == 0) continue; + + for(int i = 0; i < block.Lines.Count; i++) + { + Linedef l1 = block.Lines[i]; + for(int c = 0; c < block.Lines.Count; c++) + { + if(i == c) continue; + + Linedef l2 = block.Lines[c]; + if(l1 == l2 + || l1.Start.Position == l2.Start.Position + || l1.Start.Position == l2.End.Position + || l1.End.Position == l2.Start.Position + || l1.End.Position == l2.End.Position) continue; + + // Check for intersection + Vector2D intersection = Line2D.GetIntersectionPoint(new Line2D(l1), new Line2D(l2), true); + if(!float.IsNaN(intersection.x)) + { + //mxd. Round to map format precision + intersection.x = (float)Math.Round(intersection.x, General.Map.FormatInterface.VertexDecimals); + intersection.y = (float)Math.Round(intersection.y, General.Map.FormatInterface.VertexDecimals); + + //mxd. Skip when intersection matches start/end position. + // Otherwise infinite ammount of 0-length lines will be created... + if( l1.Start.Position == intersection || l1.End.Position == intersection || + l2.Start.Position == intersection || l2.End.Position == intersection) continue; + + //mxd. Do we already have a vertex here? + bool existingvert = false; + Vertex splitvertex = null; + foreach(Vertex v in block.Vertices) + { + if(v.Position == intersection) + { + splitvertex = v; + existingvert = true; + break; + } + } + + //mxd. Create split vertex? + if(splitvertex == null) splitvertex = General.Map.Map.CreateVertex(intersection); + if(splitvertex == null) return false; + + // Split both lines + Linedef nl1 = l1.Split(splitvertex); + if(nl1 == null) return false; + + Linedef nl2 = l2.Split(splitvertex); + if(nl2 == null) return false; + + // Mark split vertex? + if(!existingvert) + { + splitvertex.Marked = true; + splitverts.Add(splitvertex); //mxd + } + + // Add to the second collection + changedlines.Add(nl1); + changedlines.Add(nl2); + + // And to the block entry + blockmap.AddLinedef(nl1); + blockmap.AddLinedef(nl2); + } + } + } + } + } + //mxd. Remove lines, which are inside affected sectors + if(mergemode == MergeGeometryMode.REPLACE) + { + HashSet<Linedef> alllines = new HashSet<Linedef>(lines); + alllines.UnionWith(changedlines); + + foreach(Linedef l in alllines) l.UpdateCache(); + foreach(Sector s in changedsectors) s.UpdateBBox(); + foreach(Linedef l in alllines) + { + // Remove line when it's start, center and end are inside a changed sector and neither side references it + if(l.Start != null && l.End != null + && (l.Front == null || !changedsectors.Contains(l.Front.Sector)) + && (l.Back == null || !changedsectors.Contains(l.Back.Sector))) + { + foreach(Sector s in changedsectors) + { + if(s.Intersect(l.Start.Position) && s.Intersect(l.End.Position) && s.Intersect(l.GetCenterPoint())) + { + Vertex[] tocheck = { l.Start, l.End }; + l.Dispose(); + + foreach(Vertex v in tocheck) + { + // If the newly created vertex only has 2 linedefs attached, then merge the linedefs + if(!v.IsDisposed && v.Linedefs.Count == 2 && splitverts.Contains(v)) + { + Linedef ld1 = General.GetByIndex(v.Linedefs, 0); + Linedef ld2 = General.GetByIndex(v.Linedefs, 1); + Vertex v2 = (ld2.Start == v) ? ld2.End : ld2.Start; + if(ld1.Start == v) ld1.SetStartVertex(v2); else ld1.SetEndVertex(v2); + ld2.Dispose(); + + // Trash vertex + v.Dispose(); + } + } + + break; + } + } } } } @@ -2534,6 +3254,62 @@ namespace CodeImp.DoomBuilder.Map return closest; } + /// <summary>This finds the line closest to the specified position.</summary> + public static Linedef NearestLinedef(BlockMap<BlockEntry> selectionmap, Vector2D pos) //mxd + { + Linedef closest = null; + float distance = float.MaxValue; + + Point p = selectionmap.GetBlockCoordinates(pos); + int minx = p.X; + int maxx = p.X; + int miny = p.Y; + int maxy = p.Y; + int step = 0; + + // Check square block ranges around pos... + while(true) + { + bool noblocksfound = true; + for(int x = minx; x < maxx + 1; x++) + { + for(int y = miny; y < maxy + 1; y++) + { + // Skip inner blocks... + if(x > minx && x < maxx && y > miny && y < maxy) continue; + if(!selectionmap.IsInRange(new Point(x, y))) continue; + + // Go for all linedefs in block + BlockEntry be = selectionmap.Map[x, y]; + foreach(Linedef l in be.Lines) + { + // Calculate distance and check if closer than previous find + float d = l.SafeDistanceToSq(pos, true); + if(d < distance) + { + // This one is closer + closest = l; + distance = d; + } + } + + noblocksfound = false; + } + } + + // Abort if line was found or when outside of blockmap range... + // Check at least 3x3 blocks, because there's a possibility that a line closer to pos exists in a nearby block than in the first block + if(noblocksfound || (closest != null && step > 0)) return closest; + + // Increase search range... + minx--; + maxx++; + miny--; + maxy++; + step++; + } + } + /// <summary>This finds the line closest to the specified position.</summary> public static Linedef NearestLinedef(ICollection<Linedef> selection, Vector2D pos) { @@ -2581,8 +3357,50 @@ namespace CodeImp.DoomBuilder.Map return closest; } + /// <summary>This finds the line closest to the specified position.</summary> + public static Linedef NearestLinedefRange(BlockMap<BlockEntry> selectionmap, Vector2D pos, float maxrange) //mxd + { + Linedef closest = null; + float distance = float.MaxValue; + float maxrangesq = maxrange * maxrange; + HashSet<Linedef> processed = new HashSet<Linedef>(); + + HashSet<BlockEntry> blocks = new HashSet<BlockEntry> + { + selectionmap.GetBlockAt(pos), + selectionmap.GetBlockAt(new Vector2D(pos.x + maxrange, pos.y + maxrange)), + selectionmap.GetBlockAt(new Vector2D(pos.x + maxrange, pos.y - maxrange)), + selectionmap.GetBlockAt(new Vector2D(pos.x - maxrange, pos.y + maxrange)), + selectionmap.GetBlockAt(new Vector2D(pos.x - maxrange, pos.y - maxrange)) + }; + + foreach(BlockEntry be in blocks) + { + if(be == null) continue; + + foreach(Linedef l in be.Lines) + { + if(processed.Contains(l)) continue; + + // Calculate distance and check if closer than previous find + float d = l.SafeDistanceToSq(pos, true); + if(d < distance && d <= maxrangesq) + { + // This one is closer + closest = l; + distance = d; + } + + processed.Add(l); + } + } + + // Return result + return closest; + } + /// <summary>mxd. This finds the line closest to the specified position excluding given list of linedefs.</summary> - public Linedef NearestLinedef(Vector2D pos, List<Linedef> linesToExclude) + public Linedef NearestLinedef(Vector2D pos, HashSet<Linedef> linesToExclude) { Linedef closest = null; float distance = float.MaxValue; @@ -2590,7 +3408,7 @@ namespace CodeImp.DoomBuilder.Map // Go for all linedefs in selection foreach(Linedef l in linedefs) { - if(linesToExclude.Contains(l)) continue; + if(linesToExclude.Contains(l)) continue; // Calculate distance and check if closer than previous find float d = l.SafeDistanceToSq(pos, true); if(d < distance) @@ -2721,7 +3539,15 @@ namespace CodeImp.DoomBuilder.Map { float px = t.Position.x; float py = t.Position.y; - float ts = (((t.FixedSize || General.Settings.FixedThingsScale) && General.Map.Renderer2D.Scale > 1.0f) ? t.Size / General.Map.Renderer2D.Scale : t.Size); + + //mxd. Determine displayed size + float ts; + if(t.FixedSize && General.Map.Renderer2D.Scale > 1.0f) + ts = t.Size / General.Map.Renderer2D.Scale; + else if(General.Settings.FixedThingsScale && t.Size * General.Map.Renderer2D.Scale > Renderer2D.FIXED_THING_SIZE) + ts = Renderer2D.FIXED_THING_SIZE / General.Map.Renderer2D.Scale; + else + ts = t.Size; //mxd. Within range? if(px < range.Left - ts || px > range.Right + ts || py < range.Top - ts || py > range.Bottom + ts) continue; @@ -2914,18 +3740,20 @@ namespace CodeImp.DoomBuilder.Map { //mxd. Multiple tags support... bool changed = false; - for(int i = 0; i < s.Tags.Count; i++) + // Make a copy of tags, otherwise BeforePropsChange will be triggered after tag changes + List<int> tags = new List<int>(s.Tags); + for(int i = 0; i < tags.Count; i++) { - int tag = s.Tags[i]; + int tag = tags[i]; handler(s, false, UniversalType.SectorTag, ref tag, obj); - if(tag != s.Tags[i]) + if(tag != tags[i]) { - s.Tags[i] = tag; + tags[i] = tag; changed = true; } } - if(changed) s.Tags = s.Tags.Distinct().ToList(); + if(changed) s.Tags = tags.Distinct().ToList(); } } @@ -2973,18 +3801,20 @@ namespace CodeImp.DoomBuilder.Map { //mxd. Multiple tags support... bool changed = false; - for(int i = 0; i < l.Tags.Count; i++) + // Make a copy of tags, otherwise BeforePropsChange will be triggered after tag changes + List<int> tags = new List<int>(l.Tags); + for(int i = 0; i < tags.Count; i++) { - int tag = l.Tags[i]; + int tag = tags[i]; handler(l, false, UniversalType.LinedefTag, ref tag, obj); - if(tag != l.Tags[i]) + if(tag != tags[i]) { - l.Tags[i] = tag; + tags[i] = tag; changed = true; } } - if(changed) l.Tags = l.Tags.Distinct().ToList(); + if(changed) l.Tags = tags.Distinct().ToList(); } } } @@ -3021,7 +3851,7 @@ namespace CodeImp.DoomBuilder.Map /// <summary>This makes a list of lines related to marked vertices. /// A line is unstable when one vertex is marked and the other isn't.</summary> - public ICollection<Linedef> LinedefsFromMarkedVertices(bool includeunselected, bool includestable, bool includeunstable) + public List<Linedef> LinedefsFromMarkedVertices(bool includeunmarked, bool includestable, bool includeunstable) { List<Linedef> list = new List<Linedef>((numlinedefs / 2) + 1); @@ -3031,7 +3861,7 @@ namespace CodeImp.DoomBuilder.Map // Check if this is to be included if((includestable && (l.Start.Marked && l.End.Marked)) || (includeunstable && (l.Start.Marked ^ l.End.Marked)) || - (includeunselected && (!l.Start.Marked && !l.End.Marked))) + (includeunmarked && (!l.Start.Marked && !l.End.Marked))) { // Add to list list.Add(l); @@ -3098,6 +3928,69 @@ namespace CodeImp.DoomBuilder.Map return null; } + //mxd + /// <summary>Gets unselected sectors, which have all their linedefs selected</summary> + public HashSet<Sector> GetUnselectedSectorsFromLinedefs(IEnumerable<Linedef> lines) + { + HashSet<Sector> result = new HashSet<Sector>(); + Dictionary<Sector, HashSet<Sidedef>> sectorsbysides = new Dictionary<Sector, HashSet<Sidedef>>(); + HashSet<Sector> selectedsectors = new HashSet<Sector>(General.Map.Map.GetSelectedSectors(true)); + + // Collect unselected sectors, which sidedefs belong to selected lines + foreach(Linedef line in lines) + { + if(line.Front != null && line.Front.Sector != null && !selectedsectors.Contains(line.Front.Sector)) + { + if(!sectorsbysides.ContainsKey(line.Front.Sector)) sectorsbysides.Add(line.Front.Sector, new HashSet<Sidedef>()); + sectorsbysides[line.Front.Sector].Add(line.Front); + } + if(line.Back != null && line.Back.Sector != null && !selectedsectors.Contains(line.Back.Sector)) + { + if(!sectorsbysides.ContainsKey(line.Back.Sector)) sectorsbysides.Add(line.Back.Sector, new HashSet<Sidedef>()); + sectorsbysides[line.Back.Sector].Add(line.Back); + } + } + + // Add sectors, which have all their lines selected + foreach(var group in sectorsbysides) + { + if(group.Key.Sidedefs.Count == group.Value.Count) result.Add(group.Key); + } + + return result; + } + + //mxd + /// <summary>Gets sectors, which have all their linedefs selected</summary> + public HashSet<Sector> GetSectorsFromLinedefs(IEnumerable<Linedef> lines) + { + HashSet<Sector> result = new HashSet<Sector>(); + Dictionary<Sector, HashSet<Sidedef>> sectorsbysides = new Dictionary<Sector, HashSet<Sidedef>>(); + + // Collect unselected sectors, which sidedefs belong to selected lines + foreach(Linedef line in lines) + { + if(line.Front != null && line.Front.Sector != null) + { + if(!sectorsbysides.ContainsKey(line.Front.Sector)) sectorsbysides.Add(line.Front.Sector, new HashSet<Sidedef>()); + sectorsbysides[line.Front.Sector].Add(line.Front); + } + if(line.Back != null && line.Back.Sector != null) + { + if(!sectorsbysides.ContainsKey(line.Back.Sector)) sectorsbysides.Add(line.Back.Sector, new HashSet<Sidedef>()); + sectorsbysides[line.Back.Sector].Add(line.Back); + } + } + + // Add sectors, which have all their lines selected + foreach(var group in sectorsbysides) + { + if(group.Key.Sidedefs.Count == group.Value.Count) result.Add(group.Key); + } + + return result; + } + /// <summary>This finds the line closest to the specified position.</summary> public Linedef NearestLinedef(Vector2D pos) { return MapSet.NearestLinedef(linedefs, pos); } @@ -3149,7 +4042,7 @@ namespace CodeImp.DoomBuilder.Map { Dictionary<uint, List<Sidedef>> storedsides = new Dictionary<uint, List<Sidedef>>(numsidedefs); int originalsidescount = numsidedefs; - float starttime = Clock.CurrentTime; + long starttime = Clock.CurrentTime; BeginAddRemove(); @@ -3159,6 +4052,14 @@ namespace CodeImp.DoomBuilder.Map Sidedef stored = null; Sidedef snsd = sidedefs[sn]; + //mxd. Skip sidedef if it belongs to a linedef with an action or tag? + if(!General.Map.Config.SidedefCompressionIgnoresAction && (snsd.Line.Action != 0 || snsd.Line.Tag != 0)) + { + // Next! + sn++; + continue; + } + // Check if checksum is stored bool samesidedef = false; uint checksum = snsd.GetChecksum(); @@ -3236,7 +4137,7 @@ namespace CodeImp.DoomBuilder.Map EndAddRemove(); // Output info - float endtime = Clock.CurrentTime; + long endtime = Clock.CurrentTime; float deltatimesec = (endtime - starttime) / 1000.0f; float ratio = 100.0f - ((numsidedefs / (float)originalsidescount) * 100.0f); General.WriteLogLine("Sidedefs compressed: " + numsidedefs + " remaining out of " + originalsidescount + " (" + ratio.ToString("########0.00") + "%) in " + deltatimesec.ToString("########0.00") + " seconds"); diff --git a/Source/Core/Map/MergeGeometryMode.cs b/Source/Core/Map/MergeGeometryMode.cs new file mode 100644 index 0000000000000000000000000000000000000000..9d5d7ab5187fbae29f74a41b4574ffeda66df46f --- /dev/null +++ b/Source/Core/Map/MergeGeometryMode.cs @@ -0,0 +1,9 @@ +namespace CodeImp.DoomBuilder.Map +{ + public enum MergeGeometryMode //mxd + { + CLASSIC, + MERGE, + REPLACE, + } +} diff --git a/Source/Core/Map/Sector.cs b/Source/Core/Map/Sector.cs index 772082abb8dfe665b4d0f23b9ba1cc40c0aedbe9..8da2d93393c0d9e46cc1a27def7ba381eb653730 100644 --- a/Source/Core/Map/Sector.cs +++ b/Source/Core/Map/Sector.cs @@ -125,7 +125,7 @@ namespace CodeImp.DoomBuilder.Map public FlatVertex[] FlatVertices { get { return flatvertices; } } public ReadOnlyCollection<LabelPositionInfo> Labels { get { return labels; } } - //mxd. Rednering + //mxd. Rendering public Color4 FogColor { get { return fogcolor; } } public SectorFogMode FogMode { get { return fogmode; } } @@ -516,6 +516,15 @@ namespace CodeImp.DoomBuilder.Map return new Dictionary<string, bool>(flags); } + //mxd. This returns enabled flags + public HashSet<string> GetEnabledFlags() + { + HashSet<string> result = new HashSet<string>(); + foreach(KeyValuePair<string, bool> group in flags) + if(group.Value) result.Add(group.Key); + return result; + } + // This clears all flags public void ClearFlags() { @@ -524,51 +533,44 @@ namespace CodeImp.DoomBuilder.Map } // This checks if the given point is inside the sector polygon - public bool Intersect(Vector2D p) + // See: http://paulbourke.net/geometry/polygonmesh/index.html#insidepoly + public bool Intersect(Vector2D p) { return Intersect(p, true); } + public bool Intersect(Vector2D p, bool countontopastrue) { //mxd. Check bounding box first if(p.x < bbox.Left || p.x > bbox.Right || p.y < bbox.Top || p.y > bbox.Bottom) return false; uint c = 0; + Vector2D v1, v2; // Go for all sidedefs foreach(Sidedef sd in sidedefs) { // Get vertices - Vector2D v1 = sd.Line.Start.Position; - Vector2D v2 = sd.Line.End.Position; + v1 = sd.Line.Start.Position; + v2 = sd.Line.End.Position; //mxd. On top of a vertex? - if(p == v1 || p == v2) return true; - - // Determine min/max values - float miny = Math.Min(v1.y, v2.y); - float maxy = Math.Max(v1.y, v2.y); - float maxx = Math.Max(v1.x, v2.x); - + if(p == v1 || p == v2) return countontopastrue; + // Check for intersection - if((p.y > miny) && (p.y <= maxy)) - { - if(p.x <= maxx) - { - if(v1.y != v2.y) - { - float xint = (p.y - v1.y) * (v2.x - v1.x) / (v2.y - v1.y) + v1.x; - if((v1.x == v2.x) || (p.x <= xint)) c++; - } - } - } + if(v1.y != v2.y //mxd. If line is not horizontal... + && p.y > (v1.y < v2.y ? v1.y : v2.y) //mxd. ...And test point y intersects with the line y bounds... + && p.y <= (v1.y > v2.y ? v1.y : v2.y) //mxd + && (p.x < (v1.x < v2.x ? v1.x : v2.x) || (p.x <= (v1.x > v2.x ? v1.x : v2.x) //mxd. ...And test point x is to the left of the line, or is inside line x bounds and intersects it + && (v1.x == v2.x || p.x <= ((p.y - v1.y) * (v2.x - v1.x) / (v2.y - v1.y) + v1.x))))) + c++; //mxd. ...Count the line as crossed } - - // Inside this polygon? - return ((c & 0x00000001UL) != 0); + + // Inside this polygon when we crossed odd number of polygon lines + return (c % 2 != 0); } // This creates a bounding box rectangle // This requires the sector triangulation to be up-to-date! private RectangleF CreateBBox() { - if(sidedefs.Count == 0) return new RectangleF(); //mxd + if(sidedefs.Count == 0) return new RectangleF(); //mxd // Setup float left = float.MaxValue; @@ -576,35 +578,41 @@ namespace CodeImp.DoomBuilder.Map float right = float.MinValue; float bottom = float.MinValue; - Dictionary<Vertex, bool> processed = new Dictionary<Vertex, bool>(); //mxd + HashSet<Vertex> processed = new HashSet<Vertex>(); //mxd //mxd. This way bbox will be created even if triangulation failed (sector with 2 or less sidedefs and 2 vertices) foreach(Sidedef s in sidedefs) { //start... - if(!processed.ContainsKey(s.Line.Start)) + if(!processed.Contains(s.Line.Start)) { if(s.Line.Start.Position.x < left) left = s.Line.Start.Position.x; if(s.Line.Start.Position.x > right) right = s.Line.Start.Position.x; if(s.Line.Start.Position.y < top) top = s.Line.Start.Position.y; if(s.Line.Start.Position.y > bottom) bottom = s.Line.Start.Position.y; - processed.Add(s.Line.Start, false); + processed.Add(s.Line.Start); } //end... - if(!processed.ContainsKey(s.Line.End)) + if(!processed.Contains(s.Line.End)) { if(s.Line.End.Position.x < left) left = s.Line.End.Position.x; if(s.Line.End.Position.x > right) right = s.Line.End.Position.x; if(s.Line.End.Position.y < top) top = s.Line.End.Position.y; if(s.Line.End.Position.y > bottom) bottom = s.Line.End.Position.y; - processed.Add(s.Line.End, false); + processed.Add(s.Line.End); } } // Return rectangle return new RectangleF(left, top, right - left, bottom - top); } + + //mxd + internal void UpdateBBox() + { + bbox = CreateBBox(); + } // This joins the sector with another sector // This sector will be disposed @@ -793,7 +801,11 @@ namespace CodeImp.DoomBuilder.Map // String representation public override string ToString() { +#if DEBUG + return "Sector " + listindex + (marked ? " (marked)" : ""); //mxd +#else return "Sector " + listindex; +#endif } #endregion diff --git a/Source/Core/Map/SectorBuilder.cs b/Source/Core/Map/SectorBuilder.cs new file mode 100644 index 0000000000000000000000000000000000000000..0c71693de7e78bf2b2eb5793d2273c080646d5b6 --- /dev/null +++ b/Source/Core/Map/SectorBuilder.cs @@ -0,0 +1,619 @@ +#region ================== Namespaces + +using System; +using System.Collections.Generic; +using System.Drawing; +using CodeImp.DoomBuilder.Geometry; + +#endregion + +namespace CodeImp.DoomBuilder.Map +{ + //mxd. Shameless Slade 3 SectorBuilder::SectorBuilder ripoff... + //TODO: There are lots of overlaps with already existing code. + //TODO: Replace with existing implementations if results are the same & existing code performs faster + internal sealed class SectorBuilder + { + #region ================== Variables + + private List<LinedefSide> sector_edges; + private HashSet<Vertex> vertex_valid; + + // Current outline + private List<LinedefSide> o_edges; + private bool o_clockwise; + private RectangleF o_bbox; + private Vertex vertex_right; + + #endregion + + #region ================== Properties + + public List<LinedefSide> SectorEdges { get { return sector_edges; } } + + #endregion + + #region ================== Constructor + + public SectorBuilder() + { + sector_edges = new List<LinedefSide>(); + vertex_valid = new HashSet<Vertex>(); + o_edges = new List<LinedefSide>(); + } + + #endregion + + #region ================== Methods + + ///<summary>Traces all edges to build a closed sector starting from [line]</summary> + internal bool TraceSector(Linedef line, bool front) + { + if(line == null) return false; + + //DebugConsole.WriteLine(" "); + //DebugConsole.WriteLine("TraceSector for line " + line.Index + (front ? " (front)" : " (back)")); + + // Init + sector_edges.Clear(); + + // Create valid vertices list + vertex_valid = new HashSet<Vertex>(General.Map.Map.Vertices); + + // Find outmost outline + for(int a = 0; a < 10000; a++) + { + // Trace outline + if(!TraceOutline(line, front)) + { + //DebugConsole.WriteLine("TraceSector: find outmost outline failed"); + break; + } + + // Discard any vertices outside the traced outline + vertex_valid.RemoveWhere(PointOutsideOutline); + //DebugConsole.WriteLine("vertex_valid: " + vertex_valid.Count + " verts after RemoveWhere"); + + // If it is clockwise, we've found the outmost outline + if(o_clockwise) + { + //DebugConsole.WriteLine("TraceSector: found outmost outline"); + break; + } + + // Otherwise, find the next edge outside the outline + LinedefSide next = FindOuterEdge(); + + // If none was found, we're outside the map + if(next == null) + { + //DebugConsole.WriteLine("TraceSector aborted: no outer edge"); + return false; + } + + // Repeat with this edge + line = next.Line; + front = next.Front; + } + + //DebugConsole.WriteLine("FindOuterEdge: " + o_edges.Count + " lines"); + + // Trace all inner outlines, by tracing from the rightmost vertex + // until all vertices have been discarded + for(int a = 0; a < 10000; a++) + { + // Get inner edge + LinedefSide edge = FindInnerEdge(); + + // Check if we're done + if(edge == null) + { + //DebugConsole.WriteLine("No inner edge found (no edge)"); + break; + } + + // Trace outline from edge + if(!TraceOutline(edge.Line, edge.Front)) + { + //DebugConsole.WriteLine("No inner edge found (TraceOutline failed)"); + break; + } + + // Discard any vertices outside the traced outline + vertex_valid.RemoveWhere(PointOutsideOutline); + //DebugConsole.WriteLine("vertex_valid: " + vertex_valid.Count + " verts after RemoveWhere"); + } + + //DebugConsole.WriteLine("FindInnerEdge: " + o_edges.Count + " lines"); + return true; + } + + ///<summary>Traces the sector outline from lines beginning at [line], + /// on either the front or back side ([front])</summary> + private bool TraceOutline(Linedef line, bool front) + { + // Check line was given + if(line == null) return false; + + //DebugConsole.WriteLine(" "); + //DebugConsole.WriteLine("Tracing line " + line.Index + (front ? " (front)" : " (back)")); + + // Init outline + o_edges.Clear(); + o_bbox = RectangleF.Empty; + LinedefSide start = new LinedefSide(line, front); + o_edges.Add(start); + int edge_sum = 0; + Dictionary<Linedef, int> visited_lines = new Dictionary<Linedef, int>(); + + // Begin tracing + LinedefSide edge = new LinedefSide(line, front); + vertex_right = edge.Line.Start; + for(int a = 0; a < 10000; a++) + { + // Update edge sum (for clockwise detection) + if(edge.Front) + edge_sum += (int)(edge.Line.Start.Position.x * edge.Line.End.Position.y - edge.Line.End.Position.x * edge.Line.Start.Position.y); + else + edge_sum += (int)(edge.Line.End.Position.x * edge.Line.Start.Position.y - edge.Line.Start.Position.x * edge.Line.End.Position.y); + + // Update rightmost vertex + if(edge.Line.Start.Position.x > vertex_right.Position.x) + vertex_right = edge.Line.Start; + if(edge.Line.End.Position.x > vertex_right.Position.x) + vertex_right = edge.Line.End; + + // Get next edge. If no valid next edge was found, go back along the current line + LinedefSide edge_next = (NextEdge(edge, visited_lines) ?? new LinedefSide(edge.Line, !edge.Front)); + + //DebugConsole.WriteLine("Next line for " + edge.Line.Index + (edge.Front ? " (front)" : " (back)") + ": " + edge_next.Line.Index + (edge_next.Front ? " (front)" : " (back)")); + + // Discard edge vertices + vertex_valid.Remove(edge_next.Line.Start); + vertex_valid.Remove(edge_next.Line.End); + + //DebugConsole.WriteLine("vertex_valid: " + vertex_valid.Count + " verts after Remove (in TraceOutline)"); + + // Check if we're back to the start + if(edge_next.Line == start.Line && edge_next.Front == start.Front) + break; + + // Add edge to outline + o_edges.Add(edge_next); + edge.Line = edge_next.Line; + edge.Front = edge_next.Front; + + // Update bounding box + RectangleF l_bbox = RectangleF.FromLTRB( + Math.Min(edge.Line.Start.Position.x, edge.Line.End.Position.x), // left + Math.Min(edge.Line.Start.Position.y, edge.Line.End.Position.y), // top + Math.Max(edge.Line.Start.Position.x, edge.Line.End.Position.x), // right + Math.Max(edge.Line.Start.Position.y, edge.Line.End.Position.y)); // bottom + + //mxd. As it turned out, o_bbox.IsEmpty was not what we needed... + o_bbox = (o_bbox == RectangleF.Empty ? l_bbox : RectangleF.Union(o_bbox, l_bbox)); + } + + // Check if outline is clockwise + o_clockwise = (edge_sum < 0); + + //DebugConsole.WriteLine("TraceOutline for line " + line.Index + " (" + (front ? "front":"back") + ") found " + o_edges.Count + " edges; o_clockwise=" + o_clockwise); + + // Add outline edges to sector edge list + sector_edges.AddRange(o_edges); + + // Trace complete + return true; + } + + /// <summary>Finds the next closest edge outside of the current outline (that isn't part of the current outline)</summary> + private LinedefSide FindOuterEdge() + { + // Check we have a rightmost vertex + if(vertex_right == null) return null; + + // Init + float vr_x = vertex_right.Position.x; + float vr_y = vertex_right.Position.y; + float min_dist = float.MaxValue; + Linedef nearest = null; + + // Fire a ray east from the vertex and find the first line it crosses + foreach(Linedef line in General.Map.Map.Linedefs) + { + // Ignore if the line is completely left of the vertex + if(line.Start.Position.x <= vr_x && line.End.Position.x <= vr_x) continue; + + // Ignore horizontal lines + if(line.Start.Position.y == line.End.Position.y) continue; + + // Ignore if the line doesn't intersect the y value + if((line.Start.Position.y < vr_y && line.End.Position.y < vr_y) || + (line.Start.Position.y > vr_y && line.End.Position.y > vr_y)) + continue; + + // Get x intercept + float int_frac = (vr_y - line.Start.Position.y) / (line.End.Position.y - line.Start.Position.y); + float int_x = line.Start.Position.x + ((line.End.Position.x - line.Start.Position.x) * int_frac); + float dist = Math.Abs(int_x - vr_x); + + // Check if closest + if(nearest == null || dist < min_dist) + { + min_dist = dist; + nearest = line; + } + else if(Math.Abs(dist - min_dist) < 0.001f) + { + // In the case of a tie, use the distance to each line as a tiebreaker - this fixes cases where the ray hits a vertex + // shared by two lines. Choosing the further line would mean choosing an inner edge, which is clearly wrong. + float line_dist = line.SafeDistanceToSq(vertex_right.Position, true); + float nearest_dist = nearest.SafeDistanceToSq(vertex_right.Position, true); + if(line_dist < nearest_dist) + { + min_dist = dist; + nearest = line; + } + } + } + + // Check for valid line + if(nearest == null) return null; + + // Determine the edge side + float side = -nearest.SideOfLine(vertex_right.Position); //mxd. SideOfLine logic is inverted in Slade 3 + return new LinedefSide(nearest, side > 0); //mxd. The meaning of 0.0 is also inverted!!! (I've spent 2 days figuring this out...) + } + + /// <summary>Find the closest edge within the current outline (that isn't part of the current outline)</summary> + private LinedefSide FindInnerEdge() + { + //DebugConsole.WriteLine("FindInnerEdge: processing " + vertex_valid.Count + " verts"); + + // Find rightmost non-discarded vertex + vertex_right = null; + foreach(Vertex v in vertex_valid) + { + // Set rightmost if no current rightmost vertex + if(vertex_right == null) + { + vertex_right = v; + continue; + } + + // Check if the vertex is rightmost + if(v.Position.x > vertex_right.Position.x) + vertex_right = v; + } + + // If no vertex was found, we're done + if(vertex_right == null) + { + //DebugConsole.WriteLine("FindInnerEdge: no vertex_right"); + return null; + } + + // Go through vertex's connected lines, to find + // the line with the smallest angle parallel with + // the right side of the bbox + Linedef eline = null; + float min_angle = float.MaxValue; + foreach(Linedef line in vertex_right.Linedefs) + { + // Ignore if zero-length + if(line.Start == line.End) continue; + + // Get opposite vertex + Vertex opposite = (line.Start == vertex_right ? line.End : line.Start); + + // Determine angle + float angle = Angle2D.GetAngle(new Vector2D(vertex_right.Position.x + 32, vertex_right.Position.y), + new Vector2D(vertex_right.Position.x, vertex_right.Position.y), + new Vector2D(opposite.Position.x, opposite.Position.y)); + + // Check if minimum + if(angle < min_angle) + { + min_angle = angle; + eline = line; + } + } + + // If no line was found, something is wrong (the vertex may have no attached lines) + if(eline == null) + { + // Discard vertex and try again + vertex_valid.Remove(vertex_right); + //DebugConsole.WriteLine("vertex_valid: " + vertex_valid.Count + " verts after Remove (in FindInnerEdge)"); + + return FindInnerEdge(); + } + + // Determine appropriate side + return new LinedefSide(eline, (vertex_right == eline.Start)); + } + + ///<summary>Finds the next adjacent edge to [edge], ie the adjacent edge that creates the smallest angle</summary> + private static LinedefSide NextEdge(LinedefSide edge, Dictionary<Linedef, int> visited_lines) + { + // Get relevant vertices + Vertex vertex; // Vertex to be tested + Vertex vertex_prev; // 'Previous' vertex + if(edge.Front) + { + vertex = edge.Line.End; + vertex_prev = edge.Line.Start; + } + else + { + vertex = edge.Line.Start; + vertex_prev = edge.Line.End; + } + + // Find next connected line with the lowest angle + float min_angle = Angle2D.PI2; + LinedefSide next = null; + foreach(Linedef line in vertex.Linedefs) + { + // Ignore original line + if(line == edge.Line) continue; + + // Ignore if zero-length + if(line.Start.Position == line.End.Position) continue; + + // Get next vertex + Vertex vertex_next; + bool front = true; + if(line.Start == vertex) + { + vertex_next = line.End; + } + else + { + vertex_next = line.Start; + front = false; + } + + // Ignore already-traversed lines + int side = (front ? 1 : 2); + if(visited_lines.ContainsKey(line) && (visited_lines[line] & side) == side) continue; + + + // Determine angle between lines + float angle = Angle2D.GetAngle(new Vector2D(vertex_prev.Position.x, vertex_prev.Position.y), + new Vector2D(vertex.Position.x, vertex.Position.y), + new Vector2D(vertex_next.Position.x, vertex_next.Position.y)); + + // Check if minimum angle + if(angle < min_angle) + { + min_angle = angle; + + if(next == null) + { + next = new LinedefSide(line, front); + } + else + { + next.Line = line; + next.Front = front; + } + } + } + + // Return the next edge found + if(next == null) return null; + if(!visited_lines.ContainsKey(next.Line)) visited_lines.Add(next.Line, 0); + visited_lines[next.Line] |= (next.Front ? 1 : 2); + return next; + } + + /// <summary>Returns true if the vertex is outside the current outline</summary> + private bool PointOutsideOutline(Vertex v) + { + // Check with bounding box + Vector2D point = v.Position; + bool pointwithin = (point.x >= o_bbox.Left && point.x <= o_bbox.Right && point.y >= o_bbox.Top && point.y <= o_bbox.Bottom); + if(!pointwithin) + { + // If the point is not within the bbox and the outline is clockwise, it can't be within the outline + // On the other hand, if the outline is anticlockwise, the point *must* be 'within' the outline + return o_clockwise; + } + + // Find nearest edge + int nearest = NearestEdge(point); + if(nearest >= 0) + { + // Check what side of the edge the point is on + float side = -o_edges[nearest].Line.SideOfLine(point); //mxd. SideOfLine logic is inverted in Slade 3 + //mxd. The meaning of 0.0 is also inverted!!! + + // Return false if it is on the correct side + if(side > 0 && o_edges[nearest].Front) + { + //DebugConsole.WriteLine("Point " + point + " is within outline (infront of line) " + nearest); + return false; + } + if(side <= 0 && !o_edges[nearest].Front) + { + //DebugConsole.WriteLine("Point " + point + " is within outline (at the back of line) " + nearest); + return false; + } + } + + // Not within the outline + //DebugConsole.WriteLine("Point " + point + " is outside outline"); + return true; + } + + private int NearestEdge(Vector2D point) + { + // Init variables + float min_dist = float.MaxValue; + int nearest = -1; + + // Go through edges + for(int i = 0; i < o_edges.Count; i++) + { + // Get distance to edge + float dist = o_edges[i].Line.SafeDistanceToSq(point, true); + + // Check if minimum + if(dist < min_dist) + { + min_dist = dist; + nearest = i; + } + } + + // Return nearest edge index + return nearest; + } + + /// <summary>Checks if the traced sector is valid (ie. all edges are currently referencing the same (existing) sector)</summary> + public bool IsValidSector() + { + if(sector_edges.Count == 0) return false; + + // Get first edge's sector + Sector sector = (sector_edges[0].Front ? + (sector_edges[0].Line.Front != null ? sector_edges[0].Line.Front.Sector : null) : + (sector_edges[0].Line.Back != null ? sector_edges[0].Line.Back.Sector : null)); + + // Sector is invalid if any edge has no current sector + if(sector == null) return false; + + // Go through subsequent edges + for(int a = 1; a < sector_edges.Count; a++) + { + // Get edge sector + Sector ssector = (sector_edges[a].Front ? + (sector_edges[a].Line.Front != null ? sector_edges[a].Line.Front.Sector : null) : + (sector_edges[a].Line.Back != null ? sector_edges[a].Line.Back.Sector : null)); + + // Check if different + if(sector != ssector) return false; + } + + // Return true if the entire sector was traced + return (sector.Sidedefs.Count == sector_edges.Count); + } + + /// <summary>Finds any existing sector that is already part of the traced new sector</summary> + internal Sector FindExistingSector(HashSet<Sidedef> sides_ignore) + { + // Go through new sector edges + Sector sector = null; + Sector sector_priority = null; + foreach(LinedefSide edge in sector_edges) + { + // Check if the edge's corresponding MapSide has a front sector + if(edge.Front && edge.Line.Front != null && edge.Line.Front.Sector != null) + { + if(sides_ignore.Contains(edge.Line.Front)) + sector = edge.Line.Front.Sector; + else + sector_priority = edge.Line.Front.Sector; + } + + // Check if the edge's corresponding MapSide has a back sector + if(!edge.Front && edge.Line.Back != null && edge.Line.Back.Sector != null) + { + if(sides_ignore.Contains(edge.Line.Back)) + sector = edge.Line.Back.Sector; + else + sector_priority = edge.Line.Back.Sector; + } + } + + return (sector_priority ?? sector); + } + + /// <summary>Sets all traced edges to [sector], or creates a new sector using properties + /// from [sector_copy] if none given</summary> + internal void CreateSector(Sector sector, Sector sector_copy) + { + // Create the sector if needed + if(sector == null) + { + sector = General.Map.Map.CreateSector(); + if(sector == null) return; + sector.Marked = true; //mxd + + // Find potential sector to copy if none specified + if(sector_copy == null) sector_copy = FindCopySector(); + if(sector_copy != null) sector_copy.CopyPropertiesTo(sector); + } + + //DebugConsole.WriteLine(" "); + //DebugConsole.WriteLine("Creating sector " + sector.Index + " from " + sector_edges.Count + " lines"); + //DebugConsole.WriteLine("*************************************************************"); + //DebugConsole.WriteLine(" "); + + // Set sides to new sector + foreach(LinedefSide edge in sector_edges) + { + Sidedef target = (edge.Front ? edge.Line.Front : edge.Line.Back); + if(target != null) + { + if(target.Sector != sector) + { + bool targetwas2s = (target.Other != null); + target.SetSector(sector); //mxd. Reattach side + + //mxd. Mark for texture adjustments if sidedness was changed. + //mxd. Also keep existing mark if the side was already marked. + target.Marked |= ((targetwas2s && target.Other == null) || (!targetwas2s && target.Other != null)); + } + } + else + { + target = General.Map.Map.CreateSidedef(edge.Line, edge.Front, sector); //mxd. Create new side + target.Marked = true; //mxd. Mark it for texture adjustments + if(target.Other != null) + { + //mxd. Better than nothing + target.Other.CopyPropertiesTo(target); + + //mxd. Other was singlesided. We'll need to adjust it's textures as well + target.Other.Marked = true; + } + } + } + } + + /// <summary>Finds an appropriate existing sector to copy properties from, for the new sector being built</summary> + private Sector FindCopySector() + { + // Go through new sector edges + Sector sector_copy = null; + foreach(LinedefSide edge in sector_edges) + { + // Check if the edge's corresponding MapSide has a front sector + if(edge.Line.Front != null && edge.Line.Front.Sector != null) + { + // Set sector to copy + sector_copy = edge.Line.Front.Sector; + + // If the edge is a front edge, use this sector and ignore all else + if(edge.Front) break; + } + + // Check if the edge's corresponding MapSide has a back sector + if(edge.Line.Back != null && edge.Line.Back.Sector != null) + { + // Set sector to copy + sector_copy = edge.Line.Back.Sector; + + // If the edge is a back edge, use this sector and ignore all else + if(!edge.Front) break; + } + } + + return sector_copy; + } + + #endregion + } +} diff --git a/Source/Core/Map/Sidedef.cs b/Source/Core/Map/Sidedef.cs index f6557b293018cddb9c670b29fa9552aec16a508e..178cee9cb501e8e09da6ee1f2e2499c0eae3a27a 100644 --- a/Source/Core/Map/Sidedef.cs +++ b/Source/Core/Map/Sidedef.cs @@ -323,6 +323,15 @@ namespace CodeImp.DoomBuilder.Map return new Dictionary<string, bool>(flags); } + //mxd. This returns enabled flags + public HashSet<string> GetEnabledFlags() + { + HashSet<string> result = new HashSet<string>(); + foreach(KeyValuePair<string, bool> group in flags) + if(group.Value) result.Add(group.Key); + return result; + } + // This clears all flags public void ClearFlags() { @@ -331,18 +340,7 @@ namespace CodeImp.DoomBuilder.Map } // This removes textures that are not required - public void RemoveUnneededTextures(bool removemiddle) - { - RemoveUnneededTextures(removemiddle, false, false); - } - - // This removes textures that are not required - public void RemoveUnneededTextures(bool removemiddle, bool force) - { - RemoveUnneededTextures(removemiddle, force, false); - } - - // This removes textures that are not required + public void RemoveUnneededTextures(bool removemiddle) { RemoveUnneededTextures(removemiddle, false, false); } public void RemoveUnneededTextures(bool removemiddle, bool force, bool shiftmiddle) { bool changed = false; //mxd @@ -352,7 +350,7 @@ namespace CodeImp.DoomBuilder.Map if(force || ((linedef.Tag == 0) && (linedef.Action == 0) && (sector.Tag == 0) && ((Other == null) || (Other.sector.Tag == 0)))) { - if(!HighRequired()) + if(General.Settings.AutoClearSidedefTextures && !HighRequired()) { BeforePropsChange(); //mxd changed = true; @@ -360,13 +358,13 @@ namespace CodeImp.DoomBuilder.Map this.longtexnamehigh = MapSet.EmptyLongName; General.Map.IsChanged = true; } - else if(shiftmiddle && this.longtexnamehigh == MapSet.EmptyLongName) //mxd + else if(shiftmiddle && this.longtexnamehigh == MapSet.EmptyLongName && HighRequired()) //mxd { SetTextureHigh(this.texnamemid); changed = true; } - if(!LowRequired()) + if(General.Settings.AutoClearSidedefTextures && !LowRequired()) { if(!changed) //mxd { @@ -376,8 +374,8 @@ namespace CodeImp.DoomBuilder.Map this.texnamelow = "-"; this.longtexnamelow = MapSet.EmptyLongName; General.Map.IsChanged = true; - } - else if(shiftmiddle && this.longtexnamelow == MapSet.EmptyLongName) //mxd + } + else if(shiftmiddle && this.longtexnamelow == MapSet.EmptyLongName && LowRequired()) //mxd { SetTextureLow(this.texnamemid); changed = true; @@ -612,6 +610,15 @@ namespace CodeImp.DoomBuilder.Map // Counts as a half coice for copying offsets copyoffsets += 1; + + //mxd. Also copy UDMF offsets and scale + if(General.Map.UDMF) + { + UniFields.SetFloat(s.Fields, "offsetx_top", Fields.GetValue("offsetx_top", 0f), 0f); + UniFields.SetFloat(s.Fields, "offsety_top", Fields.GetValue("offsety_top", 0f), 0f); + UniFields.SetFloat(s.Fields, "scalex_top", Fields.GetValue("scalex_top", 1.0f), 1.0f); + UniFields.SetFloat(s.Fields, "scaley_top", Fields.GetValue("scaley_top", 1.0f), 1.0f); + } } // Middle texture set? @@ -623,6 +630,15 @@ namespace CodeImp.DoomBuilder.Map // Counts for copying offsets copyoffsets += 2; + + //mxd. Also copy UDMF offsets and scale + if(General.Map.UDMF) + { + UniFields.SetFloat(s.Fields, "offsetx_mid", Fields.GetValue("offsetx_mid", 0f), 0f); + UniFields.SetFloat(s.Fields, "offsety_mid", Fields.GetValue("offsety_mid", 0f), 0f); + UniFields.SetFloat(s.Fields, "scalex_mid", Fields.GetValue("scalex_mid", 1.0f), 1.0f); + UniFields.SetFloat(s.Fields, "scaley_mid", Fields.GetValue("scaley_mid", 1.0f), 1.0f); + } } // Lower texture set? @@ -634,6 +650,15 @@ namespace CodeImp.DoomBuilder.Map // Counts as a half coice for copying offsets copyoffsets += 1; + + //mxd. Also copy UDMF offsets and scale + if(General.Map.UDMF) + { + UniFields.SetFloat(s.Fields, "offsetx_bottom", Fields.GetValue("offsetx_bottom", 0f), 0f); + UniFields.SetFloat(s.Fields, "offsety_bottom", Fields.GetValue("offsety_bottom", 0f), 0f); + UniFields.SetFloat(s.Fields, "scalex_bottom", Fields.GetValue("scalex_bottom", 1.0f), 1.0f); + UniFields.SetFloat(s.Fields, "scaley_bottom", Fields.GetValue("scaley_bottom", 1.0f), 1.0f); + } } // Copy offsets also? @@ -646,6 +671,17 @@ namespace CodeImp.DoomBuilder.Map General.Map.IsChanged = true; } + + //mxd. String representation + public override string ToString() + { +#if DEBUG + return "Sidedef " + listindex + (marked ? " (marked)" : "") + " (Line " + linedef.Index + (linedef.Marked ? " (marked)" : "") + ", Sector " + sector.Index + (sector.Marked ? " (marked)" : "") + ")"; +#else + return "Sidedef " + listindex; +#endif + } + #endregion @@ -755,7 +791,8 @@ namespace CodeImp.DoomBuilder.Map float scaleTop = Fields.GetValue("scalex_top", 1.0f); float value = Fields.GetValue("offsetx_top", 0f); - float result = (float)(Math.Round(value + offset * scaleTop) % texture.Width); + float result = (float)(Math.Round(value + offset * scaleTop)); + if(texture.IsImageLoaded) result %= texture.Width; UniFields.SetFloat(Fields, "offsetx_top", result); } @@ -766,7 +803,8 @@ namespace CodeImp.DoomBuilder.Map float scaleMid = Fields.GetValue("scalex_mid", 1.0f); float value = Fields.GetValue("offsetx_mid", 0f); - float result = (float)(Math.Round(value + offset * scaleMid) % texture.Width); + float result = (float)(Math.Round(value + offset * scaleMid)); + if(texture.IsImageLoaded) result %= texture.Width; UniFields.SetFloat(Fields, "offsetx_mid", result); } @@ -777,7 +815,8 @@ namespace CodeImp.DoomBuilder.Map float scaleLow = Fields.GetValue("scalex_bottom", 1.0f); float value = Fields.GetValue("offsetx_bottom", 0f); - float result = (float)(Math.Round(value + offset * scaleLow) % texture.Width); + float result = (float)(Math.Round(value + offset * scaleLow)); + if(texture.IsImageLoaded) result %= texture.Width; UniFields.SetFloat(Fields, "offsetx_bottom", result); } } diff --git a/Source/Core/Map/Thing.cs b/Source/Core/Map/Thing.cs index d33cade65328a25d4c75e969e466be74f3faff4b..6ed192c1006aa091de250b906a928d11a93777c0 100644 --- a/Source/Core/Map/Thing.cs +++ b/Source/Core/Map/Thing.cs @@ -649,8 +649,17 @@ namespace CodeImp.DoomBuilder.Map if (General.Map.SRB2) pos.z = value >> 4; } - // This clears all flags - public void ClearFlags() + //mxd. This returns enabled flags + public HashSet<string> GetEnabledFlags() + { + HashSet<string> result = new HashSet<string>(); + foreach(KeyValuePair<string, bool> group in flags) + if(group.Value) result.Add(group.Key); + return result; + } + + // This clears all flags + public void ClearFlags() { BeforePropsChange(); diff --git a/Source/Core/Map/UniFields.cs b/Source/Core/Map/UniFields.cs index 371cc4e93630820d57bec4e0033afc2fe64d051e..316c36bc1ac16613ddffebc23f4a39cbefe04d34 100644 --- a/Source/Core/Map/UniFields.cs +++ b/Source/Core/Map/UniFields.cs @@ -224,11 +224,11 @@ namespace CodeImp.DoomBuilder.Map public static bool UniValuesMatch(UniValue val1, UniValue val2) { if(val1.Type != val2.Type) return false; - if(val1.Value is int) return (int)val1.Value != (int)val2.Value; - if(val1.Value is float) return (float)val1.Value != (float)val2.Value; - if(val1.Value is bool) return (bool)val1.Value != (bool)val2.Value; - if(val1.Value is string) return (string)val1.Value != (string)val2.Value; - throw new Exception("Got unknown Custom Field type to compare: " + val1.Value.GetType()); + if(val1.Value is int) return (int)val1.Value == (int)val2.Value; + if(val1.Value is float) return (float)val1.Value == (float)val2.Value; + if(val1.Value is bool) return (bool)val1.Value == (bool)val2.Value; + if(val1.Value is string) return (string)val1.Value == (string)val2.Value; + throw new NotImplementedException("Unknown Custom Field type: " + val1.Value.GetType()); } /// <summary>This compares types and values of given UniFields by key.</summary> diff --git a/Source/Core/Map/UniValue.cs b/Source/Core/Map/UniValue.cs index 885f4a6dcdec61bbbb2d268a167d64c9b04d9477..7a582c05a34f3921ed6db25bf267e5dba5579181 100644 --- a/Source/Core/Map/UniValue.cs +++ b/Source/Core/Map/UniValue.cs @@ -126,6 +126,7 @@ namespace CodeImp.DoomBuilder.Map } case UniversalType.AngleDegrees: + case UniversalType.AngleByte: //mxd case UniversalType.Color: case UniversalType.EnumBits: case UniversalType.EnumOption: diff --git a/Source/Core/Map/Vertex.cs b/Source/Core/Map/Vertex.cs index 0bb6df1d813e7e3ba40fd431734cc95c34ec6617..59b313579b23291cab655e717861808d91abf11d 100644 --- a/Source/Core/Map/Vertex.cs +++ b/Source/Core/Map/Vertex.cs @@ -329,7 +329,11 @@ namespace CodeImp.DoomBuilder.Map // String representation public override string ToString() { +#if DEBUG + return "Vertex " + Index + " (" + pos + (marked ? "; marked" : "") + ")"; +#else return "Vertex (" + pos + ")"; +#endif } #endregion diff --git a/Source/Core/Properties/AssemblyInfo.cs b/Source/Core/Properties/AssemblyInfo.cs index 0b3ba79b459f5771fe495a7be77c2aac9e14355a..99480e09f12c82b20b538017f24d638aec7905e1 100644 --- a/Source/Core/Properties/AssemblyInfo.cs +++ b/Source/Core/Properties/AssemblyInfo.cs @@ -1,5 +1,6 @@ using System.Reflection; using System.Runtime.InteropServices; +using System.Resources; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -28,4 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.14.0.2501")] \ No newline at end of file +[assembly: AssemblyVersion("2.14.0.2501")] +[assembly: NeutralResourcesLanguageAttribute("en")] diff --git a/Source/Core/Properties/Resources.Designer.cs b/Source/Core/Properties/Resources.Designer.cs index 3d08104b9a6b02400bddd0152f2facb8cdbb1191..45aa3558a0cedf7d6e892f4d825e5947548a28d1 100644 --- a/Source/Core/Properties/Resources.Designer.cs +++ b/Source/Core/Properties/Resources.Designer.cs @@ -90,9 +90,55 @@ namespace CodeImp.DoomBuilder.Properties { } } - /// <summary> - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// </summary> + internal static System.Drawing.Bitmap Angle1 { + get { + object obj = ResourceManager.GetObject("Angle1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap Angle2 { + get { + object obj = ResourceManager.GetObject("Angle2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap Angle3 { + get { + object obj = ResourceManager.GetObject("Angle3", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap Angle4 { + get { + object obj = ResourceManager.GetObject("Angle4", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap Angle5 { + get { + object obj = ResourceManager.GetObject("Angle5", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap Angle6 { + get { + object obj = ResourceManager.GetObject("Angle6", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap Angle7 { + get { + object obj = ResourceManager.GetObject("Angle7", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Bitmap ArrowDown { get { object obj = ResourceManager.GetObject("ArrowDown", resourceCulture); @@ -407,19 +453,6 @@ namespace CodeImp.DoomBuilder.Properties { } } - /// <summary> - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// </summary> - internal static System.Drawing.Bitmap fx { - get { - object obj = ResourceManager.GetObject("fx", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// <summary> - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// </summary> internal static System.Drawing.Bitmap Grid2 { get { object obj = ResourceManager.GetObject("Grid2", resourceCulture); @@ -707,9 +740,20 @@ namespace CodeImp.DoomBuilder.Properties { } } - /// <summary> - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// </summary> + internal static System.Drawing.Bitmap MergeGeo { + get { + object obj = ResourceManager.GetObject("MergeGeo", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap MergeGeoClassic { + get { + object obj = ResourceManager.GetObject("MergeGeoClassic", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Bitmap mergegeometry { get { object obj = ResourceManager.GetObject("mergegeometry", resourceCulture); @@ -727,9 +771,13 @@ namespace CodeImp.DoomBuilder.Properties { } } - /// <summary> - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// </summary> + internal static System.Drawing.Bitmap MergeGeoRemoveLines { + get { + object obj = ResourceManager.GetObject("MergeGeoRemoveLines", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Bitmap MissingTexture { get { object obj = ResourceManager.GetObject("MissingTexture", resourceCulture); @@ -1267,9 +1315,13 @@ namespace CodeImp.DoomBuilder.Properties { } } - /// <summary> - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// </summary> + internal static System.Drawing.Bitmap SplitSectors { + get { + object obj = ResourceManager.GetObject("SplitSectors", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Bitmap Status0 { get { object obj = ResourceManager.GetObject("Status0", resourceCulture); diff --git a/Source/Core/Properties/Resources.resx b/Source/Core/Properties/Resources.resx index faedf29a05bf2d798a12376a27dd7abda5deacec..7c9ac1f578ddaf7e88289442529faef50a941606 100644 --- a/Source/Core/Properties/Resources.resx +++ b/Source/Core/Properties/Resources.resx @@ -271,9 +271,6 @@ <data name="Warning" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Warning.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="fx" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\fx.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> - </data> <data name="mergegeometry2" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\mergegeometry2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> @@ -577,6 +574,39 @@ <data name="FixedThingsScale" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\FixedThingsScale.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="Angle1" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Angle1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Angle2" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Angle2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Angle3" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Angle3.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Angle4" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Angle4.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Angle5" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Angle5.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Angle6" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Angle6.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Angle7" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Angle7.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="MergeGeo" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\MergeGeo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="MergeGeoClassic" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\MergeGeoClassic.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="MergeGeoRemoveLines" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\MergeGeoRemoveLines.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="SplitSectors" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\SplitSectors.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="Snap1mp" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Snap1mp.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> diff --git a/Source/Core/Rendering/ColorCollection.cs b/Source/Core/Rendering/ColorCollection.cs index a68fdcf61f422f13ddc5873eb093d7d8309e9705..65d7c1a96ab762e0abaaadff1a5af62ae3c78ddc 100644 --- a/Source/Core/Rendering/ColorCollection.cs +++ b/Source/Core/Rendering/ColorCollection.cs @@ -37,7 +37,7 @@ namespace CodeImp.DoomBuilder.Rendering private const float DARK_ADDITION = -0.2f; // Palette size - private const int NUM_COLORS = 62; + private const int NUM_COLORS = 63; public const int NUM_THING_COLORS = 20; public const int THING_COLORS_OFFSET = 20; @@ -104,6 +104,7 @@ namespace CodeImp.DoomBuilder.Rendering public const int PROPERTIES = 59; public const int WAYPOINTCOLOR = 60; public const int WAYPOINTLOOPCOLOR = 61; + public const int GUIDELINECOLOR = 62; //mxd #endregion #region ================== Variables @@ -136,6 +137,7 @@ namespace CodeImp.DoomBuilder.Rendering //mxd public PixelColor ModelWireframe { get { return colors[MODELWIRECOLOR]; } internal set { colors[MODELWIRECOLOR] = value; } } public PixelColor InfoLine { get { return colors[INFOLINECOLOR]; } internal set { colors[INFOLINECOLOR] = value; } } + public PixelColor Guideline { get { return colors[GUIDELINECOLOR]; } internal set { colors[GUIDELINECOLOR] = value; } } public PixelColor ThreeDFloor { get { return colors[THREEDFLOORCOLOR]; } internal set { colors[THREEDFLOORCOLOR] = value;} } public PixelColor Crosshair3D { get { return colors[CROSSHAIR3D]; } internal set { colors[CROSSHAIR3D] = value; } } @@ -181,8 +183,8 @@ namespace CodeImp.DoomBuilder.Rendering // Read color colors[i] = PixelColor.FromInt(cfg.ReadSetting("colors.color" + i.ToString(CultureInfo.InvariantCulture), 0)); } - // Set new colors + // Set new thing colors if(colors[THINGCOLOR00].ToInt() == 0) colors[THINGCOLOR00] = PixelColor.FromColor(Color.DimGray); if(colors[THINGCOLOR01].ToInt() == 0) colors[THINGCOLOR01] = PixelColor.FromColor(Color.RoyalBlue); if(colors[THINGCOLOR02].ToInt() == 0) colors[THINGCOLOR02] = PixelColor.FromColor(Color.ForestGreen); @@ -207,6 +209,7 @@ namespace CodeImp.DoomBuilder.Rendering if (colors[SCRIPTFOLDBACK].ToInt() == 0) colors[SCRIPTFOLDBACK] = PixelColor.FromColor(SystemColors.ControlLightLight); if (colors[WAYPOINTCOLOR].ToInt() == 0) colors[WAYPOINTCOLOR] = PixelColor.FromColor(Color.Orange); if (colors[WAYPOINTLOOPCOLOR].ToInt() == 0) colors[WAYPOINTLOOPCOLOR] = PixelColor.FromColor(Color.SaddleBrown); + if (colors[GUIDELINECOLOR].ToInt() == 0) colors[GUIDELINECOLOR] = PixelColor.FromInt(-256); // Create assist colors CreateAssistColors(); diff --git a/Source/Core/Rendering/CustomTextLabel.cs b/Source/Core/Rendering/CustomTextLabel.cs new file mode 100644 index 0000000000000000000000000000000000000000..9320d38aea9e1f21368800d7f085cf8b3c7449f7 --- /dev/null +++ b/Source/Core/Rendering/CustomTextLabel.cs @@ -0,0 +1,30 @@ +using System.Drawing; +using SlimDX.Direct3D9; +using Font = System.Drawing.Font; + +namespace CodeImp.DoomBuilder.Rendering +{ + //mxd. TextLabel wrapper + public abstract class CustomTextLabel : ITextLabel + { + protected TextLabel label; // Derived classes must create this! + + // Required to render text label + public bool SkipRendering { get { return label.SkipRendering; } } + public Texture Texture { get { return label.Texture; } } + public VertexBuffer VertexBuffer { get { return label.VertexBuffer; } } + public Font Font { get { return label.Font; } set { label.Font = value; } } + public string Text { get { return label.Text; } set { label.Text = value; } } + + // Access/setup + public TextLabel TextLabel { get { return label; } } + public PixelColor Color { get { return label.Color; } set { label.Color = value; } } + public PixelColor BackColor { get { return label.BackColor; } set { label.BackColor = value; } } + public SizeF TextSize { get { return label.TextSize; } } + + public void Update(float translatex, float translatey, float scalex, float scaley) + { + label.Update(translatex, translatey, scalex, scaley); + } + } +} diff --git a/Source/Core/Rendering/D3DDevice.cs b/Source/Core/Rendering/D3DDevice.cs index 888dfb1e3e991a5c26739e35ee493a22f67ee4e0..3ad542fc83e067dfcd8b1c2186a7185c2c09d3dc 100644 --- a/Source/Core/Rendering/D3DDevice.cs +++ b/Source/Core/Rendering/D3DDevice.cs @@ -57,8 +57,6 @@ namespace CodeImp.DoomBuilder.Rendering private ShaderManager shaders; private Surface backbuffer; private Surface depthbuffer; - private TextFont font; - private ResourceImage fonttexture; // Disposing private bool isdisposed; @@ -75,8 +73,6 @@ namespace CodeImp.DoomBuilder.Rendering internal ShaderManager Shaders { get { return shaders; } } internal Surface BackBuffer { get { return backbuffer; } } internal Surface DepthBuffer { get { return depthbuffer; } } - internal TextFont Font { get { return font; } } - internal Texture FontTexture { get { return fonttexture.Texture; } } internal Filter PostFilter { get { return postfilter; } } internal Filter MipGenerateFilter { get { return mipgeneratefilter; } } @@ -100,18 +96,16 @@ namespace CodeImp.DoomBuilder.Rendering // Disposer public void Dispose() { - // Not already disposed? - if (!isdisposed) - { - // Clean up - foreach (ID3DResource res in resources) res.UnloadResource(); - if (shaders != null) shaders.Dispose(); - rendertarget = null; - if (backbuffer != null) backbuffer.Dispose(); - if (depthbuffer != null) depthbuffer.Dispose(); - if (font != null) font.Dispose(); - if (fonttexture != null) fonttexture.Dispose(); - if (device != null) device.Dispose(); + // Not already disposed? + if(!isdisposed) + { + // Clean up + foreach(ID3DResource res in resources) res.UnloadResource(); + if(shaders != null) shaders.Dispose(); + rendertarget = null; + if(backbuffer != null) backbuffer.Dispose(); + if(depthbuffer != null) depthbuffer.Dispose(); + if(device != null) device.Dispose(); if (ObjectTable.Objects.Count > 1) //mxd. Direct3D itself is not disposed while the editor is running { @@ -290,14 +284,6 @@ namespace CodeImp.DoomBuilder.Rendering // Create shader manager shaders = new ShaderManager(this); - // Font - postfilter = Filter.Box; // Only for the font. This will be reset in SetupSettings (see below) - font = new TextFont(); - fonttexture = new ResourceImage("CodeImp.DoomBuilder.Resources.Font.png"); - fonttexture.LoadImage(); - fonttexture.MipMapLevels = 2; - fonttexture.CreateTexture(); - // Initialize settings SetupSettings(); diff --git a/Source/Core/Rendering/IRenderer2D.cs b/Source/Core/Rendering/IRenderer2D.cs index 6ae6863732a9f0185de2afdd21177c623557fa74..60f1f88629ab7e1db8db68cb6692783168dc7259 100644 --- a/Source/Core/Rendering/IRenderer2D.cs +++ b/Source/Core/Rendering/IRenderer2D.cs @@ -75,7 +75,9 @@ namespace CodeImp.DoomBuilder.Rendering void RenderLine(Vector2D start, Vector2D end, float thickness, PixelColor c, bool transformcoords); void RenderArrows(ICollection<Line3D> line); //mxd void RenderArrows(ICollection<Line3D> line, bool transformcoords); //mxd - void RenderText(TextLabel text); + void RenderText(TextLabel text); //mxd, DB2 compatibility + void RenderText(ITextLabel text); //mxd + void RenderText(IList<ITextLabel> labels); //mxd void RenderGeometry(FlatVertex[] vertices, ImageData texture, bool transformcoords); void RenderHighlight(FlatVertex[] vertices, int color); //mxd void RedrawSurface(); diff --git a/Source/Core/Rendering/PixelColor.cs b/Source/Core/Rendering/PixelColor.cs index a94b3035f7c6463dd6fabad231bbc9f6138b5a1e..aee50615084d55ac10462c074d6c0a6abc3c887a 100644 --- a/Source/Core/Rendering/PixelColor.cs +++ b/Source/Core/Rendering/PixelColor.cs @@ -208,6 +208,12 @@ namespace CodeImp.DoomBuilder.Rendering { return "[A=" + a + ", R=" + r + ", G=" + g + ", B=" + b + "]"; } + + //mxd + public bool Equals(PixelColor other) + { + return (r == other.r && g == other.g && b == other.b && a == other.a); + } #endregion } diff --git a/Source/Core/Rendering/Presentation.cs b/Source/Core/Rendering/Presentation.cs index 05f8ef1a465499694392b82b23e991222b889858..7b829753a111220873245f8e499a77ee37ed79e5 100644 --- a/Source/Core/Rendering/Presentation.cs +++ b/Source/Core/Rendering/Presentation.cs @@ -63,7 +63,7 @@ namespace CodeImp.DoomBuilder.Rendering standard = new Presentation(); standard.layers.Add(new PresentLayer(RendererLayer.Background, BlendingMode.Mask, General.Settings.BackgroundAlpha)); standard.layers.Add(new PresentLayer(RendererLayer.Surface, BlendingMode.Mask)); - standard.layers.Add(new PresentLayer(RendererLayer.Things, BlendingMode.Alpha, THINGS_BACK_ALPHA)); + standard.layers.Add(new PresentLayer(RendererLayer.Things, BlendingMode.Alpha, General.Settings.InactiveThingsAlpha)); standard.layers.Add(new PresentLayer(RendererLayer.Grid, BlendingMode.Mask)); standard.layers.Add(new PresentLayer(RendererLayer.Geometry, BlendingMode.Alpha, 1f, true)); standard.layers.Add(new PresentLayer(RendererLayer.Overlay, BlendingMode.Alpha, 1f, true)); @@ -75,8 +75,8 @@ namespace CodeImp.DoomBuilder.Rendering things.layers.Add(new PresentLayer(RendererLayer.Things, BlendingMode.Alpha, 1f)); things.layers.Add(new PresentLayer(RendererLayer.Grid, BlendingMode.Mask)); things.layers.Add(new PresentLayer(RendererLayer.Geometry, BlendingMode.Alpha, 1f, true)); - things.layers.Add(new PresentLayer(RendererLayer.Overlay, BlendingMode.Alpha, 1f, true)); things.layers.Add(new PresentLayer(RendererLayer.Things, BlendingMode.Alpha, 0.5f)); //mxd + things.layers.Add(new PresentLayer(RendererLayer.Overlay, BlendingMode.Alpha, 1f, true)); } } diff --git a/Source/Core/Rendering/Renderer.cs b/Source/Core/Rendering/Renderer.cs index c50ef49b20e796eba719043bfaa45e87cfec3dde..d013f9849391d26d73cb264ac21f4a1102da4105 100644 --- a/Source/Core/Rendering/Renderer.cs +++ b/Source/Core/Rendering/Renderer.cs @@ -89,15 +89,12 @@ namespace CodeImp.DoomBuilder.Rendering // This calculates the sector brightness level public int CalculateBrightness(int level) { - float flevel = level; - - // Simulat doom light levels + // Simulate doom light levels if((level < 192) && General.Map.Config.DoomLightLevels) - flevel = (192.0f - (192 - level) * 1.5f); + level = (int)(192.0f - (192 - level) * 1.5f); - byte blevel = (byte)General.Clamp((int)flevel, 0, 255); - PixelColor c = new PixelColor(255, blevel, blevel, blevel); - return c.ToInt(); + byte blevel = (byte)General.Clamp(level, 0, 255); + return new PixelColor(255, blevel, blevel, blevel).ToInt(); } //mxd. This calculates wall brightness level with doom-style shading diff --git a/Source/Core/Rendering/Renderer2D.cs b/Source/Core/Rendering/Renderer2D.cs index e5e5ad815c4c0743ffb9c928dde95f2620cd1412..9050c969b388ad4d8c5f1796f3acc653e476c319 100644 --- a/Source/Core/Rendering/Renderer2D.cs +++ b/Source/Core/Rendering/Renderer2D.cs @@ -51,11 +51,8 @@ namespace CodeImp.DoomBuilder.Rendering private const float THING_SPRITE_SHRINK = 2f; private const int THING_BUFFER_SIZE = 100; private const float MINIMUM_THING_RADIUS = 1.5f; //mxd - private const float MINIMUM_SPRITE_RADIUS = 5.5f; //mxd - - private const string FONT_NAME = "Verdana"; - private const int FONT_WIDTH = 0; - private const int FONT_HEIGHT = 0; + private const float MINIMUM_SPRITE_RADIUS = 8.0f; //mxd + internal const float FIXED_THING_SIZE = 48.0f; //mxd internal const int NUM_VIEW_MODES = 4; #endregion @@ -79,9 +76,6 @@ namespace CodeImp.DoomBuilder.Rendering private Size thingssize; private Size overlaysize; private Size backsize; - - // Font - private SlimDX.Direct3D9.Font font; // Geometry plotter private Plotter plotter; @@ -100,9 +94,6 @@ namespace CodeImp.DoomBuilder.Rendering // Surfaces private SurfaceManager surfaces; - // Images - private ResourceImage thingtexture; - // View settings (world coordinates) private ViewMode viewmode; private float scale; @@ -145,11 +136,6 @@ namespace CodeImp.DoomBuilder.Rendering // Constructor internal Renderer2D(D3DDevice graphics) : base(graphics) { - //mxd. Load thing texture - thingtexture = new ResourceImage("CodeImp.DoomBuilder.Resources.Thing2D.png") { UseColorCorrection = false }; - thingtexture.LoadImage(); - thingtexture.CreateTexture(); - // Create surface manager surfaces = new SurfaceManager(); @@ -168,7 +154,6 @@ namespace CodeImp.DoomBuilder.Rendering { // Destroy rendertargets DestroyRendertargets(); - thingtexture.Dispose(); //mxd // Dispose surface manager surfaces.Dispose(); @@ -370,10 +355,6 @@ namespace CodeImp.DoomBuilder.Rendering thingsvertices = null; lastgridscale = -1f; lastgridsize = 0; - - // Trash font - if(font != null) font.Dispose(); - font = null; } // Allocates new image memory to render on @@ -416,9 +397,6 @@ namespace CodeImp.DoomBuilder.Rendering graphics.ClearRendertarget(General.Colors.Background.WithAlpha(0).ToColorValue(), thingstex.GetSurfaceLevel(0), null); graphics.ClearRendertarget(General.Colors.Background.WithAlpha(0).ToColorValue(), overlaytex.GetSurfaceLevel(0), null); - // Create font - font = new SlimDX.Direct3D9.Font(graphics.Device, FONT_WIDTH, FONT_HEIGHT, FontWeight.Bold, 1, false, CharacterSet.Ansi, Precision.Default, FontQuality.Antialiased, PitchAndFamily.Default, FONT_NAME); - // Create vertex buffers screenverts = new VertexBuffer(graphics.Device, 4 * sizeof(FlatVertex), Usage.Dynamic | Usage.WriteOnly, VertexFormat.None, Pool.Default); thingsvertices = new VertexBuffer(graphics.Device, THING_BUFFER_SIZE * 12 * sizeof(FlatVertex), Usage.Dynamic | Usage.WriteOnly, VertexFormat.None, Pool.Default); @@ -652,7 +630,6 @@ namespace CodeImp.DoomBuilder.Rendering } renderlayer = RenderLayers.Plotter; - try { graphics.Device.SetRenderState(RenderState.FogEnable, false); } catch(Exception) { } // Rendertargets available? if(plottertex != null) @@ -694,7 +671,6 @@ namespace CodeImp.DoomBuilder.Rendering } renderlayer = RenderLayers.Things; - try { graphics.Device.SetRenderState(RenderState.FogEnable, false); } catch(Exception) { } // Rendertargets available? if(thingstex != null) @@ -731,7 +707,6 @@ namespace CodeImp.DoomBuilder.Rendering } renderlayer = RenderLayers.Overlay; - try { graphics.Device.SetRenderState(RenderState.FogEnable, false); } catch(Exception) { } // Rendertargets available? if(overlaytex != null) @@ -978,15 +953,31 @@ namespace CodeImp.DoomBuilder.Rendering // This makes vertices for a thing // Returns false when not on the screen - private bool CreateThingBoxVerts(Thing t, ref FlatVertex[] verts, ref List<Line3D> bboxes, Dictionary<Thing, Vector2D> thingsByPosition, int offset, PixelColor c, byte bboxalpha) + private bool CreateThingBoxVerts(Thing t, ref FlatVertex[] verts, ref List<Line3D> bboxes, Dictionary<Thing, Vector3D> thingsByPosition, int offset, PixelColor c, byte bboxalpha) { float thingsize = General.Settings.DrawThingsFixedSize ? General.Settings.DefaultThingSize : t.Size; if(thingsize * scale < MINIMUM_THING_RADIUS) return false; //mxd. Don't render tiny little things // Determine sizes - float circlesize = ((t.FixedSize || General.Settings.FixedThingsScale) && (scale > 1.0f) ? t.Size : t.Size * scale); - float bboxsize = ((!t.FixedSize && General.Settings.FixedThingsScale) && (scale > 1.0f) ? t.Size * scale : -1); //mxd - float screensize = Math.Max(circlesize, bboxsize); //mxd + float circlesize, bboxsize; + + if(t.FixedSize && scale > 1.0f) + { + circlesize = t.Size; + bboxsize = -1; + } + else if(General.Settings.FixedThingsScale && t.Size * scale > FIXED_THING_SIZE) + { + circlesize = FIXED_THING_SIZE; + bboxsize = t.Size * scale; + } + else + { + circlesize = t.Size * scale; + bboxsize = -1; + } + + float screensize = (bboxsize > 0 ? bboxsize : circlesize); //mxd // Transform to screen coordinates Vector2D screenpos = ((Vector2D)t.Position).GetTransformed(translatex, translatey, scale, -scale); @@ -1052,33 +1043,56 @@ namespace CodeImp.DoomBuilder.Rendering } //mxd - private void CreateThingArrowVerts(Thing t, ref FlatVertex[] verts, Vector2D screenpos, int offset) + private void CreateThingArrowVerts(Thing t, ref FlatVertex[] verts, Vector3D screenpos, int offset) { - // Determine size - float thingsize = General.Settings.DrawThingsFixedSize ? General.Settings.DefaultThingSize : t.Size; - float arrowsize = ((t.FixedSize || General.Settings.FixedThingsScale) && (scale > 1.0f) ? t.Size : t.Size * scale) * THING_ARROW_SIZE; //mxd + // Determine size + float thingsize = General.Settings.DrawThingsFixedSize ? General.Settings.DefaultThingSize : t.Size; + float arrowsize; + if(t.FixedSize && scale > 1.0f) + arrowsize = thingsize * THING_ARROW_SIZE; + else if(General.Settings.FixedThingsScale && thingsize * scale > FIXED_THING_SIZE) + arrowsize = FIXED_THING_SIZE * THING_ARROW_SIZE; + else + arrowsize = thingsize * scale * THING_ARROW_SIZE; // Setup rotated rect for arrow float sinarrowsize = (float)Math.Sin(t.Angle + Angle2D.PI * 0.25f) * arrowsize; float cosarrowsize = (float)Math.Cos(t.Angle + Angle2D.PI * 0.25f) * arrowsize; + // Sprite is not rendered? + float ut, ub, ul, ur; + if(screenpos.z < 0) + { + ul = 0.625f; + ur = 0.874f; + ut = -0.039f; + ub = 0.46f; + } + else + { + ul = 0.501f; + ur = 0.999f; + ut = 0.001f; + ub = 0.999f; + } + verts[offset].x = screenpos.x + sinarrowsize; verts[offset].y = screenpos.y + cosarrowsize; verts[offset].c = -1; - verts[offset].u = 0.501f; - verts[offset].v = 0.001f; + verts[offset].u = ul; + verts[offset].v = ut; offset++; verts[offset].x = screenpos.x - cosarrowsize; verts[offset].y = screenpos.y + sinarrowsize; verts[offset].c = -1; - verts[offset].u = 0.999f; - verts[offset].v = 0.001f; + verts[offset].u = ur; + verts[offset].v = ut; offset++; verts[offset].x = screenpos.x + cosarrowsize; verts[offset].y = screenpos.y - sinarrowsize; verts[offset].c = -1; - verts[offset].u = 0.501f; - verts[offset].v = 0.999f; + verts[offset].u = ul; + verts[offset].v = ub; offset++; verts[offset] = verts[offset - 2]; offset++; @@ -1087,8 +1101,8 @@ namespace CodeImp.DoomBuilder.Rendering verts[offset].x = screenpos.x - sinarrowsize; verts[offset].y = screenpos.y - cosarrowsize; verts[offset].c = -1; - verts[offset].u = 0.999f; - verts[offset].v = 0.999f; + verts[offset].u = ur; + verts[offset].v = ub; } //mxd @@ -1148,7 +1162,7 @@ namespace CodeImp.DoomBuilder.Rendering graphics.Device.SetStreamSource(0, thingsvertices, 0, FlatVertex.Stride); // Set things texture - graphics.Shaders.Things2D.Texture1 = thingtexture.Texture; + graphics.Shaders.Things2D.Texture1 = General.Map.Data.ThingTexture.Texture; //mxd SetWorldTransformation(false); graphics.Shaders.Things2D.SetSettings(alpha); @@ -1164,7 +1178,7 @@ namespace CodeImp.DoomBuilder.Rendering //mxd Dictionary<int, List<Thing>> thingsByType = new Dictionary<int, List<Thing>>(); Dictionary<int, List<Thing>> modelsByType = new Dictionary<int, List<Thing>>(); - Dictionary<Thing, Vector2D> thingsByPosition = new Dictionary<Thing, Vector2D>(); + Dictionary<Thing, Vector3D> thingsByPosition = new Dictionary<Thing, Vector3D>(); // Go for all things int buffercount = 0; @@ -1232,6 +1246,9 @@ namespace CodeImp.DoomBuilder.Rendering foreach(KeyValuePair<int, List<Thing>> group in thingsByType) { + // Skip when all things of this type will be rendered as models + if(group.Value[0].IsModel && (General.Settings.GZDrawModelsMode == ModelRenderMode.ALL)) continue; + // Find thing information ThingTypeInfo info = General.Map.Data.GetThingInfo(group.Key); @@ -1258,34 +1275,62 @@ namespace CodeImp.DoomBuilder.Rendering buffercount = 0; totalcount = 0; - float spriteWidth, spriteHeight; - float spriteScale = ((group.Value[0].FixedSize || General.Settings.FixedThingsScale) && (scale > 1.0f)) ? 1.0f : scale; + foreach(Thing t in group.Value) + { + if(t.IsModel && ((General.Settings.GZDrawModelsMode == ModelRenderMode.SELECTION && t.Selected) || (General.Settings.GZDrawModelsMode == ModelRenderMode.ACTIVE_THINGS_FILTER && alpha == 1.0f))) continue; + + bool forcespriterendering; + float spritewidth, spriteheight, spritescale; + + // Determine sizes + if(t.FixedSize && scale > 1.0f) + { + spritescale = 1.0f; + forcespriterendering = true; // Always render sprite when thing size is affected by FixedSize setting + } + else if(General.Settings.FixedThingsScale && t.Size * scale > FIXED_THING_SIZE) + { + spritescale = FIXED_THING_SIZE / t.Size; + forcespriterendering = true; // Always render sprite when thing size is affected by FixedThingsScale setting + } + else + { + spritescale = scale; + forcespriterendering = false; + } + // Calculate scaled sprite size float radius = General.Settings.DrawThingsFixedSize ? General.Settings.DefaultThingSize : info.Radius; if(sprite.Width > sprite.Height) { - spriteWidth = radius * spriteScale - THING_SPRITE_SHRINK * spriteScale; - spriteHeight = spriteWidth * ((float)sprite.Height / sprite.Width); + spritewidth = (radius - THING_SPRITE_SHRINK) * spritescale; + spriteheight = spritewidth * ((float)sprite.Height / sprite.Width); } else if(sprite.Width < sprite.Height) { - spriteHeight = radius * spriteScale - THING_SPRITE_SHRINK * spriteScale; - spriteWidth = spriteHeight * ((float)sprite.Width / sprite.Height); + spriteheight = (radius - THING_SPRITE_SHRINK) * spritescale; + spritewidth = spriteheight * ((float)sprite.Width / sprite.Height); } else { - spriteWidth = radius * spriteScale - THING_SPRITE_SHRINK * spriteScale; - spriteHeight = spriteWidth; + spritewidth = (radius - THING_SPRITE_SHRINK) * spritescale; + spriteheight = spritewidth; } - foreach(Thing t in group.Value) - { - if(t.IsModel && (General.Settings.GZDrawModelsMode == ModelRenderMode.ALL || (General.Settings.GZDrawModelsMode == ModelRenderMode.SELECTION && t.Selected) || (General.Settings.GZDrawModelsMode == ModelRenderMode.ACTIVE_THINGS_FILTER && alpha == 1.0f))) continue; - float thingsize = General.Settings.DrawThingsFixedSize ? General.Settings.DefaultThingSize : t.Size; - float scaler = thingsize / radius; - if(Math.Max(spriteWidth, spriteHeight) * scaler < MINIMUM_SPRITE_RADIUS) continue; //don't render tiny little sprites + float spritesize = Math.Max(spritewidth, spriteheight); - CreateThingSpriteVerts(thingsByPosition[t], spriteWidth * scaler, spriteHeight * scaler, ref verts, buffercount * 6, t.Selected ? selectionColor : 0xFFFFFF); + if(!forcespriterendering && spritesize < MINIMUM_SPRITE_RADIUS) + { + // Hackish way to tell arrow rendering code to draw bigger arrow... + Vector3D v = thingsByPosition[t]; + v.z = -1; + thingsByPosition[t] = v; + + // Don't render tiny little sprites + continue; + } + + CreateThingSpriteVerts(thingsByPosition[t], spritewidth, spriteheight, ref verts, buffercount * 6, (t.Selected ? selectionColor : 0xFFFFFF)); buffercount++; totalcount++; @@ -1323,7 +1368,7 @@ namespace CodeImp.DoomBuilder.Rendering graphics.Shaders.Things2D.EndPass(); //mxd. Render thing arrows - graphics.Shaders.Things2D.Texture1 = thingtexture.Texture; + graphics.Shaders.Things2D.Texture1 = General.Map.Data.ThingTexture.Texture; graphics.Shaders.Things2D.BeginPass(0); // Determine next lock size @@ -1334,7 +1379,7 @@ namespace CodeImp.DoomBuilder.Rendering buffercount = 0; totalcount = 0; - foreach(KeyValuePair<Thing, Vector2D> group in thingsByPosition) + foreach(KeyValuePair<Thing, Vector3D> group in thingsByPosition) { if(!group.Key.IsDirectional) continue; @@ -1393,7 +1438,7 @@ namespace CodeImp.DoomBuilder.Rendering foreach(KeyValuePair<int, List<Thing>> group in modelsByType) { - ModelData mde = General.Map.Data.ModeldefEntries[@group.Key]; + ModelData mde = General.Map.Data.ModeldefEntries[group.Key]; foreach(Thing t in group.Value) { if((General.Settings.GZDrawModelsMode == ModelRenderMode.SELECTION && !t.Selected) || (General.Settings.GZDrawModelsMode == ModelRenderMode.ACTIVE_THINGS_FILTER && alpha < 1.0f)) continue; @@ -1412,7 +1457,7 @@ namespace CodeImp.DoomBuilder.Rendering float sy = t.ScaleY * t.ActorScale.Height; Matrix modelscale = Matrix.Scaling(sx, sx, sy); - Matrix rotation = Matrix.RotationY(-t.RollRad) * Matrix.RotationX(-t.PitchRad) * Matrix.RotationZ(t.Angle); + Matrix rotation = Matrix.RotationY(-t.RollRad) * Matrix.RotationX(t.PitchRad) * Matrix.RotationZ(t.Angle); Matrix position = Matrix.Translation(screenpos.x, screenpos.y, 0.0f); Matrix world = General.Map.Data.ModeldefEntries[t.SRB2Type].Transform * modelscale * rotation * viewscale * position; @@ -1475,23 +1520,21 @@ namespace CodeImp.DoomBuilder.Rendering int i = 0; int size = waypoints.Count; int seqStart = 0; - TextLabel[] sequencelabels = new TextLabel[256]; + ITextLabel[] sequencelabels = new ITextLabel[256]; while (i < size) { int iNext = i + 1; if (waypoints[i].AngleDoom % 256 == 0) // start of a new sequence? { seqStart = i; - sequencelabels[waypoints[i].AngleDoom / 256] = new TextLabel(3) // create sequence ID label + sequencelabels[waypoints[i].AngleDoom / 256] = new TextLabel() // create sequence ID label { Text = (waypoints[i].AngleDoom / 256).ToString(), AlignX = TextAlignmentX.Center, AlignY = TextAlignmentY.Middle, Color = General.Colors.WaypointColor, - Backcolor = General.Colors.Background, - Scale = 16f, TransformCoords = true, - Rectangle = new RectangleF(waypoints[i].Position.x, waypoints[i].Position.y, 0.0f, 0.0f) + Location = waypoints[i].Position }; } if (iNext < size && waypoints[iNext].AngleDoom == waypoints[i].AngleDoom + 1) @@ -1677,35 +1720,82 @@ namespace CodeImp.DoomBuilder.Rendering graphics.Shaders.Things2D.End(); } + //mxd. This renders text (DB2 compatibility) + [Obsolete("Method is deprecated, please use RenderText(ITextLabel label) method instead.")] + public void RenderText(TextLabel label){ RenderText((ITextLabel)label); } + // This renders text - public void RenderText(TextLabel text) + public void RenderText(ITextLabel label) + { + //mxd. Update the text if needed + label.Update(translatex, translatey, scale, -scale); + if(label.SkipRendering) return; + + // Set renderstates for rendering + graphics.Device.SetRenderState(RenderState.CullMode, Cull.None); + graphics.Device.SetRenderState(RenderState.ZEnable, false); + graphics.Device.SetRenderState(RenderState.AlphaBlendEnable, true); + graphics.Device.SetRenderState(RenderState.AlphaTestEnable, false); + graphics.Device.SetRenderState(RenderState.TextureFactor, -1); + graphics.Device.SetRenderState(RenderState.FogEnable, false); + graphics.Shaders.Display2D.Texture1 = label.Texture; + SetWorldTransformation(false); + graphics.Shaders.Display2D.SetSettings(1f, 1f, 0f, 1f, false); + graphics.Device.SetStreamSource(0, label.VertexBuffer, 0, FlatVertex.Stride); + + // Draw + graphics.Shaders.Display2D.Begin(); + graphics.Shaders.Display2D.BeginPass(1); //mxd + graphics.Device.DrawPrimitives(PrimitiveType.TriangleStrip, 0, 2); + graphics.Shaders.Display2D.EndPass(); + graphics.Shaders.Display2D.End(); + } + + //mxd. This renders text + public void RenderText(IList<ITextLabel> labels) { - // Update the text if needed - text.Update(translatex, translatey, scale, -scale); + // Update labels + int skipped = 0; + foreach(ITextLabel label in labels) + { + // Update the text if needed + label.Update(translatex, translatey, scale, -scale); + if(label.SkipRendering) skipped++; + } + + if(labels.Count == skipped) return; + + // Set renderstates for rendering + graphics.Device.SetRenderState(RenderState.CullMode, Cull.None); + graphics.Device.SetRenderState(RenderState.ZEnable, false); + graphics.Device.SetRenderState(RenderState.AlphaBlendEnable, true); + graphics.Device.SetRenderState(RenderState.AlphaTestEnable, false); + graphics.Device.SetRenderState(RenderState.TextureFactor, -1); + graphics.Device.SetRenderState(RenderState.FogEnable, false); + SetWorldTransformation(false); + graphics.Shaders.Display2D.SetSettings(1f, 1f, 0f, 1f, false); - // Text is created? - if(text.VertexBuffer != null) + // Begin drawing + graphics.Shaders.Display2D.Begin(); + graphics.Shaders.Display2D.BeginPass(1); + + foreach(ITextLabel label in labels) { - // Set renderstates for rendering - graphics.Device.SetRenderState(RenderState.CullMode, Cull.None); - graphics.Device.SetRenderState(RenderState.ZEnable, false); - graphics.Device.SetRenderState(RenderState.AlphaBlendEnable, true); - graphics.Device.SetRenderState(RenderState.AlphaTestEnable, false); - graphics.Device.SetRenderState(RenderState.TextureFactor, -1); - graphics.Device.SetRenderState(RenderState.FogEnable, false); - graphics.Shaders.Display2D.Texture1 = graphics.FontTexture; - SetWorldTransformation(false); - graphics.Shaders.Display2D.SetSettings(1f, 1f, 0f, 1f, true); - graphics.Device.SetStreamSource(0, text.VertexBuffer, 0, FlatVertex.Stride); + // Text is created? + if(!label.SkipRendering) + { + graphics.Shaders.Display2D.Texture1 = label.Texture; + graphics.Shaders.Display2D.ApplySettings(); + graphics.Device.SetStreamSource(0, label.VertexBuffer, 0, FlatVertex.Stride); - // Draw - graphics.Shaders.Display2D.Begin(); - graphics.Shaders.Display2D.BeginPass(1); //mxd - //graphics.Device.DrawPrimitives(PrimitiveType.TriangleList, 0, text.NumFaces >> 1); //mxd. Seems to be working fine without this line, soooo... - graphics.Device.DrawPrimitives(PrimitiveType.TriangleList, 0, text.NumFaces); - graphics.Shaders.Display2D.EndPass(); - graphics.Shaders.Display2D.End(); + // Draw + graphics.Device.DrawPrimitives(PrimitiveType.TriangleStrip, 0, 2); + } } + + // Finish drawing + graphics.Shaders.Display2D.EndPass(); + graphics.Shaders.Display2D.End(); } // This renders a rectangle with given border size and color diff --git a/Source/Core/Rendering/Renderer3D.cs b/Source/Core/Rendering/Renderer3D.cs index 2c723f9e932c759a3bd02cc4124f93e8cd0f69e6..01390c9030834636ec06d96c5041ea4fa6c7fae3 100644 --- a/Source/Core/Rendering/Renderer3D.cs +++ b/Source/Core/Rendering/Renderer3D.cs @@ -336,8 +336,7 @@ namespace CodeImp.DoomBuilder.Rendering // Highlight if(General.Settings.AnimateVisualSelection) { - float time = Clock.CurrentTime; - highlightglow = (float)Math.Sin(time / 100.0f) * 0.1f + 0.4f; + highlightglow = (float)Math.Sin(Clock.CurrentTime / 100.0f) * 0.1f + 0.4f; highlightglowinv = -highlightglow + 0.8f; } else @@ -854,17 +853,15 @@ namespace CodeImp.DoomBuilder.Rendering world = CreateThingPositionMatrix(t); //mxd. If current thing is light - set it's color to light color - Color4 litcolor; if(Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.Thing.SRB2Type) != -1 && !fullbrightness) { wantedshaderpass += 4; // Render using one of passes, which uses World3D.VertexColor - litcolor = t.LightColor; vertexcolor = t.LightColor; } //mxd. Check if Thing is affected by dynamic lights and set color accordingly else if(General.Settings.GZDrawLightsMode != LightRenderMode.NONE && !fullbrightness && lightthings.Count > 0) { - litcolor = GetLitColorForThing(t); + Color4 litcolor = GetLitColorForThing(t); if(litcolor.ToArgb() != 0) { wantedshaderpass += 4; // Render using one of passes, which uses World3D.VertexColor @@ -873,7 +870,6 @@ namespace CodeImp.DoomBuilder.Rendering } else { - litcolor = new Color4(); vertexcolor = new Color4(); } @@ -889,8 +885,7 @@ namespace CodeImp.DoomBuilder.Rendering if(wantedshaderpass > 7) { graphics.Shaders.World3D.World = world; - float fogfactor = (litcolor.ToArgb() != 0 ? VisualThing.LIT_FOG_DENSITY_SCALER : t.FogFactor); - graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, fogfactor); + graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, t.FogFactor); } // Set the colors to use @@ -1195,17 +1190,15 @@ namespace CodeImp.DoomBuilder.Rendering world = CreateThingPositionMatrix(t); //mxd. If current thing is light - set it's color to light color - Color4 litcolor; if(Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.Thing.SRB2Type) != -1 && !fullbrightness) { wantedshaderpass += 4; // Render using one of passes, which uses World3D.VertexColor - litcolor = t.LightColor; vertexcolor = t.LightColor; } //mxd. Check if Thing is affected by dynamic lights and set color accordingly else if(General.Settings.GZDrawLightsMode != LightRenderMode.NONE && !fullbrightness && lightthings.Count > 0) { - litcolor = GetLitColorForThing(t); + Color4 litcolor = GetLitColorForThing(t); if(litcolor.ToArgb() != 0) { wantedshaderpass += 4; // Render using one of passes, which uses World3D.VertexColor @@ -1214,7 +1207,6 @@ namespace CodeImp.DoomBuilder.Rendering } else { - litcolor = new Color4(); vertexcolor = new Color4(); } @@ -1226,16 +1218,14 @@ namespace CodeImp.DoomBuilder.Rendering currentshaderpass = wantedshaderpass; } - //mxd. set variables for fog rendering? + //mxd. Set variables for fog rendering? if(wantedshaderpass > 7) { graphics.Shaders.World3D.World = world; - - float curfogfactor = (litcolor.ToArgb() != 0 ? VisualThing.LIT_FOG_DENSITY_SCALER : t.FogFactor); - if(curfogfactor != fogfactor) + if(t.FogFactor != fogfactor) { - graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, curfogfactor); - fogfactor = curfogfactor; + graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, t.FogFactor); + fogfactor = t.FogFactor; } } @@ -1428,18 +1418,11 @@ namespace CodeImp.DoomBuilder.Rendering Color4 vertexcolor = new Color4(t.VertexColor); - //check if model is affected by dynamic lights and set color accordingly - Color4 litcolor; + // Check if model is affected by dynamic lights and set color accordingly if(General.Settings.GZDrawLightsMode != LightRenderMode.NONE && !fullbrightness && lightthings.Count > 0) - { - litcolor = GetLitColorForThing(t); - graphics.Shaders.World3D.VertexColor = vertexcolor + litcolor; - } + graphics.Shaders.World3D.VertexColor = vertexcolor + GetLitColorForThing(t); else - { graphics.Shaders.World3D.VertexColor = vertexcolor; - litcolor = new Color4(); - } // Determine the shader pass we want to use for this object int wantedshaderpass = ((((t == highlighted) && showhighlight) || (t.Selected && showselection)) ? highshaderpass : shaderpass); @@ -1464,18 +1447,17 @@ namespace CodeImp.DoomBuilder.Rendering float sy = t.Thing.ScaleY * t.Thing.ActorScale.Height; Matrix modelscale = Matrix.Scaling(sx, sx, sy); - Matrix modelrotation = Matrix.RotationY(-t.Thing.RollRad) * Matrix.RotationX(-t.Thing.PitchRad) * Matrix.RotationZ(t.Thing.Angle); + Matrix modelrotation = Matrix.RotationY(-t.Thing.RollRad) * Matrix.RotationX(t.Thing.PitchRad) * Matrix.RotationZ(t.Thing.Angle); world = General.Map.Data.ModeldefEntries[t.Thing.SRB2Type].Transform * modelscale * modelrotation * t.Position; ApplyMatrices3D(); - //mxd. set variables for fog rendering + //mxd. Set variables for fog rendering if(wantedshaderpass > 7) { graphics.Shaders.World3D.World = world; if(t.Thing.Sector != null) graphics.Shaders.World3D.LightColor = t.Thing.Sector.FogColor; - float fogfactor = (litcolor.ToArgb() != 0 ? VisualThing.LIT_FOG_DENSITY_SCALER : t.FogFactor); - graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, fogfactor); + graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, t.FogFactor); } for(int i = 0; i < group.Key.Model.Meshes.Count; i++) @@ -1545,18 +1527,11 @@ namespace CodeImp.DoomBuilder.Rendering t.Update(); Color4 vertexcolor = new Color4(t.VertexColor); - //check if model is affected by dynamic lights and set color accordingly - Color4 litcolor; + // Check if model is affected by dynamic lights and set color accordingly if(General.Settings.GZDrawLightsMode != LightRenderMode.NONE && !fullbrightness && lightthings.Count > 0) - { - litcolor = GetLitColorForThing(t); - graphics.Shaders.World3D.VertexColor = vertexcolor + litcolor; - } + graphics.Shaders.World3D.VertexColor = vertexcolor + GetLitColorForThing(t); else - { graphics.Shaders.World3D.VertexColor = vertexcolor; - litcolor = new Color4(); - } // Determine the shader pass we want to use for this object int wantedshaderpass = ((((t == highlighted) && showhighlight) || (t.Selected && showselection)) ? highshaderpass : shaderpass); @@ -1581,18 +1556,17 @@ namespace CodeImp.DoomBuilder.Rendering float sy = t.Thing.ScaleY * t.Thing.ActorScale.Height; Matrix modelscale = Matrix.Scaling(sx, sx, sy); - Matrix modelrotation = Matrix.RotationY(-t.Thing.RollRad) * Matrix.RotationX(-t.Thing.PitchRad) * Matrix.RotationZ(t.Thing.Angle); + Matrix modelrotation = Matrix.RotationY(-t.Thing.RollRad) * Matrix.RotationX(t.Thing.PitchRad) * Matrix.RotationZ(t.Thing.Angle); world = General.Map.Data.ModeldefEntries[t.Thing.SRB2Type].Transform * modelscale * modelrotation * t.Position; ApplyMatrices3D(); - //mxd. set variables for fog rendering + //mxd. Set variables for fog rendering if(wantedshaderpass > 7) { graphics.Shaders.World3D.World = world; if(t.Thing.Sector != null) graphics.Shaders.World3D.LightColor = t.Thing.Sector.FogColor; - float fogfactor = (litcolor.ToArgb() != 0 ? VisualThing.LIT_FOG_DENSITY_SCALER : t.FogFactor); - graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, fogfactor); + graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, t.FogFactor); } GZModel model = General.Map.Data.ModeldefEntries[t.Thing.SRB2Type].Model; diff --git a/Source/Core/Rendering/ShaderManager.cs b/Source/Core/Rendering/ShaderManager.cs index 5247ee67098b619a6100b3bb5b4bd2058bd92031..f28054a443237a9e8e0aaa96d7a3849a5d4fd475 100644 --- a/Source/Core/Rendering/ShaderManager.cs +++ b/Source/Core/Rendering/ShaderManager.cs @@ -23,7 +23,7 @@ using SlimDX.Direct3D9; namespace CodeImp.DoomBuilder.Rendering { - internal class ShaderManager : ID3DResource + internal class ShaderManager : ID3DResource, IDisposable { #region ================== Constants diff --git a/Source/Core/Rendering/TextFont.cs b/Source/Core/Rendering/TextFont.cs index afc1c912cea9d087f44cdd5f500148e2305e6e59..a9da6de5efd45d545b5fd0609ea8fb9e22bc9c40 100644 --- a/Source/Core/Rendering/TextFont.cs +++ b/Source/Core/Rendering/TextFont.cs @@ -13,7 +13,7 @@ */ #endregion - +/* #region ================== Namespaces using System; @@ -100,7 +100,6 @@ namespace CodeImp.DoomBuilder.Rendering // Done fontreader.Dispose(); - fontdata.Dispose(); break; } } @@ -246,3 +245,4 @@ namespace CodeImp.DoomBuilder.Rendering #endregion } } +*/ \ No newline at end of file diff --git a/Source/Core/Rendering/TextLabel.cs b/Source/Core/Rendering/TextLabel.cs index f53eaaf764443f41043f21a9da199ba01d9d6fd3..d8abfdb23d56cb0e6963ee1d6c846ca2fc3ab13f 100644 --- a/Source/Core/Rendering/TextLabel.cs +++ b/Source/Core/Rendering/TextLabel.cs @@ -17,17 +17,37 @@ #region ================== Namespaces using System; -using System.Text; +using System.Drawing.Drawing2D; +using System.Drawing.Imaging; +using System.Drawing.Text; +using System.IO; using System.Drawing; using SlimDX.Direct3D9; using SlimDX; using CodeImp.DoomBuilder.Geometry; +using Font = System.Drawing.Font; #endregion namespace CodeImp.DoomBuilder.Rendering { - public class TextLabel : IDisposable, ID3DResource + public interface ITextLabel //mxd. Methods and properties required to render a textlabel + { + // Required to render text label + bool SkipRendering { get; } + Texture Texture { get; } + VertexBuffer VertexBuffer { get; } + + // Access/setup + Font Font { get; } + string Text { get; set; } + PixelColor Color { get; set; } + PixelColor BackColor { get; set; } + + void Update(float translatex, float translatey, float scalex, float scaley); + } + + public class TextLabel : IDisposable, ID3DResource, ITextLabel { #region ================== Constants @@ -37,26 +57,39 @@ namespace CodeImp.DoomBuilder.Rendering // The text is stored as a polygon in a vertex buffer private VertexBuffer textbuffer; - private int numfaces; - private int capacity; + private Texture texture; + private Font font; //mxd // Text settings private string text; - private RectangleF rect; + private Vector2D location; //mxd private bool transformcoords; private PixelColor color; private PixelColor backcolor; - private float scale; private TextAlignmentX alignx; private TextAlignmentY aligny; - private SizeF size; + private bool drawbg; //mxd + + //mxd. Label image settings... + private SizeF textsize; + private Size texturesize; + private RectangleF textrect; + private RectangleF bgrect; + private PointF textorigin; // This keeps track if changes were made private bool updateneeded; + private bool textureupdateneeded; //mxd private float lasttranslatex = float.MinValue; private float lasttranslatey; private float lastscalex; private float lastscaley; + + //mxd. Rendering + private bool skiprendering; + + //mxd. Compatibility + private float scale; // Disposing private bool isdisposed; @@ -66,24 +99,41 @@ namespace CodeImp.DoomBuilder.Rendering #region ================== Properties // Properties - public RectangleF Rectangle { get { return rect; } set { rect = value; updateneeded = true; } } - public float Left { get { return rect.X; } set { rect.X = value; updateneeded = true; } } - public float Top { get { return rect.Y; } set { rect.Y = value; updateneeded = true; } } - public float Width { get { return rect.Width; } set { rect.Width = value; updateneeded = true; } } - public float Height { get { return rect.Height; } set { rect.Height = value; updateneeded = true; } } - public float Right { get { return rect.Right; } set { rect.Width = value - rect.X + 1f; updateneeded = true; } } - public float Bottom { get { return rect.Bottom; } set { rect.Height = value - rect.Y + 1f; updateneeded = true; } } - public string Text { get { return text; } set { if(text != value.ToUpperInvariant()) { text = value.ToUpperInvariant(); updateneeded = true; } } } + public Vector2D Location { get { return location; } set { location = value; updateneeded = true; } } //mxd + public string Text { get { return text; } set { if(text != value) { text = value; textsize = Size.Empty; textureupdateneeded = true; } } } + public Font Font { get { return font; } set { font.Dispose(); font = value; textsize = Size.Empty; textureupdateneeded = true; } } //mxd public bool TransformCoords { get { return transformcoords; } set { transformcoords = value; updateneeded = true; } } - public SizeF TextSize { get { return size; } } - public float Scale { get { return scale; } set { scale = value; updateneeded = true; } } + public SizeF TextSize { get { if(textureupdateneeded) Update(General.Map.Renderer2D.TranslateX, General.Map.Renderer2D.TranslateY, General.Map.Renderer2D.Scale, -General.Map.Renderer2D.Scale); return textsize; } } public TextAlignmentX AlignX { get { return alignx; } set { alignx = value; updateneeded = true; } } public TextAlignmentY AlignY { get { return aligny; } set { aligny = value; updateneeded = true; } } - public PixelColor Color { get { return color; } set { color = value; updateneeded = true; } } - public PixelColor Backcolor { get { return backcolor; } set { backcolor = value; updateneeded = true; } } - internal VertexBuffer VertexBuffer { get { return textbuffer; } } - internal int NumFaces { get { return numfaces; } } - + public PixelColor Color { get { return color; } set { if(!color.Equals(value)) { color = value; textureupdateneeded = true; } } } + public PixelColor BackColor { get { return backcolor; } set { if(!backcolor.Equals(value)) { backcolor = value; textureupdateneeded = true; } } } + public bool DrawBackground { get { return drawbg; } set { if(drawbg != value) { drawbg = value; textureupdateneeded = true; } } } //mxd + public Texture Texture { get { return texture; } } //mxd + public VertexBuffer VertexBuffer { get { return textbuffer; } } + public bool SkipRendering { get { return skiprendering; } } //mxd + + //mxd. Compatibility settings + [Obsolete("Backcolor property is deprecated, please use BackColor property instead.")] + public PixelColor Backcolor { get { return BackColor; } set { BackColor = value.WithAlpha(128); } } + + [Obsolete("Scale property is deprecated, please assign the font directly using Font property instead.")] + public float Scale + { + get { return scale; } + set + { + scale = value; + font.Dispose(); + font = new Font(new FontFamily(General.Settings.TextLabelFontName), (float)Math.Round(scale * 0.75f), (General.Settings.TextLabelFontBold ? FontStyle.Bold : FontStyle.Regular)); + textsize = Size.Empty; + textureupdateneeded = true; + } + } + + [Obsolete("Rectangle property is deprecated, please use Location property instead.")] + public RectangleF Rectangle { get { return new RectangleF(location.x, location.y, 0f, 0f); } set { location = new Vector2D(value.X, value.Y); updateneeded = true; } } + // Disposing public bool IsDisposed { get { return isdisposed; } } @@ -92,20 +142,20 @@ namespace CodeImp.DoomBuilder.Rendering #region ================== Constructor / Disposer // Constructor - public TextLabel(int capacity) + public TextLabel() { // Initialize this.text = ""; - this.rect = new RectangleF(0f, 0f, 1f, 1f); + this.font = new Font(new FontFamily(General.Settings.TextLabelFontName), General.Settings.TextLabelFontSize, (General.Settings.TextLabelFontBold ? FontStyle.Bold : FontStyle.Regular)); //General.Settings.TextLabelFont; //mxd + this.location = new Vector2D(); //mxd this.color = new PixelColor(255, 255, 255, 255); - this.backcolor = new PixelColor(0, 0, 0, 0); - this.scale = 10f; + this.backcolor = new PixelColor(128, 0, 0, 0); this.alignx = TextAlignmentX.Center; this.aligny = TextAlignmentY.Top; - this.size = new SizeF(0f, 0f); + this.textsize = SizeF.Empty; //mxd + this.texturesize = Size.Empty; //mxd this.updateneeded = true; - this.numfaces = 0; - this.capacity = capacity; + this.textureupdateneeded = true; //mxd // Register as resource General.Map.Graphics.RegisterResource(this); @@ -114,6 +164,30 @@ namespace CodeImp.DoomBuilder.Rendering GC.SuppressFinalize(this); } + //mxd. Compatibility constructor... + [Obsolete("TextLabel(int capacity) is deprecated, please use TextLabel() instead.")] + public TextLabel(int unused) + { + // Initialize + this.text = ""; + this.font = new Font(new FontFamily(General.Settings.TextLabelFontName), General.Settings.TextLabelFontSize, (General.Settings.TextLabelFontBold ? FontStyle.Bold : FontStyle.Regular)); // General.Settings.TextLabelFont; + this.location = new Vector2D(); + this.color = new PixelColor(255, 255, 255, 255); + this.backcolor = new PixelColor(128, 0, 0, 0); + this.alignx = TextAlignmentX.Center; + this.aligny = TextAlignmentY.Top; + this.textsize = SizeF.Empty; + this.texturesize = Size.Empty; + this.updateneeded = true; + this.textureupdateneeded = true; + + // Register as resource + General.Map.Graphics.RegisterResource(this); + + // We have no destructor + GC.SuppressFinalize(this); + } + // Diposer public void Dispose() { @@ -122,6 +196,7 @@ namespace CodeImp.DoomBuilder.Rendering { // Clean up UnloadResource(); + font.Dispose(); // Unregister resource General.Map.Graphics.UnregisterResource(this); @@ -136,135 +211,238 @@ namespace CodeImp.DoomBuilder.Rendering #region ================== Methods // This updates the text if needed - internal void Update(float translatex, float translatey, float scalex, float scaley) + public void Update(float translatex, float translatey, float scalex, float scaley) { // Check if transformation changed and needs to be updated - if(transformcoords) + if(transformcoords && (translatex != lasttranslatex || translatey != lasttranslatey || + scalex != lastscalex || scaley != lastscaley)) { - if(translatex != lasttranslatex || translatey != lasttranslatey || - scalex != lastscalex || scaley != lastscaley) - { - lasttranslatex = translatex; //mxd - lasttranslatey = translatey; //mxd - lastscalex = scalex; //mxd - lastscaley = scaley; //mxd - updateneeded = true; - } + lasttranslatex = translatex; //mxd + lasttranslatey = translatey; //mxd + lastscalex = scalex; //mxd + lastscaley = scaley; //mxd + updateneeded = true; } - + // Update if needed - if(updateneeded) + if(updateneeded || textureupdateneeded) { // Only build when there are any vertices if(text.Length > 0) { - // Do we have to make a new buffer? - if((textbuffer == null) || (text.Length > capacity)) - { - // Dispose previous - if(textbuffer != null) textbuffer.Dispose(); - - // Determine new capacity - if(capacity < text.Length) capacity = text.Length; - - // Create the buffer - textbuffer = new VertexBuffer(General.Map.Graphics.Device, - capacity * 12 * FlatVertex.Stride, - Usage.Dynamic | Usage.WriteOnly, - VertexFormat.None, Pool.Default); - } - // Transform? - RectangleF absview; - if(transformcoords) - { - // Calculate absolute coordinates - Vector2D lt = new Vector2D(rect.Left, rect.Top); - Vector2D rb = new Vector2D(rect.Right, rect.Bottom); - lt = lt.GetTransformed(translatex, translatey, scalex, scaley); - rb = rb.GetTransformed(translatex, translatey, scalex, scaley); - absview = new RectangleF(lt.x, lt.y, rb.x - lt.x, rb.y - lt.y); - } - else + Vector2D abspos = (transformcoords ? location.GetTransformed(translatex, translatey, scalex, scaley) : location); + + // Update text and texture sizes + if(textsize.IsEmpty || texturesize.IsEmpty) { - // Fixed coordinates - absview = rect; + textorigin = new PointF(4, 3); + textrect = new RectangleF(textorigin, General.Interface.MeasureString(text, font)); + textrect.Width = (float)Math.Round(textrect.Width); + textrect.Height = (float)Math.Round(textrect.Height); + bgrect = new RectangleF(0, 0, textrect.Width + textorigin.X * 2, textrect.Height + textorigin.Y * 2); + + // Store calculated text size... + textsize = new SizeF(textrect.Width + textorigin.X * 2, textrect.Height + textorigin.Y * 2); + + // Make PO2 image, for speed and giggles... + texturesize = new Size(General.NextPowerOf2((int)textsize.Width), General.NextPowerOf2((int)textsize.Height)); + + switch(alignx) + { + case TextAlignmentX.Center: bgrect.X = (texturesize.Width - bgrect.Width) / 2; break; + case TextAlignmentX.Right: bgrect.X = texturesize.Width - bgrect.Width; break; + } + + switch(aligny) + { + case TextAlignmentY.Middle: bgrect.Y = (texturesize.Height - bgrect.Height) / 2; break; + case TextAlignmentY.Bottom: bgrect.Y = texturesize.Height - bgrect.Height; break; + } + + textrect.X += bgrect.X; + textrect.Y += bgrect.Y; } - - // Calculate text dimensions - size = General.Map.Graphics.Font.GetTextSize(text, scale); // Align the text horizontally float beginx = 0; switch(alignx) { - case TextAlignmentX.Left: beginx = absview.X; break; - case TextAlignmentX.Center: beginx = absview.X + (absview.Width - size.Width) * 0.5f; break; - case TextAlignmentX.Right: beginx = absview.X + absview.Width - size.Width; break; + case TextAlignmentX.Left: beginx = abspos.x; break; + case TextAlignmentX.Center: beginx = abspos.x - texturesize.Width * 0.5f; break; + case TextAlignmentX.Right: beginx = abspos.x - texturesize.Width; break; } // Align the text vertically float beginy = 0; switch(aligny) { - case TextAlignmentY.Top: beginy = absview.Y; break; - case TextAlignmentY.Middle: beginy = absview.Y + (absview.Height - size.Height) * 0.5f; break; - case TextAlignmentY.Bottom: beginy = absview.Y + absview.Height - size.Height; break; + case TextAlignmentY.Top: beginy = abspos.y; break; + case TextAlignmentY.Middle: beginy = abspos.y - texturesize.Height * 0.5f; break; + case TextAlignmentY.Bottom: beginy = abspos.y - texturesize.Height; break; } - // Get the ASCII bytes for the text - byte[] textbytes = Encoding.ASCII.GetBytes(text); - - // Lock the buffer - DataStream stream = textbuffer.Lock(0, capacity * 12 * FlatVertex.Stride, - LockFlags.Discard | LockFlags.NoSystemLock); - - // Go for all chars in text to create the backgrounds - float textx = beginx; - foreach(byte b in textbytes) - General.Map.Graphics.Font.SetupVertices(stream, b, scale, backcolor.ToInt(), - ref textx, beginy, size.Height, 0.5f); - - // Go for all chars in text to create the text - textx = beginx; - foreach(byte b in textbytes) - General.Map.Graphics.Font.SetupVertices(stream, b, scale, color.ToInt(), - ref textx, beginy, size.Height, 0.0f); + //mxd. Skip when not on screen... + RectangleF abssize = new RectangleF(beginx, beginy, texturesize.Width, texturesize.Height); + Size windowsize = General.Map.Graphics.RenderTarget.ClientSize; + skiprendering = (abssize.Right < 0.1f) || (abssize.Left > windowsize.Width) || (abssize.Bottom < 0.1f) || (abssize.Top > windowsize.Height); + if(skiprendering) return; + + //mxd. Update texture if needed + if(textureupdateneeded) + { + // Get rid of old texture + if(texture != null) + { + texture.Dispose(); + texture = null; + } + + // Create label image + Bitmap img = CreateLabelImage(text, font, color, backcolor, drawbg, textrect, bgrect, texturesize, textorigin); + //texturesize = img.Size; + + // Create texture + MemoryStream memstream = new MemoryStream((img.Size.Width * img.Size.Height * 4) + 4096); + img.Save(memstream, ImageFormat.Bmp); + memstream.Seek(0, SeekOrigin.Begin); + + texture = Texture.FromStream(General.Map.Graphics.Device, memstream, (int)memstream.Length, + img.Size.Width, img.Size.Height, 1, Usage.None, Format.Unknown, + Pool.Managed, General.Map.Graphics.PostFilter, General.Map.Graphics.MipGenerateFilter, 0); + } + + //mxd. Create the buffer + if(textbuffer == null || textbuffer.Disposed) + { + textbuffer = new VertexBuffer(General.Map.Graphics.Device, 4 * FlatVertex.Stride, + Usage.Dynamic | Usage.WriteOnly, VertexFormat.None, Pool.Default); + } + + //mxd. Lock the buffer + using(DataStream stream = textbuffer.Lock(0, 4 * FlatVertex.Stride, LockFlags.Discard | LockFlags.NoSystemLock)) + { + FlatQuad quad = new FlatQuad(PrimitiveType.TriangleStrip, beginx, beginy, beginx + texturesize.Width, beginy + texturesize.Height); + stream.WriteRange(quad.Vertices); + } // Done filling the vertex buffer textbuffer.Unlock(); - stream.Dispose(); - - // Calculate number of triangles - numfaces = text.Length * 4; } else { // No faces in polygon - numfaces = 0; - size = new SizeF(0f, 0f); + textsize = SizeF.Empty; //mxd + texturesize = Size.Empty; //mxd + skiprendering = true; //mxd } // Text updated updateneeded = false; + textureupdateneeded = false; //mxd + } + } + + //mxd + private static Bitmap CreateLabelImage(string text, Font font, PixelColor color, PixelColor backcolor, bool drawbg, RectangleF textrect, RectangleF bgrect, Size texturesize, PointF textorigin) + { + Bitmap result = new Bitmap(texturesize.Width, texturesize.Height); + using(Graphics g = Graphics.FromImage(result)) + { + g.SmoothingMode = SmoothingMode.HighQuality; + g.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; + g.CompositingQuality = CompositingQuality.HighQuality; + + // Draw text + using(StringFormat sf = new StringFormat()) + { + sf.FormatFlags = StringFormatFlags.FitBlackBox | StringFormatFlags.NoWrap; + sf.Alignment = StringAlignment.Center; + sf.LineAlignment = StringAlignment.Center; + + // Draw text with BG + if(drawbg) + { + GraphicsPath p = new GraphicsPath(); + float radius = textorigin.X; + const float outlinewidth = 1; + + RectangleF pathrect = bgrect; + pathrect.Width -= 1; + pathrect.Height -= 1; + + // Left line + p.AddLine(pathrect.Left, pathrect.Bottom - radius + outlinewidth, pathrect.Left, pathrect.Top + radius); + p.AddArc(pathrect.Left, pathrect.Top, radius, radius, 180, 90); + + // Top line + p.AddLine(pathrect.Left + radius, pathrect.Top, pathrect.Right - radius, pathrect.Top); + p.AddArc(pathrect.Right - radius, pathrect.Top, radius, radius, 270, 90); + + // Right line + p.AddLine(pathrect.Right, pathrect.Top + radius, pathrect.Right, pathrect.Bottom - radius); + p.AddArc(pathrect.Right - radius, pathrect.Bottom - radius, radius, radius, 0, 90); + + // Bottom line + p.AddLine(pathrect.Left + radius, pathrect.Bottom, pathrect.Left + radius, pathrect.Bottom); + p.AddArc(pathrect.Left, pathrect.Bottom - radius, radius, radius, 90, 90); + + // Fill'n'draw bg + using(SolidBrush brush = new SolidBrush(color.ToColor())) + g.FillPath(brush, p); + + using(Pen pen = new Pen(backcolor.ToColor(), outlinewidth)) + g.DrawPath(pen, p); + + // Draw text + textrect.Inflate(4, 2); + using(SolidBrush brush = new SolidBrush(backcolor.ToColor())) + g.DrawString(text, font, brush, textrect, sf); + } + // Draw plain text + else + { + RectangleF plainbgrect = textrect; + if(text.Length > 1) plainbgrect.Inflate(6, 2); + + RectangleF plaintextrect = textrect; + plaintextrect.Inflate(6, 4); + + using(SolidBrush brush = new SolidBrush(backcolor.ToColor())) + g.FillRectangle(brush, plainbgrect); + + using(SolidBrush brush = new SolidBrush(color.ToColor())) + g.DrawString(text, font, brush, plaintextrect, sf); + } + } } + + return result; } // This unloads the resources public void UnloadResource() { // Clean up - if(textbuffer != null) textbuffer.Dispose(); - textbuffer = null; + if(textbuffer != null) + { + textbuffer.Dispose(); + textbuffer = null; + } + + if(texture != null) //mxd + { + texture.Dispose(); + texture = null; + } // Need to update before we can render updateneeded = true; + textureupdateneeded = true; //mxd } // This (re)loads the resources - public void ReloadResource() - { - } + public void ReloadResource() { } #endregion } diff --git a/Source/Core/Resources/Actions.cfg b/Source/Core/Resources/Actions.cfg index 61d1c18d7d4f3dbe9bf019f4f733aec3d8c7b576..436be876e90ba140c388f4ad88484fce66ed41ab 100644 --- a/Source/Core/Resources/Actions.cfg +++ b/Source/Core/Resources/Actions.cfg @@ -430,7 +430,7 @@ toggledynamicgrid gridsetup { - title = "Grid Setup"; + title = "Grid and Backdrop Setup"; category = "classic"; description = "Shows the Custom Grid Setup dialog which allows you to set custom grid sizes and a background image."; allowkeys = true; @@ -479,6 +479,36 @@ redo allowscroll = true; } +geomergeclassic //mxd +{ + title = "Merge Dragged Vertices Only"; + category = "edit"; + description = "Only vertex-line intersections will be processed when applying geometry drag or paste actions."; + allowkeys = true; + allowmouse = true; + allowscroll = false; +} + +geomerge //mxd +{ + title = "Merge Dragged Geometry"; + category = "edit"; + description = "Geometry merging will be performed when applying geometry drag or paste actions."; + allowkeys = true; + allowmouse = true; + allowscroll = false; +} + +georeplace //mxd +{ + title = "Replace with Dragged Geometry"; + category = "edit"; + description = "Dragged geometry will replace underlaying geometry when applying geometry drag or paste actions."; + allowkeys = true; + allowmouse = true; + allowscroll = false; +} + togglesnap { title = "Snap to Grid"; @@ -491,9 +521,20 @@ togglesnap toggleautomerge { - title = "Merge Geometry"; + title = "Snap to Geometry"; + category = "edit"; + description = "Toggles snapping to the nearest vertex or linedef for map elements that are being dragged."; + allowkeys = true; + allowmouse = true; + allowscroll = true; +} + +//mxd +togglejoinedsectorssplitting +{ + title = "Split Joined Sectors"; category = "edit"; - description = "Toggles automatic merging of geometry for vertices and structures that are being dragged."; + description = "When enabled, joined sectors adjacent to drawn lines will be split."; allowkeys = true; allowmouse = true; allowscroll = true; @@ -1038,6 +1079,26 @@ viewmodeceilings allowscroll = false; } +nextviewmode //mxd +{ + title = "Next View Mode"; + category = "view"; + description = "This switches to next view mode."; + allowkeys = true; + allowmouse = true; + allowscroll = false; +} + +previousviewmode //mxd +{ + title = "Previous View Mode"; + category = "view"; + description = "This switches to previous view mode."; + allowkeys = true; + allowmouse = true; + allowscroll = false; +} + togglecomments //mxd { title = "Toggle Comments"; @@ -1069,6 +1130,17 @@ togglebrightness //mxd default = 66; //B } +togglehighlight +{ + title = "Toggle Highlight"; + category = "view"; //mxd + description = "Toggles the highlight of the targeted and selected objects."; + allowkeys = true; + allowmouse = true; + allowscroll = true; + default = 72; // H +} + visualselect { title = "Select"; @@ -1197,17 +1269,6 @@ gztogglesky allowscroll = false; } -gztogglefx -{ - title = "Toggle models, dynamic lights and fog rendering"; - category = "gzdoombuilder"; - description = "This is a combo action, which toggles models, dynamic lights and fog rendering."; - allowkeys = true; - allowmouse = true; - allowscroll = false; - default = 20; // CapsLock -} - gztoggleeventlines { title = "Toggle Event lines"; @@ -1230,6 +1291,17 @@ gztogglevisualvertices default = 262230; } +gztoggleenhancedrendering +{ + title = "Toggle Enhanced Rendering Effects"; + category = "visual"; + description = "Toggles enhanced rendering effects (slopes, 3D-floors, dynamic lights, fog, sky etc.) in Visual mode."; + allowkeys = true; + allowmouse = true; + allowscroll = false; + default = 9; //Tab +} + ////////////////////////////// //GZDOOMBUILDER MENU ACTIONS// ////////////////////////////// diff --git a/Source/Core/Resources/Angle1.png b/Source/Core/Resources/Angle1.png new file mode 100644 index 0000000000000000000000000000000000000000..6e0a3b07a5ae58fdb27d86b9a2b01a10c1c578d3 Binary files /dev/null and b/Source/Core/Resources/Angle1.png differ diff --git a/Source/Core/Resources/Angle2.png b/Source/Core/Resources/Angle2.png new file mode 100644 index 0000000000000000000000000000000000000000..721a845f81a366937fa8b1bc269419e718d54b37 Binary files /dev/null and b/Source/Core/Resources/Angle2.png differ diff --git a/Source/Core/Resources/Angle3.png b/Source/Core/Resources/Angle3.png new file mode 100644 index 0000000000000000000000000000000000000000..82a44cccd8f9a6c9f5b05fdb6617758cdd4c2fbf Binary files /dev/null and b/Source/Core/Resources/Angle3.png differ diff --git a/Source/Core/Resources/Angle4.png b/Source/Core/Resources/Angle4.png new file mode 100644 index 0000000000000000000000000000000000000000..601e88d939c333ea932ffcc216a50cd43421b54c Binary files /dev/null and b/Source/Core/Resources/Angle4.png differ diff --git a/Source/Core/Resources/Angle5.png b/Source/Core/Resources/Angle5.png new file mode 100644 index 0000000000000000000000000000000000000000..709258ea25eec7039caa58dd13ad58ef725a8539 Binary files /dev/null and b/Source/Core/Resources/Angle5.png differ diff --git a/Source/Core/Resources/Angle6.png b/Source/Core/Resources/Angle6.png new file mode 100644 index 0000000000000000000000000000000000000000..01ab35c74f9dd42784263046dd74d3af706b54d8 Binary files /dev/null and b/Source/Core/Resources/Angle6.png differ diff --git a/Source/Core/Resources/Angle7.png b/Source/Core/Resources/Angle7.png new file mode 100644 index 0000000000000000000000000000000000000000..9552fe3c6774772a86373a4b5786061ca1470e05 Binary files /dev/null and b/Source/Core/Resources/Angle7.png differ diff --git a/Source/Core/Resources/Font.cfg b/Source/Core/Resources/Font.cfg deleted file mode 100644 index 8a0f9fd00aee59d1afb01519e6db71f9420249dc..0000000000000000000000000000000000000000 --- a/Source/Core/Resources/Font.cfg +++ /dev/null @@ -1,710 +0,0 @@ -count = 64; - -chars -{ - - 65 - { - width = 26; - height = 42; - u1 = 0.011719f; - v1 = -0.003906f; - u2 = 0.078125f; - v2 = 0.195313f; - } - - - 66 - { - width = 26; - height = 42; - u1 = 0.082031f; - v1 = -0.003906f; - u2 = 0.148438f; - v2 = 0.195313f; - } - - - 67 - { - width = 26; - height = 42; - u1 = 0.152344f; - v1 = -0.003906f; - u2 = 0.21875f; - v2 = 0.195313f; - } - - - 68 - { - width = 26; - height = 42; - u1 = 0.222656f; - v1 = -0.003906f; - u2 = 0.289063f; - v2 = 0.195313f; - } - - - 69 - { - width = 24; - height = 42; - u1 = 0.292969f; - v1 = -0.003906f; - u2 = 0.355469f; - v2 = 0.195313f; - } - - - 70 - { - width = 22; - height = 42; - u1 = 0.359375f; - v1 = -0.003906f; - u2 = 0.417969f; - v2 = 0.195313f; - } - - - 71 - { - width = 28; - height = 42; - u1 = 0.421875f; - v1 = -0.003906f; - u2 = 0.492188f; - v2 = 0.195313f; - } - - - 72 - { - width = 28; - height = 42; - u1 = 0.496094f; - v1 = -0.003906f; - u2 = 0.566406f; - v2 = 0.195313f; - } - - - 73 - { - width = 13; - height = 42; - u1 = 0.570313f; - v1 = -0.003906f; - u2 = 0.611328f; - v2 = 0.195313f; - } - - - 74 - { - width = 22; - height = 42; - u1 = 0.615234f; - v1 = -0.003906f; - u2 = 0.673828f; - v2 = 0.195313f; - } - - - 75 - { - width = 28; - height = 42; - u1 = 0.677734f; - v1 = -0.003906f; - u2 = 0.748047f; - v2 = 0.195313f; - } - - - 76 - { - width = 22; - height = 42; - u1 = 0.751953f; - v1 = -0.003906f; - u2 = 0.810547f; - v2 = 0.195313f; - } - - - 77 - { - width = 31; - height = 42; - u1 = 0.814453f; - v1 = -0.003906f; - u2 = 0.890625f; - v2 = 0.195313f; - } - - - 78 - { - width = 28; - height = 42; - u1 = 0.894531f; - v1 = -0.003906f; - u2 = 0.964844f; - v2 = 0.195313f; - } - - - 79 - { - width = 28; - height = 42; - u1 = 0.011719f; - v1 = 0.183594f; - u2 = 0.082031f; - v2 = 0.382813f; - } - - - 80 - { - width = 24; - height = 42; - u1 = 0.085938f; - v1 = 0.183594f; - u2 = 0.148438f; - v2 = 0.382813f; - } - - - 81 - { - width = 28; - height = 42; - u1 = 0.152344f; - v1 = 0.183594f; - u2 = 0.222656f; - v2 = 0.382813f; - } - - - 82 - { - width = 26; - height = 42; - u1 = 0.226563f; - v1 = 0.183594f; - u2 = 0.292969f; - v2 = 0.382813f; - } - - - 83 - { - width = 24; - height = 42; - u1 = 0.296875f; - v1 = 0.183594f; - u2 = 0.359375f; - v2 = 0.382813f; - } - - - 84 - { - width = 24; - height = 42; - u1 = 0.363281f; - v1 = 0.183594f; - u2 = 0.425781f; - v2 = 0.382813f; - } - - - 85 - { - width = 28; - height = 42; - u1 = 0.429688f; - v1 = 0.183594f; - u2 = 0.5f; - v2 = 0.382813f; - } - - - 86 - { - width = 26; - height = 42; - u1 = 0.503906f; - v1 = 0.183594f; - u2 = 0.570313f; - v2 = 0.382813f; - } - - - 87 - { - width = 33; - height = 42; - u1 = 0.574219f; - v1 = 0.183594f; - u2 = 0.654297f; - v2 = 0.382813f; - } - - - 88 - { - width = 26; - height = 42; - u1 = 0.658203f; - v1 = 0.183594f; - u2 = 0.724609f; - v2 = 0.382813f; - } - - - 89 - { - width = 26; - height = 42; - u1 = 0.728516f; - v1 = 0.183594f; - u2 = 0.794922f; - v2 = 0.382813f; - } - - - 90 - { - width = 24; - height = 42; - u1 = 0.798828f; - v1 = 0.183594f; - u2 = 0.861328f; - v2 = 0.382813f; - } - - - 48 - { - width = 22; - height = 42; - u1 = 0.865234f; - v1 = 0.183594f; - u2 = 0.923828f; - v2 = 0.382813f; - } - - - 49 - { - width = 22; - height = 42; - u1 = 0.927734f; - v1 = 0.183594f; - u2 = 0.986328f; - v2 = 0.382813f; - } - - - 50 - { - width = 22; - height = 42; - u1 = 0.011719f; - v1 = 0.371094f; - u2 = 0.070313f; - v2 = 0.570313f; - } - - - 51 - { - width = 22; - height = 42; - u1 = 0.074219f; - v1 = 0.371094f; - u2 = 0.132813f; - v2 = 0.570313f; - } - - - 52 - { - width = 22; - height = 42; - u1 = 0.136719f; - v1 = 0.371094f; - u2 = 0.195313f; - v2 = 0.570313f; - } - - - 53 - { - width = 22; - height = 42; - u1 = 0.199219f; - v1 = 0.371094f; - u2 = 0.257813f; - v2 = 0.570313f; - } - - - 54 - { - width = 22; - height = 42; - u1 = 0.261719f; - v1 = 0.371094f; - u2 = 0.320313f; - v2 = 0.570313f; - } - - - 55 - { - width = 22; - height = 42; - u1 = 0.324219f; - v1 = 0.371094f; - u2 = 0.382813f; - v2 = 0.570313f; - } - - - 56 - { - width = 22; - height = 42; - u1 = 0.386719f; - v1 = 0.371094f; - u2 = 0.445313f; - v2 = 0.570313f; - } - - - 57 - { - width = 22; - height = 42; - u1 = 0.449219f; - v1 = 0.371094f; - u2 = 0.507813f; - v2 = 0.570313f; - } - - - 32 - { - width = 12; - height = 42; - u1 = 0.511719f; - v1 = 0.371094f; - u2 = 0.550781f; - v2 = 0.570313f; - } - - - 33 - { - width = 12; - height = 42; - u1 = 0.554688f; - v1 = 0.371094f; - u2 = 0.59375f; - v2 = 0.570313f; - } - - - 64 - { - width = 25; - height = 42; - u1 = 0.597656f; - v1 = 0.371094f; - u2 = 0.662109f; - v2 = 0.570313f; - } - - - 35 - { - width = 22; - height = 42; - u1 = 0.666016f; - v1 = 0.371094f; - u2 = 0.724609f; - v2 = 0.570313f; - } - - - 36 - { - width = 22; - height = 42; - u1 = 0.728516f; - v1 = 0.371094f; - u2 = 0.787109f; - v2 = 0.570313f; - } - - - 37 - { - width = 33; - height = 42; - u1 = 0.791016f; - v1 = 0.371094f; - u2 = 0.871094f; - v2 = 0.570313f; - } - - - 94 - { - width = 22; - height = 42; - u1 = 0.875f; - v1 = 0.371094f; - u2 = 0.933594f; - v2 = 0.570313f; - } - - - 38 - { - width = 29; - height = 42; - u1 = 0.011719f; - v1 = 0.558594f; - u2 = 0.083984f; - v2 = 0.757813f; - } - - - 42 - { - width = 19; - height = 42; - u1 = 0.087891f; - v1 = 0.558594f; - u2 = 0.140625f; - v2 = 0.757813f; - } - - - 40 - { - width = 13; - height = 42; - u1 = 0.144531f; - v1 = 0.558594f; - u2 = 0.185547f; - v2 = 0.757813f; - } - - - 41 - { - width = 13; - height = 42; - u1 = 0.189453f; - v1 = 0.558594f; - u2 = 0.230469f; - v2 = 0.757813f; - } - - - 95 - { - width = 17; - height = 42; - u1 = 0.234375f; - v1 = 0.558594f; - u2 = 0.283203f; - v2 = 0.757813f; - } - - - 43 - { - width = 22; - height = 42; - u1 = 0.287109f; - v1 = 0.558594f; - u2 = 0.345703f; - v2 = 0.757813f; - } - - - 61 - { - width = 22; - height = 42; - u1 = 0.349609f; - v1 = 0.558594f; - u2 = 0.408203f; - v2 = 0.757813f; - } - - - 45 - { - width = 12; - height = 42; - u1 = 0.412109f; - v1 = 0.558594f; - u2 = 0.451172f; - v2 = 0.757813f; - } - - - 91 - { - width = 13; - height = 42; - u1 = 0.455078f; - v1 = 0.558594f; - u2 = 0.496094f; - v2 = 0.757813f; - } - - - 93 - { - width = 13; - height = 42; - u1 = 0.5f; - v1 = 0.558594f; - u2 = 0.541016f; - v2 = 0.757813f; - } - - - 58 - { - width = 12; - height = 42; - u1 = 0.544922f; - v1 = 0.558594f; - u2 = 0.583984f; - v2 = 0.757813f; - } - - - 59 - { - width = 12; - height = 42; - u1 = 0.587891f; - v1 = 0.558594f; - u2 = 0.626953f; - v2 = 0.757813f; - } - - - 39 - { - width = 10; - height = 42; - u1 = 0.630859f; - v1 = 0.558594f; - u2 = 0.666016f; - v2 = 0.757813f; - } - - - 34 - { - width = 17; - height = 42; - u1 = 0.669922f; - v1 = 0.558594f; - u2 = 0.71875f; - v2 = 0.757813f; - } - - - 44 - { - width = 12; - height = 42; - u1 = 0.722656f; - v1 = 0.558594f; - u2 = 0.761719f; - v2 = 0.757813f; - } - - - 46 - { - width = 12; - height = 42; - u1 = 0.765625f; - v1 = 0.558594f; - u2 = 0.804688f; - v2 = 0.757813f; - } - - - 60 - { - width = 22; - height = 42; - u1 = 0.808594f; - v1 = 0.558594f; - u2 = 0.867188f; - v2 = 0.757813f; - } - - - 62 - { - width = 22; - height = 42; - u1 = 0.871094f; - v1 = 0.558594f; - u2 = 0.929688f; - v2 = 0.757813f; - } - - - 47 - { - width = 10; - height = 42; - u1 = 0.933594f; - v1 = 0.558594f; - u2 = 0.96875f; - v2 = 0.757813f; - } - - - 63 - { - width = 21; - height = 42; - u1 = 0.011719f; - v1 = 0.746094f; - u2 = 0.068359f; - v2 = 0.945313f; - } - - - 92 - { - width = 10; - height = 42; - u1 = 0.072266f; - v1 = 0.746094f; - u2 = 0.107422f; - v2 = 0.945313f; - } - -} - diff --git a/Source/Core/Resources/Font.png b/Source/Core/Resources/Font.png deleted file mode 100644 index c7986dcb6113311232afd1d744c15fdedebc5967..0000000000000000000000000000000000000000 Binary files a/Source/Core/Resources/Font.png and /dev/null differ diff --git a/Source/Core/Resources/MergeGeo.png b/Source/Core/Resources/MergeGeo.png new file mode 100644 index 0000000000000000000000000000000000000000..2bbe9944bacef910934c01e140c552da46135c54 Binary files /dev/null and b/Source/Core/Resources/MergeGeo.png differ diff --git a/Source/Core/Resources/MergeGeoClassic.png b/Source/Core/Resources/MergeGeoClassic.png new file mode 100644 index 0000000000000000000000000000000000000000..adcb1cc77dbe6252e43732fa9a5b9753fc4972e3 Binary files /dev/null and b/Source/Core/Resources/MergeGeoClassic.png differ diff --git a/Source/Core/Resources/MergeGeoRemoveLines.png b/Source/Core/Resources/MergeGeoRemoveLines.png new file mode 100644 index 0000000000000000000000000000000000000000..240d7251fdcb977bd50b8a1ccf86cf8201f3610e Binary files /dev/null and b/Source/Core/Resources/MergeGeoRemoveLines.png differ diff --git a/Source/Core/Resources/SplitSectors.png b/Source/Core/Resources/SplitSectors.png new file mode 100644 index 0000000000000000000000000000000000000000..a259ed0498495e843c041c89af4f3bd2ceacd169 Binary files /dev/null and b/Source/Core/Resources/SplitSectors.png differ diff --git a/Source/Core/Resources/Thing2D.png b/Source/Core/Resources/Thing2D.png deleted file mode 100644 index 1969e2f6761ed1cbe36ac26937b72a102b19675c..0000000000000000000000000000000000000000 Binary files a/Source/Core/Resources/Thing2D.png and /dev/null differ diff --git a/Source/Core/Resources/ThingTexture2D.png b/Source/Core/Resources/ThingTexture2D.png new file mode 100644 index 0000000000000000000000000000000000000000..87cb8939bb7e6ac343b773e02a674e0f3c01e70d Binary files /dev/null and b/Source/Core/Resources/ThingTexture2D.png differ diff --git a/Source/Core/Resources/fx.png b/Source/Core/Resources/fx.png deleted file mode 100644 index 5b4dcc2726b01d4880bf86d3152ecdb7be5ef590..0000000000000000000000000000000000000000 Binary files a/Source/Core/Resources/fx.png and /dev/null differ diff --git a/Source/Core/Types/AngleByteHandler.cs b/Source/Core/Types/AngleByteHandler.cs index 7db850279c820923cb7852eb4175b5ac55054ee8..bbaf3940baffe6821b471c907c32bd753bb4a220 100644 --- a/Source/Core/Types/AngleByteHandler.cs +++ b/Source/Core/Types/AngleByteHandler.cs @@ -1,6 +1,7 @@ #region ================== Namespaces using System; +using System.Drawing; using System.Windows.Forms; using CodeImp.DoomBuilder.Windows; @@ -11,6 +12,12 @@ namespace CodeImp.DoomBuilder.Types [TypeHandler(UniversalType.AngleByte, "Byte Angle", true)] internal class AngleByteHandler : AngleDegreesHandler { + #region ================== Properties + + public override Image BrowseImage { get { return angleicons[General.ClampAngle((int)Math.Round((float)value / 256 * 360) + 22) / 45]; } } + + #endregion + #region ================== Methods public override void Browse(IWin32Window parent) diff --git a/Source/Core/Types/AngleDegreesFloatHandler.cs b/Source/Core/Types/AngleDegreesFloatHandler.cs index 47f3588823ee40d84c999be92408d7484ade9b14..c5335ab3734940a2c73f38124776d0cf2e6d1d5f 100644 --- a/Source/Core/Types/AngleDegreesFloatHandler.cs +++ b/Source/Core/Types/AngleDegreesFloatHandler.cs @@ -27,7 +27,7 @@ using CodeImp.DoomBuilder.Windows; namespace CodeImp.DoomBuilder.Types { [TypeHandler(UniversalType.AngleDegreesFloat, "Degrees (Decimal)", true)] - internal class AngleDegreesFloatHandler : TypeHandler + internal class AngleDegreesFloatHandler : AngleDegreesHandler { #region ================== Constants @@ -35,7 +35,7 @@ namespace CodeImp.DoomBuilder.Types #region ================== Variables - private float value; + private new float value; #endregion @@ -43,7 +43,7 @@ namespace CodeImp.DoomBuilder.Types public override bool IsBrowseable { get { return true; } } - public override Image BrowseImage { get { return Properties.Resources.Angle; } } + public override Image BrowseImage { get { return angleicons[General.ClampAngle((int)Math.Round(value) + 22) / 45]; } } #endregion @@ -73,7 +73,8 @@ namespace CodeImp.DoomBuilder.Types // Set directly this.value = Convert.ToSingle(value); } - else { + else + { // Try parsing as string float result; if(float.TryParse(value.ToString(), NumberStyles.Float, CultureInfo.CurrentCulture, out result)) diff --git a/Source/Core/Types/AngleDegreesHandler.cs b/Source/Core/Types/AngleDegreesHandler.cs index 0120c0ce3e19f7f9d1a81479128d9ef40e55081c..14690c43aaa75f27b2ee724c905c1259d8f7c915 100644 --- a/Source/Core/Types/AngleDegreesHandler.cs +++ b/Source/Core/Types/AngleDegreesHandler.cs @@ -36,6 +36,7 @@ namespace CodeImp.DoomBuilder.Types #region ================== Variables protected int value; + protected Image[] angleicons; #endregion @@ -43,12 +44,28 @@ namespace CodeImp.DoomBuilder.Types public override bool IsBrowseable { get { return true; } } - public override Image BrowseImage { get { return Properties.Resources.Angle; } } - + public override Image BrowseImage { get { return angleicons[General.ClampAngle(value + 22) / 45]; } } + public override bool DynamicImage { get { return true; } } + #endregion #region ================== Constructor + public AngleDegreesHandler() + { + angleicons = new[] + { + Properties.Resources.Angle, + Properties.Resources.Angle7, + Properties.Resources.Angle6, + Properties.Resources.Angle5, + Properties.Resources.Angle4, + Properties.Resources.Angle3, + Properties.Resources.Angle2, + Properties.Resources.Angle1 + }; + } + #endregion #region ================== Methods diff --git a/Source/Core/Types/AngleRadiansHandler.cs b/Source/Core/Types/AngleRadiansHandler.cs index dee4904cafc4d9e8454a22aa87fb3a89dbadf602..fa07b2f764e9935cc83232e63a796ff3c21e7393 100644 --- a/Source/Core/Types/AngleRadiansHandler.cs +++ b/Source/Core/Types/AngleRadiansHandler.cs @@ -28,7 +28,7 @@ using CodeImp.DoomBuilder.Geometry; namespace CodeImp.DoomBuilder.Types { [TypeHandler(UniversalType.AngleRadians, "Radians", true)] - internal class AngleRadiansHandler : TypeHandler + internal class AngleRadiansHandler : AngleDegreesHandler { #region ================== Constants @@ -36,7 +36,7 @@ namespace CodeImp.DoomBuilder.Types #region ================== Variables - private float value; + private new float value; #endregion @@ -44,7 +44,7 @@ namespace CodeImp.DoomBuilder.Types public override bool IsBrowseable { get { return true; } } - public override Image BrowseImage { get { return Properties.Resources.Angle; } } + public override Image BrowseImage { get { return angleicons[General.ClampAngle(Angle2D.RealToDoom(value) + 22) / 45]; } } #endregion diff --git a/Source/Core/Types/ThingTagHandler.cs b/Source/Core/Types/ThingTagHandler.cs index 80fd08c004d2f60cbe59099e415c97a1dc65398d..32d043de08109d55b16f6be9c2e0d9959610cb47 100644 --- a/Source/Core/Types/ThingTagHandler.cs +++ b/Source/Core/Types/ThingTagHandler.cs @@ -31,23 +31,31 @@ namespace CodeImp.DoomBuilder.Types protected override EnumList CreateTagList() { - //collect tags + // Collect tags List<int> tags = new List<int>(); EnumList taglist = new EnumList(); foreach(Thing t in General.Map.Map.Things) { if(t.Tag == 0 || tags.Contains(t.Tag)) continue; + + // Check target class? + if(arginfo.TargetClasses.Count > 0) + { + ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.SRB2Type); + if(info != null && !arginfo.TargetClasses.Contains(info.ClassName)) continue; + } + tags.Add(t.Tag); } - //now sort them in descending order + // Now sort them in descending order tags.Sort((a, b) => -1 * a.CompareTo(b)); - //create enum items + // Create enum items foreach(int tag in tags) { - if(General.Map.Options.TagLabels.ContainsKey(tag)) //tag labels + if(General.Map.Options.TagLabels.ContainsKey(tag)) // Tag labels taglist.Add(new EnumItem(tag.ToString(), General.Map.Options.TagLabels[tag])); else taglist.Add(new EnumItem(tag.ToString(), tag.ToString())); diff --git a/Source/Core/Types/TypeHandler.cs b/Source/Core/Types/TypeHandler.cs index d8f9d50497fe1eebfd7e160b3ba078a25c0048a8..94b2d944d4177c34a6edde444a7ab751ecf16363 100644 --- a/Source/Core/Types/TypeHandler.cs +++ b/Source/Core/Types/TypeHandler.cs @@ -59,6 +59,7 @@ namespace CodeImp.DoomBuilder.Types public virtual bool IsLimitedToEnums { get { return false; } } public virtual Image BrowseImage { get { return null; } } + public virtual bool DynamicImage { get { return false; } } //mxd. When set to true, the button image will be re-applied after value changes #endregion diff --git a/Source/Core/VisualModes/VisualGeometry.cs b/Source/Core/VisualModes/VisualGeometry.cs index c3834cdb5bf8a6a8a19c279e7c5eb6483957438b..6aec5136d74e8ed6ed48f2becb6c9eba44014df2 100644 --- a/Source/Core/VisualModes/VisualGeometry.cs +++ b/Source/Core/VisualModes/VisualGeometry.cs @@ -33,7 +33,8 @@ namespace CodeImp.DoomBuilder.VisualModes { #region ================== Constants - public const float FOG_DENSITY_SCALER = -1.442692f / 256000f; //-1.442692f / 64000f; //mxd + private const float FOG_DENSITY_SCALER = -1.442692f / 512000f; //mxd. It's -1.442692f / 64000f in GZDoom...; + private const int FADE_MULTIPLIER = 4; //mxd #endregion @@ -198,27 +199,27 @@ namespace CodeImp.DoomBuilder.VisualModes boundingBox = BoundingBoxTools.CalculateBoundingPlane(bbs); } - //mxd. Calculate fogdistance - //TODO: this doesn't match any GZDoom light mode... - //GZDoom: gl_renderstate.h, SetFog(); - //GZDoom: gl_lightlevel.cpp gl_SetFog(); - protected float CalculateFogFactor(int brightness) { return CalculateFogFactor(Sector.Sector.FogMode, brightness); } - public static float CalculateFogFactor(SectorFogMode mode, int brightness) - { - float density; - switch (mode) - { - case SectorFogMode.OUTSIDEFOGDENSITY: - density = General.Map.Data.MapInfo.OutsideFogDensity; - break; + //mxd. Calculate fogdistance + //TODO: this doesn't match any GZDoom light mode... + //GZDoom: gl_renderstate.h, SetFog(); + //GZDoom: gl_lightlevel.cpp gl_SetFog(); + protected float CalculateFogFactor(int brightness) { return CalculateFogFactor(Sector.Sector.FogMode, brightness); } + public static float CalculateFogFactor(SectorFogMode mode, int brightness) + { + float density; + switch(mode) + { + case SectorFogMode.OUTSIDEFOGDENSITY: + density = General.Map.Data.MapInfo.OutsideFogDensity * FADE_MULTIPLIER; + break; - case SectorFogMode.FOGDENSITY: - density = General.Map.Data.MapInfo.FogDensity; - break; + case SectorFogMode.FOGDENSITY: + density = General.Map.Data.MapInfo.FogDensity * FADE_MULTIPLIER; + break; - case SectorFogMode.FADE: - density = General.Clamp(255 - brightness, 30, 255) * 4; - break; + case SectorFogMode.FADE: + density = General.Clamp(255 - brightness, 30, 255) * FADE_MULTIPLIER; + break; case SectorFogMode.CLASSIC: density = General.Clamp(255 - brightness, 30, 255); diff --git a/Source/Core/VisualModes/VisualMode.cs b/Source/Core/VisualModes/VisualMode.cs index 93d66d649bf5fed998e29566ad1ad1e51265c409..a02a87ae5b8f43139795946ed72710ceb9c83b93 100644 --- a/Source/Core/VisualModes/VisualMode.cs +++ b/Source/Core/VisualModes/VisualMode.cs @@ -114,7 +114,7 @@ namespace CodeImp.DoomBuilder.VisualModes //mxd. Synch camera position to cursor position or center of the screen in 2d-mode if(General.Settings.GZSynchCameras && General.Editing.Mode is ClassicMode) { - ClassicMode oldmode = General.Editing.Mode as ClassicMode; + ClassicMode oldmode = (ClassicMode)General.Editing.Mode; if(oldmode.IsMouseInside) initialcameraposition = new Vector2D(oldmode.MouseMapPos.x, oldmode.MouseMapPos.y); @@ -170,33 +170,37 @@ namespace CodeImp.DoomBuilder.VisualModes //mxd. Synch camera position to cursor position or center of the screen in 2d-mode if(General.Settings.GZSynchCameras) { - //If initial position is inside or nearby a sector - adjust camera.z accordingly - float posz = General.Map.VisualCamera.Position.z; - Sector nearestsector = General.Map.Map.GetSectorByCoordinates(initialcameraposition, blockmap); - - if(nearestsector == null) + // Keep previous camera position if Control is held and camera was previously moved in Visual mode + if(!General.Interface.CtrlState || General.Map.VisualCamera.Position.GetLengthSq() == 0) { - Linedef nearestline = MapSet.NearestLinedef(General.Map.Map.Linedefs, initialcameraposition); - if(nearestline != null) + //If initial position is inside or nearby a sector - adjust camera.z accordingly + float posz = General.Map.VisualCamera.Position.z; + Sector nearestsector = General.Map.Map.GetSectorByCoordinates(initialcameraposition, blockmap); + + if(nearestsector == null) { - float side = nearestline.SideOfLine(initialcameraposition); - Sidedef nearestside = (side < 0.0f ? nearestline.Front : nearestline.Back) ?? (side < 0.0f ? nearestline.Back : nearestline.Front); - if(nearestside != null) nearestsector = nearestside.Sector; + Linedef nearestline = MapSet.NearestLinedef(General.Map.Map.Linedefs, initialcameraposition); + if(nearestline != null) + { + float side = nearestline.SideOfLine(initialcameraposition); + Sidedef nearestside = (side < 0.0f ? nearestline.Front : nearestline.Back) ?? (side < 0.0f ? nearestline.Back : nearestline.Front); + if(nearestside != null) nearestsector = nearestside.Sector; + } } - } - if(nearestsector != null) - { - int sectorheight = nearestsector.CeilHeight - nearestsector.FloorHeight; - if (sectorheight < 41) - posz = nearestsector.FloorHeight + Math.Max(16, sectorheight / 2); - else if (General.Map.VisualCamera.Position.z < nearestsector.FloorHeight + 41) - posz = nearestsector.FloorHeight + 41; // same as in doom - else if (General.Map.VisualCamera.Position.z > nearestsector.CeilHeight) - posz = nearestsector.CeilHeight - 4; - } - - General.Map.VisualCamera.Position = new Vector3D(initialcameraposition.x, initialcameraposition.y, posz); + if(nearestsector != null) + { + int sectorheight = nearestsector.CeilHeight - nearestsector.FloorHeight; + if(sectorheight < 41) + posz = nearestsector.FloorHeight + Math.Max(16, sectorheight / 2); + else if(General.Map.VisualCamera.Position.z < nearestsector.FloorHeight + 41) + posz = nearestsector.FloorHeight + 41; // same as in doom + else if(General.Map.VisualCamera.Position.z > nearestsector.CeilHeight) + posz = nearestsector.CeilHeight - 4; + } + + General.Map.VisualCamera.Position = new Vector3D(initialcameraposition.x, initialcameraposition.y, posz); + } } else { @@ -230,7 +234,10 @@ namespace CodeImp.DoomBuilder.VisualModes //mxd selectedVisualSectors = null; selectedVisualThings = null; - + + //mxd. Extra floors may've been edited + General.Map.Renderer2D.UpdateExtraFloorFlag(); + // Stop special input mode General.Interface.DisableProcessing(); General.Interface.StopExclusiveMouseInput(); @@ -483,18 +490,13 @@ namespace CodeImp.DoomBuilder.VisualModes if(target.picked == null) return new Vector2D(float.NaN, float.NaN); - //now find where exactly did we hit - if(target.picked is VisualGeometry) - { - VisualGeometry vg = target.picked as VisualGeometry; - return GetIntersection(start, start + delta, vg.BoundingBox[0], new Vector3D(vg.Vertices[0].nx, vg.Vertices[0].ny, vg.Vertices[0].nz)); - } - - if(target.picked is VisualThing) - { - VisualThing vt = target.picked as VisualThing; - return GetIntersection(start, start + delta, vt.CenterV3D, D3DDevice.V3D(vt.Center - vt.PositionV3)); - } + // Now find where exactly did we hit + VisualGeometry vg = target.picked as VisualGeometry; + if(vg != null) return GetIntersection(start, start + delta, vg.BoundingBox[0], new Vector3D(vg.Vertices[0].nx, vg.Vertices[0].ny, vg.Vertices[0].nz)); + + + VisualThing vt = target.picked as VisualThing; + if(vt != null) return GetIntersection(start, start + delta, vt.CenterV3D, D3DDevice.V3D(vt.Center - vt.PositionV3)); return new Vector2D(float.NaN, float.NaN); } @@ -516,7 +518,7 @@ namespace CodeImp.DoomBuilder.VisualModes // This preforms visibility culling protected void DoCulling() { - Dictionary<Linedef, Linedef> visiblelines = new Dictionary<Linedef, Linedef>(200); + HashSet<Linedef> visiblelines = new HashSet<Linedef>(); Vector2D campos2d = General.Map.VisualCamera.Position; // Make collections @@ -536,10 +538,10 @@ namespace CodeImp.DoomBuilder.VisualModes foreach(Linedef ld in block.Lines) { // Line not already processed? - if(!visiblelines.ContainsKey(ld)) + if(!visiblelines.Contains(ld)) { // Add line if not added yet - visiblelines.Add(ld, ld); + visiblelines.Add(ld); // Which side of the line is the camera on? if(ld.SideOfLine(campos2d) < 0) @@ -573,21 +575,21 @@ namespace CodeImp.DoomBuilder.VisualModes { // Create new visual thing vt = CreateVisualThing(t); - allthings.Add(t, vt); + allthings[t] = vt; } - if (vt != null && !visiblethings.ContainsKey(vt.Thing)) - { - visiblethings.Add(vt.Thing, vt); - } - } + if(vt != null && !visiblethings.ContainsKey(vt.Thing)) + { + visiblethings[vt.Thing] = vt; + } + } } } if(processgeometry) { // Find camera sector - Linedef nld = MapSet.NearestLinedef(visiblelines.Values, campos2d); + Linedef nld = MapSet.NearestLinedef(visiblelines, campos2d); if(nld != null) { General.Map.VisualCamera.Sector = GetCameraSectorFromLinedef(nld); @@ -1106,10 +1108,8 @@ namespace CodeImp.DoomBuilder.VisualModes /// <summary> /// While this mode is active, this is called continuously to process whatever needs processing. /// </summary> - public override void OnProcess(float deltatime) + public override void OnProcess(long deltatime) { - float multiplier; - base.OnProcess(deltatime); // Camera vectors @@ -1120,6 +1120,7 @@ namespace CodeImp.DoomBuilder.VisualModes Vector3D upvec = new Vector3D(0.0f, 0.0f, 1.0f); // Move the camera + float multiplier; if(General.Interface.ShiftState) multiplier = MOVE_SPEED_MULTIPLIER * 2.0f; else multiplier = MOVE_SPEED_MULTIPLIER; if(keyforward) camdeltapos += camvec * cammovemul * General.Settings.MoveSpeed * multiplier * deltatime; if(keybackward) camdeltapos -= camvec * cammovemul * General.Settings.MoveSpeed * multiplier * deltatime; @@ -1152,18 +1153,30 @@ namespace CodeImp.DoomBuilder.VisualModes [BeginAction("centeroncoordinates", BaseAction = true)] protected virtual void CenterOnCoordinates() { - //show form... + // Show form... CenterOnCoordinatesForm form = new CenterOnCoordinatesForm(); - if(form.ShowDialog() == DialogResult.OK) - { - Sector s = General.Map.Map.GetSectorByCoordinates(form.Coordinates, blockmap); + if(form.ShowDialog() == DialogResult.OK) CenterOnCoordinates(form.Coordinates); + } - if(s == null) - General.Map.VisualCamera.Position = form.Coordinates; - else - General.Map.VisualCamera.Position = new Vector3D(form.Coordinates.x, form.Coordinates.y, s.FloorHeight + 54); - General.Map.VisualCamera.Sector = s; - } + //mxd + public void CenterOnCoordinates(Vector2D coords) + { + Sector s = General.Map.Map.GetSectorByCoordinates(coords, blockmap); + + if(s == null) + General.Map.VisualCamera.Position = coords; + else + General.Map.VisualCamera.Position = new Vector3D(coords.x, coords.y, s.FloorHeight + 54); + + General.Map.VisualCamera.Sector = s; + } + + //mxd + [BeginAction("togglehighlight", BaseAction = true)] + public void ToggleHighlight() + { + General.Settings.UseHighlight = !General.Settings.UseHighlight; + General.Interface.DisplayStatus(StatusType.Action, "Highlight is now " + (General.Settings.UseHighlight ? "ON" : "OFF") + "."); } #endregion diff --git a/Source/Core/VisualModes/VisualThing.cs b/Source/Core/VisualModes/VisualThing.cs index 5830ba26543cfb47a150156242b1de7a68cd43f8..6576eefb09400db4f8d2978d0073b31c6fedd8d8 100644 --- a/Source/Core/VisualModes/VisualThing.cs +++ b/Source/Core/VisualModes/VisualThing.cs @@ -37,7 +37,8 @@ namespace CodeImp.DoomBuilder.VisualModes #region ================== Constants protected const int FIXED_RADIUS = 8; //mxd. Used to render things with zero width and radius - internal const float LIT_FOG_DENSITY_SCALER = 255 * VisualGeometry.FOG_DENSITY_SCALER; //mxd + private const float DYNLIGHT_INTENSITY_SCALER = 255.0f; + private const float SUBLIGHT_INTENSITY_SCALER = 255.0f * 1.5f; // Scaler for subtractive dynamic lights #endregion @@ -353,7 +354,7 @@ namespace CodeImp.DoomBuilder.VisualModes if(!float.IsNaN(floorz) && !float.IsNaN(ceilz)) { float voffset; - if(thing.IsFlipped) + if(thing.IsFlipped || info.Hangs) { float thingz = ceilz - Math.Max(0, Thing.Position.z) - Thing.Height; voffset = -0.01f - General.Clamp(thingz, 0, ceilz - floorz); @@ -470,7 +471,7 @@ namespace CodeImp.DoomBuilder.VisualModes if(Thing.IsDirectional) { Matrix transform = Matrix.Scaling(thing.Size, thing.Size, thing.Size) - * (Matrix.RotationY(-Thing.RollRad) * Matrix.RotationX(-Thing.PitchRad) * Matrix.RotationZ(Thing.Angle)) + * (Matrix.RotationY(-Thing.RollRad) * Matrix.RotationX(Thing.PitchRad) * Matrix.RotationZ(Thing.Angle)) * ((sizeless || info.CenterHitbox) ? position : position * Matrix.Translation(0.0f, 0.0f, thingheight / 2f)); WorldVertex a0 = new WorldVertex(Vector3D.Transform(0.0f, 0.0f, 0.0f, transform)); //start @@ -546,8 +547,6 @@ namespace CodeImp.DoomBuilder.VisualModes //mxd. Update light info private void UpdateLight(int lightId) { - float scaled_intensity = 255.0f / General.Settings.GZDynamicLightIntensity; - if(lightId < GZBuilder.GZGeneral.GZ_LIGHT_TYPES[2]) //if it's gzdoom light { int n; @@ -555,33 +554,42 @@ namespace CodeImp.DoomBuilder.VisualModes { n = 0; lightRenderStyle = DynamicLightRenderStyle.NORMAL; - //lightColor.Alpha used in shader to perform some calculations based on light type - lightColor = new Color4((float)lightRenderStyle / 100.0f, thing.Args[0] / scaled_intensity / 2, thing.Args[1] / scaled_intensity / 2, thing.Args[2] / scaled_intensity / 2); - } + //lightColor.Alpha used in shader to perform some calculations based on light type + lightColor = new Color4((float)lightRenderStyle / 100.0f, + thing.Args[0] / DYNLIGHT_INTENSITY_SCALER, + thing.Args[1] / DYNLIGHT_INTENSITY_SCALER, + thing.Args[2] / DYNLIGHT_INTENSITY_SCALER); + } else if(lightId < GZBuilder.GZGeneral.GZ_LIGHT_TYPES[1]) { n = 10; lightRenderStyle = DynamicLightRenderStyle.ADDITIVE; - lightColor = new Color4((float)lightRenderStyle / 100.0f, thing.Args[0] / scaled_intensity / 2, thing.Args[1] / scaled_intensity / 2, thing.Args[2] / scaled_intensity / 2); - } + lightColor = new Color4((float)lightRenderStyle / 100.0f, + thing.Args[0] / DYNLIGHT_INTENSITY_SCALER, + thing.Args[1] / DYNLIGHT_INTENSITY_SCALER, + thing.Args[2] / DYNLIGHT_INTENSITY_SCALER); + } else { n = 20; lightRenderStyle = DynamicLightRenderStyle.NEGATIVE; - lightColor = new Color4((float)lightRenderStyle / 100.0f, thing.Args[0] / scaled_intensity / 3, thing.Args[1] / scaled_intensity / 3, thing.Args[2] / scaled_intensity / 3); - } + lightColor = new Color4((float)lightRenderStyle / 100.0f, + thing.Args[0] / SUBLIGHT_INTENSITY_SCALER, + thing.Args[1] / SUBLIGHT_INTENSITY_SCALER, + thing.Args[2] / SUBLIGHT_INTENSITY_SCALER); + } lightType = (DynamicLightType)(thing.SRB2Type - 9800 - n); if(lightType == DynamicLightType.SECTOR) { int scaler = 1; if(thing.Sector != null) scaler = thing.Sector.Brightness / 4; - lightPrimaryRadius = (thing.Args[3] * scaler) * General.Settings.GZDynamicLightRadius; + lightPrimaryRadius = (thing.Args[3] * scaler); } else { - lightPrimaryRadius = (thing.Args[3] * 2) * General.Settings.GZDynamicLightRadius; //works... that.. way in GZDoom - if(lightType > 0) lightSecondaryRadius = (thing.Args[4] * 2) * General.Settings.GZDynamicLightRadius; + lightPrimaryRadius = (thing.Args[3] * 2); //works... that.. way in GZDoom + if(lightType > 0) lightSecondaryRadius = (thing.Args[4] * 2); } } else //it's one of vavoom lights @@ -589,10 +597,18 @@ namespace CodeImp.DoomBuilder.VisualModes lightRenderStyle = DynamicLightRenderStyle.VAVOOM; lightType = (DynamicLightType)thing.SRB2Type; if(lightType == DynamicLightType.VAVOOM_COLORED) - lightColor = new Color4((float)lightRenderStyle / 100.0f, thing.Args[1] / scaled_intensity / 2, thing.Args[2] / scaled_intensity / 2, thing.Args[3] / scaled_intensity / 2); - else - lightColor = new Color4((float)lightRenderStyle / 100.0f, General.Settings.GZDynamicLightIntensity / 2, General.Settings.GZDynamicLightIntensity / 2, General.Settings.GZDynamicLightIntensity / 2); - lightPrimaryRadius = (thing.Args[0] * 8) * General.Settings.GZDynamicLightRadius; + { + lightColor = new Color4((float)lightRenderStyle / 100.0f, + thing.Args[1] / DYNLIGHT_INTENSITY_SCALER, + thing.Args[2] / DYNLIGHT_INTENSITY_SCALER, + thing.Args[3] / DYNLIGHT_INTENSITY_SCALER); + } + else + { + lightColor = new Color4((float)lightRenderStyle / 100.0f, 0.5f, 0.5f, 0.5f); + } + + lightPrimaryRadius = (thing.Args[0] * 8); } UpdateLightRadius(); @@ -602,12 +618,10 @@ namespace CodeImp.DoomBuilder.VisualModes private void UpdateGldefsLight() { DynamicLightData light = General.Map.Data.GldefsEntries[thing.SRB2Type]; - float intensity_mod = General.Settings.GZDynamicLightIntensity; - float scale_mod = General.Settings.GZDynamicLightRadius; //apply settings lightRenderStyle = light.Subtractive ? DynamicLightRenderStyle.NEGATIVE : DynamicLightRenderStyle.NORMAL; - lightColor = new Color4((float)lightRenderStyle / 100.0f, light.Color.Red * intensity_mod, light.Color.Green * intensity_mod, light.Color.Blue * intensity_mod); + lightColor = new Color4((float)lightRenderStyle / 100.0f, light.Color.Red, light.Color.Green, light.Color.Blue); Vector2D o = new Vector2D(light.Offset.X, light.Offset.Y).GetRotated(thing.Angle - Angle2D.PIHALF); lightOffset = new Vector3(o.x, o.y, light.Offset.Z); lightType = light.Type; @@ -618,8 +632,8 @@ namespace CodeImp.DoomBuilder.VisualModes } else { - lightPrimaryRadius = light.PrimaryRadius * scale_mod; - lightSecondaryRadius = light.SecondaryRadius * scale_mod; + lightPrimaryRadius = light.PrimaryRadius; + lightSecondaryRadius = light.SecondaryRadius; } lightInterval = light.Interval; @@ -653,7 +667,6 @@ namespace CodeImp.DoomBuilder.VisualModes return; } - float time = Clock.CurrentTime; float rMin = Math.Min(lightPrimaryRadius, lightSecondaryRadius); float rMax = Math.Max(lightPrimaryRadius, lightSecondaryRadius); float diff = rMax - rMin; @@ -661,12 +674,12 @@ namespace CodeImp.DoomBuilder.VisualModes switch(lightType) { case DynamicLightType.PULSE: - lightDelta = ((float)Math.Sin(time / (interval * 4.0f)) + 1.0f) / 2.0f; //just playing by the eye here... in [0.0 ... 1.0] interval + lightDelta = ((float)Math.Sin(Clock.CurrentTime / (interval * 4.0f)) + 1.0f) / 2.0f; //just playing by the eye here... in [0.0 ... 1.0] interval lightRadius = rMin + diff * lightDelta; break; - case DynamicLightType.FLICKER: - float fdelta = (float)Math.Sin(time / 0.1f); //just playing by the eye here... + case DynamicLightType.FLICKER: + float fdelta = (float)Math.Sin(Clock.CurrentTime / 0.1f); //just playing by the eye here... if(Math.Sign(fdelta) != Math.Sign(lightDelta)) { lightDelta = fdelta; @@ -675,7 +688,7 @@ namespace CodeImp.DoomBuilder.VisualModes break; case DynamicLightType.RANDOM: - float rdelta = (float)Math.Sin(time / (interval * 9.0f)); //just playing by the eye here... + float rdelta = (float)Math.Sin(Clock.CurrentTime / (interval * 9.0f)); //just playing by the eye here... if(Math.Sign(rdelta) != Math.Sign(lightDelta)) { lightRadius = rMin + (General.Random(0, (int) (diff * 10))) / 10.0f; diff --git a/Source/Core/Windows/AboutForm.Designer.cs b/Source/Core/Windows/AboutForm.Designer.cs index e5aac4be1ed7190c3061bb852f9896554309d28e..f926f88a846ebc27a2bbefab64117ab02fba5add 100644 --- a/Source/Core/Windows/AboutForm.Designer.cs +++ b/Source/Core/Windows/AboutForm.Designer.cs @@ -300,7 +300,7 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "AboutForm"; - this.Opacity = 1D; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Core/Windows/ActionBrowserForm.Designer.cs b/Source/Core/Windows/ActionBrowserForm.Designer.cs index 2e12e1bfb88a7dac976109a7b7741307040a0df6..1ecff5e54090e43a7d013b729f45fb2b4a5a0a44 100644 --- a/Source/Core/Windows/ActionBrowserForm.Designer.cs +++ b/Source/Core/Windows/ActionBrowserForm.Designer.cs @@ -56,7 +56,7 @@ namespace CodeImp.DoomBuilder.Windows this.option0label = new System.Windows.Forms.Label(); this.cancel = new System.Windows.Forms.Button(); this.apply = new System.Windows.Forms.Button(); - this.actions = new System.Windows.Forms.TreeView(); + this.actions = new CodeImp.DoomBuilder.Controls.BufferedTreeView(); this.tabs = new System.Windows.Forms.TabControl(); this.tabactions = new System.Windows.Forms.TabPage(); this.filterPanel = new System.Windows.Forms.Panel(); @@ -502,7 +502,7 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ActionBrowserForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Edit Action"; @@ -525,7 +525,7 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.Button cancel; private System.Windows.Forms.Button apply; - private System.Windows.Forms.TreeView actions; + private CodeImp.DoomBuilder.Controls.BufferedTreeView actions; private System.Windows.Forms.TabControl tabs; private System.Windows.Forms.TabPage tabactions; private System.Windows.Forms.TabPage tabgeneralized; diff --git a/Source/Core/Windows/ActionBrowserForm.cs b/Source/Core/Windows/ActionBrowserForm.cs index 71a890e228745232163a26c7923e619337e7b7a1..dfb9c0494b47408784a58141d21c7ac29532b1e3 100644 --- a/Source/Core/Windows/ActionBrowserForm.cs +++ b/Source/Core/Windows/ActionBrowserForm.cs @@ -81,7 +81,13 @@ namespace CodeImp.DoomBuilder.Windows // Select category foreach(GeneralizedCategory ac in category.Items) - if((action >= ac.Offset) && (action < (ac.Offset + ac.Length))) category.SelectedItem = ac; + { + if((action >= ac.Offset) && (action < (ac.Offset + ac.Length))) + { + category.SelectedItem = ac; + break; //mxd + } + } // Anything selected? if(category.SelectedIndex > -1) @@ -89,26 +95,27 @@ namespace CodeImp.DoomBuilder.Windows // Go for all options in selected category GeneralizedCategory sc = category.SelectedItem as GeneralizedCategory; int actionbits = action - sc.Offset; - for(int i = 0; i < MAX_OPTIONS; i++) + + // Go for all options, bigger steps first (mxd) + // INFO: both GeneralizedOptions and GeneralizedBits are incrimentally sorted + for(int i = MAX_OPTIONS - 1; i > -1; i--) { // Option used? if(i < sc.Options.Count) { - // Go for all bits - foreach(GeneralizedBit ab in sc.Options[i].Bits) + // Go for all bits, bigger bits first (mxd) + for(int b = sc.Options[i].Bits.Count - 1; b > -1; b--) { // Select this setting if matches - if((actionbits & ab.Index) == ab.Index) + GeneralizedBit bit = sc.Options[i].Bits[b]; + if((actionbits & bit.Index) == bit.Index) { - options[i].SelectedItem = ab; - if(ab.Index > 0) break; //mxd + options[i].SelectedItem = bit; + actionbits -= bit.Index; //mxd + if(bit.Index > 0) break; //mxd } } } - else - { - break; //mxd - } } } } @@ -239,10 +246,10 @@ namespace CodeImp.DoomBuilder.Windows if(tabs.SelectedTab == tabactions) { // Action node selected? - if((actions.SelectedNode != null) && (actions.SelectedNode.Tag is LinedefActionInfo)) + if(actions.SelectedNode != null && (actions.SelectedNode.Tag is LinedefActionInfo)) { // Our result - selectedaction = (actions.SelectedNode.Tag as LinedefActionInfo).Index; + selectedaction = ((LinedefActionInfo)actions.SelectedNode.Tag).Index; } } // Generalized action diff --git a/Source/Core/Windows/AngleForm.Designer.cs b/Source/Core/Windows/AngleForm.Designer.cs index 9c6900dac0399563f1ae6aa4c025a6a1bf3cb9e6..d5ae9dbb6ec99553d958a5e53ca664df0ab41575 100644 --- a/Source/Core/Windows/AngleForm.Designer.cs +++ b/Source/Core/Windows/AngleForm.Designer.cs @@ -78,6 +78,7 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "AngleForm"; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Core/Windows/BitFlagsForm.Designer.cs b/Source/Core/Windows/BitFlagsForm.Designer.cs index 64afcc62d4b7a186082c64a40dadbc05efdcc8ac..f844c934571f813ed192038c56428916b9e5b7b4 100644 --- a/Source/Core/Windows/BitFlagsForm.Designer.cs +++ b/Source/Core/Windows/BitFlagsForm.Designer.cs @@ -83,7 +83,7 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "BitFlagsForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Core/Windows/CenterOnCoordinatesForm.Designer.cs b/Source/Core/Windows/CenterOnCoordinatesForm.Designer.cs index bcf2eebbe21e02f59641a1829f6da599b4e94260..d69192b22c70cc782e53cbfd5b3018e6d497b788 100644 --- a/Source/Core/Windows/CenterOnCoordinatesForm.Designer.cs +++ b/Source/Core/Windows/CenterOnCoordinatesForm.Designer.cs @@ -81,7 +81,10 @@ this.gotoy.AllowNegative = true; this.gotoy.AllowRelative = false; this.gotoy.ButtonStep = 1; + this.gotoy.ButtonStepBig = 10F; this.gotoy.ButtonStepFloat = 1F; + this.gotoy.ButtonStepSmall = 0.1F; + this.gotoy.ButtonStepsUseModifierKeys = false; this.gotoy.ButtonStepsWrapAround = false; this.gotoy.Location = new System.Drawing.Point(32, 42); this.gotoy.Name = "gotoy"; @@ -95,7 +98,10 @@ this.gotox.AllowNegative = true; this.gotox.AllowRelative = false; this.gotox.ButtonStep = 1; + this.gotox.ButtonStepBig = 10F; this.gotox.ButtonStepFloat = 1F; + this.gotox.ButtonStepSmall = 0.1F; + this.gotox.ButtonStepsUseModifierKeys = false; this.gotox.ButtonStepsWrapAround = false; this.gotox.Location = new System.Drawing.Point(32, 12); this.gotox.Name = "gotox"; @@ -120,7 +126,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "CenterOnCoordinatesForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Go To Coordinates:"; diff --git a/Source/Core/Windows/ChangeMapForm.Designer.cs b/Source/Core/Windows/ChangeMapForm.Designer.cs index fa0db88e4995a500d1444dc416d5d477c91d5f9d..0da0154260fe2e6d03d3b9cd0c990ffb48e18ed5 100644 --- a/Source/Core/Windows/ChangeMapForm.Designer.cs +++ b/Source/Core/Windows/ChangeMapForm.Designer.cs @@ -108,7 +108,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ChangeMapForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; diff --git a/Source/Core/Windows/ConfigForm.Designer.cs b/Source/Core/Windows/ConfigForm.Designer.cs index 365a1296aba46b5695da373ae4cd01489206b4c2..9cf326b9a972f052c88ee042cc37d82975b70ad3 100644 --- a/Source/Core/Windows/ConfigForm.Designer.cs +++ b/Source/Core/Windows/ConfigForm.Designer.cs @@ -880,7 +880,7 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ConfigForm"; - this.Opacity = 1D; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Core/Windows/ConfigForm.cs b/Source/Core/Windows/ConfigForm.cs index f1e806cddb4b8194711efb06db7c52e7e7739d57..2902bd25357dcb853c69a68bd00c72405f5ed61a 100644 --- a/Source/Core/Windows/ConfigForm.cs +++ b/Source/Core/Windows/ConfigForm.cs @@ -325,7 +325,7 @@ namespace CodeImp.DoomBuilder.Windows configinfo.TestProgram = testapplication.Text; //mxd. User entered engine name before picking the engine? - if(cbEngineSelector.SelectedIndex == -1) + if(cbEngineSelector.SelectedIndex == -1 || string.IsNullOrEmpty(configinfo.TestProgram)) { ApplyTestEngineNameChange(); } @@ -746,31 +746,42 @@ namespace CodeImp.DoomBuilder.Windows //mxd private void btnNewEngine_Click(object sender, EventArgs e) { - preventchanges = true; - - EngineInfo newInfo = new EngineInfo(); - newInfo.TestSkill = (int)Math.Ceiling(gameconfig.Skills.Count / 2f); //set Medium skill level - newInfo.TestSkin = "Sonic"; - newInfo.TestGametype = -1; //Single player - configinfo.TestEngines.Add(newInfo); - configinfo.Changed = true; - - //store current engine name - if(!String.IsNullOrEmpty(cbEngineSelector.Text)) - configinfo.TestProgramName = cbEngineSelector.Text; + // Set initial directory? + if(testapplication.Text.Length > 0) + { + try { testprogramdialog.InitialDirectory = Path.GetDirectoryName(testapplication.Text); } + catch(Exception) { } + } - //refresh engines list - cbEngineSelector.Items.Clear(); - foreach(EngineInfo info in configinfo.TestEngines) - cbEngineSelector.Items.Add(info.TestProgramName); + // Browse for test program + if(testprogramdialog.ShowDialog() == DialogResult.OK) + { + preventchanges = true; - cbEngineSelector.SelectedIndex = configinfo.TestEngines.Count - 1; - btnRemoveEngine.Enabled = true; + // Remove EngineInfos without program path + configinfo.TestEngines.RemoveAll(info => string.IsNullOrEmpty(info.TestProgram)); - preventchanges = false; + // Add new EngineInfo + EngineInfo newInfo = new EngineInfo(); + newInfo.TestSkill = (int)Math.Ceiling(gameconfig.Skills.Count / 2f); // Set Medium skill level + newInfo.TestSkin = "Sonic"; + newInfo.TestGametype = -1; //Single player + configinfo.TestEngines.Add(newInfo); + configinfo.Changed = true; + + // Refresh engines list + cbEngineSelector.Items.Clear(); + foreach(EngineInfo info in configinfo.TestEngines) + cbEngineSelector.Items.Add(info.TestProgramName); - // Open engine browser - browsetestprogram_Click(this, EventArgs.Empty); + cbEngineSelector.SelectedIndex = configinfo.TestEngines.Count - 1; + btnRemoveEngine.Enabled = (configinfo.TestEngines.Count > 1); + + preventchanges = false; + + // Set engine path (will also update current engine name) + testapplication.Text = testprogramdialog.FileName; + } } //mxd @@ -804,6 +815,8 @@ namespace CodeImp.DoomBuilder.Windows private void cbEngineSelector_SelectedIndexChanged(object sender, EventArgs e) { if(cbEngineSelector.SelectedIndex == -1) return; + + preventchanges = true; //set new values configinfo.CurrentEngineIndex = cbEngineSelector.SelectedIndex; @@ -830,6 +843,8 @@ namespace CodeImp.DoomBuilder.Windows gametype.Value = gametypevalue - 1; gametype.Value = gametypevalue; customparameters.Checked = configinfo.CustomParameters; + + preventchanges = false; } //mxd diff --git a/Source/Core/Windows/ConfigForm.resx b/Source/Core/Windows/ConfigForm.resx index d03f29c573debea650f1a24219850950caca5b81..4d1eea3d01cf4bc0a90ad76bf0f73394a3c1e688 100644 --- a/Source/Core/Windows/ConfigForm.resx +++ b/Source/Core/Windows/ConfigForm.resx @@ -206,39 +206,6 @@ <metadata name="listtextures.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> - <metadata name="restoretexturesets.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="edittextureset.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="pastetexturesets.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="copytexturesets.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="removetextureset.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="addtextureset.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="tabmodes.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="listmodes.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="nodebuildertest.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="nodebuildersave.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="listtextures.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> <metadata name="smallimages.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>159, 17</value> </metadata> @@ -303,6 +270,9 @@ <metadata name="addtextureset.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> + <metadata name="tabmodes.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> <metadata name="listmodes.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> @@ -312,7 +282,4 @@ <metadata name="testprogramdialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> - <metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>416, 17</value> - </metadata> </root> \ No newline at end of file diff --git a/Source/Core/Windows/CustomFieldsForm.Designer.cs b/Source/Core/Windows/CustomFieldsForm.Designer.cs index b59491889afaeddcabd7933ff4da424a507262f3..073df92902f8c192e807c99b1ae74bfeb8d72018 100644 --- a/Source/Core/Windows/CustomFieldsForm.Designer.cs +++ b/Source/Core/Windows/CustomFieldsForm.Designer.cs @@ -46,6 +46,7 @@ namespace CodeImp.DoomBuilder.Windows this.fieldslist.Name = "fieldslist"; this.fieldslist.PropertyColumnVisible = true; this.fieldslist.PropertyColumnWidth = 150; + this.fieldslist.ShowFixedFields = true; this.fieldslist.Size = new System.Drawing.Size(506, 310); this.fieldslist.TabIndex = 0; this.fieldslist.TypeColumnVisible = true; @@ -91,7 +92,7 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "CustomFieldsForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Core/Windows/DelayedForm.cs b/Source/Core/Windows/DelayedForm.cs index d8b88d23b90eb5510dae06a924dd4fbda9b0a23c..5455f8d1f2b3915571913f2c53861f281720eb96 100644 --- a/Source/Core/Windows/DelayedForm.cs +++ b/Source/Core/Windows/DelayedForm.cs @@ -17,6 +17,8 @@ #region ================== Namespaces using System; +using System.ComponentModel; +using System.Drawing; using System.Windows.Forms; using CodeImp.DoomBuilder.Actions; using Action = CodeImp.DoomBuilder.Actions.Action; @@ -33,51 +35,145 @@ namespace CodeImp.DoomBuilder.Windows public class DelayedForm : Form { // Variables - private Timer formshowtimer; + protected readonly string configname; //mxd + + //mxd. Stored window size and location. Tracks location and size of FormWindowState.Normal window + private Size windowsize = Size.Empty; + private Point windowlocation = Point.Empty; // Constructor - public DelayedForm() + protected DelayedForm() { - this.Opacity = 0; //mxd - //mxd. And now, let's hope this doesn't horribly break anything... if(!(this is MainForm)) { this.KeyPreview = true; this.KeyUp += OnKeyUp; } - - // Create a timer that we need to show the form - formshowtimer = new Timer(); - formshowtimer.Interval = 1; - formshowtimer.Tick += formshowtimer_Tick; + + //mxd. Only when running (this.DesignMode doesn't seem to cut it here, + // probably because not this, but a child class is in design mode...) + if(LicenseManager.UsageMode != LicenseUsageMode.Designtime) + { + configname = this.GetType().Name.ToLowerInvariant(); + General.Actions.BindMethods(this); + } } - - // When form is shown - protected override void OnShown(EventArgs e) + + //mxd + protected override void OnLoad(EventArgs e) { // Let the base class know - base.OnShown(e); + base.OnLoad(e); + + if(this.DesignMode) return; + + // Restore location and size + this.SuspendLayout(); + + // Restore windowstate + if(this.MaximizeBox) + { + this.WindowState = (FormWindowState)General.Settings.ReadSetting("windows." + configname + ".windowstate", (int)FormWindowState.Normal); + } + + // Form size matters? + if(this.FormBorderStyle == FormBorderStyle.Sizable || this.FormBorderStyle == FormBorderStyle.SizableToolWindow) + { + this.Size = new Size(General.Settings.ReadSetting("windows." + configname + ".sizewidth", this.Size.Width), + General.Settings.ReadSetting("windows." + configname + ".sizeheight", this.Size.Height)); + } + + // Restore location + Point validlocation = Point.Empty; + Point location = new Point(General.Settings.ReadSetting("windows." + configname + ".positionx", int.MaxValue), + General.Settings.ReadSetting("windows." + configname + ".positiony", int.MaxValue)); + + if(location.X < int.MaxValue && location.Y < int.MaxValue) + { + // Location withing screen bounds? + Rectangle bounds = new Rectangle(location, this.Size); + bounds.Inflate(16, 16); // Add some safety padding + if(SystemInformation.VirtualScreen.IntersectsWith(bounds)) validlocation = location; + } + + if(validlocation == Point.Empty && !(this is MainForm)) + { + // Do the manual CenterParent... + validlocation = new Point(General.MainWindow.Location.X + General.MainWindow.Width / 2 - this.Width / 2, + General.MainWindow.Location.Y + General.MainWindow.Height / 2 - this.Height / 2); + } + + // Apply location + if(validlocation == Point.Empty) + { + this.StartPosition = FormStartPosition.CenterParent; + } + else + { + this.StartPosition = FormStartPosition.Manual; + this.Location = validlocation; + } - // Start the timer to show the form - formshowtimer.Enabled = true; + // Show the form if needed + if(this.Opacity < 1.0) this.Opacity = 1.0; - // Bind any methods (mxd) - if(!DesignMode) General.Actions.BindMethods(this); + this.ResumeLayout(); } - // When the form is to be shown - private void formshowtimer_Tick(object sender, EventArgs e) + //mxd. When form is closing + protected override void OnClosing(CancelEventArgs e) { - // Get rid of the timer - formshowtimer.Dispose(); - formshowtimer = null; + if(e.Cancel) return; - if(!this.IsDisposed) + // Let the base class know + base.OnClosing(e); + + // Determine window state to save + if(this.MaximizeBox) { - // Make the form visible - this.Opacity = 1.0; + int windowstate; + if(this.WindowState != FormWindowState.Minimized) + windowstate = (int)this.WindowState; + else + windowstate = (int)FormWindowState.Normal; + + General.Settings.WriteSetting("windows." + configname + ".windowstate", windowstate); } + + // Form size matters? + if(this.FormBorderStyle == FormBorderStyle.Sizable || this.FormBorderStyle == FormBorderStyle.SizableToolWindow) + { + Size size = ((windowsize.IsEmpty && this.WindowState == FormWindowState.Normal) ? this.Size : windowsize); // Prefer stored size if it was set + if(!size.IsEmpty) + { + General.Settings.WriteSetting("windows." + configname + ".sizewidth", size.Width); + General.Settings.WriteSetting("windows." + configname + ".sizeheight", size.Height); + } + } + + // Save location + Point location = ((windowlocation.IsEmpty && this.WindowState == FormWindowState.Normal) ? this.Location : windowlocation); // Prefer stored location if it was set + if(!location.IsEmpty) + { + General.Settings.WriteSetting("windows." + configname + ".positionx", location.X); + General.Settings.WriteSetting("windows." + configname + ".positiony", location.Y); + } + } + + //mxd. Also triggered when the window is dragged. + protected override void OnResizeEnd(EventArgs e) + { + // Store location and size when window is not minimized or maximized + if(this.WindowState == FormWindowState.Normal) + { + // Form size matters? + if(this.FormBorderStyle == FormBorderStyle.Sizable || this.FormBorderStyle == FormBorderStyle.SizableToolWindow) + windowsize = this.Size; + windowlocation = this.Location; + } + + base.OnResizeEnd(e); } //mxd. Special handling to call "save screenshot" actions from any form, @@ -89,7 +185,7 @@ namespace CodeImp.DoomBuilder.Windows } // mxd. Handle screenshot saving from any form - internal static bool ProcessSaveScreenshotAction(int key) + private static bool ProcessSaveScreenshotAction(int key) { Action[] actions = General.Actions.GetActionsByKey(key); foreach(Action action in actions) diff --git a/Source/Core/Windows/EffectBrowserForm.Designer.cs b/Source/Core/Windows/EffectBrowserForm.Designer.cs index 8060da243537f31ade1cfaee79adaf1e000d35c2..049cb16854ed48aca197fa861b1b0265cf828651 100644 --- a/Source/Core/Windows/EffectBrowserForm.Designer.cs +++ b/Source/Core/Windows/EffectBrowserForm.Designer.cs @@ -398,7 +398,7 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "EffectBrowserForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Core/Windows/EffectBrowserForm.cs b/Source/Core/Windows/EffectBrowserForm.cs index e29d2a53ba374bbcefa949f88224775dde3bc481..360a4e43704e8d55454e6f5fc248dabd3e43d3b7 100644 --- a/Source/Core/Windows/EffectBrowserForm.cs +++ b/Source/Core/Windows/EffectBrowserForm.cs @@ -54,16 +54,12 @@ namespace CodeImp.DoomBuilder.Windows Label[] optionlbls = { option0label, option1label, option2label, option3label, option4label, option5label, option6label, option7label }; - // Go for all predefined effects - bool selected = CreateEffects(effect); //mxd - allitems = new ListViewItem[effects.Items.Count]; //mxd - effects.Items.CopyTo(allitems, 0); //mxd - // Using generalized effects? + int nongeneralizedeffect = effect; //mxd if(General.Map.Config.GeneralizedEffects) { - // Go for all options - for(int i = 0; i < MAX_OPTIONS; i++) + // Go for all options, bigger steps first (mxd) + for(int i = MAX_OPTIONS - 1; i > -1; i--) { // Option used in selected category? if(i < General.Map.Config.GenEffectOptions.Count) @@ -88,6 +84,7 @@ namespace CodeImp.DoomBuilder.Windows if((effect & ab.Index) == ab.Index) { options[i].SelectedItem = ab; + nongeneralizedeffect -= ab.Index; //mxd if(ab.Index > 0) break; //mxd } } @@ -100,15 +97,20 @@ namespace CodeImp.DoomBuilder.Windows optionlbls[i].Visible = false; } } - - // Open the generalized tab when given effect is generalized - if(!selected) tabs.SelectedTab = tabgeneralized; } else { // Remove generalized tab tabs.TabPages.Remove(tabgeneralized); } + + //mxd. Go for all predefined effects + bool selected = CreateEffects(nongeneralizedeffect) && General.Map.Config.GeneralizedEffects; //mxd + allitems = new ListViewItem[effects.Items.Count]; //mxd + effects.Items.CopyTo(allitems, 0); //mxd + + // Open the generalized tab when given effect is generalized + if(!selected && General.Map.Config.GeneralizedEffects) tabs.SelectedTab = tabgeneralized; } // This browses for an effect @@ -193,19 +195,16 @@ namespace CodeImp.DoomBuilder.Windows { // Presume no result selectedeffect = 0; - - // Predefined action? - if(tabs.SelectedTab == tabeffects) + + //mxd. Add predefined effect? + if((effects.SelectedItems.Count > 0) && (effects.SelectedItems[0].Tag is SectorEffectInfo)) { - // Effect selected? - if((effects.SelectedItems.Count > 0) && (effects.SelectedItems[0].Tag is SectorEffectInfo)) - { - // Our result - selectedeffect = (effects.SelectedItems[0].Tag as SectorEffectInfo).Index; - } + // Our result + selectedeffect = ((SectorEffectInfo)effects.SelectedItems[0].Tag).Index; } - // Generalized action - else + + //mxd. Add generalized effects? (Don't add when "Any effect" is selected) + if(selectedeffect != -1 && General.Map.Config.GeneralizedEffects) { // Go for all options for(int i = 0; i < MAX_OPTIONS; i++) diff --git a/Source/Core/Windows/ErrorsForm.Designer.cs b/Source/Core/Windows/ErrorsForm.Designer.cs index 90bc2c94698886035f1edbc957632769784be064..5b543a661612811a6817559f325eac6876f2ac07 100644 --- a/Source/Core/Windows/ErrorsForm.Designer.cs +++ b/Source/Core/Windows/ErrorsForm.Designer.cs @@ -162,6 +162,7 @@ namespace CodeImp.DoomBuilder.Windows this.MinimizeBox = false; this.MinimumSize = new System.Drawing.Size(680, 300); this.Name = "ErrorsForm"; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; diff --git a/Source/Core/Windows/ErrorsForm.cs b/Source/Core/Windows/ErrorsForm.cs index af506d3dd5674a9b3154812cb65b41c9d9751ec0..dd8347fee03acb1829c1562fa94be326d0cc5dbc 100644 --- a/Source/Core/Windows/ErrorsForm.cs +++ b/Source/Core/Windows/ErrorsForm.cs @@ -39,6 +39,7 @@ namespace CodeImp.DoomBuilder.Windows public ErrorsForm() { InitializeComponent(); + FillList(); checkerrors.Start(); checkshow.Checked = General.Settings.ShowErrorsWindow; @@ -92,10 +93,7 @@ namespace CodeImp.DoomBuilder.Windows private void checkerrors_Tick(object sender, EventArgs e) { // If errors have been added, update the list - if(General.ErrorLogger.HasChanged) - { - FillList(); - } + if(General.ErrorLogger.HasChanged) FillList(); } // This clears all errors diff --git a/Source/Core/Windows/FlagsForm.Designer.cs b/Source/Core/Windows/FlagsForm.Designer.cs index ea229074fb0087ab27d935d84c07749592e91d34..3f7e31b2f71615e986f381abda62fe6dd853a863 100644 --- a/Source/Core/Windows/FlagsForm.Designer.cs +++ b/Source/Core/Windows/FlagsForm.Designer.cs @@ -73,6 +73,9 @@ // // groupBox1 // + this.groupBox1.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.groupBox1.Controls.Add(this.flags); this.groupBox1.Location = new System.Drawing.Point(12, 7); this.groupBox1.Name = "groupBox1"; @@ -94,7 +97,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "FlagsForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Core/Windows/FlagsForm.cs b/Source/Core/Windows/FlagsForm.cs index 6e70d94ff903db6fec8fbed66b45ddaa786f903c..631a37cfbf66f5c902e7146ac85b105618b1589e 100644 --- a/Source/Core/Windows/FlagsForm.cs +++ b/Source/Core/Windows/FlagsForm.cs @@ -33,9 +33,27 @@ namespace CodeImp.DoomBuilder.Windows this.value = value; flagdefs = inflags; + //mxd. Store current size... + int flagswidth = flags.Width; + int flagsheight = flags.Height; + + //mxd. How many columns will be required? + flags.Columns = Math.Max(1, flagdefs.Count / 8); + // Fill flags list foreach(KeyValuePair<string, string> tf in flagdefs) - flags.Add(tf.Value, tf.Key); + { + CheckBox cb = flags.Add(tf.Value, tf.Key); + cb.ThreeState = true; //mxd + cb.CheckState = CheckState.Indeterminate; //mxd + } + + //mxd. Resize window? + int newflagswidth = flags.GetWidth(); + int newflagsheight = flags.GetHeight(); + + if(flagswidth != newflagswidth) this.Width += (newflagswidth - flagswidth); + if(flagsheight != newflagsheight) this.Height += (newflagsheight - flagsheight); // Parse the value string and check the boxes if necessary if (!string.IsNullOrEmpty(value.Trim())) @@ -44,14 +62,20 @@ namespace CodeImp.DoomBuilder.Windows { string str = s.Trim(); + //mxd. Negative flag? + CheckState setflag = CheckState.Checked; + if(str.StartsWith("!")) + { + setflag = CheckState.Unchecked; + str = str.Substring(1, str.Length - 1); + } + // Make sure the given flag actually exists - if(!flagdefs.ContainsKey(str)) - continue; + if(!flagdefs.ContainsKey(str)) continue; foreach(CheckBox c in flags.Checkboxes) { - if(c.Text == flagdefs[str]) - c.Checked = true; + if(c.Text == flagdefs[str]) c.CheckState = setflag; } } } @@ -78,14 +102,14 @@ namespace CodeImp.DoomBuilder.Windows foreach(CheckBox c in flags.Checkboxes) { - if(c.Checked == false) continue; + if(c.CheckState == CheckState.Indeterminate) continue; foreach(KeyValuePair<string, string> lf in flagdefs) { if(lf.Value == c.Text) { - if (!string.IsNullOrEmpty(value)) value += ","; - value += lf.Key; + if(!string.IsNullOrEmpty(value)) value += ","; + value += (c.CheckState == CheckState.Unchecked ? "!" + lf.Key : lf.Key); } } } diff --git a/Source/Core/Windows/GridSetupForm.Designer.cs b/Source/Core/Windows/GridSetupForm.Designer.cs index d4668f5d01ae7a2fcc49bef29c8872d98b3a8b96..46125076c6c5e2e0248dd67703d206bf86a77c53 100644 --- a/Source/Core/Windows/GridSetupForm.Designer.cs +++ b/Source/Core/Windows/GridSetupForm.Designer.cs @@ -72,7 +72,10 @@ namespace CodeImp.DoomBuilder.Windows this.gridsize.AllowNegative = false; this.gridsize.AllowRelative = true; this.gridsize.ButtonStep = 8; + this.gridsize.ButtonStepBig = 10F; this.gridsize.ButtonStepFloat = 1F; + this.gridsize.ButtonStepSmall = 0.1F; + this.gridsize.ButtonStepsUseModifierKeys = false; this.gridsize.ButtonStepsWrapAround = false; this.gridsize.Location = new System.Drawing.Point(146, 26); this.gridsize.Name = "gridsize"; @@ -117,7 +120,10 @@ namespace CodeImp.DoomBuilder.Windows this.backscaley.AllowNegative = false; this.backscaley.AllowRelative = true; this.backscaley.ButtonStep = 1; + this.backscaley.ButtonStepBig = 10F; this.backscaley.ButtonStepFloat = 1F; + this.backscaley.ButtonStepSmall = 0.1F; + this.backscaley.ButtonStepsUseModifierKeys = false; this.backscaley.ButtonStepsWrapAround = false; this.backscaley.Enabled = false; this.backscaley.Location = new System.Drawing.Point(197, 212); @@ -132,7 +138,10 @@ namespace CodeImp.DoomBuilder.Windows this.backscalex.AllowNegative = false; this.backscalex.AllowRelative = true; this.backscalex.ButtonStep = 1; + this.backscalex.ButtonStepBig = 10F; this.backscalex.ButtonStepFloat = 1F; + this.backscalex.ButtonStepSmall = 0.1F; + this.backscalex.ButtonStepsUseModifierKeys = false; this.backscalex.ButtonStepsWrapAround = false; this.backscalex.Enabled = false; this.backscalex.Location = new System.Drawing.Point(124, 212); @@ -147,7 +156,10 @@ namespace CodeImp.DoomBuilder.Windows this.backoffsety.AllowNegative = true; this.backoffsety.AllowRelative = true; this.backoffsety.ButtonStep = 1; + this.backoffsety.ButtonStepBig = 10F; this.backoffsety.ButtonStepFloat = 1F; + this.backoffsety.ButtonStepSmall = 0.1F; + this.backoffsety.ButtonStepsUseModifierKeys = false; this.backoffsety.ButtonStepsWrapAround = false; this.backoffsety.Enabled = false; this.backoffsety.Location = new System.Drawing.Point(197, 173); @@ -162,7 +174,10 @@ namespace CodeImp.DoomBuilder.Windows this.backoffsetx.AllowNegative = true; this.backoffsetx.AllowRelative = true; this.backoffsetx.ButtonStep = 1; + this.backoffsetx.ButtonStepBig = 10F; this.backoffsetx.ButtonStepFloat = 1F; + this.backoffsetx.ButtonStepSmall = 0.1F; + this.backoffsetx.ButtonStepsUseModifierKeys = false; this.backoffsetx.ButtonStepsWrapAround = false; this.backoffsetx.Enabled = false; this.backoffsetx.Location = new System.Drawing.Point(124, 173); @@ -289,7 +304,7 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "GridSetupForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Core/Windows/IMainForm.cs b/Source/Core/Windows/IMainForm.cs index 0754b00bcb810ecfec2325cf51399bf650c1c5c8..ffc7dacd39ba6a20c008fbe32a83969d7bb2f008 100644 --- a/Source/Core/Windows/IMainForm.cs +++ b/Source/Core/Windows/IMainForm.cs @@ -18,6 +18,7 @@ using System; using System.Collections.Generic; +using System.Drawing; using System.Windows.Forms; using CodeImp.DoomBuilder.Map; using CodeImp.DoomBuilder.Geometry; @@ -76,6 +77,7 @@ namespace CodeImp.DoomBuilder.Windows void ResumeExclusiveMouseInput(); void SetCursor(Cursor cursor); void MessageBeep(MessageBeepType type); + SizeF MeasureString(string text, Font font); //mxd /// <summary> /// This moves the focus to the editing display. @@ -189,11 +191,26 @@ namespace CodeImp.DoomBuilder.Windows /// This removes a custom button from the toolbar. /// </summary> void RemoveButton(ToolStripItem button); + + /// <summary> + /// This suspends layouts of all toolbars, which can have buttons added/removed using AddButton() / RemoveButton(). + /// </summary> + void BeginToolbarUpdate(); //mxd + + /// <summary> + /// This resumes layouts of all toolbars, which can have buttons added/removed using AddButton() / RemoveButton(). + /// </summary> + void EndToolbarUpdate(); //mxd /// <summary> /// This adds a docker to the side panel. /// </summary> void AddDocker(Docker d); + + /// <summary> + /// This adds a docker to the side panel and plays notify animation when the control is collapsed + /// </summary> + void AddDocker(Docker d, bool notify); //mxd /// <summary> /// This removes a docker from the side panel. diff --git a/Source/Core/Windows/LinedefEditForm.Designer.cs b/Source/Core/Windows/LinedefEditForm.Designer.cs index c25230ba7fcd1cffed481e17b9ee2af2fd62218d..e5d6d681630f14e650d36a0034925bb34a61c270 100644 --- a/Source/Core/Windows/LinedefEditForm.Designer.cs +++ b/Source/Core/Windows/LinedefEditForm.Designer.cs @@ -28,600 +28,573 @@ namespace CodeImp.DoomBuilder.Windows /// </summary> private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - System.Windows.Forms.Label label11; - System.Windows.Forms.Label label5; - System.Windows.Forms.Label label4; - System.Windows.Forms.Label label3; - System.Windows.Forms.Label label12; - System.Windows.Forms.Label label8; - System.Windows.Forms.Label label9; - System.Windows.Forms.Label label10; - System.Windows.Forms.Label activationlabel; - System.Windows.Forms.Label label2; - this.tooltip = new System.Windows.Forms.ToolTip(this.components); - this.browseaction = new System.Windows.Forms.Button(); - this.apply = new System.Windows.Forms.Button(); - this.cancel = new System.Windows.Forms.Button(); - this.panel = new System.Windows.Forms.Panel(); - this.backside = new System.Windows.Forms.CheckBox(); - this.frontside = new System.Windows.Forms.CheckBox(); - this.frontgroup = new System.Windows.Forms.GroupBox(); - this.replaceunusedfronttextures = new System.Windows.Forms.CheckBox(); - this.replaceunusedbacktextures = new System.Windows.Forms.CheckBox(); - this.labelFrontTextureOffset = new System.Windows.Forms.Label(); - this.frontsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.frontlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); - this.frontmid = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); - this.fronthigh = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); - this.frontTextureOffset = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl(); - this.backgroup = new System.Windows.Forms.GroupBox(); - this.labelBackTextureOffset = new System.Windows.Forms.Label(); - this.backsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.backlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); - this.backmid = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); - this.backhigh = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); - this.backTextureOffset = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl(); - this.flagsgroup = new System.Windows.Forms.GroupBox(); - this.flags = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); - this.actiongroup = new System.Windows.Forms.GroupBox(); - this.argscontrol = new CodeImp.DoomBuilder.Controls.ArgumentsControl(); - this.actionhelp = new CodeImp.DoomBuilder.Controls.ActionSpecialHelpButton(); - this.hexenpanel = new System.Windows.Forms.Panel(); - this.activation = new System.Windows.Forms.ComboBox(); - this.action = new CodeImp.DoomBuilder.Controls.ActionSelectorControl(); - this.idgroup = new System.Windows.Forms.GroupBox(); - this.tagSelector = new CodeImp.DoomBuilder.GZBuilder.Controls.TagSelector(); - label11 = new System.Windows.Forms.Label(); - label5 = new System.Windows.Forms.Label(); - label4 = new System.Windows.Forms.Label(); - label3 = new System.Windows.Forms.Label(); - label12 = new System.Windows.Forms.Label(); - label8 = new System.Windows.Forms.Label(); - label9 = new System.Windows.Forms.Label(); - label10 = new System.Windows.Forms.Label(); - activationlabel = new System.Windows.Forms.Label(); - label2 = new System.Windows.Forms.Label(); - this.panel.SuspendLayout(); - this.frontgroup.SuspendLayout(); - this.backgroup.SuspendLayout(); - this.flagsgroup.SuspendLayout(); - this.actiongroup.SuspendLayout(); - this.hexenpanel.SuspendLayout(); - this.idgroup.SuspendLayout(); - this.SuspendLayout(); - // - // label11 - // - label11.Location = new System.Drawing.Point(6, 40); - label11.Name = "label11"; - label11.Size = new System.Drawing.Size(80, 14); - label11.TabIndex = 13; - label11.Text = "Sector Index:"; - label11.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // label5 - // - label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - label5.Location = new System.Drawing.Point(437, 13); - label5.Name = "label5"; - label5.Size = new System.Drawing.Size(83, 16); - label5.TabIndex = 5; - label5.Text = "Lower"; - label5.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // label4 - // - label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - label4.Location = new System.Drawing.Point(346, 13); - label4.Name = "label4"; - label4.Size = new System.Drawing.Size(83, 16); - label4.TabIndex = 4; - label4.Text = "Middle"; - label4.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // label3 - // - label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - label3.Location = new System.Drawing.Point(255, 13); - label3.Name = "label3"; - label3.Size = new System.Drawing.Size(83, 16); - label3.TabIndex = 3; - label3.Text = "Upper"; - label3.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // label12 - // - label12.Location = new System.Drawing.Point(6, 40); - label12.Name = "label12"; - label12.Size = new System.Drawing.Size(80, 14); - label12.TabIndex = 16; - label12.Text = "Sector Index:"; - label12.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // label8 - // - label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - label8.Location = new System.Drawing.Point(437, 13); - 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, 13); - label9.Name = "label9"; - label9.Size = new System.Drawing.Size(83, 16); - label9.TabIndex = 4; - label9.Text = "Middle"; - label9.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // label10 - // - label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - label10.Location = new System.Drawing.Point(255, 13); - label10.Name = "label10"; - label10.Size = new System.Drawing.Size(83, 16); - label10.TabIndex = 3; - label10.Text = "Upper"; - label10.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // activationlabel - // - activationlabel.AutoSize = true; - activationlabel.Location = new System.Drawing.Point(6, 11); - activationlabel.Name = "activationlabel"; - activationlabel.Size = new System.Drawing.Size(43, 13); - activationlabel.TabIndex = 10; - activationlabel.Text = "Trigger:"; - // - // label2 - // - label2.AutoSize = true; - label2.Location = new System.Drawing.Point(15, 26); - label2.Name = "label2"; - label2.Size = new System.Drawing.Size(40, 13); - label2.TabIndex = 9; - label2.Text = "Action:"; - // - // browseaction - // - this.browseaction.Image = global::CodeImp.DoomBuilder.Properties.Resources.List; - this.browseaction.Location = new System.Drawing.Point(476, 21); - this.browseaction.Name = "browseaction"; - this.browseaction.Size = new System.Drawing.Size(28, 25); - this.browseaction.TabIndex = 1; - this.browseaction.Text = " "; - this.tooltip.SetToolTip(this.browseaction, "Browse Action"); - this.browseaction.UseVisualStyleBackColor = true; - this.browseaction.Click += new System.EventHandler(this.browseaction_Click); - // - // apply - // - this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.apply.Location = new System.Drawing.Point(335, 728); - this.apply.Name = "apply"; - this.apply.Size = new System.Drawing.Size(112, 25); - this.apply.TabIndex = 1; - this.apply.Text = "OK"; - this.apply.UseVisualStyleBackColor = true; - this.apply.Click += new System.EventHandler(this.apply_Click); - // - // cancel - // - this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancel.Location = new System.Drawing.Point(453, 728); - this.cancel.Name = "cancel"; - this.cancel.Size = new System.Drawing.Size(112, 25); - this.cancel.TabIndex = 2; - this.cancel.Text = "Cancel"; - this.cancel.UseVisualStyleBackColor = true; - this.cancel.Click += new System.EventHandler(this.cancel_Click); - // - // panel - // - this.panel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.Label label11; + System.Windows.Forms.Label label5; + System.Windows.Forms.Label label4; + System.Windows.Forms.Label label3; + System.Windows.Forms.Label label12; + System.Windows.Forms.Label label8; + System.Windows.Forms.Label label9; + System.Windows.Forms.Label label10; + System.Windows.Forms.Label activationlabel; + System.Windows.Forms.Label label2; + this.tooltip = new System.Windows.Forms.ToolTip(this.components); + this.browseaction = new System.Windows.Forms.Button(); + this.apply = new System.Windows.Forms.Button(); + this.cancel = new System.Windows.Forms.Button(); + this.panel = new System.Windows.Forms.Panel(); + this.backside = new System.Windows.Forms.CheckBox(); + this.frontside = new System.Windows.Forms.CheckBox(); + this.frontgroup = new System.Windows.Forms.GroupBox(); + this.labelFrontTextureOffset = new System.Windows.Forms.Label(); + this.frontsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.frontlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.frontmid = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.fronthigh = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.frontTextureOffset = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl(); + this.backgroup = new System.Windows.Forms.GroupBox(); + this.labelBackTextureOffset = new System.Windows.Forms.Label(); + this.backsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.backlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.backmid = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.backhigh = new CodeImp.DoomBuilder.Controls.TextureSelectorControl(); + this.backTextureOffset = new CodeImp.DoomBuilder.GZBuilder.Controls.PairedIntControl(); + this.flagsgroup = new System.Windows.Forms.GroupBox(); + this.flags = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); + this.actiongroup = new System.Windows.Forms.GroupBox(); + this.argscontrol = new CodeImp.DoomBuilder.Controls.ArgumentsControl(); + this.actionhelp = new CodeImp.DoomBuilder.Controls.ActionSpecialHelpButton(); + this.hexenpanel = new System.Windows.Forms.Panel(); + this.activation = new System.Windows.Forms.ComboBox(); + this.action = new CodeImp.DoomBuilder.Controls.ActionSelectorControl(); + this.idgroup = new System.Windows.Forms.GroupBox(); + this.tagSelector = new CodeImp.DoomBuilder.GZBuilder.Controls.TagSelector(); + label11 = new System.Windows.Forms.Label(); + label5 = new System.Windows.Forms.Label(); + label4 = new System.Windows.Forms.Label(); + label3 = new System.Windows.Forms.Label(); + label12 = new System.Windows.Forms.Label(); + label8 = new System.Windows.Forms.Label(); + label9 = new System.Windows.Forms.Label(); + label10 = new System.Windows.Forms.Label(); + activationlabel = new System.Windows.Forms.Label(); + label2 = new System.Windows.Forms.Label(); + this.panel.SuspendLayout(); + this.frontgroup.SuspendLayout(); + this.backgroup.SuspendLayout(); + this.flagsgroup.SuspendLayout(); + this.actiongroup.SuspendLayout(); + this.hexenpanel.SuspendLayout(); + this.idgroup.SuspendLayout(); + this.SuspendLayout(); + // + // label11 + // + label11.Location = new System.Drawing.Point(6, 40); + label11.Name = "label11"; + label11.Size = new System.Drawing.Size(80, 14); + label11.TabIndex = 13; + label11.Text = "Sector Index:"; + label11.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // label5 + // + label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + label5.Location = new System.Drawing.Point(437, 13); + label5.Name = "label5"; + label5.Size = new System.Drawing.Size(83, 16); + label5.TabIndex = 5; + label5.Text = "Lower"; + label5.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // label4 + // + label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + label4.Location = new System.Drawing.Point(346, 13); + label4.Name = "label4"; + label4.Size = new System.Drawing.Size(83, 16); + label4.TabIndex = 4; + label4.Text = "Middle"; + label4.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // label3 + // + label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + label3.Location = new System.Drawing.Point(255, 13); + label3.Name = "label3"; + label3.Size = new System.Drawing.Size(83, 16); + label3.TabIndex = 3; + label3.Text = "Upper"; + label3.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // label12 + // + label12.Location = new System.Drawing.Point(6, 40); + label12.Name = "label12"; + label12.Size = new System.Drawing.Size(80, 14); + label12.TabIndex = 16; + label12.Text = "Sector Index:"; + label12.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // label8 + // + label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + label8.Location = new System.Drawing.Point(437, 13); + 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, 13); + 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, 13); + label10.Name = "label10"; + label10.Size = new System.Drawing.Size(83, 16); + label10.TabIndex = 3; + label10.Text = "Upper"; + label10.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // activationlabel + // + activationlabel.AutoSize = true; + activationlabel.Location = new System.Drawing.Point(6, 11); + activationlabel.Name = "activationlabel"; + activationlabel.Size = new System.Drawing.Size(43, 13); + activationlabel.TabIndex = 10; + activationlabel.Text = "Trigger:"; + // + // label2 + // + label2.AutoSize = true; + label2.Location = new System.Drawing.Point(15, 26); + label2.Name = "label2"; + label2.Size = new System.Drawing.Size(40, 13); + label2.TabIndex = 9; + label2.Text = "Action:"; + // + // browseaction + // + this.browseaction.Image = global::CodeImp.DoomBuilder.Properties.Resources.List; + this.browseaction.Location = new System.Drawing.Point(476, 21); + this.browseaction.Name = "browseaction"; + this.browseaction.Size = new System.Drawing.Size(28, 25); + this.browseaction.TabIndex = 1; + this.browseaction.Text = " "; + this.tooltip.SetToolTip(this.browseaction, "Browse Action"); + this.browseaction.UseVisualStyleBackColor = true; + this.browseaction.Click += new System.EventHandler(this.browseaction_Click); + // + // apply + // + this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.apply.Location = new System.Drawing.Point(335, 728); + this.apply.Name = "apply"; + this.apply.Size = new System.Drawing.Size(112, 25); + this.apply.TabIndex = 1; + this.apply.Text = "OK"; + this.apply.UseVisualStyleBackColor = true; + this.apply.Click += new System.EventHandler(this.apply_Click); + // + // cancel + // + this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancel.Location = new System.Drawing.Point(453, 728); + this.cancel.Name = "cancel"; + this.cancel.Size = new System.Drawing.Size(112, 25); + this.cancel.TabIndex = 2; + this.cancel.Text = "Cancel"; + this.cancel.UseVisualStyleBackColor = true; + this.cancel.Click += new System.EventHandler(this.cancel_Click); + // + // panel + // + this.panel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.panel.BackColor = System.Drawing.SystemColors.Window; - this.panel.Controls.Add(this.backside); - this.panel.Controls.Add(this.frontside); - this.panel.Controls.Add(this.frontgroup); - this.panel.Controls.Add(this.backgroup); - this.panel.Controls.Add(this.flagsgroup); - this.panel.Controls.Add(this.actiongroup); - this.panel.Controls.Add(this.idgroup); - this.panel.Location = new System.Drawing.Point(12, 12); - this.panel.Name = "panel"; - this.panel.Size = new System.Drawing.Size(553, 706); - this.panel.TabIndex = 5; - // - // backside - // - this.backside.AutoSize = true; - this.backside.Location = new System.Drawing.Point(17, 158); - this.backside.Name = "backside"; - this.backside.Size = new System.Drawing.Size(75, 17); - this.backside.TabIndex = 0; - this.backside.Text = "Back Side"; - this.backside.UseVisualStyleBackColor = true; - this.backside.CheckStateChanged += new System.EventHandler(this.backside_CheckStateChanged); - // - // frontside - // - this.frontside.AutoSize = true; - this.frontside.Location = new System.Drawing.Point(17, 4); - this.frontside.Name = "frontside"; - this.frontside.Size = new System.Drawing.Size(74, 17); - this.frontside.TabIndex = 0; - this.frontside.Text = "Front Side"; - this.frontside.UseVisualStyleBackColor = true; - this.frontside.CheckStateChanged += new System.EventHandler(this.frontside_CheckStateChanged); - // - // frontgroup - // - this.frontgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.panel.BackColor = System.Drawing.SystemColors.Window; + this.panel.Controls.Add(this.backside); + this.panel.Controls.Add(this.frontside); + this.panel.Controls.Add(this.frontgroup); + this.panel.Controls.Add(this.backgroup); + this.panel.Controls.Add(this.flagsgroup); + this.panel.Controls.Add(this.actiongroup); + this.panel.Controls.Add(this.idgroup); + this.panel.Location = new System.Drawing.Point(12, 12); + this.panel.Name = "panel"; + this.panel.Size = new System.Drawing.Size(553, 706); + this.panel.TabIndex = 5; + // + // backside + // + this.backside.AutoSize = true; + this.backside.Location = new System.Drawing.Point(17, 158); + this.backside.Name = "backside"; + this.backside.Size = new System.Drawing.Size(75, 17); + this.backside.TabIndex = 0; + this.backside.Text = "Back Side"; + this.backside.UseVisualStyleBackColor = true; + this.backside.CheckStateChanged += new System.EventHandler(this.backside_CheckStateChanged); + // + // frontside + // + this.frontside.AutoSize = true; + this.frontside.Location = new System.Drawing.Point(17, 4); + this.frontside.Name = "frontside"; + this.frontside.Size = new System.Drawing.Size(74, 17); + this.frontside.TabIndex = 0; + this.frontside.Text = "Front Side"; + this.frontside.UseVisualStyleBackColor = true; + this.frontside.CheckStateChanged += new System.EventHandler(this.frontside_CheckStateChanged); + // + // frontgroup + // + 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.replaceunusedfronttextures); - this.frontgroup.Controls.Add(this.labelFrontTextureOffset); - 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); - this.frontgroup.Enabled = false; - this.frontgroup.Location = new System.Drawing.Point(6, 6); - this.frontgroup.Name = "frontgroup"; - this.frontgroup.Size = new System.Drawing.Size(541, 148); - this.frontgroup.TabIndex = 1; - this.frontgroup.TabStop = false; - this.frontgroup.Text = " "; - // - // replaceunusedfronttextures - // - this.replaceunusedfronttextures.AutoSize = true; - this.replaceunusedfronttextures.Location = new System.Drawing.Point(90, 121); - this.replaceunusedfronttextures.Name = "replaceunusedfronttextures"; - this.replaceunusedfronttextures.Size = new System.Drawing.Size(144, 17); - this.replaceunusedfronttextures.TabIndex = 43; - this.replaceunusedfronttextures.Text = "Replace unused textures"; - this.replaceunusedfronttextures.UseVisualStyleBackColor = true; - this.replaceunusedfronttextures.CheckedChanged += new System.EventHandler(this.replaceunusedfronttextures_CheckedChanged); - // - // - // labelFrontTextureOffset - // - this.labelFrontTextureOffset.Location = new System.Drawing.Point(6, 70); - this.labelFrontTextureOffset.Name = "labelFrontTextureOffset"; - this.labelFrontTextureOffset.Size = new System.Drawing.Size(80, 14); - this.labelFrontTextureOffset.TabIndex = 42; - this.labelFrontTextureOffset.Text = "Texture Offset:"; - this.labelFrontTextureOffset.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // frontsector - // - this.frontsector.AllowDecimal = false; - this.frontsector.AllowNegative = false; - this.frontsector.AllowRelative = false; - this.frontsector.ButtonStep = 1; - this.frontsector.ButtonStepBig = 10F; - this.frontsector.ButtonStepFloat = 1F; - this.frontsector.ButtonStepSmall = 0.1F; - this.frontsector.ButtonStepsUseModifierKeys = false; - 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; - // - // frontlow - // - this.frontlow.Location = new System.Drawing.Point(437, 32); - this.frontlow.MultipleTextures = false; - this.frontlow.Name = "frontlow"; - this.frontlow.Required = false; - this.frontlow.Size = new System.Drawing.Size(83, 107); - this.frontlow.TabIndex = 6; - this.frontlow.TextureName = ""; - this.frontlow.UsePreviews = true; - this.frontlow.OnValueChanged += new System.EventHandler(this.frontlow_OnValueChanged); - // - // frontmid - // - this.frontmid.Location = new System.Drawing.Point(346, 32); - this.frontmid.MultipleTextures = false; - this.frontmid.Name = "frontmid"; - this.frontmid.Required = false; - this.frontmid.Size = new System.Drawing.Size(83, 107); - this.frontmid.TabIndex = 5; - this.frontmid.TextureName = ""; - this.frontmid.UsePreviews = true; - this.frontmid.OnValueChanged += new System.EventHandler(this.frontmid_OnValueChanged); - // - // fronthigh - // - this.fronthigh.Location = new System.Drawing.Point(255, 32); - this.fronthigh.MultipleTextures = false; - this.fronthigh.Name = "fronthigh"; - this.fronthigh.Required = false; - this.fronthigh.Size = new System.Drawing.Size(83, 107); - this.fronthigh.TabIndex = 4; - this.fronthigh.TextureName = ""; - this.fronthigh.UsePreviews = true; - this.fronthigh.OnValueChanged += new System.EventHandler(this.fronthigh_OnValueChanged); - // - // frontTextureOffset - // - this.frontTextureOffset.ButtonStep = 8; - this.frontTextureOffset.ButtonStepBig = 16F; - this.frontTextureOffset.ButtonStepSmall = 1F; - this.frontTextureOffset.ButtonStepsUseModifierKeys = true; - this.frontTextureOffset.DefaultValue = 0; - this.frontTextureOffset.Location = new System.Drawing.Point(87, 65); - this.frontTextureOffset.Name = "frontTextureOffset"; - this.frontTextureOffset.Size = new System.Drawing.Size(186, 26); - this.frontTextureOffset.TabIndex = 41; - this.frontTextureOffset.OnValuesChanged += new System.EventHandler(this.frontTextureOffset_OnValuesChanged); - // - // backgroup - // - this.backgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.frontgroup.Controls.Add(this.labelFrontTextureOffset); + 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); + this.frontgroup.Enabled = false; + this.frontgroup.Location = new System.Drawing.Point(6, 6); + this.frontgroup.Name = "frontgroup"; + this.frontgroup.Size = new System.Drawing.Size(541, 148); + this.frontgroup.TabIndex = 1; + this.frontgroup.TabStop = false; + this.frontgroup.Text = " "; + // + // labelFrontTextureOffset + // + this.labelFrontTextureOffset.Location = new System.Drawing.Point(6, 70); + this.labelFrontTextureOffset.Name = "labelFrontTextureOffset"; + this.labelFrontTextureOffset.Size = new System.Drawing.Size(80, 14); + this.labelFrontTextureOffset.TabIndex = 42; + this.labelFrontTextureOffset.Text = "Texture Offset:"; + this.labelFrontTextureOffset.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // frontsector + // + this.frontsector.AllowDecimal = false; + this.frontsector.AllowNegative = false; + this.frontsector.AllowRelative = false; + this.frontsector.ButtonStep = 1; + this.frontsector.ButtonStepBig = 10F; + this.frontsector.ButtonStepFloat = 1F; + this.frontsector.ButtonStepSmall = 0.1F; + this.frontsector.ButtonStepsUseModifierKeys = false; + this.frontsector.ButtonStepsWrapAround = false; + this.frontsector.Location = new System.Drawing.Point(90, 35); + this.frontsector.MaximumValue = 2147483647; + this.frontsector.Name = "frontsector"; + this.frontsector.Size = new System.Drawing.Size(130, 24); + this.frontsector.StepValues = null; + this.frontsector.TabIndex = 14; + // + // frontlow + // + this.frontlow.Location = new System.Drawing.Point(437, 32); + this.frontlow.MultipleTextures = false; + this.frontlow.Name = "frontlow"; + this.frontlow.Required = false; + this.frontlow.Size = new System.Drawing.Size(83, 107); + this.frontlow.TabIndex = 6; + this.frontlow.TextureName = ""; + this.frontlow.UsePreviews = true; + this.frontlow.OnValueChanged += new System.EventHandler(this.frontlow_OnValueChanged); + // + // frontmid + // + this.frontmid.Location = new System.Drawing.Point(346, 32); + this.frontmid.MultipleTextures = false; + this.frontmid.Name = "frontmid"; + this.frontmid.Required = false; + this.frontmid.Size = new System.Drawing.Size(83, 107); + this.frontmid.TabIndex = 5; + this.frontmid.TextureName = ""; + this.frontmid.UsePreviews = true; + this.frontmid.OnValueChanged += new System.EventHandler(this.frontmid_OnValueChanged); + // + // fronthigh + // + this.fronthigh.Location = new System.Drawing.Point(255, 32); + this.fronthigh.MultipleTextures = false; + this.fronthigh.Name = "fronthigh"; + this.fronthigh.Required = false; + this.fronthigh.Size = new System.Drawing.Size(83, 107); + this.fronthigh.TabIndex = 4; + this.fronthigh.TextureName = ""; + this.fronthigh.UsePreviews = true; + this.fronthigh.OnValueChanged += new System.EventHandler(this.fronthigh_OnValueChanged); + // + // frontTextureOffset + // + this.frontTextureOffset.ButtonStep = 8; + this.frontTextureOffset.ButtonStepBig = 16F; + this.frontTextureOffset.ButtonStepSmall = 1F; + this.frontTextureOffset.ButtonStepsUseModifierKeys = true; + this.frontTextureOffset.DefaultValue = 0; + this.frontTextureOffset.Location = new System.Drawing.Point(87, 65); + this.frontTextureOffset.Name = "frontTextureOffset"; + this.frontTextureOffset.Size = new System.Drawing.Size(186, 26); + this.frontTextureOffset.TabIndex = 41; + this.frontTextureOffset.OnValuesChanged += new System.EventHandler(this.frontTextureOffset_OnValuesChanged); + // + // backgroup + // + 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.replaceunusedbacktextures); - this.backgroup.Controls.Add(this.labelBackTextureOffset); - 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); - this.backgroup.Enabled = false; - this.backgroup.Location = new System.Drawing.Point(6, 160); - this.backgroup.Name = "backgroup"; - this.backgroup.Size = new System.Drawing.Size(541, 148); - this.backgroup.TabIndex = 1; - this.backgroup.TabStop = false; - this.backgroup.Text = " "; - // - // replaceunusedbacktextures - // - this.replaceunusedbacktextures.AutoSize = true; - this.replaceunusedbacktextures.Location = new System.Drawing.Point(90, 121); - this.replaceunusedbacktextures.Name = "replaceunusedbacktextures"; - this.replaceunusedbacktextures.Size = new System.Drawing.Size(144, 17); - this.replaceunusedbacktextures.TabIndex = 44; - this.replaceunusedbacktextures.Text = "Replace unused textures"; - this.replaceunusedbacktextures.UseVisualStyleBackColor = true; - this.replaceunusedbacktextures.CheckedChanged += new System.EventHandler(this.replaceunusedbacktextures_CheckedChanged); - // - // - // labelBackTextureOffset - // - this.labelBackTextureOffset.Location = new System.Drawing.Point(6, 70); - this.labelBackTextureOffset.Name = "labelBackTextureOffset"; - this.labelBackTextureOffset.Size = new System.Drawing.Size(80, 14); - this.labelBackTextureOffset.TabIndex = 43; - this.labelBackTextureOffset.Text = "Texture Offset:"; - this.labelBackTextureOffset.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // backsector - // - this.backsector.AllowDecimal = false; - this.backsector.AllowNegative = false; - this.backsector.AllowRelative = false; - this.backsector.ButtonStep = 1; - this.backsector.ButtonStepBig = 10F; - this.backsector.ButtonStepFloat = 1F; - this.backsector.ButtonStepSmall = 0.1F; - this.backsector.ButtonStepsUseModifierKeys = false; - this.backsector.ButtonStepsWrapAround = false; - this.backsector.Location = new System.Drawing.Point(90, 35); - this.backsector.Name = "backsector"; - this.backsector.Size = new System.Drawing.Size(130, 24); - this.backsector.StepValues = null; - this.backsector.TabIndex = 17; - // - // backlow - // - this.backlow.Location = new System.Drawing.Point(437, 32); - this.backlow.MultipleTextures = false; - this.backlow.Name = "backlow"; - this.backlow.Required = false; - this.backlow.Size = new System.Drawing.Size(83, 107); - this.backlow.TabIndex = 6; - this.backlow.TextureName = ""; - this.backlow.UsePreviews = true; - this.backlow.OnValueChanged += new System.EventHandler(this.backlow_OnValueChanged); - // - // backmid - // - this.backmid.Location = new System.Drawing.Point(346, 32); - this.backmid.MultipleTextures = false; - this.backmid.Name = "backmid"; - this.backmid.Required = false; - this.backmid.Size = new System.Drawing.Size(83, 107); - this.backmid.TabIndex = 5; - this.backmid.TextureName = ""; - this.backmid.UsePreviews = true; - this.backmid.OnValueChanged += new System.EventHandler(this.backmid_OnValueChanged); - // - // backhigh - // - this.backhigh.Location = new System.Drawing.Point(255, 32); - this.backhigh.MultipleTextures = false; - this.backhigh.Name = "backhigh"; - this.backhigh.Required = false; - this.backhigh.Size = new System.Drawing.Size(83, 107); - this.backhigh.TabIndex = 4; - this.backhigh.TextureName = ""; - this.backhigh.UsePreviews = true; - this.backhigh.OnValueChanged += new System.EventHandler(this.backhigh_OnValueChanged); - // - // backTextureOffset - // - this.backTextureOffset.ButtonStep = 8; - this.backTextureOffset.ButtonStepBig = 16F; - this.backTextureOffset.ButtonStepSmall = 1F; - this.backTextureOffset.ButtonStepsUseModifierKeys = true; - this.backTextureOffset.DefaultValue = 0; - this.backTextureOffset.Location = new System.Drawing.Point(87, 65); - this.backTextureOffset.Name = "backTextureOffset"; - this.backTextureOffset.Size = new System.Drawing.Size(186, 26); - this.backTextureOffset.TabIndex = 42; - this.backTextureOffset.OnValuesChanged += new System.EventHandler(this.backTextureOffset_OnValuesChanged); - // - // flagsgroup - // - this.flagsgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.backgroup.Controls.Add(this.labelBackTextureOffset); + 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); + this.backgroup.Enabled = false; + this.backgroup.Location = new System.Drawing.Point(6, 160); + this.backgroup.Name = "backgroup"; + this.backgroup.Size = new System.Drawing.Size(541, 148); + this.backgroup.TabIndex = 1; + this.backgroup.TabStop = false; + this.backgroup.Text = " "; + // + // labelBackTextureOffset + // + this.labelBackTextureOffset.Location = new System.Drawing.Point(6, 70); + this.labelBackTextureOffset.Name = "labelBackTextureOffset"; + this.labelBackTextureOffset.Size = new System.Drawing.Size(80, 14); + this.labelBackTextureOffset.TabIndex = 43; + this.labelBackTextureOffset.Text = "Texture Offset:"; + this.labelBackTextureOffset.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // backsector + // + this.backsector.AllowDecimal = false; + this.backsector.AllowNegative = false; + this.backsector.AllowRelative = false; + this.backsector.ButtonStep = 1; + this.backsector.ButtonStepBig = 10F; + this.backsector.ButtonStepFloat = 1F; + this.backsector.ButtonStepSmall = 0.1F; + this.backsector.ButtonStepsUseModifierKeys = false; + this.backsector.ButtonStepsWrapAround = false; + this.backsector.Location = new System.Drawing.Point(90, 35); + this.backsector.MaximumValue = 2147483647; + this.backsector.Name = "backsector"; + this.backsector.Size = new System.Drawing.Size(130, 24); + this.backsector.StepValues = null; + this.backsector.TabIndex = 17; + // + // backlow + // + this.backlow.Location = new System.Drawing.Point(437, 32); + this.backlow.MultipleTextures = false; + this.backlow.Name = "backlow"; + this.backlow.Required = false; + this.backlow.Size = new System.Drawing.Size(83, 107); + this.backlow.TabIndex = 6; + this.backlow.TextureName = ""; + this.backlow.UsePreviews = true; + this.backlow.OnValueChanged += new System.EventHandler(this.backlow_OnValueChanged); + // + // backmid + // + this.backmid.Location = new System.Drawing.Point(346, 32); + this.backmid.MultipleTextures = false; + this.backmid.Name = "backmid"; + this.backmid.Required = false; + this.backmid.Size = new System.Drawing.Size(83, 107); + this.backmid.TabIndex = 5; + this.backmid.TextureName = ""; + this.backmid.UsePreviews = true; + this.backmid.OnValueChanged += new System.EventHandler(this.backmid_OnValueChanged); + // + // backhigh + // + this.backhigh.Location = new System.Drawing.Point(255, 32); + this.backhigh.MultipleTextures = false; + this.backhigh.Name = "backhigh"; + this.backhigh.Required = false; + this.backhigh.Size = new System.Drawing.Size(83, 107); + this.backhigh.TabIndex = 4; + this.backhigh.TextureName = ""; + this.backhigh.UsePreviews = true; + this.backhigh.OnValueChanged += new System.EventHandler(this.backhigh_OnValueChanged); + // + // backTextureOffset + // + this.backTextureOffset.ButtonStep = 8; + this.backTextureOffset.ButtonStepBig = 16F; + this.backTextureOffset.ButtonStepSmall = 1F; + this.backTextureOffset.ButtonStepsUseModifierKeys = true; + this.backTextureOffset.DefaultValue = 0; + this.backTextureOffset.Location = new System.Drawing.Point(87, 65); + this.backTextureOffset.Name = "backTextureOffset"; + this.backTextureOffset.Size = new System.Drawing.Size(186, 26); + this.backTextureOffset.TabIndex = 42; + this.backTextureOffset.OnValuesChanged += new System.EventHandler(this.backTextureOffset_OnValuesChanged); + // + // flagsgroup + // + this.flagsgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.flagsgroup.Controls.Add(this.flags); - this.flagsgroup.Location = new System.Drawing.Point(6, 314); - this.flagsgroup.Name = "flagsgroup"; - this.flagsgroup.Size = new System.Drawing.Size(541, 138); - this.flagsgroup.TabIndex = 0; - this.flagsgroup.TabStop = false; - this.flagsgroup.Text = " Flags"; - // - // flags - // - this.flags.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.flagsgroup.Controls.Add(this.flags); + this.flagsgroup.Location = new System.Drawing.Point(6, 314); + this.flagsgroup.Name = "flagsgroup"; + this.flagsgroup.Size = new System.Drawing.Size(541, 138); + this.flagsgroup.TabIndex = 0; + this.flagsgroup.TabStop = false; + this.flagsgroup.Text = " Flags"; + // + // flags + // + this.flags.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.flags.AutoScroll = true; - this.flags.Columns = 3; - this.flags.Location = new System.Drawing.Point(8, 17); - this.flags.Name = "flags"; - this.flags.Size = new System.Drawing.Size(532, 116); - this.flags.TabIndex = 0; - this.flags.VerticalSpacing = 1; - this.flags.OnValueChanged += new System.EventHandler(this.flags_OnValueChanged); - // - // actiongroup - // - this.actiongroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.flags.AutoScroll = true; + this.flags.Columns = 3; + this.flags.Location = new System.Drawing.Point(8, 17); + this.flags.Name = "flags"; + this.flags.Size = new System.Drawing.Size(532, 116); + this.flags.TabIndex = 0; + this.flags.VerticalSpacing = 1; + this.flags.OnValueChanged += new System.EventHandler(this.flags_OnValueChanged); + // + // actiongroup + // + this.actiongroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.actiongroup.Controls.Add(this.argscontrol); - this.actiongroup.Controls.Add(this.actionhelp); - this.actiongroup.Controls.Add(this.hexenpanel); - this.actiongroup.Controls.Add(label2); - this.actiongroup.Controls.Add(this.action); - this.actiongroup.Controls.Add(this.browseaction); - this.actiongroup.Location = new System.Drawing.Point(6, 458); - this.actiongroup.Name = "actiongroup"; - this.actiongroup.Size = new System.Drawing.Size(541, 176); - this.actiongroup.TabIndex = 1; - this.actiongroup.TabStop = false; - this.actiongroup.Text = " Action "; - // - // argscontrol - // - this.argscontrol.Location = new System.Drawing.Point(9, 52); - this.argscontrol.Name = "argscontrol"; - this.argscontrol.Size = new System.Drawing.Size(526, 76); - this.argscontrol.TabIndex = 12; - this.argscontrol.Visible = false; - // - // actionhelp - // - this.actionhelp.Location = new System.Drawing.Point(505, 21); - this.actionhelp.Name = "actionhelp"; - this.actionhelp.Size = new System.Drawing.Size(28, 25); - this.actionhelp.TabIndex = 11; - // - // hexenpanel - // - this.hexenpanel.Controls.Add(this.activation); - this.hexenpanel.Controls.Add(activationlabel); - this.hexenpanel.Location = new System.Drawing.Point(6, 134); - this.hexenpanel.Name = "hexenpanel"; - this.hexenpanel.Size = new System.Drawing.Size(529, 36); - this.hexenpanel.TabIndex = 3; - this.hexenpanel.Visible = false; - // - // activation - // - this.activation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.activation.FormattingEnabled = true; - this.activation.Location = new System.Drawing.Point(56, 7); - this.activation.Name = "activation"; - this.activation.Size = new System.Drawing.Size(470, 21); - this.activation.TabIndex = 0; - // - // action - // - this.action.BackColor = System.Drawing.Color.Transparent; - this.action.Cursor = System.Windows.Forms.Cursors.Default; - this.action.Empty = false; - this.action.GeneralizedCategories = null; - this.action.GeneralizedOptions = null; - this.action.Location = new System.Drawing.Point(62, 23); - this.action.Name = "action"; - this.action.Size = new System.Drawing.Size(412, 21); - this.action.TabIndex = 0; - this.action.Value = -1; - this.action.ValueChanges += new System.EventHandler(this.action_ValueChanges); - // - // idgroup - // - this.idgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.actiongroup.Controls.Add(this.argscontrol); + this.actiongroup.Controls.Add(this.actionhelp); + this.actiongroup.Controls.Add(this.hexenpanel); + this.actiongroup.Controls.Add(label2); + this.actiongroup.Controls.Add(this.action); + this.actiongroup.Controls.Add(this.browseaction); + this.actiongroup.Location = new System.Drawing.Point(6, 458); + this.actiongroup.Name = "actiongroup"; + this.actiongroup.Size = new System.Drawing.Size(541, 176); + this.actiongroup.TabIndex = 1; + this.actiongroup.TabStop = false; + this.actiongroup.Text = " Action "; + // + // argscontrol + // + this.argscontrol.Location = new System.Drawing.Point(9, 52); + this.argscontrol.Name = "argscontrol"; + this.argscontrol.Size = new System.Drawing.Size(526, 76); + this.argscontrol.TabIndex = 12; + this.argscontrol.Visible = false; + // + // actionhelp + // + this.actionhelp.Location = new System.Drawing.Point(505, 21); + this.actionhelp.Name = "actionhelp"; + this.actionhelp.Size = new System.Drawing.Size(28, 25); + this.actionhelp.TabIndex = 11; + // + // hexenpanel + // + this.hexenpanel.Controls.Add(this.activation); + this.hexenpanel.Controls.Add(activationlabel); + this.hexenpanel.Location = new System.Drawing.Point(6, 134); + this.hexenpanel.Name = "hexenpanel"; + this.hexenpanel.Size = new System.Drawing.Size(529, 36); + this.hexenpanel.TabIndex = 3; + this.hexenpanel.Visible = false; + // + // activation + // + this.activation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.activation.FormattingEnabled = true; + this.activation.Location = new System.Drawing.Point(56, 7); + this.activation.Name = "activation"; + this.activation.Size = new System.Drawing.Size(470, 21); + this.activation.TabIndex = 0; + // + // action + // + this.action.BackColor = System.Drawing.Color.Transparent; + this.action.Cursor = System.Windows.Forms.Cursors.Default; + this.action.Empty = false; + this.action.GeneralizedCategories = null; + this.action.GeneralizedOptions = null; + this.action.GrayOut = true; + this.action.Location = new System.Drawing.Point(62, 23); + this.action.Name = "action"; + this.action.Size = new System.Drawing.Size(412, 21); + this.action.TabIndex = 0; + this.action.Value = -1; + this.action.ValueChanges += new System.EventHandler(this.action_ValueChanges); + // + // idgroup + // + this.idgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.idgroup.Controls.Add(this.tagSelector); - this.idgroup.Location = new System.Drawing.Point(6, 640); - this.idgroup.Name = "idgroup"; - this.idgroup.Size = new System.Drawing.Size(541, 58); - this.idgroup.TabIndex = 2; - this.idgroup.TabStop = false; - this.idgroup.Text = " Identification "; - // - // tagSelector - // - this.tagSelector.Location = new System.Drawing.Point(19, 19); - this.tagSelector.Name = "tagSelector"; - this.tagSelector.Size = new System.Drawing.Size(518, 34); - this.tagSelector.TabIndex = 0; - // - // LinedefEditForm - // - this.AcceptButton = this.apply; - 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(577, 760); - this.Controls.Add(this.cancel); - this.Controls.Add(this.apply); - this.Controls.Add(this.panel); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "LinedefEditForm"; - this.Opacity = 1D; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Edit Linedef"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.LinedefEditForm_FormClosing); - this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.LinedefEditForm_HelpRequested); - this.panel.ResumeLayout(false); - this.panel.PerformLayout(); - this.frontgroup.ResumeLayout(false); - this.backgroup.ResumeLayout(false); - this.flagsgroup.ResumeLayout(false); - this.actiongroup.ResumeLayout(false); - this.actiongroup.PerformLayout(); - this.hexenpanel.ResumeLayout(false); - this.hexenpanel.PerformLayout(); - this.idgroup.ResumeLayout(false); - this.ResumeLayout(false); + this.idgroup.Controls.Add(this.tagSelector); + this.idgroup.Location = new System.Drawing.Point(6, 640); + this.idgroup.Name = "idgroup"; + this.idgroup.Size = new System.Drawing.Size(541, 58); + this.idgroup.TabIndex = 2; + this.idgroup.TabStop = false; + this.idgroup.Text = " Identification "; + // + // tagSelector + // + this.tagSelector.Location = new System.Drawing.Point(19, 19); + this.tagSelector.Name = "tagSelector"; + this.tagSelector.Size = new System.Drawing.Size(518, 34); + this.tagSelector.TabIndex = 0; + // + // LinedefEditForm + // + this.AcceptButton = this.apply; + 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(577, 760); + this.Controls.Add(this.cancel); + this.Controls.Add(this.apply); + this.Controls.Add(this.panel); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + 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; + this.Text = "Edit Linedef"; + this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.LinedefEditForm_HelpRequested); + this.panel.ResumeLayout(false); + this.panel.PerformLayout(); + this.frontgroup.ResumeLayout(false); + this.backgroup.ResumeLayout(false); + this.flagsgroup.ResumeLayout(false); + this.actiongroup.ResumeLayout(false); + this.actiongroup.PerformLayout(); + this.hexenpanel.ResumeLayout(false); + this.hexenpanel.PerformLayout(); + this.idgroup.ResumeLayout(false); + this.ResumeLayout(false); } @@ -658,7 +631,5 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.Label labelFrontTextureOffset; private System.Windows.Forms.Label labelBackTextureOffset; private CodeImp.DoomBuilder.Controls.ArgumentsControl argscontrol; - private System.Windows.Forms.CheckBox replaceunusedfronttextures; - private System.Windows.Forms.CheckBox replaceunusedbacktextures; } } \ No newline at end of file diff --git a/Source/Core/Windows/LinedefEditForm.cs b/Source/Core/Windows/LinedefEditForm.cs index 4067993fc2e5e6f16dd6e2c0fb8d329d27a4d30d..f6cb12e9cce47e808afa7f3d87aaf4a936d3b8a6 100644 --- a/Source/Core/Windows/LinedefEditForm.cs +++ b/Source/Core/Windows/LinedefEditForm.cs @@ -45,9 +45,6 @@ namespace CodeImp.DoomBuilder.Windows private bool preventchanges; private bool undocreated; //mxd - //mxd. Window setup stuff - private static Point location = Point.Empty; - private struct LinedefProperties //mxd { public readonly Dictionary<string, bool> Flags; @@ -92,13 +89,6 @@ namespace CodeImp.DoomBuilder.Windows { // Initialize InitializeComponent(); - - //mxd. Widow setup - if(location != Point.Empty) - { - this.StartPosition = FormStartPosition.Manual; - this.Location = location; - } // Fill flags lists foreach(KeyValuePair<string, string> lf in General.Map.Config.LinedefFlags) @@ -151,12 +141,6 @@ namespace CodeImp.DoomBuilder.Windows apply.Top = panel.Bottom + panel.Margin.Bottom + apply.Margin.Top; cancel.Top = apply.Top; - //mxd. Apply texture replacement settings - preventchanges = true; - replaceunusedfronttextures.Checked = General.Settings.ReadSetting("editlinedefswindow.replaceunusedfronttextures", true); - replaceunusedbacktextures.Checked = General.Settings.ReadSetting("editlinedefswindow.replaceunusedbacktextures", true); - preventchanges = false; - // Update window height this.Height = apply.Bottom + apply.Margin.Bottom * 2 + (this.Height - this.ClientRectangle.Height) + 1; } @@ -424,7 +408,7 @@ namespace CodeImp.DoomBuilder.Windows } // Go for all the lines - int tagoffset = 0; //mxd + int offset = 0; //mxd foreach(Linedef l in lines) { // Apply chosen activation flag @@ -432,12 +416,11 @@ namespace CodeImp.DoomBuilder.Windows l.Activate = (activation.SelectedItem as LinedefActivateInfo).Index; // Action/tags - oldtag = l.Tag; - l.Tag = General.Clamp(tagSelector.GetSmartTag(l.Tag, tagoffset++), General.Map.FormatInterface.MinTag, General.Map.FormatInterface.MaxTag); //mxd + l.Tag = General.Clamp(tagSelector.GetSmartTag(l.Tag, offset), General.Map.FormatInterface.MinTag, General.Map.FormatInterface.MaxTag); //mxd if(!action.Empty) l.Action = action.Value; //mxd. Apply args - argscontrol.Apply(l); + argscontrol.Apply(l, offset); // Remove front side? if((l.Front != null) && (frontside.CheckState == CheckState.Unchecked)) @@ -511,6 +494,9 @@ namespace CodeImp.DoomBuilder.Windows l.Front.Sector.UpdateFloorSurface(); l.Front.Sector.UpdateCeilingSurface(); } + + //mxd. Increase offset... + offset++; } // Update the used textures @@ -598,17 +584,6 @@ namespace CodeImp.DoomBuilder.Windows action.Value = ActionBrowserForm.BrowseAction(this, action.Value); } - //mxd. Store window location - private void LinedefEditForm_FormClosing(object sender, FormClosingEventArgs e) - { - // Save location - location = this.Location; - - // Save persistent settings - General.Settings.WriteSetting("editlinedefswindow.replaceunusedfronttextures", replaceunusedfronttextures.Checked); - General.Settings.WriteSetting("editlinedefswindow.replaceunusedbacktextures", replaceunusedbacktextures.Checked); - } - // Help! private void LinedefEditForm_HelpRequested(object sender, HelpEventArgs hlpevent) { @@ -687,15 +662,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Front != null - && (replaceunusedfronttextures.Checked - || (l.Front.HighRequired() - || (linedefprops[i].Front != null && linedefprops[i].Front.HighTexture != "-")))) - l.Front.SetTextureHigh(fronthigh.GetResult(l.Front.HighTexture)); - i++; + if(l.Front != null) l.Front.SetTextureHigh(fronthigh.GetResult(l.Front.HighTexture)); } } @@ -724,15 +693,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Front != null - && (replaceunusedfronttextures.Checked - || (l.Front.MiddleRequired() - || (linedefprops[i].Front != null && linedefprops[i].Front.MiddleTexture != "-")))) - l.Front.SetTextureMid(frontmid.GetResult(l.Front.MiddleTexture)); - i++; + if(l.Front != null) l.Front.SetTextureMid(frontmid.GetResult(l.Front.MiddleTexture)); } } @@ -761,15 +724,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Front != null - && (replaceunusedfronttextures.Checked - || (l.Front.LowRequired() - || (linedefprops[i].Front != null && linedefprops[i].Front.LowTexture != "-")))) - l.Front.SetTextureLow(frontlow.GetResult(l.Front.LowTexture)); - i++; + if(l.Front != null) l.Front.SetTextureLow(frontlow.GetResult(l.Front.LowTexture)); } } @@ -798,15 +755,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Back != null - && (replaceunusedbacktextures.Checked - || (l.Back.HighRequired() - || (linedefprops[i].Back != null && linedefprops[i].Back.HighTexture != "-")))) - l.Back.SetTextureHigh(backhigh.GetResult(l.Back.HighTexture)); - i++; + if(l.Back != null) l.Back.SetTextureHigh(backhigh.GetResult(l.Back.HighTexture)); } } @@ -835,15 +786,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Back != null - && (replaceunusedbacktextures.Checked - || (l.Back.MiddleRequired() - || (linedefprops[i].Back != null && linedefprops[i].Back.MiddleTexture != "-")))) - l.Back.SetTextureMid(backmid.GetResult(l.Back.MiddleTexture)); - i++; + if(l.Back != null) l.Back.SetTextureMid(backmid.GetResult(l.Back.MiddleTexture)); } } @@ -872,15 +817,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Back != null - && (replaceunusedbacktextures.Checked - || (l.Back.LowRequired() - || (linedefprops[i].Back != null && linedefprops[i].Back.LowTexture != "-")))) - l.Back.SetTextureLow(backlow.GetResult(l.Back.LowTexture)); - i++; + if(l.Back != null) l.Back.SetTextureLow(backlow.GetResult(l.Back.LowTexture)); } } @@ -891,86 +830,6 @@ namespace CodeImp.DoomBuilder.Windows if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); } - private void replaceunusedfronttextures_CheckedChanged(object sender, EventArgs e) - { - //Re-apply front textures - if(preventchanges) return; - MakeUndo(); - - // Set values - int i = 0; - foreach(Linedef l in lines) - { - if(l.Front == null) continue; - - // Update top texture - if(!replaceunusedfronttextures.Checked || string.IsNullOrEmpty(fronthigh.TextureName)) - l.Front.SetTextureHigh(linedefprops[i].Front != null ? linedefprops[i].Front.HighTexture : "-"); - else - l.Front.SetTextureHigh(fronthigh.GetResult(l.Front.HighTexture)); - - // Update middle texture - if(!replaceunusedfronttextures.Checked || string.IsNullOrEmpty(frontmid.TextureName)) - l.Front.SetTextureMid(linedefprops[i].Front != null ? linedefprops[i].Front.MiddleTexture : "-"); - else - l.Front.SetTextureMid(frontmid.GetResult(l.Front.MiddleTexture)); - - // Update bottom texture - if(!replaceunusedfronttextures.Checked || string.IsNullOrEmpty(frontlow.TextureName)) - l.Front.SetTextureLow(linedefprops[i].Front != null ? linedefprops[i].Front.LowTexture : "-"); - else - l.Front.SetTextureLow(frontlow.GetResult(l.Front.LowTexture)); - - i++; - } - - // Update the used textures - General.Map.Data.UpdateUsedTextures(); - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void replaceunusedbacktextures_CheckedChanged(object sender, EventArgs e) - { - //Re-apply back textures - if(preventchanges) return; - MakeUndo(); - - // Set values - int i = 0; - foreach(Linedef l in lines) - { - if(l.Back == null) continue; - - // Update top texture - if(!replaceunusedbacktextures.Checked || string.IsNullOrEmpty(backhigh.TextureName)) - l.Back.SetTextureHigh(linedefprops[i].Back != null ? linedefprops[i].Back.HighTexture : "-"); - else - l.Back.SetTextureHigh(backhigh.GetResult(l.Back.HighTexture)); - - // Update middle texture - if(!replaceunusedbacktextures.Checked || string.IsNullOrEmpty(backmid.TextureName)) - l.Back.SetTextureMid(linedefprops[i].Back != null ? linedefprops[i].Back.MiddleTexture : "-"); - else - l.Back.SetTextureMid(backmid.GetResult(l.Back.MiddleTexture)); - - // Update bottom texture - if(!replaceunusedbacktextures.Checked || string.IsNullOrEmpty(backlow.TextureName)) - l.Back.SetTextureLow(linedefprops[i].Back != null ? linedefprops[i].Back.LowTexture : "-"); - else - l.Back.SetTextureLow(backlow.GetResult(l.Back.LowTexture)); - - i++; - } - - // Update the used textures - General.Map.Data.UpdateUsedTextures(); - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - private void frontTextureOffset_OnValuesChanged(object sender, EventArgs e) { if(preventchanges) return; diff --git a/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs b/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs index 902e5c6e3fd71308225fd402827499fb1582fb58..2d308dd373ea668c1d42ea290b3736dbf1d0db28 100644 --- a/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs +++ b/Source/Core/Windows/LinedefEditFormUDMF.Designer.cs @@ -60,7 +60,6 @@ namespace CodeImp.DoomBuilder.Windows this.tabfront = new System.Windows.Forms.TabPage(); this.frontside = new System.Windows.Forms.CheckBox(); this.frontgroup = new System.Windows.Forms.GroupBox(); - this.replaceunusedfronttextures = new System.Windows.Forms.CheckBox(); this.frontflagsgroup = new System.Windows.Forms.GroupBox(); this.flagsFront = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl(); this.frontscalegroup = new System.Windows.Forms.GroupBox(); @@ -91,7 +90,6 @@ namespace CodeImp.DoomBuilder.Windows this.tabback = new System.Windows.Forms.TabPage(); this.backside = new System.Windows.Forms.CheckBox(); this.backgroup = new System.Windows.Forms.GroupBox(); - this.replaceunusedbacktextures = new System.Windows.Forms.CheckBox(); this.groupBox4 = new System.Windows.Forms.GroupBox(); this.resetbacklight = new System.Windows.Forms.Button(); this.backsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); @@ -498,7 +496,6 @@ 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.replaceunusedfronttextures); this.frontgroup.Controls.Add(this.frontflagsgroup); this.frontgroup.Controls.Add(this.frontscalegroup); this.frontgroup.Controls.Add(this.groupBox6); @@ -514,17 +511,6 @@ namespace CodeImp.DoomBuilder.Windows this.frontgroup.TabStop = false; this.frontgroup.Text = " "; // - // replaceunusedfronttextures - // - this.replaceunusedfronttextures.AutoSize = true; - this.replaceunusedfronttextures.Location = new System.Drawing.Point(312, 15); - this.replaceunusedfronttextures.Name = "replaceunusedfronttextures"; - this.replaceunusedfronttextures.Size = new System.Drawing.Size(144, 17); - this.replaceunusedfronttextures.TabIndex = 46; - this.replaceunusedfronttextures.Text = "Replace unused textures"; - this.replaceunusedfronttextures.UseVisualStyleBackColor = true; - this.replaceunusedfronttextures.CheckedChanged += new System.EventHandler(this.replaceunusedfronttextures_CheckedChanged); - // // frontflagsgroup // this.frontflagsgroup.Controls.Add(this.flagsFront); @@ -864,11 +850,11 @@ namespace CodeImp.DoomBuilder.Windows // // frontlow // - this.frontlow.Location = new System.Drawing.Point(309, 415); + this.frontlow.Location = new System.Drawing.Point(309, 409); this.frontlow.MultipleTextures = false; this.frontlow.Name = "frontlow"; this.frontlow.Required = false; - this.frontlow.Size = new System.Drawing.Size(220, 184); + this.frontlow.Size = new System.Drawing.Size(220, 189); this.frontlow.TabIndex = 6; this.frontlow.TextureName = ""; this.frontlow.UsePreviews = false; @@ -876,11 +862,11 @@ namespace CodeImp.DoomBuilder.Windows // // frontmid // - this.frontmid.Location = new System.Drawing.Point(309, 225); + this.frontmid.Location = new System.Drawing.Point(309, 214); this.frontmid.MultipleTextures = false; this.frontmid.Name = "frontmid"; this.frontmid.Required = false; - this.frontmid.Size = new System.Drawing.Size(220, 184); + this.frontmid.Size = new System.Drawing.Size(220, 189); this.frontmid.TabIndex = 5; this.frontmid.TextureName = ""; this.frontmid.UsePreviews = false; @@ -888,11 +874,11 @@ namespace CodeImp.DoomBuilder.Windows // // fronthigh // - this.fronthigh.Location = new System.Drawing.Point(309, 35); + 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.Size = new System.Drawing.Size(220, 189); this.fronthigh.TabIndex = 4; this.fronthigh.TextureName = ""; this.fronthigh.UsePreviews = false; @@ -928,7 +914,6 @@ 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.replaceunusedbacktextures); this.backgroup.Controls.Add(this.groupBox4); this.backgroup.Controls.Add(this.backflagsgroup); this.backgroup.Controls.Add(this.backscalegroup); @@ -944,17 +929,6 @@ namespace CodeImp.DoomBuilder.Windows this.backgroup.TabStop = false; this.backgroup.Text = " "; // - // replaceunusedbacktextures - // - this.replaceunusedbacktextures.AutoSize = true; - this.replaceunusedbacktextures.Location = new System.Drawing.Point(312, 15); - this.replaceunusedbacktextures.Name = "replaceunusedbacktextures"; - this.replaceunusedbacktextures.Size = new System.Drawing.Size(144, 17); - this.replaceunusedbacktextures.TabIndex = 47; - this.replaceunusedbacktextures.Text = "Replace unused textures"; - this.replaceunusedbacktextures.UseVisualStyleBackColor = true; - this.replaceunusedbacktextures.CheckedChanged += new System.EventHandler(this.replaceunusedbacktextures_CheckedChanged); - // // groupBox4 // this.groupBox4.Controls.Add(this.resetbacklight); @@ -1304,11 +1278,11 @@ namespace CodeImp.DoomBuilder.Windows // // backlow // - this.backlow.Location = new System.Drawing.Point(309, 415); + this.backlow.Location = new System.Drawing.Point(309, 409); this.backlow.MultipleTextures = false; this.backlow.Name = "backlow"; this.backlow.Required = false; - this.backlow.Size = new System.Drawing.Size(220, 184); + this.backlow.Size = new System.Drawing.Size(220, 189); this.backlow.TabIndex = 6; this.backlow.TextureName = ""; this.backlow.UsePreviews = false; @@ -1316,11 +1290,11 @@ namespace CodeImp.DoomBuilder.Windows // // backmid // - this.backmid.Location = new System.Drawing.Point(309, 225); + this.backmid.Location = new System.Drawing.Point(309, 214); this.backmid.MultipleTextures = false; this.backmid.Name = "backmid"; this.backmid.Required = false; - this.backmid.Size = new System.Drawing.Size(220, 184); + this.backmid.Size = new System.Drawing.Size(220, 189); this.backmid.TabIndex = 5; this.backmid.TextureName = ""; this.backmid.UsePreviews = false; @@ -1328,11 +1302,11 @@ namespace CodeImp.DoomBuilder.Windows // // backhigh // - this.backhigh.Location = new System.Drawing.Point(309, 35); + 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.Size = new System.Drawing.Size(220, 189); this.backhigh.TabIndex = 4; this.backhigh.TextureName = ""; this.backhigh.UsePreviews = false; @@ -1413,7 +1387,7 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "LinedefEditFormUDMF"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; @@ -1433,7 +1407,6 @@ namespace CodeImp.DoomBuilder.Windows this.tabfront.ResumeLayout(false); this.tabfront.PerformLayout(); this.frontgroup.ResumeLayout(false); - this.frontgroup.PerformLayout(); this.frontflagsgroup.ResumeLayout(false); this.frontscalegroup.ResumeLayout(false); this.groupBox6.ResumeLayout(false); @@ -1442,7 +1415,6 @@ namespace CodeImp.DoomBuilder.Windows this.tabback.ResumeLayout(false); this.tabback.PerformLayout(); this.backgroup.ResumeLayout(false); - this.backgroup.PerformLayout(); this.groupBox4.ResumeLayout(false); this.groupBox4.PerformLayout(); this.backflagsgroup.ResumeLayout(false); @@ -1546,7 +1518,5 @@ namespace CodeImp.DoomBuilder.Windows private CodeImp.DoomBuilder.GZBuilder.Controls.TagsSelector tagsselector; private System.Windows.Forms.Button resetfrontlight; private System.Windows.Forms.Button resetbacklight; - private System.Windows.Forms.CheckBox replaceunusedfronttextures; - private System.Windows.Forms.CheckBox replaceunusedbacktextures; } } \ No newline at end of file diff --git a/Source/Core/Windows/LinedefEditFormUDMF.cs b/Source/Core/Windows/LinedefEditFormUDMF.cs index 35069bfb8b764c5408a5882bb3f98a602c04d01c..28980356a06914ed71b5939b328e635c7af675e7 100644 --- a/Source/Core/Windows/LinedefEditFormUDMF.cs +++ b/Source/Core/Windows/LinedefEditFormUDMF.cs @@ -58,7 +58,6 @@ namespace CodeImp.DoomBuilder.Windows private readonly List<PairedFieldsControl> backUdmfControls; //mxd //mxd. Window setup stuff - private static Point location = Point.Empty; private static int activetab; private struct LinedefProperties //mxd @@ -150,18 +149,13 @@ namespace CodeImp.DoomBuilder.Windows InitializeComponent(); // Widow setup - if(location != Point.Empty) + if(General.Settings.StoreSelectedEditTab && activetab > 0) { - this.StartPosition = FormStartPosition.Manual; - this.Location = location; - if(General.Settings.StoreSelectedEditTab && activetab > 0) - { - // When front or back tab was previously selected, switch to appropriate side (selectfront/selectback are set in BaseVisualGeometrySidedef.OnEditEnd) - if((selectfront || selectback) && (activetab == 1 || activetab == 2)) - tabs.SelectTab(selectfront ? 1 : 2); - else - tabs.SelectTab(activetab); - } + // When front or back tab was previously selected, switch to appropriate side (selectfront/selectback are set in BaseVisualGeometrySidedef.OnEditEnd) + if((selectfront || selectback) && (activetab == 1 || activetab == 2)) + tabs.SelectTab(selectfront ? 1 : 2); + else + tabs.SelectTab(activetab); } // Fill flags lists @@ -232,12 +226,6 @@ namespace CodeImp.DoomBuilder.Windows pfcBackScaleTop.LinkValues = linkBackTopScale; pfcBackScaleMid.LinkValues = linkBackMidScale; pfcBackScaleBottom.LinkValues = linkBackBottomScale; - - // Apply texture replacement settings - preventchanges = true; - replaceunusedfronttextures.Checked = General.Settings.ReadSetting("editlinedefswindow.replaceunusedfronttextures", true); - replaceunusedbacktextures.Checked = General.Settings.ReadSetting("editlinedefswindow.replaceunusedbacktextures", true); - preventchanges = false; } #endregion @@ -677,7 +665,7 @@ namespace CodeImp.DoomBuilder.Windows } // Go for all the lines - int tagoffset = 0; //mxd + int offset = 0; //mxd foreach(Linedef l in lines) { // UDMF activations @@ -691,12 +679,11 @@ namespace CodeImp.DoomBuilder.Windows } } - // Action/tags + // Action if(!action.Empty) l.Action = action.Value; - tagsselector.ApplyTo(l, tagoffset++); //mxd //mxd. Apply args - argscontrol.Apply(l); + argscontrol.Apply(l, offset++); // Remove front side? if((l.Front != null) && (frontside.CheckState == CheckState.Unchecked)) @@ -839,12 +826,7 @@ namespace CodeImp.DoomBuilder.Windows private void LinedefEditForm_FormClosing(object sender, FormClosingEventArgs e) { // Save location and active tab - location = this.Location; activetab = tabs.SelectedIndex; - - // Save persistent settings - General.Settings.WriteSetting("editlinedefswindow.replaceunusedfronttextures", replaceunusedfronttextures.Checked); - General.Settings.WriteSetting("editlinedefswindow.replaceunusedbacktextures", replaceunusedbacktextures.Checked); } // Help! @@ -1081,15 +1063,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Front != null - && (replaceunusedfronttextures.Checked - || (l.Front.HighRequired() - || (linedefprops[i].Front != null && linedefprops[i].Front.HighTexture != "-")))) - l.Front.SetTextureHigh(fronthigh.GetResult(l.Front.HighTexture)); - i++; + if(l.Front != null) l.Front.SetTextureHigh(fronthigh.GetResult(l.Front.HighTexture)); } } @@ -1118,15 +1094,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Front != null - && (replaceunusedfronttextures.Checked - || (l.Front.MiddleRequired() - || (linedefprops[i].Front != null && linedefprops[i].Front.MiddleTexture != "-")))) - l.Front.SetTextureMid(frontmid.GetResult(l.Front.MiddleTexture)); - i++; + if(l.Front != null) l.Front.SetTextureMid(frontmid.GetResult(l.Front.MiddleTexture)); } } @@ -1155,15 +1125,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Front != null - && (replaceunusedfronttextures.Checked - || (l.Front.LowRequired() - || (linedefprops[i].Front != null && linedefprops[i].Front.LowTexture != "-")))) - l.Front.SetTextureLow(frontlow.GetResult(l.Front.LowTexture)); - i++; + if(l.Front != null) l.Front.SetTextureLow(frontlow.GetResult(l.Front.LowTexture)); } } @@ -1192,15 +1156,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Back != null - && (replaceunusedbacktextures.Checked - || (l.Back.HighRequired() - || (linedefprops[i].Back != null && linedefprops[i].Back.HighTexture != "-")))) - l.Back.SetTextureHigh(backhigh.GetResult(l.Back.HighTexture)); - i++; + if(l.Back != null) l.Back.SetTextureHigh(backhigh.GetResult(l.Back.HighTexture)); } } @@ -1229,15 +1187,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Back != null - && (replaceunusedbacktextures.Checked - || (l.Back.MiddleRequired() - || (linedefprops[i].Back != null && linedefprops[i].Back.MiddleTexture != "-")))) - l.Back.SetTextureMid(backmid.GetResult(l.Back.MiddleTexture)); - i++; + if(l.Back != null) l.Back.SetTextureMid(backmid.GetResult(l.Back.MiddleTexture)); } } @@ -1266,15 +1218,9 @@ namespace CodeImp.DoomBuilder.Windows // Update values else { - int i = 0; foreach(Linedef l in lines) { - if(l.Back != null - && (replaceunusedbacktextures.Checked - || (l.Back.LowRequired() - || (linedefprops[i].Back != null && linedefprops[i].Back.LowTexture != "-")))) - l.Back.SetTextureLow(backlow.GetResult(l.Back.LowTexture)); - i++; + if(l.Back != null) l.Back.SetTextureLow(backlow.GetResult(l.Back.LowTexture)); } } @@ -1285,86 +1231,6 @@ namespace CodeImp.DoomBuilder.Windows if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); } - private void replaceunusedfronttextures_CheckedChanged(object sender, EventArgs e) - { - //Re-apply front textures - if(preventchanges) return; - MakeUndo(); - - // Set values - int i = 0; - foreach(Linedef l in lines) - { - if(l.Front == null) continue; - - // Update top texture - if(!replaceunusedfronttextures.Checked || string.IsNullOrEmpty(fronthigh.TextureName)) - l.Front.SetTextureHigh(linedefprops[i].Front != null ? linedefprops[i].Front.HighTexture : "-"); - else - l.Front.SetTextureHigh(fronthigh.GetResult(l.Front.HighTexture)); - - // Update middle texture - if(!replaceunusedfronttextures.Checked || string.IsNullOrEmpty(frontmid.TextureName)) - l.Front.SetTextureMid(linedefprops[i].Front != null ? linedefprops[i].Front.MiddleTexture : "-"); - else - l.Front.SetTextureMid(frontmid.GetResult(l.Front.MiddleTexture)); - - // Update bottom texture - if(!replaceunusedfronttextures.Checked || string.IsNullOrEmpty(frontlow.TextureName)) - l.Front.SetTextureLow(linedefprops[i].Front != null ? linedefprops[i].Front.LowTexture : "-"); - else - l.Front.SetTextureLow(frontlow.GetResult(l.Front.LowTexture)); - - i++; - } - - // Update the used textures - General.Map.Data.UpdateUsedTextures(); - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - - private void replaceunusedbacktextures_CheckedChanged(object sender, EventArgs e) - { - //Re-apply back textures - if(preventchanges) return; - MakeUndo(); - - // Set values - int i = 0; - foreach(Linedef l in lines) - { - if(l.Back == null) continue; - - // Update top texture - if(!replaceunusedbacktextures.Checked || string.IsNullOrEmpty(backhigh.TextureName)) - l.Back.SetTextureHigh(linedefprops[i].Back != null ? linedefprops[i].Back.HighTexture : "-"); - else - l.Back.SetTextureHigh(backhigh.GetResult(l.Back.HighTexture)); - - // Update middle texture - if(!replaceunusedbacktextures.Checked || string.IsNullOrEmpty(backmid.TextureName)) - l.Back.SetTextureMid(linedefprops[i].Back != null ? linedefprops[i].Back.MiddleTexture : "-"); - else - l.Back.SetTextureMid(backmid.GetResult(l.Back.MiddleTexture)); - - // Update bottom texture - if(!replaceunusedbacktextures.Checked || string.IsNullOrEmpty(backlow.TextureName)) - l.Back.SetTextureLow(linedefprops[i].Back != null ? linedefprops[i].Back.LowTexture : "-"); - else - l.Back.SetTextureLow(backlow.GetResult(l.Back.LowTexture)); - - i++; - } - - // Update the used textures - General.Map.Data.UpdateUsedTextures(); - - General.Map.IsChanged = true; - if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); - } - #endregion #region Brightness changed diff --git a/Source/Core/Windows/LinedefEditFormUDMF.resx b/Source/Core/Windows/LinedefEditFormUDMF.resx index e3a990b4748e58197abef9cb6947f2b5ea887144..71e603a02e455e7f68127dca8a4dacbcf32c416c 100644 --- a/Source/Core/Windows/LinedefEditFormUDMF.resx +++ b/Source/Core/Windows/LinedefEditFormUDMF.resx @@ -186,7 +186,4 @@ BAAB/wKAAQEEAAH/AcECgQQAAf8B4wLDBAAC/wLnBAAE/wQACw== </value> </data> - <metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> </root> \ No newline at end of file diff --git a/Source/Core/Windows/MainForm.Designer.cs b/Source/Core/Windows/MainForm.Designer.cs index 24e50aa4914c4dd0080e37cb112e32563d6625d8..381ec47cca4d2d8004a5832aa2f68d6ab221061d 100644 --- a/Source/Core/Windows/MainForm.Designer.cs +++ b/Source/Core/Windows/MainForm.Designer.cs @@ -74,6 +74,7 @@ namespace CodeImp.DoomBuilder.Windows this.itempastespecial = new System.Windows.Forms.ToolStripMenuItem(); this.itemsnaptogrid = new System.Windows.Forms.ToolStripMenuItem(); this.itemautomerge = new System.Windows.Forms.ToolStripMenuItem(); + this.itemsplitjoinedsectors = new System.Windows.Forms.ToolStripMenuItem(); this.itemautoclearsidetextures = new System.Windows.Forms.ToolStripMenuItem(); this.seperatoreditgeometry = new System.Windows.Forms.ToolStripSeparator(); this.itemgridinc = new System.Windows.Forms.ToolStripMenuItem(); @@ -97,6 +98,10 @@ namespace CodeImp.DoomBuilder.Windows this.itemviewfloors = new System.Windows.Forms.ToolStripMenuItem(); this.itemviewceilings = new System.Windows.Forms.ToolStripMenuItem(); this.seperatorviewviews = new System.Windows.Forms.ToolStripSeparator(); + this.itemmergegeoclassic = new System.Windows.Forms.ToolStripMenuItem(); + this.itemmergegeo = new System.Windows.Forms.ToolStripMenuItem(); + this.itemreplacegeo = new System.Windows.Forms.ToolStripMenuItem(); + this.separatorgeomerge = new System.Windows.Forms.ToolStripSeparator(); this.itemfullbrightness = new System.Windows.Forms.ToolStripMenuItem(); this.itemtogglegrid = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); @@ -172,6 +177,20 @@ namespace CodeImp.DoomBuilder.Windows this.buttonlinededfcolors = new System.Windows.Forms.ToolStripButton(); this.linedefcolorpresets = new System.Windows.Forms.ToolStripDropDownButton(); this.separatorfilters = new System.Windows.Forms.ToolStripSeparator(); + this.separatorrendering = new System.Windows.Forms.ToolStripSeparator(); + this.itemdynlightmodes = new System.Windows.Forms.ToolStripMenuItem(); + this.itemnodynlights = new System.Windows.Forms.ToolStripMenuItem(); + this.itemdynlights = new System.Windows.Forms.ToolStripMenuItem(); + this.itemdynlightsanim = new System.Windows.Forms.ToolStripMenuItem(); + this.itemmodelmodes = new System.Windows.Forms.ToolStripMenuItem(); + this.itemnomdl = new System.Windows.Forms.ToolStripMenuItem(); + this.itemselmdl = new System.Windows.Forms.ToolStripMenuItem(); + this.itemfiltermdl = new System.Windows.Forms.ToolStripMenuItem(); + this.itemallmdl = new System.Windows.Forms.ToolStripMenuItem(); + this.itemtogglefog = new System.Windows.Forms.ToolStripMenuItem(); + this.itemtogglesky = new System.Windows.Forms.ToolStripMenuItem(); + this.itemtoggleeventlines = new System.Windows.Forms.ToolStripMenuItem(); + this.itemtogglevisualverts = new System.Windows.Forms.ToolStripMenuItem(); this.buttonfullbrightness = new System.Windows.Forms.ToolStripButton(); this.buttontogglegrid = new System.Windows.Forms.ToolStripButton(); this.buttontogglecomments = new System.Windows.Forms.ToolStripButton(); @@ -180,15 +199,19 @@ namespace CodeImp.DoomBuilder.Windows this.buttonviewbrightness = new System.Windows.Forms.ToolStripButton(); this.buttonviewfloors = new System.Windows.Forms.ToolStripButton(); this.buttonviewceilings = new System.Windows.Forms.ToolStripButton(); + this.separatorgeomergemodes = new System.Windows.Forms.ToolStripSeparator(); + this.buttonmergegeoclassic = new System.Windows.Forms.ToolStripButton(); + this.buttonmergegeo = new System.Windows.Forms.ToolStripButton(); + this.buttonplacegeo = new System.Windows.Forms.ToolStripButton(); this.seperatorviews = new System.Windows.Forms.ToolStripSeparator(); this.buttontogglefixedthingsscale = new System.Windows.Forms.ToolStripButton(); this.buttonsnaptogrid = new System.Windows.Forms.ToolStripButton(); this.buttontoggledynamicgrid = new System.Windows.Forms.ToolStripButton(); this.buttonautomerge = new System.Windows.Forms.ToolStripButton(); + this.buttonsplitjoinedsectors = new System.Windows.Forms.ToolStripButton(); this.buttonautoclearsidetextures = new System.Windows.Forms.ToolStripButton(); this.buttontogglenightspath = new System.Windows.Forms.ToolStripButton(); this.seperatorgeometry = new System.Windows.Forms.ToolStripSeparator(); - this.buttontogglefx = new System.Windows.Forms.ToolStripButton(); this.dynamiclightmode = new System.Windows.Forms.ToolStripSplitButton(); this.sightsdontshow = new System.Windows.Forms.ToolStripMenuItem(); this.lightsshow = new System.Windows.Forms.ToolStripMenuItem(); @@ -518,9 +541,14 @@ namespace CodeImp.DoomBuilder.Windows this.itempaste, this.itempastespecial, this.seperatoreditcopypaste, + this.itemmergegeoclassic, + this.itemmergegeo, + this.itemreplacegeo, + this.separatorgeomerge, this.itemsnaptogrid, this.itemdynamicgridsize, this.itemautomerge, + this.itemsplitjoinedsectors, this.itemautoclearsidetextures, this.seperatoreditgeometry, this.itemgridinc, @@ -632,9 +660,20 @@ namespace CodeImp.DoomBuilder.Windows this.itemautomerge.Name = "itemautomerge"; this.itemautomerge.Size = new System.Drawing.Size(224, 22); this.itemautomerge.Tag = "builder_toggleautomerge"; - this.itemautomerge.Text = "&Merge Geometry"; + this.itemautomerge.Text = "Snap to &Geometry"; this.itemautomerge.Click += new System.EventHandler(this.InvokeTaggedAction); // + // itemsplitjoinedsectors + // + this.itemsplitjoinedsectors.Checked = true; + this.itemsplitjoinedsectors.CheckState = System.Windows.Forms.CheckState.Checked; + this.itemsplitjoinedsectors.Image = global::CodeImp.DoomBuilder.Properties.Resources.SplitSectors; + this.itemsplitjoinedsectors.Name = "itemsplitjoinedsectors"; + this.itemsplitjoinedsectors.Size = new System.Drawing.Size(219, 22); + this.itemsplitjoinedsectors.Tag = "builder_togglejoinedsectorssplitting"; + this.itemsplitjoinedsectors.Text = "Split &Joined Sectors when Drawing Lines"; + this.itemsplitjoinedsectors.Click += new System.EventHandler(this.InvokeTaggedAction); + // // itemautoclearsidetextures // this.itemautoclearsidetextures.Checked = true; @@ -766,6 +805,13 @@ namespace CodeImp.DoomBuilder.Windows this.itemrendernightspath, this.itemtogglecomments, this.itemtogglefixedthingsscale, + this.separatorrendering, + this.itemdynlightmodes, + this.itemmodelmodes, + this.itemtogglefog, + this.itemtogglesky, + this.itemtoggleeventlines, + this.itemtogglevisualverts, this.toolStripSeparator4, this.menuzoom, this.itemgotocoords, @@ -842,6 +888,38 @@ namespace CodeImp.DoomBuilder.Windows this.seperatorviewviews.Name = "seperatorviewviews"; this.seperatorviewviews.Size = new System.Drawing.Size(212, 6); // + // itemmergegeoclassic + // + this.itemmergegeoclassic.Image = global::CodeImp.DoomBuilder.Properties.Resources.MergeGeoClassic; + this.itemmergegeoclassic.Name = "itemmergegeoclassic"; + this.itemmergegeoclassic.Size = new System.Drawing.Size(215, 22); + this.itemmergegeoclassic.Tag = "builder_geomergeclassic"; + this.itemmergegeoclassic.Text = "Merge Dragged Vertices Only"; + this.itemmergegeoclassic.Click += new System.EventHandler(this.InvokeTaggedAction); + // + // itemmergegeo + // + this.itemmergegeo.Image = global::CodeImp.DoomBuilder.Properties.Resources.MergeGeo; + this.itemmergegeo.Name = "itemmergegeo"; + this.itemmergegeo.Size = new System.Drawing.Size(215, 22); + this.itemmergegeo.Tag = "builder_geomerge"; + this.itemmergegeo.Text = "Merge Dragged Geometry"; + this.itemmergegeo.Click += new System.EventHandler(this.InvokeTaggedAction); + // + // itemreplacegeo + // + this.itemreplacegeo.Image = global::CodeImp.DoomBuilder.Properties.Resources.MergeGeoRemoveLines; + this.itemreplacegeo.Name = "itemreplacegeo"; + this.itemreplacegeo.Size = new System.Drawing.Size(215, 22); + this.itemreplacegeo.Tag = "builder_georeplace"; + this.itemreplacegeo.Text = "Replace with Dragged Geometry"; + this.itemreplacegeo.Click += new System.EventHandler(this.InvokeTaggedAction); + // + // separatorgeomerge + // + this.separatorgeomerge.Name = "separatorgeomerge"; + this.separatorgeomerge.Size = new System.Drawing.Size(212, 6); + // // itemfullbrightness // this.itemfullbrightness.Checked = true; @@ -1277,14 +1355,18 @@ namespace CodeImp.DoomBuilder.Windows this.buttonviewbrightness, this.buttonviewfloors, this.buttonviewceilings, + this.separatorgeomergemodes, + this.buttonmergegeoclassic, + this.buttonmergegeo, + this.buttonplacegeo, this.seperatorviews, this.buttonsnaptogrid, this.buttontoggledynamicgrid, this.buttonautomerge, + this.buttonsplitjoinedsectors, this.buttonautoclearsidetextures, this.buttontogglenightspath, this.seperatorgeometry, - this.buttontogglefx, this.dynamiclightmode, this.modelrendermode, this.buttontogglefog, @@ -1572,6 +1654,144 @@ namespace CodeImp.DoomBuilder.Windows this.separatorfilters.Name = "separatorfilters"; this.separatorfilters.Size = new System.Drawing.Size(6, 25); // + // separatorrendering + // + this.separatorrendering.Name = "separatorrendering"; + this.separatorrendering.Size = new System.Drawing.Size(270, 6); + // + // itemdynlightmodes + // + this.itemdynlightmodes.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.itemnodynlights, + this.itemdynlights, + this.itemdynlightsanim}); + this.itemdynlightmodes.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light; + this.itemdynlightmodes.Name = "itemdynlightmodes"; + this.itemdynlightmodes.Size = new System.Drawing.Size(273, 22); + this.itemdynlightmodes.Text = "Dynamic light rendering mode"; + // + // itemnodynlights + // + this.itemnodynlights.CheckOnClick = true; + this.itemnodynlights.Image = global::CodeImp.DoomBuilder.Properties.Resources.LightDisabled; + this.itemnodynlights.Name = "itemnodynlights"; + this.itemnodynlights.Size = new System.Drawing.Size(237, 22); + this.itemnodynlights.Tag = 0; + this.itemnodynlights.Text = "Don\'t show dynamic lights"; + this.itemnodynlights.Click += new System.EventHandler(this.ChangeLightRenderingMode); + // + // itemdynlights + // + this.itemdynlights.CheckOnClick = true; + this.itemdynlights.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light; + this.itemdynlights.Name = "itemdynlights"; + this.itemdynlights.Size = new System.Drawing.Size(237, 22); + this.itemdynlights.Tag = 1; + this.itemdynlights.Text = "Show dynamic lights"; + this.itemdynlights.Click += new System.EventHandler(this.ChangeLightRenderingMode); + // + // itemdynlightsanim + // + this.itemdynlightsanim.CheckOnClick = true; + this.itemdynlightsanim.Image = global::CodeImp.DoomBuilder.Properties.Resources.Light_animate; + this.itemdynlightsanim.Name = "itemdynlightsanim"; + this.itemdynlightsanim.Size = new System.Drawing.Size(237, 22); + this.itemdynlightsanim.Tag = 2; + this.itemdynlightsanim.Text = "Show animated dynamic lights"; + this.itemdynlightsanim.Click += new System.EventHandler(this.ChangeLightRenderingMode); + // + // itemmodelmodes + // + this.itemmodelmodes.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.itemnomdl, + this.itemselmdl, + this.itemfiltermdl, + this.itemallmdl}); + this.itemmodelmodes.Image = global::CodeImp.DoomBuilder.Properties.Resources.Model; + this.itemmodelmodes.Name = "itemmodelmodes"; + this.itemmodelmodes.Size = new System.Drawing.Size(273, 22); + this.itemmodelmodes.Text = "Model rendering mode"; + // + // itemnomdl + // + this.itemnomdl.CheckOnClick = true; + this.itemnomdl.Image = global::CodeImp.DoomBuilder.Properties.Resources.ModelDisabled; + this.itemnomdl.Name = "itemnomdl"; + this.itemnomdl.Size = new System.Drawing.Size(298, 22); + this.itemnomdl.Tag = 0; + this.itemnomdl.Text = "Don\'t show models"; + this.itemnomdl.Click += new System.EventHandler(this.ChangeModelRenderingMode); + // + // itemselmdl + // + this.itemselmdl.CheckOnClick = true; + this.itemselmdl.Image = global::CodeImp.DoomBuilder.Properties.Resources.Model_selected; + this.itemselmdl.Name = "itemselmdl"; + this.itemselmdl.Size = new System.Drawing.Size(298, 22); + this.itemselmdl.Tag = 1; + this.itemselmdl.Text = "Show models for selected Things only"; + this.itemselmdl.Click += new System.EventHandler(this.ChangeModelRenderingMode); + // + // itemfiltermdl + // + this.itemfiltermdl.CheckOnClick = true; + this.itemfiltermdl.Image = global::CodeImp.DoomBuilder.Properties.Resources.ModelFiltered; + this.itemfiltermdl.Name = "itemfiltermdl"; + this.itemfiltermdl.Size = new System.Drawing.Size(298, 22); + this.itemfiltermdl.Tag = 2; + this.itemfiltermdl.Text = "Show models for current Things Filter only"; + this.itemfiltermdl.Click += new System.EventHandler(this.ChangeModelRenderingMode); + // + // itemallmdl + // + this.itemallmdl.CheckOnClick = true; + this.itemallmdl.Image = global::CodeImp.DoomBuilder.Properties.Resources.Model; + this.itemallmdl.Name = "itemallmdl"; + this.itemallmdl.Size = new System.Drawing.Size(298, 22); + this.itemallmdl.Tag = 3; + this.itemallmdl.Text = "Always show models"; + this.itemallmdl.Click += new System.EventHandler(this.ChangeModelRenderingMode); + // + // itemfog + // + this.itemtogglefog.CheckOnClick = true; + this.itemtogglefog.Image = global::CodeImp.DoomBuilder.Properties.Resources.fog; + this.itemtogglefog.Name = "itemtogglefog"; + this.itemtogglefog.Size = new System.Drawing.Size(273, 22); + this.itemtogglefog.Tag = "builder_gztogglefog"; + this.itemtogglefog.Text = "Render fog (Visual mode)"; + this.itemtogglefog.Click += new System.EventHandler(this.InvokeTaggedAction); + // + // itemsky + // + this.itemtogglesky.CheckOnClick = true; + this.itemtogglesky.Image = global::CodeImp.DoomBuilder.Properties.Resources.Sky; + this.itemtogglesky.Name = "itemtogglesky"; + this.itemtogglesky.Size = new System.Drawing.Size(273, 22); + this.itemtogglesky.Tag = "builder_gztogglesky"; + this.itemtogglesky.Text = "Render sky (Visual mode)"; + this.itemtogglesky.Click += new System.EventHandler(this.InvokeTaggedAction); + // + // itemeventlines + // + this.itemtoggleeventlines.CheckOnClick = true; + this.itemtoggleeventlines.Image = global::CodeImp.DoomBuilder.Properties.Resources.InfoLine; + this.itemtoggleeventlines.Name = "itemtoggleeventlines"; + this.itemtoggleeventlines.Size = new System.Drawing.Size(273, 22); + this.itemtoggleeventlines.Tag = "builder_gztoggleeventlines"; + this.itemtoggleeventlines.Text = "Show Event Lines"; + this.itemtoggleeventlines.Click += new System.EventHandler(this.InvokeTaggedAction); + // + // itemvisualverts + // + this.itemtogglevisualverts.CheckOnClick = true; + this.itemtogglevisualverts.Image = global::CodeImp.DoomBuilder.Properties.Resources.VisualVertices; + this.itemtogglevisualverts.Name = "itemtogglevisualverts"; + this.itemtogglevisualverts.Size = new System.Drawing.Size(273, 22); + this.itemtogglevisualverts.Tag = "builder_gztogglevisualvertices"; + this.itemtogglevisualverts.Text = "Show Editable Vertices (Visual mode)"; + this.itemtogglevisualverts.Click += new System.EventHandler(this.InvokeTaggedAction); + // // buttonfullbrightness // this.buttonfullbrightness.Checked = true; @@ -1682,6 +1902,48 @@ namespace CodeImp.DoomBuilder.Windows this.buttonviewceilings.Text = "View Ceiling Textures"; this.buttonviewceilings.Click += new System.EventHandler(this.InvokeTaggedAction); // + // separatorgeomergemodes + // + this.separatorgeomergemodes.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0); + this.separatorgeomergemodes.Name = "separatorgeomergemodes"; + this.separatorgeomergemodes.Size = new System.Drawing.Size(6, 25); + // + // buttonmergegeoclassic + // + this.buttonmergegeoclassic.CheckOnClick = true; + this.buttonmergegeoclassic.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.buttonmergegeoclassic.Image = global::CodeImp.DoomBuilder.Properties.Resources.MergeGeoClassic; + this.buttonmergegeoclassic.ImageTransparentColor = System.Drawing.Color.Magenta; + this.buttonmergegeoclassic.Name = "buttonmergegeoclassic"; + this.buttonmergegeoclassic.Size = new System.Drawing.Size(23, 22); + this.buttonmergegeoclassic.Tag = "builder_geomergeclassic"; + this.buttonmergegeoclassic.Text = "Merge Dragged Vertices Only"; + this.buttonmergegeoclassic.Click += new System.EventHandler(this.InvokeTaggedAction); + // + // buttonmergegeoclassic + // + this.buttonmergegeo.CheckOnClick = true; + this.buttonmergegeo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.buttonmergegeo.Image = global::CodeImp.DoomBuilder.Properties.Resources.MergeGeo; + this.buttonmergegeo.ImageTransparentColor = System.Drawing.Color.Magenta; + this.buttonmergegeo.Name = "buttonmergegeo"; + this.buttonmergegeo.Size = new System.Drawing.Size(23, 22); + this.buttonmergegeo.Tag = "builder_geomerge"; + this.buttonmergegeo.Text = "Merge Dragged Geometry"; + this.buttonmergegeo.Click += new System.EventHandler(this.InvokeTaggedAction); + // + // buttonmergegeoclassic + // + this.buttonplacegeo.CheckOnClick = true; + this.buttonplacegeo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.buttonplacegeo.Image = global::CodeImp.DoomBuilder.Properties.Resources.MergeGeoRemoveLines; + this.buttonplacegeo.ImageTransparentColor = System.Drawing.Color.Magenta; + this.buttonplacegeo.Name = "buttonmergegeoclassic"; + this.buttonplacegeo.Size = new System.Drawing.Size(23, 22); + this.buttonplacegeo.Tag = "builder_georeplace"; + this.buttonplacegeo.Text = "Replace with Dragged Geometry"; + this.buttonplacegeo.Click += new System.EventHandler(this.InvokeTaggedAction); + // // seperatorviews // this.seperatorviews.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0); @@ -1751,9 +2013,22 @@ namespace CodeImp.DoomBuilder.Windows this.buttonautomerge.Name = "buttonautomerge"; this.buttonautomerge.Size = new System.Drawing.Size(23, 22); this.buttonautomerge.Tag = "builder_toggleautomerge"; - this.buttonautomerge.Text = "Merge Geometry"; + this.buttonautomerge.Text = "Snap to Geometry"; this.buttonautomerge.Click += new System.EventHandler(this.InvokeTaggedAction); // + // buttonsplitjoinedsectors + // + this.buttonsplitjoinedsectors.Checked = true; + this.buttonsplitjoinedsectors.CheckState = System.Windows.Forms.CheckState.Checked; + this.buttonsplitjoinedsectors.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.buttonsplitjoinedsectors.Image = global::CodeImp.DoomBuilder.Properties.Resources.SplitSectors; + this.buttonsplitjoinedsectors.ImageTransparentColor = System.Drawing.Color.Magenta; + this.buttonsplitjoinedsectors.Name = "buttonsplitjoinedsectors"; + this.buttonsplitjoinedsectors.Size = new System.Drawing.Size(23, 22); + this.buttonsplitjoinedsectors.Tag = "builder_togglejoinedsectorssplitting"; + this.buttonsplitjoinedsectors.Text = "Split Joined Sectors when Drawing Lines"; + this.buttonsplitjoinedsectors.Click += new System.EventHandler(this.InvokeTaggedAction); + // // buttonautoclearsidetextures // this.buttonautoclearsidetextures.Checked = true; @@ -1787,17 +2062,6 @@ namespace CodeImp.DoomBuilder.Windows this.seperatorgeometry.Name = "seperatorgeometry"; this.seperatorgeometry.Size = new System.Drawing.Size(6, 25); // - // buttontogglefx - // - this.buttontogglefx.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.buttontogglefx.Image = global::CodeImp.DoomBuilder.Properties.Resources.fx; - this.buttontogglefx.ImageTransparentColor = System.Drawing.Color.Magenta; - this.buttontogglefx.Name = "buttontogglefx"; - this.buttontogglefx.Size = new System.Drawing.Size(23, 20); - this.buttontogglefx.Tag = "builder_gztogglefx"; - this.buttontogglefx.Text = "Toggle GZDoom Effects"; - this.buttontogglefx.Click += new System.EventHandler(this.InvokeTaggedAction); - // // dynamiclightmode // this.dynamiclightmode.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; @@ -1908,7 +2172,7 @@ namespace CodeImp.DoomBuilder.Windows this.buttontogglefog.Name = "buttontogglefog"; this.buttontogglefog.Size = new System.Drawing.Size(23, 20); this.buttontogglefog.Tag = "builder_gztogglefog"; - this.buttontogglefog.Text = "Toggle Fog Rendering"; + this.buttontogglefog.Text = "Render Fog (Visual mode)"; this.buttontogglefog.Click += new System.EventHandler(this.InvokeTaggedAction); // // buttontogglesky @@ -1920,7 +2184,7 @@ namespace CodeImp.DoomBuilder.Windows this.buttontogglesky.Name = "buttontogglesky"; this.buttontogglesky.Size = new System.Drawing.Size(23, 20); this.buttontogglesky.Tag = "builder_gztogglesky"; - this.buttontogglesky.Text = "Toggle Sky Rendering"; + this.buttontogglesky.Text = "Render Sky (Visual mode)"; this.buttontogglesky.Click += new System.EventHandler(this.InvokeTaggedAction); // // buttontoggleeventlines @@ -1931,7 +2195,7 @@ namespace CodeImp.DoomBuilder.Windows this.buttontoggleeventlines.Name = "buttontoggleeventlines"; this.buttontoggleeventlines.Size = new System.Drawing.Size(23, 20); this.buttontoggleeventlines.Tag = "builder_gztoggleeventlines"; - this.buttontoggleeventlines.Text = "Toggle Event Lines"; + this.buttontoggleeventlines.Text = "Show Event Lines"; this.buttontoggleeventlines.Click += new System.EventHandler(this.InvokeTaggedAction); // // buttontogglevisualvertices @@ -1942,7 +2206,7 @@ namespace CodeImp.DoomBuilder.Windows this.buttontogglevisualvertices.Name = "buttontogglevisualvertices"; this.buttontogglevisualvertices.Size = new System.Drawing.Size(23, 20); this.buttontogglevisualvertices.Tag = "builder_gztogglevisualvertices"; - this.buttontogglevisualvertices.Text = "Show Editable Vertices in Visual Mode"; + this.buttontogglevisualvertices.Text = "Show Editable Vertices (Visual mode)"; this.buttontogglevisualvertices.Click += new System.EventHandler(this.InvokeTaggedAction); // // separatorgzmodes @@ -2376,31 +2640,37 @@ namespace CodeImp.DoomBuilder.Windows // // linedefinfo // + this.linedefinfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.linedefinfo.Location = new System.Drawing.Point(3, 3); this.linedefinfo.MaximumSize = new System.Drawing.Size(10000, 100); this.linedefinfo.MinimumSize = new System.Drawing.Size(100, 100); this.linedefinfo.Name = "linedefinfo"; - this.linedefinfo.Size = new System.Drawing.Size(1560, 100); + this.linedefinfo.Size = new System.Drawing.Size(1006, 100); this.linedefinfo.TabIndex = 0; this.linedefinfo.Visible = false; // // thinginfo // + this.thinginfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.thinginfo.Location = new System.Drawing.Point(3, 3); this.thinginfo.MaximumSize = new System.Drawing.Size(10000, 100); this.thinginfo.MinimumSize = new System.Drawing.Size(100, 100); this.thinginfo.Name = "thinginfo"; - this.thinginfo.Size = new System.Drawing.Size(1190, 100); + this.thinginfo.Size = new System.Drawing.Size(1006, 100); this.thinginfo.TabIndex = 3; this.thinginfo.Visible = false; // // sectorinfo // + this.sectorinfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.sectorinfo.Location = new System.Drawing.Point(3, 3); this.sectorinfo.MaximumSize = new System.Drawing.Size(10000, 100); this.sectorinfo.MinimumSize = new System.Drawing.Size(100, 100); this.sectorinfo.Name = "sectorinfo"; - this.sectorinfo.Size = new System.Drawing.Size(1090, 100); + this.sectorinfo.Size = new System.Drawing.Size(1006, 100); this.sectorinfo.TabIndex = 2; this.sectorinfo.Visible = false; // @@ -2562,18 +2832,15 @@ namespace CodeImp.DoomBuilder.Windows this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MainMenuStrip = this.menumain; this.Name = "MainForm"; - this.Opacity = 1D; + this.Opacity = 0; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.Text = "Zone Builder"; this.Activated += new System.EventHandler(this.MainForm_Activated); this.Deactivate += new System.EventHandler(this.MainForm_Deactivate); this.Load += new System.EventHandler(this.MainForm_Load); this.Shown += new System.EventHandler(this.MainForm_Shown); - this.ResizeEnd += new System.EventHandler(this.MainForm_ResizeEnd); - this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MainForm_KeyDown); this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.MainForm_KeyUp); - this.Move += new System.EventHandler(this.MainForm_Move); - this.Resize += new System.EventHandler(this.MainForm_Resize); + this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MainForm_KeyDown); this.menumain.ResumeLayout(false); this.menumain.PerformLayout(); this.toolbar.ResumeLayout(false); @@ -2658,6 +2925,8 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.ToolStripMenuItem itemsnaptogrid; private System.Windows.Forms.ToolStripButton buttonautomerge; private System.Windows.Forms.ToolStripMenuItem itemautomerge; + private System.Windows.Forms.ToolStripButton buttonsplitjoinedsectors; + private System.Windows.Forms.ToolStripMenuItem itemsplitjoinedsectors; private System.Windows.Forms.Timer processor; private System.Windows.Forms.ToolStripSeparator separatorgzmodes; private System.Windows.Forms.ToolStripSeparator seperatorfilesave; @@ -2681,6 +2950,10 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.ToolStripButton buttonviewbrightness; private System.Windows.Forms.ToolStripButton buttonviewfloors; private System.Windows.Forms.ToolStripButton buttonviewceilings; + private System.Windows.Forms.ToolStripSeparator separatorgeomergemodes; + private System.Windows.Forms.ToolStripButton buttonmergegeoclassic; + private System.Windows.Forms.ToolStripButton buttonmergegeo; + private System.Windows.Forms.ToolStripButton buttonplacegeo; private System.Windows.Forms.ToolStripSeparator seperatortoolsresources; private System.Windows.Forms.ToolStripButton buttonscripteditor; private System.Windows.Forms.ToolStripMenuItem menuview; @@ -2691,6 +2964,10 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.ToolStripMenuItem itemviewfloors; private System.Windows.Forms.ToolStripMenuItem itemviewceilings; private System.Windows.Forms.ToolStripSeparator seperatorviewzoom; + private System.Windows.Forms.ToolStripMenuItem itemmergegeoclassic; + private System.Windows.Forms.ToolStripMenuItem itemmergegeo; + private System.Windows.Forms.ToolStripMenuItem itemreplacegeo; + private System.Windows.Forms.ToolStripSeparator separatorgeomerge; private System.Windows.Forms.ToolStripMenuItem itemscripteditor; private System.Windows.Forms.ToolStripSeparator seperatortoolsconfig; private System.Windows.Forms.ToolStripMenuItem itemtestmap; @@ -2733,7 +3010,6 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.ToolStripSeparator seperatoreditgrid; private System.Windows.Forms.ToolStripSeparator seperatoreditcopypaste; private System.Windows.Forms.ToolStripSeparator seperatorgeometry; - private System.Windows.Forms.ToolStripButton buttontogglefx; private System.Windows.Forms.ToolStripButton buttontogglefog; private System.Windows.Forms.ToolStripButton buttontogglesky; private System.Windows.Forms.ToolStripStatusLabel warnsLabel; @@ -2780,6 +3056,20 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.ToolStripButton buttonfullbrightness; private System.Windows.Forms.ToolStripSeparator separatorfullbrightness; private System.Windows.Forms.ToolStripSeparator separatorfilters; + private System.Windows.Forms.ToolStripSeparator separatorrendering; + private System.Windows.Forms.ToolStripMenuItem itemdynlightmodes; + private System.Windows.Forms.ToolStripMenuItem itemnodynlights; + private System.Windows.Forms.ToolStripMenuItem itemdynlights; + private System.Windows.Forms.ToolStripMenuItem itemdynlightsanim; + private System.Windows.Forms.ToolStripMenuItem itemmodelmodes; + private System.Windows.Forms.ToolStripMenuItem itemnomdl; + private System.Windows.Forms.ToolStripMenuItem itemselmdl; + private System.Windows.Forms.ToolStripMenuItem itemfiltermdl; + private System.Windows.Forms.ToolStripMenuItem itemallmdl; + private System.Windows.Forms.ToolStripMenuItem itemtogglefog; + private System.Windows.Forms.ToolStripMenuItem itemtogglesky; + private System.Windows.Forms.ToolStripMenuItem itemtoggleeventlines; + private System.Windows.Forms.ToolStripMenuItem itemtogglevisualverts; private ToolStripMenuItem itemimport; private ToolStripMenuItem itemexport; private ToolStripSeparator separatorio; diff --git a/Source/Core/Windows/MainForm.cs b/Source/Core/Windows/MainForm.cs index 64fd4c7b5e21ac9c029fe1dabb5b50ac782dae36..e98b8082f39e9aa8bdc5efeb4936e2eb5e213736 100644 --- a/Source/Core/Windows/MainForm.cs +++ b/Source/Core/Windows/MainForm.cs @@ -90,6 +90,9 @@ namespace CodeImp.DoomBuilder.Windows //mxd. This is sent by the background thread when sprites are loaded SpriteDataLoaded = General.WM_USER + 3, + + //mxd. This is sent by the background thread when all resources are loaded + ResourcesLoaded = General.WM_USER + 4, } #endregion @@ -111,8 +114,6 @@ namespace CodeImp.DoomBuilder.Windows #region ================== Variables // Position/size - private Point lastposition; - private Size lastsize; private bool displayresized = true; private bool windowactive; @@ -136,6 +137,10 @@ namespace CodeImp.DoomBuilder.Windows // View modes private ToolStripButton[] viewmodesbuttons; private ToolStripMenuItem[] viewmodesitems; + + //mxd. Geometry merge modes + private ToolStripButton[] geomergemodesbuttons; + private ToolStripMenuItem[] geomergemodesitems; // Edit modes private List<ToolStripItem> editmodeitems; @@ -157,7 +162,7 @@ namespace CodeImp.DoomBuilder.Windows // Processing private int processingcount; - private float lastupdatetime; + private long lastupdatetime; // Updating private int lockupdatecount; @@ -170,6 +175,9 @@ namespace CodeImp.DoomBuilder.Windows //mxd private System.Timers.Timer blinkTimer; private bool editformopen; + + //mxd. Misc drawing + private Graphics graphics; #endregion @@ -199,16 +207,19 @@ namespace CodeImp.DoomBuilder.Windows // Constructor internal MainForm() { + // Fetch pointer + windowptr = base.Handle; + + //mxd. Graphics + graphics = Graphics.FromHwndInternal(windowptr); + //mxd. Set DPI-aware icon size - using(Graphics g = this.CreateGraphics()) - { - DPIScaler = new SizeF(g.DpiX / 96, g.DpiY / 96); + DPIScaler = new SizeF(graphics.DpiX / 96, graphics.DpiY / 96); - if(DPIScaler.Width != 1.0f || DPIScaler.Height != 1.0f) - { - ScaledIconSize.Width = (int)Math.Round(ScaledIconSize.Width * DPIScaler.Width); - ScaledIconSize.Height = (int)Math.Round(ScaledIconSize.Height * DPIScaler.Height); - } + if(DPIScaler.Width != 1.0f || DPIScaler.Height != 1.0f) + { + ScaledIconSize.Width = (int)Math.Round(ScaledIconSize.Width * DPIScaler.Width); + ScaledIconSize.Height = (int)Math.Round(ScaledIconSize.Height * DPIScaler.Height); } // Setup controls @@ -229,9 +240,6 @@ namespace CodeImp.DoomBuilder.Windows labelcollapsedinfo.Text = ""; display.Dock = DockStyle.Fill; - // Fetch pointer - windowptr = base.Handle; - // Make array for view modes viewmodesbuttons = new ToolStripButton[Renderer2D.NUM_VIEW_MODES]; viewmodesbuttons[(int)ViewMode.Normal] = buttonviewnormal; @@ -243,6 +251,17 @@ namespace CodeImp.DoomBuilder.Windows viewmodesitems[(int)ViewMode.Brightness] = itemviewbrightness; viewmodesitems[(int)ViewMode.FloorTextures] = itemviewfloors; viewmodesitems[(int)ViewMode.CeilingTextures] = itemviewceilings; + + //mxd. Make arrays for geometry merge modes + int numgeomodes = Enum.GetValues(typeof(MergeGeometryMode)).Length; + geomergemodesbuttons = new ToolStripButton[numgeomodes]; + geomergemodesbuttons[(int)MergeGeometryMode.CLASSIC] = buttonmergegeoclassic; + geomergemodesbuttons[(int)MergeGeometryMode.MERGE] = buttonmergegeo; + geomergemodesbuttons[(int)MergeGeometryMode.REPLACE] = buttonplacegeo; + geomergemodesitems = new ToolStripMenuItem[numgeomodes]; + geomergemodesitems[(int)MergeGeometryMode.CLASSIC] = itemmergegeoclassic; + geomergemodesitems[(int)MergeGeometryMode.MERGE] = itemmergegeo; + geomergemodesitems[(int)MergeGeometryMode.REPLACE] = itemreplacegeo; // Visual Studio IDE doesn't let me set these in the designer :( buttonzoom.Font = menufile.Font; @@ -257,6 +276,7 @@ namespace CodeImp.DoomBuilder.Windows toolbarContextMenu.KeyDown += toolbarContextMenu_KeyDown; toolbarContextMenu.KeyUp += toolbarContextMenu_KeyUp; linedefcolorpresets.DropDown.MouseLeave += linedefcolorpresets_MouseLeave; + this.MouseCaptureChanged += MainForm_MouseCaptureChanged; // Apply shortcut keys ApplyShortcutKeys(); @@ -266,10 +286,6 @@ namespace CodeImp.DoomBuilder.Windows // Show splash ShowSplashDisplay(); - - // Keep last position and size - lastposition = this.Location; - lastsize = this.Size; //mxd blinkTimer = new System.Timers.Timer {Interval = 500}; @@ -308,10 +324,18 @@ namespace CodeImp.DoomBuilder.Windows } // View mode only matters in classic editing modes + bool isclassicmode = (General.Editing.Mode is ClassicMode); for(int i = 0; i < Renderer2D.NUM_VIEW_MODES; i++) { - viewmodesitems[i].Enabled = (General.Editing.Mode is ClassicMode); - viewmodesbuttons[i].Enabled = (General.Editing.Mode is ClassicMode); + viewmodesitems[i].Enabled = isclassicmode; + viewmodesbuttons[i].Enabled = isclassicmode; + } + + //mxd. Merge geometry mode only matters in classic editing modes + for(int i = 0; i < geomergemodesbuttons.Length; i++) + { + geomergemodesbuttons[i].Enabled = isclassicmode; + geomergemodesitems[i].Enabled = isclassicmode; } UpdateEditMenu(); @@ -444,9 +468,9 @@ namespace CodeImp.DoomBuilder.Windows this.Update(); if(sender is ToolStripItem) - General.Actions.InvokeAction((sender as ToolStripItem).Tag.ToString()); + General.Actions.InvokeAction(((ToolStripItem)sender).Tag.ToString()); else if(sender is Control) - General.Actions.InvokeAction((sender as Control).Tag.ToString()); + General.Actions.InvokeAction(((Control)sender).Tag.ToString()); else General.Fail("InvokeTaggedAction used on an unexpected control."); @@ -573,34 +597,13 @@ namespace CodeImp.DoomBuilder.Windows // Window is loaded private void MainForm_Load(object sender, EventArgs e) { - // Position window from configuration settings - this.SuspendLayout(); - this.Size = new Size(General.Settings.ReadSetting("mainwindow.sizewidth", this.Size.Width), - General.Settings.ReadSetting("mainwindow.sizeheight", this.Size.Height)); - this.Location = new Point(General.Clamp(General.Settings.ReadSetting("mainwindow.positionx", this.Location.X), - SystemInformation.VirtualScreen.Left - this.Size.Width + 128, - SystemInformation.VirtualScreen.Right - 128), - General.Clamp(General.Settings.ReadSetting("mainwindow.positiony", this.Location.Y), - SystemInformation.VirtualScreen.Top, - SystemInformation.VirtualScreen.Bottom - 128)); - this.WindowState = (FormWindowState)General.Settings.ReadSetting("mainwindow.windowstate", (int)FormWindowState.Maximized); - this.ResumeLayout(true); - - // Normal windowstate? - if(this.WindowState == FormWindowState.Normal) - { - // Keep last position and size - lastposition = this.Location; - lastsize = this.Size; - } - //mxd. Enable drag and drop this.AllowDrop = true; this.DragEnter += OnDragEnter; this.DragDrop += OnDragDrop; // Info panel state? - bool expandedpanel = General.Settings.ReadSetting("mainwindow.expandedinfopanel", true); + bool expandedpanel = General.Settings.ReadSetting("windows." + configname + ".expandedinfopanel", true); if(expandedpanel != IsInfoPanelExpanded) ToggleInfoPanel(); } @@ -623,37 +626,13 @@ namespace CodeImp.DoomBuilder.Windows BreakExclusiveMouseInput(); ReleaseAllKeys(); } - - // Window is moved - private void MainForm_Move(object sender, EventArgs e) - { - // Normal windowstate? - if(this.WindowState == FormWindowState.Normal) - { - // Keep last position and size - lastposition = this.Location; - lastsize = this.Size; - } - } - // Window resizes - private void MainForm_Resize(object sender, EventArgs e) + //mxd. Looks like in some cases StartMouseExclusive is called before app aquires the mouse + // which results in setting Cursor.Clip not taking effect. + private void MainForm_MouseCaptureChanged(object sender, EventArgs e) { - // Resizing - //this.SuspendLayout(); - //resized = true; - } - - // Window was resized - private void MainForm_ResizeEnd(object sender, EventArgs e) - { - // Normal windowstate? - if(this.WindowState == FormWindowState.Normal) - { - // Keep last position and size - lastposition = this.Location; - lastsize = this.Size; - } + if(mouseexclusive && windowactive && mouseinside && Cursor.Clip != display.RectangleToScreen(display.ClientRectangle)) + Cursor.Clip = display.RectangleToScreen(display.ClientRectangle); } // Window is being closed @@ -680,19 +659,7 @@ namespace CodeImp.DoomBuilder.Windows General.Actions.UnbindMethods(this); // Determine window state to save - int windowstate; - if(this.WindowState != FormWindowState.Minimized) - windowstate = (int)this.WindowState; - else - windowstate = (int)FormWindowState.Normal; - - // Save window settings - General.Settings.WriteSetting("mainwindow.positionx", lastposition.X); - General.Settings.WriteSetting("mainwindow.positiony", lastposition.Y); - General.Settings.WriteSetting("mainwindow.sizewidth", lastsize.Width); - General.Settings.WriteSetting("mainwindow.sizeheight", lastsize.Height); - General.Settings.WriteSetting("mainwindow.windowstate", windowstate); - General.Settings.WriteSetting("mainwindow.expandedinfopanel", IsInfoPanelExpanded); + General.Settings.WriteSetting("windows." + configname + ".expandedinfopanel", IsInfoPanelExpanded); // Save recent files SaveRecentFiles(); @@ -907,8 +874,12 @@ namespace CodeImp.DoomBuilder.Windows } // This changes coordinates display - public void UpdateCoordinates(Vector2D coords) + public void UpdateCoordinates(Vector2D coords){ UpdateCoordinates(coords, false); } //mxd + public void UpdateCoordinates(Vector2D coords, bool snaptogrid) { + //mxd + if(snaptogrid) coords = General.Map.Grid.SnappedToGrid(coords); + // X position xposlabel.Text = (float.IsNaN(coords.x) ? "--" : coords.x.ToString("####0")); @@ -930,13 +901,14 @@ namespace CodeImp.DoomBuilder.Windows if(General.Map != null && General.Editing.Mode is ClassicMode) { // Requested from menu? - if(sender is ToolStripMenuItem) + ToolStripMenuItem item = sender as ToolStripMenuItem; + if(item != null) { // Get integral zoom level - int zoom = int.Parse((sender as ToolStripMenuItem).Tag.ToString(), CultureInfo.InvariantCulture); + int zoom = int.Parse(item.Tag.ToString(), CultureInfo.InvariantCulture); // Zoom now - (General.Editing.Mode as ClassicMode).SetZoom(zoom / 100f); + ((ClassicMode)General.Editing.Mode).SetZoom(zoom / 100f); } } } @@ -946,7 +918,7 @@ namespace CodeImp.DoomBuilder.Windows { // In classic mode? if(General.Map != null && General.Editing.Mode is ClassicMode) - (General.Editing.Mode as ClassicMode).CenterInScreen(); + ((ClassicMode)General.Editing.Mode).CenterInScreen(); } // This changes grid display @@ -965,10 +937,11 @@ namespace CodeImp.DoomBuilder.Windows if(General.Editing.Mode is ClassicMode) { // Requested from menu? - if(sender is ToolStripMenuItem) + ToolStripMenuItem item = sender as ToolStripMenuItem; + if(item != null) { // Get integral zoom level - int size = int.Parse((sender as ToolStripMenuItem).Tag.ToString(), CultureInfo.InvariantCulture); + int size = int.Parse(item.Tag.ToString(), CultureInfo.InvariantCulture); //mxd. Disable automatic grid resizing DisableDynamicGridResize(); @@ -1173,7 +1146,9 @@ namespace CodeImp.DoomBuilder.Windows private void display_MouseEnter(object sender, EventArgs e) { mouseinside = true; - if((General.Map != null) && (mouseinput == null) && (General.Editing.Mode != null)) + //mxd. Skip when in mouseexclusive (e.g. Visual) mode to avoid mouse disappearing when moving it + // on top of inactive editor window while Visual mode is active + if((General.Map != null) && (mouseinput == null) && (General.Editing.Mode != null) && !mouseexclusive) { General.Plugins.OnEditMouseEnter(e); General.Editing.Mode.OnMouseEnter(e); @@ -1852,6 +1827,22 @@ namespace CodeImp.DoomBuilder.Windows } } + //mxd + public void BeginToolbarUpdate() + { + toolbar.SuspendLayout(); + modestoolbar.SuspendLayout(); + modecontrolsloolbar.SuspendLayout(); + } + + //mxd + public void EndToolbarUpdate() + { + toolbar.ResumeLayout(true); + modestoolbar.ResumeLayout(true); + modecontrolsloolbar.ResumeLayout(true); + } + // This adds a button to the toolbar public void AddButton(ToolStripItem button) { AddButton(button, ToolbarSection.Custom, General.Plugins.FindPluginByAssembly(Assembly.GetCallingAssembly())); } public void AddButton(ToolStripItem button, ToolbarSection section) { AddButton(button, section, General.Plugins.FindPluginByAssembly(Assembly.GetCallingAssembly())); } @@ -2046,19 +2037,24 @@ namespace CodeImp.DoomBuilder.Windows buttonviewceilings.Visible = General.Settings.ToolbarViewModes && maploaded; buttonviewfloors.Visible = General.Settings.ToolbarViewModes && maploaded; buttonviewnormal.Visible = General.Settings.ToolbarViewModes && maploaded; + separatorgeomergemodes.Visible = General.Settings.ToolbarGeometry && maploaded; //mxd + buttonmergegeoclassic.Visible = General.Settings.ToolbarGeometry && maploaded; //mxd + buttonmergegeo.Visible = General.Settings.ToolbarGeometry && maploaded; //mxd + buttonplacegeo.Visible = General.Settings.ToolbarGeometry && maploaded; //mxd buttonsnaptogrid.Visible = General.Settings.ToolbarGeometry && maploaded; buttontoggledynamicgrid.Visible = General.Settings.ToolbarGeometry && maploaded; //mxd buttontoggledynamicgrid.Checked = General.Settings.DynamicGridSize; //mxd buttontogglenightspath.Visible = maploaded && General.Map.SRB2; buttontogglenightspath.Checked = General.Settings.RenderNiGHTSPath; buttonautomerge.Visible = General.Settings.ToolbarGeometry && maploaded; + buttonsplitjoinedsectors.Visible = General.Settings.ToolbarGeometry && maploaded; //mxd + buttonsplitjoinedsectors.Checked = General.Settings.SplitJoinedSectors; //mxd buttonautoclearsidetextures.Visible = General.Settings.ToolbarGeometry && maploaded; //mxd buttontest.Visible = General.Settings.ToolbarTesting && maploaded; //mxd modelrendermode.Visible = General.Settings.GZToolbarGZDoom && maploaded; dynamiclightmode.Visible = General.Settings.GZToolbarGZDoom && maploaded; - buttontogglefx.Visible = General.Settings.GZToolbarGZDoom && maploaded; buttontogglefog.Visible = General.Settings.GZToolbarGZDoom && maploaded; buttontogglesky.Visible = maploaded && (General.Settings.GZToolbarGZDoom || General.Map.SRB2); buttontoggleeventlines.Visible = General.Settings.GZToolbarGZDoom && maploaded; @@ -2469,7 +2465,7 @@ namespace CodeImp.DoomBuilder.Windows else if(menuitem.Tag is EditModeInfo) { // Action with this name available? - EditModeInfo modeinfo = (menuitem.Tag as EditModeInfo); + EditModeInfo modeinfo = (EditModeInfo)menuitem.Tag; string actionname = modeinfo.SwitchAction.GetFullActionName(modeinfo.Plugin.Assembly); if(General.Actions.Exists(actionname)) { @@ -2494,11 +2490,11 @@ namespace CodeImp.DoomBuilder.Windows // Tag set for this item? if(item.Tag is string) { - // Check if the tag doe not already begin with the assembly name - if(!(item.Tag as string).StartsWith(plugin.Name + "_", StringComparison.OrdinalIgnoreCase)) + // Check if the tag does not already begin with the assembly name + if(!((string)item.Tag).StartsWith(plugin.Name + "_", StringComparison.OrdinalIgnoreCase)) { // Change the tag to a fully qualified action name - item.Tag = plugin.Name.ToLowerInvariant() + "_" + (item.Tag as string); + item.Tag = plugin.Name.ToLowerInvariant() + "_" + (string)item.Tag; } } @@ -2642,14 +2638,14 @@ namespace CodeImp.DoomBuilder.Windows private string GetDisplayFilename(string filename) { // String doesnt fit? - if(GetStringWidth(filename) > MAX_RECENT_FILES_PIXELS) + if(MeasureString(filename, this.Font).Width > MAX_RECENT_FILES_PIXELS) { // Start chopping off characters for(int i = filename.Length - 6; i >= 0; i--) { // Does it fit now? string newname = filename.Substring(0, 3) + "..." + filename.Substring(filename.Length - i, i); - if(GetStringWidth(newname) <= MAX_RECENT_FILES_PIXELS) return newname; + if(MeasureString(newname, this.Font).Width <= MAX_RECENT_FILES_PIXELS) return newname; } // Cant find anything that fits (most unlikely!) @@ -2662,14 +2658,6 @@ namespace CodeImp.DoomBuilder.Windows } } - // This returns the width of a string - private float GetStringWidth(string str) - { - Graphics g = Graphics.FromHwndInternal(this.Handle); - SizeF strsize = g.MeasureString(str, this.Font); - return strsize.Width; - } - // Exit clicked private void itemexit_Click(object sender, EventArgs e) { this.Close(); } @@ -2700,6 +2688,7 @@ namespace CodeImp.DoomBuilder.Windows itemcopy.Enabled = (General.Map != null) && (General.Editing.Mode != null) && General.Editing.Mode.Attributes.AllowCopyPaste; itempaste.Enabled = (General.Map != null) && (General.Editing.Mode != null) && General.Editing.Mode.Attributes.AllowCopyPaste; itempastespecial.Enabled = (General.Map != null) && (General.Editing.Mode != null) && General.Editing.Mode.Attributes.AllowCopyPaste; + itemsplitjoinedsectors.Checked = General.Settings.SplitJoinedSectors; //mxd itemautoclearsidetextures.Checked = General.Settings.AutoClearSidedefTextures; //mxd itemdynamicgridsize.Enabled = (General.Map != null); //mxd itemdynamicgridsize.Checked = General.Settings.DynamicGridSize; //mxd @@ -2725,6 +2714,17 @@ namespace CodeImp.DoomBuilder.Windows buttoncut.Enabled = itemcut.Enabled; buttoncopy.Enabled = itemcopy.Enabled; buttonpaste.Enabled = itempaste.Enabled; + + //mxd. Geometry merge mode items + if(General.Map != null) + { + for(int i = 0; i < geomergemodesbuttons.Length; i++) + { + // Check the correct item + geomergemodesbuttons[i].Checked = (i == (int)General.Settings.MergeGeometryMode); + geomergemodesitems[i].Checked = (i == (int)General.Settings.MergeGeometryMode); + } + } } //mxd @@ -2821,6 +2821,16 @@ namespace CodeImp.DoomBuilder.Windows DisplayStatus(StatusType.Action, "Snap to geometry is " + (buttonautomerge.Checked ? "ENABLED" : "DISABLED")); } + //mxd + [BeginAction("togglejoinedsectorssplitting")] + internal void ToggleJoinedSectorsSplitting() + { + buttonsplitjoinedsectors.Checked = !buttonsplitjoinedsectors.Checked; + itemsplitjoinedsectors.Checked = buttonsplitjoinedsectors.Checked; + General.Settings.SplitJoinedSectors = buttonsplitjoinedsectors.Checked; + DisplayStatus(StatusType.Action, "Joined sectors splitting is " + (General.Settings.SplitJoinedSectors ? "ENABLED" : "DISABLED")); + } + //mxd [BeginAction("togglebrightness")] internal void ToggleBrightness() @@ -2899,12 +2909,42 @@ namespace CodeImp.DoomBuilder.Windows ThingStatisticsForm f = new ThingStatisticsForm(); f.ShowDialog(this); } + + //mxd + [BeginAction("geomergeclassic")] + private void GeoMergeClassic() + { + General.Settings.MergeGeometryMode = MergeGeometryMode.CLASSIC; + UpdateToolbar(); + UpdateEditMenu(); + DisplayStatus(StatusType.Action, "\"Merge Dragged Vertices Only\" mode selected"); + } + + //mxd + [BeginAction("geomerge")] + private void GeoMerge() + { + General.Settings.MergeGeometryMode = MergeGeometryMode.MERGE; + UpdateToolbar(); + UpdateEditMenu(); + DisplayStatus(StatusType.Action, "\"Merge Dragged Geometry\" mode selected"); + } + + //mxd + [BeginAction("georeplace")] + private void GeoReplace() + { + General.Settings.MergeGeometryMode = MergeGeometryMode.REPLACE; + UpdateToolbar(); + UpdateEditMenu(); + DisplayStatus(StatusType.Action, "\"Replace with Dragged Geometry\" mode selected"); + } #endregion #region ================== View Menu - // This sets up the modes menu + // This sets up the View menu private void UpdateViewMenu() { menuview.Visible = (General.Map != null); //mxd @@ -2917,6 +2957,25 @@ namespace CodeImp.DoomBuilder.Windows itemtogglecomments.Checked = General.Settings.RenderComments; //mxd itemtogglefixedthingsscale.Visible = (General.Map != null); //mxd itemtogglefixedthingsscale.Checked = General.Settings.FixedThingsScale; //mxd + itemtogglefog.Checked = General.Settings.GZDrawFog; + itemtogglesky.Checked = General.Settings.GZDrawSky; + itemtoggleeventlines.Checked = General.Settings.GZShowEventLines; + itemtogglevisualverts.Visible = (General.Map != null && General.Map.UDMF); + itemtogglevisualverts.Checked = General.Settings.GZShowVisualVertices; + + // Update Model Rendering Mode items... + foreach(ToolStripMenuItem item in itemmodelmodes.DropDownItems) + { + item.Checked = ((ModelRenderMode)item.Tag == General.Settings.GZDrawModelsMode); + if(item.Checked) itemmodelmodes.Image = item.Image; + } + + // Update Dynamic Light Mode items... + foreach(ToolStripMenuItem item in itemdynlightmodes.DropDownItems) + { + item.Checked = ((LightRenderMode)item.Tag == General.Settings.GZDrawLightsMode); + if(item.Checked) itemdynlightmodes.Image = item.Image; + } // View mode items if(General.Map != null) @@ -2930,6 +2989,76 @@ namespace CodeImp.DoomBuilder.Windows } } + //mxd + [BeginAction("gztoggleenhancedrendering")] + public void ToggleEnhancedRendering() + { + General.Settings.EnhancedRenderingEffects = !General.Settings.EnhancedRenderingEffects; + + General.Settings.GZDrawFog = General.Settings.EnhancedRenderingEffects; + General.Settings.GZDrawSky = General.Settings.EnhancedRenderingEffects; + General.Settings.GZDrawLightsMode = (General.Settings.EnhancedRenderingEffects ? LightRenderMode.ALL : LightRenderMode.NONE); + General.Settings.GZDrawModelsMode = (General.Settings.EnhancedRenderingEffects ? ModelRenderMode.ALL : ModelRenderMode.NONE); + + UpdateGZDoomPanel(); + UpdateViewMenu(); + DisplayStatus(StatusType.Info, "Enhanced rendering effects are " + (General.Settings.EnhancedRenderingEffects ? "ENABLED" : "DISABLED")); + } + + //mxd + [BeginAction("gztogglefog")] + internal void ToggleFog() + { + General.Settings.GZDrawFog = !General.Settings.GZDrawFog; + + itemtogglefog.Checked = General.Settings.GZDrawFog; + buttontogglefog.Checked = General.Settings.GZDrawFog; + + General.MainWindow.DisplayStatus(StatusType.Action, "Fog rendering is " + (General.Settings.GZDrawFog ? "ENABLED" : "DISABLED")); + General.MainWindow.RedrawDisplay(); + General.MainWindow.UpdateGZDoomPanel(); + } + + //mxd + [BeginAction("gztogglesky")] + internal void ToggleSky() + { + General.Settings.GZDrawSky = !General.Settings.GZDrawSky; + + itemtogglesky.Checked = General.Settings.GZDrawSky; + buttontogglesky.Checked = General.Settings.GZDrawSky; + + General.MainWindow.DisplayStatus(StatusType.Action, "Sky rendering is " + (General.Settings.GZDrawSky ? "ENABLED" : "DISABLED")); + General.MainWindow.RedrawDisplay(); + General.MainWindow.UpdateGZDoomPanel(); + } + + [BeginAction("gztoggleeventlines")] + internal void ToggleEventLines() + { + General.Settings.GZShowEventLines = !General.Settings.GZShowEventLines; + + itemtoggleeventlines.Checked = General.Settings.GZShowEventLines; + buttontoggleeventlines.Checked = General.Settings.GZShowEventLines; + + General.MainWindow.DisplayStatus(StatusType.Action, "Event lines are " + (General.Settings.GZShowEventLines ? "ENABLED" : "DISABLED")); + General.MainWindow.RedrawDisplay(); + General.MainWindow.UpdateGZDoomPanel(); + } + + [BeginAction("gztogglevisualvertices")] + internal void ToggleVisualVertices() + { + General.Settings.GZShowVisualVertices = !General.Settings.GZShowVisualVertices; + + itemtogglevisualverts.Checked = General.Settings.GZShowVisualVertices; + buttontogglevisualvertices.Checked = General.Settings.GZShowVisualVertices; + + General.MainWindow.DisplayStatus(StatusType.Action, "Visual vertices are " + (General.Settings.GZShowVisualVertices ? "ENABLED" : "DISABLED")); + General.MainWindow.RedrawDisplay(); + General.MainWindow.UpdateGZDoomPanel(); + } + #endregion #region ================== Mode Menu @@ -3397,7 +3526,8 @@ namespace CodeImp.DoomBuilder.Windows General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: ALL"); break; } - + + UpdateViewMenu(); UpdateGZDoomPanel(); RedrawDisplay(); } @@ -3420,7 +3550,8 @@ namespace CodeImp.DoomBuilder.Windows General.MainWindow.DisplayStatus(StatusType.Action, "Models rendering mode: ANIMATED"); break; } - + + UpdateViewMenu(); UpdateGZDoomPanel(); RedrawDisplay(); } @@ -3456,10 +3587,10 @@ namespace CodeImp.DoomBuilder.Windows buttontoggleinfo.Image = Resources.InfoPanelCollapse; //mxd labelcollapsedinfo.Visible = false; itemtoggleinfo.Checked = true; - if(lastinfoobject is Vertex) ShowVertexInfo(lastinfoobject as Vertex); - else if(lastinfoobject is Linedef) ShowLinedefInfo(lastinfoobject as Linedef); - else if(lastinfoobject is Sector) ShowSectorInfo(lastinfoobject as Sector); - else if(lastinfoobject is Thing) ShowThingInfo(lastinfoobject as Thing); + if(lastinfoobject is Vertex) ShowVertexInfo((Vertex)lastinfoobject); + else if(lastinfoobject is Linedef) ShowLinedefInfo((Linedef)lastinfoobject); + else if(lastinfoobject is Sector) ShowSectorInfo((Sector)lastinfoobject); + else if(lastinfoobject is Thing) ShowThingInfo((Thing)lastinfoobject); else HideInfo(); } @@ -3506,19 +3637,19 @@ namespace CodeImp.DoomBuilder.Windows modename.Refresh(); statistics.Visible = showModeName; //mxd - //mxd. let the plugins know + //mxd. Let the plugins know General.Plugins.OnHighlightLost(); } // This refreshes info public void RefreshInfo() { - if(lastinfoobject is Vertex) ShowVertexInfo(lastinfoobject as Vertex); - else if(lastinfoobject is Linedef) ShowLinedefInfo(lastinfoobject as Linedef); - else if(lastinfoobject is Sector) ShowSectorInfo(lastinfoobject as Sector); - else if(lastinfoobject is Thing) ShowThingInfo(lastinfoobject as Thing); + if(lastinfoobject is Vertex) ShowVertexInfo((Vertex)lastinfoobject); + else if(lastinfoobject is Linedef) ShowLinedefInfo((Linedef)lastinfoobject); + else if(lastinfoobject is Sector) ShowSectorInfo((Sector)lastinfoobject); + else if(lastinfoobject is Thing) ShowThingInfo((Thing)lastinfoobject); - //mxd. let the plugins know + //mxd. Let the plugins know General.Plugins.OnHighlightRefreshed(lastinfoobject); } @@ -3544,7 +3675,7 @@ namespace CodeImp.DoomBuilder.Windows //mxd internal void AddHintsDocker() { - if(!dockerspanel.Contains(hintsDocker)) dockerspanel.Add(hintsDocker); + if(!dockerspanel.Contains(hintsDocker)) dockerspanel.Add(hintsDocker, false); } //mxd @@ -3933,6 +4064,12 @@ namespace CodeImp.DoomBuilder.Windows } break; + case (int)ThreadMessages.ResourcesLoaded: //mxd + string loadtime = Marshal.PtrToStringAuto(m.WParam); + Marshal.FreeCoTaskMem(m.WParam); + DisplayStatus(StatusType.Info, "Resources loaded in " + loadtime + " seconds"); + break; + case General.WM_SYSCOMMAND: // We don't want to open a menu when ALT is pressed if(m.WParam.ToInt32() != General.SC_KEYMENU) @@ -4011,6 +4148,7 @@ namespace CodeImp.DoomBuilder.Windows { // Go for all setors bool updated = false; + foreach(Sector s in General.Map.Map.Sectors) { // Update floor buffer if needed @@ -4063,12 +4201,27 @@ namespace CodeImp.DoomBuilder.Windows processingcount = 0; processor.Enabled = false; } + + //mxd + internal void ResetClock() + { + // Let the data manager know... + if(General.Map != null && General.Map.Data != null) + General.Map.Data.OnBeforeClockReset(); + + Clock.Reset(); + lastupdatetime = 0; + + // Let the mode know... + if(General.Editing.Mode != null) + General.Editing.Mode.OnClockReset(); + } // Processor event private void processor_Tick(object sender, EventArgs e) { - float curtime = Clock.CurrentTime; - float deltatime = curtime - lastupdatetime; + long curtime = Clock.CurrentTime; + long deltatime = curtime - lastupdatetime; lastupdatetime = curtime; if ((General.Map != null) && (General.Editing.Mode != null)) @@ -4095,11 +4248,23 @@ namespace CodeImp.DoomBuilder.Windows { if(dockerspanel.Contains(d)) return; //mxd + // Make sure the full name is set with the plugin name as prefix + Plugin plugin = General.Plugins.FindPluginByAssembly(Assembly.GetCallingAssembly()); + d.MakeFullName(plugin.Name.ToLowerInvariant()); + + dockerspanel.Add(d, false); + } + + //mxd. This also adds a docker + public void AddDocker(Docker d, bool notify) + { + if(dockerspanel.Contains(d)) return; //mxd + // Make sure the full name is set with the plugin name as prefix Plugin plugin = General.Plugins.FindPluginByAssembly(Assembly.GetCallingAssembly()); d.MakeFullName(plugin.Name.ToLowerInvariant()); - dockerspanel.Add(d); + dockerspanel.Add(d, notify); } // This removes a docker @@ -4206,17 +4371,27 @@ namespace CodeImp.DoomBuilder.Windows // Update ignored revision number General.Settings.IgnoredRemoteRevision = (form.IgnoreThisUpdate ? remoterev : 0); - if(result == DialogResult.OK && General.AskSaveMap()) + if(result == DialogResult.OK) { - // Launch the updater - Process.Start(Path.Combine(General.AppPath, "Updater.exe"), "-rev " + remoterev); + // Updater will be launched from General.Terminate + General.PendingUpdateRev = remoterev; // Close + General.WriteLogLine("Initiating shutdown due to update request..."); General.Exit(true); } } } #endregion + + #region ================== Graphics (mxd) + + public SizeF MeasureString(string text, Font font) + { + return graphics.MeasureString(text, font); + } + + #endregion } } \ No newline at end of file diff --git a/Source/Core/Windows/MapOptionsForm.Designer.cs b/Source/Core/Windows/MapOptionsForm.Designer.cs index 31d2494f5f157a6d614e1c6ad304702d39ffb378..bea95d72b1fafbdeb335af411a5eb9a07aa01746 100644 --- a/Source/Core/Windows/MapOptionsForm.Designer.cs +++ b/Source/Core/Windows/MapOptionsForm.Designer.cs @@ -242,7 +242,7 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "MapOptionsForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Core/Windows/OpenMapOptionsForm.cs b/Source/Core/Windows/OpenMapOptionsForm.cs index d6dfd94d2e4a6748d18fcf105a31280ed2cfe0d7..67da9f553cfd26690c64d17b1a01d934ede01ad5 100644 --- a/Source/Core/Windows/OpenMapOptionsForm.cs +++ b/Source/Core/Windows/OpenMapOptionsForm.cs @@ -30,7 +30,7 @@ using CodeImp.DoomBuilder.Config; namespace CodeImp.DoomBuilder.Windows { - internal partial class OpenMapOptionsForm : Form + internal partial class OpenMapOptionsForm : DelayedForm { // Variables private Configuration mapsettings; @@ -40,7 +40,7 @@ namespace CodeImp.DoomBuilder.Windows private string selectedmapname; // Properties - public string FilePathName { get { return filepathname; } } + //public string FilePathName { get { return filepathname; } } public MapOptions Options { get { return options; } } // Constructor @@ -446,7 +446,7 @@ namespace CodeImp.DoomBuilder.Windows } // Check if we should warn the user for missing resources - if((wadfile.Type != WAD.TYPE_IWAD) && (locations.Count == 0) && (configinfo.Resources.Count == 0)) + if((!wadfile.IsIWAD) && (locations.Count == 0) && (configinfo.Resources.Count == 0)) { if(MessageBox.Show(this, "You are about to load a map without selecting any resources. Textures, flats and " + "sprites may not be shown correctly or may not show up at all. Do you want to continue?", Application.ProductName, diff --git a/Source/Core/Windows/PasteOptionsForm.Designer.cs b/Source/Core/Windows/PasteOptionsForm.Designer.cs index ba1c9fca296ca47d9f99f8e20f484397ab14e6ac..5ed21821187e2ff4966d874a6821674e69d1ad23 100644 --- a/Source/Core/Windows/PasteOptionsForm.Designer.cs +++ b/Source/Core/Windows/PasteOptionsForm.Designer.cs @@ -36,7 +36,7 @@ // paste // this.paste.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.paste.Location = new System.Drawing.Point(142, 214); + this.paste.Location = new System.Drawing.Point(142, 152); this.paste.Name = "paste"; this.paste.Size = new System.Drawing.Size(112, 25); this.paste.TabIndex = 3; @@ -48,7 +48,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(260, 214); + this.cancel.Location = new System.Drawing.Point(260, 152); this.cancel.Name = "cancel"; this.cancel.Size = new System.Drawing.Size(112, 25); this.cancel.TabIndex = 4; @@ -58,12 +58,11 @@ // // pasteoptions // - this.pasteoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) + this.pasteoptions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.pasteoptions.Location = new System.Drawing.Point(12, 12); this.pasteoptions.Name = "pasteoptions"; - this.pasteoptions.Size = new System.Drawing.Size(360, 188); + this.pasteoptions.Size = new System.Drawing.Size(360, 138); this.pasteoptions.TabIndex = 5; // // PasteOptionsForm @@ -72,7 +71,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(384, 246); + this.ClientSize = new System.Drawing.Size(384, 184); this.Controls.Add(this.pasteoptions); this.Controls.Add(this.cancel); this.Controls.Add(this.paste); @@ -80,7 +79,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "PasteOptionsForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Core/Windows/PreferencesController.cs b/Source/Core/Windows/PreferencesController.cs index f56cebc1b4958a2a562b4f5b5c912b1865200481..d3e95e8391ecc0eaa6b9f64deebe1104d43a9e85 100644 --- a/Source/Core/Windows/PreferencesController.cs +++ b/Source/Core/Windows/PreferencesController.cs @@ -58,12 +58,12 @@ namespace CodeImp.DoomBuilder.Windows } // Destructor - ~PreferencesController() + /*~PreferencesController() { form = null; OnAccept = null; OnCancel = null; - } + }*/ #endregion diff --git a/Source/Core/Windows/PreferencesForm.Designer.cs b/Source/Core/Windows/PreferencesForm.Designer.cs index 4871b4d380ee5ba587a0dd0d2c537cdafc192ab9..07106e83def9a645f91caa78431e1ee4b3b8157d 100644 --- a/Source/Core/Windows/PreferencesForm.Designer.cs +++ b/Source/Core/Windows/PreferencesForm.Designer.cs @@ -1,3 +1,5 @@ +using System.Media; + namespace CodeImp.DoomBuilder.Windows { partial class PreferencesForm @@ -29,2144 +31,2272 @@ namespace CodeImp.DoomBuilder.Windows /// </summary> private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - System.Windows.Forms.Label label7; - System.Windows.Forms.Label label6; - System.Windows.Forms.Label label5; - System.Windows.Forms.GroupBox groupBox1; - System.Windows.Forms.Label label1; - System.Windows.Forms.Label label18; - System.Windows.Forms.Label label20; - System.Windows.Forms.Label label21; - System.Windows.Forms.Label label29; - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PreferencesForm)); - this.keepfilterfocused = new System.Windows.Forms.CheckBox(); - this.maxBackups = new System.Windows.Forms.TrackBar(); - this.labelBackups = new System.Windows.Forms.Label(); - this.label27 = new System.Windows.Forms.Label(); - this.cbStoreEditTab = new System.Windows.Forms.CheckBox(); - this.locatetexturegroup = new System.Windows.Forms.CheckBox(); - this.recentFiles = new System.Windows.Forms.TrackBar(); - this.labelRecentFiles = new System.Windows.Forms.Label(); - this.label25 = new System.Windows.Forms.Label(); - this.vertexScaleLabel = new System.Windows.Forms.Label(); - this.label22 = new System.Windows.Forms.Label(); - this.vertexScale = new System.Windows.Forms.TrackBar(); - this.cbSynchCameras = new System.Windows.Forms.CheckBox(); - this.showtexturesizes = new System.Windows.Forms.CheckBox(); - this.scriptontop = new System.Windows.Forms.CheckBox(); - this.zoomfactor = new System.Windows.Forms.TrackBar(); - this.zoomfactorlabel = new System.Windows.Forms.Label(); - this.label19 = new System.Windows.Forms.Label(); - this.autoscrollspeed = new System.Windows.Forms.TrackBar(); - this.autoscrollspeedlabel = new System.Windows.Forms.Label(); - this.label15 = new System.Windows.Forms.Label(); - this.previewsize = new System.Windows.Forms.TrackBar(); - this.previewsizelabel = new System.Windows.Forms.Label(); - this.label12 = new System.Windows.Forms.Label(); - this.label14 = new System.Windows.Forms.Label(); - this.defaultviewmode = new System.Windows.Forms.ComboBox(); - this.keyusedlabel = new System.Windows.Forms.Label(); - this.colorsgroup1 = new System.Windows.Forms.GroupBox(); - this.color3dFloors = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorInfo = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorMD3 = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.doublesidedalpha = new System.Windows.Forms.TrackBar(); - this.colorgrid64 = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorgrid = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorindication = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorbackcolor = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.label2 = new System.Windows.Forms.Label(); - this.doublesidedalphalabel = new System.Windows.Forms.Label(); - this.colorselection = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorvertices = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorhighlight = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorlinedefs = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.cbStretchView = new System.Windows.Forms.CheckBox(); - this.qualitydisplay = new System.Windows.Forms.CheckBox(); - this.cancel = new System.Windows.Forms.Button(); - this.apply = new System.Windows.Forms.Button(); - this.tabs = new System.Windows.Forms.TabControl(); - this.tabinterface = new System.Windows.Forms.TabPage(); - this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.resetscreenshotsdir = new System.Windows.Forms.Button(); - this.browsescreenshotsdir = new System.Windows.Forms.Button(); - this.screenshotsfolderpath = new System.Windows.Forms.TextBox(); - this.groupBox5 = new System.Windows.Forms.GroupBox(); - this.toolbar_gzdoom = new System.Windows.Forms.CheckBox(); - this.toolbar_file = new System.Windows.Forms.CheckBox(); - this.toolbar_testing = new System.Windows.Forms.CheckBox(); - this.toolbar_geometry = new System.Windows.Forms.CheckBox(); - this.toolbar_viewmodes = new System.Windows.Forms.CheckBox(); - this.toolbar_filter = new System.Windows.Forms.CheckBox(); - this.toolbar_prefabs = new System.Windows.Forms.CheckBox(); - this.toolbar_copy = new System.Windows.Forms.CheckBox(); - this.toolbar_undo = new System.Windows.Forms.CheckBox(); - this.toolbar_script = new System.Windows.Forms.CheckBox(); - this.groupBox4 = new System.Windows.Forms.GroupBox(); - this.collapsedockers = new System.Windows.Forms.CheckBox(); - this.dockersposition = new System.Windows.Forms.ComboBox(); - this.label17 = new System.Windows.Forms.Label(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.vertexScale3D = new System.Windows.Forms.TrackBar(); - this.vertexScale3DLabel = new System.Windows.Forms.Label(); - this.label26 = new System.Windows.Forms.Label(); - this.viewdistance = new System.Windows.Forms.TrackBar(); - this.movespeed = new System.Windows.Forms.TrackBar(); - this.mousespeed = new System.Windows.Forms.TrackBar(); - this.fieldofview = new System.Windows.Forms.TrackBar(); - this.viewdistancelabel = new System.Windows.Forms.Label(); - this.label13 = new System.Windows.Forms.Label(); - this.invertyaxis = new System.Windows.Forms.CheckBox(); - this.movespeedlabel = new System.Windows.Forms.Label(); - this.label11 = new System.Windows.Forms.Label(); - this.mousespeedlabel = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); - this.fieldofviewlabel = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.tabkeys = new System.Windows.Forms.TabPage(); - this.bClearActionFilter = new System.Windows.Forms.Button(); - this.tbFilterActions = new System.Windows.Forms.TextBox(); - this.label24 = new System.Windows.Forms.Label(); - this.listactions = new System.Windows.Forms.ListView(); - this.columncontrolaction = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columncontrolkey = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.actioncontrolpanel = new System.Windows.Forms.GroupBox(); - this.actiondescription = new System.Windows.Forms.TextBox(); - this.keyusedlist = new System.Windows.Forms.ListBox(); - this.disregardshiftlabel = new System.Windows.Forms.Label(); - this.actioncontrol = new System.Windows.Forms.ComboBox(); - this.actiontitle = new System.Windows.Forms.Label(); - this.actioncontrolclear = new System.Windows.Forms.Button(); - this.actionkey = new System.Windows.Forms.TextBox(); - this.tabcolors = new System.Windows.Forms.TabPage(); - this.appearancegroup1 = new System.Windows.Forms.GroupBox(); - this.labelDefaultThingSize = new System.Windows.Forms.Label(); - this.tbDefaultThingSize = new System.Windows.Forms.TrackBar(); - this.cbDrawThingsFixedSize = new System.Windows.Forms.CheckBox(); - this.cbDrawCrosshair = new System.Windows.Forms.CheckBox(); - this.cbDrawFullCrosshair = new System.Windows.Forms.CheckBox(); - this.capitalizetexturenames = new System.Windows.Forms.CheckBox(); - this.cbMarkExtraFloors = new System.Windows.Forms.CheckBox(); - this.cbOldHighlightMode = new System.Windows.Forms.CheckBox(); - this.labelDynLightIntensity = new System.Windows.Forms.Label(); - this.tbDynLightIntensity = new System.Windows.Forms.TrackBar(); - this.labelDynLightSize = new System.Windows.Forms.Label(); - this.tbDynLightSize = new System.Windows.Forms.TrackBar(); - this.labelDynLightCount = new System.Windows.Forms.Label(); - this.tbDynLightCount = new System.Windows.Forms.TrackBar(); - this.animatevisualselection = new System.Windows.Forms.CheckBox(); - this.blackbrowsers = new System.Windows.Forms.CheckBox(); - this.visualbilinear = new System.Windows.Forms.CheckBox(); - this.classicbilinear = new System.Windows.Forms.CheckBox(); - this.imagebrightnesslabel = new System.Windows.Forms.Label(); - this.imagebrightness = new System.Windows.Forms.TrackBar(); - this.nightsgroup = new System.Windows.Forms.GroupBox(); - this.nightscolormare8 = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.nightscolormare7 = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.nightscolormare6 = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.nightscolormare5 = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.nightscolormare4 = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.nightscolormare3 = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.nightscolormare2 = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.nightscolormare1 = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.label23 = new System.Windows.Forms.Label(); - this.nightscircleprecision = new System.Windows.Forms.TrackBar(); - this.nightscircleprecisionlabel = new System.Windows.Forms.Label(); - this.waypointcolor1 = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.waypointcolor2 = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.tabscripteditor = new System.Windows.Forms.TabPage(); - this.groupBox9 = new System.Windows.Forms.GroupBox(); - this.scriptshowfolding = new System.Windows.Forms.CheckBox(); - this.scriptshowlinenumbers = new System.Windows.Forms.CheckBox(); - this.groupBox8 = new System.Windows.Forms.GroupBox(); - this.scriptautoshowautocompletion = new System.Windows.Forms.CheckBox(); - this.scriptautoclosebrackets = new System.Windows.Forms.CheckBox(); - this.scriptusetabs = new System.Windows.Forms.CheckBox(); - this.scriptallmanstyle = new System.Windows.Forms.CheckBox(); - this.label10 = new System.Windows.Forms.Label(); - this.scriptautoindent = new System.Windows.Forms.CheckBox(); - this.scripttabwidth = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); - this.groupBox7 = new System.Windows.Forms.GroupBox(); - this.label3 = new System.Windows.Forms.Label(); - this.scriptfontname = new System.Windows.Forms.ComboBox(); - this.scriptfontbold = new System.Windows.Forms.CheckBox(); - this.label8 = new System.Windows.Forms.Label(); - this.scriptfontsize = new System.Windows.Forms.ComboBox(); - this.groupBox6 = new System.Windows.Forms.GroupBox(); - this.colorproperties = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.label28 = new System.Windows.Forms.Label(); - this.scriptcolorpresets = new System.Windows.Forms.ComboBox(); - this.colorfoldback = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorfoldfore = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorindicator = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorwhitespace = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorbracebad = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorbrace = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorselectionback = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorselectionfore = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorincludes = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorstrings = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorscriptbackground = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorplaintext = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorcomments = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorlinenumbers = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorkeywords = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorliterals = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.colorconstants = new CodeImp.DoomBuilder.Controls.ColorControl(); - this.previewgroup = new System.Windows.Forms.GroupBox(); - this.tabpasting = new System.Windows.Forms.TabPage(); - this.label16 = new System.Windows.Forms.Label(); - this.pasteoptions = new CodeImp.DoomBuilder.Controls.PasteOptionsControl(); - this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.browseScreenshotsFolderDialog = new System.Windows.Forms.FolderBrowserDialog(); - label7 = new System.Windows.Forms.Label(); - label6 = new System.Windows.Forms.Label(); - label5 = new System.Windows.Forms.Label(); - groupBox1 = new System.Windows.Forms.GroupBox(); - label1 = new System.Windows.Forms.Label(); - label18 = new System.Windows.Forms.Label(); - label20 = new System.Windows.Forms.Label(); - label21 = new System.Windows.Forms.Label(); - label29 = new System.Windows.Forms.Label(); - groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.maxBackups)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.recentFiles)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.vertexScale)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.zoomfactor)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.autoscrollspeed)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.previewsize)).BeginInit(); - this.colorsgroup1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.doublesidedalpha)).BeginInit(); - this.tabs.SuspendLayout(); - this.tabinterface.SuspendLayout(); - this.groupBox3.SuspendLayout(); - this.groupBox5.SuspendLayout(); - this.groupBox4.SuspendLayout(); - this.groupBox2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.vertexScale3D)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.viewdistance)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.movespeed)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.mousespeed)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.fieldofview)).BeginInit(); - this.tabkeys.SuspendLayout(); - this.actioncontrolpanel.SuspendLayout(); - this.tabcolors.SuspendLayout(); - this.appearancegroup1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tbDefaultThingSize)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbDynLightIntensity)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbDynLightSize)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbDynLightCount)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.imagebrightness)).BeginInit(); - this.nightsgroup.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nightscircleprecision)).BeginInit(); - this.tabscripteditor.SuspendLayout(); - this.groupBox9.SuspendLayout(); - this.groupBox8.SuspendLayout(); - this.groupBox7.SuspendLayout(); - this.groupBox6.SuspendLayout(); - this.tabpasting.SuspendLayout(); - this.SuspendLayout(); - // - // label7 - // - label7.AutoSize = true; - label7.Location = new System.Drawing.Point(20, 172); - label7.Name = "label7"; - label7.Size = new System.Drawing.Size(182, 13); - label7.TabIndex = 7; - label7.Text = "Or select a special input control here:"; - // - // label6 - // - label6.AutoSize = true; - label6.Location = new System.Drawing.Point(20, 30); - label6.Name = "label6"; - label6.Size = new System.Drawing.Size(40, 13); - label6.TabIndex = 2; - label6.Text = "Action:"; - // - // label5 - // - label5.AutoSize = true; - label5.Location = new System.Drawing.Point(20, 122); - label5.Name = "label5"; - label5.Size = new System.Drawing.Size(195, 13); - label5.TabIndex = 4; - label5.Text = "Press the desired key combination here:"; - // - // groupBox1 - // - groupBox1.Controls.Add(this.keepfilterfocused); - groupBox1.Controls.Add(this.maxBackups); - groupBox1.Controls.Add(this.labelBackups); - groupBox1.Controls.Add(this.label27); - groupBox1.Controls.Add(this.cbStoreEditTab); - groupBox1.Controls.Add(this.locatetexturegroup); - groupBox1.Controls.Add(this.recentFiles); - groupBox1.Controls.Add(this.labelRecentFiles); - groupBox1.Controls.Add(this.label25); - groupBox1.Controls.Add(this.vertexScaleLabel); - groupBox1.Controls.Add(this.label22); - groupBox1.Controls.Add(this.vertexScale); - groupBox1.Controls.Add(this.cbSynchCameras); - groupBox1.Controls.Add(this.showtexturesizes); - groupBox1.Controls.Add(this.scriptontop); - groupBox1.Controls.Add(this.zoomfactor); - groupBox1.Controls.Add(this.zoomfactorlabel); - groupBox1.Controls.Add(this.label19); - groupBox1.Controls.Add(this.autoscrollspeed); - groupBox1.Controls.Add(this.autoscrollspeedlabel); - groupBox1.Controls.Add(this.label15); - groupBox1.Controls.Add(this.previewsize); - groupBox1.Controls.Add(this.previewsizelabel); - groupBox1.Controls.Add(this.label12); - groupBox1.Controls.Add(this.label14); - groupBox1.Controls.Add(this.defaultviewmode); - groupBox1.Location = new System.Drawing.Point(8, 8); - groupBox1.Name = "groupBox1"; - groupBox1.Size = new System.Drawing.Size(331, 465); - groupBox1.TabIndex = 0; - groupBox1.TabStop = false; - groupBox1.Text = " Options "; - // - // keepfilterfocused - // - this.keepfilterfocused.AutoSize = true; - this.keepfilterfocused.Location = new System.Drawing.Point(32, 356); - this.keepfilterfocused.Name = "keepfilterfocused"; - this.keepfilterfocused.Size = new System.Drawing.Size(280, 17); - this.keepfilterfocused.TabIndex = 52; - this.keepfilterfocused.Text = "Keep Filter input focused when image browser is open"; - this.toolTip1.SetToolTip(this.keepfilterfocused, "When enabled, all key presses in \r\nimage browsers will be redirected \r\nto the Fil" + + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.Label label7; + System.Windows.Forms.Label label5; + System.Windows.Forms.GroupBox groupBox1; + System.Windows.Forms.Label label1; + System.Windows.Forms.Label label18; + System.Windows.Forms.Label label29; + System.Windows.Forms.Label label30; + System.Windows.Forms.Label label31; + System.Windows.Forms.Label label32; + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PreferencesForm)); + this.keepfilterfocused = new System.Windows.Forms.CheckBox(); + this.maxBackups = new System.Windows.Forms.TrackBar(); + this.labelBackups = new System.Windows.Forms.Label(); + this.label27 = new System.Windows.Forms.Label(); + this.cbStoreEditTab = new System.Windows.Forms.CheckBox(); + this.locatetexturegroup = new System.Windows.Forms.CheckBox(); + this.recentFiles = new System.Windows.Forms.TrackBar(); + this.labelRecentFiles = new System.Windows.Forms.Label(); + this.label25 = new System.Windows.Forms.Label(); + this.vertexScaleLabel = new System.Windows.Forms.Label(); + this.label22 = new System.Windows.Forms.Label(); + this.vertexScale = new System.Windows.Forms.TrackBar(); + this.cbSynchCameras = new System.Windows.Forms.CheckBox(); + this.showtexturesizes = new System.Windows.Forms.CheckBox(); + this.scriptontop = new System.Windows.Forms.CheckBox(); + this.zoomfactor = new System.Windows.Forms.TrackBar(); + this.zoomfactorlabel = new System.Windows.Forms.Label(); + this.label19 = new System.Windows.Forms.Label(); + this.autoscrollspeed = new System.Windows.Forms.TrackBar(); + this.autoscrollspeedlabel = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.previewsize = new System.Windows.Forms.TrackBar(); + this.previewsizelabel = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); + this.defaultviewmode = new System.Windows.Forms.ComboBox(); + this.keyusedlabel = new System.Windows.Forms.Label(); + this.colorsgroup1 = new System.Windows.Forms.GroupBox(); + this.label2 = new System.Windows.Forms.Label(); + this.color3dFloors = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorInfo = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorMD3 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.doublesidedalpha = new System.Windows.Forms.TrackBar(); + this.colorgrid64 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorgrid = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorindication = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorbackcolor = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.doublesidedalphalabel = new System.Windows.Forms.Label(); + this.colorselection = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorvertices = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorhighlight = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorlinedefs = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorguidelines = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.cbStretchView = new System.Windows.Forms.CheckBox(); + this.qualitydisplay = new System.Windows.Forms.CheckBox(); + this.cancel = new System.Windows.Forms.Button(); + this.apply = new System.Windows.Forms.Button(); + this.tabs = new System.Windows.Forms.TabControl(); + this.tabinterface = new System.Windows.Forms.TabPage(); + this.groupBox11 = new System.Windows.Forms.GroupBox(); + this.textlabelfontname = new System.Windows.Forms.ComboBox(); + this.textlabelfontbold = new System.Windows.Forms.CheckBox(); + this.label33 = new System.Windows.Forms.Label(); + this.label34 = new System.Windows.Forms.Label(); + this.textlabelfontsize = new System.Windows.Forms.ComboBox(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.resetscreenshotsdir = new System.Windows.Forms.Button(); + this.browsescreenshotsdir = new System.Windows.Forms.Button(); + this.screenshotsfolderpath = new System.Windows.Forms.TextBox(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.toolbar_gzdoom = new System.Windows.Forms.CheckBox(); + this.toolbar_file = new System.Windows.Forms.CheckBox(); + this.toolbar_testing = new System.Windows.Forms.CheckBox(); + this.toolbar_geometry = new System.Windows.Forms.CheckBox(); + this.toolbar_viewmodes = new System.Windows.Forms.CheckBox(); + this.toolbar_filter = new System.Windows.Forms.CheckBox(); + this.toolbar_prefabs = new System.Windows.Forms.CheckBox(); + this.toolbar_copy = new System.Windows.Forms.CheckBox(); + this.toolbar_undo = new System.Windows.Forms.CheckBox(); + this.toolbar_script = new System.Windows.Forms.CheckBox(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.collapsedockers = new System.Windows.Forms.CheckBox(); + this.dockersposition = new System.Windows.Forms.ComboBox(); + this.label17 = new System.Windows.Forms.Label(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.vertexScale3D = new System.Windows.Forms.TrackBar(); + this.vertexScale3DLabel = new System.Windows.Forms.Label(); + this.label26 = new System.Windows.Forms.Label(); + this.viewdistance = new System.Windows.Forms.TrackBar(); + this.movespeed = new System.Windows.Forms.TrackBar(); + this.mousespeed = new System.Windows.Forms.TrackBar(); + this.fieldofview = new System.Windows.Forms.TrackBar(); + this.viewdistancelabel = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.invertyaxis = new System.Windows.Forms.CheckBox(); + this.movespeedlabel = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.mousespeedlabel = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.fieldofviewlabel = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.tabkeys = new System.Windows.Forms.TabPage(); + this.bClearActionFilter = new System.Windows.Forms.Button(); + this.tbFilterActions = new System.Windows.Forms.TextBox(); + this.label24 = new System.Windows.Forms.Label(); + this.listactions = new System.Windows.Forms.ListView(); + this.columncontrolaction = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columncontrolkey = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.actioncontrolpanel = new System.Windows.Forms.GroupBox(); + this.actiondescription = new System.Windows.Forms.TextBox(); + this.keyusedlist = new System.Windows.Forms.ListBox(); + this.disregardshiftlabel = new System.Windows.Forms.Label(); + this.actioncontrol = new System.Windows.Forms.ComboBox(); + this.actiontitle = new System.Windows.Forms.Label(); + this.actioncontrolclear = new System.Windows.Forms.Button(); + this.actionkey = new System.Windows.Forms.TextBox(); + this.tabcolors = new System.Windows.Forms.TabPage(); + this.appearancegroup1 = new System.Windows.Forms.GroupBox(); + this.activethingsalphalabel = new System.Windows.Forms.Label(); + this.inactivethingsalphalabel = new System.Windows.Forms.Label(); + this.hiddenthingsalphalabel = new System.Windows.Forms.Label(); + this.hiddenthingsalpha = new System.Windows.Forms.TrackBar(); + this.inactivethingsalpha = new System.Windows.Forms.TrackBar(); + this.activethingsalpha = new System.Windows.Forms.TrackBar(); + this.labelDefaultThingSize = new System.Windows.Forms.Label(); + this.tbDefaultThingSize = new System.Windows.Forms.TrackBar(); + this.cbDrawThingsFixedSize = new System.Windows.Forms.CheckBox(); + this.cbDrawCrosshair = new System.Windows.Forms.CheckBox(); + this.cbDrawFullCrosshair = new System.Windows.Forms.CheckBox(); + this.capitalizetexturenames = new System.Windows.Forms.CheckBox(); + this.cbMarkExtraFloors = new System.Windows.Forms.CheckBox(); + this.cbOldHighlightMode = new System.Windows.Forms.CheckBox(); + this.labelDynLightCount = new System.Windows.Forms.Label(); + this.tbDynLightCount = new System.Windows.Forms.TrackBar(); + this.animatevisualselection = new System.Windows.Forms.CheckBox(); + this.blackbrowsers = new System.Windows.Forms.CheckBox(); + this.visualbilinear = new System.Windows.Forms.CheckBox(); + this.classicbilinear = new System.Windows.Forms.CheckBox(); + this.imagebrightnesslabel = new System.Windows.Forms.Label(); + this.imagebrightness = new System.Windows.Forms.TrackBar(); + this.nightsgroup = new System.Windows.Forms.GroupBox(); + this.nightscolormare8 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.nightscolormare7 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.nightscolormare6 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.nightscolormare5 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.nightscolormare4 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.nightscolormare3 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.nightscolormare2 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.nightscolormare1 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.label23 = new System.Windows.Forms.Label(); + this.nightscircleprecision = new System.Windows.Forms.TrackBar(); + this.nightscircleprecisionlabel = new System.Windows.Forms.Label(); + this.waypointcolor1 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.waypointcolor2 = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.tabscripteditor = new System.Windows.Forms.TabPage(); + this.groupBox9 = new System.Windows.Forms.GroupBox(); + this.scriptshowfolding = new System.Windows.Forms.CheckBox(); + this.scriptshowlinenumbers = new System.Windows.Forms.CheckBox(); + this.groupBox8 = new System.Windows.Forms.GroupBox(); + this.scriptautoshowautocompletion = new System.Windows.Forms.CheckBox(); + this.scriptautoclosebrackets = new System.Windows.Forms.CheckBox(); + this.scriptusetabs = new System.Windows.Forms.CheckBox(); + this.scriptallmanstyle = new System.Windows.Forms.CheckBox(); + this.label10 = new System.Windows.Forms.Label(); + this.scriptautoindent = new System.Windows.Forms.CheckBox(); + this.scripttabwidth = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.groupBox7 = new System.Windows.Forms.GroupBox(); + this.label3 = new System.Windows.Forms.Label(); + this.scriptfontname = new System.Windows.Forms.ComboBox(); + this.scriptfontbold = new System.Windows.Forms.CheckBox(); + this.label8 = new System.Windows.Forms.Label(); + this.scriptfontsize = new System.Windows.Forms.ComboBox(); + this.groupBox6 = new System.Windows.Forms.GroupBox(); + this.colorproperties = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.label28 = new System.Windows.Forms.Label(); + this.scriptcolorpresets = new System.Windows.Forms.ComboBox(); + this.colorfoldback = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorfoldfore = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorindicator = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorwhitespace = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorbracebad = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorbrace = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorselectionback = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorselectionfore = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorincludes = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorstrings = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorscriptbackground = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorplaintext = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorcomments = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorlinenumbers = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorkeywords = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorliterals = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.colorconstants = new CodeImp.DoomBuilder.Controls.ColorControl(); + this.previewgroup = new System.Windows.Forms.GroupBox(); + this.tabpasting = new System.Windows.Forms.TabPage(); + this.label16 = new System.Windows.Forms.Label(); + this.pasteoptions = new CodeImp.DoomBuilder.Controls.PasteOptionsControl(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.browseScreenshotsFolderDialog = new System.Windows.Forms.FolderBrowserDialog(); + label7 = new System.Windows.Forms.Label(); + label5 = new System.Windows.Forms.Label(); + groupBox1 = new System.Windows.Forms.GroupBox(); + label1 = new System.Windows.Forms.Label(); + label18 = new System.Windows.Forms.Label(); + label29 = new System.Windows.Forms.Label(); + label30 = new System.Windows.Forms.Label(); + label31 = new System.Windows.Forms.Label(); + label32 = new System.Windows.Forms.Label(); + groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.maxBackups)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.recentFiles)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.vertexScale)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.zoomfactor)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.autoscrollspeed)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.previewsize)).BeginInit(); + this.colorsgroup1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.doublesidedalpha)).BeginInit(); + this.tabs.SuspendLayout(); + this.tabinterface.SuspendLayout(); + this.groupBox11.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.groupBox5.SuspendLayout(); + this.groupBox4.SuspendLayout(); + this.groupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.vertexScale3D)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.viewdistance)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.movespeed)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.mousespeed)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.fieldofview)).BeginInit(); + this.tabkeys.SuspendLayout(); + this.actioncontrolpanel.SuspendLayout(); + this.tabcolors.SuspendLayout(); + this.appearancegroup1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.hiddenthingsalpha)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.inactivethingsalpha)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.activethingsalpha)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbDefaultThingSize)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbDynLightCount)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.imagebrightness)).BeginInit(); + this.nightsgroup.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nightscircleprecision)).BeginInit(); + this.tabscripteditor.SuspendLayout(); + this.groupBox9.SuspendLayout(); + this.groupBox8.SuspendLayout(); + this.groupBox7.SuspendLayout(); + this.groupBox6.SuspendLayout(); + this.tabpasting.SuspendLayout(); + this.SuspendLayout(); + // + // label7 + // + label7.AutoSize = true; + label7.Location = new System.Drawing.Point(20, 172); + label7.Name = "label7"; + label7.Size = new System.Drawing.Size(182, 13); + label7.TabIndex = 7; + label7.Text = "Or select a special input control here:"; + // + // label5 + // + label5.AutoSize = true; + label5.Location = new System.Drawing.Point(20, 122); + label5.Name = "label5"; + label5.Size = new System.Drawing.Size(195, 13); + label5.TabIndex = 4; + label5.Text = "Press the desired key combination here:"; + // + // groupBox1 + // + groupBox1.Controls.Add(this.keepfilterfocused); + groupBox1.Controls.Add(this.maxBackups); + groupBox1.Controls.Add(this.labelBackups); + groupBox1.Controls.Add(this.label27); + groupBox1.Controls.Add(this.cbStoreEditTab); + groupBox1.Controls.Add(this.locatetexturegroup); + groupBox1.Controls.Add(this.recentFiles); + groupBox1.Controls.Add(this.labelRecentFiles); + groupBox1.Controls.Add(this.label25); + groupBox1.Controls.Add(this.vertexScaleLabel); + groupBox1.Controls.Add(this.label22); + groupBox1.Controls.Add(this.vertexScale); + groupBox1.Controls.Add(this.cbSynchCameras); + groupBox1.Controls.Add(this.showtexturesizes); + groupBox1.Controls.Add(this.scriptontop); + groupBox1.Controls.Add(this.zoomfactor); + groupBox1.Controls.Add(this.zoomfactorlabel); + groupBox1.Controls.Add(this.label19); + groupBox1.Controls.Add(this.autoscrollspeed); + groupBox1.Controls.Add(this.autoscrollspeedlabel); + groupBox1.Controls.Add(this.label15); + groupBox1.Controls.Add(this.previewsize); + groupBox1.Controls.Add(this.previewsizelabel); + groupBox1.Controls.Add(this.label12); + groupBox1.Controls.Add(this.label14); + groupBox1.Controls.Add(this.defaultviewmode); + groupBox1.Location = new System.Drawing.Point(8, 8); + groupBox1.Name = "groupBox1"; + groupBox1.Size = new System.Drawing.Size(331, 465); + groupBox1.TabIndex = 0; + groupBox1.TabStop = false; + groupBox1.Text = " Options "; + // + // keepfilterfocused + // + this.keepfilterfocused.AutoSize = true; + this.keepfilterfocused.Location = new System.Drawing.Point(32, 356); + this.keepfilterfocused.Name = "keepfilterfocused"; + this.keepfilterfocused.Size = new System.Drawing.Size(280, 17); + this.keepfilterfocused.TabIndex = 52; + this.keepfilterfocused.Text = "Keep Filter input focused when image browser is open"; + this.toolTip1.SetToolTip(this.keepfilterfocused, "When enabled, all key presses in \r\nimage browsers will be redirected \r\nto the Fil" + "ter textbox."); - this.keepfilterfocused.UseVisualStyleBackColor = true; - // - // maxBackups - // - this.maxBackups.BackColor = System.Drawing.SystemColors.Window; - this.maxBackups.LargeChange = 1; - this.maxBackups.Location = new System.Drawing.Point(127, 280); - this.maxBackups.Maximum = 20; - this.maxBackups.Name = "maxBackups"; - this.maxBackups.Size = new System.Drawing.Size(116, 45); - this.maxBackups.TabIndex = 53; - this.maxBackups.TickStyle = System.Windows.Forms.TickStyle.Both; - this.maxBackups.Value = 3; - this.maxBackups.ValueChanged += new System.EventHandler(this.maxBackups_ValueChanged); - // - // labelBackups - // - this.labelBackups.AutoSize = true; - this.labelBackups.Location = new System.Drawing.Point(249, 292); - this.labelBackups.Name = "labelBackups"; - this.labelBackups.Size = new System.Drawing.Size(13, 13); - this.labelBackups.TabIndex = 55; - this.labelBackups.Text = "3"; - // - // label27 - // - this.label27.AutoSize = true; - this.label27.Location = new System.Drawing.Point(41, 294); - this.label27.Name = "label27"; - this.label27.Size = new System.Drawing.Size(77, 13); - this.label27.TabIndex = 54; - this.label27.Text = "Max. backups:"; - this.toolTip1.SetToolTip(this.label27, "Controls how many backups \r\nare made when a map is saved."); - // - // cbStoreEditTab - // - this.cbStoreEditTab.AutoSize = true; - this.cbStoreEditTab.Location = new System.Drawing.Point(32, 440); - this.cbStoreEditTab.Name = "cbStoreEditTab"; - this.cbStoreEditTab.Size = new System.Drawing.Size(203, 17); - this.cbStoreEditTab.TabIndex = 50; - this.cbStoreEditTab.Text = "Edit windows remember selected tabs"; - this.cbStoreEditTab.UseVisualStyleBackColor = true; - // - // locatetexturegroup - // - this.locatetexturegroup.AutoSize = true; - this.locatetexturegroup.Location = new System.Drawing.Point(32, 398); - this.locatetexturegroup.Name = "locatetexturegroup"; - this.locatetexturegroup.Size = new System.Drawing.Size(267, 17); - this.locatetexturegroup.TabIndex = 49; - this.locatetexturegroup.Text = "Select texture group when opening image browsers"; - this.toolTip1.SetToolTip(this.locatetexturegroup, "When enabled, the group current texture belongs to\r\nwill be selected when opening" + + this.keepfilterfocused.UseVisualStyleBackColor = true; + // + // maxBackups + // + this.maxBackups.BackColor = System.Drawing.SystemColors.Window; + this.maxBackups.LargeChange = 1; + this.maxBackups.Location = new System.Drawing.Point(127, 280); + this.maxBackups.Maximum = 20; + this.maxBackups.Name = "maxBackups"; + this.maxBackups.Size = new System.Drawing.Size(116, 45); + this.maxBackups.TabIndex = 53; + this.maxBackups.TickStyle = System.Windows.Forms.TickStyle.Both; + this.maxBackups.Value = 3; + this.maxBackups.ValueChanged += new System.EventHandler(this.maxBackups_ValueChanged); + // + // labelBackups + // + this.labelBackups.AutoSize = true; + this.labelBackups.Location = new System.Drawing.Point(249, 292); + this.labelBackups.Name = "labelBackups"; + this.labelBackups.Size = new System.Drawing.Size(13, 13); + this.labelBackups.TabIndex = 55; + this.labelBackups.Text = "3"; + // + // label27 + // + this.label27.AutoSize = true; + this.label27.Location = new System.Drawing.Point(41, 294); + this.label27.Name = "label27"; + this.label27.Size = new System.Drawing.Size(77, 13); + this.label27.TabIndex = 54; + this.label27.Text = "Max. backups:"; + this.toolTip1.SetToolTip(this.label27, "Controls how many backups \r\nare made when a map is saved."); + // + // cbStoreEditTab + // + this.cbStoreEditTab.AutoSize = true; + this.cbStoreEditTab.Location = new System.Drawing.Point(32, 440); + this.cbStoreEditTab.Name = "cbStoreEditTab"; + this.cbStoreEditTab.Size = new System.Drawing.Size(203, 17); + this.cbStoreEditTab.TabIndex = 50; + this.cbStoreEditTab.Text = "Edit windows remember selected tabs"; + this.cbStoreEditTab.UseVisualStyleBackColor = true; + // + // locatetexturegroup + // + this.locatetexturegroup.AutoSize = true; + this.locatetexturegroup.Location = new System.Drawing.Point(32, 398); + this.locatetexturegroup.Name = "locatetexturegroup"; + this.locatetexturegroup.Size = new System.Drawing.Size(267, 17); + this.locatetexturegroup.TabIndex = 49; + this.locatetexturegroup.Text = "Select texture group when opening image browsers"; + this.toolTip1.SetToolTip(this.locatetexturegroup, "When enabled, the group current texture belongs to\r\nwill be selected when opening" + " image browsers.\r\nWhen disabled, \"All\" texture group will be selected."); - this.locatetexturegroup.UseVisualStyleBackColor = true; - // - // recentFiles - // - this.recentFiles.BackColor = System.Drawing.SystemColors.Window; - this.recentFiles.LargeChange = 1; - this.recentFiles.Location = new System.Drawing.Point(127, 233); - this.recentFiles.Maximum = 25; - this.recentFiles.Minimum = 8; - this.recentFiles.Name = "recentFiles"; - this.recentFiles.Size = new System.Drawing.Size(116, 45); - this.recentFiles.TabIndex = 46; - this.recentFiles.TickStyle = System.Windows.Forms.TickStyle.Both; - this.recentFiles.Value = 8; - this.recentFiles.ValueChanged += new System.EventHandler(this.recentFiles_ValueChanged); - // - // labelRecentFiles - // - this.labelRecentFiles.AutoSize = true; - this.labelRecentFiles.Location = new System.Drawing.Point(249, 245); - this.labelRecentFiles.Name = "labelRecentFiles"; - this.labelRecentFiles.Size = new System.Drawing.Size(13, 13); - this.labelRecentFiles.TabIndex = 48; - this.labelRecentFiles.Text = "8"; - // - // label25 - // - this.label25.AutoSize = true; - this.label25.Location = new System.Drawing.Point(31, 246); - this.label25.Name = "label25"; - this.label25.Size = new System.Drawing.Size(87, 13); - this.label25.TabIndex = 47; - this.label25.Text = "Max. recent files:"; - this.toolTip1.SetToolTip(this.label25, "Controls how many recent files \r\nare shown in the \"File\" menu."); - // - // vertexScaleLabel - // - this.vertexScaleLabel.AutoSize = true; - this.vertexScaleLabel.Location = new System.Drawing.Point(249, 198); - this.vertexScaleLabel.Name = "vertexScaleLabel"; - this.vertexScaleLabel.Size = new System.Drawing.Size(74, 13); - this.vertexScaleLabel.TabIndex = 45; - this.vertexScaleLabel.Text = "100% (default)"; - // - // label22 - // - this.label22.AutoSize = true; - this.label22.Location = new System.Drawing.Point(26, 198); - this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(91, 13); - this.label22.TabIndex = 44; - this.label22.Text = "Vertex scale (2D):"; - this.toolTip1.SetToolTip(this.label22, "Sets the size of vertex handles\r\nin 2D modes"); - // - // vertexScale - // - this.vertexScale.BackColor = System.Drawing.SystemColors.Window; - this.vertexScale.LargeChange = 1; - this.vertexScale.Location = new System.Drawing.Point(127, 186); - this.vertexScale.Minimum = 1; - this.vertexScale.Name = "vertexScale"; - this.vertexScale.Size = new System.Drawing.Size(116, 45); - this.vertexScale.TabIndex = 43; - this.vertexScale.TickStyle = System.Windows.Forms.TickStyle.Both; - this.vertexScale.Value = 1; - this.vertexScale.ValueChanged += new System.EventHandler(this.vertexScale_ValueChanged); - // - // cbSynchCameras - // - this.cbSynchCameras.AutoSize = true; - this.cbSynchCameras.Location = new System.Drawing.Point(32, 419); - this.cbSynchCameras.Name = "cbSynchCameras"; - this.cbSynchCameras.Size = new System.Drawing.Size(260, 17); - this.cbSynchCameras.TabIndex = 42; - this.cbSynchCameras.Text = "Sync camera position between 2D and 3D modes"; - this.cbSynchCameras.UseVisualStyleBackColor = true; - // - // showtexturesizes - // - this.showtexturesizes.AutoSize = true; - this.showtexturesizes.Location = new System.Drawing.Point(32, 377); - this.showtexturesizes.Name = "showtexturesizes"; - this.showtexturesizes.Size = new System.Drawing.Size(208, 17); - this.showtexturesizes.TabIndex = 41; - this.showtexturesizes.Text = "Show texture and flat sizes in browsers"; - this.showtexturesizes.UseVisualStyleBackColor = true; - // - // scriptontop - // - this.scriptontop.AutoSize = true; - this.scriptontop.Location = new System.Drawing.Point(32, 335); - this.scriptontop.Name = "scriptontop"; - this.scriptontop.Size = new System.Drawing.Size(227, 17); - this.scriptontop.TabIndex = 40; - this.scriptontop.Text = "Script Editor always on top of main window"; - this.scriptontop.UseVisualStyleBackColor = true; - // - // zoomfactor - // - this.zoomfactor.BackColor = System.Drawing.SystemColors.Window; - this.zoomfactor.LargeChange = 1; - this.zoomfactor.Location = new System.Drawing.Point(127, 139); - this.zoomfactor.Minimum = 1; - this.zoomfactor.Name = "zoomfactor"; - this.zoomfactor.Size = new System.Drawing.Size(116, 45); - this.zoomfactor.TabIndex = 37; - this.zoomfactor.TickStyle = System.Windows.Forms.TickStyle.Both; - this.zoomfactor.Value = 3; - this.zoomfactor.ValueChanged += new System.EventHandler(this.zoomfactor_ValueChanged); - // - // zoomfactorlabel - // - this.zoomfactorlabel.AutoSize = true; - this.zoomfactorlabel.Location = new System.Drawing.Point(249, 151); - this.zoomfactorlabel.Name = "zoomfactorlabel"; - this.zoomfactorlabel.Size = new System.Drawing.Size(27, 13); - this.zoomfactorlabel.TabIndex = 39; - this.zoomfactorlabel.Text = "30%"; - // - // label19 - // - this.label19.AutoSize = true; - this.label19.Location = new System.Drawing.Point(52, 151); - this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(67, 13); - this.label19.TabIndex = 38; - this.label19.Text = "Zoom factor:"; - // - // autoscrollspeed - // - this.autoscrollspeed.BackColor = System.Drawing.SystemColors.Window; - this.autoscrollspeed.LargeChange = 1; - this.autoscrollspeed.Location = new System.Drawing.Point(127, 92); - this.autoscrollspeed.Maximum = 5; - this.autoscrollspeed.Name = "autoscrollspeed"; - this.autoscrollspeed.Size = new System.Drawing.Size(116, 45); - this.autoscrollspeed.TabIndex = 2; - this.autoscrollspeed.TickStyle = System.Windows.Forms.TickStyle.Both; - this.autoscrollspeed.ValueChanged += new System.EventHandler(this.autoscrollspeed_ValueChanged); - // - // autoscrollspeedlabel - // - this.autoscrollspeedlabel.AutoSize = true; - this.autoscrollspeedlabel.Location = new System.Drawing.Point(249, 104); - this.autoscrollspeedlabel.Name = "autoscrollspeedlabel"; - this.autoscrollspeedlabel.Size = new System.Drawing.Size(21, 13); - this.autoscrollspeedlabel.TabIndex = 36; - this.autoscrollspeedlabel.Text = "Off"; - // - // label15 - // - this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(29, 104); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(88, 13); - this.label15.TabIndex = 35; - this.label15.Text = "Autoscroll speed:"; - // - // previewsize - // - this.previewsize.BackColor = System.Drawing.SystemColors.Window; - this.previewsize.LargeChange = 1; - this.previewsize.Location = new System.Drawing.Point(127, 45); - this.previewsize.Maximum = 5; - this.previewsize.Name = "previewsize"; - this.previewsize.Size = new System.Drawing.Size(116, 45); - this.previewsize.TabIndex = 1; - this.previewsize.TickStyle = System.Windows.Forms.TickStyle.Both; - this.previewsize.Value = 5; - this.previewsize.ValueChanged += new System.EventHandler(this.previewsize_ValueChanged); - // - // previewsizelabel - // - this.previewsizelabel.AutoSize = true; - this.previewsizelabel.Location = new System.Drawing.Point(249, 57); - this.previewsizelabel.Name = "previewsizelabel"; - this.previewsizelabel.Size = new System.Drawing.Size(54, 13); - this.previewsizelabel.TabIndex = 33; - this.previewsizelabel.Text = "128 x 128"; - // - // label12 - // - this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(17, 57); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(100, 13); - this.label12.TabIndex = 32; - this.label12.Text = "Preview image size:"; - // - // label14 - // - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(50, 20); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(69, 13); - this.label14.TabIndex = 14; - this.label14.Text = "Default view:"; - // - // defaultviewmode - // - this.defaultviewmode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.defaultviewmode.FormattingEnabled = true; - this.defaultviewmode.Items.AddRange(new object[] { + this.locatetexturegroup.UseVisualStyleBackColor = true; + // + // recentFiles + // + this.recentFiles.BackColor = System.Drawing.SystemColors.Window; + this.recentFiles.LargeChange = 1; + this.recentFiles.Location = new System.Drawing.Point(127, 233); + this.recentFiles.Maximum = 25; + this.recentFiles.Minimum = 8; + this.recentFiles.Name = "recentFiles"; + this.recentFiles.Size = new System.Drawing.Size(116, 45); + this.recentFiles.TabIndex = 46; + this.recentFiles.TickStyle = System.Windows.Forms.TickStyle.Both; + this.recentFiles.Value = 8; + this.recentFiles.ValueChanged += new System.EventHandler(this.recentFiles_ValueChanged); + // + // labelRecentFiles + // + this.labelRecentFiles.AutoSize = true; + this.labelRecentFiles.Location = new System.Drawing.Point(249, 245); + this.labelRecentFiles.Name = "labelRecentFiles"; + this.labelRecentFiles.Size = new System.Drawing.Size(13, 13); + this.labelRecentFiles.TabIndex = 48; + this.labelRecentFiles.Text = "8"; + // + // label25 + // + this.label25.AutoSize = true; + this.label25.Location = new System.Drawing.Point(31, 246); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(87, 13); + this.label25.TabIndex = 47; + this.label25.Text = "Max. recent files:"; + this.toolTip1.SetToolTip(this.label25, "Controls how many recent files \r\nare shown in the \"File\" menu."); + // + // vertexScaleLabel + // + this.vertexScaleLabel.AutoSize = true; + this.vertexScaleLabel.Location = new System.Drawing.Point(249, 198); + this.vertexScaleLabel.Name = "vertexScaleLabel"; + this.vertexScaleLabel.Size = new System.Drawing.Size(74, 13); + this.vertexScaleLabel.TabIndex = 45; + this.vertexScaleLabel.Text = "100% (default)"; + // + // label22 + // + this.label22.AutoSize = true; + this.label22.Location = new System.Drawing.Point(26, 198); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(91, 13); + this.label22.TabIndex = 44; + this.label22.Text = "Vertex scale (2D):"; + this.toolTip1.SetToolTip(this.label22, "Sets the size of vertex handles\r\nin 2D modes"); + // + // vertexScale + // + this.vertexScale.BackColor = System.Drawing.SystemColors.Window; + this.vertexScale.LargeChange = 1; + this.vertexScale.Location = new System.Drawing.Point(127, 186); + this.vertexScale.Minimum = 1; + this.vertexScale.Name = "vertexScale"; + this.vertexScale.Size = new System.Drawing.Size(116, 45); + this.vertexScale.TabIndex = 43; + this.vertexScale.TickStyle = System.Windows.Forms.TickStyle.Both; + this.vertexScale.Value = 1; + this.vertexScale.ValueChanged += new System.EventHandler(this.vertexScale_ValueChanged); + // + // cbSynchCameras + // + this.cbSynchCameras.AutoSize = true; + this.cbSynchCameras.Location = new System.Drawing.Point(32, 419); + this.cbSynchCameras.Name = "cbSynchCameras"; + this.cbSynchCameras.Size = new System.Drawing.Size(260, 17); + this.cbSynchCameras.TabIndex = 42; + this.cbSynchCameras.Text = "Sync camera position between 2D and 3D modes"; + this.cbSynchCameras.UseVisualStyleBackColor = true; + // + // showtexturesizes + // + this.showtexturesizes.AutoSize = true; + this.showtexturesizes.Location = new System.Drawing.Point(32, 377); + this.showtexturesizes.Name = "showtexturesizes"; + this.showtexturesizes.Size = new System.Drawing.Size(208, 17); + this.showtexturesizes.TabIndex = 41; + this.showtexturesizes.Text = "Show texture and flat sizes in browsers"; + this.showtexturesizes.UseVisualStyleBackColor = true; + // + // scriptontop + // + this.scriptontop.AutoSize = true; + this.scriptontop.Location = new System.Drawing.Point(32, 335); + this.scriptontop.Name = "scriptontop"; + this.scriptontop.Size = new System.Drawing.Size(227, 17); + this.scriptontop.TabIndex = 40; + this.scriptontop.Text = "Script Editor always on top of main window"; + this.scriptontop.UseVisualStyleBackColor = true; + // + // zoomfactor + // + this.zoomfactor.BackColor = System.Drawing.SystemColors.Window; + this.zoomfactor.LargeChange = 1; + this.zoomfactor.Location = new System.Drawing.Point(127, 139); + this.zoomfactor.Minimum = 1; + this.zoomfactor.Name = "zoomfactor"; + this.zoomfactor.Size = new System.Drawing.Size(116, 45); + this.zoomfactor.TabIndex = 37; + this.zoomfactor.TickStyle = System.Windows.Forms.TickStyle.Both; + this.zoomfactor.Value = 3; + this.zoomfactor.ValueChanged += new System.EventHandler(this.zoomfactor_ValueChanged); + // + // zoomfactorlabel + // + this.zoomfactorlabel.AutoSize = true; + this.zoomfactorlabel.Location = new System.Drawing.Point(249, 151); + this.zoomfactorlabel.Name = "zoomfactorlabel"; + this.zoomfactorlabel.Size = new System.Drawing.Size(27, 13); + this.zoomfactorlabel.TabIndex = 39; + this.zoomfactorlabel.Text = "30%"; + // + // label19 + // + this.label19.AutoSize = true; + this.label19.Location = new System.Drawing.Point(52, 151); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(67, 13); + this.label19.TabIndex = 38; + this.label19.Text = "Zoom factor:"; + // + // autoscrollspeed + // + this.autoscrollspeed.BackColor = System.Drawing.SystemColors.Window; + this.autoscrollspeed.LargeChange = 1; + this.autoscrollspeed.Location = new System.Drawing.Point(127, 92); + this.autoscrollspeed.Maximum = 5; + this.autoscrollspeed.Name = "autoscrollspeed"; + this.autoscrollspeed.Size = new System.Drawing.Size(116, 45); + this.autoscrollspeed.TabIndex = 2; + this.autoscrollspeed.TickStyle = System.Windows.Forms.TickStyle.Both; + this.autoscrollspeed.ValueChanged += new System.EventHandler(this.autoscrollspeed_ValueChanged); + // + // autoscrollspeedlabel + // + this.autoscrollspeedlabel.AutoSize = true; + this.autoscrollspeedlabel.Location = new System.Drawing.Point(249, 104); + this.autoscrollspeedlabel.Name = "autoscrollspeedlabel"; + this.autoscrollspeedlabel.Size = new System.Drawing.Size(21, 13); + this.autoscrollspeedlabel.TabIndex = 36; + this.autoscrollspeedlabel.Text = "Off"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(29, 104); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(88, 13); + this.label15.TabIndex = 35; + this.label15.Text = "Autoscroll speed:"; + // + // previewsize + // + this.previewsize.BackColor = System.Drawing.SystemColors.Window; + this.previewsize.LargeChange = 1; + this.previewsize.Location = new System.Drawing.Point(127, 45); + this.previewsize.Maximum = 5; + this.previewsize.Name = "previewsize"; + this.previewsize.Size = new System.Drawing.Size(116, 45); + this.previewsize.TabIndex = 1; + this.previewsize.TickStyle = System.Windows.Forms.TickStyle.Both; + this.previewsize.Value = 5; + this.previewsize.ValueChanged += new System.EventHandler(this.previewsize_ValueChanged); + // + // previewsizelabel + // + this.previewsizelabel.AutoSize = true; + this.previewsizelabel.Location = new System.Drawing.Point(249, 57); + this.previewsizelabel.Name = "previewsizelabel"; + this.previewsizelabel.Size = new System.Drawing.Size(54, 13); + this.previewsizelabel.TabIndex = 33; + this.previewsizelabel.Text = "128 x 128"; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(17, 57); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(100, 13); + this.label12.TabIndex = 32; + this.label12.Text = "Preview image size:"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(50, 20); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(69, 13); + this.label14.TabIndex = 14; + this.label14.Text = "Default view:"; + // + // defaultviewmode + // + this.defaultviewmode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.defaultviewmode.FormattingEnabled = true; + this.defaultviewmode.Items.AddRange(new object[] { "Wireframe", "Brightness Levels", "Floor Textures", "Ceiling Textures"}); - this.defaultviewmode.Location = new System.Drawing.Point(135, 17); - this.defaultviewmode.Name = "defaultviewmode"; - this.defaultviewmode.Size = new System.Drawing.Size(145, 21); - this.defaultviewmode.TabIndex = 0; - // - // label1 - // - label1.AutoSize = true; - label1.Location = new System.Drawing.Point(28, 29); - label1.Name = "label1"; - label1.Size = new System.Drawing.Size(135, 13); - label1.TabIndex = 20; - label1.Text = "Texture and flat brightness:"; - label1.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // label18 - // - label18.AutoSize = true; - label18.Location = new System.Drawing.Point(22, 63); - label18.Name = "label18"; - label18.Size = new System.Drawing.Size(147, 13); - label18.TabIndex = 25; - label18.Text = "Max. dynamic lights to render:"; - label18.TextAlign = System.Drawing.ContentAlignment.TopRight; - this.toolTip1.SetToolTip(label18, "Controlls how many dynamic lights could be \r\nrendered simultaneously in Visual mo" + + this.defaultviewmode.Location = new System.Drawing.Point(135, 17); + this.defaultviewmode.Name = "defaultviewmode"; + this.defaultviewmode.Size = new System.Drawing.Size(145, 21); + this.defaultviewmode.TabIndex = 0; + // + // label1 + // + label1.AutoSize = true; + label1.Location = new System.Drawing.Point(46, 64); + label1.Name = "label1"; + label1.Size = new System.Drawing.Size(140, 13); + label1.TabIndex = 20; + label1.Text = "Texture and flats brightness:"; + label1.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // label18 + // + label18.AutoSize = true; + label18.Enabled = false; + label18.Location = new System.Drawing.Point(41, 230); + label18.Name = "label18"; + label18.Size = new System.Drawing.Size(147, 13); + label18.TabIndex = 25; + label18.Text = "Max. dynamic lights to render:"; + label18.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.toolTip1.SetToolTip(label18, "Controlls how many dynamic lights could be \r\nrendered simultaneously in Visual mo" + "de "); - // - // label20 - // - label20.AutoSize = true; - label20.Location = new System.Drawing.Point(76, 97); - label20.Name = "label20"; - label20.Size = new System.Drawing.Size(94, 13); - label20.TabIndex = 28; - label20.Text = "Dynamic light size:"; - label20.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // label21 - // - label21.AutoSize = true; - label21.Location = new System.Drawing.Point(55, 131); - label21.Name = "label21"; - label21.Size = new System.Drawing.Size(114, 13); - label21.TabIndex = 31; - label21.Text = "Dynamic light intensity:"; - label21.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // label29 - // - label29.AutoSize = true; - label29.Location = new System.Drawing.Point(51, 161); - label29.Name = "label29"; - label29.Size = new System.Drawing.Size(118, 13); - label29.TabIndex = 41; - label29.Text = "Default Thing size (2D):"; - label29.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // keyusedlabel - // - this.keyusedlabel.AutoSize = true; - this.keyusedlabel.Location = new System.Drawing.Point(20, 287); - this.keyusedlabel.Name = "keyusedlabel"; - this.keyusedlabel.Size = new System.Drawing.Size(216, 13); - this.keyusedlabel.TabIndex = 10; - this.keyusedlabel.Text = "Key combination also used by these actions:"; - this.keyusedlabel.Visible = false; - // - // colorsgroup1 - // - this.colorsgroup1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + label18.Visible = false; + // + // label29 + // + label29.AutoSize = true; + label29.Location = new System.Drawing.Point(68, 98); + label29.Name = "label29"; + label29.Size = new System.Drawing.Size(118, 13); + label29.TabIndex = 41; + label29.Text = "Default Thing size (2D):"; + label29.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // label30 + // + label30.AutoSize = true; + label30.Location = new System.Drawing.Point(13, 166); + label30.Name = "label30"; + label30.Size = new System.Drawing.Size(173, 13); + label30.TabIndex = 45; + label30.Text = "Things transparency (other modes):"; + label30.TextAlign = System.Drawing.ContentAlignment.TopRight; + label30.Click += new System.EventHandler(this.label30_Click); + // + // label31 + // + label31.AutoSize = true; + label31.Location = new System.Drawing.Point(47, 200); + label31.Name = "label31"; + label31.Size = new System.Drawing.Size(139, 13); + label31.TabIndex = 46; + label31.Text = "Hidden things transparency:"; + label31.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // label32 + // + label32.AutoSize = true; + label32.Location = new System.Drawing.Point(10, 132); + label32.Name = "label32"; + label32.Size = new System.Drawing.Size(176, 13); + label32.TabIndex = 49; + label32.Text = "Things transparency (Things mode):"; + label32.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // keyusedlabel + // + this.keyusedlabel.AutoSize = true; + this.keyusedlabel.Location = new System.Drawing.Point(20, 287); + this.keyusedlabel.Name = "keyusedlabel"; + this.keyusedlabel.Size = new System.Drawing.Size(216, 13); + this.keyusedlabel.TabIndex = 10; + this.keyusedlabel.Text = "Key combination also used by these actions:"; + this.keyusedlabel.Visible = false; + // + // colorsgroup1 + // + this.colorsgroup1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left))); - this.colorsgroup1.Controls.Add(this.color3dFloors); - this.colorsgroup1.Controls.Add(this.colorInfo); - this.colorsgroup1.Controls.Add(this.colorMD3); - this.colorsgroup1.Controls.Add(this.doublesidedalpha); - this.colorsgroup1.Controls.Add(this.colorgrid64); - this.colorsgroup1.Controls.Add(this.colorgrid); - this.colorsgroup1.Controls.Add(this.colorindication); - this.colorsgroup1.Controls.Add(this.colorbackcolor); - this.colorsgroup1.Controls.Add(this.label2); - this.colorsgroup1.Controls.Add(this.doublesidedalphalabel); - this.colorsgroup1.Controls.Add(this.colorselection); - this.colorsgroup1.Controls.Add(this.colorvertices); - this.colorsgroup1.Controls.Add(this.colorhighlight); - this.colorsgroup1.Controls.Add(this.colorlinedefs); - this.colorsgroup1.Location = new System.Drawing.Point(8, 8); - this.colorsgroup1.Name = "colorsgroup1"; - this.colorsgroup1.Size = new System.Drawing.Size(203, 388); - this.colorsgroup1.TabIndex = 0; - this.colorsgroup1.TabStop = false; - this.colorsgroup1.Text = " Display "; - this.colorsgroup1.Visible = false; - // - // color3dFloors - // - this.color3dFloors.BackColor = System.Drawing.Color.Transparent; - this.color3dFloors.Label = "3D Floors:"; - this.color3dFloors.Location = new System.Drawing.Point(15, 287); - this.color3dFloors.MaximumSize = new System.Drawing.Size(10000, 23); - this.color3dFloors.MinimumSize = new System.Drawing.Size(100, 23); - this.color3dFloors.Name = "color3dFloors"; - this.color3dFloors.Size = new System.Drawing.Size(168, 23); - this.color3dFloors.TabIndex = 24; - // - // colorInfo - // - this.colorInfo.BackColor = System.Drawing.Color.Transparent; - this.colorInfo.Label = "Event lines:"; - this.colorInfo.Location = new System.Drawing.Point(15, 260); - this.colorInfo.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorInfo.MinimumSize = new System.Drawing.Size(100, 23); - this.colorInfo.Name = "colorInfo"; - this.colorInfo.Size = new System.Drawing.Size(168, 23); - this.colorInfo.TabIndex = 19; - // - // colorMD3 - // - this.colorMD3.BackColor = System.Drawing.Color.Transparent; - this.colorMD3.Label = "Model wireframe:"; - this.colorMD3.Location = new System.Drawing.Point(15, 233); - this.colorMD3.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorMD3.MinimumSize = new System.Drawing.Size(100, 23); - this.colorMD3.Name = "colorMD3"; - this.colorMD3.Size = new System.Drawing.Size(168, 23); - this.colorMD3.TabIndex = 17; - // - // doublesidedalpha - // - this.doublesidedalpha.BackColor = System.Drawing.SystemColors.Window; - this.doublesidedalpha.LargeChange = 3; - this.doublesidedalpha.Location = new System.Drawing.Point(11, 341); - this.doublesidedalpha.Name = "doublesidedalpha"; - this.doublesidedalpha.Size = new System.Drawing.Size(130, 45); - this.doublesidedalpha.TabIndex = 2; - this.doublesidedalpha.TickStyle = System.Windows.Forms.TickStyle.TopLeft; - this.doublesidedalpha.ValueChanged += new System.EventHandler(this.doublesidedalpha_ValueChanged); - // - // colorgrid64 - // - this.colorgrid64.BackColor = System.Drawing.Color.Transparent; - this.colorgrid64.Label = "64 Block grid:"; - this.colorgrid64.Location = new System.Drawing.Point(15, 206); - this.colorgrid64.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorgrid64.MinimumSize = new System.Drawing.Size(100, 23); - this.colorgrid64.Name = "colorgrid64"; - this.colorgrid64.Size = new System.Drawing.Size(168, 23); - this.colorgrid64.TabIndex = 9; - // - // colorgrid - // - this.colorgrid.BackColor = System.Drawing.Color.Transparent; - this.colorgrid.Label = "Custom grid:"; - this.colorgrid.Location = new System.Drawing.Point(15, 179); - this.colorgrid.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorgrid.MinimumSize = new System.Drawing.Size(100, 23); - this.colorgrid.Name = "colorgrid"; - this.colorgrid.Size = new System.Drawing.Size(168, 23); - this.colorgrid.TabIndex = 8; - // - // colorindication - // - this.colorindication.BackColor = System.Drawing.Color.Transparent; - this.colorindication.Label = "Indications:"; - this.colorindication.Location = new System.Drawing.Point(15, 152); - this.colorindication.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorindication.MinimumSize = new System.Drawing.Size(100, 23); - this.colorindication.Name = "colorindication"; - this.colorindication.Size = new System.Drawing.Size(168, 23); - this.colorindication.TabIndex = 7; - // - // colorbackcolor - // - this.colorbackcolor.BackColor = System.Drawing.Color.Transparent; - this.colorbackcolor.Label = "Background:"; - this.colorbackcolor.Location = new System.Drawing.Point(15, 17); - this.colorbackcolor.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorbackcolor.MinimumSize = new System.Drawing.Size(100, 23); - this.colorbackcolor.Name = "colorbackcolor"; - this.colorbackcolor.Size = new System.Drawing.Size(168, 23); - this.colorbackcolor.TabIndex = 0; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(14, 324); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(141, 13); - this.label2.TabIndex = 14; - this.label2.Text = "Passable lines transparency:"; - this.label2.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // doublesidedalphalabel - // - this.doublesidedalphalabel.AutoSize = true; - this.doublesidedalphalabel.Location = new System.Drawing.Point(147, 353); - this.doublesidedalphalabel.Name = "doublesidedalphalabel"; - this.doublesidedalphalabel.Size = new System.Drawing.Size(21, 13); - this.doublesidedalphalabel.TabIndex = 16; - this.doublesidedalphalabel.Text = "0%"; - // - // colorselection - // - this.colorselection.BackColor = System.Drawing.Color.Transparent; - this.colorselection.Label = "Selection:"; - this.colorselection.Location = new System.Drawing.Point(15, 125); - this.colorselection.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorselection.MinimumSize = new System.Drawing.Size(100, 23); - this.colorselection.Name = "colorselection"; - this.colorselection.Size = new System.Drawing.Size(168, 23); - this.colorselection.TabIndex = 6; - // - // colorvertices - // - this.colorvertices.BackColor = System.Drawing.Color.Transparent; - this.colorvertices.Label = "Vertices:"; - this.colorvertices.Location = new System.Drawing.Point(15, 44); - this.colorvertices.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorvertices.MinimumSize = new System.Drawing.Size(100, 23); - this.colorvertices.Name = "colorvertices"; - this.colorvertices.Size = new System.Drawing.Size(168, 23); - this.colorvertices.TabIndex = 1; - // - // colorhighlight - // - this.colorhighlight.BackColor = System.Drawing.Color.Transparent; - this.colorhighlight.Label = "Highlight:"; - this.colorhighlight.Location = new System.Drawing.Point(15, 98); - this.colorhighlight.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorhighlight.MinimumSize = new System.Drawing.Size(100, 23); - this.colorhighlight.Name = "colorhighlight"; - this.colorhighlight.Size = new System.Drawing.Size(168, 23); - this.colorhighlight.TabIndex = 5; - // - // colorlinedefs - // - this.colorlinedefs.BackColor = System.Drawing.Color.Transparent; - this.colorlinedefs.Label = "Common lines:"; - this.colorlinedefs.Location = new System.Drawing.Point(15, 71); - this.colorlinedefs.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorlinedefs.MinimumSize = new System.Drawing.Size(100, 23); - this.colorlinedefs.Name = "colorlinedefs"; - this.colorlinedefs.Size = new System.Drawing.Size(168, 23); - this.colorlinedefs.TabIndex = 2; - // - // cbStretchView - // - this.cbStretchView.AutoSize = true; - this.cbStretchView.Location = new System.Drawing.Point(25, 311); - this.cbStretchView.Name = "cbStretchView"; - this.cbStretchView.Size = new System.Drawing.Size(172, 17); - this.cbStretchView.TabIndex = 18; - this.cbStretchView.Text = "Stretched view in visual modes"; - this.toolTip1.SetToolTip(this.cbStretchView, "When enabled, visual mode will emulate \r\n(G)ZDoom\'s way of rendering by increasin" + + this.colorsgroup1.Controls.Add(this.color3dFloors); + this.colorsgroup1.Controls.Add(this.colorInfo); + this.colorsgroup1.Controls.Add(this.colorMD3); + this.colorsgroup1.Controls.Add(this.colorgrid64); + this.colorsgroup1.Controls.Add(this.colorgrid); + this.colorsgroup1.Controls.Add(this.colorindication); + this.colorsgroup1.Controls.Add(this.colorbackcolor); + this.colorsgroup1.Controls.Add(this.colorselection); + this.colorsgroup1.Controls.Add(this.colorvertices); + this.colorsgroup1.Controls.Add(this.colorhighlight); + this.colorsgroup1.Controls.Add(this.colorlinedefs); + this.colorsgroup1.Controls.Add(this.colorguidelines); + this.colorsgroup1.Location = new System.Drawing.Point(8, 8); + this.colorsgroup1.Name = "colorsgroup1"; + this.colorsgroup1.Size = new System.Drawing.Size(203, 388); + this.colorsgroup1.TabIndex = 0; + this.colorsgroup1.TabStop = false; + this.colorsgroup1.Text = " Display "; + this.colorsgroup1.Visible = false; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(45, 32); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(141, 13); + this.label2.TabIndex = 14; + this.label2.Text = "Passable lines transparency:"; + this.label2.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // color3dFloors + // + this.color3dFloors.BackColor = System.Drawing.Color.Transparent; + this.color3dFloors.Label = "3D Floors:"; + this.color3dFloors.Location = new System.Drawing.Point(15, 287); + this.color3dFloors.MaximumSize = new System.Drawing.Size(10000, 23); + this.color3dFloors.MinimumSize = new System.Drawing.Size(100, 23); + this.color3dFloors.Name = "color3dFloors"; + this.color3dFloors.Size = new System.Drawing.Size(168, 23); + this.color3dFloors.TabIndex = 24; + // + // colorInfo + // + this.colorInfo.BackColor = System.Drawing.Color.Transparent; + this.colorInfo.Label = "Event lines:"; + this.colorInfo.Location = new System.Drawing.Point(15, 260); + this.colorInfo.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorInfo.MinimumSize = new System.Drawing.Size(100, 23); + this.colorInfo.Name = "colorInfo"; + this.colorInfo.Size = new System.Drawing.Size(168, 23); + this.colorInfo.TabIndex = 19; + // + // colorMD3 + // + this.colorMD3.BackColor = System.Drawing.Color.Transparent; + this.colorMD3.Label = "Model wireframe:"; + this.colorMD3.Location = new System.Drawing.Point(15, 233); + this.colorMD3.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorMD3.MinimumSize = new System.Drawing.Size(100, 23); + this.colorMD3.Name = "colorMD3"; + this.colorMD3.Size = new System.Drawing.Size(168, 23); + this.colorMD3.TabIndex = 17; + // + // doublesidedalpha + // + this.doublesidedalpha.BackColor = System.Drawing.SystemColors.Window; + this.doublesidedalpha.LargeChange = 3; + this.doublesidedalpha.Location = new System.Drawing.Point(194, 19); + this.doublesidedalpha.Name = "doublesidedalpha"; + this.doublesidedalpha.Size = new System.Drawing.Size(154, 45); + this.doublesidedalpha.TabIndex = 2; + this.doublesidedalpha.TickStyle = System.Windows.Forms.TickStyle.TopLeft; + this.doublesidedalpha.ValueChanged += new System.EventHandler(this.doublesidedalpha_ValueChanged); + // + // colorgrid64 + // + this.colorgrid64.BackColor = System.Drawing.Color.Transparent; + this.colorgrid64.Label = "64 Block grid:"; + this.colorgrid64.Location = new System.Drawing.Point(15, 206); + this.colorgrid64.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorgrid64.MinimumSize = new System.Drawing.Size(100, 23); + this.colorgrid64.Name = "colorgrid64"; + this.colorgrid64.Size = new System.Drawing.Size(168, 23); + this.colorgrid64.TabIndex = 9; + // + // colorgrid + // + this.colorgrid.BackColor = System.Drawing.Color.Transparent; + this.colorgrid.Label = "Custom grid:"; + this.colorgrid.Location = new System.Drawing.Point(15, 179); + this.colorgrid.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorgrid.MinimumSize = new System.Drawing.Size(100, 23); + this.colorgrid.Name = "colorgrid"; + this.colorgrid.Size = new System.Drawing.Size(168, 23); + this.colorgrid.TabIndex = 8; + // + // colorindication + // + this.colorindication.BackColor = System.Drawing.Color.Transparent; + this.colorindication.Label = "Indications:"; + this.colorindication.Location = new System.Drawing.Point(15, 152); + this.colorindication.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorindication.MinimumSize = new System.Drawing.Size(100, 23); + this.colorindication.Name = "colorindication"; + this.colorindication.Size = new System.Drawing.Size(168, 23); + this.colorindication.TabIndex = 7; + // + // colorbackcolor + // + this.colorbackcolor.BackColor = System.Drawing.Color.Transparent; + this.colorbackcolor.Label = "Background:"; + this.colorbackcolor.Location = new System.Drawing.Point(15, 17); + this.colorbackcolor.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorbackcolor.MinimumSize = new System.Drawing.Size(100, 23); + this.colorbackcolor.Name = "colorbackcolor"; + this.colorbackcolor.Size = new System.Drawing.Size(168, 23); + this.colorbackcolor.TabIndex = 0; + // + // doublesidedalphalabel + // + this.doublesidedalphalabel.AutoSize = true; + this.doublesidedalphalabel.Location = new System.Drawing.Point(354, 32); + this.doublesidedalphalabel.Name = "doublesidedalphalabel"; + this.doublesidedalphalabel.Size = new System.Drawing.Size(21, 13); + this.doublesidedalphalabel.TabIndex = 16; + this.doublesidedalphalabel.Text = "0%"; + // + // colorselection + // + this.colorselection.BackColor = System.Drawing.Color.Transparent; + this.colorselection.Label = "Selection:"; + this.colorselection.Location = new System.Drawing.Point(15, 125); + this.colorselection.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorselection.MinimumSize = new System.Drawing.Size(100, 23); + this.colorselection.Name = "colorselection"; + this.colorselection.Size = new System.Drawing.Size(168, 23); + this.colorselection.TabIndex = 6; + // + // colorvertices + // + this.colorvertices.BackColor = System.Drawing.Color.Transparent; + this.colorvertices.Label = "Vertices:"; + this.colorvertices.Location = new System.Drawing.Point(15, 44); + this.colorvertices.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorvertices.MinimumSize = new System.Drawing.Size(100, 23); + this.colorvertices.Name = "colorvertices"; + this.colorvertices.Size = new System.Drawing.Size(168, 23); + this.colorvertices.TabIndex = 1; + // + // colorhighlight + // + this.colorhighlight.BackColor = System.Drawing.Color.Transparent; + this.colorhighlight.Label = "Highlight:"; + this.colorhighlight.Location = new System.Drawing.Point(15, 98); + this.colorhighlight.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorhighlight.MinimumSize = new System.Drawing.Size(100, 23); + this.colorhighlight.Name = "colorhighlight"; + this.colorhighlight.Size = new System.Drawing.Size(168, 23); + this.colorhighlight.TabIndex = 5; + // + // colorlinedefs + // + this.colorlinedefs.BackColor = System.Drawing.Color.Transparent; + this.colorlinedefs.Label = "Common lines:"; + this.colorlinedefs.Location = new System.Drawing.Point(15, 71); + this.colorlinedefs.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorlinedefs.MinimumSize = new System.Drawing.Size(100, 23); + this.colorlinedefs.Name = "colorlinedefs"; + this.colorlinedefs.Size = new System.Drawing.Size(168, 23); + this.colorlinedefs.TabIndex = 2; + // + // colorguidelines + // + this.colorguidelines.BackColor = System.Drawing.Color.Transparent; + this.colorguidelines.Label = "Guidelines:"; + this.colorguidelines.Location = new System.Drawing.Point(15, 314); + this.colorguidelines.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorguidelines.MinimumSize = new System.Drawing.Size(100, 23); + this.colorguidelines.Name = "colorguidelines"; + this.colorguidelines.Size = new System.Drawing.Size(168, 23); + this.colorguidelines.TabIndex = 11; + // + // cbStretchView + // + this.cbStretchView.AutoSize = true; + this.cbStretchView.Location = new System.Drawing.Point(25, 365); + this.cbStretchView.Name = "cbStretchView"; + this.cbStretchView.Size = new System.Drawing.Size(172, 17); + this.cbStretchView.TabIndex = 18; + this.cbStretchView.Text = "Stretched view in visual modes"; + this.toolTip1.SetToolTip(this.cbStretchView, "When enabled, visual mode will emulate \r\n(G)ZDoom\'s way of rendering by increasin" + "g\r\nvertical scale of the world geometry and \r\nsprites by 15%.\r\n"); - this.cbStretchView.UseVisualStyleBackColor = true; - // - // qualitydisplay - // - this.qualitydisplay.AutoSize = true; - this.qualitydisplay.Location = new System.Drawing.Point(25, 227); - this.qualitydisplay.Name = "qualitydisplay"; - this.qualitydisplay.Size = new System.Drawing.Size(128, 17); - this.qualitydisplay.TabIndex = 7; - this.qualitydisplay.Text = "High quality rendering"; - this.qualitydisplay.UseVisualStyleBackColor = true; - // - // cancel - // - 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(587, 580); - this.cancel.Name = "cancel"; - this.cancel.Size = new System.Drawing.Size(112, 25); - this.cancel.TabIndex = 2; - this.cancel.Text = "Cancel"; - this.cancel.UseVisualStyleBackColor = true; - this.cancel.Click += new System.EventHandler(this.cancel_Click); - // - // 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(469, 580); - this.apply.Name = "apply"; - this.apply.Size = new System.Drawing.Size(112, 25); - this.apply.TabIndex = 1; - this.apply.Text = "OK"; - this.apply.UseVisualStyleBackColor = true; - this.apply.Click += new System.EventHandler(this.apply_Click); - // - // tabs - // - this.tabs.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.cbStretchView.UseVisualStyleBackColor = true; + // + // qualitydisplay + // + this.qualitydisplay.AutoSize = true; + this.qualitydisplay.Location = new System.Drawing.Point(25, 281); + this.qualitydisplay.Name = "qualitydisplay"; + this.qualitydisplay.Size = new System.Drawing.Size(128, 17); + this.qualitydisplay.TabIndex = 7; + this.qualitydisplay.Text = "High quality rendering"; + this.qualitydisplay.UseVisualStyleBackColor = true; + // + // cancel + // + 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(587, 580); + this.cancel.Name = "cancel"; + this.cancel.Size = new System.Drawing.Size(112, 25); + this.cancel.TabIndex = 2; + this.cancel.Text = "Cancel"; + this.cancel.UseVisualStyleBackColor = true; + this.cancel.Click += new System.EventHandler(this.cancel_Click); + // + // 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(469, 580); + this.apply.Name = "apply"; + this.apply.Size = new System.Drawing.Size(112, 25); + this.apply.TabIndex = 1; + this.apply.Text = "OK"; + this.apply.UseVisualStyleBackColor = true; + this.apply.Click += new System.EventHandler(this.apply_Click); + // + // tabs + // + this.tabs.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.tabs.Controls.Add(this.tabinterface); - this.tabs.Controls.Add(this.tabkeys); - this.tabs.Controls.Add(this.tabcolors); - this.tabs.Controls.Add(this.tabscripteditor); - this.tabs.Controls.Add(this.tabpasting); - this.tabs.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabs.Location = new System.Drawing.Point(11, 13); - this.tabs.Name = "tabs"; - this.tabs.Padding = new System.Drawing.Point(24, 3); - this.tabs.SelectedIndex = 0; - this.tabs.Size = new System.Drawing.Size(690, 559); - this.tabs.TabIndex = 0; - this.tabs.SelectedIndexChanged += new System.EventHandler(this.tabs_SelectedIndexChanged); - // - // tabinterface - // - this.tabinterface.Controls.Add(this.groupBox3); - this.tabinterface.Controls.Add(this.groupBox5); - this.tabinterface.Controls.Add(this.groupBox4); - this.tabinterface.Controls.Add(this.groupBox2); - this.tabinterface.Controls.Add(groupBox1); - this.tabinterface.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabinterface.Location = new System.Drawing.Point(4, 22); - this.tabinterface.Name = "tabinterface"; - this.tabinterface.Padding = new System.Windows.Forms.Padding(5); - this.tabinterface.Size = new System.Drawing.Size(682, 533); - this.tabinterface.TabIndex = 0; - this.tabinterface.Text = "Interface"; - this.tabinterface.UseVisualStyleBackColor = true; - // - // groupBox3 - // - this.groupBox3.Controls.Add(this.resetscreenshotsdir); - this.groupBox3.Controls.Add(this.browsescreenshotsdir); - this.groupBox3.Controls.Add(this.screenshotsfolderpath); - this.groupBox3.Location = new System.Drawing.Point(345, 479); - this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(331, 48); - this.groupBox3.TabIndex = 5; - this.groupBox3.TabStop = false; - this.groupBox3.Text = " Screenshots Folder "; - // - // resetscreenshotsdir - // - this.resetscreenshotsdir.Image = global::CodeImp.DoomBuilder.Properties.Resources.Reset; - this.resetscreenshotsdir.Location = new System.Drawing.Point(301, 17); - this.resetscreenshotsdir.Name = "resetscreenshotsdir"; - this.resetscreenshotsdir.Size = new System.Drawing.Size(24, 24); - this.resetscreenshotsdir.TabIndex = 2; - this.toolTip1.SetToolTip(this.resetscreenshotsdir, "Use Default Screenshots Folder"); - this.resetscreenshotsdir.UseVisualStyleBackColor = true; - this.resetscreenshotsdir.Click += new System.EventHandler(this.resetscreenshotsdir_Click); - // - // browsescreenshotsdir - // - this.browsescreenshotsdir.Image = global::CodeImp.DoomBuilder.Properties.Resources.FolderExplore; - this.browsescreenshotsdir.Location = new System.Drawing.Point(275, 17); - this.browsescreenshotsdir.Name = "browsescreenshotsdir"; - this.browsescreenshotsdir.Size = new System.Drawing.Size(24, 24); - this.browsescreenshotsdir.TabIndex = 1; - this.toolTip1.SetToolTip(this.browsescreenshotsdir, "Browse Screenshots Folder"); - this.browsescreenshotsdir.UseVisualStyleBackColor = true; - this.browsescreenshotsdir.Click += new System.EventHandler(this.browsescreenshotsdir_Click); - // - // screenshotsfolderpath - // - this.screenshotsfolderpath.Location = new System.Drawing.Point(6, 19); - this.screenshotsfolderpath.Name = "screenshotsfolderpath"; - this.screenshotsfolderpath.Size = new System.Drawing.Size(264, 20); - this.screenshotsfolderpath.TabIndex = 0; - // - // groupBox5 - // - this.groupBox5.Controls.Add(this.toolbar_gzdoom); - this.groupBox5.Controls.Add(this.toolbar_file); - this.groupBox5.Controls.Add(this.toolbar_testing); - this.groupBox5.Controls.Add(this.toolbar_geometry); - this.groupBox5.Controls.Add(this.toolbar_viewmodes); - this.groupBox5.Controls.Add(this.toolbar_filter); - this.groupBox5.Controls.Add(this.toolbar_prefabs); - this.groupBox5.Controls.Add(this.toolbar_copy); - this.groupBox5.Controls.Add(this.toolbar_undo); - this.groupBox5.Controls.Add(this.toolbar_script); - this.groupBox5.Location = new System.Drawing.Point(345, 321); - this.groupBox5.Name = "groupBox5"; - this.groupBox5.Size = new System.Drawing.Size(331, 152); - this.groupBox5.TabIndex = 4; - this.groupBox5.TabStop = false; - this.groupBox5.Text = " Toolbar Buttons "; - // - // toolbar_gzdoom - // - this.toolbar_gzdoom.AutoSize = true; - this.toolbar_gzdoom.Location = new System.Drawing.Point(160, 102); - this.toolbar_gzdoom.Name = "toolbar_gzdoom"; - this.toolbar_gzdoom.Size = new System.Drawing.Size(75, 17); - this.toolbar_gzdoom.TabIndex = 50; - this.toolbar_gzdoom.Text = "Rendering"; - this.toolbar_gzdoom.UseVisualStyleBackColor = true; - // - // toolbar_file - // - this.toolbar_file.AutoSize = true; - this.toolbar_file.Location = new System.Drawing.Point(14, 22); - this.toolbar_file.Name = "toolbar_file"; - this.toolbar_file.Size = new System.Drawing.Size(121, 17); - this.toolbar_file.TabIndex = 49; - this.toolbar_file.Text = "New / Open / Save"; - this.toolbar_file.UseVisualStyleBackColor = true; - // - // toolbar_testing - // - this.toolbar_testing.AutoSize = true; - this.toolbar_testing.Location = new System.Drawing.Point(160, 82); - this.toolbar_testing.Name = "toolbar_testing"; - this.toolbar_testing.Size = new System.Drawing.Size(61, 17); - this.toolbar_testing.TabIndex = 48; - this.toolbar_testing.Text = "Testing"; - this.toolbar_testing.UseVisualStyleBackColor = true; - // - // toolbar_geometry - // - this.toolbar_geometry.AutoSize = true; - this.toolbar_geometry.Location = new System.Drawing.Point(160, 62); - this.toolbar_geometry.Name = "toolbar_geometry"; - this.toolbar_geometry.Size = new System.Drawing.Size(92, 17); - this.toolbar_geometry.TabIndex = 47; - this.toolbar_geometry.Text = "Snap / Merge"; - this.toolbar_geometry.UseVisualStyleBackColor = true; - // - // toolbar_viewmodes - // - this.toolbar_viewmodes.AutoSize = true; - this.toolbar_viewmodes.Location = new System.Drawing.Point(160, 42); - this.toolbar_viewmodes.Name = "toolbar_viewmodes"; - this.toolbar_viewmodes.Size = new System.Drawing.Size(84, 17); - this.toolbar_viewmodes.TabIndex = 46; - this.toolbar_viewmodes.Text = "View Modes"; - this.toolbar_viewmodes.UseVisualStyleBackColor = true; - // - // toolbar_filter - // - this.toolbar_filter.AutoSize = true; - this.toolbar_filter.Location = new System.Drawing.Point(160, 22); - this.toolbar_filter.Name = "toolbar_filter"; - this.toolbar_filter.Size = new System.Drawing.Size(161, 17); - this.toolbar_filter.TabIndex = 45; - this.toolbar_filter.Text = "Things Filter / Linedef Colors"; - this.toolbar_filter.UseVisualStyleBackColor = true; - // - // toolbar_prefabs - // - this.toolbar_prefabs.AutoSize = true; - this.toolbar_prefabs.Location = new System.Drawing.Point(14, 102); - this.toolbar_prefabs.Name = "toolbar_prefabs"; - this.toolbar_prefabs.Size = new System.Drawing.Size(62, 17); - this.toolbar_prefabs.TabIndex = 44; - this.toolbar_prefabs.Text = "Prefabs"; - this.toolbar_prefabs.UseVisualStyleBackColor = true; - // - // toolbar_copy - // - this.toolbar_copy.AutoSize = true; - this.toolbar_copy.Location = new System.Drawing.Point(14, 82); - this.toolbar_copy.Name = "toolbar_copy"; - this.toolbar_copy.Size = new System.Drawing.Size(115, 17); - this.toolbar_copy.TabIndex = 43; - this.toolbar_copy.Text = "Cut / Copy / Paste"; - this.toolbar_copy.UseVisualStyleBackColor = true; - // - // toolbar_undo - // - this.toolbar_undo.AutoSize = true; - this.toolbar_undo.Location = new System.Drawing.Point(14, 62); - this.toolbar_undo.Name = "toolbar_undo"; - this.toolbar_undo.Size = new System.Drawing.Size(89, 17); - this.toolbar_undo.TabIndex = 42; - this.toolbar_undo.Text = "Undo / Redo"; - this.toolbar_undo.UseVisualStyleBackColor = true; - // - // toolbar_script - // - this.toolbar_script.AutoSize = true; - this.toolbar_script.Location = new System.Drawing.Point(14, 42); - this.toolbar_script.Name = "toolbar_script"; - this.toolbar_script.Size = new System.Drawing.Size(83, 17); - this.toolbar_script.TabIndex = 41; - this.toolbar_script.Text = "Script Editor"; - this.toolbar_script.UseVisualStyleBackColor = true; - // - // groupBox4 - // - this.groupBox4.Controls.Add(this.collapsedockers); - this.groupBox4.Controls.Add(this.dockersposition); - this.groupBox4.Controls.Add(this.label17); - this.groupBox4.Location = new System.Drawing.Point(8, 479); - this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(331, 48); - this.groupBox4.TabIndex = 3; - this.groupBox4.TabStop = false; - this.groupBox4.Text = " Side Panels "; - // - // collapsedockers - // - this.collapsedockers.AutoSize = true; - this.collapsedockers.Location = new System.Drawing.Point(188, 20); - this.collapsedockers.Name = "collapsedockers"; - this.collapsedockers.Size = new System.Drawing.Size(71, 17); - this.collapsedockers.TabIndex = 2; - this.collapsedockers.Text = "Auto hide"; - this.collapsedockers.UseVisualStyleBackColor = true; - // - // dockersposition - // - this.dockersposition.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.dockersposition.FormattingEnabled = true; - this.dockersposition.Items.AddRange(new object[] { + this.tabs.Controls.Add(this.tabinterface); + this.tabs.Controls.Add(this.tabkeys); + this.tabs.Controls.Add(this.tabcolors); + this.tabs.Controls.Add(this.tabscripteditor); + this.tabs.Controls.Add(this.tabpasting); + this.tabs.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tabs.Location = new System.Drawing.Point(12, 12); + this.tabs.Name = "tabs"; + this.tabs.Padding = new System.Drawing.Point(24, 3); + this.tabs.SelectedIndex = 0; + this.tabs.Size = new System.Drawing.Size(690, 559); + this.tabs.TabIndex = 0; + this.tabs.SelectedIndexChanged += new System.EventHandler(this.tabs_SelectedIndexChanged); + // + // tabinterface + // + this.tabinterface.Controls.Add(this.groupBox11); + this.tabinterface.Controls.Add(this.groupBox3); + this.tabinterface.Controls.Add(this.groupBox5); + this.tabinterface.Controls.Add(this.groupBox4); + this.tabinterface.Controls.Add(this.groupBox2); + this.tabinterface.Controls.Add(groupBox1); + this.tabinterface.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tabinterface.Location = new System.Drawing.Point(4, 22); + this.tabinterface.Name = "tabinterface"; + this.tabinterface.Padding = new System.Windows.Forms.Padding(5); + this.tabinterface.Size = new System.Drawing.Size(682, 533); + this.tabinterface.TabIndex = 0; + this.tabinterface.Text = "Interface"; + this.tabinterface.UseVisualStyleBackColor = true; + // + // groupBox11 + // + this.groupBox11.Controls.Add(this.textlabelfontname); + this.groupBox11.Controls.Add(this.textlabelfontbold); + this.groupBox11.Controls.Add(this.label33); + this.groupBox11.Controls.Add(this.label34); + this.groupBox11.Controls.Add(this.textlabelfontsize); + this.groupBox11.Location = new System.Drawing.Point(345, 414); + this.groupBox11.Name = "groupBox11"; + this.groupBox11.Size = new System.Drawing.Size(331, 59); + this.groupBox11.TabIndex = 5; + this.groupBox11.TabStop = false; + this.groupBox11.Text = " Text Labels "; + // + // textlabelfontname + // + this.textlabelfontname.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.textlabelfontname.FormattingEnabled = true; + this.textlabelfontname.Location = new System.Drawing.Point(53, 24); + this.textlabelfontname.Name = "textlabelfontname"; + this.textlabelfontname.Size = new System.Drawing.Size(132, 21); + this.textlabelfontname.Sorted = true; + this.textlabelfontname.TabIndex = 29; + // + // textlabelfontbold + // + this.textlabelfontbold.AutoSize = true; + this.textlabelfontbold.Location = new System.Drawing.Point(279, 27); + this.textlabelfontbold.Name = "textlabelfontbold"; + this.textlabelfontbold.Size = new System.Drawing.Size(47, 17); + this.textlabelfontbold.TabIndex = 31; + this.textlabelfontbold.Text = "Bold"; + this.textlabelfontbold.UseVisualStyleBackColor = true; + // + // label33 + // + this.label33.AutoSize = true; + this.label33.Location = new System.Drawing.Point(191, 28); + this.label33.Name = "label33"; + this.label33.Size = new System.Drawing.Size(30, 13); + this.label33.TabIndex = 33; + this.label33.Text = "Size:"; + // + // label34 + // + this.label34.AutoSize = true; + this.label34.Location = new System.Drawing.Point(16, 28); + this.label34.Name = "label34"; + this.label34.Size = new System.Drawing.Size(31, 13); + this.label34.TabIndex = 32; + this.label34.Text = "Font:"; + // + // textlabelfontsize + // + this.textlabelfontsize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.textlabelfontsize.FormattingEnabled = true; + this.textlabelfontsize.Items.AddRange(new object[] { + "7", + "8", + "9", + "10", + "11", + "12", + "14", + "16", + "18", + "20", + "22", + "24", + "26", + "28", + "36", + "48"}); + this.textlabelfontsize.Location = new System.Drawing.Point(228, 24); + this.textlabelfontsize.Name = "textlabelfontsize"; + this.textlabelfontsize.Size = new System.Drawing.Size(45, 21); + this.textlabelfontsize.TabIndex = 30; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.resetscreenshotsdir); + this.groupBox3.Controls.Add(this.browsescreenshotsdir); + this.groupBox3.Controls.Add(this.screenshotsfolderpath); + this.groupBox3.Location = new System.Drawing.Point(345, 479); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(331, 48); + this.groupBox3.TabIndex = 5; + this.groupBox3.TabStop = false; + this.groupBox3.Text = " Screenshots Folder "; + // + // resetscreenshotsdir + // + this.resetscreenshotsdir.Image = global::CodeImp.DoomBuilder.Properties.Resources.Reset; + this.resetscreenshotsdir.Location = new System.Drawing.Point(301, 17); + this.resetscreenshotsdir.Name = "resetscreenshotsdir"; + this.resetscreenshotsdir.Size = new System.Drawing.Size(24, 24); + this.resetscreenshotsdir.TabIndex = 2; + this.toolTip1.SetToolTip(this.resetscreenshotsdir, "Use Default Screenshots Folder"); + this.resetscreenshotsdir.UseVisualStyleBackColor = true; + this.resetscreenshotsdir.Click += new System.EventHandler(this.resetscreenshotsdir_Click); + // + // browsescreenshotsdir + // + this.browsescreenshotsdir.Image = global::CodeImp.DoomBuilder.Properties.Resources.FolderExplore; + this.browsescreenshotsdir.Location = new System.Drawing.Point(275, 17); + this.browsescreenshotsdir.Name = "browsescreenshotsdir"; + this.browsescreenshotsdir.Size = new System.Drawing.Size(24, 24); + this.browsescreenshotsdir.TabIndex = 1; + this.toolTip1.SetToolTip(this.browsescreenshotsdir, "Browse Screenshots Folder"); + this.browsescreenshotsdir.UseVisualStyleBackColor = true; + this.browsescreenshotsdir.Click += new System.EventHandler(this.browsescreenshotsdir_Click); + // + // screenshotsfolderpath + // + this.screenshotsfolderpath.Location = new System.Drawing.Point(6, 19); + this.screenshotsfolderpath.Name = "screenshotsfolderpath"; + this.screenshotsfolderpath.Size = new System.Drawing.Size(264, 20); + this.screenshotsfolderpath.TabIndex = 0; + // + // groupBox5 + // + this.groupBox5.Controls.Add(this.toolbar_gzdoom); + this.groupBox5.Controls.Add(this.toolbar_file); + this.groupBox5.Controls.Add(this.toolbar_testing); + this.groupBox5.Controls.Add(this.toolbar_geometry); + this.groupBox5.Controls.Add(this.toolbar_viewmodes); + this.groupBox5.Controls.Add(this.toolbar_filter); + this.groupBox5.Controls.Add(this.toolbar_prefabs); + this.groupBox5.Controls.Add(this.toolbar_copy); + this.groupBox5.Controls.Add(this.toolbar_undo); + this.groupBox5.Controls.Add(this.toolbar_script); + this.groupBox5.Location = new System.Drawing.Point(345, 271); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(331, 137); + this.groupBox5.TabIndex = 4; + this.groupBox5.TabStop = false; + this.groupBox5.Text = " Toolbar Buttons "; + // + // toolbar_gzdoom + // + this.toolbar_gzdoom.AutoSize = true; + this.toolbar_gzdoom.Location = new System.Drawing.Point(160, 102); + this.toolbar_gzdoom.Name = "toolbar_gzdoom"; + this.toolbar_gzdoom.Size = new System.Drawing.Size(75, 17); + this.toolbar_gzdoom.TabIndex = 50; + this.toolbar_gzdoom.Text = "Rendering"; + this.toolbar_gzdoom.UseVisualStyleBackColor = true; + // + // toolbar_file + // + this.toolbar_file.AutoSize = true; + this.toolbar_file.Location = new System.Drawing.Point(14, 22); + this.toolbar_file.Name = "toolbar_file"; + this.toolbar_file.Size = new System.Drawing.Size(121, 17); + this.toolbar_file.TabIndex = 49; + this.toolbar_file.Text = "New / Open / Save"; + this.toolbar_file.UseVisualStyleBackColor = true; + // + // toolbar_testing + // + this.toolbar_testing.AutoSize = true; + this.toolbar_testing.Location = new System.Drawing.Point(160, 82); + this.toolbar_testing.Name = "toolbar_testing"; + this.toolbar_testing.Size = new System.Drawing.Size(61, 17); + this.toolbar_testing.TabIndex = 48; + this.toolbar_testing.Text = "Testing"; + this.toolbar_testing.UseVisualStyleBackColor = true; + // + // toolbar_geometry + // + this.toolbar_geometry.AutoSize = true; + this.toolbar_geometry.Location = new System.Drawing.Point(160, 62); + this.toolbar_geometry.Name = "toolbar_geometry"; + this.toolbar_geometry.Size = new System.Drawing.Size(92, 17); + this.toolbar_geometry.TabIndex = 47; + this.toolbar_geometry.Text = "Snap / Merge"; + this.toolbar_geometry.UseVisualStyleBackColor = true; + // + // toolbar_viewmodes + // + this.toolbar_viewmodes.AutoSize = true; + this.toolbar_viewmodes.Location = new System.Drawing.Point(160, 42); + this.toolbar_viewmodes.Name = "toolbar_viewmodes"; + this.toolbar_viewmodes.Size = new System.Drawing.Size(84, 17); + this.toolbar_viewmodes.TabIndex = 46; + this.toolbar_viewmodes.Text = "View Modes"; + this.toolbar_viewmodes.UseVisualStyleBackColor = true; + // + // toolbar_filter + // + this.toolbar_filter.AutoSize = true; + this.toolbar_filter.Location = new System.Drawing.Point(160, 22); + this.toolbar_filter.Name = "toolbar_filter"; + this.toolbar_filter.Size = new System.Drawing.Size(161, 17); + this.toolbar_filter.TabIndex = 45; + this.toolbar_filter.Text = "Things Filter / Linedef Colors"; + this.toolbar_filter.UseVisualStyleBackColor = true; + // + // toolbar_prefabs + // + this.toolbar_prefabs.AutoSize = true; + this.toolbar_prefabs.Location = new System.Drawing.Point(14, 102); + this.toolbar_prefabs.Name = "toolbar_prefabs"; + this.toolbar_prefabs.Size = new System.Drawing.Size(62, 17); + this.toolbar_prefabs.TabIndex = 44; + this.toolbar_prefabs.Text = "Prefabs"; + this.toolbar_prefabs.UseVisualStyleBackColor = true; + // + // toolbar_copy + // + this.toolbar_copy.AutoSize = true; + this.toolbar_copy.Location = new System.Drawing.Point(14, 82); + this.toolbar_copy.Name = "toolbar_copy"; + this.toolbar_copy.Size = new System.Drawing.Size(115, 17); + this.toolbar_copy.TabIndex = 43; + this.toolbar_copy.Text = "Cut / Copy / Paste"; + this.toolbar_copy.UseVisualStyleBackColor = true; + // + // toolbar_undo + // + this.toolbar_undo.AutoSize = true; + this.toolbar_undo.Location = new System.Drawing.Point(14, 62); + this.toolbar_undo.Name = "toolbar_undo"; + this.toolbar_undo.Size = new System.Drawing.Size(89, 17); + this.toolbar_undo.TabIndex = 42; + this.toolbar_undo.Text = "Undo / Redo"; + this.toolbar_undo.UseVisualStyleBackColor = true; + // + // toolbar_script + // + this.toolbar_script.AutoSize = true; + this.toolbar_script.Location = new System.Drawing.Point(14, 42); + this.toolbar_script.Name = "toolbar_script"; + this.toolbar_script.Size = new System.Drawing.Size(83, 17); + this.toolbar_script.TabIndex = 41; + this.toolbar_script.Text = "Script Editor"; + this.toolbar_script.UseVisualStyleBackColor = true; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.collapsedockers); + this.groupBox4.Controls.Add(this.dockersposition); + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Location = new System.Drawing.Point(8, 479); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(331, 48); + this.groupBox4.TabIndex = 3; + this.groupBox4.TabStop = false; + this.groupBox4.Text = " Side Panels "; + // + // collapsedockers + // + this.collapsedockers.AutoSize = true; + this.collapsedockers.Location = new System.Drawing.Point(188, 20); + this.collapsedockers.Name = "collapsedockers"; + this.collapsedockers.Size = new System.Drawing.Size(71, 17); + this.collapsedockers.TabIndex = 2; + this.collapsedockers.Text = "Auto hide"; + this.collapsedockers.UseVisualStyleBackColor = true; + // + // dockersposition + // + this.dockersposition.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.dockersposition.FormattingEnabled = true; + this.dockersposition.Items.AddRange(new object[] { "Left", "Right", "None"}); - this.dockersposition.Location = new System.Drawing.Point(91, 18); - this.dockersposition.Name = "dockersposition"; - this.dockersposition.Size = new System.Drawing.Size(85, 21); - this.dockersposition.TabIndex = 1; - // - // label17 - // - this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(29, 21); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(47, 13); - this.label17.TabIndex = 0; - this.label17.Text = "Position:"; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.vertexScale3D); - this.groupBox2.Controls.Add(this.vertexScale3DLabel); - this.groupBox2.Controls.Add(this.label26); - this.groupBox2.Controls.Add(this.viewdistance); - this.groupBox2.Controls.Add(this.movespeed); - this.groupBox2.Controls.Add(this.mousespeed); - this.groupBox2.Controls.Add(this.fieldofview); - this.groupBox2.Controls.Add(this.viewdistancelabel); - this.groupBox2.Controls.Add(this.label13); - this.groupBox2.Controls.Add(this.invertyaxis); - this.groupBox2.Controls.Add(this.movespeedlabel); - this.groupBox2.Controls.Add(this.label11); - this.groupBox2.Controls.Add(this.mousespeedlabel); - this.groupBox2.Controls.Add(this.label9); - this.groupBox2.Controls.Add(this.fieldofviewlabel); - this.groupBox2.Controls.Add(this.label4); - this.groupBox2.Location = new System.Drawing.Point(345, 8); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(331, 307); - this.groupBox2.TabIndex = 2; - this.groupBox2.TabStop = false; - this.groupBox2.Text = " Visual Modes "; - // - // vertexScale3D - // - this.vertexScale3D.BackColor = System.Drawing.SystemColors.Window; - this.vertexScale3D.LargeChange = 1; - this.vertexScale3D.Location = new System.Drawing.Point(116, 181); - this.vertexScale3D.Maximum = 15; - this.vertexScale3D.Minimum = 2; - this.vertexScale3D.Name = "vertexScale3D"; - this.vertexScale3D.Size = new System.Drawing.Size(150, 45); - this.vertexScale3D.TabIndex = 31; - this.vertexScale3D.TickStyle = System.Windows.Forms.TickStyle.Both; - this.vertexScale3D.Value = 10; - this.vertexScale3D.ValueChanged += new System.EventHandler(this.vertexScale3D_ValueChanged); - // - // vertexScale3DLabel - // - this.vertexScale3DLabel.AutoSize = true; - this.vertexScale3DLabel.Location = new System.Drawing.Point(272, 193); - this.vertexScale3DLabel.Name = "vertexScale3DLabel"; - this.vertexScale3DLabel.Size = new System.Drawing.Size(33, 13); - this.vertexScale3DLabel.TabIndex = 33; - this.vertexScale3DLabel.Text = "100%"; - // - // label26 - // - this.label26.AutoSize = true; - this.label26.Location = new System.Drawing.Point(16, 193); - this.label26.Name = "label26"; - this.label26.Size = new System.Drawing.Size(91, 13); - this.label26.TabIndex = 32; - this.label26.Text = "Vertex scale (3D):"; - this.toolTip1.SetToolTip(this.label26, "Sets the size of vertex handles\r\nin 3D mode"); - // - // viewdistance - // - this.viewdistance.BackColor = System.Drawing.SystemColors.Window; - this.viewdistance.LargeChange = 2; - this.viewdistance.Location = new System.Drawing.Point(116, 230); - this.viewdistance.Maximum = 45; - this.viewdistance.Minimum = 1; - this.viewdistance.Name = "viewdistance"; - this.viewdistance.Size = new System.Drawing.Size(150, 45); - this.viewdistance.TabIndex = 3; - this.viewdistance.TickFrequency = 2; - this.viewdistance.TickStyle = System.Windows.Forms.TickStyle.Both; - this.viewdistance.Value = 1; - this.viewdistance.ValueChanged += new System.EventHandler(this.viewdistance_ValueChanged); - // - // movespeed - // - this.movespeed.BackColor = System.Drawing.SystemColors.Window; - this.movespeed.Location = new System.Drawing.Point(116, 131); - this.movespeed.Maximum = 20; - this.movespeed.Minimum = 1; - this.movespeed.Name = "movespeed"; - this.movespeed.Size = new System.Drawing.Size(150, 45); - this.movespeed.TabIndex = 2; - this.movespeed.TickStyle = System.Windows.Forms.TickStyle.Both; - this.movespeed.Value = 1; - this.movespeed.ValueChanged += new System.EventHandler(this.movespeed_ValueChanged); - // - // mousespeed - // - this.mousespeed.BackColor = System.Drawing.SystemColors.Window; - this.mousespeed.Location = new System.Drawing.Point(116, 79); - this.mousespeed.Maximum = 20; - this.mousespeed.Minimum = 1; - this.mousespeed.Name = "mousespeed"; - this.mousespeed.Size = new System.Drawing.Size(150, 45); - this.mousespeed.TabIndex = 1; - this.mousespeed.TickStyle = System.Windows.Forms.TickStyle.Both; - this.mousespeed.Value = 1; - this.mousespeed.ValueChanged += new System.EventHandler(this.mousespeed_ValueChanged); - // - // fieldofview - // - this.fieldofview.BackColor = System.Drawing.SystemColors.Window; - this.fieldofview.LargeChange = 1; - this.fieldofview.Location = new System.Drawing.Point(116, 29); - this.fieldofview.Maximum = 17; - this.fieldofview.Minimum = 5; - this.fieldofview.Name = "fieldofview"; - this.fieldofview.Size = new System.Drawing.Size(150, 45); - this.fieldofview.TabIndex = 0; - this.fieldofview.TickStyle = System.Windows.Forms.TickStyle.Both; - this.fieldofview.Value = 5; - this.fieldofview.ValueChanged += new System.EventHandler(this.fieldofview_ValueChanged); - // - // viewdistancelabel - // - this.viewdistancelabel.AutoSize = true; - this.viewdistancelabel.Location = new System.Drawing.Point(272, 242); - this.viewdistancelabel.Name = "viewdistancelabel"; - this.viewdistancelabel.Size = new System.Drawing.Size(42, 13); - this.viewdistancelabel.TabIndex = 30; - this.viewdistancelabel.Text = "200 mp"; - // - // label13 - // - this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(30, 243); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(76, 13); - this.label13.TabIndex = 28; - this.label13.Text = "View distance:"; - // - // invertyaxis - // - this.invertyaxis.AutoSize = true; - this.invertyaxis.Location = new System.Drawing.Point(32, 282); - this.invertyaxis.Name = "invertyaxis"; - this.invertyaxis.Size = new System.Drawing.Size(118, 17); - this.invertyaxis.TabIndex = 4; - this.invertyaxis.Text = "Invert mouse Y axis"; - this.invertyaxis.UseVisualStyleBackColor = true; - // - // movespeedlabel - // - this.movespeedlabel.AutoSize = true; - this.movespeedlabel.Location = new System.Drawing.Point(272, 143); - this.movespeedlabel.Name = "movespeedlabel"; - this.movespeedlabel.Size = new System.Drawing.Size(25, 13); - this.movespeedlabel.TabIndex = 25; - this.movespeedlabel.Text = "100"; - // - // label11 - // - this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(41, 143); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(69, 13); - this.label11.TabIndex = 23; - this.label11.Text = "Move speed:"; - // - // mousespeedlabel - // - this.mousespeedlabel.AutoSize = true; - this.mousespeedlabel.Location = new System.Drawing.Point(272, 91); - this.mousespeedlabel.Name = "mousespeedlabel"; - this.mousespeedlabel.Size = new System.Drawing.Size(25, 13); - this.mousespeedlabel.TabIndex = 22; - this.mousespeedlabel.Text = "100"; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(35, 91); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(74, 13); - this.label9.TabIndex = 20; - this.label9.Text = "Mouse speed:"; - // - // fieldofviewlabel - // - this.fieldofviewlabel.AutoSize = true; - this.fieldofviewlabel.Location = new System.Drawing.Point(272, 41); - this.fieldofviewlabel.Name = "fieldofviewlabel"; - this.fieldofviewlabel.Size = new System.Drawing.Size(23, 13); - this.fieldofviewlabel.TabIndex = 19; - this.fieldofviewlabel.Text = "50�"; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(38, 41); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(69, 13); - this.label4.TabIndex = 17; - this.label4.Text = "Field of view:"; - // - // tabkeys - // - this.tabkeys.Controls.Add(this.bClearActionFilter); - this.tabkeys.Controls.Add(this.tbFilterActions); - this.tabkeys.Controls.Add(this.label24); - this.tabkeys.Controls.Add(this.listactions); - this.tabkeys.Controls.Add(this.actioncontrolpanel); - this.tabkeys.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabkeys.Location = new System.Drawing.Point(4, 22); - this.tabkeys.Name = "tabkeys"; - this.tabkeys.Padding = new System.Windows.Forms.Padding(3); - this.tabkeys.Size = new System.Drawing.Size(682, 533); - this.tabkeys.TabIndex = 1; - this.tabkeys.Text = "Controls"; - this.tabkeys.UseVisualStyleBackColor = true; - // - // bClearActionFilter - // - this.bClearActionFilter.Image = global::CodeImp.DoomBuilder.Properties.Resources.SearchClear; - this.bClearActionFilter.Location = new System.Drawing.Point(227, 10); - this.bClearActionFilter.Name = "bClearActionFilter"; - this.bClearActionFilter.Size = new System.Drawing.Size(26, 25); - this.bClearActionFilter.TabIndex = 12; - this.bClearActionFilter.TabStop = false; - this.bClearActionFilter.UseVisualStyleBackColor = true; - this.bClearActionFilter.Click += new System.EventHandler(this.bClearActionFilter_Click); - // - // tbFilterActions - // - this.tbFilterActions.Location = new System.Drawing.Point(55, 13); - this.tbFilterActions.Name = "tbFilterActions"; - this.tbFilterActions.Size = new System.Drawing.Size(166, 20); - this.tbFilterActions.TabIndex = 11; - this.tbFilterActions.TabStop = false; - this.tbFilterActions.TextChanged += new System.EventHandler(this.tbFilterActions_TextChanged); - // - // label24 - // - this.label24.AutoSize = true; - this.label24.Location = new System.Drawing.Point(17, 16); - this.label24.Name = "label24"; - this.label24.Size = new System.Drawing.Size(32, 13); - this.label24.TabIndex = 10; - this.label24.Text = "Filter:"; - // - // listactions - // - this.listactions.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.dockersposition.Location = new System.Drawing.Point(91, 18); + this.dockersposition.Name = "dockersposition"; + this.dockersposition.Size = new System.Drawing.Size(85, 21); + this.dockersposition.TabIndex = 1; + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(29, 21); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(47, 13); + this.label17.TabIndex = 0; + this.label17.Text = "Position:"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.vertexScale3D); + this.groupBox2.Controls.Add(this.vertexScale3DLabel); + this.groupBox2.Controls.Add(this.label26); + this.groupBox2.Controls.Add(this.viewdistance); + this.groupBox2.Controls.Add(this.movespeed); + this.groupBox2.Controls.Add(this.mousespeed); + this.groupBox2.Controls.Add(this.fieldofview); + this.groupBox2.Controls.Add(this.viewdistancelabel); + this.groupBox2.Controls.Add(this.label13); + this.groupBox2.Controls.Add(this.invertyaxis); + this.groupBox2.Controls.Add(this.movespeedlabel); + this.groupBox2.Controls.Add(this.label11); + this.groupBox2.Controls.Add(this.mousespeedlabel); + this.groupBox2.Controls.Add(this.label9); + this.groupBox2.Controls.Add(this.fieldofviewlabel); + this.groupBox2.Controls.Add(this.label4); + this.groupBox2.Location = new System.Drawing.Point(345, 8); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(331, 257); + this.groupBox2.TabIndex = 2; + this.groupBox2.TabStop = false; + this.groupBox2.Text = " Visual Modes "; + // + // vertexScale3D + // + this.vertexScale3D.BackColor = System.Drawing.SystemColors.Window; + this.vertexScale3D.LargeChange = 1; + this.vertexScale3D.Location = new System.Drawing.Point(116, 151); + this.vertexScale3D.Maximum = 15; + this.vertexScale3D.Minimum = 2; + this.vertexScale3D.Name = "vertexScale3D"; + this.vertexScale3D.Size = new System.Drawing.Size(150, 45); + this.vertexScale3D.TabIndex = 31; + this.vertexScale3D.TickStyle = System.Windows.Forms.TickStyle.Both; + this.vertexScale3D.Value = 10; + this.vertexScale3D.ValueChanged += new System.EventHandler(this.vertexScale3D_ValueChanged); + // + // vertexScale3DLabel + // + this.vertexScale3DLabel.AutoSize = true; + this.vertexScale3DLabel.Location = new System.Drawing.Point(272, 163); + this.vertexScale3DLabel.Name = "vertexScale3DLabel"; + this.vertexScale3DLabel.Size = new System.Drawing.Size(33, 13); + this.vertexScale3DLabel.TabIndex = 33; + this.vertexScale3DLabel.Text = "100%"; + // + // label26 + // + this.label26.AutoSize = true; + this.label26.Location = new System.Drawing.Point(16, 163); + this.label26.Name = "label26"; + this.label26.Size = new System.Drawing.Size(91, 13); + this.label26.TabIndex = 32; + this.label26.Text = "Vertex scale (3D):"; + this.toolTip1.SetToolTip(this.label26, "Sets the size of vertex handles\r\nin 3D mode"); + // + // viewdistance + // + this.viewdistance.BackColor = System.Drawing.SystemColors.Window; + this.viewdistance.LargeChange = 2; + this.viewdistance.Location = new System.Drawing.Point(116, 190); + this.viewdistance.Maximum = 45; + this.viewdistance.Minimum = 1; + this.viewdistance.Name = "viewdistance"; + this.viewdistance.Size = new System.Drawing.Size(150, 45); + this.viewdistance.TabIndex = 3; + this.viewdistance.TickFrequency = 2; + this.viewdistance.TickStyle = System.Windows.Forms.TickStyle.Both; + this.viewdistance.Value = 1; + this.viewdistance.ValueChanged += new System.EventHandler(this.viewdistance_ValueChanged); + // + // movespeed + // + this.movespeed.BackColor = System.Drawing.SystemColors.Window; + this.movespeed.Location = new System.Drawing.Point(116, 111); + this.movespeed.Maximum = 20; + this.movespeed.Minimum = 1; + this.movespeed.Name = "movespeed"; + this.movespeed.Size = new System.Drawing.Size(150, 45); + this.movespeed.TabIndex = 2; + this.movespeed.TickStyle = System.Windows.Forms.TickStyle.Both; + this.movespeed.Value = 1; + this.movespeed.ValueChanged += new System.EventHandler(this.movespeed_ValueChanged); + // + // mousespeed + // + this.mousespeed.BackColor = System.Drawing.SystemColors.Window; + this.mousespeed.Location = new System.Drawing.Point(116, 69); + this.mousespeed.Maximum = 20; + this.mousespeed.Minimum = 1; + this.mousespeed.Name = "mousespeed"; + this.mousespeed.Size = new System.Drawing.Size(150, 45); + this.mousespeed.TabIndex = 1; + this.mousespeed.TickStyle = System.Windows.Forms.TickStyle.Both; + this.mousespeed.Value = 1; + this.mousespeed.ValueChanged += new System.EventHandler(this.mousespeed_ValueChanged); + // + // fieldofview + // + this.fieldofview.BackColor = System.Drawing.SystemColors.Window; + this.fieldofview.LargeChange = 1; + this.fieldofview.Location = new System.Drawing.Point(116, 29); + this.fieldofview.Maximum = 17; + this.fieldofview.Minimum = 5; + this.fieldofview.Name = "fieldofview"; + this.fieldofview.Size = new System.Drawing.Size(150, 45); + this.fieldofview.TabIndex = 0; + this.fieldofview.TickStyle = System.Windows.Forms.TickStyle.Both; + this.fieldofview.Value = 5; + this.fieldofview.ValueChanged += new System.EventHandler(this.fieldofview_ValueChanged); + // + // viewdistancelabel + // + this.viewdistancelabel.AutoSize = true; + this.viewdistancelabel.Location = new System.Drawing.Point(272, 203); + this.viewdistancelabel.Name = "viewdistancelabel"; + this.viewdistancelabel.Size = new System.Drawing.Size(42, 13); + this.viewdistancelabel.TabIndex = 30; + this.viewdistancelabel.Text = "200 mp"; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(30, 203); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(76, 13); + this.label13.TabIndex = 28; + this.label13.Text = "View distance:"; + // + // invertyaxis + // + this.invertyaxis.AutoSize = true; + this.invertyaxis.Location = new System.Drawing.Point(32, 232); + this.invertyaxis.Name = "invertyaxis"; + this.invertyaxis.Size = new System.Drawing.Size(118, 17); + this.invertyaxis.TabIndex = 4; + this.invertyaxis.Text = "Invert mouse Y axis"; + this.invertyaxis.UseVisualStyleBackColor = true; + // + // movespeedlabel + // + this.movespeedlabel.AutoSize = true; + this.movespeedlabel.Location = new System.Drawing.Point(272, 123); + this.movespeedlabel.Name = "movespeedlabel"; + this.movespeedlabel.Size = new System.Drawing.Size(25, 13); + this.movespeedlabel.TabIndex = 25; + this.movespeedlabel.Text = "100"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(41, 123); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(69, 13); + this.label11.TabIndex = 23; + this.label11.Text = "Move speed:"; + // + // mousespeedlabel + // + this.mousespeedlabel.AutoSize = true; + this.mousespeedlabel.Location = new System.Drawing.Point(272, 81); + this.mousespeedlabel.Name = "mousespeedlabel"; + this.mousespeedlabel.Size = new System.Drawing.Size(25, 13); + this.mousespeedlabel.TabIndex = 22; + this.mousespeedlabel.Text = "100"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(35, 81); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(74, 13); + this.label9.TabIndex = 20; + this.label9.Text = "Mouse speed:"; + // + // fieldofviewlabel + // + this.fieldofviewlabel.AutoSize = true; + this.fieldofviewlabel.Location = new System.Drawing.Point(272, 41); + this.fieldofviewlabel.Name = "fieldofviewlabel"; + this.fieldofviewlabel.Size = new System.Drawing.Size(23, 13); + this.fieldofviewlabel.TabIndex = 19; + this.fieldofviewlabel.Text = "50�"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(38, 41); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(69, 13); + this.label4.TabIndex = 17; + this.label4.Text = "Field of view:"; + // + // tabkeys + // + this.tabkeys.Controls.Add(this.bClearActionFilter); + this.tabkeys.Controls.Add(this.tbFilterActions); + this.tabkeys.Controls.Add(this.label24); + this.tabkeys.Controls.Add(this.listactions); + this.tabkeys.Controls.Add(this.actioncontrolpanel); + this.tabkeys.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tabkeys.Location = new System.Drawing.Point(4, 22); + this.tabkeys.Name = "tabkeys"; + this.tabkeys.Padding = new System.Windows.Forms.Padding(3); + this.tabkeys.Size = new System.Drawing.Size(682, 533); + this.tabkeys.TabIndex = 1; + this.tabkeys.Text = "Controls"; + this.tabkeys.UseVisualStyleBackColor = true; + // + // bClearActionFilter + // + this.bClearActionFilter.Image = global::CodeImp.DoomBuilder.Properties.Resources.SearchClear; + this.bClearActionFilter.Location = new System.Drawing.Point(227, 10); + this.bClearActionFilter.Name = "bClearActionFilter"; + this.bClearActionFilter.Size = new System.Drawing.Size(26, 25); + this.bClearActionFilter.TabIndex = 12; + this.bClearActionFilter.TabStop = false; + this.bClearActionFilter.UseVisualStyleBackColor = true; + this.bClearActionFilter.Click += new System.EventHandler(this.bClearActionFilter_Click); + // + // tbFilterActions + // + this.tbFilterActions.Location = new System.Drawing.Point(55, 13); + this.tbFilterActions.Name = "tbFilterActions"; + this.tbFilterActions.Size = new System.Drawing.Size(166, 20); + this.tbFilterActions.TabIndex = 11; + this.tbFilterActions.TabStop = false; + this.tbFilterActions.TextChanged += new System.EventHandler(this.tbFilterActions_TextChanged); + // + // label24 + // + this.label24.AutoSize = true; + this.label24.Location = new System.Drawing.Point(17, 16); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(32, 13); + this.label24.TabIndex = 10; + this.label24.Text = "Filter:"; + // + // listactions + // + this.listactions.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.listactions.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.listactions.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columncontrolaction, this.columncontrolkey}); - this.listactions.FullRowSelect = true; - this.listactions.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - this.listactions.HideSelection = false; - this.listactions.Location = new System.Drawing.Point(11, 42); - this.listactions.Margin = new System.Windows.Forms.Padding(8, 9, 8, 9); - this.listactions.MultiSelect = false; - this.listactions.Name = "listactions"; - this.listactions.Size = new System.Drawing.Size(352, 481); - this.listactions.Sorting = System.Windows.Forms.SortOrder.Ascending; - this.listactions.TabIndex = 0; - this.listactions.TabStop = false; - this.listactions.UseCompatibleStateImageBehavior = false; - this.listactions.View = System.Windows.Forms.View.Details; - this.listactions.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.listactions_ItemSelectionChanged); - this.listactions.KeyUp += new System.Windows.Forms.KeyEventHandler(this.listactions_KeyUp); - this.listactions.MouseUp += new System.Windows.Forms.MouseEventHandler(this.listactions_MouseUp); - // - // columncontrolaction - // - this.columncontrolaction.Text = "Action"; - this.columncontrolaction.Width = 200; - // - // columncontrolkey - // - this.columncontrolkey.Text = "Key"; - this.columncontrolkey.Width = 130; - // - // actioncontrolpanel - // - this.actioncontrolpanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.listactions.FullRowSelect = true; + this.listactions.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.listactions.HideSelection = false; + this.listactions.Location = new System.Drawing.Point(11, 42); + this.listactions.Margin = new System.Windows.Forms.Padding(8, 9, 8, 9); + this.listactions.MultiSelect = false; + this.listactions.Name = "listactions"; + this.listactions.Size = new System.Drawing.Size(352, 481); + this.listactions.Sorting = System.Windows.Forms.SortOrder.Ascending; + this.listactions.TabIndex = 0; + this.listactions.TabStop = false; + this.listactions.UseCompatibleStateImageBehavior = false; + this.listactions.View = System.Windows.Forms.View.Details; + this.listactions.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.listactions_ItemSelectionChanged); + this.listactions.KeyUp += new System.Windows.Forms.KeyEventHandler(this.listactions_KeyUp); + this.listactions.MouseUp += new System.Windows.Forms.MouseEventHandler(this.listactions_MouseUp); + // + // columncontrolaction + // + this.columncontrolaction.Text = "Action"; + this.columncontrolaction.Width = 200; + // + // columncontrolkey + // + this.columncontrolkey.Text = "Key"; + this.columncontrolkey.Width = 130; + // + // actioncontrolpanel + // + this.actioncontrolpanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right))); - this.actioncontrolpanel.Controls.Add(this.actiondescription); - this.actioncontrolpanel.Controls.Add(this.keyusedlist); - this.actioncontrolpanel.Controls.Add(this.keyusedlabel); - this.actioncontrolpanel.Controls.Add(this.disregardshiftlabel); - this.actioncontrolpanel.Controls.Add(this.actioncontrol); - this.actioncontrolpanel.Controls.Add(label7); - this.actioncontrolpanel.Controls.Add(this.actiontitle); - this.actioncontrolpanel.Controls.Add(this.actioncontrolclear); - this.actioncontrolpanel.Controls.Add(label6); - this.actioncontrolpanel.Controls.Add(this.actionkey); - this.actioncontrolpanel.Controls.Add(label5); - this.actioncontrolpanel.Enabled = false; - this.actioncontrolpanel.Location = new System.Drawing.Point(377, 12); - this.actioncontrolpanel.Margin = new System.Windows.Forms.Padding(6); - this.actioncontrolpanel.Name = "actioncontrolpanel"; - this.actioncontrolpanel.Size = new System.Drawing.Size(282, 511); - this.actioncontrolpanel.TabIndex = 9; - this.actioncontrolpanel.TabStop = false; - this.actioncontrolpanel.Text = " Action control "; - // - // actiondescription - // - this.actiondescription.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.actiondescription.Location = new System.Drawing.Point(20, 47); - this.actiondescription.Multiline = true; - this.actiondescription.Name = "actiondescription"; - this.actiondescription.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.actiondescription.Size = new System.Drawing.Size(256, 72); - this.actiondescription.TabIndex = 12; - // - // keyusedlist - // - this.keyusedlist.BackColor = System.Drawing.SystemColors.Control; - this.keyusedlist.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.keyusedlist.FormattingEnabled = true; - this.keyusedlist.IntegralHeight = false; - this.keyusedlist.Location = new System.Drawing.Point(23, 307); - this.keyusedlist.Name = "keyusedlist"; - this.keyusedlist.SelectionMode = System.Windows.Forms.SelectionMode.None; - this.keyusedlist.Size = new System.Drawing.Size(238, 115); - this.keyusedlist.Sorted = true; - this.keyusedlist.TabIndex = 11; - this.keyusedlist.Visible = false; - // - // disregardshiftlabel - // - this.disregardshiftlabel.Location = new System.Drawing.Point(20, 224); - this.disregardshiftlabel.Name = "disregardshiftlabel"; - this.disregardshiftlabel.Size = new System.Drawing.Size(245, 47); - this.disregardshiftlabel.TabIndex = 9; - this.disregardshiftlabel.Tag = "The selected actions uses %s to modify its behavior. These modifiers can not be u" + - "sed in a key combination for this action."; - this.disregardshiftlabel.Text = "The selected actions uses Shift, Alt and Control to modify its behavior. These mo" + - "difiers can not be used in a key combination for this action."; - this.disregardshiftlabel.Visible = false; - // - // actioncontrol - // - this.actioncontrol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.actioncontrol.FormattingEnabled = true; - this.actioncontrol.ImeMode = System.Windows.Forms.ImeMode.Off; - this.actioncontrol.Location = new System.Drawing.Point(23, 190); - this.actioncontrol.Name = "actioncontrol"; - this.actioncontrol.Size = new System.Drawing.Size(238, 21); - this.actioncontrol.TabIndex = 8; - this.actioncontrol.TabStop = false; - this.actioncontrol.SelectedIndexChanged += new System.EventHandler(this.actioncontrol_SelectedIndexChanged); - // - // actiontitle - // - this.actiontitle.AutoSize = true; - this.actiontitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.actiontitle.Location = new System.Drawing.Point(67, 30); - this.actiontitle.Name = "actiontitle"; - this.actiontitle.Size = new System.Drawing.Size(176, 13); - this.actiontitle.TabIndex = 1; - this.actiontitle.Text = "(select an action from the list)"; - this.actiontitle.UseMnemonic = false; - // - // actioncontrolclear - // - this.actioncontrolclear.Image = global::CodeImp.DoomBuilder.Properties.Resources.SearchClear; - this.actioncontrolclear.Location = new System.Drawing.Point(193, 137); - this.actioncontrolclear.Name = "actioncontrolclear"; - this.actioncontrolclear.Size = new System.Drawing.Size(26, 25); - this.actioncontrolclear.TabIndex = 6; - this.actioncontrolclear.TabStop = false; - this.actioncontrolclear.UseVisualStyleBackColor = true; - this.actioncontrolclear.Click += new System.EventHandler(this.actioncontrolclear_Click); - // - // actionkey - // - this.actionkey.ImeMode = System.Windows.Forms.ImeMode.Off; - this.actionkey.Location = new System.Drawing.Point(23, 140); - this.actionkey.Name = "actionkey"; - this.actionkey.Size = new System.Drawing.Size(163, 20); - this.actionkey.TabIndex = 5; - this.actionkey.TabStop = false; - this.actionkey.KeyDown += new System.Windows.Forms.KeyEventHandler(this.actionkey_KeyDown); - // - // tabcolors - // - this.tabcolors.Controls.Add(this.appearancegroup1); - this.tabcolors.Controls.Add(this.colorsgroup1); - this.tabcolors.Controls.Add(this.nightsgroup); - this.tabcolors.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabcolors.Location = new System.Drawing.Point(4, 22); - this.tabcolors.Name = "tabcolors"; - this.tabcolors.Padding = new System.Windows.Forms.Padding(5); - this.tabcolors.Size = new System.Drawing.Size(682, 533); - this.tabcolors.TabIndex = 2; - this.tabcolors.Text = "Appearance"; - this.tabcolors.UseVisualStyleBackColor = true; - // - // appearancegroup1 - // - this.appearancegroup1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.actioncontrolpanel.Controls.Add(this.actiondescription); + this.actioncontrolpanel.Controls.Add(this.keyusedlist); + this.actioncontrolpanel.Controls.Add(this.keyusedlabel); + this.actioncontrolpanel.Controls.Add(this.disregardshiftlabel); + this.actioncontrolpanel.Controls.Add(this.actioncontrol); + this.actioncontrolpanel.Controls.Add(label7); + this.actioncontrolpanel.Controls.Add(this.actiontitle); + this.actioncontrolpanel.Controls.Add(this.actioncontrolclear); + this.actioncontrolpanel.Controls.Add(this.actionkey); + this.actioncontrolpanel.Controls.Add(label5); + this.actioncontrolpanel.Enabled = false; + this.actioncontrolpanel.Location = new System.Drawing.Point(377, 12); + this.actioncontrolpanel.Margin = new System.Windows.Forms.Padding(6); + this.actioncontrolpanel.Name = "actioncontrolpanel"; + this.actioncontrolpanel.Size = new System.Drawing.Size(296, 511); + this.actioncontrolpanel.TabIndex = 9; + this.actioncontrolpanel.TabStop = false; + this.actioncontrolpanel.Text = " Action control "; + // + // actiondescription + // + this.actiondescription.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.actiondescription.Location = new System.Drawing.Point(20, 47); + this.actiondescription.Multiline = true; + this.actiondescription.Name = "actiondescription"; + this.actiondescription.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.actiondescription.Size = new System.Drawing.Size(266, 72); + this.actiondescription.TabIndex = 12; + // + // keyusedlist + // + this.keyusedlist.BackColor = System.Drawing.SystemColors.Control; + this.keyusedlist.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.keyusedlist.FormattingEnabled = true; + this.keyusedlist.IntegralHeight = false; + this.keyusedlist.Location = new System.Drawing.Point(23, 307); + this.keyusedlist.Name = "keyusedlist"; + this.keyusedlist.SelectionMode = System.Windows.Forms.SelectionMode.None; + this.keyusedlist.Size = new System.Drawing.Size(263, 115); + this.keyusedlist.Sorted = true; + this.keyusedlist.TabIndex = 11; + this.keyusedlist.Visible = false; + // + // disregardshiftlabel + // + this.disregardshiftlabel.Location = new System.Drawing.Point(20, 224); + this.disregardshiftlabel.Name = "disregardshiftlabel"; + this.disregardshiftlabel.Size = new System.Drawing.Size(266, 47); + this.disregardshiftlabel.TabIndex = 9; + this.disregardshiftlabel.Tag = "The selected action uses %s to modify its behavior. These modifiers can not be us" + + "ed in a key combination for this action."; + this.disregardshiftlabel.Text = "The selected action uses Shift, Alt and Control to modify its behavior. These mod" + + "ifiers can not be used in a key combination for this action."; + this.disregardshiftlabel.Visible = false; + // + // actioncontrol + // + this.actioncontrol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.actioncontrol.FormattingEnabled = true; + this.actioncontrol.ImeMode = System.Windows.Forms.ImeMode.Off; + this.actioncontrol.Location = new System.Drawing.Point(23, 190); + this.actioncontrol.Name = "actioncontrol"; + this.actioncontrol.Size = new System.Drawing.Size(196, 21); + this.actioncontrol.TabIndex = 8; + this.actioncontrol.TabStop = false; + this.actioncontrol.SelectedIndexChanged += new System.EventHandler(this.actioncontrol_SelectedIndexChanged); + // + // actiontitle + // + this.actiontitle.AutoSize = true; + this.actiontitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.actiontitle.Location = new System.Drawing.Point(17, 29); + this.actiontitle.Name = "actiontitle"; + this.actiontitle.Size = new System.Drawing.Size(176, 13); + this.actiontitle.TabIndex = 1; + this.actiontitle.Text = "(select an action from the list)"; + this.actiontitle.UseMnemonic = false; + // + // actioncontrolclear + // + this.actioncontrolclear.Image = global::CodeImp.DoomBuilder.Properties.Resources.SearchClear; + this.actioncontrolclear.Location = new System.Drawing.Point(193, 137); + this.actioncontrolclear.Name = "actioncontrolclear"; + this.actioncontrolclear.Size = new System.Drawing.Size(26, 25); + this.actioncontrolclear.TabIndex = 6; + this.actioncontrolclear.TabStop = false; + this.actioncontrolclear.UseVisualStyleBackColor = true; + this.actioncontrolclear.Click += new System.EventHandler(this.actioncontrolclear_Click); + // + // actionkey + // + this.actionkey.ImeMode = System.Windows.Forms.ImeMode.Off; + this.actionkey.Location = new System.Drawing.Point(23, 140); + this.actionkey.Name = "actionkey"; + this.actionkey.Size = new System.Drawing.Size(163, 20); + this.actionkey.TabIndex = 5; + this.actionkey.TabStop = false; + this.actionkey.KeyDown += new System.Windows.Forms.KeyEventHandler(this.actionkey_KeyDown); + // + // tabcolors + // + this.tabcolors.Controls.Add(this.appearancegroup1); + this.tabcolors.Controls.Add(this.colorsgroup1); + this.tabcolors.Controls.Add(this.nightsgroup); + this.tabcolors.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tabcolors.Location = new System.Drawing.Point(4, 22); + this.tabcolors.Name = "tabcolors"; + this.tabcolors.Padding = new System.Windows.Forms.Padding(5); + this.tabcolors.Size = new System.Drawing.Size(682, 533); + this.tabcolors.TabIndex = 2; + this.tabcolors.Text = "Appearance"; + this.tabcolors.UseVisualStyleBackColor = true; + // + // appearancegroup1 + // + this.appearancegroup1.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.appearancegroup1.Controls.Add(label29); - this.appearancegroup1.Controls.Add(this.labelDefaultThingSize); - this.appearancegroup1.Controls.Add(this.tbDefaultThingSize); - this.appearancegroup1.Controls.Add(this.cbDrawThingsFixedSize); - this.appearancegroup1.Controls.Add(this.cbDrawCrosshair); - this.appearancegroup1.Controls.Add(this.cbDrawFullCrosshair); - this.appearancegroup1.Controls.Add(this.capitalizetexturenames); - this.appearancegroup1.Controls.Add(this.cbMarkExtraFloors); - this.appearancegroup1.Controls.Add(this.cbOldHighlightMode); - this.appearancegroup1.Controls.Add(label21); - this.appearancegroup1.Controls.Add(this.labelDynLightIntensity); - this.appearancegroup1.Controls.Add(this.cbStretchView); - this.appearancegroup1.Controls.Add(this.tbDynLightIntensity); - this.appearancegroup1.Controls.Add(label20); - this.appearancegroup1.Controls.Add(this.qualitydisplay); - this.appearancegroup1.Controls.Add(this.labelDynLightSize); - this.appearancegroup1.Controls.Add(this.tbDynLightSize); - this.appearancegroup1.Controls.Add(label18); - this.appearancegroup1.Controls.Add(this.labelDynLightCount); - this.appearancegroup1.Controls.Add(this.tbDynLightCount); - this.appearancegroup1.Controls.Add(this.animatevisualselection); - this.appearancegroup1.Controls.Add(this.blackbrowsers); - this.appearancegroup1.Controls.Add(this.visualbilinear); - this.appearancegroup1.Controls.Add(label1); - this.appearancegroup1.Controls.Add(this.classicbilinear); - this.appearancegroup1.Controls.Add(this.imagebrightnesslabel); - this.appearancegroup1.Controls.Add(this.imagebrightness); - this.appearancegroup1.Location = new System.Drawing.Point(217, 8); - this.appearancegroup1.Name = "appearancegroup1"; - this.appearancegroup1.Size = new System.Drawing.Size(457, 388); - this.appearancegroup1.TabIndex = 24; - this.appearancegroup1.TabStop = false; - this.appearancegroup1.Text = " Additional Options "; - // - // labelDefaultThingSize - // - this.labelDefaultThingSize.AutoSize = true; - this.labelDefaultThingSize.Location = new System.Drawing.Point(337, 161); - this.labelDefaultThingSize.Name = "labelDefaultThingSize"; - this.labelDefaultThingSize.Size = new System.Drawing.Size(13, 13); - this.labelDefaultThingSize.TabIndex = 42; - this.labelDefaultThingSize.Text = "8"; - // - // tbDefaultThingSize - // - this.tbDefaultThingSize.BackColor = System.Drawing.SystemColors.Window; - this.tbDefaultThingSize.LargeChange = 4; - this.tbDefaultThingSize.Location = new System.Drawing.Point(176, 151); - this.tbDefaultThingSize.Maximum = 64; - this.tbDefaultThingSize.Minimum = 1; - this.tbDefaultThingSize.Name = "tbDefaultThingSize"; - this.tbDefaultThingSize.Size = new System.Drawing.Size(154, 45); - this.tbDefaultThingSize.TabIndex = 40; - this.tbDefaultThingSize.TickFrequency = 4; - this.tbDefaultThingSize.TickStyle = System.Windows.Forms.TickStyle.TopLeft; - this.tbDefaultThingSize.Value = 8; - this.tbDefaultThingSize.ValueChanged += new System.EventHandler(this.tbDefaultThingSize_ValueChanged); - // - // cbDrawThingsFixedSize - // - this.cbDrawThingsFixedSize.AutoSize = true; - this.cbDrawThingsFixedSize.Location = new System.Drawing.Point(237, 311); - this.cbDrawThingsFixedSize.Name = "cbDrawThingsFixedSize"; - this.cbDrawThingsFixedSize.Size = new System.Drawing.Size(172, 17); - this.cbDrawThingsFixedSize.TabIndex = 39; - this.cbDrawThingsFixedSize.Text = "Draw Things at fixed size in 2D"; - this.toolTip1.SetToolTip(this.cbDrawThingsFixedSize, "If enabled, things in classic modes will be drawn at a fixed size, independent of" + + this.appearancegroup1.Controls.Add(this.hiddenthingsalpha); + this.appearancegroup1.Controls.Add(this.inactivethingsalpha); + this.appearancegroup1.Controls.Add(this.activethingsalpha); + this.appearancegroup1.Controls.Add(this.tbDefaultThingSize); + this.appearancegroup1.Controls.Add(this.label2); + this.appearancegroup1.Controls.Add(this.imagebrightness); + this.appearancegroup1.Controls.Add(label32); + this.appearancegroup1.Controls.Add(this.activethingsalphalabel); + this.appearancegroup1.Controls.Add(this.inactivethingsalphalabel); + this.appearancegroup1.Controls.Add(this.hiddenthingsalphalabel); + this.appearancegroup1.Controls.Add(this.doublesidedalpha); + this.appearancegroup1.Controls.Add(label31); + this.appearancegroup1.Controls.Add(label30); + this.appearancegroup1.Controls.Add(this.doublesidedalphalabel); + this.appearancegroup1.Controls.Add(label29); + this.appearancegroup1.Controls.Add(this.labelDefaultThingSize); + this.appearancegroup1.Controls.Add(this.cbDrawThingsFixedSize); + this.appearancegroup1.Controls.Add(this.cbDrawCrosshair); + this.appearancegroup1.Controls.Add(this.cbDrawFullCrosshair); + this.appearancegroup1.Controls.Add(this.capitalizetexturenames); + this.appearancegroup1.Controls.Add(this.cbMarkExtraFloors); + this.appearancegroup1.Controls.Add(this.cbOldHighlightMode); + this.appearancegroup1.Controls.Add(this.cbStretchView); + this.appearancegroup1.Controls.Add(this.qualitydisplay); + this.appearancegroup1.Controls.Add(label18); + this.appearancegroup1.Controls.Add(this.labelDynLightCount); + this.appearancegroup1.Controls.Add(this.animatevisualselection); + this.appearancegroup1.Controls.Add(this.blackbrowsers); + this.appearancegroup1.Controls.Add(this.visualbilinear); + this.appearancegroup1.Controls.Add(label1); + this.appearancegroup1.Controls.Add(this.classicbilinear); + this.appearancegroup1.Controls.Add(this.imagebrightnesslabel); + this.appearancegroup1.Controls.Add(this.tbDynLightCount); + this.appearancegroup1.Location = new System.Drawing.Point(217, 8); + this.appearancegroup1.Name = "appearancegroup1"; + this.appearancegroup1.Size = new System.Drawing.Size(457, 388); + this.appearancegroup1.TabIndex = 24; + this.appearancegroup1.TabStop = false; + this.appearancegroup1.Text = " Additional Options "; + // + // activethingsalphalabel + // + this.activethingsalphalabel.AutoSize = true; + this.activethingsalphalabel.Location = new System.Drawing.Point(354, 132); + this.activethingsalphalabel.Name = "activethingsalphalabel"; + this.activethingsalphalabel.Size = new System.Drawing.Size(21, 13); + this.activethingsalphalabel.TabIndex = 48; + this.activethingsalphalabel.Text = "0%"; + // + // inactivethingsalphalabel + // + this.inactivethingsalphalabel.AutoSize = true; + this.inactivethingsalphalabel.Location = new System.Drawing.Point(354, 166); + this.inactivethingsalphalabel.Name = "inactivethingsalphalabel"; + this.inactivethingsalphalabel.Size = new System.Drawing.Size(21, 13); + this.inactivethingsalphalabel.TabIndex = 48; + this.inactivethingsalphalabel.Text = "0%"; + // + // hiddenthingsalphalabel + // + this.hiddenthingsalphalabel.AutoSize = true; + this.hiddenthingsalphalabel.Location = new System.Drawing.Point(354, 200); + this.hiddenthingsalphalabel.Name = "hiddenthingsalphalabel"; + this.hiddenthingsalphalabel.Size = new System.Drawing.Size(21, 13); + this.hiddenthingsalphalabel.TabIndex = 47; + this.hiddenthingsalphalabel.Text = "0%"; + // + // hiddenthingsalpha + // + this.hiddenthingsalpha.BackColor = System.Drawing.SystemColors.Window; + this.hiddenthingsalpha.LargeChange = 3; + this.hiddenthingsalpha.Location = new System.Drawing.Point(193, 189); + this.hiddenthingsalpha.Name = "hiddenthingsalpha"; + this.hiddenthingsalpha.Size = new System.Drawing.Size(154, 45); + this.hiddenthingsalpha.TabIndex = 43; + this.hiddenthingsalpha.TickStyle = System.Windows.Forms.TickStyle.TopLeft; + this.hiddenthingsalpha.ValueChanged += new System.EventHandler(this.hiddenthingsalpha_ValueChanged); + // + // inactivethingsalpha + // + this.inactivethingsalpha.BackColor = System.Drawing.SystemColors.Window; + this.inactivethingsalpha.LargeChange = 3; + this.inactivethingsalpha.Location = new System.Drawing.Point(193, 155); + this.inactivethingsalpha.Name = "inactivethingsalpha"; + this.inactivethingsalpha.Size = new System.Drawing.Size(154, 45); + this.inactivethingsalpha.TabIndex = 44; + this.inactivethingsalpha.TickStyle = System.Windows.Forms.TickStyle.TopLeft; + this.inactivethingsalpha.ValueChanged += new System.EventHandler(this.inactivethingsalpha_ValueChanged); + // + // activethingsalpha + // + this.activethingsalpha.BackColor = System.Drawing.SystemColors.Window; + this.activethingsalpha.LargeChange = 3; + this.activethingsalpha.Location = new System.Drawing.Point(193, 121); + this.activethingsalpha.Name = "activethingsalpha"; + this.activethingsalpha.Size = new System.Drawing.Size(154, 45); + this.activethingsalpha.TabIndex = 44; + this.activethingsalpha.TickStyle = System.Windows.Forms.TickStyle.TopLeft; + this.activethingsalpha.ValueChanged += new System.EventHandler(this.activethingsalpha_ValueChanged); + // + // labelDefaultThingSize + // + this.labelDefaultThingSize.AutoSize = true; + this.labelDefaultThingSize.Location = new System.Drawing.Point(354, 98); + this.labelDefaultThingSize.Name = "labelDefaultThingSize"; + this.labelDefaultThingSize.Size = new System.Drawing.Size(13, 13); + this.labelDefaultThingSize.TabIndex = 42; + this.labelDefaultThingSize.Text = "8"; + // + // tbDefaultThingSize + // + this.tbDefaultThingSize.BackColor = System.Drawing.SystemColors.Window; + this.tbDefaultThingSize.LargeChange = 4; + this.tbDefaultThingSize.Location = new System.Drawing.Point(193, 87); + this.tbDefaultThingSize.Maximum = 64; + this.tbDefaultThingSize.Minimum = 1; + this.tbDefaultThingSize.Name = "tbDefaultThingSize"; + this.tbDefaultThingSize.Size = new System.Drawing.Size(154, 45); + this.tbDefaultThingSize.TabIndex = 40; + this.tbDefaultThingSize.TickFrequency = 4; + this.tbDefaultThingSize.TickStyle = System.Windows.Forms.TickStyle.TopLeft; + this.tbDefaultThingSize.Value = 8; + this.tbDefaultThingSize.ValueChanged += new System.EventHandler(this.tbDefaultThingSize_ValueChanged); + // + // cbDrawThingsFixedSize + // + this.cbDrawThingsFixedSize.AutoSize = true; + this.cbDrawThingsFixedSize.Location = new System.Drawing.Point(237, 365); + this.cbDrawThingsFixedSize.Name = "cbDrawThingsFixedSize"; + this.cbDrawThingsFixedSize.Size = new System.Drawing.Size(172, 17); + this.cbDrawThingsFixedSize.TabIndex = 39; + this.cbDrawThingsFixedSize.Text = "Draw Things at fixed size in 2D"; + this.toolTip1.SetToolTip(this.cbDrawThingsFixedSize, "If enabled, things in classic modes will be drawn at a fixed size, independent of" + " their actual size."); - this.cbDrawThingsFixedSize.UseVisualStyleBackColor = true; - // - // cbDrawCrosshair - // - this.cbDrawCrosshair.AutoSize = true; - this.cbDrawCrosshair.Location = new System.Drawing.Point(237, 269); - this.cbDrawCrosshair.Name = "cbDrawCrosshair"; - this.cbDrawCrosshair.Size = new System.Drawing.Size(176, 17); - this.cbDrawCrosshair.TabIndex = 38; - this.cbDrawCrosshair.Text = "Draw crosshair in classic modes"; - this.toolTip1.SetToolTip(this.cbDrawCrosshair, "If disabled, the crosshair in classic modes\r\nwill not be drawn."); - this.cbDrawCrosshair.UseVisualStyleBackColor = true; - // - // cbDrawFullCrosshair - // - this.cbDrawFullCrosshair.AutoSize = true; - this.cbDrawFullCrosshair.Location = new System.Drawing.Point(237, 290); - this.cbDrawFullCrosshair.Name = "cbDrawFullCrosshair"; - this.cbDrawFullCrosshair.Size = new System.Drawing.Size(192, 17); - this.cbDrawFullCrosshair.TabIndex = 37; - this.cbDrawFullCrosshair.Text = "Draw full crosshair in classic modes"; - this.toolTip1.SetToolTip(this.cbDrawFullCrosshair, "If enabled, the crosshair in classic modes\r\nwill extend to the boundaries of the " + + this.cbDrawThingsFixedSize.UseVisualStyleBackColor = true; + // + // cbDrawCrosshair + // + this.cbDrawCrosshair.AutoSize = true; + this.cbDrawCrosshair.Location = new System.Drawing.Point(237, 323); + this.cbDrawCrosshair.Name = "cbDrawCrosshair"; + this.cbDrawCrosshair.Size = new System.Drawing.Size(176, 17); + this.cbDrawCrosshair.TabIndex = 38; + this.cbDrawCrosshair.Text = "Draw crosshair in classic modes"; + this.toolTip1.SetToolTip(this.cbDrawCrosshair, "If disabled, the crosshair in classic modes\r\nwill not be drawn."); + this.cbDrawCrosshair.UseVisualStyleBackColor = true; + // + // cbDrawFullCrosshair + // + this.cbDrawFullCrosshair.AutoSize = true; + this.cbDrawFullCrosshair.Location = new System.Drawing.Point(237, 344); + this.cbDrawFullCrosshair.Name = "cbDrawFullCrosshair"; + this.cbDrawFullCrosshair.Size = new System.Drawing.Size(192, 17); + this.cbDrawFullCrosshair.TabIndex = 37; + this.cbDrawFullCrosshair.Text = "Draw full crosshair in classic modes"; + this.toolTip1.SetToolTip(this.cbDrawFullCrosshair, "If enabled, the crosshair in classic modes\r\nwill extend to the boundaries of the " + "map."); - this.cbDrawFullCrosshair.UseVisualStyleBackColor = true; - // - // capitalizetexturenames - // - this.capitalizetexturenames.AutoSize = true; - this.capitalizetexturenames.Location = new System.Drawing.Point(237, 206); - this.capitalizetexturenames.Name = "capitalizetexturenames"; - this.capitalizetexturenames.Size = new System.Drawing.Size(140, 17); - this.capitalizetexturenames.TabIndex = 36; - this.capitalizetexturenames.Text = "Capitalize texture names"; - this.toolTip1.SetToolTip(this.capitalizetexturenames, "When enabled, texture names will be shown \r\nand saved as all caps\r\n(Doom Builder " + + this.cbDrawFullCrosshair.UseVisualStyleBackColor = true; + // + // capitalizetexturenames + // + this.capitalizetexturenames.AutoSize = true; + this.capitalizetexturenames.Location = new System.Drawing.Point(237, 260); + this.capitalizetexturenames.Name = "capitalizetexturenames"; + this.capitalizetexturenames.Size = new System.Drawing.Size(140, 17); + this.capitalizetexturenames.TabIndex = 36; + this.capitalizetexturenames.Text = "Capitalize texture names"; + this.toolTip1.SetToolTip(this.capitalizetexturenames, "When enabled, texture names will be shown \r\nand saved as all caps\r\n(Doom Builder " + "2 behaviour)"); - this.capitalizetexturenames.UseVisualStyleBackColor = true; - // - // cbMarkExtraFloors - // - this.cbMarkExtraFloors.AutoSize = true; - this.cbMarkExtraFloors.Location = new System.Drawing.Point(25, 290); - this.cbMarkExtraFloors.Name = "cbMarkExtraFloors"; - this.cbMarkExtraFloors.Size = new System.Drawing.Size(175, 17); - this.cbMarkExtraFloors.TabIndex = 35; - this.cbMarkExtraFloors.Text = "Mark 3D floors in classic modes"; - this.toolTip1.SetToolTip(this.cbMarkExtraFloors, "When enabled, linedefs of sectors with 3d floors will be marked using \"3D Floors\"" + + this.capitalizetexturenames.UseVisualStyleBackColor = true; + // + // cbMarkExtraFloors + // + this.cbMarkExtraFloors.AutoSize = true; + this.cbMarkExtraFloors.Location = new System.Drawing.Point(25, 344); + this.cbMarkExtraFloors.Name = "cbMarkExtraFloors"; + this.cbMarkExtraFloors.Size = new System.Drawing.Size(175, 17); + this.cbMarkExtraFloors.TabIndex = 35; + this.cbMarkExtraFloors.Text = "Mark 3D floors in classic modes"; + this.toolTip1.SetToolTip(this.cbMarkExtraFloors, "When enabled, linedefs of sectors with 3d floors will be marked using \"3D Floors\"" + " color."); - this.cbMarkExtraFloors.UseVisualStyleBackColor = true; - // - // cbOldHighlightMode - // - this.cbOldHighlightMode.AutoSize = true; - this.cbOldHighlightMode.Location = new System.Drawing.Point(237, 248); - this.cbOldHighlightMode.Name = "cbOldHighlightMode"; - this.cbOldHighlightMode.Size = new System.Drawing.Size(207, 17); - this.cbOldHighlightMode.TabIndex = 33; - this.cbOldHighlightMode.Text = "Always show selection in visual modes"; - this.toolTip1.SetToolTip(this.cbOldHighlightMode, "If enabled, selected surfaces will be highlighted in Visual mode\r\neven if \"Show h" + + this.cbMarkExtraFloors.UseVisualStyleBackColor = true; + // + // cbOldHighlightMode + // + this.cbOldHighlightMode.AutoSize = true; + this.cbOldHighlightMode.Location = new System.Drawing.Point(237, 302); + this.cbOldHighlightMode.Name = "cbOldHighlightMode"; + this.cbOldHighlightMode.Size = new System.Drawing.Size(207, 17); + this.cbOldHighlightMode.TabIndex = 33; + this.cbOldHighlightMode.Text = "Always show selection in visual modes"; + this.toolTip1.SetToolTip(this.cbOldHighlightMode, "If enabled, selected surfaces will be highlighted in Visual mode\r\neven if \"Show h" + "ighlight\" mode is disabled \r\n(Doom Builder 2 behaviour)."); - this.cbOldHighlightMode.UseVisualStyleBackColor = true; - // - // labelDynLightIntensity - // - this.labelDynLightIntensity.AutoSize = true; - this.labelDynLightIntensity.Location = new System.Drawing.Point(337, 129); - this.labelDynLightIntensity.Name = "labelDynLightIntensity"; - this.labelDynLightIntensity.Size = new System.Drawing.Size(22, 13); - this.labelDynLightIntensity.TabIndex = 32; - this.labelDynLightIntensity.Text = "1.0"; - // - // tbDynLightIntensity - // - this.tbDynLightIntensity.BackColor = System.Drawing.SystemColors.Window; - this.tbDynLightIntensity.LargeChange = 1; - this.tbDynLightIntensity.Location = new System.Drawing.Point(176, 119); - this.tbDynLightIntensity.Minimum = 1; - this.tbDynLightIntensity.Name = "tbDynLightIntensity"; - this.tbDynLightIntensity.Size = new System.Drawing.Size(154, 45); - this.tbDynLightIntensity.TabIndex = 30; - this.tbDynLightIntensity.TickStyle = System.Windows.Forms.TickStyle.TopLeft; - this.tbDynLightIntensity.Value = 10; - this.tbDynLightIntensity.ValueChanged += new System.EventHandler(this.tbDynLightIntensity_ValueChanged); - // - // labelDynLightSize - // - this.labelDynLightSize.AutoSize = true; - this.labelDynLightSize.Location = new System.Drawing.Point(337, 96); - this.labelDynLightSize.Name = "labelDynLightSize"; - this.labelDynLightSize.Size = new System.Drawing.Size(22, 13); - this.labelDynLightSize.TabIndex = 29; - this.labelDynLightSize.Text = "1.0"; - // - // tbDynLightSize - // - this.tbDynLightSize.BackColor = System.Drawing.SystemColors.Window; - this.tbDynLightSize.LargeChange = 1; - this.tbDynLightSize.Location = new System.Drawing.Point(176, 85); - this.tbDynLightSize.Maximum = 20; - this.tbDynLightSize.Minimum = 1; - this.tbDynLightSize.Name = "tbDynLightSize"; - this.tbDynLightSize.Size = new System.Drawing.Size(154, 45); - this.tbDynLightSize.TabIndex = 27; - this.tbDynLightSize.TickStyle = System.Windows.Forms.TickStyle.TopLeft; - this.tbDynLightSize.Value = 10; - this.tbDynLightSize.ValueChanged += new System.EventHandler(this.tbDynLightSize_ValueChanged); - // - // labelDynLightCount - // - this.labelDynLightCount.AutoSize = true; - this.labelDynLightCount.Location = new System.Drawing.Point(337, 62); - this.labelDynLightCount.Name = "labelDynLightCount"; - this.labelDynLightCount.Size = new System.Drawing.Size(19, 13); - this.labelDynLightCount.TabIndex = 26; - this.labelDynLightCount.Text = "16"; - // - // tbDynLightCount - // - this.tbDynLightCount.BackColor = System.Drawing.SystemColors.Window; - this.tbDynLightCount.LargeChange = 3; - this.tbDynLightCount.Location = new System.Drawing.Point(176, 51); - this.tbDynLightCount.Maximum = 32; - this.tbDynLightCount.Minimum = 1; - this.tbDynLightCount.Name = "tbDynLightCount"; - this.tbDynLightCount.Size = new System.Drawing.Size(154, 45); - this.tbDynLightCount.TabIndex = 24; - this.tbDynLightCount.TickFrequency = 4; - this.tbDynLightCount.TickStyle = System.Windows.Forms.TickStyle.TopLeft; - this.tbDynLightCount.Value = 1; - this.tbDynLightCount.ValueChanged += new System.EventHandler(this.tbDynLightCount_ValueChanged); - // - // animatevisualselection - // - this.animatevisualselection.AutoSize = true; - this.animatevisualselection.Location = new System.Drawing.Point(237, 227); - this.animatevisualselection.Name = "animatevisualselection"; - this.animatevisualselection.Size = new System.Drawing.Size(184, 17); - this.animatevisualselection.TabIndex = 23; - this.animatevisualselection.Text = "Animate selection in visual modes"; - this.animatevisualselection.UseVisualStyleBackColor = true; - // - // blackbrowsers - // - this.blackbrowsers.AutoSize = true; - this.blackbrowsers.Location = new System.Drawing.Point(25, 206); - this.blackbrowsers.Name = "blackbrowsers"; - this.blackbrowsers.Size = new System.Drawing.Size(195, 17); - this.blackbrowsers.TabIndex = 4; - this.blackbrowsers.Text = "Black background in image browser"; - this.blackbrowsers.UseVisualStyleBackColor = true; - // - // visualbilinear - // - this.visualbilinear.AutoSize = true; - this.visualbilinear.Location = new System.Drawing.Point(25, 269); - this.visualbilinear.Name = "visualbilinear"; - this.visualbilinear.Size = new System.Drawing.Size(171, 17); - this.visualbilinear.TabIndex = 6; - this.visualbilinear.Text = "Bilinear filtering in visual modes"; - this.visualbilinear.UseVisualStyleBackColor = true; - // - // classicbilinear - // - this.classicbilinear.AutoSize = true; - this.classicbilinear.Location = new System.Drawing.Point(25, 248); - this.classicbilinear.Name = "classicbilinear"; - this.classicbilinear.Size = new System.Drawing.Size(176, 17); - this.classicbilinear.TabIndex = 5; - this.classicbilinear.Text = "Bilinear filtering in classic modes"; - this.classicbilinear.UseVisualStyleBackColor = true; - // - // imagebrightnesslabel - // - this.imagebrightnesslabel.AutoSize = true; - this.imagebrightnesslabel.Location = new System.Drawing.Point(337, 29); - this.imagebrightnesslabel.Name = "imagebrightnesslabel"; - this.imagebrightnesslabel.Size = new System.Drawing.Size(30, 13); - this.imagebrightnesslabel.TabIndex = 22; - this.imagebrightnesslabel.Text = "+ 0 y"; - // - // imagebrightness - // - this.imagebrightness.BackColor = System.Drawing.SystemColors.Window; - this.imagebrightness.LargeChange = 3; - this.imagebrightness.Location = new System.Drawing.Point(176, 18); - this.imagebrightness.Name = "imagebrightness"; - this.imagebrightness.Size = new System.Drawing.Size(154, 45); - this.imagebrightness.TabIndex = 3; - this.imagebrightness.TickStyle = System.Windows.Forms.TickStyle.TopLeft; - this.imagebrightness.ValueChanged += new System.EventHandler(this.imagebrightness_ValueChanged); - // - // nightsgroup - // - this.nightsgroup.Controls.Add(this.nightscolormare8); - this.nightsgroup.Controls.Add(this.nightscolormare7); - this.nightsgroup.Controls.Add(this.nightscolormare6); - this.nightsgroup.Controls.Add(this.nightscolormare5); - this.nightsgroup.Controls.Add(this.nightscolormare4); - this.nightsgroup.Controls.Add(this.nightscolormare3); - this.nightsgroup.Controls.Add(this.nightscolormare2); - this.nightsgroup.Controls.Add(this.nightscolormare1); - this.nightsgroup.Controls.Add(this.label23); - this.nightsgroup.Controls.Add(this.nightscircleprecision); - this.nightsgroup.Controls.Add(this.nightscircleprecisionlabel); - this.nightsgroup.Controls.Add(this.waypointcolor1); - this.nightsgroup.Controls.Add(this.waypointcolor2); - this.nightsgroup.Location = new System.Drawing.Point(8, 401); - this.nightsgroup.Name = "nightsgroup"; - this.nightsgroup.Size = new System.Drawing.Size(666, 129); - this.nightsgroup.TabIndex = 4; - this.nightsgroup.TabStop = false; - this.nightsgroup.Text = "Waypoints / NiGHTS Display"; - // - // nightscolormare8 - // - this.nightscolormare8.BackColor = System.Drawing.Color.Transparent; - this.nightscolormare8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.nightscolormare8.Label = "Path color (Mare 8):"; - this.nightscolormare8.Location = new System.Drawing.Point(207, 98); - this.nightscolormare8.MaximumSize = new System.Drawing.Size(10000, 23); - this.nightscolormare8.MinimumSize = new System.Drawing.Size(100, 23); - this.nightscolormare8.Name = "nightscolormare8"; - this.nightscolormare8.Size = new System.Drawing.Size(168, 23); - this.nightscolormare8.TabIndex = 39; - // - // nightscolormare7 - // - this.nightscolormare7.BackColor = System.Drawing.Color.Transparent; - this.nightscolormare7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.nightscolormare7.Label = "Path color (Mare 7):"; - this.nightscolormare7.Location = new System.Drawing.Point(207, 71); - this.nightscolormare7.MaximumSize = new System.Drawing.Size(10000, 23); - this.nightscolormare7.MinimumSize = new System.Drawing.Size(100, 23); - this.nightscolormare7.Name = "nightscolormare7"; - this.nightscolormare7.Size = new System.Drawing.Size(168, 23); - this.nightscolormare7.TabIndex = 38; - // - // nightscolormare6 - // - this.nightscolormare6.BackColor = System.Drawing.Color.Transparent; - this.nightscolormare6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.nightscolormare6.Label = "Path color (Mare 6):"; - this.nightscolormare6.Location = new System.Drawing.Point(207, 44); - this.nightscolormare6.MaximumSize = new System.Drawing.Size(10000, 23); - this.nightscolormare6.MinimumSize = new System.Drawing.Size(100, 23); - this.nightscolormare6.Name = "nightscolormare6"; - this.nightscolormare6.Size = new System.Drawing.Size(168, 23); - this.nightscolormare6.TabIndex = 37; - // - // nightscolormare5 - // - this.nightscolormare5.BackColor = System.Drawing.Color.Transparent; - this.nightscolormare5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.nightscolormare5.Label = "Path color (Mare 5):"; - this.nightscolormare5.Location = new System.Drawing.Point(207, 17); - this.nightscolormare5.MaximumSize = new System.Drawing.Size(10000, 23); - this.nightscolormare5.MinimumSize = new System.Drawing.Size(100, 23); - this.nightscolormare5.Name = "nightscolormare5"; - this.nightscolormare5.Size = new System.Drawing.Size(168, 23); - this.nightscolormare5.TabIndex = 36; - // - // nightscolormare4 - // - this.nightscolormare4.BackColor = System.Drawing.Color.Transparent; - this.nightscolormare4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.nightscolormare4.Label = "Path color (Mare 4):"; - this.nightscolormare4.Location = new System.Drawing.Point(15, 98); - this.nightscolormare4.MaximumSize = new System.Drawing.Size(10000, 23); - this.nightscolormare4.MinimumSize = new System.Drawing.Size(100, 23); - this.nightscolormare4.Name = "nightscolormare4"; - this.nightscolormare4.Size = new System.Drawing.Size(168, 23); - this.nightscolormare4.TabIndex = 35; - // - // nightscolormare3 - // - this.nightscolormare3.BackColor = System.Drawing.Color.Transparent; - this.nightscolormare3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.nightscolormare3.Label = "Path color (Mare 3):"; - this.nightscolormare3.Location = new System.Drawing.Point(15, 71); - this.nightscolormare3.MaximumSize = new System.Drawing.Size(10000, 23); - this.nightscolormare3.MinimumSize = new System.Drawing.Size(100, 23); - this.nightscolormare3.Name = "nightscolormare3"; - this.nightscolormare3.Size = new System.Drawing.Size(168, 23); - this.nightscolormare3.TabIndex = 34; - // - // nightscolormare2 - // - this.nightscolormare2.BackColor = System.Drawing.Color.Transparent; - this.nightscolormare2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.nightscolormare2.Label = "Path color (Mare 2):"; - this.nightscolormare2.Location = new System.Drawing.Point(15, 44); - this.nightscolormare2.MaximumSize = new System.Drawing.Size(10000, 23); - this.nightscolormare2.MinimumSize = new System.Drawing.Size(100, 23); - this.nightscolormare2.Name = "nightscolormare2"; - this.nightscolormare2.Size = new System.Drawing.Size(168, 23); - this.nightscolormare2.TabIndex = 33; - // - // nightscolormare1 - // - this.nightscolormare1.BackColor = System.Drawing.Color.Transparent; - this.nightscolormare1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.nightscolormare1.Label = "Path color (Mare 1):"; - this.nightscolormare1.Location = new System.Drawing.Point(15, 17); - this.nightscolormare1.MaximumSize = new System.Drawing.Size(10000, 23); - this.nightscolormare1.MinimumSize = new System.Drawing.Size(100, 23); - this.nightscolormare1.Name = "nightscolormare1"; - this.nightscolormare1.Size = new System.Drawing.Size(168, 23); - this.nightscolormare1.TabIndex = 29; - // - // label23 - // - this.label23.AutoSize = true; - this.label23.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label23.Location = new System.Drawing.Point(399, 90); - this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(102, 13); - this.label23.TabIndex = 31; - this.label23.Text = "Axis circle precision:"; - this.label23.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // nightscircleprecision - // - this.nightscircleprecision.BackColor = System.Drawing.SystemColors.Window; - this.nightscircleprecision.LargeChange = 1; - this.nightscircleprecision.Location = new System.Drawing.Point(501, 78); - this.nightscircleprecision.Maximum = 36; - this.nightscircleprecision.Minimum = 1; - this.nightscircleprecision.Name = "nightscircleprecision"; - this.nightscircleprecision.Size = new System.Drawing.Size(130, 45); - this.nightscircleprecision.TabIndex = 30; - this.nightscircleprecision.TickStyle = System.Windows.Forms.TickStyle.TopLeft; - this.nightscircleprecision.Value = 36; - // - // nightscircleprecisionlabel - // - this.nightscircleprecisionlabel.AutoSize = true; - this.nightscircleprecisionlabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.nightscircleprecisionlabel.Location = new System.Drawing.Point(634, 90); - this.nightscircleprecisionlabel.Name = "nightscircleprecisionlabel"; - this.nightscircleprecisionlabel.Size = new System.Drawing.Size(25, 13); - this.nightscircleprecisionlabel.TabIndex = 32; - this.nightscircleprecisionlabel.Text = "360"; - // - // waypointcolor1 - // - this.waypointcolor1.BackColor = System.Drawing.Color.Transparent; - this.waypointcolor1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.waypointcolor1.Label = "Waypoint path color:"; - this.waypointcolor1.Location = new System.Drawing.Point(399, 17); - this.waypointcolor1.MaximumSize = new System.Drawing.Size(10000, 23); - this.waypointcolor1.MinimumSize = new System.Drawing.Size(100, 23); - this.waypointcolor1.Name = "waypointcolor1"; - this.waypointcolor1.Size = new System.Drawing.Size(198, 23); - this.waypointcolor1.TabIndex = 29; - // - // waypointcolor2 - // - this.waypointcolor2.BackColor = System.Drawing.Color.Transparent; - this.waypointcolor2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.waypointcolor2.Label = "Waypoint path color (loop):"; - this.waypointcolor2.Location = new System.Drawing.Point(399, 44); - this.waypointcolor2.MaximumSize = new System.Drawing.Size(10000, 23); - this.waypointcolor2.MinimumSize = new System.Drawing.Size(100, 23); - this.waypointcolor2.Name = "waypointcolor2"; - this.waypointcolor2.Size = new System.Drawing.Size(198, 23); - this.waypointcolor2.TabIndex = 29; - // - // tabscripteditor - // - this.tabscripteditor.Controls.Add(this.groupBox9); - this.tabscripteditor.Controls.Add(this.groupBox8); - this.tabscripteditor.Controls.Add(this.groupBox7); - this.tabscripteditor.Controls.Add(this.groupBox6); - this.tabscripteditor.Controls.Add(this.previewgroup); - this.tabscripteditor.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabscripteditor.Location = new System.Drawing.Point(4, 22); - this.tabscripteditor.Name = "tabscripteditor"; - this.tabscripteditor.Size = new System.Drawing.Size(682, 533); - this.tabscripteditor.TabIndex = 4; - this.tabscripteditor.Text = "Script Editor"; - this.tabscripteditor.UseVisualStyleBackColor = true; - // - // groupBox9 - // - this.groupBox9.Controls.Add(this.scriptshowfolding); - this.groupBox9.Controls.Add(this.scriptshowlinenumbers); - this.groupBox9.Location = new System.Drawing.Point(217, 260); - this.groupBox9.Name = "groupBox9"; - this.groupBox9.Size = new System.Drawing.Size(457, 78); - this.groupBox9.TabIndex = 6; - this.groupBox9.TabStop = false; - this.groupBox9.Text = " Appearance "; - // - // scriptshowfolding - // - this.scriptshowfolding.AutoSize = true; - this.scriptshowfolding.Location = new System.Drawing.Point(19, 49); - this.scriptshowfolding.Name = "scriptshowfolding"; - this.scriptshowfolding.Size = new System.Drawing.Size(120, 17); - this.scriptshowfolding.TabIndex = 38; - this.scriptshowfolding.Text = "Enable code folding"; - this.scriptshowfolding.UseVisualStyleBackColor = true; - this.scriptshowfolding.CheckedChanged += new System.EventHandler(this.scriptshowfolding_CheckedChanged); - // - // scriptshowlinenumbers - // - this.scriptshowlinenumbers.AutoSize = true; - this.scriptshowlinenumbers.Location = new System.Drawing.Point(19, 26); - this.scriptshowlinenumbers.Name = "scriptshowlinenumbers"; - this.scriptshowlinenumbers.Size = new System.Drawing.Size(115, 17); - this.scriptshowlinenumbers.TabIndex = 37; - this.scriptshowlinenumbers.Text = "Show line numbers"; - this.scriptshowlinenumbers.UseVisualStyleBackColor = true; - this.scriptshowlinenumbers.CheckedChanged += new System.EventHandler(this.scriptshowlinenumbers_CheckedChanged); - // - // groupBox8 - // - this.groupBox8.Controls.Add(this.scriptautoshowautocompletion); - this.groupBox8.Controls.Add(this.scriptautoclosebrackets); - this.groupBox8.Controls.Add(this.scriptusetabs); - this.groupBox8.Controls.Add(this.scriptallmanstyle); - this.groupBox8.Controls.Add(this.label10); - this.groupBox8.Controls.Add(this.scriptautoindent); - this.groupBox8.Controls.Add(this.scripttabwidth); - this.groupBox8.Location = new System.Drawing.Point(217, 104); - this.groupBox8.Name = "groupBox8"; - this.groupBox8.Size = new System.Drawing.Size(457, 148); - this.groupBox8.TabIndex = 5; - this.groupBox8.TabStop = false; - this.groupBox8.Text = " Formatting "; - // - // scriptautoshowautocompletion - // - this.scriptautoshowautocompletion.AutoSize = true; - this.scriptautoshowautocompletion.Location = new System.Drawing.Point(19, 118); - this.scriptautoshowautocompletion.Name = "scriptautoshowautocompletion"; - this.scriptautoshowautocompletion.Size = new System.Drawing.Size(169, 17); - this.scriptautoshowautocompletion.TabIndex = 37; - this.scriptautoshowautocompletion.Text = "Auto show auto-completion list"; - this.scriptautoshowautocompletion.UseVisualStyleBackColor = true; - // - // scriptautoclosebrackets - // - this.scriptautoclosebrackets.AutoSize = true; - this.scriptautoclosebrackets.Location = new System.Drawing.Point(19, 72); - this.scriptautoclosebrackets.Name = "scriptautoclosebrackets"; - this.scriptautoclosebrackets.Size = new System.Drawing.Size(120, 17); - this.scriptautoclosebrackets.TabIndex = 36; - this.scriptautoclosebrackets.Text = "Auto-close brackets"; - this.toolTip1.SetToolTip(this.scriptautoclosebrackets, "When enabled, the editor will automatically\r\ninsert closing bracket if opening br" + + this.cbOldHighlightMode.UseVisualStyleBackColor = true; + // + // labelDynLightCount + // + this.labelDynLightCount.AutoSize = true; + this.labelDynLightCount.Enabled = false; + this.labelDynLightCount.Location = new System.Drawing.Point(354, 230); + this.labelDynLightCount.Name = "labelDynLightCount"; + this.labelDynLightCount.Size = new System.Drawing.Size(19, 13); + this.labelDynLightCount.TabIndex = 26; + this.labelDynLightCount.Text = "16"; + this.labelDynLightCount.Visible = false; + // + // tbDynLightCount + // + this.tbDynLightCount.BackColor = System.Drawing.SystemColors.Window; + this.tbDynLightCount.Enabled = false; + this.tbDynLightCount.LargeChange = 3; + this.tbDynLightCount.Location = new System.Drawing.Point(194, 223); + this.tbDynLightCount.Maximum = 32; + this.tbDynLightCount.Minimum = 1; + this.tbDynLightCount.Name = "tbDynLightCount"; + this.tbDynLightCount.Size = new System.Drawing.Size(154, 45); + this.tbDynLightCount.TabIndex = 24; + this.tbDynLightCount.TickFrequency = 4; + this.tbDynLightCount.TickStyle = System.Windows.Forms.TickStyle.TopLeft; + this.tbDynLightCount.Value = 1; + this.tbDynLightCount.Visible = false; + this.tbDynLightCount.ValueChanged += new System.EventHandler(this.tbDynLightCount_ValueChanged); + // + // animatevisualselection + // + this.animatevisualselection.AutoSize = true; + this.animatevisualselection.Location = new System.Drawing.Point(237, 281); + this.animatevisualselection.Name = "animatevisualselection"; + this.animatevisualselection.Size = new System.Drawing.Size(184, 17); + this.animatevisualselection.TabIndex = 23; + this.animatevisualselection.Text = "Animate selection in visual modes"; + this.animatevisualselection.UseVisualStyleBackColor = true; + // + // blackbrowsers + // + this.blackbrowsers.AutoSize = true; + this.blackbrowsers.Location = new System.Drawing.Point(25, 260); + this.blackbrowsers.Name = "blackbrowsers"; + this.blackbrowsers.Size = new System.Drawing.Size(195, 17); + this.blackbrowsers.TabIndex = 4; + this.blackbrowsers.Text = "Black background in image browser"; + this.blackbrowsers.UseVisualStyleBackColor = true; + // + // visualbilinear + // + this.visualbilinear.AutoSize = true; + this.visualbilinear.Location = new System.Drawing.Point(25, 323); + this.visualbilinear.Name = "visualbilinear"; + this.visualbilinear.Size = new System.Drawing.Size(171, 17); + this.visualbilinear.TabIndex = 6; + this.visualbilinear.Text = "Bilinear filtering in visual modes"; + this.visualbilinear.UseVisualStyleBackColor = true; + // + // classicbilinear + // + this.classicbilinear.AutoSize = true; + this.classicbilinear.Location = new System.Drawing.Point(25, 302); + this.classicbilinear.Name = "classicbilinear"; + this.classicbilinear.Size = new System.Drawing.Size(176, 17); + this.classicbilinear.TabIndex = 5; + this.classicbilinear.Text = "Bilinear filtering in classic modes"; + this.classicbilinear.UseVisualStyleBackColor = true; + // + // imagebrightnesslabel + // + this.imagebrightnesslabel.AutoSize = true; + this.imagebrightnesslabel.Location = new System.Drawing.Point(354, 64); + this.imagebrightnesslabel.Name = "imagebrightnesslabel"; + this.imagebrightnesslabel.Size = new System.Drawing.Size(30, 13); + this.imagebrightnesslabel.TabIndex = 22; + this.imagebrightnesslabel.Text = "+ 0 y"; + // + // imagebrightness + // + this.imagebrightness.BackColor = System.Drawing.SystemColors.Window; + this.imagebrightness.LargeChange = 3; + this.imagebrightness.Location = new System.Drawing.Point(193, 53); + this.imagebrightness.Name = "imagebrightness"; + this.imagebrightness.Size = new System.Drawing.Size(154, 45); + this.imagebrightness.TabIndex = 3; + this.imagebrightness.TickStyle = System.Windows.Forms.TickStyle.TopLeft; + this.imagebrightness.ValueChanged += new System.EventHandler(this.imagebrightness_ValueChanged); + // + // nightsgroup + // + this.nightsgroup.Controls.Add(this.nightscolormare8); + this.nightsgroup.Controls.Add(this.nightscolormare7); + this.nightsgroup.Controls.Add(this.nightscolormare6); + this.nightsgroup.Controls.Add(this.nightscolormare5); + this.nightsgroup.Controls.Add(this.nightscolormare4); + this.nightsgroup.Controls.Add(this.nightscolormare3); + this.nightsgroup.Controls.Add(this.nightscolormare2); + this.nightsgroup.Controls.Add(this.nightscolormare1); + this.nightsgroup.Controls.Add(this.label23); + this.nightsgroup.Controls.Add(this.nightscircleprecision); + this.nightsgroup.Controls.Add(this.nightscircleprecisionlabel); + this.nightsgroup.Controls.Add(this.waypointcolor1); + this.nightsgroup.Controls.Add(this.waypointcolor2); + this.nightsgroup.Location = new System.Drawing.Point(8, 401); + this.nightsgroup.Name = "nightsgroup"; + this.nightsgroup.Size = new System.Drawing.Size(666, 129); + this.nightsgroup.TabIndex = 4; + this.nightsgroup.TabStop = false; + this.nightsgroup.Text = "Waypoints / NiGHTS Display"; + // + // nightscolormare8 + // + this.nightscolormare8.BackColor = System.Drawing.Color.Transparent; + this.nightscolormare8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nightscolormare8.Label = "Path color (Mare 8):"; + this.nightscolormare8.Location = new System.Drawing.Point(207, 98); + this.nightscolormare8.MaximumSize = new System.Drawing.Size(10000, 23); + this.nightscolormare8.MinimumSize = new System.Drawing.Size(100, 23); + this.nightscolormare8.Name = "nightscolormare8"; + this.nightscolormare8.Size = new System.Drawing.Size(168, 23); + this.nightscolormare8.TabIndex = 39; + // + // nightscolormare7 + // + this.nightscolormare7.BackColor = System.Drawing.Color.Transparent; + this.nightscolormare7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nightscolormare7.Label = "Path color (Mare 7):"; + this.nightscolormare7.Location = new System.Drawing.Point(207, 71); + this.nightscolormare7.MaximumSize = new System.Drawing.Size(10000, 23); + this.nightscolormare7.MinimumSize = new System.Drawing.Size(100, 23); + this.nightscolormare7.Name = "nightscolormare7"; + this.nightscolormare7.Size = new System.Drawing.Size(168, 23); + this.nightscolormare7.TabIndex = 38; + // + // nightscolormare6 + // + this.nightscolormare6.BackColor = System.Drawing.Color.Transparent; + this.nightscolormare6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nightscolormare6.Label = "Path color (Mare 6):"; + this.nightscolormare6.Location = new System.Drawing.Point(207, 44); + this.nightscolormare6.MaximumSize = new System.Drawing.Size(10000, 23); + this.nightscolormare6.MinimumSize = new System.Drawing.Size(100, 23); + this.nightscolormare6.Name = "nightscolormare6"; + this.nightscolormare6.Size = new System.Drawing.Size(168, 23); + this.nightscolormare6.TabIndex = 37; + // + // nightscolormare5 + // + this.nightscolormare5.BackColor = System.Drawing.Color.Transparent; + this.nightscolormare5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nightscolormare5.Label = "Path color (Mare 5):"; + this.nightscolormare5.Location = new System.Drawing.Point(207, 17); + this.nightscolormare5.MaximumSize = new System.Drawing.Size(10000, 23); + this.nightscolormare5.MinimumSize = new System.Drawing.Size(100, 23); + this.nightscolormare5.Name = "nightscolormare5"; + this.nightscolormare5.Size = new System.Drawing.Size(168, 23); + this.nightscolormare5.TabIndex = 36; + // + // nightscolormare4 + // + this.nightscolormare4.BackColor = System.Drawing.Color.Transparent; + this.nightscolormare4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nightscolormare4.Label = "Path color (Mare 4):"; + this.nightscolormare4.Location = new System.Drawing.Point(15, 98); + this.nightscolormare4.MaximumSize = new System.Drawing.Size(10000, 23); + this.nightscolormare4.MinimumSize = new System.Drawing.Size(100, 23); + this.nightscolormare4.Name = "nightscolormare4"; + this.nightscolormare4.Size = new System.Drawing.Size(168, 23); + this.nightscolormare4.TabIndex = 35; + // + // nightscolormare3 + // + this.nightscolormare3.BackColor = System.Drawing.Color.Transparent; + this.nightscolormare3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nightscolormare3.Label = "Path color (Mare 3):"; + this.nightscolormare3.Location = new System.Drawing.Point(15, 71); + this.nightscolormare3.MaximumSize = new System.Drawing.Size(10000, 23); + this.nightscolormare3.MinimumSize = new System.Drawing.Size(100, 23); + this.nightscolormare3.Name = "nightscolormare3"; + this.nightscolormare3.Size = new System.Drawing.Size(168, 23); + this.nightscolormare3.TabIndex = 34; + // + // nightscolormare2 + // + this.nightscolormare2.BackColor = System.Drawing.Color.Transparent; + this.nightscolormare2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nightscolormare2.Label = "Path color (Mare 2):"; + this.nightscolormare2.Location = new System.Drawing.Point(15, 44); + this.nightscolormare2.MaximumSize = new System.Drawing.Size(10000, 23); + this.nightscolormare2.MinimumSize = new System.Drawing.Size(100, 23); + this.nightscolormare2.Name = "nightscolormare2"; + this.nightscolormare2.Size = new System.Drawing.Size(168, 23); + this.nightscolormare2.TabIndex = 33; + // + // nightscolormare1 + // + this.nightscolormare1.BackColor = System.Drawing.Color.Transparent; + this.nightscolormare1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nightscolormare1.Label = "Path color (Mare 1):"; + this.nightscolormare1.Location = new System.Drawing.Point(15, 17); + this.nightscolormare1.MaximumSize = new System.Drawing.Size(10000, 23); + this.nightscolormare1.MinimumSize = new System.Drawing.Size(100, 23); + this.nightscolormare1.Name = "nightscolormare1"; + this.nightscolormare1.Size = new System.Drawing.Size(168, 23); + this.nightscolormare1.TabIndex = 29; + // + // label23 + // + this.label23.AutoSize = true; + this.label23.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label23.Location = new System.Drawing.Point(399, 90); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(102, 13); + this.label23.TabIndex = 31; + this.label23.Text = "Axis circle precision:"; + this.label23.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // nightscircleprecision + // + this.nightscircleprecision.BackColor = System.Drawing.SystemColors.Window; + this.nightscircleprecision.LargeChange = 1; + this.nightscircleprecision.Location = new System.Drawing.Point(501, 78); + this.nightscircleprecision.Maximum = 36; + this.nightscircleprecision.Minimum = 1; + this.nightscircleprecision.Name = "nightscircleprecision"; + this.nightscircleprecision.Size = new System.Drawing.Size(130, 45); + this.nightscircleprecision.TabIndex = 30; + this.nightscircleprecision.TickStyle = System.Windows.Forms.TickStyle.TopLeft; + this.nightscircleprecision.Value = 36; + // + // nightscircleprecisionlabel + // + this.nightscircleprecisionlabel.AutoSize = true; + this.nightscircleprecisionlabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nightscircleprecisionlabel.Location = new System.Drawing.Point(634, 90); + this.nightscircleprecisionlabel.Name = "nightscircleprecisionlabel"; + this.nightscircleprecisionlabel.Size = new System.Drawing.Size(25, 13); + this.nightscircleprecisionlabel.TabIndex = 32; + this.nightscircleprecisionlabel.Text = "360"; + // + // waypointcolor1 + // + this.waypointcolor1.BackColor = System.Drawing.Color.Transparent; + this.waypointcolor1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.waypointcolor1.Label = "Waypoint path color:"; + this.waypointcolor1.Location = new System.Drawing.Point(399, 17); + this.waypointcolor1.MaximumSize = new System.Drawing.Size(10000, 23); + this.waypointcolor1.MinimumSize = new System.Drawing.Size(100, 23); + this.waypointcolor1.Name = "waypointcolor1"; + this.waypointcolor1.Size = new System.Drawing.Size(198, 23); + this.waypointcolor1.TabIndex = 29; + // + // waypointcolor2 + // + this.waypointcolor2.BackColor = System.Drawing.Color.Transparent; + this.waypointcolor2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.waypointcolor2.Label = "Waypoint path color (loop):"; + this.waypointcolor2.Location = new System.Drawing.Point(399, 44); + this.waypointcolor2.MaximumSize = new System.Drawing.Size(10000, 23); + this.waypointcolor2.MinimumSize = new System.Drawing.Size(100, 23); + this.waypointcolor2.Name = "waypointcolor2"; + this.waypointcolor2.Size = new System.Drawing.Size(198, 23); + this.waypointcolor2.TabIndex = 29; + // + // tabscripteditor + // + this.tabscripteditor.Controls.Add(this.groupBox9); + this.tabscripteditor.Controls.Add(this.groupBox8); + this.tabscripteditor.Controls.Add(this.groupBox7); + this.tabscripteditor.Controls.Add(this.groupBox6); + this.tabscripteditor.Controls.Add(this.previewgroup); + this.tabscripteditor.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tabscripteditor.Location = new System.Drawing.Point(4, 22); + this.tabscripteditor.Name = "tabscripteditor"; + this.tabscripteditor.Size = new System.Drawing.Size(682, 533); + this.tabscripteditor.TabIndex = 4; + this.tabscripteditor.Text = "Script Editor"; + this.tabscripteditor.UseVisualStyleBackColor = true; + // + // groupBox9 + // + this.groupBox9.Controls.Add(this.scriptshowfolding); + this.groupBox9.Controls.Add(this.scriptshowlinenumbers); + this.groupBox9.Location = new System.Drawing.Point(217, 260); + this.groupBox9.Name = "groupBox9"; + this.groupBox9.Size = new System.Drawing.Size(457, 78); + this.groupBox9.TabIndex = 6; + this.groupBox9.TabStop = false; + this.groupBox9.Text = " Appearance "; + // + // scriptshowfolding + // + this.scriptshowfolding.AutoSize = true; + this.scriptshowfolding.Location = new System.Drawing.Point(19, 49); + this.scriptshowfolding.Name = "scriptshowfolding"; + this.scriptshowfolding.Size = new System.Drawing.Size(120, 17); + this.scriptshowfolding.TabIndex = 38; + this.scriptshowfolding.Text = "Enable code folding"; + this.scriptshowfolding.UseVisualStyleBackColor = true; + this.scriptshowfolding.CheckedChanged += new System.EventHandler(this.scriptshowfolding_CheckedChanged); + // + // scriptshowlinenumbers + // + this.scriptshowlinenumbers.AutoSize = true; + this.scriptshowlinenumbers.Location = new System.Drawing.Point(19, 26); + this.scriptshowlinenumbers.Name = "scriptshowlinenumbers"; + this.scriptshowlinenumbers.Size = new System.Drawing.Size(115, 17); + this.scriptshowlinenumbers.TabIndex = 37; + this.scriptshowlinenumbers.Text = "Show line numbers"; + this.scriptshowlinenumbers.UseVisualStyleBackColor = true; + this.scriptshowlinenumbers.CheckedChanged += new System.EventHandler(this.scriptshowlinenumbers_CheckedChanged); + // + // groupBox8 + // + this.groupBox8.Controls.Add(this.scriptautoshowautocompletion); + this.groupBox8.Controls.Add(this.scriptautoclosebrackets); + this.groupBox8.Controls.Add(this.scriptusetabs); + this.groupBox8.Controls.Add(this.scriptallmanstyle); + this.groupBox8.Controls.Add(this.label10); + this.groupBox8.Controls.Add(this.scriptautoindent); + this.groupBox8.Controls.Add(this.scripttabwidth); + this.groupBox8.Location = new System.Drawing.Point(217, 104); + this.groupBox8.Name = "groupBox8"; + this.groupBox8.Size = new System.Drawing.Size(457, 148); + this.groupBox8.TabIndex = 5; + this.groupBox8.TabStop = false; + this.groupBox8.Text = " Formatting "; + // + // scriptautoshowautocompletion + // + this.scriptautoshowautocompletion.AutoSize = true; + this.scriptautoshowautocompletion.Location = new System.Drawing.Point(19, 118); + this.scriptautoshowautocompletion.Name = "scriptautoshowautocompletion"; + this.scriptautoshowautocompletion.Size = new System.Drawing.Size(169, 17); + this.scriptautoshowautocompletion.TabIndex = 37; + this.scriptautoshowautocompletion.Text = "Auto show auto-completion list"; + this.scriptautoshowautocompletion.UseVisualStyleBackColor = true; + // + // scriptautoclosebrackets + // + this.scriptautoclosebrackets.AutoSize = true; + this.scriptautoclosebrackets.Location = new System.Drawing.Point(19, 72); + this.scriptautoclosebrackets.Name = "scriptautoclosebrackets"; + this.scriptautoclosebrackets.Size = new System.Drawing.Size(120, 17); + this.scriptautoclosebrackets.TabIndex = 36; + this.scriptautoclosebrackets.Text = "Auto-close brackets"; + this.toolTip1.SetToolTip(this.scriptautoclosebrackets, "When enabled, the editor will automatically\r\ninsert closing bracket if opening br" + "acket was typed."); - this.scriptautoclosebrackets.UseVisualStyleBackColor = true; - // - // scriptusetabs - // - this.scriptusetabs.AutoSize = true; - this.scriptusetabs.Location = new System.Drawing.Point(19, 26); - this.scriptusetabs.Name = "scriptusetabs"; - this.scriptusetabs.Size = new System.Drawing.Size(68, 17); - this.scriptusetabs.TabIndex = 35; - this.scriptusetabs.Text = "Use tabs"; - this.scriptusetabs.UseVisualStyleBackColor = true; - // - // scriptallmanstyle - // - this.scriptallmanstyle.AutoSize = true; - this.scriptallmanstyle.Location = new System.Drawing.Point(19, 95); - this.scriptallmanstyle.Name = "scriptallmanstyle"; - this.scriptallmanstyle.Size = new System.Drawing.Size(119, 17); - this.scriptallmanstyle.TabIndex = 34; - this.scriptallmanstyle.Text = "Allman-style bracing"; - this.toolTip1.SetToolTip(this.scriptallmanstyle, resources.GetString("scriptallmanstyle.ToolTip")); - this.scriptallmanstyle.UseVisualStyleBackColor = true; - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(121, 27); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(57, 13); - this.label10.TabIndex = 30; - this.label10.Text = "Tab width:"; - // - // scriptautoindent - // - this.scriptautoindent.AutoSize = true; - this.scriptautoindent.Location = new System.Drawing.Point(19, 49); - this.scriptautoindent.Name = "scriptautoindent"; - this.scriptautoindent.Size = new System.Drawing.Size(80, 17); - this.scriptautoindent.TabIndex = 31; - this.scriptautoindent.Text = "Auto indent"; - this.scriptautoindent.UseVisualStyleBackColor = true; - // - // scripttabwidth - // - this.scripttabwidth.AllowDecimal = false; - this.scripttabwidth.AllowNegative = false; - this.scripttabwidth.AllowRelative = false; - this.scripttabwidth.ButtonStep = 2; - this.scripttabwidth.ButtonStepBig = 10F; - this.scripttabwidth.ButtonStepFloat = 1F; - this.scripttabwidth.ButtonStepSmall = 0.1F; - this.scripttabwidth.ButtonStepsUseModifierKeys = false; - this.scripttabwidth.ButtonStepsWrapAround = false; - this.scripttabwidth.Location = new System.Drawing.Point(181, 22); - this.scripttabwidth.MaximumValue = 2147483647; - this.scripttabwidth.Name = "scripttabwidth"; - this.scripttabwidth.Size = new System.Drawing.Size(71, 24); - this.scripttabwidth.StepValues = null; - this.scripttabwidth.TabIndex = 32; - this.scripttabwidth.WhenTextChanged += new System.EventHandler(this.scripttabwidth_WhenTextChanged); - // - // groupBox7 - // - this.groupBox7.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.scriptautoclosebrackets.UseVisualStyleBackColor = true; + // + // scriptusetabs + // + this.scriptusetabs.AutoSize = true; + this.scriptusetabs.Location = new System.Drawing.Point(19, 26); + this.scriptusetabs.Name = "scriptusetabs"; + this.scriptusetabs.Size = new System.Drawing.Size(68, 17); + this.scriptusetabs.TabIndex = 35; + this.scriptusetabs.Text = "Use tabs"; + this.scriptusetabs.UseVisualStyleBackColor = true; + // + // scriptallmanstyle + // + this.scriptallmanstyle.AutoSize = true; + this.scriptallmanstyle.Location = new System.Drawing.Point(19, 95); + this.scriptallmanstyle.Name = "scriptallmanstyle"; + this.scriptallmanstyle.Size = new System.Drawing.Size(119, 17); + this.scriptallmanstyle.TabIndex = 34; + this.scriptallmanstyle.Text = "Allman-style bracing"; + this.toolTip1.SetToolTip(this.scriptallmanstyle, resources.GetString("scriptallmanstyle.ToolTip")); + this.scriptallmanstyle.UseVisualStyleBackColor = true; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(121, 27); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(57, 13); + this.label10.TabIndex = 30; + this.label10.Text = "Tab width:"; + // + // scriptautoindent + // + this.scriptautoindent.AutoSize = true; + this.scriptautoindent.Location = new System.Drawing.Point(19, 49); + this.scriptautoindent.Name = "scriptautoindent"; + this.scriptautoindent.Size = new System.Drawing.Size(80, 17); + this.scriptautoindent.TabIndex = 31; + this.scriptautoindent.Text = "Auto indent"; + this.scriptautoindent.UseVisualStyleBackColor = true; + // + // scripttabwidth + // + this.scripttabwidth.AllowDecimal = false; + this.scripttabwidth.AllowExpressions = false; + this.scripttabwidth.AllowNegative = false; + this.scripttabwidth.AllowRelative = false; + this.scripttabwidth.ButtonStep = 2; + this.scripttabwidth.ButtonStepBig = 10F; + this.scripttabwidth.ButtonStepFloat = 1F; + this.scripttabwidth.ButtonStepSmall = 0.1F; + this.scripttabwidth.ButtonStepsUseModifierKeys = false; + this.scripttabwidth.ButtonStepsWrapAround = false; + this.scripttabwidth.Location = new System.Drawing.Point(181, 22); + this.scripttabwidth.MaximumValue = 2147483647; + this.scripttabwidth.Name = "scripttabwidth"; + this.scripttabwidth.Size = new System.Drawing.Size(71, 24); + this.scripttabwidth.StepValues = null; + this.scripttabwidth.TabIndex = 32; + this.scripttabwidth.WhenTextChanged += new System.EventHandler(this.scripttabwidth_WhenTextChanged); + // + // groupBox7 + // + this.groupBox7.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.groupBox7.Controls.Add(this.label3); - this.groupBox7.Controls.Add(this.scriptfontname); - this.groupBox7.Controls.Add(this.scriptfontbold); - this.groupBox7.Controls.Add(this.label8); - this.groupBox7.Controls.Add(this.scriptfontsize); - this.groupBox7.Location = new System.Drawing.Point(217, 8); - this.groupBox7.Name = "groupBox7"; - this.groupBox7.Size = new System.Drawing.Size(457, 90); - this.groupBox7.TabIndex = 4; - this.groupBox7.TabStop = false; - this.groupBox7.Text = " Font "; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(16, 27); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(31, 13); - this.label3.TabIndex = 24; - this.label3.Text = "Font:"; - // - // scriptfontname - // - this.scriptfontname.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.scriptfontname.FormattingEnabled = true; - this.scriptfontname.Location = new System.Drawing.Point(53, 24); - this.scriptfontname.Name = "scriptfontname"; - this.scriptfontname.Size = new System.Drawing.Size(199, 21); - this.scriptfontname.Sorted = true; - this.scriptfontname.TabIndex = 23; - this.scriptfontname.SelectedIndexChanged += new System.EventHandler(this.scriptfontname_SelectedIndexChanged); - // - // scriptfontbold - // - this.scriptfontbold.AutoSize = true; - this.scriptfontbold.Location = new System.Drawing.Point(165, 56); - this.scriptfontbold.Name = "scriptfontbold"; - this.scriptfontbold.Size = new System.Drawing.Size(47, 17); - this.scriptfontbold.TabIndex = 26; - this.scriptfontbold.Text = "Bold"; - this.scriptfontbold.UseVisualStyleBackColor = true; - this.scriptfontbold.CheckedChanged += new System.EventHandler(this.scriptfontbold_CheckedChanged); - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(16, 56); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(30, 13); - this.label8.TabIndex = 28; - this.label8.Text = "Size:"; - // - // scriptfontsize - // - this.scriptfontsize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.scriptfontsize.FormattingEnabled = true; - this.scriptfontsize.Items.AddRange(new object[] { + this.groupBox7.Controls.Add(this.label3); + this.groupBox7.Controls.Add(this.scriptfontname); + this.groupBox7.Controls.Add(this.scriptfontbold); + this.groupBox7.Controls.Add(this.label8); + this.groupBox7.Controls.Add(this.scriptfontsize); + this.groupBox7.Location = new System.Drawing.Point(217, 8); + this.groupBox7.Name = "groupBox7"; + this.groupBox7.Size = new System.Drawing.Size(457, 90); + this.groupBox7.TabIndex = 4; + this.groupBox7.TabStop = false; + this.groupBox7.Text = " Font "; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(16, 27); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(31, 13); + this.label3.TabIndex = 24; + this.label3.Text = "Font:"; + // + // scriptfontname + // + this.scriptfontname.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.scriptfontname.FormattingEnabled = true; + this.scriptfontname.Location = new System.Drawing.Point(53, 24); + this.scriptfontname.Name = "scriptfontname"; + this.scriptfontname.Size = new System.Drawing.Size(199, 21); + this.scriptfontname.Sorted = true; + this.scriptfontname.TabIndex = 23; + this.scriptfontname.SelectedIndexChanged += new System.EventHandler(this.scriptfontname_SelectedIndexChanged); + // + // scriptfontbold + // + this.scriptfontbold.AutoSize = true; + this.scriptfontbold.Location = new System.Drawing.Point(165, 56); + this.scriptfontbold.Name = "scriptfontbold"; + this.scriptfontbold.Size = new System.Drawing.Size(47, 17); + this.scriptfontbold.TabIndex = 26; + this.scriptfontbold.Text = "Bold"; + this.scriptfontbold.UseVisualStyleBackColor = true; + this.scriptfontbold.CheckedChanged += new System.EventHandler(this.scriptfontbold_CheckedChanged); + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(16, 56); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(30, 13); + this.label8.TabIndex = 28; + this.label8.Text = "Size:"; + // + // scriptfontsize + // + this.scriptfontsize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.scriptfontsize.FormattingEnabled = true; + this.scriptfontsize.Items.AddRange(new object[] { "7", "8", "9", @@ -2184,405 +2314,407 @@ namespace CodeImp.DoomBuilder.Windows "36", "48", "72"}); - this.scriptfontsize.Location = new System.Drawing.Point(53, 53); - this.scriptfontsize.Name = "scriptfontsize"; - this.scriptfontsize.Size = new System.Drawing.Size(94, 21); - this.scriptfontsize.TabIndex = 25; - this.scriptfontsize.SelectedIndexChanged += new System.EventHandler(this.scriptfontsize_SelectedIndexChanged); - // - // groupBox6 - // - this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.scriptfontsize.Location = new System.Drawing.Point(53, 53); + this.scriptfontsize.Name = "scriptfontsize"; + this.scriptfontsize.Size = new System.Drawing.Size(94, 21); + this.scriptfontsize.TabIndex = 25; + this.scriptfontsize.SelectedIndexChanged += new System.EventHandler(this.scriptfontsize_SelectedIndexChanged); + // + // groupBox6 + // + this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left))); - this.groupBox6.Controls.Add(this.colorproperties); - this.groupBox6.Controls.Add(this.label28); - this.groupBox6.Controls.Add(this.scriptcolorpresets); - this.groupBox6.Controls.Add(this.colorfoldback); - this.groupBox6.Controls.Add(this.colorfoldfore); - this.groupBox6.Controls.Add(this.colorindicator); - this.groupBox6.Controls.Add(this.colorwhitespace); - this.groupBox6.Controls.Add(this.colorbracebad); - this.groupBox6.Controls.Add(this.colorbrace); - this.groupBox6.Controls.Add(this.colorselectionback); - this.groupBox6.Controls.Add(this.colorselectionfore); - this.groupBox6.Controls.Add(this.colorincludes); - this.groupBox6.Controls.Add(this.colorstrings); - this.groupBox6.Controls.Add(this.colorscriptbackground); - this.groupBox6.Controls.Add(this.colorplaintext); - this.groupBox6.Controls.Add(this.colorcomments); - this.groupBox6.Controls.Add(this.colorlinenumbers); - this.groupBox6.Controls.Add(this.colorkeywords); - this.groupBox6.Controls.Add(this.colorliterals); - this.groupBox6.Controls.Add(this.colorconstants); - this.groupBox6.Location = new System.Drawing.Point(8, 8); - this.groupBox6.Name = "groupBox6"; - this.groupBox6.Size = new System.Drawing.Size(203, 493); - this.groupBox6.TabIndex = 3; - this.groupBox6.TabStop = false; - this.groupBox6.Text = " Colors "; - // - // colorproperties - // - this.colorproperties.BackColor = System.Drawing.Color.Transparent; - this.colorproperties.Label = "Keywords:"; - this.colorproperties.Location = new System.Drawing.Point(15, 169); - this.colorproperties.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorproperties.MinimumSize = new System.Drawing.Size(100, 16); - this.colorproperties.Name = "colorproperties"; - this.colorproperties.Size = new System.Drawing.Size(168, 21); - this.colorproperties.TabIndex = 41; - this.colorproperties.ColorChanged += new System.EventHandler(this.colorproperties_ColorChanged); - // - // label28 - // - this.label28.AutoSize = true; - this.label28.Location = new System.Drawing.Point(15, 22); - this.label28.Name = "label28"; - this.label28.Size = new System.Drawing.Size(40, 13); - this.label28.TabIndex = 40; - this.label28.Text = "Preset:"; - // - // scriptcolorpresets - // - this.scriptcolorpresets.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.scriptcolorpresets.FormattingEnabled = true; - this.scriptcolorpresets.Items.AddRange(new object[] { + this.groupBox6.Controls.Add(this.colorproperties); + this.groupBox6.Controls.Add(this.label28); + this.groupBox6.Controls.Add(this.scriptcolorpresets); + this.groupBox6.Controls.Add(this.colorfoldback); + this.groupBox6.Controls.Add(this.colorfoldfore); + this.groupBox6.Controls.Add(this.colorindicator); + this.groupBox6.Controls.Add(this.colorwhitespace); + this.groupBox6.Controls.Add(this.colorbracebad); + this.groupBox6.Controls.Add(this.colorbrace); + this.groupBox6.Controls.Add(this.colorselectionback); + this.groupBox6.Controls.Add(this.colorselectionfore); + this.groupBox6.Controls.Add(this.colorincludes); + this.groupBox6.Controls.Add(this.colorstrings); + this.groupBox6.Controls.Add(this.colorscriptbackground); + this.groupBox6.Controls.Add(this.colorplaintext); + this.groupBox6.Controls.Add(this.colorcomments); + this.groupBox6.Controls.Add(this.colorlinenumbers); + this.groupBox6.Controls.Add(this.colorkeywords); + this.groupBox6.Controls.Add(this.colorliterals); + this.groupBox6.Controls.Add(this.colorconstants); + this.groupBox6.Location = new System.Drawing.Point(8, 8); + this.groupBox6.Name = "groupBox6"; + this.groupBox6.Size = new System.Drawing.Size(203, 493); + this.groupBox6.TabIndex = 3; + this.groupBox6.TabStop = false; + this.groupBox6.Text = " Colors "; + // + // colorproperties + // + this.colorproperties.BackColor = System.Drawing.Color.Transparent; + this.colorproperties.Label = "Keywords:"; + this.colorproperties.Location = new System.Drawing.Point(15, 169); + this.colorproperties.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorproperties.MinimumSize = new System.Drawing.Size(100, 16); + this.colorproperties.Name = "colorproperties"; + this.colorproperties.Size = new System.Drawing.Size(168, 21); + this.colorproperties.TabIndex = 41; + this.colorproperties.ColorChanged += new System.EventHandler(this.colorproperties_ColorChanged); + // + // label28 + // + this.label28.AutoSize = true; + this.label28.Location = new System.Drawing.Point(15, 22); + this.label28.Name = "label28"; + this.label28.Size = new System.Drawing.Size(40, 13); + this.label28.TabIndex = 40; + this.label28.Text = "Preset:"; + // + // scriptcolorpresets + // + this.scriptcolorpresets.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.scriptcolorpresets.FormattingEnabled = true; + this.scriptcolorpresets.Items.AddRange(new object[] { "Use current settings", "Light theme", "Dark theme"}); - this.scriptcolorpresets.Location = new System.Drawing.Point(61, 18); - this.scriptcolorpresets.Name = "scriptcolorpresets"; - this.scriptcolorpresets.Size = new System.Drawing.Size(122, 21); - this.scriptcolorpresets.TabIndex = 39; - this.scriptcolorpresets.SelectedIndexChanged += new System.EventHandler(this.scriptcolorpresets_SelectedIndexChanged); - // - // colorfoldback - // - this.colorfoldback.BackColor = System.Drawing.Color.Transparent; - this.colorfoldback.Label = "Fold BG:"; - this.colorfoldback.Location = new System.Drawing.Point(15, 457); - this.colorfoldback.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorfoldback.MinimumSize = new System.Drawing.Size(100, 16); - this.colorfoldback.Name = "colorfoldback"; - this.colorfoldback.Size = new System.Drawing.Size(168, 21); - this.colorfoldback.TabIndex = 16; - this.colorfoldback.ColorChanged += new System.EventHandler(this.colorfoldback_ColorChanged); - // - // colorfoldfore - // - this.colorfoldfore.BackColor = System.Drawing.Color.Transparent; - this.colorfoldfore.Label = "Fold:"; - this.colorfoldfore.Location = new System.Drawing.Point(15, 433); - this.colorfoldfore.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorfoldfore.MinimumSize = new System.Drawing.Size(100, 16); - this.colorfoldfore.Name = "colorfoldfore"; - this.colorfoldfore.Size = new System.Drawing.Size(168, 21); - this.colorfoldfore.TabIndex = 15; - this.colorfoldfore.ColorChanged += new System.EventHandler(this.colorfoldfore_ColorChanged); - // - // colorindicator - // - this.colorindicator.BackColor = System.Drawing.Color.Transparent; - this.colorindicator.Label = "Matching word:"; - this.colorindicator.Location = new System.Drawing.Point(15, 337); - this.colorindicator.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorindicator.MinimumSize = new System.Drawing.Size(100, 16); - this.colorindicator.Name = "colorindicator"; - this.colorindicator.Size = new System.Drawing.Size(168, 21); - this.colorindicator.TabIndex = 14; - this.colorindicator.ColorChanged += new System.EventHandler(this.colorindicator_ColorChanged); - // - // colorwhitespace - // - this.colorwhitespace.BackColor = System.Drawing.Color.Transparent; - this.colorwhitespace.Label = "Whitespace:"; - this.colorwhitespace.Location = new System.Drawing.Point(15, 409); - this.colorwhitespace.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorwhitespace.MinimumSize = new System.Drawing.Size(100, 16); - this.colorwhitespace.Name = "colorwhitespace"; - this.colorwhitespace.Size = new System.Drawing.Size(168, 21); - this.colorwhitespace.TabIndex = 13; - this.colorwhitespace.ColorChanged += new System.EventHandler(this.colorwhitespace_ColorChanged); - // - // colorbracebad - // - this.colorbracebad.BackColor = System.Drawing.Color.Transparent; - this.colorbracebad.Label = "Mismatching brace:"; - this.colorbracebad.Location = new System.Drawing.Point(15, 385); - this.colorbracebad.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorbracebad.MinimumSize = new System.Drawing.Size(100, 16); - this.colorbracebad.Name = "colorbracebad"; - this.colorbracebad.Size = new System.Drawing.Size(168, 21); - this.colorbracebad.TabIndex = 12; - this.colorbracebad.ColorChanged += new System.EventHandler(this.colorbracebad_ColorChanged); - // - // colorbrace - // - this.colorbrace.BackColor = System.Drawing.Color.Transparent; - this.colorbrace.Label = "Matching brace:"; - this.colorbrace.Location = new System.Drawing.Point(15, 361); - this.colorbrace.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorbrace.MinimumSize = new System.Drawing.Size(100, 16); - this.colorbrace.Name = "colorbrace"; - this.colorbrace.Size = new System.Drawing.Size(168, 21); - this.colorbrace.TabIndex = 11; - this.colorbrace.ColorChanged += new System.EventHandler(this.colorbrace_ColorChanged); - // - // colorselectionback - // - this.colorselectionback.BackColor = System.Drawing.Color.Transparent; - this.colorselectionback.Label = "Selection BG:"; - this.colorselectionback.Location = new System.Drawing.Point(15, 313); - this.colorselectionback.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorselectionback.MinimumSize = new System.Drawing.Size(100, 16); - this.colorselectionback.Name = "colorselectionback"; - this.colorselectionback.Size = new System.Drawing.Size(168, 21); - this.colorselectionback.TabIndex = 10; - this.colorselectionback.ColorChanged += new System.EventHandler(this.colorselectionback_ColorChanged); - // - // colorselectionfore - // - this.colorselectionfore.BackColor = System.Drawing.Color.Transparent; - this.colorselectionfore.Label = "Selection:"; - this.colorselectionfore.Location = new System.Drawing.Point(15, 289); - this.colorselectionfore.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorselectionfore.MinimumSize = new System.Drawing.Size(100, 16); - this.colorselectionfore.Name = "colorselectionfore"; - this.colorselectionfore.Size = new System.Drawing.Size(168, 21); - this.colorselectionfore.TabIndex = 9; - this.colorselectionfore.ColorChanged += new System.EventHandler(this.colorselectionfore_ColorChanged); - // - // colorincludes - // - this.colorincludes.BackColor = System.Drawing.Color.Transparent; - this.colorincludes.Label = "Includes:"; - this.colorincludes.Location = new System.Drawing.Point(15, 265); - this.colorincludes.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorincludes.MinimumSize = new System.Drawing.Size(100, 16); - this.colorincludes.Name = "colorincludes"; - this.colorincludes.Size = new System.Drawing.Size(168, 21); - this.colorincludes.TabIndex = 8; - this.colorincludes.ColorChanged += new System.EventHandler(this.colorincludes_ColorChanged); - // - // colorstrings - // - this.colorstrings.BackColor = System.Drawing.Color.Transparent; - this.colorstrings.Label = "Strings:"; - this.colorstrings.Location = new System.Drawing.Point(15, 193); - this.colorstrings.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorstrings.MinimumSize = new System.Drawing.Size(100, 16); - this.colorstrings.Name = "colorstrings"; - this.colorstrings.Size = new System.Drawing.Size(168, 21); - this.colorstrings.TabIndex = 7; - this.colorstrings.ColorChanged += new System.EventHandler(this.colorstrings_ColorChanged); - // - // colorscriptbackground - // - this.colorscriptbackground.BackColor = System.Drawing.Color.Transparent; - this.colorscriptbackground.Label = "Background:"; - this.colorscriptbackground.Location = new System.Drawing.Point(15, 49); - this.colorscriptbackground.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorscriptbackground.MinimumSize = new System.Drawing.Size(100, 16); - this.colorscriptbackground.Name = "colorscriptbackground"; - this.colorscriptbackground.Size = new System.Drawing.Size(168, 21); - this.colorscriptbackground.TabIndex = 0; - this.colorscriptbackground.ColorChanged += new System.EventHandler(this.colorscriptbackground_ColorChanged); - // - // colorplaintext - // - this.colorplaintext.BackColor = System.Drawing.Color.Transparent; - this.colorplaintext.Label = "Plain text:"; - this.colorplaintext.Location = new System.Drawing.Point(15, 97); - this.colorplaintext.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorplaintext.MinimumSize = new System.Drawing.Size(100, 16); - this.colorplaintext.Name = "colorplaintext"; - this.colorplaintext.Size = new System.Drawing.Size(168, 21); - this.colorplaintext.TabIndex = 2; - this.colorplaintext.ColorChanged += new System.EventHandler(this.colorplaintext_ColorChanged); - // - // colorcomments - // - this.colorcomments.BackColor = System.Drawing.Color.Transparent; - this.colorcomments.Label = "Comments:"; - this.colorcomments.Location = new System.Drawing.Point(15, 121); - this.colorcomments.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorcomments.MinimumSize = new System.Drawing.Size(100, 16); - this.colorcomments.Name = "colorcomments"; - this.colorcomments.Size = new System.Drawing.Size(168, 21); - this.colorcomments.TabIndex = 3; - this.colorcomments.ColorChanged += new System.EventHandler(this.colorcomments_ColorChanged); - // - // colorlinenumbers - // - this.colorlinenumbers.BackColor = System.Drawing.Color.Transparent; - this.colorlinenumbers.Label = "Line numbers:"; - this.colorlinenumbers.Location = new System.Drawing.Point(15, 73); - this.colorlinenumbers.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorlinenumbers.MinimumSize = new System.Drawing.Size(100, 16); - this.colorlinenumbers.Name = "colorlinenumbers"; - this.colorlinenumbers.Size = new System.Drawing.Size(168, 21); - this.colorlinenumbers.TabIndex = 1; - this.colorlinenumbers.ColorChanged += new System.EventHandler(this.colorlinenumbers_ColorChanged); - // - // colorkeywords - // - this.colorkeywords.BackColor = System.Drawing.Color.Transparent; - this.colorkeywords.Label = "Functions:"; - this.colorkeywords.Location = new System.Drawing.Point(15, 145); - this.colorkeywords.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorkeywords.MinimumSize = new System.Drawing.Size(100, 16); - this.colorkeywords.Name = "colorkeywords"; - this.colorkeywords.Size = new System.Drawing.Size(168, 21); - this.colorkeywords.TabIndex = 4; - this.colorkeywords.ColorChanged += new System.EventHandler(this.colorkeywords_ColorChanged); - // - // colorliterals - // - this.colorliterals.BackColor = System.Drawing.Color.Transparent; - this.colorliterals.Label = "Numbers:"; - this.colorliterals.Location = new System.Drawing.Point(15, 217); - this.colorliterals.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorliterals.MinimumSize = new System.Drawing.Size(100, 16); - this.colorliterals.Name = "colorliterals"; - this.colorliterals.Size = new System.Drawing.Size(168, 21); - this.colorliterals.TabIndex = 5; - this.colorliterals.ColorChanged += new System.EventHandler(this.colorliterals_ColorChanged); - // - // colorconstants - // - this.colorconstants.BackColor = System.Drawing.Color.Transparent; - this.colorconstants.Label = "Constants:"; - this.colorconstants.Location = new System.Drawing.Point(15, 241); - this.colorconstants.MaximumSize = new System.Drawing.Size(10000, 23); - this.colorconstants.MinimumSize = new System.Drawing.Size(100, 16); - this.colorconstants.Name = "colorconstants"; - this.colorconstants.Size = new System.Drawing.Size(168, 21); - this.colorconstants.TabIndex = 6; - this.colorconstants.ColorChanged += new System.EventHandler(this.colorconstants_ColorChanged); - // - // previewgroup - // - this.previewgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.scriptcolorpresets.Location = new System.Drawing.Point(61, 18); + this.scriptcolorpresets.Name = "scriptcolorpresets"; + this.scriptcolorpresets.Size = new System.Drawing.Size(122, 21); + this.scriptcolorpresets.TabIndex = 39; + this.scriptcolorpresets.SelectedIndexChanged += new System.EventHandler(this.scriptcolorpresets_SelectedIndexChanged); + // + // colorfoldback + // + this.colorfoldback.BackColor = System.Drawing.Color.Transparent; + this.colorfoldback.Label = "Fold BG:"; + this.colorfoldback.Location = new System.Drawing.Point(15, 457); + this.colorfoldback.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorfoldback.MinimumSize = new System.Drawing.Size(100, 16); + this.colorfoldback.Name = "colorfoldback"; + this.colorfoldback.Size = new System.Drawing.Size(168, 21); + this.colorfoldback.TabIndex = 16; + this.colorfoldback.ColorChanged += new System.EventHandler(this.colorfoldback_ColorChanged); + // + // colorfoldfore + // + this.colorfoldfore.BackColor = System.Drawing.Color.Transparent; + this.colorfoldfore.Label = "Fold:"; + this.colorfoldfore.Location = new System.Drawing.Point(15, 433); + this.colorfoldfore.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorfoldfore.MinimumSize = new System.Drawing.Size(100, 16); + this.colorfoldfore.Name = "colorfoldfore"; + this.colorfoldfore.Size = new System.Drawing.Size(168, 21); + this.colorfoldfore.TabIndex = 15; + this.colorfoldfore.ColorChanged += new System.EventHandler(this.colorfoldfore_ColorChanged); + // + // colorindicator + // + this.colorindicator.BackColor = System.Drawing.Color.Transparent; + this.colorindicator.Label = "Matching word:"; + this.colorindicator.Location = new System.Drawing.Point(15, 337); + this.colorindicator.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorindicator.MinimumSize = new System.Drawing.Size(100, 16); + this.colorindicator.Name = "colorindicator"; + this.colorindicator.Size = new System.Drawing.Size(168, 21); + this.colorindicator.TabIndex = 14; + this.colorindicator.ColorChanged += new System.EventHandler(this.colorindicator_ColorChanged); + // + // colorwhitespace + // + this.colorwhitespace.BackColor = System.Drawing.Color.Transparent; + this.colorwhitespace.Label = "Whitespace:"; + this.colorwhitespace.Location = new System.Drawing.Point(15, 409); + this.colorwhitespace.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorwhitespace.MinimumSize = new System.Drawing.Size(100, 16); + this.colorwhitespace.Name = "colorwhitespace"; + this.colorwhitespace.Size = new System.Drawing.Size(168, 21); + this.colorwhitespace.TabIndex = 13; + this.colorwhitespace.ColorChanged += new System.EventHandler(this.colorwhitespace_ColorChanged); + // + // colorbracebad + // + this.colorbracebad.BackColor = System.Drawing.Color.Transparent; + this.colorbracebad.Label = "Mismatching brace:"; + this.colorbracebad.Location = new System.Drawing.Point(15, 385); + this.colorbracebad.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorbracebad.MinimumSize = new System.Drawing.Size(100, 16); + this.colorbracebad.Name = "colorbracebad"; + this.colorbracebad.Size = new System.Drawing.Size(168, 21); + this.colorbracebad.TabIndex = 12; + this.colorbracebad.ColorChanged += new System.EventHandler(this.colorbracebad_ColorChanged); + // + // colorbrace + // + this.colorbrace.BackColor = System.Drawing.Color.Transparent; + this.colorbrace.Label = "Matching brace:"; + this.colorbrace.Location = new System.Drawing.Point(15, 361); + this.colorbrace.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorbrace.MinimumSize = new System.Drawing.Size(100, 16); + this.colorbrace.Name = "colorbrace"; + this.colorbrace.Size = new System.Drawing.Size(168, 21); + this.colorbrace.TabIndex = 11; + this.colorbrace.ColorChanged += new System.EventHandler(this.colorbrace_ColorChanged); + // + // colorselectionback + // + this.colorselectionback.BackColor = System.Drawing.Color.Transparent; + this.colorselectionback.Label = "Selection BG:"; + this.colorselectionback.Location = new System.Drawing.Point(15, 313); + this.colorselectionback.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorselectionback.MinimumSize = new System.Drawing.Size(100, 16); + this.colorselectionback.Name = "colorselectionback"; + this.colorselectionback.Size = new System.Drawing.Size(168, 21); + this.colorselectionback.TabIndex = 10; + this.colorselectionback.ColorChanged += new System.EventHandler(this.colorselectionback_ColorChanged); + // + // colorselectionfore + // + this.colorselectionfore.BackColor = System.Drawing.Color.Transparent; + this.colorselectionfore.Label = "Selection:"; + this.colorselectionfore.Location = new System.Drawing.Point(15, 289); + this.colorselectionfore.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorselectionfore.MinimumSize = new System.Drawing.Size(100, 16); + this.colorselectionfore.Name = "colorselectionfore"; + this.colorselectionfore.Size = new System.Drawing.Size(168, 21); + this.colorselectionfore.TabIndex = 9; + this.colorselectionfore.ColorChanged += new System.EventHandler(this.colorselectionfore_ColorChanged); + // + // colorincludes + // + this.colorincludes.BackColor = System.Drawing.Color.Transparent; + this.colorincludes.Label = "Includes:"; + this.colorincludes.Location = new System.Drawing.Point(15, 265); + this.colorincludes.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorincludes.MinimumSize = new System.Drawing.Size(100, 16); + this.colorincludes.Name = "colorincludes"; + this.colorincludes.Size = new System.Drawing.Size(168, 21); + this.colorincludes.TabIndex = 8; + this.colorincludes.ColorChanged += new System.EventHandler(this.colorincludes_ColorChanged); + // + // colorstrings + // + this.colorstrings.BackColor = System.Drawing.Color.Transparent; + this.colorstrings.Label = "Strings:"; + this.colorstrings.Location = new System.Drawing.Point(15, 193); + this.colorstrings.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorstrings.MinimumSize = new System.Drawing.Size(100, 16); + this.colorstrings.Name = "colorstrings"; + this.colorstrings.Size = new System.Drawing.Size(168, 21); + this.colorstrings.TabIndex = 7; + this.colorstrings.ColorChanged += new System.EventHandler(this.colorstrings_ColorChanged); + // + // colorscriptbackground + // + this.colorscriptbackground.BackColor = System.Drawing.Color.Transparent; + this.colorscriptbackground.Label = "Background:"; + this.colorscriptbackground.Location = new System.Drawing.Point(15, 49); + this.colorscriptbackground.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorscriptbackground.MinimumSize = new System.Drawing.Size(100, 16); + this.colorscriptbackground.Name = "colorscriptbackground"; + this.colorscriptbackground.Size = new System.Drawing.Size(168, 21); + this.colorscriptbackground.TabIndex = 0; + this.colorscriptbackground.ColorChanged += new System.EventHandler(this.colorscriptbackground_ColorChanged); + // + // colorplaintext + // + this.colorplaintext.BackColor = System.Drawing.Color.Transparent; + this.colorplaintext.Label = "Plain text:"; + this.colorplaintext.Location = new System.Drawing.Point(15, 97); + this.colorplaintext.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorplaintext.MinimumSize = new System.Drawing.Size(100, 16); + this.colorplaintext.Name = "colorplaintext"; + this.colorplaintext.Size = new System.Drawing.Size(168, 21); + this.colorplaintext.TabIndex = 2; + this.colorplaintext.ColorChanged += new System.EventHandler(this.colorplaintext_ColorChanged); + // + // colorcomments + // + this.colorcomments.BackColor = System.Drawing.Color.Transparent; + this.colorcomments.Label = "Comments:"; + this.colorcomments.Location = new System.Drawing.Point(15, 121); + this.colorcomments.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorcomments.MinimumSize = new System.Drawing.Size(100, 16); + this.colorcomments.Name = "colorcomments"; + this.colorcomments.Size = new System.Drawing.Size(168, 21); + this.colorcomments.TabIndex = 3; + this.colorcomments.ColorChanged += new System.EventHandler(this.colorcomments_ColorChanged); + // + // colorlinenumbers + // + this.colorlinenumbers.BackColor = System.Drawing.Color.Transparent; + this.colorlinenumbers.Label = "Line numbers:"; + this.colorlinenumbers.Location = new System.Drawing.Point(15, 73); + this.colorlinenumbers.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorlinenumbers.MinimumSize = new System.Drawing.Size(100, 16); + this.colorlinenumbers.Name = "colorlinenumbers"; + this.colorlinenumbers.Size = new System.Drawing.Size(168, 21); + this.colorlinenumbers.TabIndex = 1; + this.colorlinenumbers.ColorChanged += new System.EventHandler(this.colorlinenumbers_ColorChanged); + // + // colorkeywords + // + this.colorkeywords.BackColor = System.Drawing.Color.Transparent; + this.colorkeywords.Label = "Functions:"; + this.colorkeywords.Location = new System.Drawing.Point(15, 145); + this.colorkeywords.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorkeywords.MinimumSize = new System.Drawing.Size(100, 16); + this.colorkeywords.Name = "colorkeywords"; + this.colorkeywords.Size = new System.Drawing.Size(168, 21); + this.colorkeywords.TabIndex = 4; + this.colorkeywords.ColorChanged += new System.EventHandler(this.colorkeywords_ColorChanged); + // + // colorliterals + // + this.colorliterals.BackColor = System.Drawing.Color.Transparent; + this.colorliterals.Label = "Numbers:"; + this.colorliterals.Location = new System.Drawing.Point(15, 217); + this.colorliterals.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorliterals.MinimumSize = new System.Drawing.Size(100, 16); + this.colorliterals.Name = "colorliterals"; + this.colorliterals.Size = new System.Drawing.Size(168, 21); + this.colorliterals.TabIndex = 5; + this.colorliterals.ColorChanged += new System.EventHandler(this.colorliterals_ColorChanged); + // + // colorconstants + // + this.colorconstants.BackColor = System.Drawing.Color.Transparent; + this.colorconstants.Label = "Constants:"; + this.colorconstants.Location = new System.Drawing.Point(15, 241); + this.colorconstants.MaximumSize = new System.Drawing.Size(10000, 23); + this.colorconstants.MinimumSize = new System.Drawing.Size(100, 16); + this.colorconstants.Name = "colorconstants"; + this.colorconstants.Size = new System.Drawing.Size(168, 21); + this.colorconstants.TabIndex = 6; + this.colorconstants.ColorChanged += new System.EventHandler(this.colorconstants_ColorChanged); + // + // previewgroup + // + this.previewgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.previewgroup.Location = new System.Drawing.Point(217, 344); - this.previewgroup.Name = "previewgroup"; - this.previewgroup.Size = new System.Drawing.Size(457, 157); - this.previewgroup.TabIndex = 2; - this.previewgroup.TabStop = false; - this.previewgroup.Text = " Preview "; - // - // tabpasting - // - this.tabpasting.Controls.Add(this.label16); - this.tabpasting.Controls.Add(this.pasteoptions); - this.tabpasting.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.tabpasting.Location = new System.Drawing.Point(4, 22); - this.tabpasting.Name = "tabpasting"; - this.tabpasting.Padding = new System.Windows.Forms.Padding(5); - this.tabpasting.Size = new System.Drawing.Size(682, 533); - this.tabpasting.TabIndex = 3; - this.tabpasting.Text = "Pasting "; - this.tabpasting.UseVisualStyleBackColor = true; - // - // label16 - // - this.label16.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.previewgroup.Location = new System.Drawing.Point(217, 344); + this.previewgroup.Name = "previewgroup"; + this.previewgroup.Size = new System.Drawing.Size(457, 157); + this.previewgroup.TabIndex = 2; + this.previewgroup.TabStop = false; + this.previewgroup.Text = " Preview "; + // + // tabpasting + // + this.tabpasting.Controls.Add(this.label16); + this.tabpasting.Controls.Add(this.pasteoptions); + this.tabpasting.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tabpasting.Location = new System.Drawing.Point(4, 22); + this.tabpasting.Name = "tabpasting"; + this.tabpasting.Padding = new System.Windows.Forms.Padding(5); + this.tabpasting.Size = new System.Drawing.Size(682, 533); + this.tabpasting.TabIndex = 3; + this.tabpasting.Text = "Pasting "; + this.tabpasting.UseVisualStyleBackColor = true; + // + // label16 + // + this.label16.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.label16.Location = new System.Drawing.Point(11, 15); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(649, 35); - this.label16.TabIndex = 1; - this.label16.Text = "These are the default options for pasting geometry. You can also choose these opt" + + this.label16.Location = new System.Drawing.Point(11, 15); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(649, 35); + this.label16.TabIndex = 1; + this.label16.Text = "These are the default options for pasting geometry. You can also choose these opt" + "ions when you use the Paste Special function. These options also apply when inse" + "rting prefabs."; - // - // pasteoptions - // - this.pasteoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + // + // pasteoptions + // + this.pasteoptions.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.pasteoptions.Location = new System.Drawing.Point(8, 53); - this.pasteoptions.Name = "pasteoptions"; - this.pasteoptions.Size = new System.Drawing.Size(666, 450); - this.pasteoptions.TabIndex = 0; - // - // browseScreenshotsFolderDialog - // - this.browseScreenshotsFolderDialog.Description = "Select a Folder to Save Screenshots Into"; - // - // PreferencesForm - // - this.AcceptButton = this.apply; - 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(711, 617); - this.Controls.Add(this.cancel); - this.Controls.Add(this.apply); - this.Controls.Add(this.tabs); - this.DoubleBuffered = true; - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "PreferencesForm"; - this.Opacity = 1D; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Preferences"; - this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.PreferencesForm_HelpRequested); - groupBox1.ResumeLayout(false); - groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.maxBackups)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.recentFiles)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.vertexScale)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.zoomfactor)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.autoscrollspeed)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.previewsize)).EndInit(); - this.colorsgroup1.ResumeLayout(false); - this.colorsgroup1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.doublesidedalpha)).EndInit(); - this.tabs.ResumeLayout(false); - this.tabinterface.ResumeLayout(false); - this.groupBox3.ResumeLayout(false); - this.groupBox3.PerformLayout(); - this.groupBox5.ResumeLayout(false); - this.groupBox5.PerformLayout(); - this.groupBox4.ResumeLayout(false); - this.groupBox4.PerformLayout(); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.vertexScale3D)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.viewdistance)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.movespeed)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.mousespeed)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.fieldofview)).EndInit(); - this.tabkeys.ResumeLayout(false); - this.tabkeys.PerformLayout(); - this.actioncontrolpanel.ResumeLayout(false); - this.actioncontrolpanel.PerformLayout(); - this.tabcolors.ResumeLayout(false); - this.appearancegroup1.ResumeLayout(false); - this.appearancegroup1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tbDefaultThingSize)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbDynLightIntensity)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbDynLightSize)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbDynLightCount)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.imagebrightness)).EndInit(); - this.nightsgroup.ResumeLayout(false); - this.nightsgroup.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nightscircleprecision)).EndInit(); - this.tabscripteditor.ResumeLayout(false); - this.groupBox9.ResumeLayout(false); - this.groupBox9.PerformLayout(); - this.groupBox8.ResumeLayout(false); - this.groupBox8.PerformLayout(); - this.groupBox7.ResumeLayout(false); - this.groupBox7.PerformLayout(); - this.groupBox6.ResumeLayout(false); - this.groupBox6.PerformLayout(); - this.tabpasting.ResumeLayout(false); - this.ResumeLayout(false); + this.pasteoptions.Location = new System.Drawing.Point(8, 53); + this.pasteoptions.Name = "pasteoptions"; + this.pasteoptions.Size = new System.Drawing.Size(666, 450); + this.pasteoptions.TabIndex = 0; + // + // browseScreenshotsFolderDialog + // + this.browseScreenshotsFolderDialog.Description = "Select a Folder to Save Screenshots Into"; + // + // PreferencesForm + // + this.AcceptButton = this.apply; + 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(711, 617); + this.Controls.Add(this.cancel); + this.Controls.Add(this.apply); + this.Controls.Add(this.tabs); + this.DoubleBuffered = true; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "PreferencesForm"; + this.Opacity = 0D; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Preferences"; + this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.PreferencesForm_HelpRequested); + groupBox1.ResumeLayout(false); + groupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.maxBackups)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.recentFiles)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.vertexScale)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.zoomfactor)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.autoscrollspeed)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.previewsize)).EndInit(); + this.colorsgroup1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.doublesidedalpha)).EndInit(); + this.tabs.ResumeLayout(false); + this.tabinterface.ResumeLayout(false); + this.groupBox11.ResumeLayout(false); + this.groupBox11.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.groupBox5.ResumeLayout(false); + this.groupBox5.PerformLayout(); + this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.vertexScale3D)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.viewdistance)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.movespeed)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.mousespeed)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.fieldofview)).EndInit(); + this.tabkeys.ResumeLayout(false); + this.tabkeys.PerformLayout(); + this.actioncontrolpanel.ResumeLayout(false); + this.actioncontrolpanel.PerformLayout(); + this.tabcolors.ResumeLayout(false); + this.appearancegroup1.ResumeLayout(false); + this.appearancegroup1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.hiddenthingsalpha)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.inactivethingsalpha)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.activethingsalpha)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbDefaultThingSize)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.tbDynLightCount)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.imagebrightness)).EndInit(); + this.nightsgroup.ResumeLayout(false); + this.nightsgroup.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nightscircleprecision)).EndInit(); + this.tabscripteditor.ResumeLayout(false); + this.groupBox9.ResumeLayout(false); + this.groupBox9.PerformLayout(); + this.groupBox8.ResumeLayout(false); + this.groupBox8.PerformLayout(); + this.groupBox7.ResumeLayout(false); + this.groupBox7.PerformLayout(); + this.groupBox6.ResumeLayout(false); + this.groupBox6.PerformLayout(); + this.tabpasting.ResumeLayout(false); + this.ResumeLayout(false); } @@ -2674,10 +2806,6 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.CheckBox toolbar_gzdoom; private System.Windows.Forms.Label labelDynLightCount; private System.Windows.Forms.TrackBar tbDynLightCount; - private System.Windows.Forms.Label labelDynLightSize; - private System.Windows.Forms.TrackBar tbDynLightSize; - private System.Windows.Forms.Label labelDynLightIntensity; - private System.Windows.Forms.TrackBar tbDynLightIntensity; private System.Windows.Forms.CheckBox cbSynchCameras; private System.Windows.Forms.CheckBox cbStretchView; private System.Windows.Forms.ToolTip toolTip1; @@ -2769,5 +2897,18 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.Label labelDefaultThingSize; private System.Windows.Forms.TrackBar tbDefaultThingSize; private System.Windows.Forms.CheckBox keepfilterfocused; - } + private System.Windows.Forms.TrackBar activethingsalpha; + private System.Windows.Forms.TrackBar inactivethingsalpha; + private System.Windows.Forms.TrackBar hiddenthingsalpha; + private System.Windows.Forms.Label activethingsalphalabel; + private System.Windows.Forms.Label inactivethingsalphalabel; + private System.Windows.Forms.Label hiddenthingsalphalabel; + private System.Windows.Forms.GroupBox groupBox11; + private System.Windows.Forms.Label label34; + private System.Windows.Forms.ComboBox textlabelfontname; + private System.Windows.Forms.CheckBox textlabelfontbold; + private System.Windows.Forms.Label label33; + private System.Windows.Forms.ComboBox textlabelfontsize; + private CodeImp.DoomBuilder.Controls.ColorControl colorguidelines; + } } \ No newline at end of file diff --git a/Source/Core/Windows/PreferencesForm.cs b/Source/Core/Windows/PreferencesForm.cs index 7c8b7421d56ff9b45e81c5cfbf6c1c249f45e31b..1dd81608192d3cea3e1adfe8173030211c2b9bf4 100644 --- a/Source/Core/Windows/PreferencesForm.cs +++ b/Source/Core/Windows/PreferencesForm.cs @@ -64,7 +64,10 @@ namespace CodeImp.DoomBuilder.Windows imagebrightness.Value = General.Settings.ImageBrightness; doublesidedalpha.Value = General.Clamp((int)((1.0f - General.Settings.DoubleSidedAlpha) * 10.0f), doublesidedalpha.Minimum, doublesidedalpha.Maximum); nightscircleprecision.Value = General.Clamp((int)(General.Settings.NiGHTSCirclePrecision)/10, nightscircleprecision.Minimum, nightscircleprecision.Maximum); - defaultviewmode.SelectedIndex = General.Settings.DefaultViewMode; + activethingsalpha.Value = General.Clamp((int)((1.0f - General.Settings.ActiveThingsAlpha) * 10.0f), activethingsalpha.Minimum, activethingsalpha.Maximum); //mxd + inactivethingsalpha.Value = General.Clamp((int)((1.0f - General.Settings.InactiveThingsAlpha) * 10.0f), inactivethingsalpha.Minimum, inactivethingsalpha.Maximum); //mxd + hiddenthingsalpha.Value = General.Clamp((int)((1.0f - General.Settings.HiddenThingsAlpha) * 10.0f), hiddenthingsalpha.Minimum, hiddenthingsalpha.Maximum); //mxd + defaultviewmode.SelectedIndex = General.Settings.DefaultViewMode; fieldofview.Value = General.Clamp(General.Settings.VisualFOV / 10, fieldofview.Minimum, fieldofview.Maximum); mousespeed.Value = General.Clamp(General.Settings.MouseSpeed / 100, mousespeed.Minimum, mousespeed.Maximum); movespeed.Value = General.Clamp(General.Settings.MoveSpeed / 100, movespeed.Minimum, movespeed.Maximum); @@ -96,10 +99,6 @@ namespace CodeImp.DoomBuilder.Windows cbSynchCameras.Checked = General.Settings.GZSynchCameras; tbDynLightCount.Value = General.Clamp(General.Settings.GZMaxDynamicLights, tbDynLightCount.Minimum, tbDynLightCount.Maximum); labelDynLightCount.Text = General.Settings.GZMaxDynamicLights.ToString(); - tbDynLightSize.Value = General.Clamp((int)(General.Settings.GZDynamicLightRadius * 10), tbDynLightSize.Minimum, tbDynLightSize.Maximum); - labelDynLightSize.Text = General.Settings.GZDynamicLightRadius.ToString(); - tbDynLightIntensity.Value = General.Clamp((int)(General.Settings.GZDynamicLightIntensity * 10), tbDynLightIntensity.Minimum, tbDynLightIntensity.Maximum); - labelDynLightIntensity.Text = General.Settings.GZDynamicLightIntensity.ToString(); cbStretchView.Checked = General.Settings.GZStretchView; cbOldHighlightMode.Checked = General.Settings.GZOldHighlightMode; vertexScale.Value = General.Clamp((int)(General.Settings.GZVertexScale2D), vertexScale.Minimum, vertexScale.Maximum); @@ -128,24 +127,59 @@ namespace CodeImp.DoomBuilder.Windows scriptshowlinenumbers.Checked = General.Settings.ScriptShowLineNumbers; //mxd scriptautoshowautocompletion.Checked = General.Settings.ScriptAutoShowAutocompletion; //mxd - // Fill script fonts list - scriptfontname.BeginUpdate(); - foreach (FontFamily ff in FontFamily.Families) - scriptfontname.Items.Add(ff.Name); + // Fill script fonts list + scriptfontname.BeginUpdate(); + foreach(FontFamily ff in FontFamily.Families) scriptfontname.Items.Add(ff.Name); scriptfontname.EndUpdate(); // Select script font name for(int i = 0; i < scriptfontname.Items.Count; i++) { if(string.Compare(scriptfontname.Items[i].ToString(), General.Settings.ScriptFontName, true) == 0) + { scriptfontname.SelectedIndex = i; + break; //mxd + } } // Select script font size for(int i = 0; i < scriptfontsize.Items.Count; i++) { - if(string.Compare(scriptfontsize.Items[i].ToString(), General.Settings.ScriptFontSize.ToString(CultureInfo.InvariantCulture), true) == 0) + string fs = General.Settings.ScriptFontSize.ToString(CultureInfo.InvariantCulture); //mxd + if(string.Compare(scriptfontsize.Items[i].ToString(), fs, true) == 0) + { scriptfontsize.SelectedIndex = i; + break; //mxd + } + } + + //mxd. Text labels + textlabelfontbold.Checked = General.Settings.TextLabelFontBold; + + //mxd. Fill text labels fonts list + textlabelfontname.BeginUpdate(); + foreach(FontFamily ff in FontFamily.Families) textlabelfontname.Items.Add(ff.Name); + textlabelfontname.EndUpdate(); + + //mxd. Select text labels font name + for(int i = 0; i < textlabelfontname.Items.Count; i++) + { + if(string.Compare(textlabelfontname.Items[i].ToString(), General.Settings.TextLabelFontName, true) == 0) + { + textlabelfontname.SelectedIndex = i; + break; + } + } + + //mxd. Select text labels font size + for(int i = 0; i < textlabelfontsize.Items.Count; i++) + { + string fs = General.Settings.TextLabelFontSize.ToString(CultureInfo.InvariantCulture); + if(string.Compare(textlabelfontsize.Items[i].ToString(), fs, true) == 0) + { + textlabelfontsize.SelectedIndex = i; + break; + } } // Fill actions list with categories @@ -194,6 +228,7 @@ namespace CodeImp.DoomBuilder.Windows //mxd colorMD3.Color = General.Colors.ModelWireframe; colorInfo.Color = General.Colors.InfoLine; + colorguidelines.Color = General.Colors.Guideline; color3dFloors.Color = General.Colors.ThreeDFloor; // Script editor colors @@ -276,7 +311,10 @@ namespace CodeImp.DoomBuilder.Windows General.Settings.ImageBrightness = imagebrightness.Value; General.Settings.DoubleSidedAlpha = 1.0f - (doublesidedalpha.Value * 0.1f); General.Settings.NiGHTSCirclePrecision = nightscircleprecision.Value * 10; - General.Settings.DefaultViewMode = defaultviewmode.SelectedIndex; + General.Settings.ActiveThingsAlpha = 1.0f - (activethingsalpha.Value * 0.1f); //mxd + General.Settings.InactiveThingsAlpha = 1.0f - (inactivethingsalpha.Value * 0.1f); //mxd + General.Settings.HiddenThingsAlpha = 1.0f - (hiddenthingsalpha.Value * 0.1f); //mxd + General.Settings.DefaultViewMode = defaultviewmode.SelectedIndex; General.Settings.VisualFOV = fieldofview.Value * 10; General.Settings.MouseSpeed = mousespeed.Value * 100; General.Settings.MoveSpeed = movespeed.Value * 100; @@ -324,6 +362,14 @@ namespace CodeImp.DoomBuilder.Windows int fontsize; if(!int.TryParse(scriptfontsize.Text, out fontsize)) fontsize = 10; General.Settings.ScriptFontSize = fontsize; + + //mxd. Text label settings + General.Settings.TextLabelFontBold = textlabelfontbold.Checked; + General.Settings.TextLabelFontName = textlabelfontname.Text; + + //mxd. Text label font size + if(!int.TryParse(textlabelfontsize.Text, out fontsize)) fontsize = 16; + General.Settings.TextLabelFontSize = fontsize; // Apply control keys to actions foreach(ListViewItem item in allactionitems) //mxd @@ -364,6 +410,7 @@ namespace CodeImp.DoomBuilder.Windows //mxd General.Colors.ModelWireframe = colorMD3.Color; General.Colors.InfoLine = colorInfo.Color; + General.Colors.Guideline = colorguidelines.Color; General.Colors.ThreeDFloor = color3dFloors.Color; General.Colors.CreateAssistColors(); @@ -385,8 +432,6 @@ namespace CodeImp.DoomBuilder.Windows //mxd General.Settings.GZSynchCameras = cbSynchCameras.Checked; General.Settings.GZMaxDynamicLights = tbDynLightCount.Value; - General.Settings.GZDynamicLightRadius = (tbDynLightSize.Value / 10.0f); - General.Settings.GZDynamicLightIntensity = (tbDynLightIntensity.Value / 10.0f); General.Settings.GZStretchView = cbStretchView.Checked; General.Settings.GZVertexScale2D = vertexScale.Value; General.Settings.GZOldHighlightMode = cbOldHighlightMode.Checked; @@ -970,22 +1015,31 @@ namespace CodeImp.DoomBuilder.Windows nightscircleprecisionlabel.Text = value.ToString(); } - //mxd - private void tbDynLightCount_ValueChanged(object sender, EventArgs e) + //mxd + private void inactivethingsalpha_ValueChanged(object sender, EventArgs e) { - labelDynLightCount.Text = tbDynLightCount.Value.ToString(); + int percent = inactivethingsalpha.Value * 10; + inactivethingsalphalabel.Text = percent + "%"; } //mxd - private void tbDynLightSize_ValueChanged(object sender, EventArgs e) + private void hiddenthingsalpha_ValueChanged(object sender, EventArgs e) { - labelDynLightSize.Text = ((float)tbDynLightSize.Value / 10).ToString(); + int percent = hiddenthingsalpha.Value * 10; + hiddenthingsalphalabel.Text = percent + "%"; } //mxd - private void tbDynLightIntensity_ValueChanged(object sender, EventArgs e) + private void activethingsalpha_ValueChanged(object sender, EventArgs e) { - labelDynLightIntensity.Text = ((float)tbDynLightIntensity.Value / 10).ToString(); + int percent = activethingsalpha.Value * 10; + activethingsalphalabel.Text = percent + "%"; + } + + //mxd + private void tbDynLightCount_ValueChanged(object sender, EventArgs e) + { + labelDynLightCount.Text = tbDynLightCount.Value.ToString(); } //mxd @@ -1247,7 +1301,12 @@ namespace CodeImp.DoomBuilder.Windows } } - /* + private void label30_Click(object sender, EventArgs e) + { + + } + + /* // This writes all action help files using a template and some basic info from the actions. // Also writes actioncontents.txt with all files to be inserted into Contents.hhc. // Only used during development. Actual button to call this has been removed. @@ -1279,5 +1338,5 @@ namespace CodeImp.DoomBuilder.Windows File.WriteAllText(filename, contents.ToString()); } */ - } + } } \ No newline at end of file diff --git a/Source/Core/Windows/PreferencesForm.resx b/Source/Core/Windows/PreferencesForm.resx index 55313ca94b4e269885a6ffa4392edc45e4108077..9b5b6310e1ed740e8770b2916c1a0cbc4322d06c 100644 --- a/Source/Core/Windows/PreferencesForm.resx +++ b/Source/Core/Windows/PreferencesForm.resx @@ -120,9 +120,6 @@ <metadata name="label7.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>False</value> </metadata> - <metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </metadata> <metadata name="label5.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>False</value> </metadata> @@ -138,13 +135,19 @@ <metadata name="label18.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>False</value> </metadata> - <metadata name="label20.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="label29.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>False</value> + </metadata> + <metadata name="label30.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>False</value> </metadata> - <metadata name="label21.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <metadata name="label31.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>False</value> </metadata> - <metadata name="label29.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <metadata name="label32.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>False</value> </metadata> <data name="scriptallmanstyle.ToolTip" xml:space="preserve"> @@ -161,4 +164,7 @@ they will be replaced with tabs/spaces.</value> <metadata name="browseScreenshotsFolderDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>114, 17</value> </metadata> + <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>50</value> + </metadata> </root> \ No newline at end of file diff --git a/Source/Core/Windows/ResourceOptionsForm.resx b/Source/Core/Windows/ResourceOptionsForm.resx index b8f2b3d9bd45f46dae0306727f9f87d8c831ed74..cafe2e9c87b0c9868a1458e7805f47dd8e91ba68 100644 --- a/Source/Core/Windows/ResourceOptionsForm.resx +++ b/Source/Core/Windows/ResourceOptionsForm.resx @@ -141,6 +141,9 @@ <metadata name="wadfiletab.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> + <data name="label6.Text" xml:space="preserve"> + <value>Use the option above to enforce strictly loading texture patches from between P_START and P_END marker lumps only. This can solve lump name conflicts, but old WAD files do not always adhere to this rule.</value> + </data> <metadata name="strictpatches.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> @@ -165,24 +168,6 @@ <metadata name="pk3location.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> - <data name="label6.Text" xml:space="preserve"> - <value>Use the option above to enforce strictly loading texture patches from between P_START and P_END marker lumps only. This can solve lump name conflicts, but old WAD files do not always adhere to this rule.</value> - </data> - <metadata name="strictpatches.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="wadlocation.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="dir_flats.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="dir_textures.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="dirlocation.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> <metadata name="wadfiledialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> diff --git a/Source/Core/Windows/ScriptEditorForm.Designer.cs b/Source/Core/Windows/ScriptEditorForm.Designer.cs index 3b4e427e7b35309361b785cea1a2ad95742f02a7..6b749cb9a57212443f034094667705bd226a946a 100644 --- a/Source/Core/Windows/ScriptEditorForm.Designer.cs +++ b/Source/Core/Windows/ScriptEditorForm.Designer.cs @@ -52,14 +52,13 @@ namespace CodeImp.DoomBuilder.Windows this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.KeyPreview = true; this.Name = "ScriptEditorForm"; + this.Opacity = 0; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.Text = "Script Editor"; this.Load += new System.EventHandler(this.ScriptEditorForm_Load); this.Shown += new System.EventHandler(this.ScriptEditorForm_Shown); - this.Move += new System.EventHandler(this.ScriptEditorForm_Move); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ScriptEditorForm_FormClosing); this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.ScriptEditorForm_HelpRequested); - this.ResizeEnd += new System.EventHandler(this.ScriptEditorForm_ResizeEnd); this.ResumeLayout(false); } diff --git a/Source/Core/Windows/ScriptEditorForm.cs b/Source/Core/Windows/ScriptEditorForm.cs index 49ae448c6cf8815f21c1b32bde06744c821c9608..b7b218d44c38810cb2e133acd77123072d59929e 100644 --- a/Source/Core/Windows/ScriptEditorForm.cs +++ b/Source/Core/Windows/ScriptEditorForm.cs @@ -29,10 +29,6 @@ namespace CodeImp.DoomBuilder.Windows { #region ================== Variables - // Position/size - private Point lastposition; - private Size lastsize; - // Closing? private bool appclose; @@ -83,22 +79,6 @@ namespace CodeImp.DoomBuilder.Windows // Window is loaded private void ScriptEditorForm_Load(object sender, EventArgs e) { - this.SuspendLayout(); - this.Location = new Point(General.Settings.ReadSetting("scriptswindow.positionx", this.Location.X), - General.Settings.ReadSetting("scriptswindow.positiony", this.Location.Y)); - this.Size = new Size(General.Settings.ReadSetting("scriptswindow.sizewidth", this.Size.Width), - General.Settings.ReadSetting("scriptswindow.sizeheight", this.Size.Height)); - this.WindowState = (FormWindowState)General.Settings.ReadSetting("scriptswindow.windowstate", (int)FormWindowState.Normal); - this.ResumeLayout(true); - - // Normal windowstate? - if(this.WindowState == FormWindowState.Normal) - { - // Keep last position and size - lastposition = this.Location; - lastsize = this.Size; - } - // Apply panel settings editor.ApplySettings(); } @@ -113,24 +93,10 @@ namespace CodeImp.DoomBuilder.Windows // Window is closing private void ScriptEditorForm_FormClosing(object sender, FormClosingEventArgs e) { - int windowstate; - - // Determine window state to save - if(this.WindowState != FormWindowState.Minimized) - windowstate = (int)this.WindowState; - else - windowstate = (int)FormWindowState.Normal; - - // Save window settings - General.Settings.WriteSetting("scriptswindow.positionx", lastposition.X); - General.Settings.WriteSetting("scriptswindow.positiony", lastposition.Y); - General.Settings.WriteSetting("scriptswindow.sizewidth", lastsize.Width); - General.Settings.WriteSetting("scriptswindow.sizeheight", lastsize.Height); - General.Settings.WriteSetting("scriptswindow.windowstate", windowstate); editor.SaveSettings(); // Only when closed by the user - if(!appclose) + if(!appclose && (e.CloseReason == CloseReason.UserClosing || e.CloseReason == CloseReason.FormOwnerClosing)) { // Remember if scipts are changed General.Map.ApplyScriptChanged(); @@ -152,30 +118,6 @@ namespace CodeImp.DoomBuilder.Windows if(!e.Cancel) editor.OnClose(); } - // Window resized - private void ScriptEditorForm_ResizeEnd(object sender, EventArgs e) - { - // Normal windowstate? - if(this.WindowState == FormWindowState.Normal) - { - // Keep last position and size - lastposition = this.Location; - lastsize = this.Size; - } - } - - // Window moved - private void ScriptEditorForm_Move(object sender, EventArgs e) - { - // Normal windowstate? - if(this.WindowState == FormWindowState.Normal) - { - // Keep last position and size - lastposition = this.Location; - lastsize = this.Size; - } - } - // Help private void ScriptEditorForm_HelpRequested(object sender, HelpEventArgs hlpevent) { diff --git a/Source/Core/Windows/ScriptFindReplaceForm.Designer.cs b/Source/Core/Windows/ScriptFindReplaceForm.Designer.cs index 80a60db89a83c027f9959bd7c8c506ea73c8ef32..48cc45a6de3d7819f0848a4b33482f334a982ec2 100644 --- a/Source/Core/Windows/ScriptFindReplaceForm.Designer.cs +++ b/Source/Core/Windows/ScriptFindReplaceForm.Designer.cs @@ -167,7 +167,7 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ScriptFindReplaceForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.Text = "Find and Replace"; diff --git a/Source/Core/Windows/SectorEditForm.Designer.cs b/Source/Core/Windows/SectorEditForm.Designer.cs index 0717ce2da7a9585ca91d1e63cd2d72bf410b332f..a7a05077b9a829ef887e041f6c9505d28d0c2e4b 100644 --- a/Source/Core/Windows/SectorEditForm.Designer.cs +++ b/Source/Core/Windows/SectorEditForm.Designer.cs @@ -214,6 +214,7 @@ namespace CodeImp.DoomBuilder.Windows this.heightoffset.AllowDecimal = false; this.heightoffset.AllowNegative = true; this.heightoffset.AllowRelative = true; + this.heightoffset.AllowExpressions = true; this.heightoffset.ButtonStep = 8; this.heightoffset.ButtonStepBig = 16F; this.heightoffset.ButtonStepFloat = 1F; @@ -250,6 +251,7 @@ namespace CodeImp.DoomBuilder.Windows this.ceilingheight.AllowDecimal = false; this.ceilingheight.AllowNegative = true; this.ceilingheight.AllowRelative = true; + this.ceilingheight.AllowExpressions = true; this.ceilingheight.ButtonStep = 8; this.ceilingheight.ButtonStepBig = 16F; this.ceilingheight.ButtonStepFloat = 1F; @@ -317,6 +319,7 @@ namespace CodeImp.DoomBuilder.Windows this.floorheight.AllowDecimal = false; this.floorheight.AllowNegative = true; this.floorheight.AllowRelative = true; + this.floorheight.AllowExpressions = true; this.floorheight.ButtonStep = 8; this.floorheight.ButtonStepBig = 16F; this.floorheight.ButtonStepFloat = 1F; @@ -415,12 +418,11 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "SectorEditForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Edit Sector"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SectorEditForm_FormClosing); this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.SectorEditForm_HelpRequested); groupeffect.ResumeLayout(false); groupeffect.PerformLayout(); diff --git a/Source/Core/Windows/SectorEditForm.cs b/Source/Core/Windows/SectorEditForm.cs index 47431594188f24469565faecb30a3d562044f511..a1f06ef1e625184cb0f62b82fd0e2f8b2408fd58 100644 --- a/Source/Core/Windows/SectorEditForm.cs +++ b/Source/Core/Windows/SectorEditForm.cs @@ -42,9 +42,6 @@ namespace CodeImp.DoomBuilder.Windows private bool preventchanges; //mxd private bool undocreated; //mxd - //mxd. Window setup stuff - private static Point location = Point.Empty; - private struct SectorProperties //mxd { public readonly int Brightness; @@ -73,13 +70,6 @@ namespace CodeImp.DoomBuilder.Windows // Initialize InitializeComponent(); - //mxd. Widow setup - if(location != Point.Empty) - { - this.StartPosition = FormStartPosition.Manual; - this.Location = location; - } - // Fill effects list effect.GeneralizedOptions = General.Map.Config.GenEffectOptions; //mxd effect.AddInfo(General.Map.Config.SortedSectorEffects.ToArray()); @@ -355,12 +345,6 @@ namespace CodeImp.DoomBuilder.Windows effect.Value = EffectBrowserForm.BrowseEffect(this, effect.Value); } - //mxd - private void SectorEditForm_FormClosing(object sender, FormClosingEventArgs e) - { - location = this.Location; - } - // Help private void SectorEditForm_HelpRequested(object sender, HelpEventArgs hlpevent) { diff --git a/Source/Core/Windows/SectorEditFormUDMF.Designer.cs b/Source/Core/Windows/SectorEditFormUDMF.Designer.cs index a89c5254f62aa76013e13807d88b9f559af53968..422c564edea8dd9c2e066bce97b5c9c5b92bc6eb 100644 --- a/Source/Core/Windows/SectorEditFormUDMF.Designer.cs +++ b/Source/Core/Windows/SectorEditFormUDMF.Designer.cs @@ -398,6 +398,7 @@ this.heightoffset.AllowDecimal = false; this.heightoffset.AllowNegative = true; this.heightoffset.AllowRelative = true; + this.heightoffset.AllowExpressions = true; this.heightoffset.ButtonStep = 8; this.heightoffset.ButtonStepBig = 16F; this.heightoffset.ButtonStepFloat = 1F; @@ -416,6 +417,7 @@ this.ceilingheight.AllowDecimal = false; this.ceilingheight.AllowNegative = true; this.ceilingheight.AllowRelative = true; + this.ceilingheight.AllowExpressions = true; this.ceilingheight.ButtonStep = 8; this.ceilingheight.ButtonStepBig = 16F; this.ceilingheight.ButtonStepFloat = 1F; @@ -452,6 +454,7 @@ this.floorheight.AllowDecimal = false; this.floorheight.AllowNegative = true; this.floorheight.AllowRelative = true; + this.floorheight.AllowExpressions = true; this.floorheight.ButtonStep = 8; this.floorheight.ButtonStepBig = 16F; this.floorheight.ButtonStepFloat = 1F; @@ -604,9 +607,10 @@ // // floorAngleControl // - this.floorAngleControl.Angle = -450; + this.floorAngleControl.Angle = 0; this.floorAngleControl.AngleOffset = 90; - this.floorAngleControl.Location = new System.Drawing.Point(6, 132); + this.floorAngleControl.DoomAngleClamping = false; + this.floorAngleControl.Location = new System.Drawing.Point(6, 156); this.floorAngleControl.Name = "floorAngleControl"; this.floorAngleControl.Size = new System.Drawing.Size(44, 44); this.floorAngleControl.TabIndex = 56; @@ -850,9 +854,10 @@ // // ceilAngleControl // - this.ceilAngleControl.Angle = -450; + this.ceilAngleControl.Angle = 0; this.ceilAngleControl.AngleOffset = 90; - this.ceilAngleControl.Location = new System.Drawing.Point(6, 132); + this.ceilAngleControl.DoomAngleClamping = false; + this.ceilAngleControl.Location = new System.Drawing.Point(6, 156); this.ceilAngleControl.Name = "ceilAngleControl"; this.ceilAngleControl.Size = new System.Drawing.Size(44, 44); this.ceilAngleControl.TabIndex = 55; @@ -1174,7 +1179,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "SectorEditFormUDMF"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Core/Windows/SectorEditFormUDMF.cs b/Source/Core/Windows/SectorEditFormUDMF.cs index c1a26f75bd423d15510fbc1bc6c0b9505bcd2db1..c56225618658f408ee67b44d4f8e77f9135b1642 100644 --- a/Source/Core/Windows/SectorEditFormUDMF.cs +++ b/Source/Core/Windows/SectorEditFormUDMF.cs @@ -314,8 +314,8 @@ namespace CodeImp.DoomBuilder.Windows desaturation.Text = General.Clamp(sc.Fields.GetValue("desaturation", 0.0f), 0f, 1f).ToString(); //Sector colors - fadeColor.SetValueFrom(sc.Fields); - lightColor.SetValueFrom(sc.Fields); + fadeColor.SetValueFrom(sc.Fields, true); + lightColor.SetValueFrom(sc.Fields, true); //Slopes SetupFloorSlope(sc, true); @@ -421,8 +421,8 @@ namespace CodeImp.DoomBuilder.Windows if(s.Fields.GetValue("desaturation", 0.0f).ToString() != desaturation.Text) desaturation.Text = ""; //Sector colors - fadeColor.SetValueFrom(s.Fields); - lightColor.SetValueFrom(s.Fields); + fadeColor.SetValueFrom(s.Fields, false); + lightColor.SetValueFrom(s.Fields, false); //Slopes SetupFloorSlope(s, false); diff --git a/Source/Core/Windows/TextEditForm.Designer.cs b/Source/Core/Windows/TextEditForm.Designer.cs index 309f20c0bf880cfab4f82c9ce68c4cc430936534..4e02dd0e8ab992da4a18e192f18399bb11365d08 100644 --- a/Source/Core/Windows/TextEditForm.Designer.cs +++ b/Source/Core/Windows/TextEditForm.Designer.cs @@ -90,7 +90,7 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "TextEditForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Core/Windows/TextureBrowserForm.Designer.cs b/Source/Core/Windows/TextureBrowserForm.Designer.cs index 58751401848bd3f448c624adff2109c2a5ff9e60..9fd1bab94c0ecfae60d883e97aeb58dca7bb25b9 100644 --- a/Source/Core/Windows/TextureBrowserForm.Designer.cs +++ b/Source/Core/Windows/TextureBrowserForm.Designer.cs @@ -146,6 +146,7 @@ namespace CodeImp.DoomBuilder.Windows this.splitter.Panel2MinSize = 100; this.splitter.Size = new System.Drawing.Size(784, 442); this.splitter.SplitterDistance = 573; + this.splitter.SplitterWidth = 8; this.splitter.TabIndex = 0; this.splitter.TabStop = false; // @@ -161,18 +162,15 @@ namespace CodeImp.DoomBuilder.Windows this.Controls.Add(this.splitter); this.MinimizeBox = false; this.Name = "TextureBrowserForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.Text = "Browse Textures"; - this.Load += new System.EventHandler(this.TextureBrowserForm_Load); this.Shown += new System.EventHandler(this.TextureBrowserForm_Shown); this.Activated += new System.EventHandler(this.TextureBrowserForm_Activated); - this.Move += new System.EventHandler(this.TextureBrowserForm_Move); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.TextureBrowserForm_FormClosing); this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.TextureBrowserForm_HelpRequested); - this.ResizeEnd += new System.EventHandler(this.TextureBrowserForm_ResizeEnd); this.panel.ResumeLayout(false); this.splitter.Panel1.ResumeLayout(false); this.splitter.Panel2.ResumeLayout(false); diff --git a/Source/Core/Windows/TextureBrowserForm.cs b/Source/Core/Windows/TextureBrowserForm.cs index 5b4cd1825a247140afc0008dc46236141fb2d5cf..db6af2daa8a615b7dfa36e84c80fd3af539b0a0c 100644 --- a/Source/Core/Windows/TextureBrowserForm.cs +++ b/Source/Core/Windows/TextureBrowserForm.cs @@ -33,8 +33,6 @@ namespace CodeImp.DoomBuilder.Windows { // Variables private string selectedname; - private Point lastposition; - private Size lastsize; private readonly ListViewGroup usedgroup; private readonly ListViewGroup availgroup; private TreeNode selectedset; //mxd @@ -66,7 +64,7 @@ namespace CodeImp.DoomBuilder.Windows this.Text = "Browse " + imagetype; // Setup texture browser - ImageBrowserControl.ShowTexturesFromSubDirectories = General.Settings.ReadSetting("browserwindow.showtexturesfromsubdirs", true); + ImageBrowserControl.ShowTexturesFromSubDirectories = General.Settings.ReadSetting("windows." + configname + ".showtexturesfromsubdirs", true); ImageBrowserControl.UseLongTextureNames = General.Map.Options.UseLongTextureNames; browser.BrowseFlats = browseflats; browser.ApplySettings(); @@ -84,7 +82,7 @@ namespace CodeImp.DoomBuilder.Windows availgroup = browser.AddGroup("Available " + imagetype + ":"); //mxd. Make "Used" group collapsible - usedgroupcollapsed = General.Settings.ReadSetting("browserwindow.usedgroupcollapsed", false); + usedgroupcollapsed = General.Settings.ReadSetting("windows." + configname + ".usedgroupcollapsed", false); browser.SetGroupCollapsed(usedgroup, usedgroupcollapsed); //mxd. Fill texture sets list with normal texture sets @@ -129,17 +127,17 @@ namespace CodeImp.DoomBuilder.Windows if(General.Settings.LocateTextureGroup) { //mxd. Get the previously selected texture set - string selectname = General.Settings.ReadSetting("browserwindow.textureset", ""); + string prevtextureset = General.Settings.ReadSetting("windows." + configname + ".textureset", ""); TreeNode match; - // When texture name is empty, select "All" texture set - if(string.IsNullOrEmpty(selectname) || selectname == "-") + // When texture set name is empty, select "All" texture set + if(string.IsNullOrEmpty(prevtextureset)) { match = tvTextureSets.Nodes[tvTextureSets.Nodes.Count - 1]; } else { - match = FindNodeByName(tvTextureSets.Nodes, selectname); + match = FindNodeByName(tvTextureSets.Nodes, prevtextureset); } if(match != null) @@ -180,38 +178,12 @@ namespace CodeImp.DoomBuilder.Windows tvTextureSets.EndUpdate();//mxd - // Keep last position and size - lastposition = this.Location; - lastsize = this.Size; - - this.SuspendLayout(); - - // Position window from configuration settings - this.Size = new Size(General.Settings.ReadSetting("browserwindow.sizewidth", this.Size.Width), - General.Settings.ReadSetting("browserwindow.sizeheight", this.Size.Height)); - this.WindowState = (FormWindowState)General.Settings.ReadSetting("browserwindow.windowstate", (int)FormWindowState.Normal); - - //mxd - 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) - { - this.Location = location; - } - else - { - this.StartPosition = FormStartPosition.CenterParent; - } - } - - this.ResumeLayout(true); - //mxd. Set splitter position and state (doesn't work when layout is suspended) - if(General.Settings.ReadSetting("browserwindow.splittercollapsed", false)) splitter.IsCollapsed = true; + if(General.Settings.ReadSetting("windows." + configname + ".splittercollapsed", false)) + splitter.IsCollapsed = true; //mxd. Looks like SplitterDistance is unaffected by DPI scaling. Let's fix that... - int splitterdistance = General.Settings.ReadSetting("browserwindow.splitterdistance", int.MinValue); + int splitterdistance = General.Settings.ReadSetting("windows." + configname + ".splitterdistance", int.MinValue); if(splitterdistance == int.MinValue) { splitterdistance = 210; @@ -234,7 +206,6 @@ namespace CodeImp.DoomBuilder.Windows private TreeNode FindTextureByLongName(TreeNode node, long longname) { //first search in child nodes - foreach(TreeNode n in node.Nodes) { TreeNode match = FindTextureByLongName(n, longname); @@ -274,7 +245,7 @@ namespace CodeImp.DoomBuilder.Windows } int imageIndex = set.Location.type + 5; - char[] separator = new[] { Path.AltDirectorySeparatorChar }; + char[] separator = { Path.AltDirectorySeparatorChar }; ImageData[] images; if(browseflats) @@ -300,7 +271,6 @@ namespace CodeImp.DoomBuilder.Windows string category = set.Name; for(int i = 0; i < parts.Length - 1; i++) { - //string category = parts[i]; category += (Path.DirectorySeparatorChar + parts[i]); //already got such category? @@ -355,7 +325,6 @@ namespace CodeImp.DoomBuilder.Windows ResourceTextureSet ts = node.Tag as ResourceTextureSet; if(ts == null) throw new Exception("Expected IFilledTextureSet, but got null..."); - if(node.Parent != null && General.Map.Config.MixTexturesFlats) { ts.MixTexturesAndFlats(); @@ -409,69 +378,20 @@ namespace CodeImp.DoomBuilder.Windows General.Interface.EnableProcessing(); //mxd } - // Loading - private void TextureBrowserForm_Load(object sender, EventArgs e) - { - // Normal windowstate? - if(this.WindowState == FormWindowState.Normal) - { - // Keep last position and size - lastposition = this.Location; - lastsize = this.Size; - } - } - - // Resized - private void TextureBrowserForm_ResizeEnd(object sender, EventArgs e) - { - // Normal windowstate? - if(this.WindowState == FormWindowState.Normal) - { - // Keep last position and size - lastposition = this.Location; - lastsize = this.Size; - } - } - - // Moved - private void TextureBrowserForm_Move(object sender, EventArgs e) - { - // Normal windowstate? - if(this.WindowState == FormWindowState.Normal) - { - // Keep last position and size - lastposition = this.Location; - lastsize = this.Size; - } - } - // Closing private void TextureBrowserForm_FormClosing(object sender, FormClosingEventArgs e) { - int windowstate; - - // Determine window state to save - if(this.WindowState != FormWindowState.Minimized) - windowstate = (int)this.WindowState; - else - windowstate = (int)FormWindowState.Normal; - // Save window settings - General.Settings.WriteSetting("browserwindow.positionx", lastposition.X); - General.Settings.WriteSetting("browserwindow.positiony", lastposition.Y); - General.Settings.WriteSetting("browserwindow.sizewidth", lastsize.Width); - General.Settings.WriteSetting("browserwindow.sizeheight", lastsize.Height); - General.Settings.WriteSetting("browserwindow.windowstate", windowstate); - General.Settings.WriteSetting("browserwindow.splitterdistance", splitter.SplitPosition); //mxd - General.Settings.WriteSetting("browserwindow.splittercollapsed", splitter.IsCollapsed); //mxd - General.Settings.WriteSetting("browserwindow.usedgroupcollapsed", browser.IsGroupCollapsed(usedgroup)); //mxd - - //mxd. Save last selected texture set, if it's not "All" (it will be selected anyway if search for initial texture set fails) - if(this.DialogResult == DialogResult.OK && tvTextureSets.SelectedNodes.Count > 0 && !(tvTextureSets.SelectedNodes[0].Tag is AllTextureSet)) - General.Settings.WriteSetting("browserwindow.textureset", tvTextureSets.SelectedNodes[0].Name); + General.Settings.WriteSetting("windows." + configname + ".splitterdistance", splitter.SplitPosition); //mxd + General.Settings.WriteSetting("windows." + configname + ".splittercollapsed", splitter.IsCollapsed); //mxd + General.Settings.WriteSetting("windows." + configname + ".usedgroupcollapsed", browser.IsGroupCollapsed(usedgroup)); //mxd + + //mxd. Save last selected texture set + if(this.DialogResult == DialogResult.OK && tvTextureSets.SelectedNodes.Count > 0) + General.Settings.WriteSetting("windows." + configname + ".textureset", tvTextureSets.SelectedNodes[0].Name); //mxd. Save ImageBrowserControl settings - General.Settings.WriteSetting("browserwindow.showtexturesfromsubdirs", ImageBrowserControl.ShowTexturesFromSubDirectories); + General.Settings.WriteSetting("windows." + configname + ".showtexturesfromsubdirs", ImageBrowserControl.ShowTexturesFromSubDirectories); if(General.Map.Config.UseLongTextureNames) General.Map.Options.UseLongTextureNames = ImageBrowserControl.UseLongTextureNames; // Clean up diff --git a/Source/Core/Windows/TextureSetForm.Designer.cs b/Source/Core/Windows/TextureSetForm.Designer.cs index b8f73296d711c150578a56f1b8fcbc624fb282c2..5a8cdf87f04d31406f472a62e6ab86911a5784db 100644 --- a/Source/Core/Windows/TextureSetForm.Designer.cs +++ b/Source/Core/Windows/TextureSetForm.Designer.cs @@ -284,7 +284,7 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "TextureSetForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Core/Windows/ThingBrowser2Form.designer.cs b/Source/Core/Windows/ThingBrowser2Form.designer.cs index 709e952db4c451bc740f366a83830ddec4ead83b..a5e3021b823ab0acc04c9bbc05b160fc2ca9831a 100644 --- a/Source/Core/Windows/ThingBrowser2Form.designer.cs +++ b/Source/Core/Windows/ThingBrowser2Form.designer.cs @@ -272,7 +272,7 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ThingBrowser2Form"; - this.Opacity = 1D; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Core/Windows/ThingBrowserForm.Designer.cs b/Source/Core/Windows/ThingBrowserForm.Designer.cs index 07454f6b4f29f95e7f0691d99a17ed8e522e2aa7..c3d858398c94d4b15c24d910e9cbb9aa04b80c34 100644 --- a/Source/Core/Windows/ThingBrowserForm.Designer.cs +++ b/Source/Core/Windows/ThingBrowserForm.Designer.cs @@ -82,7 +82,7 @@ namespace CodeImp.DoomBuilder.Windows this.MinimizeBox = false; this.MinimumSize = new System.Drawing.Size(264, 300); this.Name = "ThingBrowserForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Core/Windows/ThingEditForm.Designer.cs b/Source/Core/Windows/ThingEditForm.Designer.cs index 72dbd7e6af7b0b4f9440cdb194d373de25df0417..645a1d41b80743ccdf9937e19c2e86e0337dbb8b 100644 --- a/Source/Core/Windows/ThingEditForm.Designer.cs +++ b/Source/Core/Windows/ThingEditForm.Designer.cs @@ -137,6 +137,7 @@ namespace CodeImp.DoomBuilder.Windows this.posX.AllowDecimal = false; this.posX.AllowNegative = true; this.posX.AllowRelative = true; + this.posX.AllowExpressions = true; this.posX.ButtonStep = 8; this.posX.ButtonStepBig = 16F; this.posX.ButtonStepFloat = 1F; @@ -155,6 +156,7 @@ namespace CodeImp.DoomBuilder.Windows this.posY.AllowDecimal = false; this.posY.AllowNegative = true; this.posY.AllowRelative = true; + this.posY.AllowExpressions = true; this.posY.ButtonStep = 8; this.posY.ButtonStepBig = 16F; this.posY.ButtonStepFloat = 1F; @@ -173,6 +175,7 @@ namespace CodeImp.DoomBuilder.Windows this.posZ.AllowDecimal = false; this.posZ.AllowNegative = true; this.posZ.AllowRelative = true; + this.posZ.AllowExpressions = true; this.posZ.ButtonStep = 8; this.posZ.ButtonStepBig = 16F; this.posZ.ButtonStepFloat = 1F; @@ -353,6 +356,7 @@ namespace CodeImp.DoomBuilder.Windows this.angle.AllowDecimal = false; this.angle.AllowNegative = true; this.angle.AllowRelative = true; + this.angle.AllowExpressions = true; this.angle.ButtonStep = 5; this.angle.ButtonStepBig = 15F; this.angle.ButtonStepFloat = 1F; @@ -479,12 +483,11 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ThingEditForm"; - this.Opacity = 1D; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Edit Thing"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ThingEditForm_FormClosing); this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.ThingEditForm_HelpRequested); groupBox2.ResumeLayout(false); groupBox2.PerformLayout(); diff --git a/Source/Core/Windows/ThingEditForm.cs b/Source/Core/Windows/ThingEditForm.cs index 3be98d09b8ac4f6b578e04de54811d28a0544768..b21e4d6313f2455feadf813a34d05d2fbcddffc4 100644 --- a/Source/Core/Windows/ThingEditForm.cs +++ b/Source/Core/Windows/ThingEditForm.cs @@ -52,9 +52,6 @@ namespace CodeImp.DoomBuilder.Windows private bool flagsvalue_ignore = false; private bool flags_ignore = false; - //mxd. Window setup stuff - private static Point location = Point.Empty; - private struct ThingProperties //mxd { //public readonly int Type; @@ -82,13 +79,6 @@ namespace CodeImp.DoomBuilder.Windows { // Initialize InitializeComponent(); - - //mxd. Widow setup - if(location != Point.Empty) - { - this.StartPosition = FormStartPosition.Manual; - this.Location = location; - } // Fill flags list foreach(KeyValuePair<string, string> tf in General.Map.Config.ThingFlags) @@ -115,6 +105,9 @@ namespace CodeImp.DoomBuilder.Windows posZ.AllowDecimal = true; } + //mxd. Use doom angle clamping? + anglecontrol.DoomAngleClamping = General.Map.Config.DoomThingRotationAngles; + //mxd. Arrange inteface int targetheight; if(General.Map.FormatInterface.HasThingAction) @@ -407,11 +400,16 @@ namespace CodeImp.DoomBuilder.Windows } // Go for all the things - int tagoffset = 0; //mxd + int offset = 0; //mxd foreach(Thing t in things) { // Coordination - if(cbRandomAngle.Checked) t.Rotate(General.Random(0, 359)); //mxd + if(cbRandomAngle.Checked) //mxd + { + int newangle = General.Random(0, 359); + if(General.Map.Config.DoomThingRotationAngles) newangle = newangle / 45 * 45; + t.Rotate(newangle); + } //mxd. Check position float px = General.Clamp(t.Position.x, General.Map.Config.LeftBoundary, General.Map.Config.RightBoundary); @@ -429,14 +427,17 @@ namespace CodeImp.DoomBuilder.Windows } // Action/tags - t.Tag = General.Clamp(tagSelector.GetSmartTag(t.Tag, tagoffset++), General.Map.FormatInterface.MinTag, General.Map.FormatInterface.MaxTag); //mxd + t.Tag = General.Clamp(tagSelector.GetSmartTag(t.Tag, offset), General.Map.FormatInterface.MinTag, General.Map.FormatInterface.MaxTag); //mxd if(!action.Empty) t.Action = action.Value; //mxd. Apply args - argscontrol.Apply(t); + argscontrol.Apply(t, offset); // Update settings t.UpdateConfiguration(); + + //mxd. Increase offset... + offset++; } // Set as defaults @@ -509,12 +510,6 @@ namespace CodeImp.DoomBuilder.Windows thingtype.FocusTextbox(); } - //mxd - private void ThingEditForm_FormClosing(object sender, FormClosingEventArgs e) - { - location = this.Location; - } - // Help private void ThingEditForm_HelpRequested(object sender, HelpEventArgs hlpevent) { diff --git a/Source/Core/Windows/ThingEditFormUDMF.Designer.cs b/Source/Core/Windows/ThingEditFormUDMF.Designer.cs index 32916d2691002031cbe7c428dcee17016e9fa43a..6f65a72bb505e022ac532ed76803f51f885deae3 100644 --- a/Source/Core/Windows/ThingEditFormUDMF.Designer.cs +++ b/Source/Core/Windows/ThingEditFormUDMF.Designer.cs @@ -195,6 +195,7 @@ this.roll.AllowDecimal = false; this.roll.AllowNegative = true; this.roll.AllowRelative = true; + this.roll.AllowExpressions = true; this.roll.ButtonStep = 5; this.roll.ButtonStepBig = 15F; this.roll.ButtonStepFloat = 1F; @@ -222,6 +223,7 @@ this.pitch.AllowDecimal = false; this.pitch.AllowNegative = true; this.pitch.AllowRelative = true; + this.pitch.AllowExpressions = true; this.pitch.ButtonStep = 5; this.pitch.ButtonStepBig = 15F; this.pitch.ButtonStepFloat = 1F; @@ -249,6 +251,7 @@ this.angle.AllowDecimal = false; this.angle.AllowNegative = true; this.angle.AllowRelative = true; + this.angle.AllowExpressions = true; this.angle.ButtonStep = 5; this.angle.ButtonStepBig = 15F; this.angle.ButtonStepFloat = 1F; @@ -275,6 +278,7 @@ // this.anglecontrol.Angle = 0; this.anglecontrol.AngleOffset = 0; + this.anglecontrol.DoomAngleClamping = false; this.anglecontrol.Location = new System.Drawing.Point(7, 17); this.anglecontrol.Name = "anglecontrol"; this.anglecontrol.Size = new System.Drawing.Size(64, 64); @@ -389,6 +393,7 @@ // this.rollControl.Angle = -90; this.rollControl.AngleOffset = 0; + this.rollControl.DoomAngleClamping = false; this.rollControl.Location = new System.Drawing.Point(7, 17); this.rollControl.Name = "rollControl"; this.rollControl.Size = new System.Drawing.Size(64, 64); @@ -409,6 +414,7 @@ // this.pitchControl.Angle = -90; this.pitchControl.AngleOffset = 0; + this.pitchControl.DoomAngleClamping = false; this.pitchControl.Location = new System.Drawing.Point(7, 17); this.pitchControl.Name = "pitchControl"; this.pitchControl.Size = new System.Drawing.Size(64, 64); @@ -475,6 +481,7 @@ this.posX.AllowDecimal = true; this.posX.AllowNegative = true; this.posX.AllowRelative = true; + this.posX.AllowExpressions = true; this.posX.ButtonStep = 8; this.posX.ButtonStepBig = 8F; this.posX.ButtonStepFloat = 1F; @@ -493,6 +500,7 @@ this.posY.AllowDecimal = true; this.posY.AllowNegative = true; this.posY.AllowRelative = true; + this.posY.AllowExpressions = true; this.posY.ButtonStep = 8; this.posY.ButtonStepBig = 8F; this.posY.ButtonStepFloat = 1F; @@ -511,6 +519,7 @@ this.posZ.AllowDecimal = true; this.posZ.AllowNegative = true; this.posZ.AllowRelative = true; + this.posZ.AllowExpressions = true; this.posZ.ButtonStep = 8; this.posZ.ButtonStepBig = 8F; this.posZ.ButtonStepFloat = 1F; @@ -990,7 +999,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ThingEditFormUDMF"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Core/Windows/ThingEditFormUDMF.cs b/Source/Core/Windows/ThingEditFormUDMF.cs index 73f89f9d81d1d90522dafb9433f88dc750c3ab34..1c83b87f38aaf9103552b7178d3c657ecfcd7472 100644 --- a/Source/Core/Windows/ThingEditFormUDMF.cs +++ b/Source/Core/Windows/ThingEditFormUDMF.cs @@ -52,7 +52,6 @@ namespace CodeImp.DoomBuilder.Windows private readonly string[] renderstyles; //mxd //mxd. Window setup stuff - private static Point location = Point.Empty; private static int activetab; //mxd. Persistent settings @@ -99,12 +98,7 @@ namespace CodeImp.DoomBuilder.Windows InitializeComponent(); //mxd. Widow setup - if(location != Point.Empty) - { - this.StartPosition = FormStartPosition.Manual; - this.Location = location; - if(General.Settings.StoreSelectedEditTab && activetab > 0) tabs.SelectTab(activetab); - } + if(General.Settings.StoreSelectedEditTab && activetab > 0) tabs.SelectTab(activetab); // Fill flags list foreach(KeyValuePair<string, string> tf in General.Map.Config.ThingFlags) @@ -132,7 +126,7 @@ namespace CodeImp.DoomBuilder.Windows fieldslist.ListFixedFields(General.Map.Config.ThingFields); //mxd. Show fixed fields? - hidefixedfields.Checked = !General.Settings.ReadSetting("customfieldsshowfixed", true); + hidefixedfields.Checked = !General.Settings.ReadSetting("windows." + configname + ".customfieldsshowfixed", true); // Thing height? posZ.Visible = General.Map.FormatInterface.HasThingHeight; @@ -147,6 +141,9 @@ namespace CodeImp.DoomBuilder.Windows posZ.AllowDecimal = true; } + //mxd. Use doom angle clamping? + anglecontrol.DoomAngleClamping = General.Map.Config.DoomThingRotationAngles; + // Value linking scale.LinkValues = linkscale; @@ -213,7 +210,7 @@ namespace CodeImp.DoomBuilder.Windows score.Text = ft.Fields.GetValue("score", 0).ToString(); health.Text = ft.Fields.GetValue("health", 1).ToString(); alpha.Text = ft.Fields.GetValue("alpha", 1.0f).ToString(); - color.SetValueFrom(ft.Fields); + color.SetValueFrom(ft.Fields, true); scale.SetValues(ft.ScaleX, ft.ScaleY, true); pitch.Text = ft.Pitch.ToString(); roll.Text = ft.Roll.ToString(); @@ -293,7 +290,7 @@ namespace CodeImp.DoomBuilder.Windows if(t.Fields.GetValue("alpha", 1.0f).ToString() != alpha.Text) alpha.Text = ""; scale.SetValues(t.ScaleX, t.ScaleY, false); - color.SetValueFrom(t.Fields); + color.SetValueFrom(t.Fields, false); if(t.Pitch.ToString() != pitch.Text) pitch.Text = ""; if(t.Roll.ToString() != roll.Text) roll.Text = ""; @@ -456,12 +453,17 @@ namespace CodeImp.DoomBuilder.Windows } // Go for all the things - int tagoffset = 0; //mxd + int offset = 0; //mxd foreach(Thing t in things) { // Coordination //mxd. Randomize rotations? - if(cbrandomangle.Checked) t.Rotate(General.Random(0, 359)); + if(cbrandomangle.Checked) + { + int newangle = General.Random(0, 359); + if(General.Map.Config.DoomThingRotationAngles) newangle = newangle / 45 * 45; + t.Rotate(newangle); + } if(cbrandompitch.Checked) t.SetPitch(General.Random(0, 359)); if(cbrandomroll.Checked) t.SetRoll(General.Random(0, 359)); @@ -471,11 +473,11 @@ namespace CodeImp.DoomBuilder.Windows if(t.Position.x != px || t.Position.y != py) t.Move(new Vector2D(px, py)); // Action/tags - t.Tag = General.Clamp(tagSelector.GetSmartTag(t.Tag, tagoffset++), General.Map.FormatInterface.MinTag, General.Map.FormatInterface.MaxTag); //mxd + t.Tag = General.Clamp(tagSelector.GetSmartTag(t.Tag, offset), General.Map.FormatInterface.MinTag, General.Map.FormatInterface.MaxTag); //mxd if(!action.Empty) t.Action = action.Value; //mxd. Apply args - argscontrol.Apply(t); + argscontrol.Apply(t, offset); //mxd. Custom fields fieldslist.Apply(t.Fields); @@ -502,6 +504,9 @@ namespace CodeImp.DoomBuilder.Windows // Update settings t.UpdateConfiguration(); + + //mxd. Increase offset... + offset++; } // Set as defaults @@ -584,9 +589,8 @@ namespace CodeImp.DoomBuilder.Windows //mxd private void ThingEditForm_FormClosing(object sender, FormClosingEventArgs e) { - location = this.Location; activetab = tabs.SelectedIndex; - General.Settings.WriteSetting("customfieldsshowfixed", !hidefixedfields.Checked); + General.Settings.WriteSetting("windows." + configname + ".customfieldsshowfixed", !hidefixedfields.Checked); } // Help diff --git a/Source/Core/Windows/ThingsFiltersForm.Designer.cs b/Source/Core/Windows/ThingsFiltersForm.Designer.cs index 4f70253a30aadda78413c16a7d245b1533dcabd3..273df7c3e27f76ad8c132bba5bc62444d41ae1ac 100644 --- a/Source/Core/Windows/ThingsFiltersForm.Designer.cs +++ b/Source/Core/Windows/ThingsFiltersForm.Designer.cs @@ -629,6 +629,7 @@ namespace CodeImp.DoomBuilder.Windows this.fieldslist.Name = "fieldslist"; this.fieldslist.PropertyColumnVisible = true; this.fieldslist.PropertyColumnWidth = 150; + this.fieldslist.ShowFixedFields = true; this.fieldslist.Size = new System.Drawing.Size(426, 251); this.fieldslist.TabIndex = 2; this.fieldslist.TypeColumnVisible = true; @@ -695,7 +696,7 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ThingsFiltersForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Core/Windows/ThingsFiltersForm.cs b/Source/Core/Windows/ThingsFiltersForm.cs index a138456e9295e16daa3f60835442687e8ef291b4..b374af798b88fa687beea256071b491a855231de 100644 --- a/Source/Core/Windows/ThingsFiltersForm.cs +++ b/Source/Core/Windows/ThingsFiltersForm.cs @@ -351,7 +351,7 @@ namespace CodeImp.DoomBuilder.Windows if((filtercategory.SelectedIndex > -1) && (filtercategory.SelectedItem is ThingCategoryData)) { // Set new category name - f.CategoryName = (filtercategory.SelectedItem as ThingCategoryData).Category.Name; //mxd + f.CategoryName = ((ThingCategoryData)filtercategory.SelectedItem).Category.Name; //mxd } else { diff --git a/Source/Core/Windows/UpdateForm.Designer.cs b/Source/Core/Windows/UpdateForm.Designer.cs index 9a1d6cf1de8aa3f7a2a6cc6871e95e7520d2b0bc..65bd8db47bc899587483ca529993287359620489 100644 --- a/Source/Core/Windows/UpdateForm.Designer.cs +++ b/Source/Core/Windows/UpdateForm.Designer.cs @@ -134,6 +134,7 @@ this.MinimizeBox = false; this.MinimumSize = new System.Drawing.Size(667, 250); this.Name = "UpdateForm"; + this.Opacity = 0; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Newsflash (R[rev])!"; diff --git a/Source/Core/Windows/UpdateForm.cs b/Source/Core/Windows/UpdateForm.cs index d2f80cdfbc3bd0cd012ce134604b12cf86665aef..8517c3040f66390c78d2c220e3ceee9c9b8d9369 100644 --- a/Source/Core/Windows/UpdateForm.cs +++ b/Source/Core/Windows/UpdateForm.cs @@ -3,7 +3,7 @@ using System.Windows.Forms; namespace CodeImp.DoomBuilder.Windows { - public partial class UpdateForm : Form + public partial class UpdateForm : DelayedForm { public bool IgnoreThisUpdate { get { return ignorethisupdate.Checked; } } diff --git a/Source/Core/Windows/VertexEditForm.Designer.cs b/Source/Core/Windows/VertexEditForm.Designer.cs index feaec42f21cf01ab2e112b295fbf50a1123ec697..92b77fc415feb78cf0960007a060440558fcdc8b 100644 --- a/Source/Core/Windows/VertexEditForm.Designer.cs +++ b/Source/Core/Windows/VertexEditForm.Designer.cs @@ -125,6 +125,7 @@ namespace CodeImp.DoomBuilder.Windows this.zceiling.AllowDecimal = false; this.zceiling.AllowNegative = true; this.zceiling.AllowRelative = true; + this.zceiling.AllowExpressions = true; this.zceiling.ButtonStep = 8; this.zceiling.ButtonStepBig = 16F; this.zceiling.ButtonStepFloat = 1F; @@ -143,6 +144,7 @@ namespace CodeImp.DoomBuilder.Windows this.zfloor.AllowDecimal = false; this.zfloor.AllowNegative = true; this.zfloor.AllowRelative = true; + this.zfloor.AllowExpressions = true; this.zfloor.ButtonStep = 8; this.zfloor.ButtonStepBig = 16F; this.zfloor.ButtonStepFloat = 1F; @@ -179,6 +181,7 @@ namespace CodeImp.DoomBuilder.Windows this.positiony.AllowDecimal = false; this.positiony.AllowNegative = true; this.positiony.AllowRelative = true; + this.positiony.AllowExpressions = true; this.positiony.ButtonStep = 1; this.positiony.ButtonStepBig = 8F; this.positiony.ButtonStepFloat = 1F; @@ -197,6 +200,7 @@ namespace CodeImp.DoomBuilder.Windows this.positionx.AllowDecimal = false; this.positionx.AllowNegative = true; this.positionx.AllowRelative = true; + this.positionx.AllowExpressions = true; this.positionx.ButtonStep = 1; this.positionx.ButtonStepBig = 8F; this.positionx.ButtonStepFloat = 1F; @@ -270,6 +274,7 @@ namespace CodeImp.DoomBuilder.Windows this.fieldslist.Name = "fieldslist"; this.fieldslist.PropertyColumnVisible = true; this.fieldslist.PropertyColumnWidth = 150; + this.fieldslist.ShowFixedFields = true; this.fieldslist.Size = new System.Drawing.Size(406, 188); this.fieldslist.TabIndex = 2; this.fieldslist.TypeColumnVisible = true; @@ -313,7 +318,7 @@ namespace CodeImp.DoomBuilder.Windows this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "VertexEditForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Core/Windows/VertexEditForm.resx b/Source/Core/Windows/VertexEditForm.resx index 0c0ea0800b541e24124fda65ef60b6c2245a0e85..e1ae2a4878aa9e133f29f1ef6d79ac32f35f1ae2 100644 --- a/Source/Core/Windows/VertexEditForm.resx +++ b/Source/Core/Windows/VertexEditForm.resx @@ -141,12 +141,6 @@ <metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>False</value> </metadata> - <metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </metadata> - <metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </metadata> <metadata name="tabs.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> @@ -156,7 +150,4 @@ <metadata name="fieldslist.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> - <metadata name="fieldslist.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> </root> \ No newline at end of file diff --git a/Source/Core/ZDoom/TextureStructure.cs b/Source/Core/ZDoom/TextureStructure.cs index 47eda03b4f1bd57390c88b2f5a60fc869cf94915..e3c55291ca63977dee39f18d58c6e1f67cd80d7d 100644 --- a/Source/Core/ZDoom/TextureStructure.cs +++ b/Source/Core/ZDoom/TextureStructure.cs @@ -45,6 +45,8 @@ namespace CodeImp.DoomBuilder.ZDoom private readonly int xoffset; private readonly int yoffset; private readonly bool worldpanning; + private readonly bool optional; //mxd + private readonly bool nulltexture; //mxd // Patches private readonly List<PatchStructure> patches; @@ -61,7 +63,8 @@ namespace CodeImp.DoomBuilder.ZDoom public float YScale { get { return yscale; } } public int XOffset { get { return xoffset; } } public int YOffset { get { return yoffset; } } - public bool WorldPanning { get { return worldpanning; } } + public bool Optional { get { return optional; } } + public bool NullTexture { get { return nulltexture; } } public ICollection<PatchStructure> Patches { get { return patches; } } #endregion @@ -88,6 +91,7 @@ namespace CodeImp.DoomBuilder.ZDoom //mxd. It can also be "optional" keyword. if(name.ToLowerInvariant() == "optional") { + optional = true; parser.SkipWhitespace(true); name = parser.StripTokenQuotes(parser.ReadToken(false)); //mxd. Don't skip newline } @@ -150,6 +154,10 @@ namespace CodeImp.DoomBuilder.ZDoom worldpanning = true; break; + case "nulltexture": //mxd + nulltexture = true; + break; + case "offset": // Read x offset if(!ReadTokenInt(parser, token, out xoffset)) return; diff --git a/Source/Core/app.manifest b/Source/Core/app.manifest index fc56c43b48d4d97d8b445c7c3be194c425ffe8b8..72269727bf14ba63c10baae5f4cc03ebe15ab786 100644 --- a/Source/Core/app.manifest +++ b/Source/Core/app.manifest @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/> + <assemblyIdentity version="1.0.0.0" name="ZoneBuilder.app"/> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> <security> <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"> diff --git a/Source/Plugins/BuilderEffects/Interface/JitterSectorsForm.Designer.cs b/Source/Plugins/BuilderEffects/Interface/JitterSectorsForm.Designer.cs index 902a0953962541448cf61713cc86c19f2df892e6..0642895709fdd783a8120da80fd1f634f53e6d45 100644 --- a/Source/Plugins/BuilderEffects/Interface/JitterSectorsForm.Designer.cs +++ b/Source/Plugins/BuilderEffects/Interface/JitterSectorsForm.Designer.cs @@ -400,6 +400,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "JitterSectorsForm"; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; diff --git a/Source/Plugins/BuilderEffects/Interface/JitterThingsForm.Designer.cs b/Source/Plugins/BuilderEffects/Interface/JitterThingsForm.Designer.cs index 1739a388613415efef773fa0a879fceb2b2f7c77..1d11dbcc3caf3271241ef5992d3896818d114400 100644 --- a/Source/Plugins/BuilderEffects/Interface/JitterThingsForm.Designer.cs +++ b/Source/Plugins/BuilderEffects/Interface/JitterThingsForm.Designer.cs @@ -544,7 +544,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "JitterThingsForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; diff --git a/Source/Plugins/BuilderEffects/Interface/JitterThingsForm.cs b/Source/Plugins/BuilderEffects/Interface/JitterThingsForm.cs index cc3c2b8e2f003f1ca8404efbb22a45af2f456c78..f9d5145190b3cb2d43590eeb8fe4d7525f7faa0f 100644 --- a/Source/Plugins/BuilderEffects/Interface/JitterThingsForm.cs +++ b/Source/Plugins/BuilderEffects/Interface/JitterThingsForm.cs @@ -128,11 +128,12 @@ namespace CodeImp.DoomBuilder.BuilderEffects if(General.Map.FormatInterface.HasThingHeight) { if(t.Sector == null) t.DetermineSector(); - if(t.Sector == null) continue; - - d.SectorHeight = Math.Max(0, t.Sector.CeilHeight - (int)t.Height - t.Sector.FloorHeight); - if(MaxSafeHeightDistance < d.SectorHeight) MaxSafeHeightDistance = d.SectorHeight; - d.ZOffset = (int)t.Position.z; + if(t.Sector != null) + { + d.SectorHeight = Math.Max(0, t.Sector.CeilHeight - (int)t.Height - t.Sector.FloorHeight); + if(MaxSafeHeightDistance < d.SectorHeight) MaxSafeHeightDistance = d.SectorHeight; + d.ZOffset = (int)t.Position.z; + } } thingData.Add(d); @@ -201,9 +202,13 @@ namespace CodeImp.DoomBuilder.BuilderEffects private void ApplyRotation(int ammount) { for(int i = 0; i < selection.Count; i++) - selection[i].Rotate((int)((thingData[i].Angle + ammount * thingData[i].JitterRotation) % 360)); + { + int newangle = (int)Math.Round(thingData[i].Angle + ammount * thingData[i].JitterRotation); + if(General.Map.Config.DoomThingRotationAngles) newangle = newangle / 45 * 45; + selection[i].Rotate(newangle % 360); + } - //update view + // Update view if(editingModeName == "ThingsMode") General.Interface.RedrawDisplay(); } @@ -253,6 +258,7 @@ namespace CodeImp.DoomBuilder.BuilderEffects { for(int i = 0; i < selection.Count; i++) { + if(thingData[i].SectorHeight == 0) continue; int curAmmount = Math.Min(thingData[i].SectorHeight, Math.Max(0, thingData[i].ZOffset + ammount)); selection[i].Move(selection[i].Position.x, selection[i].Position.y, curAmmount * thingData[i].JitterHeight); } diff --git a/Source/Plugins/BuilderEffects/Interface/JitterVerticesForm.Designer.cs b/Source/Plugins/BuilderEffects/Interface/JitterVerticesForm.Designer.cs index 38011fcdde971bf84c4706b83a9ed2177d648288..5d58e2efbb96285b6cde02ee2938e87af583b0b1 100644 --- a/Source/Plugins/BuilderEffects/Interface/JitterVerticesForm.Designer.cs +++ b/Source/Plugins/BuilderEffects/Interface/JitterVerticesForm.Designer.cs @@ -95,7 +95,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "JitterVerticesForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; diff --git a/Source/Plugins/BuilderEffects/Interface/ObjImportSettingsForm.Designer.cs b/Source/Plugins/BuilderEffects/Interface/ObjImportSettingsForm.Designer.cs index 50e5b130321c1468d7243e7c33da9b55ecfebb49..fb5aaf5cbb5934c3478da9a3bf8726c1b404cb17 100644 --- a/Source/Plugins/BuilderEffects/Interface/ObjImportSettingsForm.Designer.cs +++ b/Source/Plugins/BuilderEffects/Interface/ObjImportSettingsForm.Designer.cs @@ -74,155 +74,155 @@ 0, 0, 0}); - // - // cancel - // - 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(307, 82); - this.cancel.Name = "cancel"; - this.cancel.Size = new System.Drawing.Size(75, 23); - this.cancel.TabIndex = 14; - this.cancel.Text = "Cancel"; - this.cancel.UseVisualStyleBackColor = true; - this.cancel.Click += new System.EventHandler(this.cancel_Click); - // - // import - // - this.import.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.import.Location = new System.Drawing.Point(226, 82); - this.import.Name = "import"; - this.import.Size = new System.Drawing.Size(75, 23); - this.import.TabIndex = 13; - this.import.Text = "Import"; - this.import.UseVisualStyleBackColor = true; - this.import.Click += new System.EventHandler(this.import_Click); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(18, 14); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(32, 13); - this.label1.TabIndex = 12; - this.label1.Text = "Path:"; - // - // tbImportPath - // - this.tbImportPath.Location = new System.Drawing.Point(55, 12); - this.tbImportPath.Name = "tbImportPath"; - this.tbImportPath.Size = new System.Drawing.Size(299, 20); - this.tbImportPath.TabIndex = 10; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(183, 40); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(45, 13); - this.label3.TabIndex = 17; - this.label3.Text = "Up axis:"; - // - // axisx - // - this.axisx.AutoSize = true; - this.axisx.Location = new System.Drawing.Point(3, 3); - this.axisx.Name = "axisx"; - this.axisx.Size = new System.Drawing.Size(32, 17); - this.axisx.TabIndex = 18; - this.axisx.TabStop = true; - this.axisx.Text = "X"; - this.axisx.UseVisualStyleBackColor = true; - // - // axisy - // - this.axisy.AutoSize = true; - this.axisy.Location = new System.Drawing.Point(41, 3); - this.axisy.Name = "axisy"; - this.axisy.Size = new System.Drawing.Size(32, 17); - this.axisy.TabIndex = 19; - this.axisy.TabStop = true; - this.axisy.Text = "Y"; - this.axisy.UseVisualStyleBackColor = true; - // - // axisz - // - this.axisz.AutoSize = true; - this.axisz.Location = new System.Drawing.Point(79, 3); - this.axisz.Name = "axisz"; - this.axisz.Size = new System.Drawing.Size(32, 17); - this.axisz.TabIndex = 20; - this.axisz.TabStop = true; - this.axisz.Text = "Z"; - this.axisz.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.Controls.Add(this.axisx); - this.panel1.Controls.Add(this.axisz); - this.panel1.Controls.Add(this.axisy); - this.panel1.Location = new System.Drawing.Point(234, 36); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(133, 24); - this.panel1.TabIndex = 21; - // - // openFileDialog - // - this.openFileDialog.DefaultExt = "obj"; - this.openFileDialog.FileName = "openFileDialog1"; - this.openFileDialog.Filter = "Wavefront obj files|*.obj"; - this.openFileDialog.Title = "Choose .obj file to import:"; - // - // cbusevertexheight - // - this.cbusevertexheight.AutoSize = true; - this.cbusevertexheight.Location = new System.Drawing.Point(55, 64); - this.cbusevertexheight.Name = "cbusevertexheight"; - this.cbusevertexheight.Size = new System.Drawing.Size(95, 17); - this.cbusevertexheight.TabIndex = 22; - this.cbusevertexheight.Text = "Sloped Terrain"; - this.cbusevertexheight.UseVisualStyleBackColor = true; - // - // browse - // - this.browse.Image = global::CodeImp.DoomBuilder.BuilderEffects.Properties.Resources.Folder; - this.browse.Location = new System.Drawing.Point(360, 10); - this.browse.Name = "browse"; - this.browse.Size = new System.Drawing.Size(28, 23); - this.browse.TabIndex = 11; - this.browse.UseVisualStyleBackColor = true; - this.browse.Click += new System.EventHandler(this.browse_Click); - // - // ObjImportSettingsForm - // - this.AcceptButton = this.import; - 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(394, 109); - this.Controls.Add(this.cbusevertexheight); - this.Controls.Add(this.panel1); - this.Controls.Add(this.label3); - this.Controls.Add(this.label2); - this.Controls.Add(this.nudScale); - this.Controls.Add(this.cancel); - this.Controls.Add(this.import); - this.Controls.Add(this.label1); - this.Controls.Add(this.browse); - this.Controls.Add(this.tbImportPath); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "ObjImportSettingsForm"; - this.Opacity = 1D; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.Text = "Import Wavefront .obj"; - ((System.ComponentModel.ISupportInitialize)(this.nudScale)).EndInit(); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); + // + // cancel + // + 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(307, 82); + this.cancel.Name = "cancel"; + this.cancel.Size = new System.Drawing.Size(75, 23); + this.cancel.TabIndex = 14; + this.cancel.Text = "Cancel"; + this.cancel.UseVisualStyleBackColor = true; + this.cancel.Click += new System.EventHandler(this.cancel_Click); + // + // import + // + this.import.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.import.Location = new System.Drawing.Point(226, 82); + this.import.Name = "import"; + this.import.Size = new System.Drawing.Size(75, 23); + this.import.TabIndex = 13; + this.import.Text = "Import"; + this.import.UseVisualStyleBackColor = true; + this.import.Click += new System.EventHandler(this.import_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(18, 14); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(32, 13); + this.label1.TabIndex = 12; + this.label1.Text = "Path:"; + // + // tbImportPath + // + this.tbImportPath.Location = new System.Drawing.Point(55, 12); + this.tbImportPath.Name = "tbImportPath"; + this.tbImportPath.Size = new System.Drawing.Size(299, 20); + this.tbImportPath.TabIndex = 10; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(183, 40); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(45, 13); + this.label3.TabIndex = 17; + this.label3.Text = "Up axis:"; + // + // axisx + // + this.axisx.AutoSize = true; + this.axisx.Location = new System.Drawing.Point(3, 3); + this.axisx.Name = "axisx"; + this.axisx.Size = new System.Drawing.Size(32, 17); + this.axisx.TabIndex = 18; + this.axisx.TabStop = true; + this.axisx.Text = "X"; + this.axisx.UseVisualStyleBackColor = true; + // + // axisy + // + this.axisy.AutoSize = true; + this.axisy.Location = new System.Drawing.Point(41, 3); + this.axisy.Name = "axisy"; + this.axisy.Size = new System.Drawing.Size(32, 17); + this.axisy.TabIndex = 19; + this.axisy.TabStop = true; + this.axisy.Text = "Y"; + this.axisy.UseVisualStyleBackColor = true; + // + // axisz + // + this.axisz.AutoSize = true; + this.axisz.Location = new System.Drawing.Point(79, 3); + this.axisz.Name = "axisz"; + this.axisz.Size = new System.Drawing.Size(32, 17); + this.axisz.TabIndex = 20; + this.axisz.TabStop = true; + this.axisz.Text = "Z"; + this.axisz.UseVisualStyleBackColor = true; + // + // panel1 + // + this.panel1.Controls.Add(this.axisx); + this.panel1.Controls.Add(this.axisz); + this.panel1.Controls.Add(this.axisy); + this.panel1.Location = new System.Drawing.Point(234, 36); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(133, 24); + this.panel1.TabIndex = 21; + // + // openFileDialog + // + this.openFileDialog.DefaultExt = "obj"; + this.openFileDialog.FileName = "openFileDialog1"; + this.openFileDialog.Filter = "Wavefront obj files|*.obj"; + this.openFileDialog.Title = "Choose .obj file to import:"; + // + // cbusevertexheight + // + this.cbusevertexheight.AutoSize = true; + this.cbusevertexheight.Location = new System.Drawing.Point(55, 64); + this.cbusevertexheight.Name = "cbusevertexheight"; + this.cbusevertexheight.Size = new System.Drawing.Size(95, 17); + this.cbusevertexheight.TabIndex = 22; + this.cbusevertexheight.Text = "Sloped Terrain"; + this.cbusevertexheight.UseVisualStyleBackColor = true; + // + // browse + // + this.browse.Image = global::CodeImp.DoomBuilder.BuilderEffects.Properties.Resources.Folder; + this.browse.Location = new System.Drawing.Point(360, 10); + this.browse.Name = "browse"; + this.browse.Size = new System.Drawing.Size(28, 23); + this.browse.TabIndex = 11; + this.browse.UseVisualStyleBackColor = true; + this.browse.Click += new System.EventHandler(this.browse_Click); + // + // ObjImportSettingsForm + // + this.AcceptButton = this.import; + 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(394, 109); + this.Controls.Add(this.cbusevertexheight); + this.Controls.Add(this.panel1); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.nudScale); + this.Controls.Add(this.cancel); + this.Controls.Add(this.import); + this.Controls.Add(this.label1); + this.Controls.Add(this.browse); + this.Controls.Add(this.tbImportPath); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "ObjImportSettingsForm"; + this.Opacity = 0; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.Text = "Import Wavefront .obj"; + ((System.ComponentModel.ISupportInitialize)(this.nudScale)).EndInit(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); } diff --git a/Source/Plugins/BuilderEffects/Properties/AssemblyInfo.cs b/Source/Plugins/BuilderEffects/Properties/AssemblyInfo.cs index 09e15fa16460fd9f7a0ff416b37ba596c4441962..cd2ef42bc37040a3053934f2bbb919d9e9cb7e8a 100644 --- a/Source/Plugins/BuilderEffects/Properties/AssemblyInfo.cs +++ b/Source/Plugins/BuilderEffects/Properties/AssemblyInfo.cs @@ -1,5 +1,6 @@ using System.Reflection; using System.Runtime.InteropServices; +using System.Resources; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -33,3 +34,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: NeutralResourcesLanguageAttribute("en")] diff --git a/Source/Plugins/BuilderModes/BuilderModes.csproj b/Source/Plugins/BuilderModes/BuilderModes.csproj index 84dad0625d3ebaeb6435a8a603de18d9321b94dc..0d76312ea46c9917d2cf9c9c6ff8527bdd1e73ac 100644 --- a/Source/Plugins/BuilderModes/BuilderModes.csproj +++ b/Source/Plugins/BuilderModes/BuilderModes.csproj @@ -122,12 +122,6 @@ <Compile Include="General\Association.cs" /> <Compile Include="General\BuilderPlug.cs" /> <Compile Include="General\CopyStructures.cs" /> - <Compile Include="Interface\CurveLinedefsForm.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Interface\CurveLinedefsForm.Designer.cs"> - <DependentUpon>CurveLinedefsForm.cs</DependentUpon> - </Compile> <Compile Include="Interface\DrawShapeOptionsPanel.cs"> <SubType>UserControl</SubType> </Compile> @@ -261,10 +255,6 @@ <EmbeddedResource Include="Resources\SectorsMode.png" /> </ItemGroup> <ItemGroup> - <EmbeddedResource Include="Interface\CurveLinedefsForm.resx"> - <SubType>Designer</SubType> - <DependentUpon>CurveLinedefsForm.cs</DependentUpon> - </EmbeddedResource> <EmbeddedResource Include="Interface\MenusForm.resx"> <SubType>Designer</SubType> <DependentUpon>MenusForm.cs</DependentUpon> @@ -347,14 +337,18 @@ <Compile Include="ErrorChecks\CheckMissingTextures.cs" /> <Compile Include="ErrorChecks\CheckObsoleteThings.cs" /> <Compile Include="ErrorChecks\CheckOverlappingVertices.cs" /> + <Compile Include="ErrorChecks\CheckPolyobjects.cs" /> <Compile Include="ErrorChecks\CheckShortLinedefs.cs" /> <Compile Include="ErrorChecks\CheckStrayVertices.cs" /> <Compile Include="ErrorChecks\CheckTextureAlignment.cs" /> + <Compile Include="ErrorChecks\CheckUnknownActions.cs" /> <Compile Include="ErrorChecks\CheckUnknownFlats.cs" /> <Compile Include="ErrorChecks\CheckUnknownTextures.cs" /> <Compile Include="ErrorChecks\CheckUnknownThings.cs" /> <Compile Include="ErrorChecks\CheckUnusedTextures.cs" /> <Compile Include="ErrorChecks\CheckUnusedThings.cs" /> + <Compile Include="ErrorChecks\ResultInvalidPolyobjectLines.cs" /> + <Compile Include="ErrorChecks\ResultInvalidPolyobjectThings.cs" /> <Compile Include="ErrorChecks\ResultMapTooBig.cs" /> <Compile Include="ErrorChecks\ResultMissingFlat.cs" /> <Compile Include="ErrorChecks\ResultNoErrors.cs" /> @@ -366,8 +360,11 @@ <Compile Include="ErrorChecks\ResultMissingTexture.cs" /> <Compile Include="ErrorChecks\ResultTexturesMisaligned.cs" /> <Compile Include="ErrorChecks\ResultUnknownFlat.cs" /> + <Compile Include="ErrorChecks\ResultUnknownLinedefAction.cs" /> + <Compile Include="ErrorChecks\ResultUnknownSectorEffect.cs" /> <Compile Include="ErrorChecks\ResultUnknownTexture.cs" /> <Compile Include="ErrorChecks\ResultUnknownThing.cs" /> + <Compile Include="ErrorChecks\ResultUnknownThingAction.cs" /> <Compile Include="ErrorChecks\ResultUnusedTexture.cs" /> <Compile Include="ErrorChecks\ResultUnusedThing.cs" /> <Compile Include="ErrorChecks\ResultVertexOverlappingLine.cs" /> @@ -384,6 +381,9 @@ <Compile Include="FindReplace\FindSectorFloorFlat.cs" /> <Compile Include="FindReplace\FindSectorFloorHeight.cs" /> <Compile Include="FindReplace\FindSidedefFlags.cs" /> + <Compile Include="FindReplace\FindSidedefLowerTexture.cs" /> + <Compile Include="FindReplace\FindSidedefMiddleTexture.cs" /> + <Compile Include="FindReplace\FindSidedefUpperTexture.cs" /> <Compile Include="FindReplace\FindThingAngle.cs" /> <Compile Include="FindReplace\FindAnyTextureFlat.cs" /> <Compile Include="FindReplace\FindThingFlags.cs" /> @@ -405,6 +405,7 @@ <Compile Include="FindReplace\FindVertexNumber.cs" /> <Compile Include="General\HintLabel.cs" /> <Compile Include="General\BuilderModesTools.cs" /> + <Compile Include="General\SelectionLabel.cs" /> <Compile Include="General\UndoGroup.cs" /> <Compile Include="Interface\BridgeModeForm.cs"> <SubType>Form</SubType> @@ -412,6 +413,12 @@ <Compile Include="Interface\BridgeModeForm.Designer.cs"> <DependentUpon>BridgeModeForm.cs</DependentUpon> </Compile> + <Compile Include="Interface\CurveLinedefsOptionsPanel.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="Interface\CurveLinedefsOptionsPanel.Designer.cs"> + <DependentUpon>CurveLinedefsOptionsPanel.cs</DependentUpon> + </Compile> <Compile Include="Interface\DrawCurveOptionsPanel.cs"> <SubType>UserControl</SubType> </Compile> @@ -638,6 +645,9 @@ <EmbeddedResource Include="Resources\DrawGeometryMode.png" /> </ItemGroup> <ItemGroup> + <EmbeddedResource Include="Interface\CurveLinedefsOptionsPanel.resx"> + <DependentUpon>CurveLinedefsOptionsPanel.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="Interface\DrawLineOptionsPanel.resx"> <DependentUpon>DrawLineOptionsPanel.cs</DependentUpon> </EmbeddedResource> @@ -767,6 +777,15 @@ <ItemGroup> <None Include="Resources\VertexSlope.png" /> </ItemGroup> + <ItemGroup> + <None Include="Resources\Guidelines.png" /> + </ItemGroup> + <ItemGroup> + <None Include="Resources\Check.png" /> + </ItemGroup> + <ItemGroup> + <None Include="Resources\Close.png" /> + </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. diff --git a/Source/Plugins/BuilderModes/ClassicModes/BaseClassicMode.cs b/Source/Plugins/BuilderModes/ClassicModes/BaseClassicMode.cs index c7a828315b8e88704fbcd3c3a27943c829575903..9d3acb364ad00aa41266bd63f40b37438625c025 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/BaseClassicMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/BaseClassicMode.cs @@ -134,17 +134,22 @@ namespace CodeImp.DoomBuilder.BuilderModes protected override void OnUpdateMultiSelection() { base.OnUpdateMultiSelection(); + marqueSelectionIncludesThings = General.Interface.AltState; + } + //mxd + protected override MarqueSelectionMode GetMultiSelectionMode() + { if(General.Interface.CtrlState && General.Interface.ShiftState) - marqueSelectionMode = MarqueSelectionMode.INTERSECT; - else if(General.Interface.CtrlState) - marqueSelectionMode = MarqueSelectionMode.SUBTRACT; - else if(General.Interface.ShiftState ^ BuilderPlug.Me.AdditiveSelect) - marqueSelectionMode = MarqueSelectionMode.ADD; - else - marqueSelectionMode = MarqueSelectionMode.SELECT; + return MarqueSelectionMode.INTERSECT; - marqueSelectionIncludesThings = General.Interface.AltState; + if(General.Interface.CtrlState) + return MarqueSelectionMode.SUBTRACT; + + if(General.Interface.ShiftState ^ BuilderPlug.Me.AdditiveSelect) + return MarqueSelectionMode.ADD; + + return MarqueSelectionMode.SELECT; } //mxd @@ -264,6 +269,9 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Map.Map.EndAddRemove(); //mxd } + + public virtual void OnViewSelectionNumbersChanged(bool enabled) { } //mxd + public virtual void OnViewSelectionEffectsChanged(bool enabled) { } //mxd #endregion @@ -365,17 +373,6 @@ namespace CodeImp.DoomBuilder.BuilderModes paintselectpressed = false; } - //mxd - [BeginAction("togglehighlight")] - public void ToggleHighlight() - { - BuilderPlug.Me.UseHighlight = !BuilderPlug.Me.UseHighlight; - General.Interface.DisplayStatus(StatusType.Action, "Highlight is now " + (BuilderPlug.Me.UseHighlight ? "ON" : "OFF") + "."); - - // Redraw display to show changes - General.Interface.RedrawDisplay(); - } - //mxd [BeginAction("syncedthingedit")] public void ToggleSyncronizedThingsEdit() diff --git a/Source/Plugins/BuilderModes/ClassicModes/BridgeMode.cs b/Source/Plugins/BuilderModes/ClassicModes/BridgeMode.cs index 2808e59a70011b3d2cbeb1fa8b1c897ebdd705f6..c32ab4cf9a2cb89f25ecf638f3d5634a87ef35db 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/BridgeMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/BridgeMode.cs @@ -196,7 +196,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes { List<DrawnVertex> points = new List<DrawnVertex>(); for(int p = 0; p < shapes[i][c].Length; p++) - points.Add(DrawGeometryMode.GetCurrentPosition(shapes[i][c][p], true, false, false, renderer, points)); + points.Add(DrawGeometryMode.GetCurrentPosition(shapes[i][c][p], true, false, false, false, renderer, points)); shapesRow.Add(points); } drawShapes.Add(shapesRow); @@ -212,7 +212,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes General.Map.UndoRedo.CreateUndo("Bridge ("+form.Subdivisions+" subdivisions)"); List<List<SectorProperties>> sectorProps = new List<List<SectorProperties>>(); - List<List<List<Sector>>> newSectors = new List<List<List<Sector>>>(); + List<List<HashSet<Sector>>> newSectors = new List<List<HashSet<Sector>>>(); //create sector properties collection //sector row @@ -229,7 +229,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes //sector row for(int i = 0; i < drawShapes.Count; i++) { - newSectors.Add(new List<List<Sector>>()); + newSectors.Add(new List<HashSet<Sector>>()); //sector in row for(int c = 0; c < drawShapes[i].Count; c++) @@ -244,11 +244,11 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes return; } - List<Sector> newsectors = General.Map.Map.GetMarkedSectors(true); + HashSet<Sector> newsectors = General.Map.Map.GetUnselectedSectorsFromLinedefs(General.Map.Map.GetMarkedLinedefs(true)); newSectors[i].Add(newsectors); //set floor/ceiling heights and brightness - foreach(Sector s in newsectors) + foreach(Sector s in newsectors) { SectorProperties sp = sectorProps[i][c]; s.Brightness = sp.Brightness; @@ -372,8 +372,8 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes // Render things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA); - renderer.RenderNiGHTSPath(); + renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha); + renderer.RenderNiGHTSPath(); renderer.Finish(); } @@ -725,16 +725,16 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes return Math.Min(val1, val2); case BridgeInterpolationMode.LINEAR: - return InterpolationTools.Linear(val1, val2, delta); + return (int)Math.Round(InterpolationTools.Linear(val1, val2, delta)); case BridgeInterpolationMode.IN_SINE: - return InterpolationTools.EaseInSine(val1, val2, delta); + return (int)Math.Round(InterpolationTools.EaseInSine(val1, val2, delta)); case BridgeInterpolationMode.OUT_SINE: - return InterpolationTools.EaseOutSine(val1, val2, delta); + return (int)Math.Round(InterpolationTools.EaseOutSine(val1, val2, delta)); case BridgeInterpolationMode.IN_OUT_SINE: - return InterpolationTools.EaseInOutSine(val1, val2, delta); + return (int)Math.Round(InterpolationTools.EaseInOutSine(val1, val2, delta)); default: throw new Exception("DrawBezierPathMode.IntepolateValue: \"" + mode + "\" mode is not supported!"); diff --git a/Source/Plugins/BuilderModes/ClassicModes/CurveLinedefsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/CurveLinedefsMode.cs index 614ba07e0e0f58e81acd8a79c2394b8d655ad2c3..a7da252dd1ca55e2360adcc5f3fba28f636b1fef 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/CurveLinedefsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/CurveLinedefsMode.cs @@ -18,7 +18,10 @@ using System; using System.Collections.Generic; +using System.Drawing; using System.Windows.Forms; +using CodeImp.DoomBuilder.Actions; +using CodeImp.DoomBuilder.BuilderModes.Interface; using CodeImp.DoomBuilder.Map; using CodeImp.DoomBuilder.Rendering; using CodeImp.DoomBuilder.Geometry; @@ -35,6 +38,9 @@ namespace CodeImp.DoomBuilder.BuilderModes { #region ================== Constants + internal const int DEFAULT_VERTICES_COUNT = 8; //mxd + internal const int DEFAULT_DISTANCE = 128; //mxd + internal const int DEFAULT_ANGLE = 180; //mxd private const float LINE_THICKNESS = 0.6f; #endregion @@ -44,6 +50,14 @@ namespace CodeImp.DoomBuilder.BuilderModes // Collections private ICollection<Linedef> selectedlines; private ICollection<Linedef> unselectedlines; + private Dictionary<Linedef, List<Vector2D>> curves; //mxd + + //mxd. UI and controls + private HintLabel hintlabel; + private CurveLinedefsOptionsPanel panel; + private Linedef closestline; + private Vector2D mousedownoffset; + private int prevoffset; #endregion @@ -57,20 +71,25 @@ namespace CodeImp.DoomBuilder.BuilderModes #region ================== Constructor / Disposer // Constructor - public CurveLinedefsMode(EditMode basemode) + public CurveLinedefsMode() { // Make collections by selection selectedlines = General.Map.Map.GetSelectedLinedefs(true); unselectedlines = General.Map.Map.GetSelectedLinedefs(false); + curves = new Dictionary<Linedef, List<Vector2D>>(selectedlines.Count); //mxd + + //mxd. UI + panel = new CurveLinedefsOptionsPanel(); + hintlabel = new HintLabel(General.Colors.InfoLine); } - - // Disposer - public override void Dispose() + + public override void Dispose() //mxd { // Not already disposed? if(!isdisposed) { // Clean up + if(hintlabel != null) hintlabel.Dispose(); // Done base.Dispose(); @@ -81,67 +100,126 @@ namespace CodeImp.DoomBuilder.BuilderModes #region ================== Methods + //mxd + private void GenerateCurves() + { + foreach(Linedef ld in selectedlines) curves[ld] = GenerateCurve(ld); + } + // This generates the vertices to split the line with, from start to end - private static List<Vector2D> GenerateCurve(Linedef line) + private List<Vector2D> GenerateCurve(Linedef line) { - // Fetch settings from window - int vertices = BuilderPlug.Me.CurveLinedefsForm.Vertices; - float distance = BuilderPlug.Me.CurveLinedefsForm.Distance; - float angle = BuilderPlug.Me.CurveLinedefsForm.Angle; - bool fixedcurve = BuilderPlug.Me.CurveLinedefsForm.FixedCurve; - bool backwards = BuilderPlug.Me.CurveLinedefsForm.Backwards; + // Fetch settings from the panel + bool fixedcurve = panel.FixedCurve; + int vertices = Math.Min(panel.Vertices, (int)Math.Ceiling(line.Length / 4)); + int distance = panel.Distance; + int angle = (!fixedcurve && distance == 0 ? Math.Max(5, panel.Angle) : panel.Angle); + float theta = Angle2D.DegToRad(angle); + if(distance < 0) theta = -theta; //mxd // Make list List<Vector2D> points = new List<Vector2D>(vertices); - //Added by Anders �strand 2008-05-18 - //The formulas used are taken from http://mathworld.wolfram.com/CircularSegment.html - //c and theta are known (length of line and angle parameter). d, R and h are - //calculated from those two - //If the curve is not supposed to be a circular segment it's simply deformed to fit - //the value set for distance. - - //The vertices are generated to be evenly distributed (by angle) along the curve - //and lastly they are rotated and moved to fit with the original line - - //calculate some identities of a circle segment (refer to the graph in the url above) - float c = line.Length; - float theta = angle; - - float d = (c / (float)Math.Tan(theta / 2)) / 2; - float R = d / (float)Math.Cos(theta / 2); - float h = R - d; + float segDelta = 1.0f / (vertices + 1); //mxd + Vector2D linecenter = line.GetCenterPoint(); //mxd - float yDeform = fixedcurve ? 1 : distance / h; - if(backwards) yDeform = -yDeform; - - for(int v = 1; v <= vertices; v++) + //mxd. Special cases... + if(angle == 0) + { + for(int v = 1; v <= vertices; v++) + { + float x = (line.Length * segDelta) * (vertices - v + 1) - line.Length * 0.5f; // Line segment coord + + // Rotate and transform to fit original line + Vector2D vertex = new Vector2D(x, 0).GetRotated(line.Angle + Angle2D.PIHALF) + linecenter; + points.Add(vertex); + } + } + else { - //calculate the angle for this vertex - //the curve starts at PI/2 - theta/2 and is segmented into vertices+1 segments - //this assumes the line is horisontal and on y = 0, the point is rotated and moved later + //Added by Anders �strand 2008-05-18 + //The formulas used are taken from http://mathworld.wolfram.com/CircularSegment.html + //c and theta are known (length of line and angle parameter). d, R and h are + //calculated from those two + //If the curve is not supposed to be a circular segment it's simply deformed to fit + //the value set for distance. + + //The vertices are generated to be evenly distributed (by angle) along the curve + //and lastly they are rotated and moved to fit with the original line + + //calculate some identities of a circle segment (refer to the graph in the url above) + float c = line.Length; + + float d = (c / (float)Math.Tan(theta / 2)) / 2; + float R = d / (float)Math.Cos(theta / 2); + float h = R - d; + + float yDeform = (fixedcurve ? 1 : distance / h); + float xDelta = Math.Min(1, yDeform); //mxd + + for(int v = 1; v <= vertices; v++) + { + //calculate the angle for this vertex + //the curve starts at PI/2 - theta/2 and is segmented into vertices+1 segments + //this assumes the line is horisontal and on y = 0, the point is rotated and moved later + + float a = (Angle2D.PI - theta) / 2 + v * (theta / (vertices + 1)); + + //calculate the coordinates of the point, and distort the y coordinate + //using the deform factor calculated above + float xr = (float)Math.Cos(a) * R; //mxd. Circle segment coord + float xl = (line.Length * segDelta) * (vertices - v + 1) - line.Length * 0.5f; // mxd. Line segment coord + float x = InterpolationTools.Linear(xl, xr, xDelta); //mxd + float y = ((float)Math.Sin(a) * R - d) * yDeform; + + //rotate and transform to fit original line + Vector2D vertex = new Vector2D(x, y).GetRotated(line.Angle + Angle2D.PIHALF) + linecenter; + points.Add(vertex); + } + } - float a = (Angle2D.PI - theta) / 2 + v * (theta / (vertices + 1)); + // Done + return points; + } + + #endregion - //calculate the coordinates of the point, and distort the y coordinate - //using the deform factor calculated above - float x = (float)Math.Cos(a) * R; - float y = ((float)Math.Sin(a) * R - d) * yDeform; + #region ================== Settings panel (mxd) - //rotate and transform to fit original line - Vector2D vertex = new Vector2D(x, y).GetRotated(line.Angle + Angle2D.PIHALF); - vertex = vertex.GetTransformed(line.GetCenterPoint().x, line.GetCenterPoint().y, 1, 1); + private void AddInterface() + { + panel = new CurveLinedefsOptionsPanel(); + int vertices = General.Settings.ReadPluginSetting("curvelinedefsmode.vertices", DEFAULT_VERTICES_COUNT); + int distance = General.Settings.ReadPluginSetting("curvelinedefsmode.distance", DEFAULT_DISTANCE); + int angle = General.Settings.ReadPluginSetting("curvelinedefsmode.angle", DEFAULT_ANGLE); + bool fixedcurve = General.Settings.ReadPluginSetting("curvelinedefsmode.fixedcurve", false); + + panel.SetValues(vertices, distance, angle, fixedcurve); + panel.Register(); + panel.OnValueChanged += OnValuesChanged; + } - points.Add(vertex); - } + private void RemoveInterface() + { + panel.OnValueChanged -= OnValuesChanged; + General.Settings.WritePluginSetting("curvelinedefsmode.vertices", panel.Vertices); + General.Settings.WritePluginSetting("curvelinedefsmode.distance", panel.Distance); + General.Settings.WritePluginSetting("curvelinedefsmode.angle", panel.Angle); + General.Settings.WritePluginSetting("curvelinedefsmode.fixedcurve", panel.FixedCurve); + panel.Unregister(); + } + private void OnValuesChanged(object sender, EventArgs e) + { + // Update curves + GenerateCurves(); - // Done - return points; + // Redraw display + General.Interface.RedrawDisplay(); } - + #endregion - + #region ================== Events public override void OnHelp() @@ -165,8 +243,9 @@ namespace CodeImp.DoomBuilder.BuilderModes base.OnEngage(); renderer.SetPresentation(Presentation.Standard); - // Show toolbox window - BuilderPlug.Me.CurveLinedefsForm.Show((Form)General.Interface); + //mxd + AddInterface(); + GenerateCurves(); } // Disenagaging @@ -174,49 +253,65 @@ namespace CodeImp.DoomBuilder.BuilderModes { base.OnDisengage(); - // Hide toolbox window - BuilderPlug.Me.CurveLinedefsForm.Hide(); + // Hide toolbox panel + RemoveInterface(); } // This applies the curves and returns to the base mode public override void OnAccept() { // Create undo - General.Map.UndoRedo.CreateUndo("Curve linedefs"); + string rest = (selectedlines.Count == 1 ? "a linedef" : selectedlines.Count + " linedefs"); //mxd + General.Map.UndoRedo.CreateUndo("Curve " + rest); + + //mxd + General.Map.Map.ClearAllMarks(false); // Go for all selected lines foreach(Linedef ld in selectedlines) { + if(curves[ld].Count < 1) continue; + // Make curve for line - List<Vector2D> points = GenerateCurve(ld); - if(points.Count > 0) - { - // TODO: We may want some sector create/join code in here - // to allow curves that overlap lines and some geometry merging + Linedef splitline = ld; - // Go for all points to split the line - Linedef splitline = ld; - for(int i = 0; i < points.Count; i++) + //mxd. Mark all changed geometry... + splitline.Marked = true; + splitline.Start.Marked = true; + splitline.End.Marked = true; + + // Go for all points to split the line + foreach(Vector2D p in curves[ld]) + { + // Make vertex + Vertex v = General.Map.Map.CreateVertex(p); + if(v == null) { - // Make vertex - Vertex v = General.Map.Map.CreateVertex(points[i]); - if(v == null) - { - General.Map.UndoRedo.WithdrawUndo(); - return; - } + General.Map.UndoRedo.WithdrawUndo(); + return; + } - // Split the line and move on with this line - splitline = splitline.Split(v); - if(splitline == null) - { - General.Map.UndoRedo.WithdrawUndo(); - return; - } + // Split the line and move on with this line + splitline = splitline.Split(v); + if(splitline == null) + { + General.Map.UndoRedo.WithdrawUndo(); + return; } + + //mxd. Mark all changed geometry... + splitline.Marked = true; + splitline.Start.Marked = true; + splitline.End.Marked = true; } } + //mxd + General.Map.Map.Update(); + + //mxd. Stitch geometry + General.Map.Map.StitchGeometry(General.Settings.MergeGeometryMode); + // Snap to map format accuracy General.Map.Map.SnapAllToAccuracy(); @@ -244,19 +339,20 @@ namespace CodeImp.DoomBuilder.BuilderModes // Render things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA); - renderer.RenderNiGHTSPath(); - renderer.Finish(); + renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha); + renderer.RenderNiGHTSPath(); + renderer.Finish(); } // Render overlay if(renderer.StartOverlay(true)) { // Go for all selected lines + float vsize = (renderer.VertexSize + 1.0f) / renderer.Scale; //mxd foreach(Linedef ld in selectedlines) { // Make curve for line - List<Vector2D> points = GenerateCurve(ld); + List<Vector2D> points = curves[ld]; if(points.Count > 0) { Vector2D p1 = ld.Start.Position; @@ -273,14 +369,241 @@ namespace CodeImp.DoomBuilder.BuilderModes // Draw last line renderer.RenderLine(p2, ld.End.Position, LINE_THICKNESS, General.Colors.Highlight, true); + + //mxd. Draw verts + foreach(Vector2D p in points) + renderer.RenderRectangleFilled(new RectangleF(p.x - vsize, p.y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.Selection, true); } } + + //mxd. Render hint + renderer.RenderText(hintlabel); + renderer.Finish(); } renderer.Present(); } + + //mxd + public override void OnMouseDown(MouseEventArgs e) + { + base.OnMouseDown(e); + closestline = MapSet.NearestLinedef(selectedlines, mousedownmappos); + + // Special cases... + int distance; + if(panel.FixedCurve) + { + if(panel.Angle > 0) + { + // Calculate diameter for current angle... + float ma = Angle2D.DegToRad(panel.Angle); + float d = (closestline.Length / (float)Math.Tan(ma / 2f)) / 2; + float D = d / (float)Math.Cos(ma / 2f); + distance = (int)Math.Round(D - d) * Math.Sign(panel.Distance); + } + else + { + distance = 0; // Special cases... + } + } + else + { + distance = panel.Distance; + } + + // Store offset between intial mouse position and curve top + Vector2D perpendicular = closestline.Line.GetPerpendicular().GetNormal(); + if(distance != 0) perpendicular *= distance; // Special cases... + Vector2D curvetop = closestline.GetCenterPoint() - perpendicular; + mousedownoffset = mousedownmappos - curvetop; + } + + //mxd + public override void OnMouseUp(MouseEventArgs e) + { + base.OnMouseUp(e); + closestline = null; + prevoffset = 0; + } + + //mxd + public override void OnMouseMove(MouseEventArgs e) + { + base.OnMouseMove(e); + + // Anything to do? + if((!selectpressed && !editpressed) || closestline == null) + { + hintlabel.Text = string.Empty; + return; + } + + // Do something... + Vector2D perpendicular = closestline.Line.GetPerpendicular().GetNormal(); + if(panel.Distance != 0) perpendicular *= panel.Distance; // Special cases... + Vector2D center = closestline.GetCenterPoint(); + Line2D radius = new Line2D(center, center - perpendicular); + float u = radius.GetNearestOnLine(mousemappos - mousedownoffset); + int dist = (panel.Distance == 0 ? 1 : panel.Distance); // Special cases... + int offset = (int)Math.Round(dist * u - dist); + bool updaterequired = false; + + // Clamp values? + bool clampvalue = !General.Interface.ShiftState; + + // Change verts amount + if(selectpressed && editpressed) + { + if(prevoffset != 0) + { + // Set new verts count without triggering the update... + panel.SetValues(panel.Vertices + Math.Sign(prevoffset - offset), panel.Distance, panel.Angle, panel.FixedCurve); + + // Update hint text + hintlabel.Text = "Vertices: " + panel.Vertices; + updaterequired = true; + } + } + // Change distance + else if(selectpressed && !panel.FixedCurve) + { + if(float.IsNaN(u)) + { + // Set new distance without triggering the update... + panel.SetValues(panel.Vertices, 0, panel.Angle, panel.FixedCurve); // Special cases... + } + else + { + int newoffset; + if(clampvalue) + newoffset = (panel.Distance + offset) / panel.DistanceIncrement * panel.DistanceIncrement; // Clamp to 8 mu increments + else + newoffset = panel.Distance + offset; + + // Set new distance without triggering the update... + panel.SetValues(panel.Vertices, newoffset, panel.Angle, panel.FixedCurve); + } + + // Update hint text + hintlabel.Text = "Distance: " + panel.Distance; + updaterequired = true; + } + // Change angle + else if(editpressed && prevoffset != 0) + { + int newangle = 0; + if(panel.FixedCurve) + { + // Flip required? + if(panel.Angle == 0 && (Math.Sign(offset - prevoffset) != Math.Sign(panel.Distance))) + { + // Set new distance without triggering the update... + panel.SetValues(panel.Vertices, -panel.Distance, panel.Angle, panel.FixedCurve); + + // Recalculate affected values... + perpendicular *= -1; + radius.v2 = center - perpendicular; + u = radius.GetNearestOnLine(mousemappos - mousedownoffset); + } + + //TODO: there surely is a way to get new angle without iteration... + float targetoffset = radius.GetLength() * u; + float prevdiff = float.MaxValue; + int increment = (clampvalue ? panel.AngleIncrement : 1); + for(int i = 1; i < panel.MaximumAngle; i += increment) + { + // Calculate diameter for current angle... + float ma = Angle2D.DegToRad(i); + float d = (closestline.Length / (float)Math.Tan(ma / 2f)) / 2; + float D = d / (float)Math.Cos(ma / 2f); + float h = D - d; + + float curdiff = Math.Abs(h - targetoffset); + + // This one matches better... + if(curdiff < prevdiff) newangle = i; + prevdiff = curdiff; + } + + // Clamp to 5 deg increments + if(clampvalue) newangle = (newangle / panel.AngleIncrement) * panel.AngleIncrement; + } + else + { + int diff = (int)Math.Round((offset - prevoffset) * renderer.Scale); + if(panel.Angle + diff > 0) + { + if(clampvalue) newangle = (panel.Angle / panel.AngleIncrement + Math.Sign(diff)) * panel.AngleIncrement; // Clamp to 5 deg increments + else newangle = panel.Angle + diff; + } + } + + // Set new angle without triggering the update... + panel.SetValues(panel.Vertices, panel.Distance, newangle, panel.FixedCurve); + + // Update hint text + hintlabel.Text = "Angle: " + panel.Angle; + updaterequired = true; + } + + // Update UI + if(updaterequired) + { + // Update label position + float labeldistance; + + if(panel.Angle == 0) + { + labeldistance = 0; // Special cases! + } + else if(panel.FixedCurve) + { + float ma = Angle2D.DegToRad(panel.Angle); + float d = (closestline.Length / (float)Math.Tan(ma / 2f)) / 2; + float D = d / (float)Math.Cos(ma / 2f); + labeldistance = D - d; + } + else + { + labeldistance = Math.Abs(panel.Distance); + } + + labeldistance += 16 / renderer.Scale; + Vector2D labelpos = radius.GetCoordinatesAt(labeldistance / radius.GetLength()); + hintlabel.Move(labelpos, labelpos); + + // Trigger update + OnValuesChanged(null, EventArgs.Empty); + } + + // Store current offset + prevoffset = offset; + } #endregion + + #region ================== Actions (mxd) + + [BeginAction("increasesubdivlevel")] + private void IncreaseSubdivLevel() { panel.Vertices += 1; } + + [BeginAction("decreasesubdivlevel")] + private void DecreaseSubdivLevel() { panel.Vertices -= 1; } + + [BeginAction("increasebevel")] + private void IncreaseBevel() { panel.Distance += panel.DistanceIncrement; } + + [BeginAction("decreasebevel")] + private void DecreaseBevel() { panel.Distance -= panel.DistanceIncrement; } + + [BeginAction("rotateclockwise")] + private void IncreaseAngle() { panel.Angle += panel.AngleIncrement; } + + [BeginAction("rotatecounterclockwise")] + private void DecreaseAngle() { panel.Angle -= panel.AngleIncrement; } + + #endregion } } diff --git a/Source/Plugins/BuilderModes/ClassicModes/DragGeometryMode.cs b/Source/Plugins/BuilderModes/ClassicModes/DragGeometryMode.cs index 923cd99068ae2093823547610e7bfb5c3e709efd..97e740403ce184e84901b86614ec09eb13c17cd3 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/DragGeometryMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/DragGeometryMode.cs @@ -420,10 +420,7 @@ namespace CodeImp.DoomBuilder.BuilderModes MoveGeometryRelative(mousemappos - dragstartmappos, snaptogrid, snaptogridincrement, snaptonearest, snaptocardinaldirection); // Stitch geometry - if(snaptonearest) General.Map.Map.StitchGeometry(); - - // Make corrections for backward linedefs - MapSet.FlipBackwardLinedefs(General.Map.Map.Linedefs); + if(snaptonearest) General.Map.Map.StitchGeometry(General.Settings.MergeGeometryMode); // Snap to map format accuracy General.Map.Map.SnapAllToAccuracy(); @@ -432,11 +429,16 @@ namespace CodeImp.DoomBuilder.BuilderModes if(General.Map.UDMF) { Vector2D offset = dragitem.Position - dragitemposition; + + // Sectors may've been created/removed when applying dragging... + HashSet<Sector> draggedsectors = new HashSet<Sector>(General.Map.Map.GetMarkedSectors(true)); + foreach(Sector ss in selectedsectors) if(!ss.IsDisposed) draggedsectors.Add(ss); // Update floor/ceiling texture offsets? if(BuilderPlug.Me.LockSectorTextureOffsetsWhileDragging) { - foreach(Sector s in selectedsectors) + + foreach(Sector s in draggedsectors) { s.Fields.BeforeFieldsChange(); @@ -498,7 +500,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } // Update slopes - foreach(Sector s in selectedsectors) + foreach(Sector s in draggedsectors) { // Update floor slope? if(s.FloorSlope.GetLengthSq() > 0 && !float.IsNaN(s.FloorSlopeOffset / s.FloorSlope.z)) @@ -545,6 +547,9 @@ namespace CodeImp.DoomBuilder.BuilderModes // Update cached values General.Map.Map.Update(); + //mxd. Let the plugins know + General.Editing.AcceptMode(); + // Done Cursor.Current = Cursors.Default; General.Map.IsChanged = true; diff --git a/Source/Plugins/BuilderModes/ClassicModes/DragLinedefsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/DragLinedefsMode.cs index a55b23426390f4a7f3902fc03338326c638ea71a..4ab6b693671550fcbab763eead22fdd2eee714c7 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/DragLinedefsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/DragLinedefsMode.cs @@ -128,9 +128,9 @@ namespace CodeImp.DoomBuilder.BuilderModes // Start rendering things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA); - renderer.RenderNiGHTSPath(); - renderer.Finish(); + renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha); + renderer.RenderNiGHTSPath(); + renderer.Finish(); } } @@ -160,20 +160,17 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Render things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA); - renderer.RenderThingSet(unselectedthings, Presentation.THINGS_ALPHA); - renderer.RenderThingSet(selectedthings, Presentation.THINGS_ALPHA); - renderer.RenderNiGHTSPath(); - renderer.Finish(); + renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha); + renderer.RenderThingSet(unselectedthings, General.Settings.ActiveThingsAlpha); + renderer.RenderThingSet(selectedthings, General.Settings.ActiveThingsAlpha); + renderer.RenderNiGHTSPath(); + renderer.Finish(); } // Redraw overlay if(renderer.StartOverlay(true)) { - foreach(LineLengthLabel l in labels) - { - renderer.RenderText(l.TextLabel); - } + renderer.RenderText(labels); renderer.Finish(); } } diff --git a/Source/Plugins/BuilderModes/ClassicModes/DragSectorsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/DragSectorsMode.cs index 0bede5a4fafda87a006ba6247d362094efb5882b..6d7b76e8cfb4e2e577f7672eaee9b297cae5108e 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/DragSectorsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/DragSectorsMode.cs @@ -147,9 +147,9 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA); - renderer.RenderNiGHTSPath(); - renderer.Finish(); + renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha); + renderer.RenderNiGHTSPath(); + renderer.Finish(); } } @@ -180,20 +180,17 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Render things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA); - renderer.RenderThingSet(unselectedthings, Presentation.THINGS_ALPHA); - renderer.RenderThingSet(selectedthings, Presentation.THINGS_ALPHA); - renderer.RenderNiGHTSPath(); - renderer.Finish(); + renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha); + renderer.RenderThingSet(unselectedthings, General.Settings.ActiveThingsAlpha); + renderer.RenderThingSet(selectedthings, General.Settings.ActiveThingsAlpha); + renderer.RenderNiGHTSPath(); + renderer.Finish(); } // Redraw overlay if(renderer.StartOverlay(true)) { - foreach(LineLengthLabel l in labels) - { - renderer.RenderText(l.TextLabel); - } + renderer.RenderText(labels); renderer.Finish(); } } diff --git a/Source/Plugins/BuilderModes/ClassicModes/DragThingsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/DragThingsMode.cs index 5e3fa1804db0d3b8c9c0f442b5abf4b8e70f9d16..3145594dee9d6d68851beabfe28d08eede18fcab 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/DragThingsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/DragThingsMode.cs @@ -313,15 +313,15 @@ namespace CodeImp.DoomBuilder.BuilderModes if(renderer.StartThings(true)) { // Render things - renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA); - renderer.RenderThingSet(unselectedthings, Presentation.THINGS_ALPHA); - renderer.RenderThingSet(selectedthings, Presentation.THINGS_ALPHA); - renderer.RenderNiGHTSPath(); - - // Draw the dragged item highlighted - // This is important to know, because this item is used - // for snapping to the grid and snapping to nearest items - renderer.RenderThing(dragitem, General.Colors.Highlight, Presentation.THINGS_ALPHA); + renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha); + renderer.RenderThingSet(unselectedthings, General.Settings.ActiveThingsAlpha); + renderer.RenderThingSet(selectedthings, General.Settings.ActiveThingsAlpha); + renderer.RenderNiGHTSPath(); + + // Draw the dragged item highlighted + // This is important to know, because this item is used + // for snapping to the grid and snapping to nearest items + renderer.RenderThing(dragitem, General.Colors.Highlight, General.Settings.ActiveThingsAlpha); // Done renderer.Finish(); diff --git a/Source/Plugins/BuilderModes/ClassicModes/DragVerticesMode.cs b/Source/Plugins/BuilderModes/ClassicModes/DragVerticesMode.cs index 4064249333522a655dfada4edfde1ad2c1a30f22..a2e898357eac27aeaaba91cf8aa955c90b559736 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/DragVerticesMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/DragVerticesMode.cs @@ -17,6 +17,7 @@ #region ================== Namespaces using System; +using System.Collections.Generic; using CodeImp.DoomBuilder.Map; using CodeImp.DoomBuilder.Rendering; using CodeImp.DoomBuilder.Geometry; @@ -53,7 +54,7 @@ namespace CodeImp.DoomBuilder.BuilderModes #region ================== Constructor / Disposer // Constructor to start dragging immediately - public DragVerticesMode(Vertex dragitem, Vector2D dragstartmappos) + public DragVerticesMode(Vector2D dragstartmappos) { // Mark what we are dragging General.Map.Map.ClearAllMarks(false); @@ -90,7 +91,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Select vertices from marks General.Map.Map.ClearSelectedVertices(); General.Map.Map.SelectMarkedVertices(true, true); - + // Perform normal disengage base.OnDisengage(); @@ -116,9 +117,9 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA); - renderer.RenderNiGHTSPath(); - renderer.Finish(); + renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha); + renderer.RenderNiGHTSPath(); + renderer.Finish(); } } @@ -148,20 +149,17 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Render things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA); - renderer.RenderThingSet(unselectedthings, Presentation.THINGS_ALPHA); - renderer.RenderThingSet(selectedthings, Presentation.THINGS_ALPHA); - renderer.RenderNiGHTSPath(); - renderer.Finish(); + renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha); + renderer.RenderThingSet(unselectedthings, General.Settings.ActiveThingsAlpha); + renderer.RenderThingSet(selectedthings, General.Settings.ActiveThingsAlpha); + renderer.RenderNiGHTSPath(); + renderer.Finish(); } // Redraw overlay if(renderer.StartOverlay(true)) { - foreach(LineLengthLabel l in labels) - { - renderer.RenderText(l.TextLabel); - } + renderer.RenderText(labels); renderer.Finish(); } } diff --git a/Source/Plugins/BuilderModes/ClassicModes/DrawCurveMode.cs b/Source/Plugins/BuilderModes/ClassicModes/DrawCurveMode.cs index 3dfd7e81314b5ceb28a83040ddfd694c7f0c35e8..71e34f79f3e9a58d119e3039b3a82b3f98ea1193 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/DrawCurveMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/DrawCurveMode.cs @@ -140,8 +140,8 @@ namespace CodeImp.DoomBuilder.BuilderModes // Render vertex at cursor renderer.RenderRectangleFilled(new RectangleF(curp.pos.x - vsize, curp.pos.y - vsize, vsize * 2.0f, vsize * 2.0f), color, true); - // Go for all labels - foreach(LineLengthLabel l in labels) renderer.RenderText(l.TextLabel); + // Render labels + renderer.RenderText(labels.ToArray()); //Render info label Vector2D start = new Vector2D(mousemappos.x + (32 / renderer.Scale), mousemappos.y - (16 / renderer.Scale)); @@ -183,7 +183,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Map.UndoRedo.CreateUndo("Curve draw"); // Make an analysis and show info - string[] adjectives = new[] + string[] adjectives = { "beautiful", "lovely", "romantic", "stylish", "cheerful", "comical", "awesome", "accurate", "adorable", "adventurous", "attractive", "cute", @@ -197,27 +197,23 @@ namespace CodeImp.DoomBuilder.BuilderModes List<DrawnVertex> verts = new List<DrawnVertex>(); - //if we have a curve... + // If we have a curve... if(points.Count > 2) { - //is it a closed curve? - int lastPoint; - if(points[0].pos == points[points.Count - 1].pos) - { - lastPoint = curve.Segments.Count; - } + // Is it an (auto)closed curve? + int lastpoint; + if(drawingautoclosed || points[0].pos == points[points.Count - 1].pos) + lastpoint = curve.Segments.Count; else - { - lastPoint = curve.Segments.Count - 1; - } + lastpoint = curve.Segments.Count - 1; - for(int i = 0; i < lastPoint; i++) + for(int i = 0; i < lastpoint; i++) { int next = (i == curve.Segments.Count - 1 ? 0 : i + 1); bool stitch = points[i].stitch && points[next].stitch; bool stitchline = points[i].stitchline && points[next].stitchline; - //add segment points except the last one + // Add segment points except the last one for(int c = 0; c < curve.Segments[i].Points.Length - 1; c++) { DrawnVertex dv = new DrawnVertex(); @@ -228,9 +224,9 @@ namespace CodeImp.DoomBuilder.BuilderModes } } - //add last point + // Add the last point DrawnVertex end = new DrawnVertex(); - end.pos = curve.Segments[lastPoint - 1].End; + end.pos = curve.Segments[lastpoint - 1].End; end.stitch = verts[verts.Count - 1].stitch; end.stitchline = verts[verts.Count - 1].stitchline; verts.Add(end); @@ -252,6 +248,9 @@ namespace CodeImp.DoomBuilder.BuilderModes // Update cached values General.Map.Map.Update(); + //mxd. Outer sectors may require some splittin... + if(General.Settings.SplitJoinedSectors) Tools.SplitOuterSectors(General.Map.Map.GetMarkedLinedefs(true)); + // Edit new sectors? List<Sector> newsectors = General.Map.Map.GetMarkedSectors(true); if(BuilderPlug.Me.EditNewSector && (newsectors.Count > 0)) @@ -283,6 +282,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Reset settings points.Clear(); labels.Clear(); + drawingautoclosed = false; // Redraw display General.Interface.RedrawDisplay(); @@ -319,9 +319,11 @@ namespace CodeImp.DoomBuilder.BuilderModes panel.SegmentLength = segmentlength; panel.OnValueChanged += OptionsPanelOnValueChanged; panel.OnContinuousDrawingChanged += OnContinuousDrawingChanged; + panel.OnAutoCloseDrawingChanged += OnAutoCloseDrawingChanged; - // Needs to be set after adding the OnContinuousDrawingChanged event... + // Needs to be set after adding the events... panel.ContinuousDrawing = General.Settings.ReadPluginSetting("drawcurvemode.continuousdrawing", false); + panel.AutoCloseDrawing = General.Settings.ReadPluginSetting("drawlinesmode.autoclosedrawing", false); } protected override void AddInterface() @@ -334,6 +336,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Store settings General.Settings.WritePluginSetting("drawcurvemode.segmentlength", segmentlength); General.Settings.WritePluginSetting("drawcurvemode.continuousdrawing", panel.ContinuousDrawing); + General.Settings.WritePluginSetting("drawlinesmode.autoclosedrawing", panel.AutoCloseDrawing); // Remove the buttons panel.Unregister(); diff --git a/Source/Plugins/BuilderModes/ClassicModes/DrawEllipseMode.cs b/Source/Plugins/BuilderModes/ClassicModes/DrawEllipseMode.cs index c14e5f1a620084d5c16d09bf87d7036239a624f4..583d6d9469d248e27f4f854bf3bfb44a95ae8cd3 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/DrawEllipseMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/DrawEllipseMode.cs @@ -1,6 +1,8 @@ #region ================== Namespaces using System; +using System.Collections.Generic; +using CodeImp.DoomBuilder.Actions; using CodeImp.DoomBuilder.Editing; using CodeImp.DoomBuilder.Geometry; @@ -20,17 +22,22 @@ namespace CodeImp.DoomBuilder.BuilderModes public class DrawEllipseMode : DrawRectangleMode { #region ================== Variables - - // Drawing - private float angle; // in radians // Interface private DrawEllipseOptionsPanel panel; + // Drawing + private float angle; // in radians + #endregion #region ================== Constructor + public DrawEllipseMode() + { + autoclosedrawing = false; + } + #endregion #region ================== Settings panel @@ -60,9 +67,11 @@ namespace CodeImp.DoomBuilder.BuilderModes panel.Subdivisions = subdivisions; panel.OnValueChanged += OptionsPanelOnValueChanged; panel.OnContinuousDrawingChanged += OnContinuousDrawingChanged; + panel.OnShowGuidelinesChanged += OnShowGuidelinesChanged; // Needs to be set after adding the OnContinuousDrawingChanged event... panel.ContinuousDrawing = General.Settings.ReadPluginSetting("drawellipsemode.continuousdrawing", false); + panel.ShowGuidelines = General.Settings.ReadPluginSetting("drawellipsemode.showguidelines", false); } override protected void AddInterface() @@ -77,6 +86,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Settings.WritePluginSetting("drawellipsemode.bevelwidth", bevelwidth); General.Settings.WritePluginSetting("drawellipsemode.angle", panel.Angle); General.Settings.WritePluginSetting("drawellipsemode.continuousdrawing", panel.ContinuousDrawing); + General.Settings.WritePluginSetting("drawellipsemode.showguidelines", panel.ShowGuidelines); // Remove the buttons panel.Unregister(); @@ -105,8 +115,8 @@ namespace CodeImp.DoomBuilder.BuilderModes Vector2D[] shape = new Vector2D[subdivisions + 1]; bool doBevel = false; - int hw = width / 2; - int hh = height / 2; + float hw = width / 2.0f; + float hh = height / 2.0f; Vector2D center = new Vector2D(pStart.x + hw, pStart.y + hh); float curAngle = angle; @@ -114,16 +124,16 @@ namespace CodeImp.DoomBuilder.BuilderModes for(int i = 0; i < subdivisions; i++) { - int px, py; + float px, py; if(doBevel) { - px = (int)(center.x - (float)Math.Sin(curAngle) * (hw + currentbevelwidth)); - py = (int)(center.y - (float)Math.Cos(curAngle) * (hh + currentbevelwidth)); + px = (float)Math.Round(center.x - (float)Math.Sin(curAngle) * (hw + currentbevelwidth)); + py = (float)Math.Round(center.y - (float)Math.Cos(curAngle) * (hh + currentbevelwidth)); } else { - px = (int)(center.x - (float)Math.Sin(curAngle) * hw); - py = (int)(center.y - (float)Math.Cos(curAngle) * hh); + px = (float)Math.Round(center.x - (float)Math.Sin(curAngle) * hw); + py = (float)Math.Round(center.y - (float)Math.Cos(curAngle) * hh); } doBevel = !doBevel; shape[i] = new Vector2D(px, py); @@ -132,12 +142,71 @@ namespace CodeImp.DoomBuilder.BuilderModes // Add final point shape[subdivisions] = shape[0]; + + // Now fit it inside the bounding box + float minx = float.MaxValue; + float miny = float.MaxValue; + float maxx = float.MinValue; + float maxy = float.MinValue; + + // Calculate shape extents + foreach(Vector2D v in shape) + { + if(v.x < minx) minx = v.x; + if(v.x > maxx) maxx = v.x; + if(v.y < miny) miny = v.y; + if(v.y > maxy) maxy = v.y; + } + + // Calculate scalers + float scalerx = 1.0f; + float scalery = 1.0f; + + if(minx != pStart.x || maxx != pEnd.x) + scalerx = (pEnd.x - pStart.x) / (maxx - minx); + if(miny != pStart.y) + scalery = (pEnd.y - pStart.y) / (maxy - miny); + + // Apply scalers + if(scalerx != 1.0f || scalery != 1.0f) + { + for(int i = 0; i < shape.Length; i++) + { + shape[i].x = ((center.x - shape[i].x) * scalerx + center.x); + shape[i].y = ((center.y - shape[i].y) * scalery + center.y); + } + } + + // Calculate shape extents again... + minx = float.MaxValue; + miny = float.MaxValue; + foreach(Vector2D v in shape) + { + if(v.x < minx) minx = v.x; + if(v.y < miny) miny = v.y; + } + + // Calculate shape offset... + Vector2D offset = new Vector2D(); + if(minx != pStart.x) offset.x = pStart.x - minx; + if(miny != pStart.y) offset.y = pStart.y - miny; + + // Apply offset... + if(offset.x != 0.0f || offset.y != 0.0f) + for(int i = 0; i < shape.Length; i++) shape[i] += offset; + + // Done return shape; } - protected override string GetHintText() + protected override string GetHintText() { - return "BVL: " + bevelwidth + "; VERTS: " + subdivisions; + List<string> result = new List<string>(); + if(bevelwidth != 0) result.Add("BVL: " + bevelwidth); + if(subdivisions != 0) result.Add("VERTS: " + subdivisions); + if(panel.Angle != 0) result.Add("ANGLE: " + panel.Angle); + + return string.Join("; ", result.ToArray()); } #endregion @@ -229,6 +298,22 @@ namespace CodeImp.DoomBuilder.BuilderModes } } + [BeginAction("rotateclockwise")] + private void IncreaseAngle() + { + panel.Angle = General.ClampAngle(panel.Angle + 5); + angle = Angle2D.DegToRad(panel.Angle); + Update(); + } + + [BeginAction("rotatecounterclockwise")] + private void DecreaseAngle() + { + panel.Angle = General.ClampAngle(panel.Angle - 5); + angle = Angle2D.DegToRad(panel.Angle); + Update(); + } + #endregion } } diff --git a/Source/Plugins/BuilderModes/ClassicModes/DrawGeometryMode.cs b/Source/Plugins/BuilderModes/ClassicModes/DrawGeometryMode.cs index 31fce87d431a6fcbca0f065d0a1e252dccadd810..bdee3d71f4fee69c005be8ab8de2988124ef256a 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/DrawGeometryMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/DrawGeometryMode.cs @@ -23,6 +23,7 @@ using System.Windows.Forms; using CodeImp.DoomBuilder.Actions; using CodeImp.DoomBuilder.Editing; using CodeImp.DoomBuilder.Geometry; +using CodeImp.DoomBuilder.GZBuilder.Geometry; using CodeImp.DoomBuilder.Map; using CodeImp.DoomBuilder.Rendering; using CodeImp.DoomBuilder.Windows; @@ -54,18 +55,20 @@ namespace CodeImp.DoomBuilder.BuilderModes // Drawing points protected List<DrawnVertex> points; protected List<LineLengthLabel> labels; - - // Keep track of view changes (never used. mxd) - //protected float lastoffsetx; - //protected float lastoffsety; - //protected float lastscale; + private LineLengthLabel[] guidelabels; //mxd // Options protected bool snaptogrid; // SHIFT to toggle protected bool snaptonearest; // CTRL to enable protected bool snaptocardinaldirection; //mxd. ALT-SHIFT to enable - protected static bool usefourcardinaldirections; + protected bool usefourcardinaldirections; protected bool continuousdrawing; //mxd. Restart after finishing drawing? + protected bool autoclosedrawing; //mxd. Finish drawing when new points and existing geometry form a closed shape + protected bool drawingautoclosed; //mxd + protected bool showguidelines; //mxd + + //mxd. Map area bounds + private Line2D top, bottom, left, right; //mxd. Labels display style protected bool labelshowangle = true; @@ -107,8 +110,8 @@ namespace CodeImp.DoomBuilder.BuilderModes if(!isdisposed) { // Clean up - if(labels != null) - foreach(LineLengthLabel l in labels) l.Dispose(); + if(labels != null) foreach(LineLengthLabel l in labels) l.Dispose(); + if(guidelabels != null) foreach(LineLengthLabel l in guidelabels) l.Dispose(); // Done base.Dispose(); @@ -152,9 +155,13 @@ namespace CodeImp.DoomBuilder.BuilderModes { // Update labels for already drawn lines for(int i = 0; i < labels.Count - 1; i++) + { + labels[i].ShowAngle = showguidelines; labels[i].Move(points[i].pos, points[i + 1].pos); + } // Update label for active line + labels[labels.Count - 1].ShowAngle = showguidelines; labels[labels.Count - 1].Move(points[points.Count - 1].pos, curp.pos); } @@ -165,6 +172,15 @@ namespace CodeImp.DoomBuilder.BuilderModes PixelColor color; if(points.Count > 0) { + //mxd + bool renderguidelabels = false; + if(showguidelines) + { + Vector2D prevp = points[points.Count - 1].pos; + renderguidelabels = (curp.pos.x != prevp.x && curp.pos.y != prevp.y); + RenderGuidelines(prevp, curp.pos, General.Colors.Guideline.WithAlpha(80)); + } + // Render lines DrawnVertex lastp = points[0]; for(int i = 1; i < points.Count; i++) @@ -195,6 +211,12 @@ namespace CodeImp.DoomBuilder.BuilderModes // Render vertex renderer.RenderRectangleFilled(new RectangleF(points[i].pos.x - vsize, points[i].pos.y - vsize, vsize * 2.0f, vsize * 2.0f), color, true); } + + //mxd. Render guide labels? + if(renderguidelabels) renderer.RenderText(guidelabels); + + // Render labels + renderer.RenderText(labels.ToArray()); } // Determine point color @@ -203,9 +225,6 @@ namespace CodeImp.DoomBuilder.BuilderModes // Render vertex at cursor renderer.RenderRectangleFilled(new RectangleF(curp.pos.x - vsize, curp.pos.y - vsize, vsize * 2.0f, vsize * 2.0f), color, true); - // Go for all labels - foreach(LineLengthLabel l in labels) renderer.RenderText(l.TextLabel); - // Done renderer.Finish(); } @@ -214,6 +233,89 @@ namespace CodeImp.DoomBuilder.BuilderModes renderer.Present(); } + //mxd + protected void RenderGuidelines(Vector2D start, Vector2D end, PixelColor c) + { + if(end.x != start.x && end.y != start.y) + { + Vector2D tr = new Vector2D(Math.Max(end.x, start.x), Math.Max(end.y, start.y)); + Vector2D bl = new Vector2D(Math.Min(end.x, start.x), Math.Min(end.y, start.y)); + + // Create guidelines + Line3D[] lines = new Line3D[5]; + lines[0] = new Line3D(new Vector2D(tr.x, General.Map.Config.TopBoundary), new Vector2D(tr.x, General.Map.Config.BottomBoundary), c, false); + lines[1] = new Line3D(new Vector2D(bl.x, General.Map.Config.TopBoundary), new Vector2D(bl.x, General.Map.Config.BottomBoundary), c, false); + lines[2] = new Line3D(new Vector2D(General.Map.Config.LeftBoundary, tr.y), new Vector2D(General.Map.Config.RightBoundary, tr.y), c, false); + lines[3] = new Line3D(new Vector2D(General.Map.Config.LeftBoundary, bl.y), new Vector2D(General.Map.Config.RightBoundary, bl.y), c, false); + + // Create current line extent. Make sure v1 is to the left of v2 + Line2D current = (end.x < start.x ? new Line2D(end, start) : new Line2D(start, end)); + + Vector2D extentstart, extentend; + if(current.v1.y < current.v2.y) // Start is lower + { + // Start point can hit left or bottom boundaries + extentstart = Line2D.GetIntersectionPoint(left, current, false); + if(extentstart.y < General.Map.Config.BottomBoundary) + extentstart = Line2D.GetIntersectionPoint(bottom, current, false); + + // End point can hit right or top boundaries + extentend = Line2D.GetIntersectionPoint(right, current, false); + if(extentend.y > General.Map.Config.TopBoundary) + extentend = Line2D.GetIntersectionPoint(top, current, false); + } + else // Start is higher + { + // Start point can hit left or top boundaries + extentstart = Line2D.GetIntersectionPoint(left, current, false); + if(extentstart.y > General.Map.Config.TopBoundary) + extentstart = Line2D.GetIntersectionPoint(top, current, false); + + // End point can hit right or bottom boundaries + extentend = Line2D.GetIntersectionPoint(right, current, false); + if(extentend.y < General.Map.Config.BottomBoundary) + extentend = Line2D.GetIntersectionPoint(bottom, current, false); + } + + lines[4] = new Line3D(extentstart, extentend, c, false); + + // Render them + renderer.RenderArrows(lines); + + // Update horiz/vert length labels + if(guidelabels != null) + { + guidelabels[0].Move(tr, new Vector2D(tr.x, bl.y)); + guidelabels[1].Move(new Vector2D(bl.x, tr.y), tr); + guidelabels[2].Move(new Vector2D(tr.x, bl.y), bl); + guidelabels[3].Move(bl, new Vector2D(bl.x, tr.y)); + } + } + // Render horizontal line + 2 vertical guidelines + else if(end.x != start.x) + { + Line3D l = new Line3D(new Vector2D(General.Map.Config.LeftBoundary, end.y), new Vector2D(General.Map.Config.RightBoundary, end.y), c, false); + Line3D gs = new Line3D(new Vector2D(start.x, General.Map.Config.TopBoundary), new Vector2D(start.x, General.Map.Config.BottomBoundary), c, false); + Line3D ge = new Line3D(new Vector2D(end.x, General.Map.Config.TopBoundary), new Vector2D(end.x, General.Map.Config.BottomBoundary), c, false); + renderer.RenderArrows(new List<Line3D> { l, gs, ge }); + } + // Render vertical line + 2 horizontal guidelines + else if(end.y != start.y) + { + Line3D l = new Line3D(new Vector2D(end.x, General.Map.Config.TopBoundary), new Vector2D(end.x, General.Map.Config.BottomBoundary), c, false); + Line3D gs = new Line3D(new Vector2D(General.Map.Config.LeftBoundary, start.y), new Vector2D(General.Map.Config.RightBoundary, start.y), c, false); + Line3D ge = new Line3D(new Vector2D(General.Map.Config.LeftBoundary, end.y), new Vector2D(General.Map.Config.RightBoundary, end.y), c, false); + renderer.RenderArrows(new List<Line3D> {l, gs, ge}); + } + // Start and end match. Render a cross + else + { + Line3D gs = new Line3D(new Vector2D(General.Map.Config.LeftBoundary, start.y), new Vector2D(General.Map.Config.RightBoundary, start.y), c, false); + Line3D ge = new Line3D(new Vector2D(start.x, General.Map.Config.TopBoundary), new Vector2D(start.x, General.Map.Config.BottomBoundary), c, false); + renderer.RenderArrows(new List<Line3D> { gs, ge }); + } + } + //mxd private void RenderLinedefDirectionIndicator(Vector2D start, Vector2D end, PixelColor color) { @@ -224,15 +326,16 @@ namespace CodeImp.DoomBuilder.BuilderModes } // This returns the aligned and snapped draw position - public static DrawnVertex GetCurrentPosition(Vector2D mousemappos, bool snaptonearest, bool snaptogrid, bool snaptocardinal, IRenderer2D renderer, List<DrawnVertex> points) + public static DrawnVertex GetCurrentPosition(Vector2D mousemappos, bool snaptonearest, bool snaptogrid, bool snaptocardinal, bool usefourcardinaldirections, IRenderer2D renderer, List<DrawnVertex> points) { DrawnVertex p = new DrawnVertex(); p.stitch = true; //mxd. Setting these to false seems to be a good way to create invalid geometry... p.stitchline = true; //mxd + snaptocardinal = (snaptocardinal && points.Count > 0); //mxd. Don't snap to cardinal when there are no points //mxd. If snap to cardinal directions is enabled and we have points, modify mouse position - Vector2D vm; - if(snaptocardinal && points.Count > 0) + Vector2D vm, gridoffset; + if(snaptocardinal) { Vector2D offset = mousemappos - points[points.Count - 1].pos; @@ -244,10 +347,15 @@ namespace CodeImp.DoomBuilder.BuilderModes offset = new Vector2D(0, -offset.GetLength()).GetRotated(angle); vm = points[points.Count - 1].pos + offset; + + //mxd. We need to be snapped relative to initial position + Vector2D prev = points[points.Count - 1].pos; + gridoffset = prev - General.Map.Grid.SnappedToGrid(prev); } else { vm = mousemappos; + gridoffset = new Vector2D(); } float vrange = BuilderPlug.Me.StitchRange / renderer.Scale; @@ -258,31 +366,60 @@ namespace CodeImp.DoomBuilder.BuilderModes // Go for all drawn points foreach(DrawnVertex v in points) { - if(Vector2D.DistanceSq(mousemappos, v.pos) < (vrange * vrange)) + if(Vector2D.DistanceSq(vm, v.pos) < (vrange * vrange)) { p.pos = v.pos; - //p.stitch = true; - //p.stitchline = true; return p; } } // Try the nearest vertex - Vertex nv = General.Map.Map.NearestVertexSquareRange(mousemappos, vrange); + Vertex nv = General.Map.Map.NearestVertexSquareRange(vm, vrange); if(nv != null) { - p.pos = nv.Position; - //p.stitch = true; - //p.stitchline = true; - return p; + //mxd. Line angle must stay the same + if(snaptocardinal) + { + Line2D ourline = new Line2D(points[points.Count - 1].pos, vm); + if(Math.Round(ourline.GetSideOfLine(nv.Position), 1) == 0) + { + p.pos = nv.Position; + return p; + } + } + else + { + p.pos = nv.Position; + return p; + } } - // Try the nearest linedef - Linedef nl = General.Map.Map.NearestLinedefRange(mousemappos, BuilderPlug.Me.StitchRange / renderer.Scale); + // Try the nearest linedef. mxd. We'll need much bigger stitch distance when snapping to cardinal directions + Linedef nl = General.Map.Map.NearestLinedefRange(vm, BuilderPlug.Me.StitchRange / renderer.Scale); if(nl != null) { + //mxd. Line angle must stay the same + if(snaptocardinal) + { + Line2D ourline = new Line2D(points[points.Count - 1].pos, vm); + Line2D nearestline = new Line2D(nl.Start.Position, nl.End.Position); + Vector2D intersection = Line2D.GetIntersectionPoint(nearestline, ourline, false); + if(!float.IsNaN(intersection.x)) + { + // Intersection is on nearestline? + float u = Line2D.GetNearestOnLine(nearestline.v1, nearestline.v2, intersection); + + if(u < 0f || u > 1f) { } + else + { + p.pos = new Vector2D((float)Math.Round(intersection.x, General.Map.FormatInterface.VertexDecimals), + (float)Math.Round(intersection.y, General.Map.FormatInterface.VertexDecimals)); + return p; + } + } + } // Snap to grid? - if(snaptogrid) + else if(snaptogrid) { // Get grid intersection coordinates List<Vector2D> coords = nl.GetGridIntersections(); @@ -293,7 +430,7 @@ namespace CodeImp.DoomBuilder.BuilderModes Vector2D found_coord = new Vector2D(); foreach(Vector2D v in coords) { - Vector2D delta = mousemappos - v; + Vector2D delta = vm - v; if(delta.GetLengthSq() < found_distance) { found_distance = delta.GetLengthSq(); @@ -306,17 +443,13 @@ namespace CodeImp.DoomBuilder.BuilderModes { // Align to the closest grid intersection p.pos = found_coord; - //p.stitch = true; - //p.stitchline = true; return p; } } else { // Aligned to line - p.pos = nl.NearestOnLine(mousemappos); - //p.stitch = true; - //p.stitchline = true; + p.pos = nl.NearestOnLine(vm); return p; } } @@ -326,11 +459,9 @@ namespace CodeImp.DoomBuilder.BuilderModes // Always snap to the first drawn vertex so that the user can finish a complete sector without stitching if(points.Count > 0) { - if(Vector2D.DistanceSq(mousemappos, points[0].pos) < (vrange * vrange)) + if(Vector2D.DistanceSq(vm, points[0].pos) < (vrange * vrange)) { p.pos = points[0].pos; - //p.stitch = true; - //p.stitchline = false; return p; } } @@ -372,31 +503,26 @@ namespace CodeImp.DoomBuilder.BuilderModes vm = points[points.Count - 1].pos; else vm = dline.GetCoordinatesAt(u); - } - // Snap to grid? if(snaptogrid) { // Aligned to grid - p.pos = General.Map.Grid.SnappedToGrid(vm); + p.pos = General.Map.Grid.SnappedToGrid(vm - gridoffset) + gridoffset; // special handling if(p.pos.x > General.Map.Config.RightBoundary) p.pos.x = General.Map.Config.RightBoundary; if(p.pos.y < General.Map.Config.BottomBoundary) p.pos.y = General.Map.Config.BottomBoundary; - //p.stitch = snaptonearest; - //p.stitchline = snaptonearest; + return p; } else { // Normal position - vm.x = (float)Math.Round(vm.x); //mxd - vm.y = (float)Math.Round(vm.y); //mxd - p.pos = vm; - //p.stitch = snaptonearest; - //p.stitchline = snaptonearest; + p.pos.x = (float)Math.Round(vm.x); //mxd + p.pos.y = (float)Math.Round(vm.y); //mxd + return p; } } @@ -404,7 +530,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // This gets the aligned and snapped draw position protected DrawnVertex GetCurrentPosition() { - return GetCurrentPosition(mousemappos, snaptonearest, snaptogrid, snaptocardinaldirection, renderer, points); + return GetCurrentPosition(mousemappos, snaptonearest, snaptogrid, snaptocardinaldirection, usefourcardinaldirections, renderer, points); } // This draws a point at a specific location @@ -420,6 +546,14 @@ namespace CodeImp.DoomBuilder.BuilderModes pos.y > General.Map.Config.TopBoundary || pos.y < General.Map.Config.BottomBoundary) return false; + //mxd. Avoid zero-length lines... + if(points.Count > 0) + { + Vector2D delta = points[points.Count - 1].pos - pos; + if((Math.Abs(delta.x) <= 0.001f) && (Math.Abs(delta.y) <= 0.001f)) + return true; + } + DrawnVertex newpoint = new DrawnVertex(); newpoint.pos = pos; newpoint.stitch = stitch; @@ -428,28 +562,125 @@ namespace CodeImp.DoomBuilder.BuilderModes labels.Add(new LineLengthLabel(labelshowangle, labeluseoffset)); Update(); - // Check if point stitches with the first - if((points.Count > 1) && points[points.Count - 1].stitch) + if(points.Count > 1) { - Vector2D p1 = points[0].pos; - Vector2D p2 = points[points.Count - 1].pos; - Vector2D delta = p1 - p2; - if((Math.Abs(delta.x) <= 0.001f) && (Math.Abs(delta.y) <= 0.001f)) + // Check if point stitches with the first + if(points[points.Count - 1].stitch) { - //mxd. Seems... logical? - if(points.Count == 2) + Vector2D p1 = points[0].pos; + Vector2D p2 = points[points.Count - 1].pos; + Vector2D delta = p1 - p2; + if((Math.Abs(delta.x) <= 0.001f) && (Math.Abs(delta.y) <= 0.001f)) { - OnCancel(); + //mxd. Seems... logical? + if(points.Count == 2) + { + OnCancel(); + return true; + } + + // Finish drawing + FinishDraw(); return true; } + } + + //mxd. Points and existing geometry form a closed shape? + if(autoclosedrawing) + { + // Determive center point + float minx = float.MaxValue; + float maxx = float.MinValue; + float miny = float.MaxValue; + float maxy = float.MinValue; + + foreach(DrawnVertex v in points) + { + if(v.pos.x < minx) minx = v.pos.x; + if(v.pos.x > maxx) maxx = v.pos.x; + if(v.pos.y < miny) miny = v.pos.y; + if(v.pos.y > maxy) maxy = v.pos.y; + } + + Vector2D shapecenter = new Vector2D(minx + (maxx - minx) / 2, miny + (maxy - miny) / 2); - // Finish drawing - FinishDraw(); + // Determine center point between start and end points + minx = Math.Min(points[0].pos.x, points[points.Count - 1].pos.x); + maxx = Math.Max(points[0].pos.x, points[points.Count - 1].pos.x); + miny = Math.Min(points[0].pos.y, points[points.Count - 1].pos.y); + maxy = Math.Max(points[0].pos.y, points[points.Count - 1].pos.y); + + Vector2D startendcenter = new Vector2D(minx + (maxx - minx) / 2, miny + (maxy - miny) / 2); + + // Offset the center perpendicular to the start -> end line direction... + if(shapecenter == startendcenter) + { + shapecenter -= new Line2D(points[0].pos, points[points.Count - 1].pos).GetPerpendicular().GetNormal(); + } + + // Do the check + if(CanFinishDrawing(points[0].pos, points[points.Count - 1].pos, shapecenter)) + { + drawingautoclosed = true; + FinishDraw(); + } } } return true; } + + //mxd + private static bool CanFinishDrawing(Vector2D start, Vector2D end, Vector2D center) + { + Linedef startline = FindPotentialLine(start, center); + if(startline == null) return false; + + Linedef endline = FindPotentialLine(end, center); + if(endline == null) return false; + + // Can finish drawing if a path between startline and endline exists + return Tools.FindClosestPath(startline, startline.SideOfLine(center) < 0.0f, endline, endline.SideOfLine(center) < 0.0f, true) != null; + } + + //mxd + private static Linedef FindPotentialLine(Vector2D target, Vector2D center) + { + // Target position on top of existing vertex? + Vertex v = General.Map.Map.NearestVertex(target); + if(v == null) return null; + + Linedef result = null; + if(v.Position == target) + { + float mindistance = float.MaxValue; + foreach(Linedef l in v.Linedefs) + { + if(result == null) + { + result = l; + mindistance = Vector2D.DistanceSq(l.GetCenterPoint(), center); + } + else + { + float curdistance = Vector2D.DistanceSq(l.GetCenterPoint(), center); + if(curdistance < mindistance) + { + mindistance = curdistance; + result = l; + } + } + } + } + else + { + // Result position will split a line? + result = General.Map.Map.NearestLinedef(target); + if(result.SideOfLine(target) != 0) return null; + } + + return result; + } #endregion @@ -460,9 +691,30 @@ namespace CodeImp.DoomBuilder.BuilderModes //Add options docker panel = new DrawLineOptionsPanel(); panel.OnContinuousDrawingChanged += OnContinuousDrawingChanged; + panel.OnAutoCloseDrawingChanged += OnAutoCloseDrawingChanged; + panel.OnShowGuidelinesChanged += OnShowGuidelinesChanged; - // Needs to be set after adding the OnContinuousDrawingChanged event... + // Needs to be set after adding the events... panel.ContinuousDrawing = General.Settings.ReadPluginSetting("drawlinesmode.continuousdrawing", false); + panel.AutoCloseDrawing = General.Settings.ReadPluginSetting("drawlinesmode.autoclosedrawing", false); + panel.ShowGuidelines = General.Settings.ReadPluginSetting("drawlinesmode.showguidelines", false); + + // Create guide labels + guidelabels = new LineLengthLabel[4]; + for(int i = 0; i < guidelabels.Length; i++) + { + guidelabels[i] = new LineLengthLabel { ShowAngle = false, Color = General.Colors.InfoLine }; + } + + // Create map boudary lines + Vector2D btl = new Vector2D(General.Map.Config.LeftBoundary, General.Map.Config.TopBoundary); + Vector2D btr = new Vector2D(General.Map.Config.RightBoundary, General.Map.Config.TopBoundary); + Vector2D bbl = new Vector2D(General.Map.Config.LeftBoundary, General.Map.Config.BottomBoundary); + Vector2D bbr = new Vector2D(General.Map.Config.RightBoundary, General.Map.Config.BottomBoundary); + top = new Line2D(btl, btr); + right = new Line2D(btr, bbr); + bottom = new Line2D(bbl, bbr); + left = new Line2D(btl, bbl); } protected virtual void AddInterface() @@ -473,6 +725,8 @@ namespace CodeImp.DoomBuilder.BuilderModes protected virtual void RemoveInterface() { General.Settings.WritePluginSetting("drawlinesmode.continuousdrawing", panel.ContinuousDrawing); + General.Settings.WritePluginSetting("drawlinesmode.autoclosedrawing", panel.AutoCloseDrawing); + General.Settings.WritePluginSetting("drawlinesmode.showguidelines", panel.ShowGuidelines); panel.Unregister(); } @@ -509,7 +763,11 @@ namespace CodeImp.DoomBuilder.BuilderModes public override void OnCancel() { //mxd. Cannot leave this way when continuous drawing is enabled - if(continuousdrawing) return; + if(continuousdrawing) + { + drawingautoclosed = false; + return; + } // Cancel base class base.OnCancel(); @@ -553,6 +811,9 @@ namespace CodeImp.DoomBuilder.BuilderModes // Update cached values General.Map.Map.Update(); + //mxd. Outer sectors may require some splittin... + if(General.Settings.SplitJoinedSectors) Tools.SplitOuterSectors(General.Map.Map.GetMarkedLinedefs(true)); + // Edit new sectors? List<Sector> newsectors = General.Map.Map.GetMarkedSectors(true); if(BuilderPlug.Me.EditNewSector && (newsectors.Count > 0)) @@ -584,6 +845,7 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Reset settings points.Clear(); labels.Clear(); + drawingautoclosed = false; //mxd. Redraw display General.Interface.RedrawDisplay(); @@ -611,9 +873,9 @@ namespace CodeImp.DoomBuilder.BuilderModes // Render things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA); - renderer.RenderNiGHTSPath(); - renderer.Finish(); + renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha); + renderer.RenderNiGHTSPath(); + renderer.Finish(); } // Normal update @@ -651,6 +913,19 @@ namespace CodeImp.DoomBuilder.BuilderModes { continuousdrawing = (bool)value; } + + //mxd + protected void OnAutoCloseDrawingChanged(object value, EventArgs e) + { + autoclosedrawing = (bool)value; + } + + //mxd + protected void OnShowGuidelinesChanged(object value, EventArgs e) + { + showguidelines = (bool)value; + General.Interface.RedrawDisplay(); + } #endregion @@ -668,15 +943,22 @@ namespace CodeImp.DoomBuilder.BuilderModes } } - // Remove a point + // Remove last point [BeginAction("removepoint")] - public virtual void RemovePoint() + public virtual void RemovePoint() { RemovePointAt(points.Count - 1); } + + //mxd. Remove first point + [BeginAction("removefirstpoint")] + public virtual void RemoveFirstPoint() { RemovePointAt(0); } + + //mxd + private void RemovePointAt(int index) { - if(points.Count > 0) points.RemoveAt(points.Count - 1); - if(labels.Count > 0) + if(points.Count > 0 && points.Count > index) points.RemoveAt(index); + if(labels.Count > 0 && labels.Count > index) { - labels[labels.Count - 1].Dispose(); - labels.RemoveAt(labels.Count - 1); + labels[index].Dispose(); + labels.RemoveAt(index); } Update(); diff --git a/Source/Plugins/BuilderModes/ClassicModes/DrawGridMode.cs b/Source/Plugins/BuilderModes/ClassicModes/DrawGridMode.cs index 3ce2499348c86f355539acd6cbb616c369347f74..981443137a77caeb79cdcb9e1c417901f1587fab 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/DrawGridMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/DrawGridMode.cs @@ -72,6 +72,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { snaptogrid = true; usefourcardinaldirections = true; + autoclosedrawing = false; gridpoints = new List<DrawnVertex[]>(); } @@ -91,7 +92,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Map.UndoRedo.CreateUndo("Grid draw"); // Make an analysis and show info - string[] adjectives = new[] { "gloomy", "sad", "unhappy", "lonely", "troubled", "depressed", "heartsick", "glum", "pessimistic", "bitter", "downcast" }; // aaand my english vocabulary ends here :) + string[] adjectives = { "gloomy", "sad", "unhappy", "lonely", "troubled", "depressed", "heartsick", "glum", "pessimistic", "bitter", "downcast" }; // aaand my english vocabulary ends here :) string word = adjectives[new Random().Next(adjectives.Length - 1)]; string a = (word[0] == 'u' ? "an " : "a "); @@ -113,6 +114,9 @@ namespace CodeImp.DoomBuilder.BuilderModes // Clear selection General.Map.Map.ClearAllSelected(); + //mxd. Outer sectors may require some splittin... + if(General.Settings.SplitJoinedSectors) Tools.SplitOuterSectors(General.Map.Map.GetMarkedLinedefs(true)); + // Edit new sectors? if(BuilderPlug.Me.EditNewSector && (newsectors.Count > 0)) General.Interface.ShowEditSectors(newsectors); @@ -144,6 +148,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Reset settings points.Clear(); labels.Clear(); + drawingautoclosed = false; // Redraw display General.Interface.RedrawDisplay(); @@ -155,6 +160,12 @@ namespace CodeImp.DoomBuilder.BuilderModes } } + public override void OnDisengage() + { + if(hintlabel != null) hintlabel.Dispose(); + base.OnDisengage(); + } + private void OptionsPanelOnValueChanged(object sender, EventArgs eventArgs) { triangulate = panel.Triangulate; @@ -196,7 +207,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { // Handle the case when start point is not on current grid. Vector2D gridoffset = General.Map.Grid.SnappedToGrid(points[0].pos) - points[0].pos; - curp = GetCurrentPosition(mousemappos + gridoffset, snaptonearest, snaptogrid, snaptocardinaldirection, renderer, points); + curp = GetCurrentPosition(mousemappos + gridoffset, snaptonearest, snaptogrid, snaptocardinaldirection, usefourcardinaldirections, renderer, points); curp.pos -= gridoffset; } else @@ -216,6 +227,10 @@ namespace CodeImp.DoomBuilder.BuilderModes UpdateReferencePoints(points[0], curp); List<Vector2D[]> shapes = GetShapes(start, end); + // Render guidelines + if(showguidelines) + RenderGuidelines(start, end, General.Colors.Guideline.WithAlpha(80)); + //render shape foreach(Vector2D[] shape in shapes) { @@ -231,11 +246,21 @@ namespace CodeImp.DoomBuilder.BuilderModes } //and labels - Vector2D[] labelCoords = new[] { start, new Vector2D(end.x, start.y), end, new Vector2D(start.x, end.y), start }; - for(int i = 1; i < 5; i++) + if(width == 0 || height == 0) { - labels[i - 1].Move(labelCoords[i], labelCoords[i - 1]); - renderer.RenderText(labels[i - 1].TextLabel); + // Render label for line + labels[0].Move(start, end); + renderer.RenderText(labels[0].TextLabel); + } + else + { + // Render labels for grid + Vector2D[] labelCoords = { start, new Vector2D(end.x, start.y), end, new Vector2D(start.x, end.y), start }; + for(int i = 1; i < 5; i++) + { + labels[i - 1].Move(labelCoords[i], labelCoords[i - 1]); + renderer.RenderText(labels[i - 1].TextLabel); + } } //render hint @@ -289,7 +314,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { // Handle the case when start point is not on current grid. Vector2D gridoffset = General.Map.Grid.SnappedToGrid(points[0].pos) - points[0].pos; - newpoint = GetCurrentPosition(mousemappos + gridoffset, snaptonearest, snaptogrid, snaptocardinaldirection, renderer, new List<DrawnVertex> { points[0] }); + newpoint = GetCurrentPosition(mousemappos + gridoffset, snaptonearest, snaptogrid, snaptocardinaldirection, usefourcardinaldirections, renderer, new List<DrawnVertex> { points[0] }); newpoint.pos -= gridoffset; // Create vertices for final shape. @@ -352,7 +377,8 @@ namespace CodeImp.DoomBuilder.BuilderModes int step = width / slicesH; for(int w = 0; w < slicesH; w++) { - shapes.Add(new[] { new Vector2D((int)s.x + step * w, (int)s.y), new Vector2D((int)s.x + step * w + step, (int)s.y) }); + shapes.Add(new[] { new Vector2D((float)Math.Round(s.x + step * w), (float)Math.Round(s.y)), + new Vector2D((float)Math.Round(s.x + step * w + step), (float)Math.Round(s.y)) }); } return shapes; } @@ -363,7 +389,8 @@ namespace CodeImp.DoomBuilder.BuilderModes int step = height / slicesV; for(int h = 0; h < slicesV; h++) { - shapes.Add(new[] {new Vector2D((int) s.x, (int) s.y + step * h), new Vector2D((int) s.x, (int) s.y + step * h + step)}); + shapes.Add(new[] { new Vector2D((float)Math.Round(s.x), (float)Math.Round(s.y + step * h)), + new Vector2D((float)Math.Round(s.x), (float)Math.Round(s.y + step * h + step)) }); } return shapes; } @@ -372,7 +399,7 @@ namespace CodeImp.DoomBuilder.BuilderModes return new List<Vector2D[]> {new[] {s, e}}; } - // Create shape + // Create grid shape List<Vector2D> rect = new List<Vector2D> { s, new Vector2D((int)s.x, (int)e.y), e, new Vector2D((int)e.x, (int)s.y), s }; if(slicesH == 1 && slicesV == 1) { @@ -385,12 +412,12 @@ namespace CodeImp.DoomBuilder.BuilderModes RectangleF[,] blocks = new RectangleF[slicesH, slicesV]; for(int w = 0; w < slicesH; w++) { - for(int h = 0; h < slicesV; h++) + for(int h = 0; h < slicesV; h++) { - float left = InterpolationTools.Interpolate(s.x, e.x, (float)w / slicesH, horizontalinterpolation); - float top = InterpolationTools.Interpolate(s.y, e.y, (float)h / slicesV, verticalinterpolation); - float right = InterpolationTools.Interpolate(s.x, e.x, (w + 1.0f) / slicesH, horizontalinterpolation); - float bottom = InterpolationTools.Interpolate(s.y, e.y, (h + 1.0f)/ slicesV, verticalinterpolation); + float left = (float)Math.Round(InterpolationTools.Interpolate(s.x, e.x, (float)w / slicesH, horizontalinterpolation)); + float top = (float)Math.Round(InterpolationTools.Interpolate(s.y, e.y, (float)h / slicesV, verticalinterpolation)); + float right = (float)Math.Round(InterpolationTools.Interpolate(s.x, e.x, (w + 1.0f) / slicesH, horizontalinterpolation)); + float bottom = (float)Math.Round(InterpolationTools.Interpolate(s.y, e.y, (h + 1.0f)/ slicesV, verticalinterpolation)); blocks[w, h] = RectangleF.FromLTRB(left, top, right, bottom); } } @@ -400,15 +427,15 @@ namespace CodeImp.DoomBuilder.BuilderModes { for(int w = 1; w < slicesH; w++) { - int px = (int) Math.Round(blocks[w, 0].X); - shapes.Add(new[] {new Vector2D(px, s.y), new Vector2D(px, e.y)}); + float px = (float)Math.Round(blocks[w, 0].X); + shapes.Add(new[] { new Vector2D(px, s.y), new Vector2D(px, e.y) }); } } if(slicesV > 1) { for(int h = 1; h < slicesV; h++) { - int py = (int) Math.Round(blocks[0, h].Y); + float py = (float)Math.Round(blocks[0, h].Y); shapes.Add(new[] { new Vector2D(s.x, py), new Vector2D(e.x, py) }); } } @@ -498,16 +525,18 @@ namespace CodeImp.DoomBuilder.BuilderModes panel.OnValueChanged += OptionsPanelOnValueChanged; panel.OnGridLockModeChanged += OptionsPanelOnGridLockChanged; panel.OnContinuousDrawingChanged += OnContinuousDrawingChanged; + panel.OnShowGuidelinesChanged += OnShowGuidelinesChanged; // Needs to be set after adding the OnContinuousDrawingChanged event... panel.ContinuousDrawing = General.Settings.ReadPluginSetting("drawgridmode.continuousdrawing", false); + panel.ShowGuidelines = General.Settings.ReadPluginSetting("drawgridmode.showguidelines", false); } protected override void AddInterface() { // Add docker docker = new Docker("drawgrid", "Draw Grid", panel); - General.Interface.AddDocker(docker); + General.Interface.AddDocker(docker, true); General.Interface.SelectDocker(docker); } @@ -521,6 +550,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Settings.WritePluginSetting("drawgridmode.horizontalinterpolation", (int)horizontalinterpolation); General.Settings.WritePluginSetting("drawgridmode.verticalinterpolation", (int)verticalinterpolation); General.Settings.WritePluginSetting("drawgridmode.continuousdrawing", panel.ContinuousDrawing); + General.Settings.WritePluginSetting("drawgridmode.showguidelines", panel.ShowGuidelines); // Remove docker General.Interface.RemoveDocker(docker); diff --git a/Source/Plugins/BuilderModes/ClassicModes/DrawRectangleMode.cs b/Source/Plugins/BuilderModes/ClassicModes/DrawRectangleMode.cs index 688508f59e560af4cdc32f49399949db9e50dbb1..252cd90205c1b6ffee29b66ea14cb4bb504bd13f 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/DrawRectangleMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/DrawRectangleMode.cs @@ -47,6 +47,8 @@ namespace CodeImp.DoomBuilder.BuilderModes protected int minpointscount; protected bool alwaysrendershapehints; + private bool blockupdate; + // Interface private DrawRectangleOptionsPanel panel; @@ -58,6 +60,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { snaptogrid = true; usefourcardinaldirections = true; + autoclosedrawing = false; } public override void Dispose() @@ -97,9 +100,11 @@ namespace CodeImp.DoomBuilder.BuilderModes panel.Subdivisions = subdivisions; panel.OnValueChanged += OptionsPanelOnValueChanged; panel.OnContinuousDrawingChanged += OnContinuousDrawingChanged; + panel.OnShowGuidelinesChanged += OnShowGuidelinesChanged; // Needs to be set after adding the OnContinuousDrawingChanged event... panel.ContinuousDrawing = General.Settings.ReadPluginSetting("drawrectanglemode.continuousdrawing", false); + panel.ShowGuidelines = General.Settings.ReadPluginSetting("drawrectanglemode.showguidelines", false); } protected override void AddInterface() @@ -113,6 +118,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Settings.WritePluginSetting("drawrectanglemode.subdivisions", subdivisions); General.Settings.WritePluginSetting("drawrectanglemode.bevelwidth", bevelwidth); General.Settings.WritePluginSetting("drawrectanglemode.continuousdrawing", panel.ContinuousDrawing); + General.Settings.WritePluginSetting("drawrectanglemode.showguidelines", panel.ShowGuidelines); // Remove the buttons panel.Unregister(); @@ -124,6 +130,8 @@ namespace CodeImp.DoomBuilder.BuilderModes override protected void Update() { + if(blockupdate) return; + PixelColor stitchcolor = General.Colors.Highlight; PixelColor losecolor = General.Colors.Selection; @@ -144,6 +152,10 @@ namespace CodeImp.DoomBuilder.BuilderModes UpdateReferencePoints(points[0], curp); Vector2D[] shape = GetShape(start, end); + // Render guidelines + if(showguidelines) + RenderGuidelines(start, end, General.Colors.Guideline.WithAlpha(80)); + //render shape for(int i = 1; i < shape.Length; i++) renderer.RenderLine(shape[i - 1], shape[i], LINE_THICKNESS, color, true); @@ -153,27 +165,42 @@ namespace CodeImp.DoomBuilder.BuilderModes renderer.RenderRectangleFilled(new RectangleF(shape[i].x - vsize, shape[i].y - vsize, vsize * 2.0f, vsize * 2.0f), color, true); //and labels - Vector2D[] labelCoords = new[] { start, new Vector2D(end.x, start.y), end, new Vector2D(start.x, end.y), start }; - for(int i = 1; i < 5; i++) + if(shape.Length == 2) { - labels[i - 1].Move(labelCoords[i], labelCoords[i - 1]); - renderer.RenderText(labels[i - 1].TextLabel); + // Render label for line + labels[0].Move(start, end); + renderer.RenderText(labels[0].TextLabel); } - - //got beveled corners? - if(alwaysrendershapehints || shape.Length > minpointscount + 1) + else if(shape.Length > 3) { - //render hint - if(width > 64 * vsize && height > 16 * vsize) + // Render labels for rectangle + Vector2D[] labelCoords = { start, new Vector2D(end.x, start.y), end, new Vector2D(start.x, end.y), start }; + for(int i = 1; i < 5; i++) { - hintlabel.Move(start, end); - hintlabel.Text = GetHintText(); - renderer.RenderText(hintlabel.TextLabel); + labels[i - 1].Move(labelCoords[i], labelCoords[i - 1]); + renderer.RenderText(labels[i - 1].TextLabel); } - - //and shape corners - for(int i = 0; i < 4; i++) - renderer.RenderRectangleFilled(new RectangleF(labelCoords[i].x - vsize, labelCoords[i].y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.InfoLine, true); + + //got beveled corners? + if(alwaysrendershapehints || shape.Length > minpointscount + 1) + { + //render hint + if(width > 64 * vsize && height > 16 * vsize) + { + hintlabel.Move(start, end); + hintlabel.Text = GetHintText(); + renderer.RenderText(hintlabel.TextLabel); + } + + //and shape corners + for(int i = 0; i < 4; i++) + renderer.RenderRectangleFilled(new RectangleF(labelCoords[i].x - vsize, labelCoords[i].y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.InfoLine, true); + } + } + else + { + // Render vertex at points[0] + renderer.RenderRectangleFilled(new RectangleF(start.x - vsize, start.y - vsize, vsize * 2.0f, vsize * 2.0f), General.Colors.InfoLine, true); } } else @@ -263,9 +290,13 @@ namespace CodeImp.DoomBuilder.BuilderModes return points; } - protected virtual string GetHintText() + protected virtual string GetHintText() { - return "BVL: " + bevelwidth + "; SUB: " + subdivisions; + List<string> result = new List<string>(); + if(bevelwidth != 0) result.Add("BVL: " + bevelwidth); + if(subdivisions != 0) result.Add("SUB: " + subdivisions); + + return string.Join("; ", result.ToArray()); } // Update top-left and bottom-right points, which define drawing shape @@ -332,7 +363,11 @@ namespace CodeImp.DoomBuilder.BuilderModes points = new List<DrawnVertex>(); //clear points Vector2D[] shape = GetShape(start, end); + // We don't want base.DrawPointAt to call Update() here, because it will mess labels[] + // and trigger shape.Count number of display redraws... + blockupdate = true; foreach(Vector2D t in shape) base.DrawPointAt(t, true, true); + blockupdate = false; FinishDraw(); } @@ -346,6 +381,11 @@ namespace CodeImp.DoomBuilder.BuilderModes Update(); } + public override void RemoveFirstPoint() + { + RemovePoint(); + } + #endregion #region ================== Events @@ -362,7 +402,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Map.UndoRedo.CreateUndo(undoname); // Make an analysis and show info - string[] adjectives = new[] { "gloomy", "sad", "unhappy", "lonely", "troubled", "depressed", "heartsick", "glum", "pessimistic", "bitter", "downcast" }; // aaand my english vocabulary ends here :) + string[] adjectives = { "gloomy", "sad", "unhappy", "lonely", "troubled", "depressed", "heartsick", "glum", "pessimistic", "bitter", "downcast" }; // aaand my english vocabulary ends here :) string word = adjectives[new Random().Next(adjectives.Length - 1)]; string a = (word[0] == 'u' ? "an " : "a "); @@ -380,6 +420,9 @@ namespace CodeImp.DoomBuilder.BuilderModes // Update cached values General.Map.Map.Update(); + //mxd. Outer sectors may require some splittin... + if(General.Settings.SplitJoinedSectors) Tools.SplitOuterSectors(General.Map.Map.GetMarkedLinedefs(true)); + // Edit new sectors? List<Sector> newsectors = General.Map.Map.GetMarkedSectors(true); if(BuilderPlug.Me.EditNewSector && (newsectors.Count > 0)) @@ -411,6 +454,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Reset settings points.Clear(); labels.Clear(); + drawingautoclosed = false; // Redraw display General.Interface.RedrawDisplay(); @@ -422,6 +466,12 @@ namespace CodeImp.DoomBuilder.BuilderModes } } + public override void OnDisengage() + { + if(hintlabel != null) hintlabel.Dispose(); + base.OnDisengage(); + } + public override void OnHelp() { General.ShowHelp("/gzdb/features/classic_modes/mode_drawrect.html"); diff --git a/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs b/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs index 87780cc35899e3d1074b40c97e2be5f62f0152a0..32357f9c5b104535746328d03112584460682617 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs @@ -70,6 +70,14 @@ namespace CodeImp.DoomBuilder.BuilderModes RotateLB } + internal enum HeightAdjustMode + { + NONE, + ADJUST_FLOORS, + ADJUST_CEILINGS, + ADJUST_BOTH, + } + #endregion #region ================== Structs (mxd) @@ -138,8 +146,9 @@ namespace CodeImp.DoomBuilder.BuilderModes private bool modealreadyswitching; private bool clearselection; //mxd private bool pasting; - private bool autodrag; //mxd - private PasteOptions pasteoptions; + private bool autodrag; //mxd + private PasteOptions pasteoptions; + private HeightAdjustMode heightadjustmode; //mxd // Docker private EditSelectionPanel panel; @@ -161,6 +170,7 @@ namespace CodeImp.DoomBuilder.BuilderModes private List<int> thingangledoom; private ICollection<Vertex> unselectedvertices; private ICollection<Linedef> unselectedlines; + private ICollection<Linedef> unstablelines; //mxd // Modification private float rotation; @@ -225,6 +235,9 @@ namespace CodeImp.DoomBuilder.BuilderModes internal bool ScaleFloorOffsets { get { return scaleflooroffsets; } set { scaleflooroffsets = value; UpdateAllChanges(); } } internal bool ScaleCeilingOffsets { get { return scaleceiloffsets; } set { scaleceiloffsets = value; UpdateAllChanges(); } } + //mxd. Height offset mode + internal HeightAdjustMode SectorHeightAdjustMode { get { return heightadjustmode; } set { heightadjustmode = value; } } + #endregion #region ================== Constructor / Disposer @@ -331,13 +344,13 @@ namespace CodeImp.DoomBuilder.BuilderModes private void Highlight(MapElement h) { // Undraw previous highlight - if((highlighted != null) && !highlighted.IsDisposed) + if(highlighted != null && !highlighted.IsDisposed) { if(highlighted is Vertex) { if(renderer.StartPlotter(false)) { - renderer.PlotVertex((highlighted as Vertex), renderer.DetermineVertexColor((highlighted as Vertex))); + renderer.PlotVertex((Vertex)highlighted, renderer.DetermineVertexColor((Vertex)highlighted)); renderer.Finish(); } } @@ -345,7 +358,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(renderer.StartThings(false)) { - renderer.RenderThing((highlighted as Thing), renderer.DetermineThingColor((highlighted as Thing)), Presentation.THINGS_ALPHA); + renderer.RenderThing((Thing)highlighted, renderer.DetermineThingColor((Thing)highlighted), General.Settings.ActiveThingsAlpha); renderer.Finish(); } } @@ -355,13 +368,13 @@ namespace CodeImp.DoomBuilder.BuilderModes highlighted = h; // Render highlighted item - if((highlighted != null) && !highlighted.IsDisposed) + if(highlighted != null && !highlighted.IsDisposed) { if(highlighted is Vertex) { if(renderer.StartPlotter(false)) { - renderer.PlotVertex((highlighted as Vertex), ColorCollection.HIGHLIGHT); + renderer.PlotVertex((Vertex)highlighted, ColorCollection.HIGHLIGHT); renderer.Finish(); } } @@ -369,7 +382,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(renderer.StartThings(false)) { - renderer.RenderThing((highlighted as Thing), General.Colors.Highlight, Presentation.THINGS_ALPHA); + renderer.RenderThing((Thing)highlighted, General.Colors.Highlight, General.Settings.ActiveThingsAlpha); renderer.Finish(); } } @@ -835,8 +848,14 @@ namespace CodeImp.DoomBuilder.BuilderModes index = 0; foreach(Thing t in selectedthings) { - if(!fixedrotationthingtypes.Contains(t.SRB2Type) && newthingangle[index] != thingangle[index]) //mxd. Polyobject Anchors, I hate you! - t.Rotate(Angle2D.Normalized(newthingangle[index])); + //mxd. Added special Polyobj Anchor handling and Doom angle clamping + if(!fixedrotationthingtypes.Contains(t.SRB2Type)) + { + int newangle = Angle2D.RealToDoom(Angle2D.Normalized(newthingangle[index])); + if(General.Map.Config.DoomThingRotationAngles) newangle = newangle / 45 * 45; + t.Rotate(newangle); + } + index++; } @@ -897,7 +916,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(scaleoffsets) { fields["xscale" + si.Part] = new UniValue(UniversalType.Float, (float) Math.Round(si.Scale.x * scale.x, General.Map.FormatInterface.VertexDecimals)); - fields["yscale" + si.Part] = new UniValue(UniversalType.Float, (float) Math.Round(si.Scale.y * scale.y, General.Map.FormatInterface.VertexDecimals)); + fields["yscale" + si.Part] = new UniValue(UniversalType.Float, (float) Math.Round(-si.Scale.y * scale.y, General.Map.FormatInterface.VertexDecimals)); } // Restore scale else @@ -1016,9 +1035,27 @@ namespace CodeImp.DoomBuilder.BuilderModes // This flips all linedefs in the selection (used for mirroring) private void FlipLinedefs() { + //mxd. Check if we need to flip sidedefs + bool flipsides = false; + HashSet<Linedef> selectedlineshash = new HashSet<Linedef>(selectedlines); + foreach(Vertex v in selectedvertices) + { + foreach(Linedef l in v.Linedefs) + { + if(!selectedlineshash.Contains(l)) + { + flipsides = true; + break; + } + } + } + // Flip linedefs foreach(Linedef ld in selectedlines) + { ld.FlipVertices(); + if(flipsides) ld.FlipSidedefs(); //mxd + } // Done linesflipped = !linesflipped; @@ -1026,6 +1063,150 @@ namespace CodeImp.DoomBuilder.BuilderModes #endregion + #region ================== Sector height adjust methods (mxd) + + //x = floor height, y = ceiling height + private static Point GetOutsideHeights(HashSet<Sector> sectors) + { + Sector target = null; + Point result = new Point { X = int.MinValue, Y = int.MinValue }; + foreach(Sector s in sectors) + { + foreach(Sidedef side in s.Sidedefs) + { + // Don't compare with our own stuff, among other things + if(side.Other == null || side.Other.Sector == null || sectors.Contains(side.Other.Sector)) continue; + if(target == null) + { + target = side.Other.Sector; + result.X = target.FloorHeight; + result.Y = target.CeilHeight; + } + else if(target != side.Other.Sector) + { + // Compare heights + if(target.FloorHeight != side.Other.Sector.FloorHeight) + result.X = int.MinValue; + if(target.CeilHeight != side.Other.Sector.CeilHeight) + result.Y = int.MinValue; + + // We can stop now... + if(result.X == int.MinValue && result.Y == int.MinValue) + return result; + } + } + } + + return result; + } + + private static void AdjustSectorsHeight(HashSet<Sector> toadjust, HeightAdjustMode adjustmode, int oldfloorheight, int oldceilheight) + { + // Adjust only when selection is inside a single sector + if(adjustmode == HeightAdjustMode.NONE || oldfloorheight == int.MinValue || oldceilheight == int.MinValue) return; + Point outsideheights = GetOutsideHeights(toadjust); + if(outsideheights.X == int.MinValue && outsideheights.Y == int.MinValue) return; + + // Height differences + int floorheightdiff = (outsideheights.X == int.MinValue ? int.MinValue : outsideheights.X - oldfloorheight); + int ceilheightdiff = (outsideheights.Y == int.MinValue ? int.MinValue : outsideheights.Y - oldceilheight); + + switch(adjustmode) + { + case HeightAdjustMode.ADJUST_FLOORS: + if(floorheightdiff != int.MinValue) + { + foreach(Sector s in toadjust) AdjustSectorHeight(s, floorheightdiff, int.MinValue); + } + break; + + case HeightAdjustMode.ADJUST_CEILINGS: + if(ceilheightdiff != int.MinValue) + { + foreach(Sector s in toadjust) AdjustSectorHeight(s, int.MinValue, ceilheightdiff); + } + break; + + case HeightAdjustMode.ADJUST_BOTH: + foreach(Sector s in toadjust) AdjustSectorHeight(s, floorheightdiff, ceilheightdiff); + break; + + default: + throw new NotImplementedException("Unknown HeightAdjustMode: " + adjustmode); + } + } + + private static void AdjustSectorHeight(Sector s, int flooroffset, int ceiloffset) + { + // Adjust floor height + if(flooroffset != int.MinValue) + { + // Adjust regular height + s.FloorHeight += flooroffset; + + if(General.Map.UDMF) + { + // Adjust slope height? + if(s.FloorSlope.GetLengthSq() > 0 && !float.IsNaN(s.FloorSlopeOffset / s.FloorSlope.z)) + { + s.FloorSlopeOffset -= flooroffset * (float)Math.Sin(s.FloorSlope.GetAngleZ()); + } + // Adjust vertex height? + else if(s.Sidedefs.Count == 3) + { + // Collect verts + HashSet<Vertex> verts = new HashSet<Vertex>(); + foreach(Sidedef side in s.Sidedefs) + { + verts.Add(side.Line.Start); + verts.Add(side.Line.End); + } + + // Offset verts + foreach(Vertex v in verts) + { + if(!float.IsNaN(v.ZFloor)) v.ZFloor += flooroffset; + } + } + } + } + + // Adjust ceiling height + if(ceiloffset != int.MinValue) + { + // Adjust regular height + s.CeilHeight += ceiloffset; + + if(General.Map.UDMF) + { + // Adjust slope height? + if(s.CeilSlope.GetLengthSq() > 0 && !float.IsNaN(s.CeilSlopeOffset / s.CeilSlope.z)) + { + s.CeilSlopeOffset -= ceiloffset * (float)Math.Sin(s.CeilSlope.GetAngleZ()); + } + // Adjust vertex height? + else if(s.Sidedefs.Count == 3) + { + // Collect verts + HashSet<Vertex> verts = new HashSet<Vertex>(); + foreach(Sidedef side in s.Sidedefs) + { + verts.Add(side.Line.Start); + verts.Add(side.Line.End); + } + + // Offset verts + foreach(Vertex v in verts) + { + if(!float.IsNaN(v.ZCeiling)) v.ZCeiling += ceiloffset; + } + } + } + } + } + + #endregion + #region ================== Events public override void OnHelp() @@ -1046,12 +1227,13 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.AddButton(BuilderPlug.Me.MenusForm.FlipSelectionV); //mxd. Get EditPanel-related settings - usepreciseposition = General.Settings.ReadPluginSetting("editselectionusespreciseposition", true); + usepreciseposition = General.Settings.ReadPluginSetting("editselectionmode.usepreciseposition", true); + heightadjustmode = (HeightAdjustMode)General.Settings.ReadPluginSetting("editselectionmode.heightadjustmode", (int)HeightAdjustMode.NONE); // Add docker panel = new EditSelectionPanel(this); docker = new Docker("editselection", "Edit Selection", panel); - General.Interface.AddDocker(docker); + General.Interface.AddDocker(docker, true); General.Interface.SelectDocker(docker); // We don't want to record this for undoing while we move the geometry around. @@ -1089,6 +1271,7 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(Linedef l in markedlines) l.Selected = true; selectedlines = General.Map.Map.LinedefsFromMarkedVertices(false, true, false); unselectedlines = General.Map.Map.LinedefsFromMarkedVertices(true, false, false); + unstablelines = (pasting ? new List<Linedef>() : General.Map.Map.LinedefsFromMarkedVertices(false, false, true)); //mxd // Array to keep original coordinates vertexpos = new List<Vector2D>(selectedvertices.Count); @@ -1127,7 +1310,6 @@ namespace CodeImp.DoomBuilder.BuilderModes if((t.Position.x + t.Size) > right.x) right.x = t.Position.x + t.Size; if((t.Position.y + t.Size) > right.y) right.y = t.Position.y + t.Size; - if(!fixedrotationthingtypes.Contains(t.SRB2Type)) //mxd { ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(t.SRB2Type); @@ -1192,6 +1374,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Update panel.ShowOriginalValues(baseoffset, basesize); panel.SetTextureTransformSettings(General.Map.UDMF); //mxd + panel.SetHeightAdjustMode(heightadjustmode, sectors.Count > 0); //mxd UpdateRectangleComponents(); UpdatePanel(); Update(); @@ -1392,6 +1575,10 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Map.Map.Update(true, true); + //mxd + int oldoutsidefloorheight = int.MinValue; + int oldoutsideceilingheight = int.MinValue; + // When pasting, we want to join with the parent sector // where the sidedefs are referencing a virtual sector if(pasting) @@ -1402,6 +1589,13 @@ namespace CodeImp.DoomBuilder.BuilderModes // Go for all sidedes in the new geometry List<Sidedef> newsides = General.Map.Map.GetMarkedSidedefs(true); + List<Linedef> oldlines = General.Map.Map.GetMarkedLinedefs(false); //mxd + + //mxd. Let's use a blockmap... + RectangleF area = MapSet.CreateArea(oldlines); + BlockMap<BlockEntry> blockmap = new BlockMap<BlockEntry>(area); + blockmap.AddLinedefsSet(oldlines); + foreach(Sidedef s in newsides) { // Connected to a virtual sector? @@ -1420,7 +1614,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { // Find out in which sector this was pasted Vector2D testpoint = s.Line.GetSidePoint(!s.IsFront); - Linedef nl = MapSet.NearestLinedef(General.Map.Map.GetMarkedLinedefs(false), testpoint); + Linedef nl = MapSet.NearestLinedef(blockmap, testpoint); //mxd if(nl != null) { Sidedef joinsidedef = (nl.SideOfLine(testpoint) <= 0 ? nl.Front : nl.Back); @@ -1463,30 +1657,55 @@ namespace CodeImp.DoomBuilder.BuilderModes // Do we have a virtual and parent sector? if((vsector != null) && (parent != null)) { - // Adjust the floor and ceiling heights of all new sectors - if(pasteoptions.AdjustHeights) - { - ICollection<Sector> newsectors = General.Map.Map.GetMarkedSectors(true); - foreach(Sector s in newsectors) - { - s.CeilHeight += parent.CeilHeight - vsector.CeilHeight; - s.FloorHeight += parent.FloorHeight - vsector.FloorHeight; - } - } + //mxd. Store floor/ceiling height + oldoutsidefloorheight = vsector.FloorHeight; + oldoutsideceilingheight = vsector.CeilHeight; } // Remove any virtual sectors General.Map.Map.RemoveVirtualSectors(); } - + else + { + //mxd. Get floor/ceiling height from outside sectors + if(unstablelines.Count == 0 && heightadjustmode != HeightAdjustMode.NONE) + { + // Get affected sectors + HashSet<Sector> affectedsectors = new HashSet<Sector>(General.Map.Map.GetSelectedSectors(true)); + + Point outsideheights = GetOutsideHeights(affectedsectors); + oldoutsidefloorheight = outsideheights.X; + oldoutsideceilingheight = outsideheights.Y; + } + } + + //mxd. We'll need sidedefs marked by StitchGeometry, not all sidedefs from selection... + General.Map.Map.ClearMarkedSidedefs(false); + // Stitch geometry - if(snaptonearest) General.Map.Map.StitchGeometry(); + General.Map.Map.StitchGeometry(General.Settings.MergeGeometryMode); - // Make corrections for backward linedefs - MapSet.FlipBackwardLinedefs(General.Map.Map.Linedefs); - // Snap to map format accuracy General.Map.Map.SnapAllToAccuracy(General.Map.UDMF && usepreciseposition); + + //mxd. Get new lines from linedef marks... + HashSet<Linedef> newlines = new HashSet<Linedef>(General.Map.Map.GetMarkedLinedefs(true)); + + //mxd. Marked lines were created during linedef splitting + HashSet<Linedef> changedlines = new HashSet<Linedef>(selectedlines); + changedlines.UnionWith(newlines); + + //mxd. Update sector height? + if(changedlines.Count > 0 && heightadjustmode != HeightAdjustMode.NONE + && oldoutsidefloorheight != int.MinValue && oldoutsideceilingheight != int.MinValue) + { + // Sectors may've been created/removed when applying dragging... + HashSet<Sector> draggedsectors = new HashSet<Sector>(General.Map.Map.GetMarkedSectors(true)); + foreach(Sector ss in selectedsectors.Keys) if(!ss.IsDisposed) draggedsectors.Add(ss); + + // Change floor/ceiling height + AdjustSectorsHeight(draggedsectors, heightadjustmode, oldoutsidefloorheight, oldoutsideceilingheight); + } // Update cached values General.Map.Data.UpdateUsedTextures(); @@ -1528,8 +1747,9 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.FlipSelectionV); //mxd. Save EditPanel-related settings - General.Settings.WritePluginSetting("editselectionusespreciseposition", usepreciseposition); - + General.Settings.WritePluginSetting("editselectionmode.usepreciseposition", usepreciseposition); + General.Settings.WritePluginSetting("editselectionmode.heightadjustmode", (int)heightadjustmode); + // Remove docker General.Interface.RemoveDocker(docker); panel.Dispose(); @@ -1564,18 +1784,18 @@ namespace CodeImp.DoomBuilder.BuilderModes { renderer.PlotLinedefSet(General.Map.Map.Linedefs); renderer.PlotVerticesSet(General.Map.Map.Vertices); - if(highlighted is Vertex) renderer.PlotVertex((highlighted as Vertex), ColorCollection.HIGHLIGHT); + if(highlighted is Vertex) renderer.PlotVertex((Vertex)highlighted, ColorCollection.HIGHLIGHT); renderer.Finish(); } // Render things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA); - renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA); - if(highlighted is Thing) renderer.RenderThing((highlighted as Thing), General.Colors.Highlight, Presentation.THINGS_ALPHA); - renderer.RenderNiGHTSPath(); - renderer.Finish(); + renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha); + renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.ActiveThingsAlpha); + if(highlighted is Thing) renderer.RenderThing((Thing)highlighted, General.Colors.Highlight, General.Settings.ActiveThingsAlpha); + renderer.RenderNiGHTSPath(); + renderer.Finish(); } // Render selection diff --git a/Source/Plugins/BuilderModes/ClassicModes/ErrorCheckMode.cs b/Source/Plugins/BuilderModes/ClassicModes/ErrorCheckMode.cs index 727b0afd0353c5d5e4aac13314ee2fabbbb3f80b..48704a9419356d159ba7080a05da6d972e8a3d6b 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/ErrorCheckMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/ErrorCheckMode.cs @@ -136,10 +136,10 @@ namespace CodeImp.DoomBuilder.BuilderModes // Render things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA); - renderer.RenderNiGHTSPath(); - //foreach(ErrorResult result in selection) result.RenderThingsSelection(renderer); //mxd - renderer.Finish(); + renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha); + renderer.RenderNiGHTSPath(); + //foreach(ErrorResult result in selection) result.RenderThingsSelection(renderer); //mxd + renderer.Finish(); } // Render overlay diff --git a/Source/Plugins/BuilderModes/ClassicModes/FindReplaceMode.cs b/Source/Plugins/BuilderModes/ClassicModes/FindReplaceMode.cs index 8b0138b705da4ed3c7e64f9f399f189c4c53d618..eb65f0126492139be003b9d8b61ecee8f0ff70e8 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/FindReplaceMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/FindReplaceMode.cs @@ -46,6 +46,8 @@ namespace CodeImp.DoomBuilder.BuilderModes #region ================== Properties + internal bool Volatile { get { return attributes.Volatile; } set { attributes.Volatile = value; } } //mxd + #endregion #region ================== Constructor / Disposer @@ -89,7 +91,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } // Show toolbox window - BuilderPlug.Me.FindReplaceForm.Show((Form)General.Interface); + BuilderPlug.Me.FindReplaceForm.Show((Form)General.Interface, this); } // Disenagaging @@ -139,9 +141,9 @@ namespace CodeImp.DoomBuilder.BuilderModes // Render things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA); - renderer.RenderNiGHTSPath(); - if (BuilderPlug.Me.FindReplaceForm.Finder != null) + renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha); + renderer.RenderNiGHTSPath(); + if (BuilderPlug.Me.FindReplaceForm.Finder != null) BuilderPlug.Me.FindReplaceForm.Finder.RenderThingsSelection(renderer, selection); renderer.Finish(); } diff --git a/Source/Plugins/BuilderModes/ClassicModes/FlatAlignMode.cs b/Source/Plugins/BuilderModes/ClassicModes/FlatAlignMode.cs index 76d791756920a2d073879c40785163250d2b3611..1c795589d80da510ecf655e68bf54573a0577362 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/FlatAlignMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/FlatAlignMode.cs @@ -875,10 +875,10 @@ namespace CodeImp.DoomBuilder.BuilderModes // Render things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA); - renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA); - renderer.RenderNiGHTSPath(); - renderer.Finish(); + renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha); + renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.ActiveThingsAlpha); + renderer.RenderNiGHTSPath(); + renderer.Finish(); } // Render overlay diff --git a/Source/Plugins/BuilderModes/ClassicModes/LinedefsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/LinedefsMode.cs index 956c5db488270588cf8d7f89d40cb020e948b738..dd1edcdbc6919e285e50f5dc59f2558fb2afe759 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/LinedefsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/LinedefsMode.cs @@ -49,6 +49,8 @@ namespace CodeImp.DoomBuilder.BuilderModes { #region ================== Constants + private const int MAX_LINEDEF_LABELS = 256; //mxd + #endregion #region ================== Variables @@ -58,9 +60,15 @@ namespace CodeImp.DoomBuilder.BuilderModes private readonly Association[] association = new Association[Linedef.NUM_ARGS]; private readonly Association highlightasso = new Association(); private Vector2D insertpreview = new Vector2D(float.NaN, float.NaN); //mxd + + //mxd. Text labels + private Dictionary<Linedef, SelectionLabel> labels; + private Dictionary<Sector, TextLabel[]> sectorlabels; + private Dictionary<Sector, string[]> sectortexts; // Interface private bool editpressed; + private bool selectionfromhighlight; //mxd #endregion @@ -78,6 +86,25 @@ namespace CodeImp.DoomBuilder.BuilderModes for(int i = 0; i < association.Length; i++) association[i] = new Association(); } + //mxd + public override void Dispose() + { + // Not already disposed? + if(!isdisposed) + { + // Dispose old labels + if(labels != null) foreach(SelectionLabel l in labels.Values) l.Dispose(); + if(sectorlabels != null) + { + foreach(TextLabel[] lbl in sectorlabels.Values) + foreach(TextLabel l in lbl) l.Dispose(); + } + + // Dispose base + base.Dispose(); + } + } + #endregion #region ================== Methods @@ -107,23 +134,45 @@ namespace CodeImp.DoomBuilder.BuilderModes private void Highlight(Linedef l) { bool completeredraw = false; - LinedefActionInfo action = null; // Often we can get away by simply undrawing the previous // highlight and drawing the new highlight. But if associations // are or were drawn we need to redraw the entire display. - // Previous association highlights something? - if((highlighted != null) && (highlighted.Tag != 0)) completeredraw = true; + if(highlighted != null) + { + //mxd. Update label color? + if(labels.ContainsKey(highlighted)) + { + labels[highlighted].Color = General.Colors.Highlight; + completeredraw = true; + } + + // Previous association highlights something? + if(highlighted.Tag != 0) completeredraw = true; + } // Set highlight association - if(l != null && l.Tag != 0) - highlightasso.Set(new Vector2D((l.Start.Position + l.End.Position)/2), l.Tags, UniversalType.LinedefTag); + if(l != null) + { + //mxd. Update label color? + if(labels.ContainsKey(l)) + { + labels[l].Color = General.Colors.Selection; + completeredraw = true; + } + + // New association highlights something? + if(l.Tag != 0) + { + highlightasso.Set(new Vector2D((l.Start.Position + l.End.Position) / 2), l.Tags, UniversalType.LinedefTag); + completeredraw = true; + } + } else + { highlightasso.Set(new Vector2D(), 0, 0); - - // New association highlights something? - if((l != null) && (l.Tag != 0)) completeredraw = true; + } // Use the line tag to highlight sectors (Doom style) if(General.Map.Config.LineTagIndicatesSectors) @@ -135,6 +184,8 @@ namespace CodeImp.DoomBuilder.BuilderModes } else { + LinedefActionInfo action = null; + if(l != null) { // Check if we can find the linedefs action @@ -387,6 +438,144 @@ namespace CodeImp.DoomBuilder.BuilderModes return selectionrect.Contains(l.Start.Position.x, l.Start.Position.y) && selectionrect.Contains(l.End.Position.x, l.End.Position.y); } + + //mxd. Gets map elements inside of selectionoutline and sorts them by distance to targetpoint + private List<Linedef> GetOrderedSelection(Vector2D targetpoint, List<Line2D> selectionoutline) + { + // Gather affected sectors + List<Linedef> result = new List<Linedef>(); + foreach(Linedef l in General.Map.Map.Linedefs) + { + if(IsInSelectionRect(l, selectionoutline)) result.Add(l); + } + + if(result.Count == 0) return result; + + // Sort by distance to targetpoint + result.Sort(delegate(Linedef l1, Linedef l2) + { + if(l1 == l2) return 0; + + // Get closest distance from l1 to selectstart + float closest1 = float.MaxValue; + + Vector2D pos = l1.Start.Position; + float curdistance = Vector2D.DistanceSq(pos, targetpoint); + if(curdistance < closest1) closest1 = curdistance; + + pos = l1.End.Position; + curdistance = Vector2D.DistanceSq(pos, targetpoint); + if(curdistance < closest1) closest1 = curdistance; + + // Get closest distance from l2 to selectstart + float closest2 = float.MaxValue; + + pos = l2.Start.Position; + curdistance = Vector2D.DistanceSq(pos, targetpoint); + if(curdistance < closest2) closest2 = curdistance; + + pos = l2.End.Position; + curdistance = Vector2D.DistanceSq(pos, targetpoint); + if(curdistance < closest2) closest2 = curdistance; + + // Return closer one + return (int)(closest1 - closest2); + }); + + return result; + } + + //mxd. This sets up new labels + private void SetupSectorLabels() + { + // Dispose old labels + if(sectorlabels != null) + { + foreach(TextLabel[] larr in sectorlabels.Values) + foreach(TextLabel l in larr) l.Dispose(); + } + + // Make text labels for sectors + sectorlabels = new Dictionary<Sector, TextLabel[]>(); + sectortexts = new Dictionary<Sector, string[]>(); + foreach(Sector s in General.Map.Map.Sectors) + { + // Setup labels + if(s.Tag == 0) continue; + + // Make tag text + string[] tagdescarr = new string[2]; + if(s.Tags.Count > 1) + { + string[] stags = new string[s.Tags.Count]; + for(int i = 0; i < s.Tags.Count; i++) stags[i] = s.Tags[i].ToString(); + tagdescarr[0] = "Tags " + string.Join(", ", stags); + tagdescarr[1] = "T" + string.Join(",", stags); + } + else + { + tagdescarr[0] = "Tag " + s.Tag; + tagdescarr[1] = "T" + s.Tag; + } + + // Add to collection + sectortexts.Add(s, tagdescarr); + + TextLabel[] larr = new TextLabel[s.Labels.Count]; + for(int i = 0; i < s.Labels.Count; i++) + { + TextLabel l = new TextLabel(); + l.TransformCoords = true; + l.Location = s.Labels[i].position; + l.AlignX = TextAlignmentX.Center; + l.AlignY = TextAlignmentY.Middle; + l.Color = General.Colors.InfoLine; + l.BackColor = General.Colors.Background.WithAlpha(128); + larr[i] = l; + } + + // Add to collection + sectorlabels.Add(s, larr); + } + } + + //mxd. Also update labels for the selected linedefs + public override void UpdateSelectionInfo() + { + base.UpdateSelectionInfo(); + + if(labels != null) + { + // Dispose old labels + foreach(SelectionLabel l in labels.Values) l.Dispose(); + + // Don't show lables for selected-from-highlight item + if(selectionfromhighlight) + { + labels.Clear(); + return; + } + } + + // Make text labels for selected linedefs + ICollection<Linedef> orderedselection = General.Map.Map.GetSelectedLinedefs(true); + labels = new Dictionary<Linedef, SelectionLabel>(orderedselection.Count); + + // Otherwise significant delays will occure. + // Also we probably won't care about selection ordering when selecting this many anyway + if(orderedselection.Count > MAX_LINEDEF_LABELS) return; + + int index = 0; + foreach(Linedef linedef in orderedselection) + { + SelectionLabel l = new SelectionLabel(); + l.OffsetPosition = true; + l.Color = (linedef == highlighted ? General.Colors.Selection : General.Colors.Highlight); + l.BackColor = General.Colors.Background.WithAlpha(192); + l.TextLabel.Text = (++index).ToString(); + labels.Add(linedef, l); + } + } #endregion @@ -413,10 +602,15 @@ namespace CodeImp.DoomBuilder.BuilderModes renderer.SetPresentation(Presentation.Standard); // Add toolbar buttons + General.Interface.BeginToolbarUpdate(); //mxd General.Interface.AddButton(BuilderPlug.Me.MenusForm.CopyProperties); General.Interface.AddButton(BuilderPlug.Me.MenusForm.PasteProperties); General.Interface.AddButton(BuilderPlug.Me.MenusForm.PastePropertiesOptions); //mxd General.Interface.AddButton(BuilderPlug.Me.MenusForm.SeparatorCopyPaste); + General.Interface.AddButton(BuilderPlug.Me.MenusForm.ViewSelectionNumbers); //mxd + BuilderPlug.Me.MenusForm.ViewSelectionEffects.Text = "View Sector Tags"; //mxd + General.Interface.AddButton(BuilderPlug.Me.MenusForm.ViewSelectionEffects); //mxd + General.Interface.AddButton(BuilderPlug.Me.MenusForm.SeparatorSectors1); //mxd if(General.Map.UDMF) //mxd { General.Interface.AddButton(BuilderPlug.Me.MenusForm.MakeGradientBrightness); @@ -434,10 +628,12 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Update the tooltip BuilderPlug.Me.MenusForm.SyncronizeThingEditButton.ToolTipText = "Synchronized Things Editing" + Environment.NewLine + BuilderPlug.Me.MenusForm.SyncronizeThingEditLinedefsItem.ToolTipText; + General.Interface.EndToolbarUpdate(); //mxd // Convert geometry selection to linedefs selection General.Map.Map.ConvertSelection(SelectionType.Linedefs); UpdateSelectionInfo(); //mxd + SetupSectorLabels(); //mxd } // Mode disengages @@ -446,10 +642,14 @@ namespace CodeImp.DoomBuilder.BuilderModes base.OnDisengage(); // Remove toolbar buttons + General.Interface.BeginToolbarUpdate(); //mxd General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.CopyProperties); General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PasteProperties); General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PastePropertiesOptions); //mxd General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.SeparatorCopyPaste); + General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.ViewSelectionNumbers); //mxd + General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.ViewSelectionEffects); //mxd + General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.SeparatorSectors1); //mxd if(General.Map.UDMF) //mxd { General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.MakeGradientBrightness); @@ -459,6 +659,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.MarqueSelectTouching); //mxd General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.SyncronizeThingEditButton); //mxd if(General.Map.UDMF) General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.TextureOffsetLock); //mxd + General.Interface.EndToolbarUpdate(); //mxd General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PlaceThings); //JBR General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PerpendicularVertex); //JBR @@ -466,11 +667,11 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.ParallelLinedef); //JBR // Going to EditSelectionMode? - if (General.Editing.NewMode is EditSelectionMode) + EditSelectionMode mode = General.Editing.NewMode as EditSelectionMode; + if(mode != null) { // Not pasting anything? - EditSelectionMode editmode = (General.Editing.NewMode as EditSelectionMode); - if(!editmode.Pasting) + if(!mode.Pasting) { // No selection made? But we have a highlight! if((General.Map.Map.GetSelectedLinedefs(true).Count == 0) && (highlighted != null)) @@ -510,10 +711,10 @@ namespace CodeImp.DoomBuilder.BuilderModes // Render things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA); - renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA); - renderer.RenderNiGHTSPath(); - renderer.Finish(); + renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha); + renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.ActiveThingsAlpha); + renderer.RenderNiGHTSPath(); + renderer.Finish(); } // Render selection @@ -540,6 +741,59 @@ namespace CodeImp.DoomBuilder.BuilderModes renderer.RenderArrows(eventlines); //mxd + //mxd. Render sector tag labels + if(BuilderPlug.Me.ViewSelectionEffects) + { + List<ITextLabel> torender = new List<ITextLabel>(sectorlabels.Count); + foreach(KeyValuePair<Sector, string[]> group in sectortexts) + { + // Pick which text variant to use + TextLabel[] labelarray = sectorlabels[group.Key]; + for(int i = 0; i < group.Key.Labels.Count; i++) + { + TextLabel l = labelarray[i]; + + // Render only when enough space for the label to see + float requiredsize = (General.Interface.MeasureString(group.Value[0], l.Font).Width / 2) / renderer.Scale; + if(requiredsize > group.Key.Labels[i].radius) + { + requiredsize = (General.Interface.MeasureString(group.Value[1], l.Font).Width / 2) / renderer.Scale; + if(requiredsize > group.Key.Labels[i].radius) + l.Text = (requiredsize > group.Key.Labels[i].radius * 4 ? string.Empty : "+"); + else + l.Text = group.Value[1]; + } + else + { + l.Text = group.Value[0]; + } + + torender.Add(l); + } + } + + // Render labels + renderer.RenderText(torender); + } + + //mxd. Render selection labels + if(BuilderPlug.Me.ViewSelectionNumbers) + { + List<ITextLabel> torender = new List<ITextLabel>(labels.Count); + foreach(KeyValuePair<Linedef, SelectionLabel> group in labels) + { + // Render only when enough space for the label to see + group.Value.Move(group.Key.Start.Position, group.Key.End.Position); + float requiredsize = (group.Value.TextSize.Width) / renderer.Scale; + if(group.Key.Length > requiredsize) + { + torender.Add(group.Value.TextLabel); + } + } + + renderer.RenderText(torender); + } + //mxd. Render comments if(General.Map.UDMF && General.Settings.RenderComments) foreach(Linedef l in General.Map.Map.Linedefs) RenderComment(l); @@ -581,9 +835,15 @@ namespace CodeImp.DoomBuilder.BuilderModes { //mxd. Flip selection highlighted.Selected = !highlighted.Selected; - + UpdateSelectionInfo(); //mxd + + //mxd. Full redraw when labels were changed + if(BuilderPlug.Me.ViewSelectionNumbers) + { + General.Interface.RedrawDisplay(); + } // Update display - if(renderer.StartPlotter(false)) + else if(renderer.StartPlotter(false)) { // Render highlighted item renderer.PlotLinedef(highlighted, General.Colors.Highlight); @@ -592,16 +852,13 @@ namespace CodeImp.DoomBuilder.BuilderModes renderer.Finish(); renderer.Present(); } - } else if(BuilderPlug.Me.AutoClearSelection && General.Map.Map.SelectedLinedefsCount > 0) //mxd { General.Map.Map.ClearSelectedLinedefs(); + UpdateSelectionInfo(); //mxd General.Interface.RedrawDisplay(); } - - //mxd - UpdateSelectionInfo(); } base.OnSelectEnd(); @@ -620,8 +877,10 @@ namespace CodeImp.DoomBuilder.BuilderModes if(!highlighted.Selected && (BuilderPlug.Me.AutoClearSelection || (General.Map.Map.SelectedLinedefsCount == 0))) { // Make this the only selection + selectionfromhighlight = true; //mxd General.Map.Map.ClearSelectedLinedefs(); highlighted.Selected = true; + UpdateSelectionInfo(); //mxd General.Interface.RedrawDisplay(); } @@ -642,7 +901,7 @@ namespace CodeImp.DoomBuilder.BuilderModes DrawGeometryMode drawmode = new DrawGeometryMode(); bool snaptogrid = General.Interface.ShiftState ^ General.Interface.SnapToGrid; bool snaptonearest = General.Interface.CtrlState ^ General.Interface.AutoMerge; - DrawnVertex v = DrawGeometryMode.GetCurrentPosition(mousemappos, snaptonearest, snaptogrid, false, renderer, new List<DrawnVertex>()); + DrawnVertex v = DrawGeometryMode.GetCurrentPosition(mousemappos, snaptonearest, snaptogrid, false, false, renderer, new List<DrawnVertex>()); if(drawmode.DrawPointAt(v)) General.Editing.ChangeMode(drawmode); @@ -670,7 +929,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Map.Map.Update(); // When a single line was selected, deselect it now - if(selected.Count == 1) + if(selected.Count == 1 && selectionfromhighlight) { General.Map.Map.ClearSelectedLinedefs(); } @@ -681,17 +940,37 @@ namespace CodeImp.DoomBuilder.BuilderModes // Update entire display General.Map.Renderer2D.UpdateExtraFloorFlag(); //mxd + UpdateSelectionInfo(); //mxd General.Interface.RedrawDisplay(); } } - - UpdateSelectionInfo(); //mxd } editpressed = false; + selectionfromhighlight = false; //mxd base.OnEditEnd(); } - + + //mxd + public override void OnUndoEnd() + { + base.OnUndoEnd(); + + // Update selection info and labels + UpdateSelectionInfo(); + SetupSectorLabels(); + } + + //mxd + public override void OnRedoEnd() + { + base.OnRedoEnd(); + + // Update selection info and labels + UpdateSelectionInfo(); + SetupSectorLabels(); + } + // Mouse moves public override void OnMouseMove(MouseEventArgs e) { @@ -745,14 +1024,15 @@ namespace CodeImp.DoomBuilder.BuilderModes else if(e.Button == MouseButtons.None) // Not holding any buttons? { // Find the nearest linedef within highlight range - Linedef l = General.Map.Map.NearestLinedefRange(mousemappos, BuilderPlug.Me.StitchRange / renderer.Scale); + Linedef l = General.Map.Map.NearestLinedefRange(mousemappos, BuilderPlug.Me.HighlightRange / renderer.Scale); //mxd. Render insert vertex preview - if(l != null) + Linedef sl = General.Map.Map.NearestLinedefRange(mousemappos, BuilderPlug.Me.StitchRange / renderer.Scale); + if(sl != null) { bool snaptogrid = General.Interface.ShiftState ^ General.Interface.SnapToGrid; bool snaptonearest = General.Interface.CtrlState ^ General.Interface.AutoMerge; - Vector2D v = DrawGeometryMode.GetCurrentPosition(mousemappos, snaptonearest, snaptogrid, false, renderer, new List<DrawnVertex>()).pos; + Vector2D v = DrawGeometryMode.GetCurrentPosition(mousemappos, snaptonearest, snaptogrid, false, false, renderer, new List<DrawnVertex>()).pos; if(v != insertpreview) { @@ -876,7 +1156,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(selectionvolume) { - List<Line2D> selectionOutline = new List<Line2D> + List<Line2D> selectionoutline = new List<Line2D> { new Line2D(selectionrect.Left, selectionrect.Top, selectionrect.Right, selectionrect.Top), new Line2D(selectionrect.Right, selectionrect.Top, selectionrect.Right, selectionrect.Bottom), @@ -889,8 +1169,15 @@ namespace CodeImp.DoomBuilder.BuilderModes switch(marqueSelectionMode) { case MarqueSelectionMode.SELECT: - foreach(Linedef l in General.Map.Map.Linedefs) - l.Selected = IsInSelectionRect(l, selectionOutline); + // Get ordered selection + List<Linedef> selectresult = GetOrderedSelection(base.selectstart, selectionoutline); + + // First deselect everything... + foreach(Linedef l in General.Map.Map.Linedefs) l.Selected = false; + + // Then select lines in correct order + foreach(Linedef l in selectresult) l.Selected = true; + if(selectthings) { foreach(Thing t in General.Map.ThingsFilter.VisibleThings) @@ -899,8 +1186,15 @@ namespace CodeImp.DoomBuilder.BuilderModes break; case MarqueSelectionMode.ADD: - foreach(Linedef l in General.Map.Map.Linedefs) - l.Selected |= IsInSelectionRect(l, selectionOutline); + // Get ordered selection + List<Linedef> addresult = GetOrderedSelection(selectstart, selectionoutline); + + // First deselect everything inside of selection... + foreach(Linedef l in addresult) l.Selected = false; + + // Then reselect in correct order + foreach(Linedef l in addresult) l.Selected = true; + if(selectthings) { foreach(Thing t in General.Map.ThingsFilter.VisibleThings) @@ -909,8 +1203,9 @@ namespace CodeImp.DoomBuilder.BuilderModes break; case MarqueSelectionMode.SUBTRACT: + // Selection order doesn't matter here foreach(Linedef l in General.Map.Map.Linedefs) - if(IsInSelectionRect(l, selectionOutline)) l.Selected = false; + if(IsInSelectionRect(l, selectionoutline)) l.Selected = false; if(selectthings) { foreach(Thing t in General.Map.ThingsFilter.VisibleThings) @@ -918,9 +1213,11 @@ namespace CodeImp.DoomBuilder.BuilderModes } break; + // Should be Intersect selection mode default: + // Selection order doesn't matter here foreach(Linedef l in General.Map.Map.Linedefs) - if(!IsInSelectionRect(l, selectionOutline)) l.Selected = false; + if(!IsInSelectionRect(l, selectionoutline)) l.Selected = false; if(selectthings) { foreach(Thing t in General.Map.ThingsFilter.VisibleThings) @@ -1175,6 +1472,10 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Clear selection info General.Interface.DisplayStatus(StatusType.Selection, string.Empty); + //mxd. Clear selection labels + foreach(SelectionLabel l in labels.Values) l.Dispose(); + labels.Clear(); + // Redraw General.Interface.RedrawDisplay(); } @@ -1189,7 +1490,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { bool snaptogrid = General.Interface.ShiftState ^ General.Interface.SnapToGrid; bool snaptonearest = General.Interface.CtrlState ^ General.Interface.AutoMerge; - DrawnVertex v = DrawGeometryMode.GetCurrentPosition(mousemappos, snaptonearest, snaptogrid, false, renderer, new List<DrawnVertex>()); + DrawnVertex v = DrawGeometryMode.GetCurrentPosition(mousemappos, snaptonearest, snaptogrid, false, false, renderer, new List<DrawnVertex>()); drawmode.DrawPointAt(v); } General.Editing.ChangeMode(drawmode); @@ -1222,14 +1523,14 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Map.IsChanged = true; General.Map.Map.Update(); - // Invoke a new mousemove so that the highlighted item updates - MouseEventArgs e = new MouseEventArgs(MouseButtons.None, 0, (int)mousepos.x, (int)mousepos.y, 0); - OnMouseMove(e); - // Redraw screen + SetupSectorLabels(); //mxd UpdateSelectionInfo(); //mxd General.Map.Renderer2D.UpdateExtraFloorFlag(); //mxd General.Interface.RedrawDisplay(); + + // Invoke a new mousemove so that the highlighted item updates + OnMouseMove(new MouseEventArgs(MouseButtons.None, 0, (int)mousepos.x, (int)mousepos.y, 0)); } [BeginAction("selectnonessential")] @@ -1308,15 +1609,15 @@ namespace CodeImp.DoomBuilder.BuilderModes // Update cache values General.Map.IsChanged = true; General.Map.Map.Update(); - - // Invoke a new mousemove so that the highlighted item updates - MouseEventArgs e = new MouseEventArgs(MouseButtons.None, 0, (int)mousepos.x, (int)mousepos.y, 0); - OnMouseMove(e); // Redraw screen + SetupSectorLabels(); //mxd UpdateSelectionInfo(); //mxd General.Map.Renderer2D.UpdateExtraFloorFlag(); //mxd General.Interface.RedrawDisplay(); + + // Invoke a new mousemove so that the highlighted item updates + OnMouseMove(new MouseEventArgs(MouseButtons.None, 0, (int)mousepos.x, (int)mousepos.y, 0)); } } @@ -1507,7 +1808,12 @@ namespace CodeImp.DoomBuilder.BuilderModes if(selected.Count > 0) { // Go into curve linedefs mode - General.Editing.ChangeMode(new CurveLinedefsMode(new LinedefsMode())); + General.Editing.ChangeMode(new CurveLinedefsMode()); + } + else + { + //mxd + General.Interface.DisplayStatus(StatusType.Warning, "This action requres a selection!"); } } @@ -1528,63 +1834,139 @@ namespace CodeImp.DoomBuilder.BuilderModes } // Any selected lines? - if(selected.Count > 0) + if(selected.Count == 0) { - // Make undo - if(selected.Count > 1) - { - General.Map.UndoRedo.CreateUndo("Flip " + selected.Count + " linedefs"); - General.Interface.DisplayStatus(StatusType.Action, "Flipped " + selected.Count + " linedefs."); - } - else - { - General.Map.UndoRedo.CreateUndo("Flip linedef"); - General.Interface.DisplayStatus(StatusType.Action, "Flipped a linedef."); - } + General.Interface.DisplayStatus(StatusType.Warning, "This action requires a selection!"); + return; + } - //mxd. Do it sector-wise - Dictionary<Sector, int> sectors = new Dictionary<Sector, int>(); + //mxd. Remove single-sided lines with only front side + int selectedcount = selected.Count; // Store initial selection size... + List<Linedef> filtered = new List<Linedef>(selectedcount); + foreach(Linedef l in selected) + { + if(l.Back != null || l.Front == null) filtered.Add(l); + } + selected = filtered; - foreach(Linedef l in selected) + //mxd. Any valid lines? + if(selected.Count == 0) + { + General.Interface.DisplayStatus(StatusType.Warning, (selectedcount > 1 ? "Selected linedefs already point in the right direction!" + : "Selected linedef already points in the right direction!")); + return; + } + + // Make undo + if(selected.Count > 1) + { + General.Map.UndoRedo.CreateUndo("Flip " + selected.Count + " linedefs"); + General.Interface.DisplayStatus(StatusType.Action, "Flipped " + selected.Count + " linedefs."); + } + else + { + General.Map.UndoRedo.CreateUndo("Flip linedef"); + General.Interface.DisplayStatus(StatusType.Action, "Flipped a linedef."); + } + + // Flip all selected linedefs + foreach(Linedef l in selected) + { + l.FlipVertices(); + l.FlipSidedefs(); + } + + // Remove selection if only one linedef was selected + if(selectedcount == 1) + { + foreach(Linedef ld in selected) ld.Selected = false; + selected.Clear(); + } + + // Redraw + General.Map.Map.Update(); + General.Map.IsChanged = true; + General.Interface.RefreshInfo(); + General.Interface.RedrawDisplay(); + } + + [BeginAction("alignlinedefs")] + public void AlignLinedefs() //mxd + { + // No selected lines? + ICollection<Linedef> selected = General.Map.Map.GetSelectedLinedefs(true); + if(selected.Count == 0) + { + // Anything highlighted? + if(highlighted != null) { - if(l.Front != null && l.Front.Sector != null) - { - if(!sectors.ContainsKey(l.Front.Sector)) sectors.Add(l.Front.Sector, 0); - sectors[l.Front.Sector]++; - } - - if(l.Back != null && l.Back.Sector != null) - { - if(!sectors.ContainsKey(l.Back.Sector)) sectors.Add(l.Back.Sector, 0); - sectors[l.Back.Sector]++; - } + // Select the highlighted item + highlighted.Selected = true; + selected.Add(highlighted); } + } - //mxd. Sort the collection so sectors with the most selected linedefs go first - List<KeyValuePair<Sector, int>> sortedlist = sectors.ToList(); - sortedlist.Sort((firstPair, nextPair) => firstPair.Value.CompareTo(nextPair.Value)); - sortedlist.Reverse(); + // Any selected lines? + if(selected.Count == 0) + { + General.Interface.DisplayStatus(StatusType.Warning, "This action requires a selection!"); + return; + } - //mxd. Gather our ordered sectors - List<Sector> sectorslist = new List<Sector>(sortedlist.Count()); - sectorslist.AddRange(sortedlist.Select(pair => pair.Key)); + // Make undo + if(selected.Count > 1) + { + General.Map.UndoRedo.CreateUndo("Align " + selected.Count + " linedefs"); + General.Interface.DisplayStatus(StatusType.Action, "Aligned " + selected.Count + " linedefs."); + } + else + { + General.Map.UndoRedo.CreateUndo("Align linedef"); + General.Interface.DisplayStatus(StatusType.Action, "Aligned a linedef."); + } - //mxd. Flip the lines - Tools.FlipSectorLinedefs(sectorslist, true); + //mxd. Do it sector-wise + Dictionary<Sector, int> sectors = new Dictionary<Sector, int>(); - // Remove selection if only one linedef was selected - if(selected.Count == 1) + foreach(Linedef l in selected) + { + if(l.Front != null && l.Front.Sector != null) + { + if(!sectors.ContainsKey(l.Front.Sector)) sectors.Add(l.Front.Sector, 0); + sectors[l.Front.Sector]++; + } + + if(l.Back != null && l.Back.Sector != null) { - foreach(Linedef ld in selected) ld.Selected = false; - selected.Clear(); + if(!sectors.ContainsKey(l.Back.Sector)) sectors.Add(l.Back.Sector, 0); + sectors[l.Back.Sector]++; } + } - // Redraw - General.Map.Map.Update(); - General.Map.IsChanged = true; - General.Interface.RefreshInfo(); - General.Interface.RedrawDisplay(); + //mxd. Sort the collection so sectors with the most selected linedefs go first + List<KeyValuePair<Sector, int>> sortedlist = sectors.ToList(); + sortedlist.Sort((firstPair, nextPair) => firstPair.Value.CompareTo(nextPair.Value)); + sortedlist.Reverse(); + + //mxd. Gather our ordered sectors + List<Sector> sectorslist = new List<Sector>(sortedlist.Count); + sectorslist.AddRange(sortedlist.Select(pair => pair.Key)); + + //mxd. Flip the lines + Tools.FlipSectorLinedefs(sectorslist, true); + + // Remove selection if only one linedef was selected + if(selected.Count == 1) + { + foreach(Linedef ld in selected) ld.Selected = false; + selected.Clear(); } + + // Redraw + General.Map.Map.Update(); + General.Map.IsChanged = true; + General.Interface.RefreshInfo(); + General.Interface.RedrawDisplay(); } [BeginAction("flipsidedefs")] @@ -1601,6 +1983,13 @@ namespace CodeImp.DoomBuilder.BuilderModes } } + //mxd. Any selected lines? + if(selected.Count == 0) + { + General.Interface.DisplayStatus(StatusType.Warning, "This action requires a selection!"); + return; + } + //mxd. Do this only with double-sided linedefs List<Linedef> validlines = new List<Linedef>(); foreach(Linedef l in selected) @@ -1608,39 +1997,38 @@ namespace CodeImp.DoomBuilder.BuilderModes if(l.Front != null && l.Back != null) validlines.Add(l); } - // Any selected lines? - if(validlines.Count > 0) + //mxd. Any double-sided lines selected? + if(validlines.Count == 0) { - // Make undo - if(validlines.Count > 1) - { - General.Map.UndoRedo.CreateUndo("Flip " + validlines.Count + " sidedefs"); - General.Interface.DisplayStatus(StatusType.Action, "Flipped " + validlines.Count + " sidedefs."); - } - else - { - General.Map.UndoRedo.CreateUndo("Flip sidedef"); - General.Interface.DisplayStatus(StatusType.Action, "Flipped a sidedef."); - } + General.Interface.DisplayStatus(StatusType.Warning, "No sidedefs to flip! Only 2-sided linedefs can be flipped."); + return; + } - // Flip sidedefs in all selected linedefs - foreach(Linedef l in validlines) - { - l.FlipSidedefs(); - l.Front.Sector.UpdateNeeded = true; - l.Back.Sector.UpdateNeeded = true; - } + // Make undo + if(validlines.Count > 1) + { + General.Map.UndoRedo.CreateUndo("Flip " + validlines.Count + " sidedefs"); + General.Interface.DisplayStatus(StatusType.Action, "Flipped " + validlines.Count + " sidedefs."); + } + else + { + General.Map.UndoRedo.CreateUndo("Flip sidedef"); + General.Interface.DisplayStatus(StatusType.Action, "Flipped a sidedef."); + } - // Redraw - General.Map.Map.Update(); - General.Map.IsChanged = true; - General.Interface.RefreshInfo(); - General.Interface.RedrawDisplay(); - } - else + // Flip sidedefs in all selected linedefs + foreach(Linedef l in validlines) { - General.Interface.DisplayStatus(StatusType.Warning, "No sidedefs to flip (only 2-sided linedefs can be flipped)!"); + l.FlipSidedefs(); + l.Front.Sector.UpdateNeeded = true; + l.Back.Sector.UpdateNeeded = true; } + + // Redraw + General.Map.Map.Update(); + General.Map.IsChanged = true; + General.Interface.RefreshInfo(); + General.Interface.RedrawDisplay(); } //mxd. Make gradient brightness @@ -1685,7 +2073,7 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(Linedef l in orderedselection) { float u = index / (float)(orderedselection.Count - 1); - int b = InterpolationTools.Interpolate(startbrightness, endbrightness, u, interpolationmode); + int b = (int)Math.Round(InterpolationTools.Interpolate(startbrightness, endbrightness, u, interpolationmode)); if(SidedefHasVisibleParts(l.Front)) ApplySidedefBrighness(l.Front, b); if(SidedefHasVisibleParts(l.Back)) ApplySidedefBrighness(l.Back, b); index++; @@ -1821,7 +2209,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } var form = new SelectSimilarElementOptionsPanel(); - if(form.Setup(this)) form.ShowDialog(); + if(form.Setup(this)) form.ShowDialog(General.Interface); } //mxd diff --git a/Source/Plugins/BuilderModes/ClassicModes/MakeSectorMode.cs b/Source/Plugins/BuilderModes/ClassicModes/MakeSectorMode.cs index 7ca0f5cf9435e5813e70f18b8ffe1f1a0e7e49fe..ff10ee7c5789ec8617299ab812e3bc2175b7127e 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/MakeSectorMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/MakeSectorMode.cs @@ -54,7 +54,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Flash polygon private FlatVertex[] flashpolygon; private float flashintensity; - private float flashstarttime; + private long flashstarttime; // Interface protected bool editpressed; @@ -155,7 +155,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { renderer.RenderGeometry(flashpolygon, null, true); } - else if(BuilderPlug.Me.UseHighlight) //mxd + else if(General.Settings.UseHighlight) //mxd { int color = General.Colors.Indication.WithAlpha(64).ToInt(); foreach(Sector s in associates.Keys) @@ -178,17 +178,16 @@ namespace CodeImp.DoomBuilder.BuilderModes Linedef nl = General.Map.Map.NearestLinedef(mousemappos); if(nl != null) { - float side = nl.SideOfLine(mousemappos); - LinedefSide newnearest = new LinedefSide(nl, (side <= 0.0f)); + bool front = (nl.SideOfLine(mousemappos) <= 0.0f); //mxd + LinedefSide newnearest = new LinedefSide(nl, front); if(newnearest != nearestside) { // Only change when buttons are not pressed if(!buttonspressed || (editside == newnearest)) { // Find new sector - General.Interface.SetCursor(Cursors.AppStarting); nearestside = newnearest; - allsides = Tools.FindPotentialSectorAt(mousemappos); + allsides = Tools.FindPotentialSectorAt(nl, front); //mxd if(allsides != null) { alllines = new List<Linedef>(allsides.Count); @@ -198,7 +197,6 @@ namespace CodeImp.DoomBuilder.BuilderModes { alllines = null; } - General.Interface.SetCursor(Cursors.Default); } else { @@ -308,7 +306,7 @@ namespace CodeImp.DoomBuilder.BuilderModes p.AddLayer(new PresentLayer(RendererLayer.Surface, BlendingMode.Mask)); p.AddLayer(new PresentLayer(RendererLayer.Grid, BlendingMode.Mask)); p.AddLayer(new PresentLayer(RendererLayer.Overlay, BlendingMode.Alpha, 1f, true)); - p.AddLayer(new PresentLayer(RendererLayer.Things, BlendingMode.Alpha, Presentation.THINGS_BACK_ALPHA, false)); + p.AddLayer(new PresentLayer(RendererLayer.Things, BlendingMode.Alpha, General.Settings.InactiveThingsAlpha, false)); p.AddLayer(new PresentLayer(RendererLayer.Geometry, BlendingMode.Alpha, 1f, true)); renderer.SetPresentation(p); General.Map.Map.SelectionType = SelectionType.All; @@ -344,10 +342,10 @@ namespace CodeImp.DoomBuilder.BuilderModes // Render things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA); - renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA); - renderer.RenderNiGHTSPath(); - renderer.Finish(); + renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha); + renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.ActiveThingsAlpha); + renderer.RenderNiGHTSPath(); + renderer.Finish(); } // Render overlay @@ -457,10 +455,10 @@ namespace CodeImp.DoomBuilder.BuilderModes public override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); - if(panning) return; //mxd. Skip all this jass while panning + if(panning) return; //mxd. Skip all this jazz while panning // Highlight the region - Highlight((e.Button != MouseButtons.None)); + Highlight(e.Button != MouseButtons.None); } // Mouse leaves @@ -499,7 +497,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } // Processing - public override void OnProcess(float deltatime) + public override void OnProcess(long deltatime) { base.OnProcess(deltatime); @@ -507,8 +505,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(flashpolygon != null) { // Determine the intensity of the flash by time elapsed - float curtime = Clock.CurrentTime; - flashintensity = 1f - ((curtime - flashstarttime) / FLASH_DURATION); + flashintensity = 1f - ((Clock.CurrentTime - flashstarttime) / FLASH_DURATION); if(flashintensity > 0.0f) { // Update vertices in polygon @@ -532,5 +529,4 @@ namespace CodeImp.DoomBuilder.BuilderModes #endregion } -} - +} \ No newline at end of file diff --git a/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs index ac968ed4220b008c4dba9d2b3e60c165ad994cf4..477fdaa6654148b8eef6c0539905fc4b50d68719 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs @@ -47,6 +47,8 @@ namespace CodeImp.DoomBuilder.BuilderModes { #region ================== Constants + private const int MAX_SECTOR_LABELS = 256; //mxd + #endregion #region ================== Variables @@ -57,6 +59,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Interface private bool editpressed; + private bool selectionfromhighlight; //mxd // Labels private Dictionary<Sector, TextLabel[]> labels; @@ -98,8 +101,8 @@ namespace CodeImp.DoomBuilder.BuilderModes if(!isdisposed) { // Dispose old labels - foreach(KeyValuePair<Sector, TextLabel[]> lbl in labels) - foreach(TextLabel l in lbl.Value) l.Dispose(); + foreach(TextLabel[] lbl in labels.Values) + foreach(TextLabel l in lbl) l.Dispose(); // Dispose base base.Dispose(); @@ -111,7 +114,7 @@ namespace CodeImp.DoomBuilder.BuilderModes #region ================== Methods // This makes a CRC for the selection - public int CreateSelectionCRC() + /*public int CreateSelectionCRC() { CRC crc = new CRC(); ICollection<Sector> orderedselection = General.Map.Map.GetSelectedSectors(true); @@ -121,7 +124,7 @@ namespace CodeImp.DoomBuilder.BuilderModes crc.Add(s.FixedIndex); } return (int)(crc.Value & 0xFFFFFFFF); - } + }*/ //mxd. This makes a CRC for given selection private static int CreateSelectionCRC(ICollection<Sector> selection) @@ -138,11 +141,12 @@ namespace CodeImp.DoomBuilder.BuilderModes if(labels != null) { // Dispose old labels - foreach(KeyValuePair<Sector, TextLabel[]> lbl in labels) - foreach(TextLabel l in lbl.Value) l.Dispose(); + foreach(TextLabel[] lbl in labels.Values) + foreach(TextLabel l in lbl) l.Dispose(); } // Make text labels for sectors + PixelColor c = (General.Settings.UseHighlight ? General.Colors.Highlight : General.Colors.Selection); //mxd labels = new Dictionary<Sector, TextLabel[]>(General.Map.Map.Sectors.Count); foreach(Sector s in General.Map.Map.Sectors) { @@ -150,15 +154,13 @@ namespace CodeImp.DoomBuilder.BuilderModes TextLabel[] labelarray = new TextLabel[s.Labels.Count]; for(int i = 0; i < s.Labels.Count; i++) { - Vector2D v = s.Labels[i].position; - labelarray[i] = new TextLabel(20); + labelarray[i] = new TextLabel(); labelarray[i].TransformCoords = true; - labelarray[i].Rectangle = new RectangleF(v.x, v.y, 0.0f, 0.0f); + labelarray[i].Location = s.Labels[i].position; labelarray[i].AlignX = TextAlignmentX.Center; labelarray[i].AlignY = TextAlignmentY.Middle; - labelarray[i].Scale = 14f; - labelarray[i].Color = General.Colors.Highlight.WithAlpha(255); - labelarray[i].Backcolor = General.Colors.Background.WithAlpha(255); + labelarray[i].Color = c; + labelarray[i].BackColor = General.Colors.Background.WithAlpha(128); } labels.Add(s, labelarray); } @@ -173,13 +175,13 @@ namespace CodeImp.DoomBuilder.BuilderModes ICollection<Sector> orderedselection = General.Map.Map.GetSelectedSectors(true); //mxd. Render selected sectors - if(BuilderPlug.Me.UseHighlight) + if(General.Settings.UseHighlight) { renderer.RenderHighlight(overlayGeometry, General.Colors.Selection.WithAlpha(64).ToInt()); } //mxd. Render highlighted sector - if(BuilderPlug.Me.UseHighlight && highlighted != null) + if(General.Settings.UseHighlight && highlighted != null) { renderer.RenderHighlight(highlighted.FlatVertices, General.Colors.Highlight.WithAlpha(64).ToInt()); } @@ -190,21 +192,24 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(Sector s in General.Map.Map.Sectors) RenderComment(s); } - if(BuilderPlug.Me.ViewSelectionNumbers) + if(BuilderPlug.Me.ViewSelectionNumbers && orderedselection.Count < MAX_SECTOR_LABELS) { + List<ITextLabel> torender = new List<ITextLabel>(orderedselection.Count); foreach(Sector s in orderedselection) { + //mxd. Self-referencing (and probably some other) sectors don't have labels... + if(labels[s].Length == 0) continue; + // Render labels TextLabel[] labelarray = labels[s]; + float requiredsize = (labelarray[0].TextSize.Height / 2) / renderer.Scale; for(int i = 0; i < s.Labels.Count; i++) { - TextLabel l = labelarray[i]; - // Render only when enough space for the label to see - float requiredsize = (l.TextSize.Height / 2) / renderer.Scale; - if(requiredsize < s.Labels[i].radius) renderer.RenderText(l); + if(requiredsize < s.Labels[i].radius) torender.Add(labelarray[i]); } } + renderer.RenderText(torender); } //mxd. Render effect labels @@ -221,9 +226,10 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd private void RenderEffectLabels(Dictionary<Sector, string[]> labelsGroup) { + List<ITextLabel> torender = new List<ITextLabel>(labelsGroup.Count); foreach(KeyValuePair<Sector, string[]> group in labelsGroup) { - // Render labels + // Pick which text variant to use TextLabel[] labelarray = labels[group.Key]; for(int i = 0; i < group.Key.Labels.Count; i++) { @@ -231,20 +237,26 @@ namespace CodeImp.DoomBuilder.BuilderModes l.Color = General.Colors.InfoLine; // Render only when enough space for the label to see - float requiredsize = (General.Map.GetTextSize(group.Value[0], l.Scale).Width) / renderer.Scale; + float requiredsize = (General.Interface.MeasureString(group.Value[0], l.Font).Width / 2) / renderer.Scale; if(requiredsize > group.Key.Labels[i].radius) { - requiredsize = (General.Map.GetTextSize(group.Value[1], l.Scale).Width) / renderer.Scale; - l.Text = (requiredsize > group.Key.Labels[i].radius ? "+" : group.Value[1]); + requiredsize = (General.Interface.MeasureString(group.Value[1], l.Font).Width / 2) / renderer.Scale; + if(requiredsize > group.Key.Labels[i].radius) + l.Text = (requiredsize > group.Key.Labels[i].radius * 4 ? string.Empty : "+"); + else + l.Text = group.Value[1]; } else { l.Text = group.Value[0]; } - renderer.RenderText(l); + torender.Add(l); } } + + // Render labels + renderer.RenderText(torender); } //mxd @@ -286,8 +298,8 @@ namespace CodeImp.DoomBuilder.BuilderModes string[] result = new[] { string.Empty, string.Empty }; if(s.Effect != 0 && s.Tag != 0) { - result[0] = tagstr + "; " + effectstr; - result[1] = tagstrshort + " " + effectstrshort; + result[0] = tagstr + Environment.NewLine + effectstr; + result[1] = tagstrshort + Environment.NewLine + effectstrshort; } else if(s.Effect != 0) { @@ -413,14 +425,16 @@ namespace CodeImp.DoomBuilder.BuilderModes if((highlighted != null) && !highlighted.IsDisposed) { TextLabel[] labelarray = labels[highlighted]; - foreach(TextLabel l in labelarray) l.Color = General.Colors.Selection; + PixelColor c = (General.Settings.UseHighlight ? General.Colors.Highlight : General.Colors.Selection); + foreach(TextLabel l in labelarray) l.Color = c; } // Change label color if((s != null) && !s.IsDisposed) { TextLabel[] labelarray = labels[s]; - foreach(TextLabel l in labelarray) l.Color = General.Colors.Highlight; + PixelColor c = (General.Settings.UseHighlight ? General.Colors.Selection : General.Colors.Highlight); + foreach(TextLabel l in labelarray) l.Color = c; } // If we're changing associations, then we @@ -485,11 +499,12 @@ namespace CodeImp.DoomBuilder.BuilderModes { //mxd string selectedCount = General.Map.Map.SelectedSectorsCount.ToString(); + PixelColor c = (General.Settings.UseHighlight ? General.Colors.Highlight : General.Colors.Selection); TextLabel[] labelarray = labels[s]; foreach(TextLabel l in labelarray) { l.Text = selectedCount; - l.Color = General.Colors.Selection; + l.Color = c; } UpdateEffectLabels(); @@ -543,8 +558,12 @@ namespace CodeImp.DoomBuilder.BuilderModes // This updates labels from the selected sectors private void UpdateSelectedLabels() { + // Don't show lables for selected-from-highlight item + if(selectionfromhighlight) return; + // Go for all labels in all selected sectors ICollection<Sector> orderedselection = General.Map.Map.GetSelectedSectors(true); + PixelColor c = (General.Settings.UseHighlight ? General.Colors.Highlight : General.Colors.Selection); //mxd int index = 0; foreach(Sector s in orderedselection) { @@ -554,7 +573,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Make sure the text and color are right int labelnum = index + 1; l.Text = labelnum.ToString(); - l.Color = General.Colors.Selection; + l.Color = c; } index++; } @@ -591,12 +610,55 @@ namespace CodeImp.DoomBuilder.BuilderModes return false; } + //mxd. Gets map elements inside of selectionoutline and sorts them by distance to targetpoint + private List<Sector> GetOrderedSelection(Vector2D targetpoint, List<Line2D> selectionoutline) + { + // Gather affected sectors + List<Sector> result = new List<Sector>(); + foreach(Sector s in General.Map.Map.Sectors) + { + if(IsInSelectionRect(s, selectionoutline)) result.Add(s); + } + + if(result.Count == 0) return result; + + // Sort by distance to targetpoint + result.Sort(delegate(Sector s1, Sector s2) + { + if(s1 == s2) return 0; + + // Get closest distance from s1 to selectstart + float closest1 = float.MaxValue; + foreach(Sidedef side in s1.Sidedefs) + { + Vector2D pos = (side.IsFront ? side.Line.Start : side.Line.End).Position; + float curdistance = Vector2D.DistanceSq(pos, targetpoint); + if(curdistance < closest1) closest1 = curdistance; + } + + // Get closest distance from s2 to selectstart + float closest2 = float.MaxValue; + foreach(Sidedef side in s2.Sidedefs) + { + Vector2D pos = (side.IsFront ? side.Line.Start : side.Line.End).Position; + float curdistance = Vector2D.DistanceSq(pos, targetpoint); + if(curdistance < closest2) closest2 = curdistance; + } + + // Return closer one + return (int)(closest1 - closest2); + }); + + return result; + } + //mxd - public override void SelectMapElement(SelectableElement element) + public override void SelectMapElement(SelectableElement element) { - if(element is Sector) + Sector sector = element as Sector; + if(sector != null) { - SelectSector(element as Sector, true, true); + SelectSector(sector, true, true); // Update overlay UpdateOverlaySurfaces(); @@ -629,11 +691,13 @@ namespace CodeImp.DoomBuilder.BuilderModes renderer.SetPresentation(Presentation.Standard); // Add toolbar buttons + General.Interface.BeginToolbarUpdate(); //mxd General.Interface.AddButton(BuilderPlug.Me.MenusForm.CopyProperties); General.Interface.AddButton(BuilderPlug.Me.MenusForm.PasteProperties); General.Interface.AddButton(BuilderPlug.Me.MenusForm.PastePropertiesOptions); //mxd General.Interface.AddButton(BuilderPlug.Me.MenusForm.SeparatorCopyPaste); General.Interface.AddButton(BuilderPlug.Me.MenusForm.ViewSelectionNumbers); + BuilderPlug.Me.MenusForm.ViewSelectionEffects.Text = "View Tags and Effects"; //mxd General.Interface.AddButton(BuilderPlug.Me.MenusForm.ViewSelectionEffects); General.Interface.AddButton(BuilderPlug.Me.MenusForm.SeparatorSectors1); if (!General.Map.SRB2) General.Interface.AddButton(BuilderPlug.Me.MenusForm.MakeDoor); //mxd @@ -653,6 +717,8 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.AddButton(BuilderPlug.Me.MenusForm.PerpendicularLinedef); //JBR General.Interface.AddButton(BuilderPlug.Me.MenusForm.ParallelLinedef); //JBR + General.Interface.EndToolbarUpdate(); //mxd + // Convert geometry selection to sectors only General.Map.Map.ConvertSelection(SelectionType.Sectors); @@ -691,6 +757,7 @@ namespace CodeImp.DoomBuilder.BuilderModes base.OnDisengage(); // Remove toolbar buttons + General.Interface.BeginToolbarUpdate(); //mxd General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.CopyProperties); General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PasteProperties); General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PastePropertiesOptions); //mxd @@ -709,6 +776,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.MarqueSelectTouching); //mxd General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.SyncronizeThingEditButton); //mxd if(General.Map.UDMF) General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.TextureOffsetLock); //mxd + General.Interface.EndToolbarUpdate(); //mxd General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PlaceThings); //JBR General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PerpendicularVertex); //JBR @@ -719,11 +787,11 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Map.Map.ClearSelectedLinedefs(); // Going to EditSelectionMode? - if(General.Editing.NewMode is EditSelectionMode) + EditSelectionMode mode = General.Editing.NewMode as EditSelectionMode; + if(mode != null) { // Not pasting anything? - EditSelectionMode editmode = (General.Editing.NewMode as EditSelectionMode); - if(!editmode.Pasting) + if(!mode.Pasting) { // No selection made? But we have a highlight! if((General.Map.Map.GetSelectedSectors(true).Count == 0) && (highlighted != null)) @@ -762,8 +830,8 @@ namespace CodeImp.DoomBuilder.BuilderModes // Render things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA); - renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA); + renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha); + renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.ActiveThingsAlpha); renderer.RenderNiGHTSPath(); renderer.Finish(); } @@ -825,7 +893,8 @@ namespace CodeImp.DoomBuilder.BuilderModes // Update overlay TextLabel[] labelarray = labels[highlighted]; - foreach(TextLabel l in labelarray) l.Color = General.Colors.Highlight; + PixelColor c = (General.Settings.UseHighlight ? General.Colors.Selection : General.Colors.Highlight); + foreach(TextLabel l in labelarray) l.Color = c; UpdateOverlaySurfaces(); //mxd UpdateOverlay(); renderer.Present(); @@ -870,11 +939,13 @@ namespace CodeImp.DoomBuilder.BuilderModes if(!highlighted.Selected && (BuilderPlug.Me.AutoClearSelection || (General.Map.Map.SelectedSectorsCount == 0))) { // Make this the only selection + selectionfromhighlight = true; //mxd General.Map.Map.ClearSelectedSectors(); General.Map.Map.ClearSelectedLinedefs(); SelectSector(highlighted, true, false); UpdateSelectedLabels(); //mxd UpdateOverlaySurfaces(); //mxd + UpdateSelectionInfo(); //mxd General.Interface.RedrawDisplay(); } @@ -893,7 +964,7 @@ namespace CodeImp.DoomBuilder.BuilderModes DrawGeometryMode drawmode = new DrawGeometryMode(); bool snaptogrid = General.Interface.ShiftState ^ General.Interface.SnapToGrid; bool snaptonearest = General.Interface.CtrlState ^ General.Interface.AutoMerge; - DrawnVertex v = DrawGeometryMode.GetCurrentPosition(mousemappos, snaptonearest, snaptogrid, false, renderer, new List<DrawnVertex>()); + DrawnVertex v = DrawGeometryMode.GetCurrentPosition(mousemappos, snaptonearest, snaptogrid, false, false, renderer, new List<DrawnVertex>()); if(drawmode.DrawPointAt(v)) General.Editing.ChangeMode(drawmode); @@ -924,7 +995,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Map.Renderer2D.UpdateExtraFloorFlag(); //mxd // When a single sector was selected, deselect it now - if(selected.Count == 1) + if(selected.Count == 1 && selectionfromhighlight) { General.Map.Map.ClearSelectedSectors(); General.Map.Map.ClearSelectedLinedefs(); @@ -954,6 +1025,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } editpressed = false; + selectionfromhighlight = false; //mxd base.OnEditEnd(); } @@ -1184,54 +1256,63 @@ namespace CodeImp.DoomBuilder.BuilderModes return true; } - // This is called wheh selection ends + //mxd. This is called wheh selection ends protected override void OnEndMultiSelection() { bool selectionvolume = ((Math.Abs(base.selectionrect.Width) > 0.1f) && (Math.Abs(base.selectionrect.Height) > 0.1f)); if(selectionvolume) { - List<Line2D> selectionOutline = new List<Line2D> { + List<Line2D> selectionoutline = new List<Line2D> + { new Line2D(selectionrect.Left, selectionrect.Top, selectionrect.Right, selectionrect.Top), new Line2D(selectionrect.Right, selectionrect.Top, selectionrect.Right, selectionrect.Bottom), new Line2D(selectionrect.Left, selectionrect.Bottom, selectionrect.Right, selectionrect.Bottom), new Line2D(selectionrect.Left, selectionrect.Bottom, selectionrect.Left, selectionrect.Top) }; - //mxd. (de)select sectors + // (De)select sectors switch(marqueSelectionMode) { case MarqueSelectionMode.SELECT: - foreach(Sector s in General.Map.Map.Sectors) - { - bool select = IsInSelectionRect(s, selectionOutline); - if(select && !s.Selected) SelectSector(s, true, false); - else if(!select && s.Selected) SelectSector(s, false, false); - } + // Get ordered selection + List<Sector> selectresult = GetOrderedSelection(base.selectstart, selectionoutline); + + // First deselect everything... + foreach(Sector s in General.Map.Map.Sectors) SelectSector(s, false, false); + + // Then select sectors in correct order + foreach(Sector s in selectresult) SelectSector(s, true, false); break; case MarqueSelectionMode.ADD: - foreach(Sector s in General.Map.Map.Sectors) - { - if(!s.Selected && IsInSelectionRect(s, selectionOutline)) - SelectSector(s, true, false); - } + // Get ordered selection + List<Sector> addresult = GetOrderedSelection(selectstart, selectionoutline); + + // First deselect everything inside of selection... + foreach(Sector s in addresult) SelectSector(s, false, false); + + // Then reselect in correct order + foreach(Sector s in addresult) SelectSector(s, true, false); break; case MarqueSelectionMode.SUBTRACT: + // Selection order doesn't matter here foreach(Sector s in General.Map.Map.Sectors) { if(!s.Selected) continue; - if(IsInSelectionRect(s, selectionOutline)) + if(IsInSelectionRect(s, selectionoutline)) SelectSector(s, false, false); } break; - default: //should be Intersect + // Should be Intersect selection mode + default: + // Selection order doesn't matter here foreach(Sector s in General.Map.Map.Sectors) { if(!s.Selected) continue; - if(!IsInSelectionRect(s, selectionOutline)) + if(!IsInSelectionRect(s, selectionoutline)) SelectSector(s, false, false); } break; @@ -1332,6 +1413,32 @@ namespace CodeImp.DoomBuilder.BuilderModes base.OnRedoEnd(); //mxd } + //mxd + public override void OnViewSelectionNumbersChanged(bool enabled) + { + if(enabled) UpdateSelectedLabels(); + } + + //mxd + protected override void ToggleHighlight() + { + // Update label colors + PixelColor c = (General.Settings.UseHighlight ? General.Colors.Selection : General.Colors.Highlight); + foreach(TextLabel[] labelarray in labels.Values) + foreach(TextLabel l in labelarray) l.Color = c; + + // Update highlighted label color + if((highlighted != null) && !highlighted.IsDisposed) + { + TextLabel[] labelarray = labels[highlighted]; + c = (General.Settings.UseHighlight ? General.Colors.Highlight : General.Colors.Selection); + foreach(TextLabel l in labelarray) l.Color = c; + } + + // Pass to base + base.ToggleHighlight(); + } + //mxd private void RenderComment(Sector s) { @@ -1561,7 +1668,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { bool snaptogrid = General.Interface.ShiftState ^ General.Interface.SnapToGrid; bool snaptonearest = General.Interface.CtrlState ^ General.Interface.AutoMerge; - DrawnVertex v = DrawGeometryMode.GetCurrentPosition(mousemappos, snaptonearest, snaptogrid, false, renderer, new List<DrawnVertex>()); + DrawnVertex v = DrawGeometryMode.GetCurrentPosition(mousemappos, snaptonearest, snaptogrid, false, false, renderer, new List<DrawnVertex>()); drawmode.DrawPointAt(v); } General.Editing.ChangeMode(drawmode); @@ -2027,7 +2134,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { s.Fields.BeforeFieldsChange(); float u = index / (float) (orderedselection.Count - 1); - float b = InterpolationTools.Interpolate(startbrightness, endbrightness, u, interpolationmode); + float b = (float)Math.Round(InterpolationTools.Interpolate(startbrightness, endbrightness, u, interpolationmode)); //absolute flag set? if(s.Fields.GetValue(lightAbsKey, false)) @@ -2067,7 +2174,7 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(Sector s in orderedselection) { float u = index / (float)(orderedselection.Count - 1); - s.Brightness = InterpolationTools.Interpolate(start.Brightness, end.Brightness, u, interpolationmode); //mxd + s.Brightness = (int)Math.Round(InterpolationTools.Interpolate(start.Brightness, end.Brightness, u, interpolationmode)); //mxd index++; } } @@ -2093,16 +2200,16 @@ namespace CodeImp.DoomBuilder.BuilderModes } else { - Color startColor, endColor; + PixelColor startcolor, endcolor; if(key == "fadecolor") { - startColor = Tools.GetSectorFadeColor(start); - endColor = Tools.GetSectorFadeColor(end); + startcolor = Tools.GetSectorFadeColor(start); + endcolor = Tools.GetSectorFadeColor(end); } else { - startColor = PixelColor.FromInt(start.Fields.GetValue(key, defaultvalue)).ToColor(); - endColor = PixelColor.FromInt(end.Fields.GetValue(key, defaultvalue)).ToColor(); + startcolor = PixelColor.FromInt(start.Fields.GetValue(key, defaultvalue)); + endcolor = PixelColor.FromInt(end.Fields.GetValue(key, defaultvalue)); } // Go for all sectors in between first and last @@ -2112,12 +2219,10 @@ namespace CodeImp.DoomBuilder.BuilderModes if(index > 0 && index < orderedselection.Count - 1) { s.Fields.BeforeFieldsChange(); - float u = index / (float) (orderedselection.Count - 1); - Color c = Color.FromArgb(0, General.Clamp(InterpolationTools.Interpolate(startColor.R, endColor.R, u, interpolationmode), 0, 255), - General.Clamp(InterpolationTools.Interpolate(startColor.G, endColor.G, u, interpolationmode), 0, 255), - General.Clamp(InterpolationTools.Interpolate(startColor.B, endColor.B, u, interpolationmode), 0, 255)); + float u = index / (orderedselection.Count - 1.0f); + int c = InterpolationTools.InterpolateColor(startcolor, endcolor, u, interpolationmode).WithAlpha(0).ToInt(); // No alpha here! - UniFields.SetInteger(s.Fields, key, c.ToArgb(), defaultvalue); + UniFields.SetInteger(s.Fields, key, c, defaultvalue); s.UpdateNeeded = true; } index++; @@ -2146,7 +2251,7 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(Sector s in orderedselection) { float u = index / (float)(orderedselection.Count - 1); - s.FloorHeight = InterpolationTools.Interpolate(startlevel, endlevel, u, interpolationmode); //mxd + s.FloorHeight = (int)Math.Round(InterpolationTools.Interpolate(startlevel, endlevel, u, interpolationmode)); //mxd index++; } @@ -2181,7 +2286,7 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(Sector s in orderedselection) { float u = (float)index / (orderedselection.Count - 1); - s.CeilHeight = InterpolationTools.Interpolate(startlevel, endlevel, u, interpolationmode); + s.CeilHeight = (int)Math.Round(InterpolationTools.Interpolate(startlevel, endlevel, u, interpolationmode)); index++; } @@ -2603,12 +2708,65 @@ namespace CodeImp.DoomBuilder.BuilderModes } var form = new SelectSimilarElementOptionsPanel(); - if(form.Setup(this)) form.ShowDialog(); + if(form.Setup(this)) form.ShowDialog(General.Interface); } //mxd [BeginAction("fliplinedefs")] public void FlipLinedefs() + { + // Get selection + ICollection<Sector> selected = General.Map.Map.GetSelectedSectors(true); + + if(selected.Count == 0 && highlighted != null && !highlighted.IsDisposed) + selected.Add(highlighted); + + if(selected.Count == 0) + { + General.Interface.DisplayStatus(StatusType.Warning, "This action requires a selection!"); + return; + } + + // Make undo + if(selected.Count > 1) + { + General.Map.UndoRedo.CreateUndo("Flip linedefs of " + selected.Count + " sectors"); + General.Interface.DisplayStatus(StatusType.Action, "Flipped linedefs of " + selected.Count + "sectors."); + } + else + { + General.Map.UndoRedo.CreateUndo("Flip sector linedefs"); + General.Interface.DisplayStatus(StatusType.Action, "Flipped sector linedefs."); + } + + HashSet<Linedef> selectedlines = new HashSet<Linedef>(); + foreach(Sector s in selected) + { + foreach(Sidedef side in s.Sidedefs) + { + // Skip single-sided lines with only front side + if(!selectedlines.Contains(side.Line) && (side.Line.Back != null || side.Line.Front == null)) + selectedlines.Add(side.Line); + } + } + + // Flip all selected linedefs + foreach(Linedef l in selectedlines) + { + l.FlipVertices(); + l.FlipSidedefs(); + } + + // Redraw + General.Map.Map.Update(); + General.Map.IsChanged = true; + General.Interface.RefreshInfo(); + General.Interface.RedrawDisplay(); + } + + //mxd + [BeginAction("alignlinedefs")] + public void AlignLinedefs() { // Get selection ICollection<Sector> selection = General.Map.Map.GetSelectedSectors(true); @@ -2625,13 +2783,13 @@ namespace CodeImp.DoomBuilder.BuilderModes // Make undo if(selection.Count > 1) { - General.Map.UndoRedo.CreateUndo("Flip linedefs of " + selection.Count + " sectors"); - General.Interface.DisplayStatus(StatusType.Action, "Flipped linedefs of " + selection.Count + "sectors."); + General.Map.UndoRedo.CreateUndo("Align linedefs of " + selection.Count + " sectors"); + General.Interface.DisplayStatus(StatusType.Action, "Aligned linedefs of " + selection.Count + "sectors."); } else { - General.Map.UndoRedo.CreateUndo("Flip sector linedefs"); - General.Interface.DisplayStatus(StatusType.Action, "Flipped sector linedefs."); + General.Map.UndoRedo.CreateUndo("Align sector linedefs"); + General.Interface.DisplayStatus(StatusType.Action, "Aligned sector linedefs."); } // Flip lines diff --git a/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs index 78f8d0d91abbef4380d0164852e3f71e31babcf4..ec22ceeaf99e587fc276dfab76948aa08c0ed75e 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs @@ -48,6 +48,8 @@ namespace CodeImp.DoomBuilder.BuilderModes { #region ================== Constants + private const int MAX_THING_LABELS = 256; //mxd + #endregion #region ================== Variables @@ -61,12 +63,18 @@ namespace CodeImp.DoomBuilder.BuilderModes private bool editpressed; private bool thinginserted; private bool awaitingMouseClick; //mxd + private bool selectionfromhighlight; //mxd //mxd. Event lines private List<Line3D> persistenteventlines; //mxd. Dynamic light shapes private List<Line3D> dynamiclightshapes; + + //mxd. Text labels + private Dictionary<Thing, TextLabel> labels; + private Dictionary<Sector, TextLabel[]> sectorlabels; + private Dictionary<Sector, string[]> sectortexts; #endregion @@ -84,6 +92,25 @@ namespace CodeImp.DoomBuilder.BuilderModes for(int i = 0; i < association.Length; i++) association[i] = new Association(); } + //mxd + public override void Dispose() + { + // Not already disposed? + if(!isdisposed) + { + // Dispose old labels + if(labels != null) foreach(TextLabel l in labels.Values) l.Dispose(); + if(sectorlabels != null) + { + foreach(TextLabel[] larr in sectorlabels.Values) + foreach(TextLabel l in larr) l.Dispose(); + } + + // Dispose base + base.Dispose(); + } + } + #endregion #region ================== Methods @@ -118,10 +145,18 @@ namespace CodeImp.DoomBuilder.BuilderModes renderer.SetPresentation(Presentation.Things); // Add toolbar buttons + General.Interface.BeginToolbarUpdate(); //mxd General.Interface.AddButton(BuilderPlug.Me.MenusForm.CopyProperties); General.Interface.AddButton(BuilderPlug.Me.MenusForm.PasteProperties); General.Interface.AddButton(BuilderPlug.Me.MenusForm.PastePropertiesOptions); //mxd General.Interface.AddButton(BuilderPlug.Me.MenusForm.SeparatorCopyPaste); //mxd + General.Interface.AddButton(BuilderPlug.Me.MenusForm.ViewSelectionNumbers); //mxd + if(General.Map.FormatInterface.HasThingAction) + { + BuilderPlug.Me.MenusForm.ViewSelectionEffects.Text = "View Sector Tags"; //mxd + General.Interface.AddButton(BuilderPlug.Me.MenusForm.ViewSelectionEffects); //mxd + } + General.Interface.AddButton(BuilderPlug.Me.MenusForm.SeparatorSectors1); //mxd General.Interface.AddButton(BuilderPlug.Me.MenusForm.AlignThingsToWall); //mxd General.Interface.AddButton(BuilderPlug.Me.MenusForm.PointAtCursor); //JBR @@ -135,11 +170,14 @@ namespace CodeImp.DoomBuilder.BuilderModes else BuilderPlug.Me.MenusForm.VertexSlopeAssistMenu.Visible = false; + General.Interface.EndToolbarUpdate(); //mxd + // Convert geometry selection to linedefs selection General.Map.Map.ConvertSelection(SelectionType.Linedefs); General.Map.Map.SelectionType = SelectionType.Things; UpdateSelectionInfo(); //mxd UpdateHelperObjects(); //mxd + SetupSectorLabels(); //mxd } // Mode disengages @@ -148,25 +186,32 @@ namespace CodeImp.DoomBuilder.BuilderModes base.OnDisengage(); // Remove toolbar buttons + General.Interface.BeginToolbarUpdate(); //mxd General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.CopyProperties); General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PasteProperties); General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PastePropertiesOptions); //mxd General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.SeparatorCopyPaste); //mxd + General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.ViewSelectionNumbers); //mxd + if(General.Map.FormatInterface.HasThingAction) + General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.ViewSelectionEffects); //mxd + General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.SeparatorSectors1); //mxd General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.AlignThingsToWall); //mxd General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PointAtCursor); //JBR if (General.Map.SRB2) General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.VertexSlopeAssist); //JBR + General.Interface.EndToolbarUpdate(); //mxd + //mxd. Do some highlight management... if (highlighted != null) highlighted.Highlighted = false; // Going to EditSelectionMode? - if(General.Editing.NewMode is EditSelectionMode) + EditSelectionMode mode = General.Editing.NewMode as EditSelectionMode; + if(mode != null) { // Not pasting anything? - EditSelectionMode editmode = (General.Editing.NewMode as EditSelectionMode); - if(!editmode.Pasting) + if(!mode.Pasting) { // No selection made? But we have a highlight! if((General.Map.Map.GetSelectedThings(true).Count == 0) && (highlighted != null)) @@ -203,14 +248,15 @@ namespace CodeImp.DoomBuilder.BuilderModes // Render things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA); - renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA); - renderer.RenderNiGHTSPath(); - for (int i = 0; i < Thing.NUM_ARGS; i++) BuilderPlug.RenderAssociations(renderer, association[i], eventlines); + float alpha = (General.Settings.FixedThingsScale ? Presentation.THINGS_ALPHA : General.Settings.ActiveThingsAlpha); //mxd + renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha); + renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, alpha); + renderer.RenderNiGHTSPath(); + for (int i = 0; i < Thing.NUM_ARGS; i++) BuilderPlug.RenderAssociations(renderer, association[i], eventlines); if((highlighted != null) && !highlighted.IsDisposed) { - renderer.RenderThing(highlighted, General.Colors.Highlight, Presentation.THINGS_ALPHA); + renderer.RenderThing(highlighted, General.Colors.Highlight, alpha); BuilderPlug.RenderReverseAssociations(renderer, highlightasso, eventlines); //mxd } @@ -219,7 +265,10 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Dynamic light radii if(!General.Map.DOOM && General.Settings.GZDrawLightsMode != LightRenderMode.NONE) + { eventlines.AddRange(dynamiclightshapes); + if(highlighted != null) eventlines.AddRange(GetDynamicLightShapes(new List<Thing> { highlighted } )); + } //mxd if(eventlines.Count > 0) renderer.RenderArrows(eventlines); @@ -233,6 +282,59 @@ namespace CodeImp.DoomBuilder.BuilderModes // Render selection if(selecting) RenderMultiSelection(); + //mxd. Render sector tag labels + if(BuilderPlug.Me.ViewSelectionEffects && General.Map.FormatInterface.HasThingAction) + { + //mxd. sectorlabels will be null after switching map configuration from one + // without ThingAction to one with it while in Things mode + if(sectorlabels == null) SetupSectorLabels(); + + List<ITextLabel> torender = new List<ITextLabel>(sectorlabels.Count); + foreach(KeyValuePair<Sector, string[]> group in sectortexts) + { + // Pick which text variant to use + TextLabel[] labelarray = sectorlabels[group.Key]; + for(int i = 0; i < group.Key.Labels.Count; i++) + { + TextLabel l = labelarray[i]; + + // Render only when enough space for the label to see + float requiredsize = (General.Interface.MeasureString(group.Value[0], l.Font).Width / 2) / renderer.Scale; + if(requiredsize > group.Key.Labels[i].radius) + { + requiredsize = (General.Interface.MeasureString(group.Value[1], l.Font).Width / 2) / renderer.Scale; + if(requiredsize > group.Key.Labels[i].radius) + l.Text = (requiredsize > group.Key.Labels[i].radius * 4 ? string.Empty : "+"); + else + l.Text = group.Value[1]; + } + else + { + l.Text = group.Value[0]; + } + + torender.Add(l); + } + } + + // Render labels + renderer.RenderText(torender); + } + + //mxd. Render selection labels + if(BuilderPlug.Me.ViewSelectionNumbers) + { + List<ITextLabel> torender = new List<ITextLabel>(labels.Count); + foreach(KeyValuePair<Thing, TextLabel> group in labels) + { + // Render only when enough space for the label to see + float requiredsize = (group.Value.TextSize.Width) / renderer.Scale; + if(group.Key.Size * 2 > requiredsize) torender.Add(group.Value); + } + + renderer.RenderText(torender); + } + //mxd. Render comments if(General.Map.UDMF && General.Settings.RenderComments) foreach(Thing t in General.Map.Map.Things) RenderComment(t); @@ -246,12 +348,26 @@ namespace CodeImp.DoomBuilder.BuilderModes private void Highlight(Thing t) { // Set highlight association - if(t != null && t.Tag != 0) - highlightasso.Set(t.Position, t.Tag, UniversalType.ThingTag); + if(t != null) + { + //mxd. Update label color? + if(labels.ContainsKey(t)) labels[t].Color = General.Colors.Selection; + + // New association highlights something? + if(t.Tag != 0) highlightasso.Set(t.Position, t.Tag, UniversalType.ThingTag); + } else + { highlightasso.Set(new Vector2D(), 0, 0); + } - if(highlighted != null) highlighted.Highlighted = false; //mxd + if(highlighted != null) //mxd + { + //mxd. Update label color? + if(labels.ContainsKey(highlighted)) labels[highlighted].Color = General.Colors.Highlight; + + highlighted.Highlighted = false; + } //mxd. Determine thing associations bool clearassociations = true; //mxd @@ -318,7 +434,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(renderer.StartThings(false)) { // Redraw highlight to show selection - renderer.RenderThing(highlighted, renderer.DetermineThingColor(highlighted), Presentation.THINGS_ALPHA); + renderer.RenderThing(highlighted, renderer.DetermineThingColor(highlighted), General.Settings.FixedThingsScale ? Presentation.THINGS_ALPHA : General.Settings.ActiveThingsAlpha); renderer.Finish(); renderer.Present(); } @@ -338,25 +454,29 @@ namespace CodeImp.DoomBuilder.BuilderModes { //mxd. Flip selection highlighted.Selected = !highlighted.Selected; - + UpdateSelectionInfo(); //mxd + + //mxd. Full redraw when labels were changed + if(BuilderPlug.Me.ViewSelectionNumbers) + { + General.Interface.RedrawDisplay(); + } // Update display - if(renderer.StartThings(false)) + else if(renderer.StartThings(false)) { // Render highlighted item - renderer.RenderThing(highlighted, General.Colors.Highlight, Presentation.THINGS_ALPHA); + renderer.RenderThing(highlighted, General.Colors.Highlight, General.Settings.FixedThingsScale ? Presentation.THINGS_ALPHA : General.Settings.ActiveThingsAlpha); renderer.Finish(); renderer.Present(); } - } //mxd else if(BuilderPlug.Me.AutoClearSelection && General.Map.Map.SelectedThingsCount > 0) { General.Map.Map.ClearSelectedThings(); + UpdateSelectionInfo(); General.Interface.RedrawDisplay(); } - - UpdateSelectionInfo(); //mxd } base.OnSelectEnd(); @@ -377,8 +497,10 @@ namespace CodeImp.DoomBuilder.BuilderModes if(!highlighted.Selected && (BuilderPlug.Me.AutoClearSelection || (General.Map.Map.SelectedThingsCount == 0))) { // Make this the only selection + selectionfromhighlight = true; //mxd General.Map.Map.ClearSelectedThings(); highlighted.Selected = true; + UpdateSelectionInfo(); //mxd General.Interface.RedrawDisplay(); } @@ -386,7 +508,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(renderer.StartThings(false)) { // Redraw highlight to show selection - renderer.RenderThing(highlighted, renderer.DetermineThingColor(highlighted), Presentation.THINGS_ALPHA); + renderer.RenderThing(highlighted, renderer.DetermineThingColor(highlighted), General.Settings.FixedThingsScale ? Presentation.THINGS_ALPHA : General.Settings.ActiveThingsAlpha); renderer.Finish(); renderer.Present(); } @@ -438,7 +560,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.OnEditFormValuesChanged -= thingEditForm_OnValuesChanged; // When a single thing was selected, deselect it now - if(selected.Count == 1) + if(selected.Count == 1 && selectionfromhighlight) { General.Map.Map.ClearSelectedThings(); } @@ -450,17 +572,18 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Update helper lines UpdateHelperObjects(); + //mxd. Update selection info + UpdateSelectionInfo(); + // Update display General.Interface.RedrawDisplay(); } } } - - //mxd. Update selection info - UpdateSelectionInfo(); } editpressed = false; + selectionfromhighlight = false; //mxd base.OnEditEnd(); } @@ -469,8 +592,9 @@ namespace CodeImp.DoomBuilder.BuilderModes { base.OnUndoEnd(); - //mxd. Update helper lines - UpdateHelperObjects(); + UpdateSelectionInfo(); // Update selection info and labels + UpdateHelperObjects(); // Update helper lines + SetupSectorLabels(); // And sector labels } //mxd @@ -478,8 +602,9 @@ namespace CodeImp.DoomBuilder.BuilderModes { base.OnRedoEnd(); - //mxd. Update helper lines - UpdateHelperObjects(); + UpdateSelectionInfo(); // Update selection info and labels + UpdateHelperObjects(); // Update helper lines + SetupSectorLabels(); // And sector labels } //mxd. Otherwise event lines won't be drawn after panning finishes. @@ -707,21 +832,36 @@ namespace CodeImp.DoomBuilder.BuilderModes switch(marqueSelectionMode) { case MarqueSelectionMode.SELECT: - foreach(Thing t in General.Map.ThingsFilter.VisibleThings) - t.Selected = selectionrect.Contains(t.Position.x, t.Position.y); + // Get ordered selection + List<Thing> selectresult = GetOrderedSelection(base.selectstart, selectionrect); + + // First deselect everything... + foreach(Thing t in General.Map.Map.Things) t.Selected = false; + + // Then select things in correct order + foreach(Thing t in selectresult) t.Selected = true; break; case MarqueSelectionMode.ADD: - foreach(Thing t in General.Map.ThingsFilter.VisibleThings) - t.Selected |= selectionrect.Contains(t.Position.x, t.Position.y); + // Get ordered selection + List<Thing> addresult = GetOrderedSelection(selectstart, selectionrect); + + // First deselect everything inside of selection... + foreach(Thing t in addresult) t.Selected = false; + + // Then reselect in correct order + foreach(Thing t in addresult) t.Selected = true; break; case MarqueSelectionMode.SUBTRACT: + // Selection order doesn't matter here foreach(Thing t in General.Map.ThingsFilter.VisibleThings) if(selectionrect.Contains(t.Position.x, t.Position.y)) t.Selected = false; break; - default: //should be Intersect + // Should be Intersect selection mode + default: + // Selection order doesn't matter here foreach(Thing t in General.Map.ThingsFilter.VisibleThings) if(!selectionrect.Contains(t.Position.x, t.Position.y)) t.Selected = false; break; @@ -794,6 +934,142 @@ namespace CodeImp.DoomBuilder.BuilderModes } } + //mxd. Gets map elements inside of selectionoutline and sorts them by distance to targetpoint + private List<Thing> GetOrderedSelection(Vector2D targetpoint, RectangleF selection) + { + // Gather affected sectors + List<Thing> result = new List<Thing>(); + foreach(Thing t in General.Map.ThingsFilter.VisibleThings) + { + if(selection.Contains(t.Position.x, t.Position.y)) result.Add(t); + } + + if(result.Count == 0) return result; + + // Sort by distance to targetpoint + result.Sort(delegate(Thing t1, Thing t2) + { + if(t1 == t2) return 0; + + // Get closest distance from thing to selectstart + float closest1 = Vector2D.DistanceSq(t1.Position, targetpoint); + float closest2 = Vector2D.DistanceSq(t2.Position, targetpoint); + + // Return closer one + return (int)(closest1 - closest2); + }); + + return result; + } + + //mxd. This sets up new labels + private void SetupSectorLabels() + { + if(!General.Map.FormatInterface.HasThingAction) return; + + // Dispose old labels + if(sectorlabels != null) + { + foreach(TextLabel[] larr in sectorlabels.Values) + foreach(TextLabel l in larr) l.Dispose(); + } + + // Make text labels for sectors + sectorlabels = new Dictionary<Sector, TextLabel[]>(); + sectortexts = new Dictionary<Sector, string[]>(); + foreach(Sector s in General.Map.Map.Sectors) + { + // Setup labels + if(s.Tag == 0) continue; + + // Make tag text + string[] tagdescarr = new string[2]; + if(s.Tags.Count > 1) + { + string[] stags = new string[s.Tags.Count]; + for(int i = 0; i < s.Tags.Count; i++) stags[i] = s.Tags[i].ToString(); + tagdescarr[0] = "Tags " + string.Join(", ", stags); + tagdescarr[1] = "T" + string.Join(",", stags); + } + else + { + tagdescarr[0] = "Tag " + s.Tag; + tagdescarr[1] = "T" + s.Tag; + } + + // Add to collection + sectortexts.Add(s, tagdescarr); + + TextLabel[] larr = new TextLabel[s.Labels.Count]; + for(int i = 0; i < s.Labels.Count; i++) + { + TextLabel l = new TextLabel(); + l.TransformCoords = true; + l.Location = s.Labels[i].position; + l.AlignX = TextAlignmentX.Center; + l.AlignY = TextAlignmentY.Middle; + l.Color = General.Colors.InfoLine; + l.BackColor = General.Colors.Background.WithAlpha(128); + larr[i] = l; + } + + // Add to collection + sectorlabels.Add(s, larr); + } + } + + //mxd. Also update labels for the selected linedefs + public override void UpdateSelectionInfo() + { + base.UpdateSelectionInfo(); + + if(labels != null) + { + // Dispose old labels + foreach(TextLabel l in labels.Values) l.Dispose(); + + // Don't show lables for selected-from-highlight item + if(selectionfromhighlight) + { + labels.Clear(); + return; + } + } + + // Make text labels for selected linedefs + ICollection<Thing> orderedselection = General.Map.Map.GetSelectedThings(true); + labels = new Dictionary<Thing, TextLabel>(orderedselection.Count); + + // Otherwise significant delays will occure. + // Also we probably won't care about selection ordering when selecting this many anyway + if(orderedselection.Count > MAX_THING_LABELS) return; + + int index = 0; + foreach(Thing thing in orderedselection) + { + TextLabel l = new TextLabel(); + l.TransformCoords = true; + + if(thing.FixedSize) + { + l.Location = thing.Position; + l.AlignX = TextAlignmentX.Center; + l.AlignY = TextAlignmentY.Middle; + } + else + { + l.Location = new Vector2D(thing.Position.x - thing.Size + 1, thing.Position.y + thing.Size - 1); + l.AlignX = TextAlignmentX.Left; + l.AlignY = TextAlignmentY.Top; + } + + l.Color = (thing == highlighted ? General.Colors.Selection : General.Colors.Highlight); + l.BackColor = General.Colors.Background.WithAlpha(192); + l.Text = (++index).ToString(); + labels.Add(thing, l); + } + } + //mxd private void UpdateHelperObjects() { @@ -801,9 +1077,103 @@ namespace CodeImp.DoomBuilder.BuilderModes persistenteventlines = LinksCollector.GetThingLinks(General.Map.ThingsFilter.VisibleThings); // Update light radii - dynamiclightshapes = Tools.GetDynamicLightShapes(); + dynamiclightshapes = GetDynamicLightShapes(General.Map.Map.Things); } + //mxd + private List<Line3D> GetDynamicLightShapes(IEnumerable<Thing> things) + { + List<Line3D> circles = new List<Line3D>(); + const int linealpha = 128; + foreach(Thing t in things) + { + int lightid = Array.IndexOf(GZBuilder.GZGeneral.GZ_LIGHTS, t.SRB2Type); + if(lightid == -1) continue; + + // TODO: this basically duplicates VisualThing.UpdateLight()... + // Determine light radiii + int primaryradius; + int secondaryradius = 0; + + if(lightid < GZBuilder.GZGeneral.GZ_LIGHT_TYPES[2]) //if it's gzdoom light + { + int n; + if(lightid < GZBuilder.GZGeneral.GZ_LIGHT_TYPES[0]) n = 0; + else if(lightid < GZBuilder.GZGeneral.GZ_LIGHT_TYPES[1]) n = 10; + else n = 20; + DynamicLightType lightType = (DynamicLightType)(t.SRB2Type - 9800 - n); + + if(lightType == DynamicLightType.SECTOR) + { + if(t.Sector == null) t.DetermineSector(); + int scaler = (t.Sector != null ? t.Sector.Brightness / 4 : 2); + primaryradius = t.Args[3] * scaler; + } + else + { + primaryradius = t.Args[3] * 2; //works... that.. way in GZDoom + if(lightType > 0) secondaryradius = t.Args[4] * 2; + } + } + else //it's one of vavoom lights + { + primaryradius = t.Args[0] * 8; + } + + // Check radii... + if(primaryradius < 1 && secondaryradius < 1) continue; + + // Determine light color + PixelColor color; + if(t == highlighted) + { + color = General.Colors.Highlight.WithAlpha(linealpha); + } + else + { + switch(t.SRB2Type) + { + case 1502: // Vavoom light + color = new PixelColor(linealpha, 255, 255, 255); + break; + + case 1503: // Vavoom colored light + color = new PixelColor(linealpha, (byte)t.Args[1], (byte)t.Args[2], (byte)t.Args[3]); + break; + + default: + color = new PixelColor(linealpha, (byte)t.Args[0], (byte)t.Args[1], (byte)t.Args[2]); + break; + } + } + + // Add lines if visible + const int numsides = 24; + if(primaryradius > 0) circles.AddRange(MakeCircleLines(t.Position, color, primaryradius, numsides)); + if(secondaryradius > 0) circles.AddRange(MakeCircleLines(t.Position, color, secondaryradius, numsides)); + } + + // Done + return circles; + } + + //mxd + private static IEnumerable<Line3D> MakeCircleLines(Vector2D pos, PixelColor color, float radius, int numsides) + { + List<Line3D> result = new List<Line3D>(numsides); + Vector2D start = new Vector2D(pos.x, pos.y + radius); + float anglestep = Angle2D.PI2 / numsides; + + for(int i = 1; i < numsides + 1; i++) + { + Vector2D end = pos + new Vector2D((float)Math.Sin(anglestep * i) * radius, (float)Math.Cos(anglestep * i) * radius); + result.Add(new Line3D(start, end, color, false)); + start = end; + } + + return result; + } + #endregion #region ================== Actions @@ -936,6 +1306,10 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Clear selection info General.Interface.DisplayStatus(StatusType.Selection, string.Empty); + //mxd. Clear selection labels + foreach(TextLabel l in labels.Values) l.Dispose(); + labels.Clear(); + // Redraw General.Interface.RedrawDisplay(); } @@ -1090,14 +1464,13 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Update helper lines UpdateHelperObjects(); - // Invoke a new mousemove so that the highlighted item updates - MouseEventArgs e = new MouseEventArgs(MouseButtons.None, 0, (int)mousepos.x, (int)mousepos.y, 0); - OnMouseMove(e); - // Redraw screen UpdateSelectionInfo(); //mxd General.Interface.RefreshInfo(); General.Interface.RedrawDisplay(); + + // Invoke a new mousemove so that the highlighted item updates + OnMouseMove(new MouseEventArgs(MouseButtons.None, 0, (int)mousepos.x, (int)mousepos.y, 0)); } } @@ -1138,11 +1511,9 @@ namespace CodeImp.DoomBuilder.BuilderModes } //align things - int thingsCount = General.Map.Map.Things.Count; - foreach(Thing t in toAlign) { - List<Linedef> excludedLines = new List<Linedef>(); + HashSet<Linedef> excludedLines = new HashSet<Linedef>(); bool aligned; do @@ -1153,7 +1524,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(!aligned) { excludedLines.Add(l); - if(excludedLines.Count == thingsCount) + if(excludedLines.Count == General.Map.Map.Linedefs.Count) { ThingTypeInfo tti = General.Map.Data.GetThingInfo(t.SRB2Type); General.ErrorLogger.Add(ErrorType.Warning, "Unable to align " + tti.Title + " (index " + t.Index + ") to any linedef!"); @@ -1206,25 +1577,33 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.DisplayStatus(StatusType.Action, "Rotated a thing."); } - //change angle - if(General.Interface.CtrlState) //point away + // Change angle + if(General.Interface.CtrlState) // Point away { foreach(Thing t in selected) { ThingTypeInfo info = General.Map.Data.GetThingInfo(t.SRB2Type); - if(info == null || info.Category == null || info.Category.Arrow == 0) + if (info == null || !info.Arrow) continue; - t.Rotate(Vector2D.GetAngle(mousemappos, t.Position) + Angle2D.PI); + + int newangle = Angle2D.RealToDoom(Vector2D.GetAngle(mousemappos, t.Position) + Angle2D.PI); + if(General.Map.Config.DoomThingRotationAngles) newangle = (newangle + 22) / 45 * 45; + + t.Rotate(newangle); } } - else //point at + else // Point at cursor { foreach(Thing t in selected) { ThingTypeInfo info = General.Map.Data.GetThingInfo(t.SRB2Type); - if(info == null || info.Category == null || info.Category.Arrow == 0) + if (info == null || !info.Arrow) continue; - t.Rotate(Vector2D.GetAngle(mousemappos, t.Position)); + + int newangle = Angle2D.RealToDoom(Vector2D.GetAngle(mousemappos, t.Position)); + if(General.Map.Config.DoomThingRotationAngles) newangle = (newangle + 22) / 45 * 45; + + t.Rotate(newangle); } } @@ -1249,14 +1628,14 @@ namespace CodeImp.DoomBuilder.BuilderModes [BeginAction("rotateclockwise")] public void RotateCW() { - RotateThings(-5); + RotateThings(General.Map.Config.DoomThingRotationAngles ? -45 : -5); } //mxd. rotate counterclockwise [BeginAction("rotatecounterclockwise")] public void RotateCCW() { - RotateThings(5); + RotateThings(General.Map.Config.DoomThingRotationAngles ? 45 : 5); } //mxd @@ -1285,8 +1664,14 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.DisplayStatus(StatusType.Action, "Rotated a thing."); } - //change angle - foreach(Thing t in selected) t.Rotate(General.ClampAngle(t.AngleDoom + increment)); + // Change angle + foreach(Thing t in selected) + { + int loops = (General.Map.SRB2) ? t.AngleDoom - (t.AngleDoom % 360) : 0; + int newangle = t.AngleDoom + increment; + if(General.Map.Config.DoomThingRotationAngles) newangle = newangle / 45 * 45; + t.Rotate(General.ClampAngle(newangle) + loops); + } // Redraw screen General.Interface.RedrawDisplay(); @@ -1321,7 +1706,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } var form = new SelectSimilarElementOptionsPanel(); - if(form.Setup(this)) form.ShowDialog(); + if(form.Setup(this)) form.ShowDialog(General.Interface); } #endregion diff --git a/Source/Plugins/BuilderModes/ClassicModes/VertexSlopeAssistMode.cs b/Source/Plugins/BuilderModes/ClassicModes/VertexSlopeAssistMode.cs index e67b69ec3a1b075a92e928117e7c0f89f9c80231..3f390e0a3eb252637487026d63b20c24df38d8e2 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/VertexSlopeAssistMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/VertexSlopeAssistMode.cs @@ -79,14 +79,12 @@ namespace CodeImp.DoomBuilder.BuilderModes vertexnames = new TextLabel[4]; for (int i = 0; i < 4; i++) { - vertexnames[i] = new TextLabel(1); + vertexnames[i] = new TextLabel(); vertexnames[i].TransformCoords = true; - vertexnames[i].Rectangle = new RectangleF(0f, 0f, 0f, 0f); + vertexnames[i].Location = new Vector2D(0f, 0f); vertexnames[i].AlignX = TextAlignmentX.Center; vertexnames[i].AlignY = TextAlignmentY.Middle; - vertexnames[i].Scale = 16f; vertexnames[i].Color = General.Colors.Highlight.WithAlpha(255); - vertexnames[i].Backcolor = General.Colors.Background.WithAlpha(255); } points = new List<DrawnVertex>(); overgroups = new List<int>(); @@ -857,7 +855,7 @@ namespace CodeImp.DoomBuilder.BuilderModes snaptogrid = (snaptocardinaldirection || General.Interface.ShiftState ^ General.Interface.SnapToGrid); snaptonearest = General.Interface.CtrlState ^ General.Interface.AutoMerge; - DrawnVertex curp = DrawGeometryMode.GetCurrentPosition(mousemappos, snaptonearest, snaptogrid, snaptocardinaldirection, renderer, points); + DrawnVertex curp = DrawGeometryMode.GetCurrentPosition(mousemappos, snaptonearest, snaptogrid, snaptocardinaldirection, false, renderer, points); if (curp.pos.IsFinite()) curmousepos = curp.pos; // Get selected tag things @@ -897,7 +895,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { Thing t = things[i]; TextLabel tl = vertexnames[i]; - tl.Rectangle = new RectangleF(things[i].Position.x, things[i].Position.y, 0f, 0f); + tl.Location = things[i].Position; tl.Text = (i + 1).ToString(); renderer.RenderRectangleFilled(new RectangleF(t.Position.x - vsize, t.Position.y - vsize, vsize * 2.0f, vsize * 2.0f), color, true); renderer.RenderText(tl); @@ -908,7 +906,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { Thing t = things[0]; TextLabel tl = vertexnames[0]; - tl.Rectangle = new RectangleF(things[0].Position.x, things[0].Position.y, 0f, 0f); + tl.Location = things[0].Position; tl.Text = "1"; renderer.RenderRectangleFilled(new RectangleF(t.Position.x - vsize, t.Position.y - vsize, vsize * 2.0f, vsize * 2.0f), color, true); renderer.RenderText(tl); @@ -932,7 +930,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if (i >= 3) break; Vector2D v = points[i].pos; TextLabel tl = vertexnames[i]; - tl.Rectangle = new RectangleF(points[i].pos.x, points[i].pos.y, 0f, 0f); + tl.Location = points[i].pos; tl.Text = (i + 1).ToString(); renderer.RenderRectangleFilled(new RectangleF(v.x - vsize, v.y - vsize, vsize * 2.0f, vsize * 2.0f), color, true); renderer.RenderText(tl); @@ -953,7 +951,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if (i >= 3) break; Vector2D v = points[i].pos; TextLabel tl = vertexnames[i]; - tl.Rectangle = new RectangleF(points[i].pos.x, points[i].pos.y, 0f, 0f); + tl.Location = points[i].pos; tl.Text = (i + 1).ToString(); renderer.RenderRectangleFilled(new RectangleF(v.x - vsize, v.y - vsize, vsize * 2.0f, vsize * 2.0f), color, true); renderer.RenderText(tl); diff --git a/Source/Plugins/BuilderModes/ClassicModes/VerticesMode.cs b/Source/Plugins/BuilderModes/ClassicModes/VerticesMode.cs index 34263533fca02cb045a8cbb5b18fa75ac3659c5c..4c7e6c478911cef63c94572a72bbcf9a4e462da1 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/VerticesMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/VerticesMode.cs @@ -54,6 +54,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Interface private bool editpressed; + private bool selectionfromhighlight; //mxd #endregion @@ -92,10 +93,12 @@ namespace CodeImp.DoomBuilder.BuilderModes // Add toolbar buttons if(General.Map.UDMF) { + General.Interface.BeginToolbarUpdate(); //mxd General.Interface.AddButton(BuilderPlug.Me.MenusForm.CopyProperties); General.Interface.AddButton(BuilderPlug.Me.MenusForm.PasteProperties); General.Interface.AddButton(BuilderPlug.Me.MenusForm.PastePropertiesOptions); //mxd General.Interface.AddButton(BuilderPlug.Me.MenusForm.TextureOffsetLock, ToolbarSection.Geometry); //mxd + General.Interface.EndToolbarUpdate(); //mxd } General.Interface.AddButton(BuilderPlug.Me.MenusForm.PlaceThings); //JBR @@ -117,10 +120,12 @@ namespace CodeImp.DoomBuilder.BuilderModes // Remove toolbar buttons if(General.Map.UDMF) { + General.Interface.BeginToolbarUpdate(); General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.CopyProperties); General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PasteProperties); General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PastePropertiesOptions); //mxd General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.TextureOffsetLock); //mxd + General.Interface.EndToolbarUpdate(); } General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.PlaceThings); //JBR @@ -130,11 +135,11 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.ParallelLinedef); //JBR // Going to EditSelectionMode? - if (General.Editing.NewMode is EditSelectionMode) + EditSelectionMode mode = General.Editing.NewMode as EditSelectionMode; + if(mode != null) { // Not pasting anything? - EditSelectionMode editmode = (General.Editing.NewMode as EditSelectionMode); - if(!editmode.Pasting) + if(!mode.Pasting) { // No selection made? But we have a highlight! if((General.Map.Map.GetSelectedVertices(true).Count == 0) && (highlighted != null)) @@ -167,10 +172,10 @@ namespace CodeImp.DoomBuilder.BuilderModes // Render things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_HIDDEN_ALPHA); - renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_ALPHA); - renderer.RenderNiGHTSPath(); - renderer.Finish(); + renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha); + renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.ActiveThingsAlpha); + renderer.RenderNiGHTSPath(); + renderer.Finish(); } // Render selection @@ -280,12 +285,11 @@ namespace CodeImp.DoomBuilder.BuilderModes if(!highlighted.Selected && (BuilderPlug.Me.AutoClearSelection || (General.Map.Map.SelectedVerticessCount == 0))) { // Make this the only selection + selectionfromhighlight = true; //mxd General.Map.Map.ClearSelectedVertices(); highlighted.Selected = true; + UpdateSelectionInfo(); //mxd General.Interface.RedrawDisplay(); - - //mxd - General.Interface.DisplayStatus(StatusType.Selection, "1 vertex selected."); } // Update display @@ -364,7 +368,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { // Start drawing mode DrawGeometryMode drawmode = new DrawGeometryMode(); - DrawnVertex v = DrawGeometryMode.GetCurrentPosition(mousemappos, snaptonearest, snaptogrid, false, renderer, new List<DrawnVertex>()); + DrawnVertex v = DrawGeometryMode.GetCurrentPosition(mousemappos, snaptonearest, snaptogrid, false, false, renderer, new List<DrawnVertex>()); if(drawmode.DrawPointAt(v)) General.Editing.ChangeMode(drawmode); @@ -394,7 +398,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.OnEditFormValuesChanged -= vertexEditForm_OnValuesChanged; // When a single vertex was selected, deselect it now - if(selected.Count == 1) + if(selected.Count == 1 && selectionfromhighlight) { General.Map.Map.ClearSelectedVertices(); } @@ -402,14 +406,16 @@ namespace CodeImp.DoomBuilder.BuilderModes { foreach(Vertex v in selected) v.Selected = true; } + + // Update entire display + UpdateSelectionInfo(); //mxd General.Interface.RedrawDisplay(); } } - - UpdateSelectionInfo(); //mxd } editpressed = false; + selectionfromhighlight = false; //mxd base.OnEditEnd(); } @@ -595,7 +601,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Start dragging the selection if(!BuilderPlug.Me.DontMoveGeometryOutsideMapBoundary || CanDrag()) //mxd - General.Editing.ChangeMode(new DragVerticesMode(highlighted, mousedownmappos)); + General.Editing.ChangeMode(new DragVerticesMode(mousedownmappos)); } } } @@ -831,8 +837,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // This creates a new vertex at the mouse position [BeginAction("insertitem", BaseAction = true)] - public void InsertVertexAction() { VerticesMode.InsertVertex(mousemappos, renderer.Scale); } - public static void InsertVertex(Vector2D mousemappos, float rendererscale) + private void InsertVertex() { bool snaptogrid = General.Interface.ShiftState ^ General.Interface.SnapToGrid; bool snaptonearest = General.Interface.CtrlState ^ General.Interface.AutoMerge; @@ -846,7 +851,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Map.UndoRedo.CreateUndo("Insert vertex"); // Snap to geometry? - Linedef l = General.Map.Map.NearestLinedefRange(mousemappos, BuilderPlug.Me.SplitLinedefsRange / rendererscale); + Linedef l = General.Map.Map.NearestLinedefRange(mousemappos, BuilderPlug.Me.SplitLinedefsRange / renderer.Scale); if(snaptonearest && (l != null)) { // Snip to grid also? @@ -907,7 +912,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(snaptonearest) { //mxd. Check if snapped vertex is still on top of a linedef - l = General.Map.Map.NearestLinedefRange(v.Position, BuilderPlug.Me.SplitLinedefsRange / rendererscale); + l = General.Map.Map.NearestLinedefRange(v.Position, BuilderPlug.Me.SplitLinedefsRange / renderer.Scale); if(l != null) { @@ -1142,7 +1147,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } var form = new SelectSimilarElementOptionsPanel(); - if(form.Setup(this)) form.ShowDialog(); + if(form.Setup(this)) form.ShowDialog(General.Interface); } //JBR Perpendicular Vertex @@ -1307,7 +1312,7 @@ namespace CodeImp.DoomBuilder.BuilderModes dv2.stitch = true; dv1.pos = start; dv2.pos = end; - Tools.DrawLines(new List<DrawnVertex>() { dv1, dv2 }, false, false); + Tools.DrawLines(new List<DrawnVertex> { dv1, dv2 }, false, false); // Update cache values General.Map.Map.Update(); diff --git a/Source/Plugins/BuilderModes/ErrorChecks/CheckMapSize.cs b/Source/Plugins/BuilderModes/ErrorChecks/CheckMapSize.cs index c4670a2fc4127e263ee557a0c54dfcd1b302c8c5..06dd22f908c247f3caf540fd7c813af5c19e12e3 100644 --- a/Source/Plugins/BuilderModes/ErrorChecks/CheckMapSize.cs +++ b/Source/Plugins/BuilderModes/ErrorChecks/CheckMapSize.cs @@ -8,7 +8,8 @@ namespace CodeImp.DoomBuilder.BuilderModes.ErrorChecks public class CheckMapSize : ErrorChecker { private const int PROGRESS_STEP = 1000; - internal const int MAXIMUM_DISTANCE = 32767; + + public override bool SkipCheck { get { return General.Map.Config.SafeBoundary <= 0; } } // Constructor public CheckMapSize() @@ -48,7 +49,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ErrorChecks } // Map elements should not be more than 32767 mu apart - if(maxx - minx > MAXIMUM_DISTANCE || maxy - miny > MAXIMUM_DISTANCE) + if(maxx - minx > General.Map.Config.SafeBoundary || maxy - miny > General.Map.Config.SafeBoundary) { SubmitResult(new ResultMapTooBig(new Vector2D(minx, miny), new Vector2D(maxx, maxy))); } diff --git a/Source/Plugins/BuilderModes/ErrorChecks/CheckObsoleteThings.cs b/Source/Plugins/BuilderModes/ErrorChecks/CheckObsoleteThings.cs index 7b35bf7443183c32317ffbd58a4a9db4e72045e1..9259117b1b889392b27e70362783572459e33aff 100644 --- a/Source/Plugins/BuilderModes/ErrorChecks/CheckObsoleteThings.cs +++ b/Source/Plugins/BuilderModes/ErrorChecks/CheckObsoleteThings.cs @@ -17,6 +17,13 @@ namespace CodeImp.DoomBuilder.BuilderModes #endregion + #region ================== Properties + + // Only possible when the game configuration supports the use of decorate + public override bool SkipCheck { get { return string.IsNullOrEmpty(General.Map.Config.DecorateGames); } } + + #endregion + #region ================== Constructor / Destructor public CheckObsoleteThings() diff --git a/Source/Plugins/BuilderModes/ErrorChecks/CheckPolyobjects.cs b/Source/Plugins/BuilderModes/ErrorChecks/CheckPolyobjects.cs new file mode 100644 index 0000000000000000000000000000000000000000..8a34475b5e76333a847f041ebad3d9517b390b95 --- /dev/null +++ b/Source/Plugins/BuilderModes/ErrorChecks/CheckPolyobjects.cs @@ -0,0 +1,178 @@ +#region ================== Namespaces + +using System; +using System.Collections.Generic; +using CodeImp.DoomBuilder.Config; +using CodeImp.DoomBuilder.Map; +using System.Threading; + +#endregion + +namespace CodeImp.DoomBuilder.BuilderModes +{ + [ErrorChecker("Check polyobjects", true, 100)] + public class CheckPolyobjects : ErrorChecker + { + #region ================== Constants + + private const int PROGRESS_STEP = 1000; + + #endregion + + #region ================== Properties + + // Only possible in Hexen/UDMF map formats + public override bool SkipCheck { get { return (!General.Map.UDMF && !General.Map.HEXEN); } } + + #endregion + + #region ================== Constructor / Destructor + + public CheckPolyobjects() + { + // Total progress is somewhat done when all linedefs and things are checked + SetTotalProgress((General.Map.Map.Linedefs.Count + General.Map.Map.Things.Count) / PROGRESS_STEP); + } + + #endregion + + #region ================== Methods + + // This runs the check + public override void Run() + { + int progress = 0; + int stepprogress = 0; + const string Polyobj_StartLine = "Polyobj_StartLine"; + + // <Polyobj_Action, <Polyobj_number, Lines using this number>> + Dictionary<string, Dictionary<int, List<Linedef>>> polyobjlines = new Dictionary<string, Dictionary<int, List<Linedef>>>(); + + // All polyobject-related actions + HashSet<string> allactions = new HashSet<string>(StringComparer.OrdinalIgnoreCase) + { + Polyobj_StartLine, "Polyobj_RotateLeft", + "Polyobj_RotateRight", "Polyobj_Move", + "Polyobj_MoveTimes8", "Polyobj_DoorSwing", + "Polyobj_DoorSlide", "Polyobj_OR_MoveToSpot", + "Polyobj_MoveToSpot", "Polyobj_Stop", + "Polyobj_MoveTo", "Polyobj_OR_MoveTo", + "Polyobj_OR_RotateLeft", "Polyobj_OR_RotateRight", + "Polyobj_OR_Move", "Polyobj_OR_MoveTimes8" + }; + + Dictionary<int, List<Thing>> anchors = new Dictionary<int, List<Thing>>(); + Dictionary<int, List<Thing>> startspots = new Dictionary<int, List<Thing>>(); + + // Collect Linedefs... + foreach(Linedef l in General.Map.Map.Linedefs) + { + if(l.Action > 0 && General.Map.Config.LinedefActions.ContainsKey(l.Action) && allactions.Contains(General.Map.Config.LinedefActions[l.Action].Id)) + { + string id = General.Map.Config.LinedefActions[l.Action].Id; + + if(!polyobjlines.ContainsKey(id)) + polyobjlines.Add(id, new Dictionary<int, List<Linedef>>()); + + // Polyobj number is always the first arg + if(!polyobjlines[id].ContainsKey(l.Args[0])) + polyobjlines[id].Add(l.Args[0], new List<Linedef>()); + + polyobjlines[id][l.Args[0]].Add(l); + } + + UpdateProgress(ref progress, ref stepprogress); + } + + // Collect Things... + foreach(Thing t in General.Map.Map.Things) + { + ThingTypeInfo info = General.Map.Data.GetThingInfoEx(t.SRB2Type); + if(info == null) continue; + switch(info.ClassName.ToLowerInvariant()) + { + case "$polyanchor": + if(!anchors.ContainsKey(t.AngleDoom)) anchors.Add(t.AngleDoom, new List<Thing>()); + anchors[t.AngleDoom].Add(t); + break; + + case "$polyspawn": + case "$polyspawncrush": + case "$polyspawnhurt": + if(!startspots.ContainsKey(t.AngleDoom)) startspots.Add(t.AngleDoom, new List<Thing>()); + startspots[t.AngleDoom].Add(t); + break; + } + + UpdateProgress(ref progress, ref stepprogress); + } + + // Check Linedefs. These can connect 1 - multiple (except Polyobj_StartLine) + // Polyobject number is always arg0. + foreach(KeyValuePair<string, Dictionary<int, List<Linedef>>> group in polyobjlines) + { + foreach(KeyValuePair<int, List<Linedef>> linesbytype in group.Value) + { + if(!startspots.ContainsKey(linesbytype.Key)) + SubmitResult(new ResultInvalidPolyobjectLines(linesbytype.Value, "\"" + group.Key + "\" action targets non-existing Polyobject Start Spot (" + linesbytype.Key + ")")); + } + } + + // Check Linedefs with Polyobj_StartLine action. These must connect 1 - 1. + // Polyobject number is arg0, Mirror polyobject number is arg1 + if(polyobjlines.ContainsKey(Polyobj_StartLine)) + { + foreach(KeyValuePair<int, List<Linedef>> linesbytype in polyobjlines[Polyobj_StartLine]) + { + // Should be only one Polyobj_StartLine per Polyobject number + if(linesbytype.Value.Count > 1) + SubmitResult(new ResultInvalidPolyobjectLines(linesbytype.Value, "Several \"" + Polyobj_StartLine + "\" actions have the same Polyobject Number assigned (" + linesbytype.Key + "). They won't function correctly ingame.")); + + // Check if Mirror Polyobject Number exists + foreach(Linedef linedef in linesbytype.Value) + { + // The value of 0 can mean either "No mirror polyobj" or "Polyobj 0" here... + if(linedef.Args[1] > 0 && !startspots.ContainsKey(linedef.Args[1])) + SubmitResult(new ResultInvalidPolyobjectLines(new List<Linedef> { linedef }, "\"" + Polyobj_StartLine + "\" action have non-existing Mirror Polyobject Number assigned (" + linedef.Args[1] + "). It won't function correctly ingame.")); + } + } + } + + // Check Polyobject Anchors. These must connect 1 - 1. + foreach(KeyValuePair<int, List<Thing>> group in anchors) + { + if(!startspots.ContainsKey(group.Key)) + SubmitResult(new ResultInvalidPolyobjectThings(group.Value, "Polyobject " + (group.Value.Count > 1 ? "Anchors target" : "Anchor targets") + " non-existing Polyobject Start Spot (" + group.Key + ")")); + + if(group.Value.Count > 1) + SubmitResult(new ResultInvalidPolyobjectThings(group.Value, "Several Polyobject Anchors target the same Polyobject Start Spot (" + group.Key + "). They won't function correctly ingame.")); + } + + // Check Polyobject Start Spots. These must connect 1 - 1. + foreach(KeyValuePair<int, List<Thing>> group in startspots) + { + if(!anchors.ContainsKey(group.Key)) + SubmitResult(new ResultInvalidPolyobjectThings(group.Value, "Polyobject Start " + (group.Value.Count > 1 ? "Spots are not targeted" : "Spot " + group.Key + " is not targeted") + " by any Polyobject Anchor")); + + if(group.Value.Count > 1) + SubmitResult(new ResultInvalidPolyobjectThings(group.Value, "Several Polyobject Start Spots have the same Polyobject number (" + group.Key + "). They won't function correctly ingame.")); + } + } + + private void UpdateProgress(ref int progress, ref int stepprogress) + { + // Handle thread interruption + try { Thread.Sleep(0); } + catch(ThreadInterruptedException) { return; } + + // We are making progress! + if((++progress / PROGRESS_STEP) > stepprogress) + { + stepprogress = (progress / PROGRESS_STEP); + AddProgress(1); + } + } + + #endregion + } +} diff --git a/Source/Plugins/BuilderModes/ErrorChecks/CheckShortLinedefs.cs b/Source/Plugins/BuilderModes/ErrorChecks/CheckShortLinedefs.cs index faf77af335be633c2c77f0d2b2b7c9465d663482..54d4871a8f59bb57c879745e12b32541b2a8f23c 100644 --- a/Source/Plugins/BuilderModes/ErrorChecks/CheckShortLinedefs.cs +++ b/Source/Plugins/BuilderModes/ErrorChecks/CheckShortLinedefs.cs @@ -7,6 +7,9 @@ namespace CodeImp.DoomBuilder.BuilderModes public class CheckShortLinedefs : ErrorChecker { private const int PROGRESS_STEP = 1000; + + // Only possible in UDMF map format + public override bool SkipCheck { get { return !General.Map.UDMF; } } // Constructor public CheckShortLinedefs() diff --git a/Source/Plugins/BuilderModes/ErrorChecks/CheckUnknownActions.cs b/Source/Plugins/BuilderModes/ErrorChecks/CheckUnknownActions.cs new file mode 100644 index 0000000000000000000000000000000000000000..a4e40c88f1bf40aa18d8b33c18e8eb3057dcfb69 --- /dev/null +++ b/Source/Plugins/BuilderModes/ErrorChecks/CheckUnknownActions.cs @@ -0,0 +1,93 @@ +using System.Threading; +using CodeImp.DoomBuilder.Config; +using CodeImp.DoomBuilder.Map; + +namespace CodeImp.DoomBuilder.BuilderModes.ErrorChecks +{ + [ErrorChecker("Check unknown actions/effects", true, 50)] + public class CheckUnknownActions : ErrorChecker + { + private const int PROGRESS_STEP = 1000; + + // Constructor + public CheckUnknownActions() + { + int count = General.Map.Map.Sectors.Count + General.Map.Map.Linedefs.Count; + if(General.Map.FormatInterface.HasThingAction) count += General.Map.Map.Things.Count; + + // Total progress is done when all relevant map elements are checked + SetTotalProgress(count / PROGRESS_STEP); + } + + // This runs the check + public override void Run() + { + int progress = 0; + int stepprogress = 0; + + // Go for all Linedefs + foreach(Linedef l in General.Map.Map.Linedefs) + { + // Check action... + if(l.Action != 0 && !General.Map.Config.LinedefActions.ContainsKey(l.Action) + && !GameConfiguration.IsGeneralized(l.Action)) + { + SubmitResult(new ResultUnknownLinedefAction(l)); + } + + // Handle thread interruption + try { Thread.Sleep(0); } catch(ThreadInterruptedException) { return; } + + // We are making progress! + if((++progress / PROGRESS_STEP) > stepprogress) + { + stepprogress = (progress / PROGRESS_STEP); + AddProgress(1); + } + } + + // Go for all Sectors + foreach(Sector s in General.Map.Map.Sectors) + { + // Check action... + if(s.Effect != 0 && !General.Map.Config.SectorEffects.ContainsKey(s.Effect) + && !GameConfiguration.IsGeneralizedSectorEffect(s.Effect)) + { + SubmitResult(new ResultUnknownSectorEffect(s)); + } + + // Handle thread interruption + try { Thread.Sleep(0); } catch(ThreadInterruptedException) { return; } + + // We are making progress! + if((++progress / PROGRESS_STEP) > stepprogress) + { + stepprogress = (progress / PROGRESS_STEP); + AddProgress(1); + } + } + + // Go for all things? + if(!General.Map.FormatInterface.HasThingAction) return; + foreach(Thing t in General.Map.Map.Things) + { + // Check action... + if(t.Action != 0 && !General.Map.Config.LinedefActions.ContainsKey(t.Action) + && !GameConfiguration.IsGeneralized(t.Action)) + { + SubmitResult(new ResultUnknownThingAction(t)); + } + + // Handle thread interruption + try { Thread.Sleep(0); } catch(ThreadInterruptedException) { return; } + + // We are making progress! + if((++progress / PROGRESS_STEP) > stepprogress) + { + stepprogress = (progress / PROGRESS_STEP); + AddProgress(1); + } + } + } + } +} diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ErrorChecker.cs b/Source/Plugins/BuilderModes/ErrorChecks/ErrorChecker.cs index 65cd81d638825cd55bb2e9f42650257a7525ff1e..0827169045dac33300beff5590395af410e6ea7c 100644 --- a/Source/Plugins/BuilderModes/ErrorChecks/ErrorChecker.cs +++ b/Source/Plugins/BuilderModes/ErrorChecks/ErrorChecker.cs @@ -37,7 +37,8 @@ namespace CodeImp.DoomBuilder.BuilderModes #region ================== Properties public int TotalProgress { get { return totalprogress; } } - + public virtual bool SkipCheck { get { return false; } } //mxd + #endregion #region ================== Constructor / Destructor diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultInvalidPolyobjectLines.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultInvalidPolyobjectLines.cs new file mode 100644 index 0000000000000000000000000000000000000000..8759bc58a705aa714f77d6f68acc3e57ba1b01dd --- /dev/null +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultInvalidPolyobjectLines.cs @@ -0,0 +1,94 @@ +#region ================== Namespaces + +using System; +using System.Collections.Generic; +using CodeImp.DoomBuilder.Map; +using CodeImp.DoomBuilder.Rendering; + +#endregion + +namespace CodeImp.DoomBuilder.BuilderModes +{ + public class ResultInvalidPolyobjectLines : ErrorResult + { + #region ================== Variables + + private readonly List<Linedef> lines; + private readonly string linesinfo; + + #endregion + + #region ================== Properties + + public override int Buttons { get { return 0; } } + + #endregion + + #region ================== Constructor / Destructor + + public ResultInvalidPolyobjectLines(List<Linedef> lines, string details) + { + // Initialize + this.lines = lines; + this.hidden = true; + foreach(Linedef l in lines) + { + this.viewobjects.Add(l); + this.hidden &= l.IgnoredErrorChecks.Contains(this.GetType()); + } + + if(lines.Count == 1) + { + linesinfo = "Incorrect Polyobject setup for linedef " + lines[0].Index; + } + else + { + linesinfo = "Incorrect Polyobject setup for linedefs " + lines[0].Index; + for(int i = 1; i < lines.Count - 1; i++) linesinfo += ", " + lines[i].Index; + linesinfo += " and " + lines[lines.Count - 1].Index; + } + + this.description = linesinfo + ": " + details; + } + + #endregion + + #region ================== Methods + + // This sets if this result is displayed in ErrorCheckForm (mxd) + internal override void Hide(bool hide) + { + hidden = hide; + Type t = this.GetType(); + if(hide) + { + foreach(Linedef l in lines) + l.IgnoredErrorChecks.Add(t); + } + else + { + foreach(Linedef l in lines) + if(l.IgnoredErrorChecks.Contains(t)) l.IgnoredErrorChecks.Remove(t); + } + } + + // This must return the string that is displayed in the listbox + public override string ToString() + { + return linesinfo; + } + + // Rendering + public override void PlotSelection(IRenderer2D renderer) + { + foreach(Linedef l in lines) + { + renderer.PlotLinedef(l, General.Colors.Selection); + renderer.PlotVertex(l.Start, ColorCollection.VERTICES); + renderer.PlotVertex(l.End, ColorCollection.VERTICES); + } + } + + #endregion + } +} diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultInvalidPolyobjectThings.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultInvalidPolyobjectThings.cs new file mode 100644 index 0000000000000000000000000000000000000000..80a25f109896740e699ec547f30dc5af2d86a5ee --- /dev/null +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultInvalidPolyobjectThings.cs @@ -0,0 +1,89 @@ +#region ================== Namespaces + +using System; +using System.Collections.Generic; +using CodeImp.DoomBuilder.Map; +using CodeImp.DoomBuilder.Rendering; + +#endregion + +namespace CodeImp.DoomBuilder.BuilderModes +{ + public class ResultInvalidPolyobjectThings : ErrorResult + { + #region ================== Variables + + private readonly List<Thing> things; + private readonly string thingsinfo; + + #endregion + + #region ================== Properties + + public override int Buttons { get { return 0; } } + + #endregion + + #region ================== Constructor / Destructor + + public ResultInvalidPolyobjectThings(List<Thing> things, string details) + { + // Initialize + this.things = things; + this.hidden = true; + foreach(Thing t in things) + { + this.viewobjects.Add(t); + this.hidden &= t.IgnoredErrorChecks.Contains(this.GetType()); + } + + if(things.Count == 1) + { + thingsinfo = "Incorrect Polyobject setup for thing " + things[0].Index; + } + else + { + thingsinfo = "Incorrect Polyobject setup for things " + things[0].Index; + for(int i = 1; i < things.Count - 1; i++) thingsinfo += ", " + things[i].Index; + thingsinfo += " and " + things[things.Count - 1].Index; + } + + this.description = thingsinfo + ": " + details; + } + + #endregion + + #region ================== Methods + + // This sets if this result is displayed in ErrorCheckForm (mxd) + internal override void Hide(bool hide) + { + hidden = hide; + Type t = this.GetType(); + if(hide) + { + foreach(Thing thing in things) thing.IgnoredErrorChecks.Add(t); + } + else + { + foreach(Thing thing in things) + if(thing.IgnoredErrorChecks.Contains(t)) thing.IgnoredErrorChecks.Remove(t); + } + } + + // This must return the string that is displayed in the listbox + public override string ToString() + { + return thingsinfo; + } + + // Rendering + public override void RenderOverlaySelection(IRenderer2D renderer) + { + foreach(Thing thing in things) + renderer.RenderThing(thing, General.Colors.Selection, General.Settings.ActiveThingsAlpha); + } + + #endregion + } +} diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultLineMissingFront.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultLineMissingFront.cs index da966d08227640e908546cb1cc0d08e6596750f6..7e34d08886144e046addb61d59a276153832b885 100644 --- a/Source/Plugins/BuilderModes/ErrorChecks/ResultLineMissingFront.cs +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultLineMissingFront.cs @@ -123,6 +123,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Fix by flipping linedefs public override bool Button1Click(bool batchMode) { + line.FlipVertices(); //mxd. Otherwise FlipSidedefs() will destroy the sector back side belongs to line.FlipSidedefs(); General.Map.Map.Update(); return true; diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultMapTooBig.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultMapTooBig.cs index eb7fdaa7cd0309d09d0ebb58d6603f77275e1551..f0a0a81f14b918baa67a00b0c6e85b99128c9afd 100644 --- a/Source/Plugins/BuilderModes/ErrorChecks/ResultMapTooBig.cs +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultMapTooBig.cs @@ -31,8 +31,8 @@ namespace CodeImp.DoomBuilder.BuilderModes.ErrorChecks // Initialize this.min = min; this.max = max; - this.toowide = max.x - min.x > CheckMapSize.MAXIMUM_DISTANCE; - this.toohigh = max.y - min.y > CheckMapSize.MAXIMUM_DISTANCE; + this.toowide = max.x - min.x > General.Map.Config.SafeBoundary; + this.toohigh = max.y - min.y > General.Map.Config.SafeBoundary; description = "Map is too big."; } @@ -55,9 +55,9 @@ namespace CodeImp.DoomBuilder.BuilderModes.ErrorChecks // This must return the string that is displayed in the listbox public override string ToString() { - if(toowide && toohigh) return "Map's width and height is bigger than " + CheckMapSize.MAXIMUM_DISTANCE + " m.u. This can cause rendering and physics issues."; - if(toowide) return "Map is wider than than " + CheckMapSize.MAXIMUM_DISTANCE + " m.u. This can cause rendering and physics issues."; - return "Map is taller than " + CheckMapSize.MAXIMUM_DISTANCE + " m.u. This can cause rendering and physics issues."; + if(toowide && toohigh) return "Map's width and height is bigger than " + General.Map.Config.SafeBoundary + " m.u. This can cause rendering and physics issues."; + if(toowide) return "Map is wider than " + General.Map.Config.SafeBoundary + " m.u. This can cause rendering and physics issues."; + return "Map is taller than " + General.Map.Config.SafeBoundary + " m.u. This can cause rendering and physics issues."; } #endregion diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultMissingFlat.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultMissingFlat.cs index 0f1a70afcc01cf8548880f242b0aafa8df350900..475a2acce65b1b27216ade72469f7b75a74246ee 100644 --- a/Source/Plugins/BuilderModes/ErrorChecks/ResultMissingFlat.cs +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultMissingFlat.cs @@ -71,7 +71,7 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. More rendering public override void RenderOverlaySelection(IRenderer2D renderer) { - if(!BuilderPlug.Me.UseHighlight) return; + if(!General.Settings.UseHighlight) return; renderer.RenderHighlight(sector.FlatVertices, General.Colors.Selection.WithAlpha(64).ToInt()); } diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultObsoleteThing.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultObsoleteThing.cs index f94cd6672f8a015e7ca80c92e9c7c55df0ae1aaa..1ab118e312ae09a710ee44a227c192ef286e2e2d 100644 --- a/Source/Plugins/BuilderModes/ErrorChecks/ResultObsoleteThing.cs +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultObsoleteThing.cs @@ -60,7 +60,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Rendering public override void RenderOverlaySelection(IRenderer2D renderer) { - renderer.RenderThing(thing, General.Colors.Selection, Presentation.THINGS_ALPHA); + renderer.RenderThing(thing, General.Colors.Selection, General.Settings.ActiveThingsAlpha); } // This removes the thing diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultSectorInvalid.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultSectorInvalid.cs index 02a745a411fbf832c914e7e9d44b83c24762170f..ec6b4021a37ce114f72eaf263033ec5f3816e442 100644 --- a/Source/Plugins/BuilderModes/ErrorChecks/ResultSectorInvalid.cs +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultSectorInvalid.cs @@ -100,7 +100,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(!merged) { - List<Linedef> sectorlines = new List<Linedef>(sector.Sidedefs.Count); + HashSet<Linedef> sectorlines = new HashSet<Linedef>(); foreach(Sidedef side in sector.Sidedefs) sectorlines.Add(side.Line); if(sectorlines.Count > 0) diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultShortLinedef.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultShortLinedef.cs index 944792c3d69787532d5e8d824e92349a9d994e28..605b4d454fb10adbba1fa5538788a0e5f56b5f5d 100644 --- a/Source/Plugins/BuilderModes/ErrorChecks/ResultShortLinedef.cs +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultShortLinedef.cs @@ -1,6 +1,7 @@ #region ================== Namespaces using System; +using System.Drawing; using CodeImp.DoomBuilder.Map; using CodeImp.DoomBuilder.Rendering; @@ -50,7 +51,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // This must return the string that is displayed in the listbox public override string ToString() { - return "Linedef " + line.Index + " is shorter than 1 m.u."; + return "Linedef " + line.Index + " is shorter than 1 mu."; } // Rendering @@ -60,6 +61,19 @@ namespace CodeImp.DoomBuilder.BuilderModes renderer.PlotVertex(line.Start, ColorCollection.VERTICES); renderer.PlotVertex(line.End, ColorCollection.VERTICES); } + + // We must zoom in way more than usual... + public override RectangleF GetZoomArea() + { + // Get Area + RectangleF area = base.GetZoomArea(); + + // Remove padding + area.Inflate(-97f, -97f); + + // Return area + return area; + } #endregion } diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultStuckThingInLine.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultStuckThingInLine.cs index 363a94f74cf892b544cedaa79e0fc9a2b96ce499..411c1e0edf79fc6f5338ac67d891ba99c24a92f4 100644 --- a/Source/Plugins/BuilderModes/ErrorChecks/ResultStuckThingInLine.cs +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultStuckThingInLine.cs @@ -75,7 +75,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Rendering public override void RenderOverlaySelection(IRenderer2D renderer) { - renderer.RenderThing(thing, General.Colors.Selection, Presentation.THINGS_ALPHA); + renderer.RenderThing(thing, General.Colors.Selection, General.Settings.ActiveThingsAlpha); } // mxd. More rencering diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultStuckThingInThing.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultStuckThingInThing.cs index e2350ac949ae44cab001b9a574f697ec92f02e40..698772c64186e90d2f9e2b3a5fd5a19aa60841ed 100644 --- a/Source/Plugins/BuilderModes/ErrorChecks/ResultStuckThingInThing.cs +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultStuckThingInThing.cs @@ -84,8 +84,8 @@ namespace CodeImp.DoomBuilder.BuilderModes // Rendering public override void RenderOverlaySelection(IRenderer2D renderer) { - renderer.RenderThing(thing1, General.Colors.Selection, Presentation.THINGS_ALPHA); - renderer.RenderThing(thing2, General.Colors.Selection, Presentation.THINGS_ALPHA); + renderer.RenderThing(thing1, General.Colors.Selection, General.Settings.ActiveThingsAlpha); + renderer.RenderThing(thing2, General.Colors.Selection, General.Settings.ActiveThingsAlpha); } // This removes the first thing diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultThingOutside.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultThingOutside.cs index c00cf5846fff2b71cb06a4bece1892802eeb2f9f..760b1cc74a3135665a0969d4aab17059d4a24125 100644 --- a/Source/Plugins/BuilderModes/ErrorChecks/ResultThingOutside.cs +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultThingOutside.cs @@ -73,7 +73,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Rendering public override void RenderOverlaySelection(IRenderer2D renderer) { - renderer.RenderThing(thing, General.Colors.Selection, Presentation.THINGS_ALPHA); + renderer.RenderThing(thing, General.Colors.Selection, General.Settings.ActiveThingsAlpha); } // This removes the thing diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultUnknownFlat.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultUnknownFlat.cs index ad772c836cf7f704c9b3985ba6f0d14af11e35d1..9476d73c8acaf31383c40e5eb1e365a5e7108720 100644 --- a/Source/Plugins/BuilderModes/ErrorChecks/ResultUnknownFlat.cs +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultUnknownFlat.cs @@ -90,7 +90,7 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. More rendering public override void RenderOverlaySelection(IRenderer2D renderer) { - if(!BuilderPlug.Me.UseHighlight) return; + if(!General.Settings.UseHighlight) return; renderer.RenderHighlight(sector.FlatVertices, General.Colors.Selection.WithAlpha(64).ToInt()); } diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultUnknownLinedefAction.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultUnknownLinedefAction.cs new file mode 100644 index 0000000000000000000000000000000000000000..71a3de368db4804a8794a0b01664d6b776a09c5a --- /dev/null +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultUnknownLinedefAction.cs @@ -0,0 +1,86 @@ +#region ================== Namespaces + +using System; +using CodeImp.DoomBuilder.Map; +using CodeImp.DoomBuilder.Rendering; + +#endregion + +namespace CodeImp.DoomBuilder.BuilderModes +{ + public class ResultUnknownLinedefAction : ErrorResult + { + #region ================== Variables + + private readonly Linedef line; + + #endregion + + #region ================== Properties + + public override int Buttons { get { return 2; } } + public override string Button1Text { get { return "Remove Action"; } } + public override string Button2Text { get { return "Browse Action..."; } } //mxd + + #endregion + + #region ================== Constructor / Destructor + + // Constructor + public ResultUnknownLinedefAction(Linedef l) + { + // Initialize + line = l; + viewobjects.Add(l); + hidden = l.IgnoredErrorChecks.Contains(this.GetType()); //mxd + description = "This linedef uses unknown action. This can potentially cause gameplay issues."; + } + + #endregion + + #region ================== Methods + + // This sets if this result is displayed in ErrorCheckForm (mxd) + internal override void Hide(bool hide) + { + hidden = hide; + Type t = this.GetType(); + if(hide) line.IgnoredErrorChecks.Add(t); + else if(line.IgnoredErrorChecks.Contains(t)) line.IgnoredErrorChecks.Remove(t); + } + + // This must return the string that is displayed in the listbox + public override string ToString() + { + return "Linedef " + line.Index + " uses unknown action " + line.Action; + } + + // Rendering + public override void PlotSelection(IRenderer2D renderer) + { + renderer.PlotLinedef(line, General.Colors.Selection); + renderer.PlotVertex(line.Start, ColorCollection.VERTICES); + renderer.PlotVertex(line.End, ColorCollection.VERTICES); + } + + // Fix by removing action + public override bool Button1Click(bool batchmode) + { + if(!batchmode) General.Map.UndoRedo.CreateUndo("Unknown linedef action removal"); + line.Action = 0; + General.Map.Map.Update(); + return true; + } + + // Fix by picking action + public override bool Button2Click(bool batchmode) + { + if(!batchmode) General.Map.UndoRedo.CreateUndo("Unknown linedef action correction"); + line.Action = General.Interface.BrowseLinedefActions(BuilderPlug.Me.ErrorCheckForm, line.Action); + General.Map.Map.Update(); + return true; + } + + #endregion + } +} diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultUnknownSectorEffect.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultUnknownSectorEffect.cs new file mode 100644 index 0000000000000000000000000000000000000000..7128cc4a35d3c1c5e2f7456a87f2c05df6fd417e --- /dev/null +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultUnknownSectorEffect.cs @@ -0,0 +1,84 @@ +#region ================== Namespaces + +using System; +using CodeImp.DoomBuilder.Map; +using CodeImp.DoomBuilder.Rendering; + +#endregion + +namespace CodeImp.DoomBuilder.BuilderModes +{ + public class ResultUnknownSectorEffect : ErrorResult + { + #region ================== Variables + + private readonly Sector sector; + + #endregion + + #region ================== Properties + + public override int Buttons { get { return 2; } } + public override string Button1Text { get { return "Remove Effect"; } } + public override string Button2Text { get { return "Browse Effect..."; } } //mxd + + #endregion + + #region ================== Constructor + + // Constructor + public ResultUnknownSectorEffect(Sector s) + { + // Initialize + sector = s; + viewobjects.Add(s); + hidden = s.IgnoredErrorChecks.Contains(this.GetType()); //mxd + description = "This sector uses unknown effect. This can potentially cause gameplay issues."; + } + + #endregion + + #region ================== Methods + + // This sets if this result is displayed in ErrorCheckForm (mxd) + internal override void Hide(bool hide) + { + hidden = hide; + Type t = this.GetType(); + if(hide) sector.IgnoredErrorChecks.Add(t); + else if(sector.IgnoredErrorChecks.Contains(t)) sector.IgnoredErrorChecks.Remove(t); + } + + // This must return the string that is displayed in the listbox + public override string ToString() + { + return "Sector " + sector.Index + " uses unknown effect " + sector.Effect; + } + + // Rendering + public override void PlotSelection(IRenderer2D renderer) + { + renderer.PlotSector(sector, General.Colors.Selection); + } + + // Fix by removing effect + public override bool Button1Click(bool batchmode) + { + if(!batchmode) General.Map.UndoRedo.CreateUndo("Unknown sector effect removal"); + sector.Effect = 0; + General.Map.Map.Update(); + return true; + } + + // Fix by picking effect + public override bool Button2Click(bool batchmode) + { + if(!batchmode) General.Map.UndoRedo.CreateUndo("Unknown sector effect correction"); + sector.Effect = General.Interface.BrowseSectorEffect(BuilderPlug.Me.ErrorCheckForm, sector.Effect); + General.Map.Map.Update(); + return true; + } + + #endregion + } +} diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultUnknownThing.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultUnknownThing.cs index b25806adcf08d9ea68c7b31040a121d7e80b594c..0fd671201808cfc5c2f1cf017c63a36a117a1411 100644 --- a/Source/Plugins/BuilderModes/ErrorChecks/ResultUnknownThing.cs +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultUnknownThing.cs @@ -57,7 +57,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Rendering public override void RenderOverlaySelection(IRenderer2D renderer) { - renderer.RenderThing(thing, General.Colors.Selection, Presentation.THINGS_ALPHA); + renderer.RenderThing(thing, General.Colors.Selection, General.Settings.ActiveThingsAlpha); } // This removes the thing diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultUnknownThingAction.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultUnknownThingAction.cs new file mode 100644 index 0000000000000000000000000000000000000000..a26cc64fad0c88889e1da1b87e892d79649babc9 --- /dev/null +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultUnknownThingAction.cs @@ -0,0 +1,84 @@ +#region ================== Namespaces + +using System; +using CodeImp.DoomBuilder.Map; +using CodeImp.DoomBuilder.Rendering; + +#endregion + +namespace CodeImp.DoomBuilder.BuilderModes +{ + public class ResultUnknownThingAction : ErrorResult + { + #region ================== Variables + + private readonly Thing thing; + + #endregion + + #region ================== Properties + + public override int Buttons { get { return 2; } } + public override string Button1Text { get { return "Remove Action"; } } + public override string Button2Text { get { return "Browse Action..."; } } //mxd + + #endregion + + #region ================== Constructor / Destructor + + // Constructor + public ResultUnknownThingAction(Thing t) + { + // Initialize + thing = t; + viewobjects.Add(t); + hidden = t.IgnoredErrorChecks.Contains(this.GetType()); //mxd + description = "This thing uses unknown action. This can potentially cause gameplay issues."; + } + + #endregion + + #region ================== Methods + + // This sets if this result is displayed in ErrorCheckForm (mxd) + internal override void Hide(bool hide) + { + hidden = hide; + Type t = this.GetType(); + if(hide) thing.IgnoredErrorChecks.Add(t); + else if(thing.IgnoredErrorChecks.Contains(t)) thing.IgnoredErrorChecks.Remove(t); + } + + // This must return the string that is displayed in the listbox + public override string ToString() + { + return "Thing " + thing.Index + " uses unknown action " + thing.Action; + } + + // Rendering + public override void RenderOverlaySelection(IRenderer2D renderer) + { + renderer.RenderThing(thing, General.Colors.Selection, General.Settings.ActiveThingsAlpha); + } + + // Fix by removing action + public override bool Button1Click(bool batchmode) + { + if(!batchmode) General.Map.UndoRedo.CreateUndo("Unknown thing action removal"); + thing.Action = 0; + General.Map.Map.Update(); + return true; + } + + // Fix by picking action + public override bool Button2Click(bool batchmode) + { + if(!batchmode) General.Map.UndoRedo.CreateUndo("Unknown thing action correction"); + thing.Action = General.Interface.BrowseLinedefActions(BuilderPlug.Me.ErrorCheckForm, thing.Action); + General.Map.Map.Update(); + return true; + } + + #endregion + } +} diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultUnusedThing.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultUnusedThing.cs index 731ce0c5bb8b5e3014af3f4d8d7e76b22b8ca7d7..864f90167a6bf8065bd059de4731878126cb0673 100644 --- a/Source/Plugins/BuilderModes/ErrorChecks/ResultUnusedThing.cs +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultUnusedThing.cs @@ -59,7 +59,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Rendering public override void RenderOverlaySelection(IRenderer2D renderer) { - renderer.RenderThing(thing, General.Colors.Selection, Presentation.THINGS_ALPHA); + renderer.RenderThing(thing, General.Colors.Selection, General.Settings.ActiveThingsAlpha); } // This removes the thing diff --git a/Source/Plugins/BuilderModes/ErrorChecks/ResultVertexOverlappingLine.cs b/Source/Plugins/BuilderModes/ErrorChecks/ResultVertexOverlappingLine.cs index a4ded61318622334d1a7593ff8c2590d94846bb7..f68653240dd367780cb00d03926512b7958a0d6a 100644 --- a/Source/Plugins/BuilderModes/ErrorChecks/ResultVertexOverlappingLine.cs +++ b/Source/Plugins/BuilderModes/ErrorChecks/ResultVertexOverlappingLine.cs @@ -93,6 +93,10 @@ namespace CodeImp.DoomBuilder.BuilderModes (lines[i].Start == lines[c].End && lines[i].End == lines[c].Start)) { lines[c].Join(lines[i]); + + //mxd. Textures may've become unused + if(lines[c].Front != null) lines[c].Front.RemoveUnneededTextures(lines[c].Back != null, false, true); + if(lines[c].Back != null) lines[c].Back.RemoveUnneededTextures(lines[c].Front != null, false, true); } } } diff --git a/Source/Plugins/BuilderModes/FindReplace/BaseFindSector.cs b/Source/Plugins/BuilderModes/FindReplace/BaseFindSector.cs index 429da4df430520b64f66454d04d4d2aa14fac5cf..91ecf3923c6ac1f6f5fcb1cfbebfd12d5fdcc19b 100644 --- a/Source/Plugins/BuilderModes/FindReplace/BaseFindSector.cs +++ b/Source/Plugins/BuilderModes/FindReplace/BaseFindSector.cs @@ -43,7 +43,7 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Render selection highlight public override void RenderOverlaySelection(IRenderer2D renderer, FindReplaceObject[] selection) { - if(!BuilderPlug.Me.UseHighlight) return; + if(!General.Settings.UseHighlight) return; int color = General.Colors.Selection.WithAlpha(64).ToInt(); foreach(FindReplaceObject o in selection) diff --git a/Source/Plugins/BuilderModes/FindReplace/BaseFindThing.cs b/Source/Plugins/BuilderModes/FindReplace/BaseFindThing.cs index 18eebf2a3d227df1ea2a21984c9c7c1c251756dd..6cd004aa013ee11bc8fea4e19940549975ad0261 100644 --- a/Source/Plugins/BuilderModes/FindReplace/BaseFindThing.cs +++ b/Source/Plugins/BuilderModes/FindReplace/BaseFindThing.cs @@ -34,7 +34,7 @@ namespace CodeImp.DoomBuilder.BuilderModes public override void RenderThingsSelection(IRenderer2D renderer, FindReplaceObject[] selection) { foreach(FindReplaceObject o in selection) - renderer.RenderThing(o.Thing, General.Colors.Selection, Presentation.THINGS_ALPHA); + renderer.RenderThing(o.Thing, General.Colors.Selection, General.Settings.ActiveThingsAlpha); } // Edit objects diff --git a/Source/Plugins/BuilderModes/FindReplace/FindAnyTextureFlat.cs b/Source/Plugins/BuilderModes/FindReplace/FindAnyTextureFlat.cs index effddefc05960927f0c1c26cb24dfdf9ca7b3c63..64c5e9f59ce55011989738a3192cbab47335d7f3 100644 --- a/Source/Plugins/BuilderModes/FindReplace/FindAnyTextureFlat.cs +++ b/Source/Plugins/BuilderModes/FindReplace/FindAnyTextureFlat.cs @@ -198,7 +198,7 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd public override void RenderOverlaySelection(IRenderer2D renderer, FindReplaceObject[] selection) { - if(!BuilderPlug.Me.UseHighlight) return; + if(!General.Settings.UseHighlight) return; int color = General.Colors.Selection.WithAlpha(64).ToInt(); foreach(FindReplaceObject o in selection) diff --git a/Source/Plugins/BuilderModes/FindReplace/FindLinedefFlags.cs b/Source/Plugins/BuilderModes/FindReplace/FindLinedefFlags.cs index 224ee01ae6cb5f1c6b0b22dbd92bfd28c104d82d..bf9d52ee595396249422c64458d489cba16bbcd4 100644 --- a/Source/Plugins/BuilderModes/FindReplace/FindLinedefFlags.cs +++ b/Source/Plugins/BuilderModes/FindReplace/FindLinedefFlags.cs @@ -54,7 +54,11 @@ namespace CodeImp.DoomBuilder.BuilderModes // This is called when the browse button is pressed public override string Browse(string initialvalue) { - return FlagsForm.ShowDialog(Form.ActiveForm, initialvalue, General.Map.Config.LinedefFlags); + //mxd. Combine regular and activation flags + Dictionary<string, string> flags = new Dictionary<string, string>(General.Map.Config.LinedefFlags); + foreach(LinedefActivateInfo ai in General.Map.Config.LinedefActivates) flags.Add(ai.Key, ai.Title); + + return FlagsForm.ShowDialog(Form.ActiveForm, initialvalue, flags); } // This is called to perform a search (and replace) @@ -68,11 +72,18 @@ namespace CodeImp.DoomBuilder.BuilderModes ICollection<Linedef> list = withinselection ? General.Map.Map.GetSelectedLinedefs(true) : General.Map.Map.Linedefs; // Find what? (mxd) - List<string> findflagslist = new List<string>(); + Dictionary<string, bool> findflagslist = new Dictionary<string, bool>(); foreach(string flag in value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)) { string f = flag.Trim(); - if(General.Map.Config.LinedefFlags.ContainsKey(f)) findflagslist.Add(f); + bool setflag = true; + if(f.StartsWith("!")) + { + setflag = false; + f = f.Substring(1, f.Length - 1); + } + + if(General.Map.Config.LinedefFlags.ContainsKey(f)) findflagslist.Add(f, setflag); } if(findflagslist.Count == 0) { @@ -81,19 +92,26 @@ namespace CodeImp.DoomBuilder.BuilderModes } // Replace with what? (mxd) - List<string> replaceflagslist = new List<string>(); + Dictionary<string, bool> replaceflagslist = new Dictionary<string, bool>(); if(replace) { string[] replaceflags = replacewith.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach(string flag in replaceflags) { string f = flag.Trim(); + bool setflag = true; + if(f.StartsWith("!")) + { + setflag = false; + f = f.Substring(1, f.Length - 1); + } + if(!General.Map.Config.LinedefFlags.ContainsKey(f)) { MessageBox.Show("Invalid replace value \"" + f + "\" for this search type!", "Find and Replace", MessageBoxButtons.OK, MessageBoxIcon.Error); return objs.ToArray(); } - replaceflagslist.Add(f); + replaceflagslist.Add(f, setflag); } } @@ -103,10 +121,10 @@ namespace CodeImp.DoomBuilder.BuilderModes bool match = true; // Parse the value string... - foreach(string flag in findflagslist) + foreach(KeyValuePair<string, bool> group in findflagslist) { - // ... and check if the flags don't match - if(!l.IsFlagSet(flag)) + // ...and check if the flag doesn't match + if(group.Value != l.IsFlagSet(group.Key)) { match = false; break; @@ -119,11 +137,8 @@ namespace CodeImp.DoomBuilder.BuilderModes // Replace flags (mxd) if(replace) { - // Clear all flags - l.ClearFlags(); - // Set new flags - foreach(string flag in replaceflagslist) l.SetFlag(flag, true); + foreach(KeyValuePair<string, bool> group in replaceflagslist) l.SetFlag(group.Key, group.Value); } // Add to list diff --git a/Source/Plugins/BuilderModes/FindReplace/FindLinedefTags.cs b/Source/Plugins/BuilderModes/FindReplace/FindLinedefTags.cs index f1f28c608484badb0879ae94153904210956443c..5945193ba1993abdd8d4150fec0ba25ddf0bc646 100644 --- a/Source/Plugins/BuilderModes/FindReplace/FindLinedefTags.cs +++ b/Source/Plugins/BuilderModes/FindReplace/FindLinedefTags.cs @@ -129,8 +129,10 @@ namespace CodeImp.DoomBuilder.BuilderModes // Replace if(replace) { - l.Tags[index] = replacetag; //mxd - l.Tags = l.Tags.Distinct().ToList(); //mxd. We don't want duplicates + //mxd. Make a copy of tags, otherwise BeforePropsChange will be triggered after tag changes + List<int> tags = new List<int>(l.Tags); + tags[index] = replacetag; + l.Tags = tags.Distinct().ToList(); // We don't want duplicates } // Add to list diff --git a/Source/Plugins/BuilderModes/FindReplace/FindLinedefTypes.cs b/Source/Plugins/BuilderModes/FindReplace/FindLinedefTypes.cs index 27ebc3874d0189b54100bf49ac863891f305c4fc..7a87f3868868e57e23dea6e26fb1d63bbff607b3 100644 --- a/Source/Plugins/BuilderModes/FindReplace/FindLinedefTypes.cs +++ b/Source/Plugins/BuilderModes/FindReplace/FindLinedefTypes.cs @@ -183,7 +183,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(args != null) { int x = 0; - argtext = " args: ("; + argtext = ". Args: "; //mxd. Check script name... if(!string.IsNullOrEmpty(arg0str)) @@ -204,9 +204,39 @@ namespace CodeImp.DoomBuilder.BuilderModes match = false; break; } - argtext += (x == 0 ? "" : ",") + l.Args[x]; + argtext += (x == 0 ? "" : ", ") + l.Args[x]; + } + } + //mxd. Add action args + else + { + List<string> argslist = new List<string>(); + + // Process args, drop trailing zeroes + for(int i = l.Args.Length - 1; i > -1; i--) + { + if(l.Args[i] == 0 && argslist.Count == 0) continue; // Skip tail zeroes + argslist.Insert(0, l.Args[i].ToString()); + } + + // Process arg0str... + if(Array.IndexOf(GZGeneral.ACS_SPECIALS, l.Action) != -1) + { + string s = l.Fields.GetValue("arg0str", string.Empty); + if(!string.IsNullOrEmpty(s)) + { + if(argslist.Count > 0) + argslist[0] = "\"" + s + "\""; + else + argslist.Add("\"" + s + "\""); + } + } + + // Create args string + if(argslist.Count > 0) + { + argtext = ". Args: " + string.Join(", ", argslist.ToArray()); } - argtext += ")"; } if(match) @@ -236,9 +266,9 @@ namespace CodeImp.DoomBuilder.BuilderModes // Add to list LinedefActionInfo info = General.Map.Config.GetLinedefActionInfo(l.Action); if(!info.IsNull) - objs.Add(new FindReplaceObject(l, "Linedef " + l.Index + " (" + info.Title + ")" + argtext)); + objs.Add(new FindReplaceObject(l, "Linedef " + l.Index + " (" + info.Title + argtext + ")")); else - objs.Add(new FindReplaceObject(l, "Linedef " + l.Index + argtext)); + objs.Add(new FindReplaceObject(l, "Linedef " + l.Index + " (Action " + l.Action + argtext + ")")); } } } diff --git a/Source/Plugins/BuilderModes/FindReplace/FindReplaceObject.cs b/Source/Plugins/BuilderModes/FindReplace/FindReplaceObject.cs index 5a363d54d223e38d23eefd502c279201a4d666ab..929586a9cc4d77df8089c19e4e791cd99f93b4a6 100644 --- a/Source/Plugins/BuilderModes/FindReplace/FindReplaceObject.cs +++ b/Source/Plugins/BuilderModes/FindReplace/FindReplaceObject.cs @@ -70,21 +70,21 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(obj is Vertex) { - points.Add((obj as Vertex).Position); + points.Add(((Vertex)obj).Position); } else if(obj is Linedef) { - points.Add((obj as Linedef).Start.Position); - points.Add((obj as Linedef).End.Position); + points.Add(((Linedef)obj).Start.Position); + points.Add(((Linedef)obj).End.Position); } else if(obj is Sidedef) { - points.Add((obj as Sidedef).Line.Start.Position); - points.Add((obj as Sidedef).Line.End.Position); + points.Add(((Sidedef)obj).Line.Start.Position); + points.Add(((Sidedef)obj).Line.End.Position); } else if(obj is Sector) { - Sector s = (obj as Sector); + Sector s = (Sector)obj; foreach(Sidedef sd in s.Sidedefs) { points.Add(sd.Line.Start.Position); @@ -93,7 +93,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } else if(obj is Thing) { - Thing t = (obj as Thing); + Thing t = (Thing)obj; Vector2D p = t.Position; points.Add(p); points.Add(p + new Vector2D(t.Size * 2.0f, t.Size * 2.0f)); diff --git a/Source/Plugins/BuilderModes/FindReplace/FindSectorCeilingFlat.cs b/Source/Plugins/BuilderModes/FindReplace/FindSectorCeilingFlat.cs index e6efabbdfdc7588968faab18dbec076e775257dc..0cd8a53d06a6c6e917abbf4f5d1a7511f5d5bc0b 100644 --- a/Source/Plugins/BuilderModes/FindReplace/FindSectorCeilingFlat.cs +++ b/Source/Plugins/BuilderModes/FindReplace/FindSectorCeilingFlat.cs @@ -10,7 +10,7 @@ using CodeImp.DoomBuilder.Map; namespace CodeImp.DoomBuilder.BuilderModes { - [FindReplace("Sector Ceiling Flat", BrowseButton = true)] + [FindReplace("Sector Flat (Ceiling)", BrowseButton = true)] internal class FindSectorCeilingFlat : FindSectorFlat { #region ================== Methods diff --git a/Source/Plugins/BuilderModes/FindReplace/FindSectorCeilingHeight.cs b/Source/Plugins/BuilderModes/FindReplace/FindSectorCeilingHeight.cs index f045ae23606b433c21f1d016a6540149056d02d4..0a36ff356a3f436480b32cc3cfb510c17f322691 100644 --- a/Source/Plugins/BuilderModes/FindReplace/FindSectorCeilingHeight.cs +++ b/Source/Plugins/BuilderModes/FindReplace/FindSectorCeilingHeight.cs @@ -8,7 +8,7 @@ using CodeImp.DoomBuilder.Map; namespace CodeImp.DoomBuilder.BuilderModes.FindReplace { - [FindReplace("Sector Ceiling Height", BrowseButton = false)] + [FindReplace("Sector Height (Ceiling)", BrowseButton = false)] internal class FindSectorCeilingHeight : BaseFindSector { #region ================== Properties diff --git a/Source/Plugins/BuilderModes/FindReplace/FindSectorFlags.cs b/Source/Plugins/BuilderModes/FindReplace/FindSectorFlags.cs index 560ac22de3d892eed65aae65315d2912cf5aac01..8037f834da01583d64431aa3c133b8730e9fb34f 100644 --- a/Source/Plugins/BuilderModes/FindReplace/FindSectorFlags.cs +++ b/Source/Plugins/BuilderModes/FindReplace/FindSectorFlags.cs @@ -46,11 +46,18 @@ namespace CodeImp.DoomBuilder.BuilderModes ICollection<Sector> list = withinselection ? General.Map.Map.GetSelectedSectors(true) : General.Map.Map.Sectors; // Find what? (mxd) - List<string> findflagslist = new List<string>(); + Dictionary<string, bool> findflagslist = new Dictionary<string, bool>(); foreach(string flag in value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)) { string f = flag.Trim(); - if(General.Map.Config.SectorFlags.ContainsKey(f)) findflagslist.Add(f); + bool setflag = true; + if(f.StartsWith("!")) + { + setflag = false; + f = f.Substring(1, f.Length - 1); + } + + if(General.Map.Config.SectorFlags.ContainsKey(f)) findflagslist.Add(f, setflag); } if(findflagslist.Count == 0) { @@ -59,19 +66,26 @@ namespace CodeImp.DoomBuilder.BuilderModes } // Replace with what? (mxd) - List<string> replaceflagslist = new List<string>(); + Dictionary<string, bool> replaceflagslist = new Dictionary<string, bool>(); if(replace) { string[] replaceflags = replacewith.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach(string flag in replaceflags) { string f = flag.Trim(); + bool setflag = true; + if(f.StartsWith("!")) + { + setflag = false; + f = f.Substring(1, f.Length - 1); + } + if(!General.Map.Config.SectorFlags.ContainsKey(f)) { MessageBox.Show("Invalid replace value \"" + f + "\" for this search type!", "Find and Replace", MessageBoxButtons.OK, MessageBoxIcon.Error); return objs.ToArray(); } - replaceflagslist.Add(f); + replaceflagslist.Add(f, setflag); } } @@ -81,10 +95,10 @@ namespace CodeImp.DoomBuilder.BuilderModes bool match = true; // Parse the value string... - foreach(string flag in findflagslist) + foreach(KeyValuePair<string, bool> group in findflagslist) { - // ... and check if the flags don't match - if(!s.IsFlagSet(flag)) + // ...and check if the flag doesn't match + if(group.Value != s.IsFlagSet(group.Key)) { match = false; break; @@ -97,11 +111,8 @@ namespace CodeImp.DoomBuilder.BuilderModes // Replace flags (mxd) if(replace) { - // Clear all flags - s.ClearFlags(); - // Set new flags - foreach(string flag in replaceflagslist) s.SetFlag(flag, true); + foreach(KeyValuePair<string, bool> group in replaceflagslist) s.SetFlag(group.Key, group.Value); } // Add to list diff --git a/Source/Plugins/BuilderModes/FindReplace/FindSectorFlat.cs b/Source/Plugins/BuilderModes/FindReplace/FindSectorFlat.cs index c02947d845971c54dd2113c1e2c48b9e223a5bdd..b1394a418143c3148e3e39f7f12fcbbe95fb38f3 100644 --- a/Source/Plugins/BuilderModes/FindReplace/FindSectorFlat.cs +++ b/Source/Plugins/BuilderModes/FindReplace/FindSectorFlat.cs @@ -27,7 +27,7 @@ using System.Drawing; namespace CodeImp.DoomBuilder.BuilderModes { - [FindReplace("Sector Flat", BrowseButton = true)] + [FindReplace("Sector Flat (Any)", BrowseButton = true)] internal class FindSectorFlat : BaseFindSector { #region ================== Constants diff --git a/Source/Plugins/BuilderModes/FindReplace/FindSectorFloorFlat.cs b/Source/Plugins/BuilderModes/FindReplace/FindSectorFloorFlat.cs index d43511e250228f169804b0d897ecb20b5b31b825..b9c42cfa8b2d86f4a7678fb80cb2c44cc25ceda0 100644 --- a/Source/Plugins/BuilderModes/FindReplace/FindSectorFloorFlat.cs +++ b/Source/Plugins/BuilderModes/FindReplace/FindSectorFloorFlat.cs @@ -10,7 +10,7 @@ using CodeImp.DoomBuilder.Map; namespace CodeImp.DoomBuilder.BuilderModes { - [FindReplace("Sector Floor Flat", BrowseButton = true)] + [FindReplace("Sector Flat (Floor)", BrowseButton = true)] internal class FindSectorFloorFlat : FindSectorFlat { #region ================== Methods diff --git a/Source/Plugins/BuilderModes/FindReplace/FindSectorFloorHeight.cs b/Source/Plugins/BuilderModes/FindReplace/FindSectorFloorHeight.cs index 768546ac10cd61db47bf2cae8cff0c37d0a53d54..849647d133d3a880a1621000b7e256012b6294b8 100644 --- a/Source/Plugins/BuilderModes/FindReplace/FindSectorFloorHeight.cs +++ b/Source/Plugins/BuilderModes/FindReplace/FindSectorFloorHeight.cs @@ -8,7 +8,7 @@ using CodeImp.DoomBuilder.Map; namespace CodeImp.DoomBuilder.BuilderModes.FindReplace { - [FindReplace("Sector Floor Height", BrowseButton = false)] + [FindReplace("Sector Height (Floor)", BrowseButton = false)] internal class FindSectorFloorHeight : BaseFindSector { #region ================== Properties diff --git a/Source/Plugins/BuilderModes/FindReplace/FindSectorTags.cs b/Source/Plugins/BuilderModes/FindReplace/FindSectorTags.cs index 6df542d813109269796ae1dfb40b87e7c26cb285..c0d82a257bc37a5f199348b65785147098c38c47 100644 --- a/Source/Plugins/BuilderModes/FindReplace/FindSectorTags.cs +++ b/Source/Plugins/BuilderModes/FindReplace/FindSectorTags.cs @@ -122,8 +122,10 @@ namespace CodeImp.DoomBuilder.BuilderModes // Replace if(replace) { - s.Tags[index] = replacetag; //mxd - s.Tags = s.Tags.Distinct().ToList(); //mxd. We don't want duplicates + //mxd. Make a copy of tags, otherwise BeforePropsChange will be triggered after tag changes + List<int> tags = new List<int>(s.Tags); + tags[index] = replacetag; + s.Tags = tags.Distinct().ToList(); // We don't want duplicates } // Add to list diff --git a/Source/Plugins/BuilderModes/FindReplace/FindSidedefFlags.cs b/Source/Plugins/BuilderModes/FindReplace/FindSidedefFlags.cs index 39caa40b8e21d53c1f0f27bde03d27d9cd0510e1..b3b549b3031de80e96ece0d0d6f6928a139c7bc5 100644 --- a/Source/Plugins/BuilderModes/FindReplace/FindSidedefFlags.cs +++ b/Source/Plugins/BuilderModes/FindReplace/FindSidedefFlags.cs @@ -45,11 +45,18 @@ namespace CodeImp.DoomBuilder.BuilderModes ICollection<Sidedef> list = withinselection ? General.Map.Map.GetSidedefsFromSelectedLinedefs(true) : General.Map.Map.Sidedefs; // Find what? (mxd) - List<string> findflagslist = new List<string>(); + Dictionary<string, bool> findflagslist = new Dictionary<string, bool>(); foreach(string flag in value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)) { string f = flag.Trim(); - if(General.Map.Config.SidedefFlags.ContainsKey(f)) findflagslist.Add(f); + bool setflag = true; + if(f.StartsWith("!")) + { + setflag = false; + f = f.Substring(1, f.Length - 1); + } + + if(General.Map.Config.SidedefFlags.ContainsKey(f)) findflagslist.Add(f, setflag); } if(findflagslist.Count == 0) { @@ -58,19 +65,26 @@ namespace CodeImp.DoomBuilder.BuilderModes } // Replace with what? (mxd) - List<string> replaceflagslist = new List<string>(); + Dictionary<string, bool> replaceflagslist = new Dictionary<string, bool>(); if(replace) { string[] replaceflags = replacewith.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach(string flag in replaceflags) { string f = flag.Trim(); + bool setflag = true; + if(f.StartsWith("!")) + { + setflag = false; + f = f.Substring(1, f.Length - 1); + } + if(!General.Map.Config.SidedefFlags.ContainsKey(f)) { MessageBox.Show("Invalid replace value \"" + f + "\" for this search type!", "Find and Replace", MessageBoxButtons.OK, MessageBoxIcon.Error); return objs.ToArray(); } - replaceflagslist.Add(f); + replaceflagslist.Add(f, setflag); } } @@ -80,10 +94,10 @@ namespace CodeImp.DoomBuilder.BuilderModes bool match = true; // Parse the value string... - foreach(string flag in findflagslist) + foreach(KeyValuePair<string, bool> group in findflagslist) { - // ... and check if the flags don't match - if(!sd.IsFlagSet(flag)) + // ...and check if the flag doesn't match + if(group.Value != sd.IsFlagSet(group.Key)) { match = false; break; @@ -98,11 +112,8 @@ namespace CodeImp.DoomBuilder.BuilderModes // Replace flags (mxd) if(replace) { - // Clear all flags - sd.ClearFlags(); - // Set new flags - foreach(string flag in replaceflagslist) sd.SetFlag(flag, true); + foreach(KeyValuePair<string, bool> group in replaceflagslist) sd.SetFlag(group.Key, group.Value); } // Add to list diff --git a/Source/Plugins/BuilderModes/FindReplace/FindSidedefLowerTexture.cs b/Source/Plugins/BuilderModes/FindReplace/FindSidedefLowerTexture.cs new file mode 100644 index 0000000000000000000000000000000000000000..5cbe8377321da52b95adee85613afa03c43b85d4 --- /dev/null +++ b/Source/Plugins/BuilderModes/FindReplace/FindSidedefLowerTexture.cs @@ -0,0 +1,71 @@ +#region ================== Namespaces + +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Drawing; +using System.Windows.Forms; +using CodeImp.DoomBuilder.Config; +using CodeImp.DoomBuilder.Map; + +#endregion + +namespace CodeImp.DoomBuilder.BuilderModes +{ + [FindReplace("Sidedef Texture (Lower)", BrowseButton = true)] + internal class FindSidedefLowerTexture : BaseFindSidedef + { + #region ================== Properties + + public override Image BrowseImage { get { return Properties.Resources.List; } } + + #endregion + + #region ================== Methods + + // This is called when the browse button is pressed + public override string Browse(string initialvalue) + { + return General.Interface.BrowseTexture(BuilderPlug.Me.FindReplaceForm, initialvalue); + } + + // This is called to perform a search (and replace) + // Returns a list of items to show in the results list + // replacewith is null when not replacing + public override FindReplaceObject[] Find(string value, bool withinselection, bool replace, string replacewith, bool keepselection) + { + List<FindReplaceObject> objs = new List<FindReplaceObject>(); + + // Interpret the replacement + 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(); + } + + // Interpret the find + bool isregex = (value.IndexOf('*') != -1 || value.IndexOf('?') != -1); //mxd + MatchingTextureSet set = new MatchingTextureSet(new Collection<string> { value.Trim() }); //mxd + + // Where to search? + ICollection<Sidedef> sidelist = withinselection ? General.Map.Map.GetSidedefsFromSelectedLinedefs(true) : General.Map.Map.Sidedefs; + + // Go for all sidedefs + foreach(Sidedef sd in sidelist) + { + if(set.IsMatch(sd.LowTexture) && (value != "-" || sd.LowRequired())) + { + // Replace and add to list + if(replace) sd.SetTextureLow(replacewith); + objs.Add(new FindReplaceObject(sd, "Sidedef " + sd.Index + " (" + (sd.IsFront ? "front" : "back") + ", low)" + (isregex ? " - " + sd.LowTexture : null))); + } + } + + // When replacing, make sure we keep track of used textures + if(replace) General.Map.Data.UpdateUsedTextures(); + + return objs.ToArray(); + } + + #endregion + } +} diff --git a/Source/Plugins/BuilderModes/FindReplace/FindSidedefMiddleTexture.cs b/Source/Plugins/BuilderModes/FindReplace/FindSidedefMiddleTexture.cs new file mode 100644 index 0000000000000000000000000000000000000000..9bb4318ee3bcc64d481389dee16edeefc4e60ae6 --- /dev/null +++ b/Source/Plugins/BuilderModes/FindReplace/FindSidedefMiddleTexture.cs @@ -0,0 +1,71 @@ +#region ================== Namespaces + +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Drawing; +using System.Windows.Forms; +using CodeImp.DoomBuilder.Config; +using CodeImp.DoomBuilder.Map; + +#endregion + +namespace CodeImp.DoomBuilder.BuilderModes +{ + [FindReplace("Sidedef Texture (Middle)", BrowseButton = true)] + internal class FindSidedefMiddleTexture : BaseFindSidedef + { + #region ================== Properties + + public override Image BrowseImage { get { return Properties.Resources.List; } } + + #endregion + + #region ================== Methods + + // This is called when the browse button is pressed + public override string Browse(string initialvalue) + { + return General.Interface.BrowseTexture(BuilderPlug.Me.FindReplaceForm, initialvalue); + } + + // This is called to perform a search (and replace) + // Returns a list of items to show in the results list + // replacewith is null when not replacing + public override FindReplaceObject[] Find(string value, bool withinselection, bool replace, string replacewith, bool keepselection) + { + List<FindReplaceObject> objs = new List<FindReplaceObject>(); + + // Interpret the replacement + 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(); + } + + // Interpret the find + bool isregex = (value.IndexOf('*') != -1 || value.IndexOf('?') != -1); //mxd + MatchingTextureSet set = new MatchingTextureSet(new Collection<string> { value.Trim() }); //mxd + + // Where to search? + ICollection<Sidedef> sidelist = withinselection ? General.Map.Map.GetSidedefsFromSelectedLinedefs(true) : General.Map.Map.Sidedefs; + + // Go for all sidedefs + foreach(Sidedef sd in sidelist) + { + if(set.IsMatch(sd.MiddleTexture) && (value != "-" || sd.MiddleRequired())) + { + // Replace and add to list + if(replace) sd.SetTextureMid(replacewith); + objs.Add(new FindReplaceObject(sd, "Sidedef " + sd.Index + " (" + (sd.IsFront ? "front" : "back") + ", middle)" + (isregex ? " - " + sd.MiddleTexture : null))); + } + } + + // When replacing, make sure we keep track of used textures + if(replace) General.Map.Data.UpdateUsedTextures(); + + return objs.ToArray(); + } + + #endregion + } +} diff --git a/Source/Plugins/BuilderModes/FindReplace/FindSidedefTexture.cs b/Source/Plugins/BuilderModes/FindReplace/FindSidedefTexture.cs index 447db55431a9103774b28764cdd707baa4b24a8e..6fc83e49d635b9384d5b1e0bb25d945e7a9f1af4 100644 --- a/Source/Plugins/BuilderModes/FindReplace/FindSidedefTexture.cs +++ b/Source/Plugins/BuilderModes/FindReplace/FindSidedefTexture.cs @@ -27,7 +27,7 @@ using System.Drawing; namespace CodeImp.DoomBuilder.BuilderModes { - [FindReplace("Sidedef Texture", BrowseButton = true)] + [FindReplace("Sidedef Texture (Any)", BrowseButton = true)] internal class FindSidedefTexture : BaseFindSidedef { #region ================== Constants diff --git a/Source/Plugins/BuilderModes/FindReplace/FindSidedefUpperTexture.cs b/Source/Plugins/BuilderModes/FindReplace/FindSidedefUpperTexture.cs new file mode 100644 index 0000000000000000000000000000000000000000..24913ab318a7d1b00e677cd3b00537f3b85141f8 --- /dev/null +++ b/Source/Plugins/BuilderModes/FindReplace/FindSidedefUpperTexture.cs @@ -0,0 +1,71 @@ +#region ================== Namespaces + +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Drawing; +using System.Windows.Forms; +using CodeImp.DoomBuilder.Config; +using CodeImp.DoomBuilder.Map; + +#endregion + +namespace CodeImp.DoomBuilder.BuilderModes +{ + [FindReplace("Sidedef Texture (Upper)", BrowseButton = true)] + internal class FindSidedefUpperTexture : BaseFindSidedef + { + #region ================== Properties + + public override Image BrowseImage { get { return Properties.Resources.List; } } + + #endregion + + #region ================== Methods + + // This is called when the browse button is pressed + public override string Browse(string initialvalue) + { + return General.Interface.BrowseTexture(BuilderPlug.Me.FindReplaceForm, initialvalue); + } + + // This is called to perform a search (and replace) + // Returns a list of items to show in the results list + // replacewith is null when not replacing + public override FindReplaceObject[] Find(string value, bool withinselection, bool replace, string replacewith, bool keepselection) + { + List<FindReplaceObject> objs = new List<FindReplaceObject>(); + + // Interpret the replacement + 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(); + } + + // Interpret the find + bool isregex = (value.IndexOf('*') != -1 || value.IndexOf('?') != -1); //mxd + MatchingTextureSet set = new MatchingTextureSet(new Collection<string> { value.Trim() }); //mxd + + // Where to search? + ICollection<Sidedef> sidelist = withinselection ? General.Map.Map.GetSidedefsFromSelectedLinedefs(true) : General.Map.Map.Sidedefs; + + // Go for all sidedefs + foreach(Sidedef sd in sidelist) + { + if(set.IsMatch(sd.HighTexture) && (value != "-" || sd.HighRequired())) + { + // Replace and add to list + if(replace) sd.SetTextureHigh(replacewith); + objs.Add(new FindReplaceObject(sd, "Sidedef " + sd.Index + " (" + (sd.IsFront ? "front" : "back") + ", high)" + (isregex ? " - " + sd.HighTexture : null))); + } + } + + // When replacing, make sure we keep track of used textures + if(replace) General.Map.Data.UpdateUsedTextures(); + + return objs.ToArray(); + } + + #endregion + } +} diff --git a/Source/Plugins/BuilderModes/FindReplace/FindThingAction.cs b/Source/Plugins/BuilderModes/FindReplace/FindThingAction.cs index e1bc042a4d4dda1077171ad31914077e1559f1eb..dae0caed0e6ec112a3e9dad3bb35deb883960709 100644 --- a/Source/Plugins/BuilderModes/FindReplace/FindThingAction.cs +++ b/Source/Plugins/BuilderModes/FindReplace/FindThingAction.cs @@ -187,7 +187,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(args != null) { int x = 0; - argtext = " args: ("; + argtext = ". Args: "; //mxd. Check script name... if(!string.IsNullOrEmpty(arg0str)) @@ -208,9 +208,39 @@ namespace CodeImp.DoomBuilder.BuilderModes match = false; break; } - argtext += (x == 0 ? "" : ",") + t.Args[x]; + argtext += (x == 0 ? "" : ", ") + t.Args[x]; + } + } + //mxd. Add action args + else + { + List<string> argslist = new List<string>(); + + // Process args, drop trailing zeroes + for(int i = t.Args.Length - 1; i > -1; i--) + { + if(t.Args[i] == 0 && argslist.Count == 0) continue; // Skip tail zeroes + argslist.Insert(0, t.Args[i].ToString()); + } + + // Process arg0str... + if(Array.IndexOf(GZGeneral.ACS_SPECIALS, t.Action) != -1) + { + string s = t.Fields.GetValue("arg0str", string.Empty); + if(!string.IsNullOrEmpty(s)) + { + if(argslist.Count > 0) + argslist[0] = "\"" + s + "\""; + else + argslist.Add("\"" + s + "\""); + } + } + + // Create args string + if(argslist.Count > 0) + { + argtext = ". Args: " + string.Join(", ", argslist.ToArray()); } - argtext += ")"; } if(match) @@ -239,7 +269,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Add to list ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.SRB2Type); - objs.Add(new FindReplaceObject(t, "Thing " + t.Index + " (" + ti.Title + ")" + argtext)); + objs.Add(new FindReplaceObject(t, "Thing " + t.Index + " (" + ti.Title + argtext + ")")); } } } diff --git a/Source/Plugins/BuilderModes/FindReplace/FindThingFlags.cs b/Source/Plugins/BuilderModes/FindReplace/FindThingFlags.cs index cb70f0eeb4790cb2aa563cf6b911191b84434766..02341b0d0532653b87069cdc98a35f2b8d39fc51 100644 --- a/Source/Plugins/BuilderModes/FindReplace/FindThingFlags.cs +++ b/Source/Plugins/BuilderModes/FindReplace/FindThingFlags.cs @@ -76,11 +76,18 @@ namespace CodeImp.DoomBuilder.BuilderModes ICollection<Thing> list = withinselection ? General.Map.Map.GetSelectedThings(true) : General.Map.Map.Things; // Find what? (mxd) - List<string> findflagslist = new List<string>(); + Dictionary<string, bool> findflagslist = new Dictionary<string, bool>(); foreach(string flag in value.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)) { string f = flag.Trim(); - if(General.Map.Config.ThingFlags.ContainsKey(f)) findflagslist.Add(f); + bool setflag = true; + if(f.StartsWith("!")) + { + setflag = false; + f = f.Substring(1, f.Length - 1); + } + + if(General.Map.Config.ThingFlags.ContainsKey(f)) findflagslist.Add(f, setflag); } if(findflagslist.Count == 0) { @@ -89,19 +96,26 @@ namespace CodeImp.DoomBuilder.BuilderModes } // Replace with what? (mxd) - List<string> replaceflagslist = new List<string>(); + Dictionary<string, bool> replaceflagslist = new Dictionary<string, bool>(); if(replace) { string[] replaceflags = replacewith.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach(string flag in replaceflags) { string f = flag.Trim(); + bool setflag = true; + if(f.StartsWith("!")) + { + setflag = false; + f = f.Substring(1, f.Length - 1); + } + if(!General.Map.Config.ThingFlags.ContainsKey(f)) { MessageBox.Show("Invalid replace value \"" + f + "\" for this search type!", "Find and Replace", MessageBoxButtons.OK, MessageBoxIcon.Error); return objs.ToArray(); } - replaceflagslist.Add(f); + replaceflagslist.Add(f, setflag); } } @@ -111,10 +125,10 @@ namespace CodeImp.DoomBuilder.BuilderModes bool match = true; // Parse the value string... - foreach(string flag in findflagslist) + foreach(KeyValuePair<string, bool> group in findflagslist) { - // ... and check if the flags don't match - if(!t.IsFlagSet(flag)) + // ...and check if the flag doesn't match + if(group.Value != t.IsFlagSet(group.Key)) { match = false; break; @@ -127,11 +141,8 @@ namespace CodeImp.DoomBuilder.BuilderModes // Replace flags (mxd) if(replace) { - // Clear all flags - t.ClearFlags(); - // Set new flags - foreach(string flag in replaceflagslist) t.SetFlag(flag, true); + foreach(KeyValuePair<string, bool> group in replaceflagslist) t.SetFlag(group.Key, group.Value); } // Add to list diff --git a/Source/Plugins/BuilderModes/General/BuilderPlug.cs b/Source/Plugins/BuilderModes/General/BuilderPlug.cs index c7e502791bd6b7825f81dc96a5c7875c6ada9883..43caa308be6cf7d924a9c3d0a5f8985e2b6730b9 100644 --- a/Source/Plugins/BuilderModes/General/BuilderPlug.cs +++ b/Source/Plugins/BuilderModes/General/BuilderPlug.cs @@ -86,7 +86,6 @@ namespace CodeImp.DoomBuilder.BuilderModes // Main objects private MenusForm menusform; - private CurveLinedefsForm curvelinedefsform; private FindReplaceForm findreplaceform; private ErrorCheckForm errorcheckform; private PreferencesForm preferencesform; @@ -127,7 +126,6 @@ namespace CodeImp.DoomBuilder.BuilderModes private float highlightrange; private float highlightthingsrange; private float splitlinedefsrange; - private bool usehighlight; private bool autodragonpaste; private bool autoAlignTextureOffsetsOnCreate;//mxd private bool dontMoveGeometryOutsideMapBoundary;//mxd @@ -136,6 +134,7 @@ namespace CodeImp.DoomBuilder.BuilderModes private bool syncSelection; //mxd. Sync selection between Visual and Classic modes. private bool lockSectorTextureOffsetsWhileDragging; //mxd private bool syncthingedit; //mxd + private bool alphabasedtexturehighlighting; //mxd #endregion @@ -149,7 +148,6 @@ namespace CodeImp.DoomBuilder.BuilderModes public override int MinimumRevision { get { return Assembly.GetExecutingAssembly().GetName().Version.Revision; } } public MenusForm MenusForm { get { return menusform; } } - public CurveLinedefsForm CurveLinedefsForm { get { return curvelinedefsform ?? (curvelinedefsform = new CurveLinedefsForm()); } } public FindReplaceForm FindReplaceForm { get { return findreplaceform ?? (findreplaceform = new FindReplaceForm()); } } public ErrorCheckForm ErrorCheckForm { get { return errorcheckform ?? (errorcheckform = new ErrorCheckForm()); } } public PreferencesForm PreferencesForm { get { return preferencesform; } } @@ -184,16 +182,6 @@ namespace CodeImp.DoomBuilder.BuilderModes public float HighlightRange { get { return highlightrange; } } public float HighlightThingsRange { get { return highlightthingsrange; } } public float SplitLinedefsRange { get { return splitlinedefsrange; } } - public bool UseHighlight - { - get { return usehighlight; } - set - { - usehighlight = value; - General.Map.Renderer3D.ShowSelection = usehighlight; - General.Map.Renderer3D.ShowHighlight = usehighlight; - } - } public bool AutoDragOnPaste { get { return autodragonpaste; } set { autodragonpaste = value; } } public bool AutoDrawOnEdit { get { return autoDrawOnEdit; } set { autoDrawOnEdit = value; } } //mxd public bool AutoAlignTextureOffsetsOnCreate { get { return autoAlignTextureOffsetsOnCreate; } set { autoAlignTextureOffsetsOnCreate = value; } } //mxd @@ -202,6 +190,7 @@ namespace CodeImp.DoomBuilder.BuilderModes public bool SyncSelection { get { return syncSelection; } set { syncSelection = value; } } //mxd public bool LockSectorTextureOffsetsWhileDragging { get { return lockSectorTextureOffsetsWhileDragging; } internal set { lockSectorTextureOffsetsWhileDragging = value; } } //mxd public bool SyncronizeThingEdit { get { return syncthingedit; } internal set { syncthingedit = value; } } //mxd + public bool AlphaBasedTextureHighlighting { get { return alphabasedtexturehighlighting; } internal set { alphabasedtexturehighlighting = value; } } //mxd //mxd. "Make Door" action persistent settings internal MakeDoorSettings MakeDoor; @@ -219,7 +208,6 @@ namespace CodeImp.DoomBuilder.BuilderModes // Settings showvisualthings = 2; usegravity = false; - usehighlight = true; LoadSettings(); LoadUISettings(); //mxd @@ -260,11 +248,6 @@ namespace CodeImp.DoomBuilder.BuilderModes menusform = null; //mxd. These are created on demand, so they may be nulls. - if(curvelinedefsform != null) - { - curvelinedefsform.Dispose(); - curvelinedefsform = null; - } if(findreplaceform != null) { findreplaceform.Dispose(); @@ -337,10 +320,11 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Load settings, which can be changed via UI private void LoadUISettings() { - lockSectorTextureOffsetsWhileDragging = General.Settings.ReadPluginSetting("locktextureoffsets", false); //mxd + lockSectorTextureOffsetsWhileDragging = General.Settings.ReadPluginSetting("locktextureoffsets", false); viewselectionnumbers = General.Settings.ReadPluginSetting("viewselectionnumbers", true); - viewselectioneffects = General.Settings.ReadPluginSetting("viewselectioneffects", true); //mxd - syncthingedit = General.Settings.ReadPluginSetting("syncthingedit", true); //mxd + viewselectioneffects = General.Settings.ReadPluginSetting("viewselectioneffects", true); + syncthingedit = General.Settings.ReadPluginSetting("syncthingedit", true); + alphabasedtexturehighlighting = General.Settings.ReadPluginSetting("alphabasedtexturehighlighting", true); } //mxd. Save settings, which can be changed via UI @@ -350,6 +334,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Settings.WritePluginSetting("viewselectionnumbers", viewselectionnumbers); General.Settings.WritePluginSetting("viewselectioneffects", viewselectioneffects); General.Settings.WritePluginSetting("syncthingedit", syncthingedit); + General.Settings.WritePluginSetting("alphabasedtexturehighlighting", alphabasedtexturehighlighting); } //mxd. These should be reset when changing maps @@ -623,10 +608,17 @@ namespace CodeImp.DoomBuilder.BuilderModes { base.OnMapCloseEnd(); undoredopanel.UpdateList(); + errorcheckform = null; //mxd. Error checks may need to be reinitialized //mxd. Save settings SaveUISettings(); } + + //mxd. Error checks may need to be reinitialized + public override void OnMapReconfigure() + { + errorcheckform = null; + } // Redo performed public override void OnRedoEnd() @@ -751,7 +743,7 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(Thing t in General.Map.Map.Things) { if(!asso.Tags.Contains(t.Tag)) continue; - renderer.RenderThing(t, General.Colors.Indication, Presentation.THINGS_ALPHA); + renderer.RenderThing(t, General.Colors.Indication, General.Settings.ActiveThingsAlpha); if(General.Settings.GZShowEventLines) eventlines.Add(new Line3D(asso.Center, t.Position)); //mxd } break; @@ -828,7 +820,7 @@ namespace CodeImp.DoomBuilder.BuilderModes ((action.Args[3].Type == (int)asso.Type) && (asso.Tags.Contains(t.Args[3]))) || ((action.Args[4].Type == (int)asso.Type) && (asso.Tags.Contains(t.Args[4])))) { - renderer.RenderThing(t, General.Colors.Indication, Presentation.THINGS_ALPHA); + renderer.RenderThing(t, General.Colors.Indication, General.Settings.ActiveThingsAlpha); if(General.Settings.GZShowEventLines) eventlines.Add(new Line3D(t.Position, asso.Center)); //mxd } } @@ -844,7 +836,7 @@ namespace CodeImp.DoomBuilder.BuilderModes ((ti.Args[3].Type == (int)asso.Type) && (asso.Tags.Contains(t.Args[3]))) || ((ti.Args[4].Type == (int)asso.Type) && (asso.Tags.Contains(t.Args[4])))) { - renderer.RenderThing(t, General.Colors.Indication, Presentation.THINGS_ALPHA); + renderer.RenderThing(t, General.Colors.Indication, General.Settings.ActiveThingsAlpha); if(General.Settings.GZShowEventLines) eventlines.Add(new Line3D(t.Position, asso.Center)); } } diff --git a/Source/Plugins/BuilderModes/General/CopyStructures.cs b/Source/Plugins/BuilderModes/General/CopyStructures.cs index 3c4dce03fde48bcd4b3f73b0b2be258928287641..4dd772c2c676a6a70f1641b5d4522e125f034d25 100644 --- a/Source/Plugins/BuilderModes/General/CopyStructures.cs +++ b/Source/Plugins/BuilderModes/General/CopyStructures.cs @@ -20,6 +20,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Reflection; +using CodeImp.DoomBuilder.Config; using CodeImp.DoomBuilder.Geometry; using CodeImp.DoomBuilder.Map; @@ -803,8 +804,21 @@ namespace CodeImp.DoomBuilder.BuilderModes if(flags.CeilingTexture && source.CeilTexture != target.CeilTexture) return false; if(flags.Brightness && source.Brightness != target.Brightness) return false; if(flags.Tag && !TagsMatch(source.Tags, target.Tags)) return false; - if(flags.Special && source.Effect != target.Effect) return false; - if(flags.Flags && !FlagsMatch(source.GetFlags(), target.GetFlags())) return false; + if(flags.Flags && !FlagsMatch(source.GetEnabledFlags(), target.GetEnabledFlags())) return false; + + // Generalized effects require more tender loving care... + if(flags.Special && source.Effect != target.Effect) + { + if(!General.Map.Config.GeneralizedEffects || source.Effect == 0 || target.Effect == 0) return false; + + // Get effect bits... + HashSet<int> sourcebits = GameConfiguration.GetGeneralizedSectorEffectBits(source.Effect); + HashSet<int> targetbits = GameConfiguration.GetGeneralizedSectorEffectBits(target.Effect); + + // No bits match when at least one effect is not generalized, or when bits don't overlap + if(sourcebits.Count == 0 || targetbits.Count == 0 || !sourcebits.Overlaps(targetbits)) return false; + } + if(!General.Map.UDMF) return true; // UI fields @@ -840,7 +854,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Built-in properties if(linedefflags.Action && source.Action != target.Action) return false; if(linedefflags.Activation && source.Activate != target.Activate) return false; - if(linedefflags.Tag && !TagsMatch(source.Tags, target.Tags)) return false; //mxd + if(linedefflags.Tag && !TagsMatch(source.Tags, target.Tags)) return false; if(linedefflags.Arguments) { // Classic args @@ -857,7 +871,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(!UniFields.ValuesMatch("arg4str", source, target)) return false; } } - if(linedefflags.Flags && !FlagsMatch(source.GetFlags(), target.GetFlags())) return false; + if(linedefflags.Flags && !FlagsMatch(source.GetEnabledFlags(), target.GetEnabledFlags())) return false; if(General.Map.UDMF) { @@ -893,7 +907,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(!General.Map.UDMF) return true; // UDMF-specific properties - if(flags.Flags && !FlagsMatch(source.GetFlags(), target.GetFlags())) return false; + if(flags.Flags && !FlagsMatch(source.GetEnabledFlags(), target.GetEnabledFlags())) return false; // UI fields if(flags.UpperTextureScale && !UniFields.ValuesMatch("scalex_top", "scaley_top", source, target)) return false; @@ -935,7 +949,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } } if(flags.Tag && source.Tag != target.Tag) return false; - if(flags.Flags && !FlagsMatch(source.GetFlags(), target.GetFlags())) return false; + if(flags.Flags && !FlagsMatch(source.GetEnabledFlags(), target.GetEnabledFlags())) return false; if(!General.Map.UDMF) return true; // UDMF-specific properties @@ -959,11 +973,14 @@ namespace CodeImp.DoomBuilder.BuilderModes #endregion - private static bool FlagsMatch(Dictionary<string, bool> flags1, Dictionary<string, bool> flags2) + private static bool FlagsMatch(HashSet<string> flags1, HashSet<string> flags2) { if(flags1.Count != flags2.Count) return false; - foreach(KeyValuePair<string, bool> group in flags1) - if(!flags2.ContainsKey(group.Key) || flags2[group.Key] != flags1[group.Key]) return false; + foreach(string flag in flags1) + { + if(!flags2.Contains(flag)) return false; + } + return true; } diff --git a/Source/Plugins/BuilderModes/General/HintLabel.cs b/Source/Plugins/BuilderModes/General/HintLabel.cs index 965dcc4963c93607e951a81a954e91b2b90a6ae3..dfc0e3943a6b78252c40cff596e5418dd2f6824b 100644 --- a/Source/Plugins/BuilderModes/General/HintLabel.cs +++ b/Source/Plugins/BuilderModes/General/HintLabel.cs @@ -7,8 +7,6 @@ namespace CodeImp.DoomBuilder.BuilderModes { public class HintLabel : LineLengthLabel { - public string Text { get { return label.Text; } set { label.Text = value; } } - public HintLabel() : base(false, false) { } public HintLabel(PixelColor textcolor) : base(false, false) { @@ -32,7 +30,6 @@ namespace CodeImp.DoomBuilder.BuilderModes bool endvisible = viewport.Contains(end.x, end.y); // Get visile area - RectangleF labelrect; if(!startvisible || !endvisible) { float minx = Math.Min(start.x, end.x); @@ -42,16 +39,15 @@ namespace CodeImp.DoomBuilder.BuilderModes RectangleF labelarea = new RectangleF(minx, miny, maxx - minx, maxy - miny); labelarea.Intersect(viewport); - labelrect = new RectangleF(labelarea.X + labelarea.Width * 0.5f, labelarea.Y + labelarea.Height * 0.5f, 0f, 0f); - } - else - { - Vector2D delta = end - start; - labelrect = new RectangleF(start.x + delta.x * 0.5f, start.y + delta.y * 0.5f, 0f, 0f); + if(!labelarea.IsEmpty) + { + label.Location = new Vector2D(labelarea.X + labelarea.Width * 0.5f, labelarea.Y + labelarea.Height * 0.5f); + return; + } } - // Apply changes - label.Rectangle = labelrect; + Vector2D delta = end - start; + label.Location = new Vector2D(start.x + delta.x * 0.5f, start.y + delta.y * 0.5f); } } } diff --git a/Source/Plugins/BuilderModes/General/LineLengthLabel.cs b/Source/Plugins/BuilderModes/General/LineLengthLabel.cs index 1ced7374080fe9b1fc89818c56fe7df268cc86b2..2e1db1bdbfdd9471dea33d333655f6182b69dd65 100644 --- a/Source/Plugins/BuilderModes/General/LineLengthLabel.cs +++ b/Source/Plugins/BuilderModes/General/LineLengthLabel.cs @@ -25,19 +25,16 @@ using System.Drawing; namespace CodeImp.DoomBuilder.BuilderModes { - public class LineLengthLabel : IDisposable + public class LineLengthLabel : CustomTextLabel, IDisposable { #region ================== Constants - private const int TEXT_CAPACITY = 15; - private const float TEXT_SCALE = 14f; private const string VALUE_FORMAT = "0"; #endregion #region ================== Variables - protected TextLabel label; protected Vector2D start; protected Vector2D end; @@ -49,12 +46,9 @@ namespace CodeImp.DoomBuilder.BuilderModes #region ================== Properties - public TextLabel TextLabel { get { return label; } } - //mxd. Display options public bool ShowAngle { get { return showangle; } set { showangle = value; UpdateText(); } } public bool OffsetPosition { get { return offsetposition; } set { offsetposition = value; Move(start, end); } } - public PixelColor TextColor { get { return label.Color; } set { label.Color = value; } } #endregion @@ -105,13 +99,14 @@ namespace CodeImp.DoomBuilder.BuilderModes // Initialization private void Initialize() { - label = new TextLabel(TEXT_CAPACITY); - label.AlignX = TextAlignmentX.Center; - label.AlignY = TextAlignmentY.Middle; - label.Color = General.Colors.Highlight; - label.Backcolor = General.Colors.Background; - label.Scale = TEXT_SCALE; - label.TransformCoords = true; + label = new TextLabel + { + AlignX = TextAlignmentX.Center, + AlignY = TextAlignmentY.Middle, + Color = General.Colors.Highlight, + BackColor = General.Colors.Background.WithAlpha(128), + TransformCoords = true, + }; } // Disposer @@ -133,8 +128,8 @@ namespace CodeImp.DoomBuilder.BuilderModes float length = delta.GetLength(); if(showangle) { - int displayangle = General.ClampAngle((int)Math.Round(Angle2D.RadToDeg(delta.GetAngle())) - 90); - label.Text = "l:" + length.ToString(VALUE_FORMAT) + "; a:" + displayangle; + int displayangle = (int)Math.Round(Angle2D.RadToDeg(delta.GetAngle())); + label.Text = "L:" + length.ToString(VALUE_FORMAT) + "; A:" + displayangle; } else { @@ -194,7 +189,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { Vector2D perpendicular = (end - start).GetPerpendicular(); float angle = perpendicular.GetAngle(); - SizeF textsize = General.Map.GetTextSize(label.Text, label.Scale); + SizeF textsize = General.Interface.MeasureString(label.Text, label.Font); float offset = textsize.Width * Math.Abs((float)Math.Sin(angle)) + textsize.Height * Math.Abs((float)Math.Cos(angle)); perpendicular = perpendicular.GetNormal().GetScaled(offset / 2.0f / General.Map.Renderer2D.Scale); start += perpendicular; @@ -203,7 +198,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Apply changes Vector2D delta = end - start; - label.Rectangle = new RectangleF(start.x + delta.x * 0.5f, start.y + delta.y * 0.5f, 0f, 0f); + label.Location = new Vector2D(start.x + delta.x * 0.5f, start.y + delta.y * 0.5f); } #endregion diff --git a/Source/Plugins/BuilderModes/General/SelectionLabel.cs b/Source/Plugins/BuilderModes/General/SelectionLabel.cs new file mode 100644 index 0000000000000000000000000000000000000000..cf6db44a5d83d0cac34e1a8e49e798c3a225d87d --- /dev/null +++ b/Source/Plugins/BuilderModes/General/SelectionLabel.cs @@ -0,0 +1,11 @@ +namespace CodeImp.DoomBuilder.BuilderModes +{ + internal class SelectionLabel : LineLengthLabel + { + // Constructor + public SelectionLabel() : base(false, true) { } + + // We don't want any changes here + protected override void UpdateText() { } + } +} diff --git a/Source/Plugins/BuilderModes/IO/WavefrontExporter.cs b/Source/Plugins/BuilderModes/IO/WavefrontExporter.cs index f9b7dc47f3bddcf05fc17c4752963d86fd889ce6..8ad66e43b6018b40c1e55be123dc63d054b4219d 100644 --- a/Source/Plugins/BuilderModes/IO/WavefrontExporter.cs +++ b/Source/Plugins/BuilderModes/IO/WavefrontExporter.cs @@ -197,10 +197,10 @@ namespace CodeImp.DoomBuilder.BuilderModes.IO BaseVisualMode mode = new BaseVisualMode(); bool renderingEffectsDisabled = false; - if(!General.Settings.GZDoomRenderingEffects) + if(!General.Settings.EnhancedRenderingEffects) { renderingEffectsDisabled = true; - mode.ToggleGZDoomRenderingEffects(); + mode.ToggleEnhancedRendering(); } mode.RebuildElementData(); @@ -224,7 +224,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.IO List<Dictionary<string, List<WorldVertex[]>>> geometryByTexture = SortGeometry(visualSectors); //restore vm settings - if(renderingEffectsDisabled) mode.ToggleGZDoomRenderingEffects(); + if(renderingEffectsDisabled) mode.ToggleEnhancedRendering(); mode.Dispose(); //create obj diff --git a/Source/Plugins/BuilderModes/Interface/BridgeModeForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/BridgeModeForm.Designer.cs index 60b37269ec09b696423430cfa1a82c52e54aeb51..a0a723db545728a4f77e7e2d466eda88010bde35 100644 --- a/Source/Plugins/BuilderModes/Interface/BridgeModeForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/BridgeModeForm.Designer.cs @@ -48,7 +48,7 @@ this.buttonOK.Location = new System.Drawing.Point(95, 148); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(75, 23); - this.buttonOK.TabIndex = 4; + this.buttonOK.TabIndex = 7; this.buttonOK.Text = "OK"; this.buttonOK.UseVisualStyleBackColor = true; this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); @@ -60,7 +60,7 @@ this.buttonCancel.Location = new System.Drawing.Point(177, 148); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(75, 23); - this.buttonCancel.TabIndex = 5; + this.buttonCancel.TabIndex = 8; this.buttonCancel.Text = "Cancel"; this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); @@ -159,7 +159,7 @@ this.cbMirror.Location = new System.Drawing.Point(168, 96); this.cbMirror.Name = "cbMirror"; this.cbMirror.Size = new System.Drawing.Size(81, 17); - this.cbMirror.TabIndex = 10; + this.cbMirror.TabIndex = 4; this.cbMirror.Text = "Mirror mode"; this.cbMirror.UseVisualStyleBackColor = true; this.cbMirror.CheckStateChanged += new System.EventHandler(this.cbMirror_CheckStateChanged); @@ -170,7 +170,7 @@ this.cbCopy.Location = new System.Drawing.Point(168, 119); this.cbCopy.Name = "cbCopy"; this.cbCopy.Size = new System.Drawing.Size(79, 17); - this.cbCopy.TabIndex = 10; + this.cbCopy.TabIndex = 5; this.cbCopy.Text = "Copy mode"; this.cbCopy.UseVisualStyleBackColor = true; this.cbCopy.CheckedChanged += new System.EventHandler(this.cbCopy_CheckedChanged); @@ -199,7 +199,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "BridgeModeForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.Text = "Options"; diff --git a/Source/Plugins/BuilderModes/Interface/CurveLinedefsForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/CurveLinedefsForm.Designer.cs deleted file mode 100644 index cca122b5ac1194f2367f5022bc95450636e3fbb3..0000000000000000000000000000000000000000 --- a/Source/Plugins/BuilderModes/Interface/CurveLinedefsForm.Designer.cs +++ /dev/null @@ -1,254 +0,0 @@ -using CodeImp.DoomBuilder.Windows; - -namespace CodeImp.DoomBuilder.BuilderModes -{ - partial class CurveLinedefsForm - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if(disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - System.Windows.Forms.Label label1; - this.distancelabel = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.vertices = new CodeImp.DoomBuilder.Controls.NumericTextbox(); - this.distance = new CodeImp.DoomBuilder.Controls.NumericTextbox(); - this.angle = new CodeImp.DoomBuilder.Controls.NumericTextbox(); - this.verticesbar = new System.Windows.Forms.VScrollBar(); - this.distancebar = new System.Windows.Forms.VScrollBar(); - this.anglebar = new System.Windows.Forms.VScrollBar(); - this.cancel = new System.Windows.Forms.Button(); - this.apply = new System.Windows.Forms.Button(); - this.circular = new System.Windows.Forms.CheckBox(); - this.backwards = new System.Windows.Forms.CheckBox(); - label1 = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // label1 - // - label1.AutoSize = true; - label1.Location = new System.Drawing.Point(24, 15); - label1.Name = "label1"; - label1.Size = new System.Drawing.Size(48, 13); - label1.TabIndex = 0; - label1.Text = "Vertices:"; - // - // distancelabel - // - this.distancelabel.AutoSize = true; - this.distancelabel.Location = new System.Drawing.Point(20, 47); - this.distancelabel.Name = "distancelabel"; - this.distancelabel.Size = new System.Drawing.Size(52, 13); - this.distancelabel.TabIndex = 1; - this.distancelabel.Text = "Distance:"; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(35, 79); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(37, 13); - this.label3.TabIndex = 2; - this.label3.Text = "Angle:"; - // - // vertices - // - this.vertices.AllowDecimal = false; - this.vertices.AllowNegative = false; - this.vertices.AllowRelative = false; - this.vertices.ForeColor = System.Drawing.SystemColors.WindowText; - this.vertices.ImeMode = System.Windows.Forms.ImeMode.Off; - this.vertices.Location = new System.Drawing.Point(78, 12); - this.vertices.Name = "vertices"; - this.vertices.Size = new System.Drawing.Size(45, 20); - this.vertices.TabIndex = 0; - this.vertices.Text = "8"; - this.vertices.TextChanged += new System.EventHandler(this.vertices_TextChanged); - this.vertices.Leave += new System.EventHandler(this.vertices_Leave); - // - // distance - // - this.distance.AllowDecimal = false; - this.distance.AllowNegative = false; - this.distance.AllowRelative = false; - this.distance.ForeColor = System.Drawing.SystemColors.WindowText; - this.distance.ImeMode = System.Windows.Forms.ImeMode.Off; - this.distance.Location = new System.Drawing.Point(78, 44); - this.distance.Name = "distance"; - this.distance.Size = new System.Drawing.Size(45, 20); - this.distance.TabIndex = 2; - this.distance.Text = "128"; - this.distance.TextChanged += new System.EventHandler(this.distance_TextChanged); - this.distance.Leave += new System.EventHandler(this.distance_Leave); - // - // angle - // - this.angle.AllowDecimal = false; - this.angle.AllowNegative = false; - this.angle.AllowRelative = false; - this.angle.ForeColor = System.Drawing.SystemColors.WindowText; - this.angle.ImeMode = System.Windows.Forms.ImeMode.Off; - this.angle.Location = new System.Drawing.Point(78, 76); - this.angle.Name = "angle"; - this.angle.Size = new System.Drawing.Size(45, 20); - this.angle.TabIndex = 4; - this.angle.Text = "180"; - this.angle.TextChanged += new System.EventHandler(this.angle_TextChanged); - this.angle.Leave += new System.EventHandler(this.angle_Leave); - // - // verticesbar - // - this.verticesbar.LargeChange = 1; - this.verticesbar.Location = new System.Drawing.Point(125, 10); - this.verticesbar.Maximum = -1; - this.verticesbar.Minimum = -200; - this.verticesbar.Name = "verticesbar"; - this.verticesbar.Size = new System.Drawing.Size(19, 24); - this.verticesbar.TabIndex = 1; - this.verticesbar.Value = -8; - this.verticesbar.ValueChanged += new System.EventHandler(this.verticesbar_ValueChanged); - // - // distancebar - // - this.distancebar.LargeChange = 8; - this.distancebar.Location = new System.Drawing.Point(125, 42); - this.distancebar.Maximum = 0; - this.distancebar.Minimum = -10000; - this.distancebar.Name = "distancebar"; - this.distancebar.Size = new System.Drawing.Size(19, 24); - this.distancebar.SmallChange = 8; - this.distancebar.TabIndex = 3; - this.distancebar.Value = -128; - this.distancebar.ValueChanged += new System.EventHandler(this.distancebar_ValueChanged); - // - // anglebar - // - this.anglebar.LargeChange = 5; - this.anglebar.Location = new System.Drawing.Point(125, 74); - this.anglebar.Maximum = 0; - this.anglebar.Minimum = -180; - this.anglebar.Name = "anglebar"; - this.anglebar.Size = new System.Drawing.Size(19, 24); - this.anglebar.SmallChange = 5; - this.anglebar.TabIndex = 5; - this.anglebar.Value = -180; - this.anglebar.ValueChanged += new System.EventHandler(this.anglebar_ValueChanged); - // - // cancel - // - this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancel.Location = new System.Drawing.Point(84, 167); - this.cancel.Name = "cancel"; - this.cancel.Size = new System.Drawing.Size(70, 25); - this.cancel.TabIndex = 9; - this.cancel.Text = "Cancel"; - this.cancel.UseVisualStyleBackColor = true; - this.cancel.Click += new System.EventHandler(this.cancel_Click); - // - // apply - // - this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.apply.Location = new System.Drawing.Point(7, 167); - this.apply.Name = "apply"; - this.apply.Size = new System.Drawing.Size(70, 25); - this.apply.TabIndex = 8; - this.apply.Text = "OK"; - this.apply.UseVisualStyleBackColor = true; - this.apply.Click += new System.EventHandler(this.apply_Click); - // - // circular - // - this.circular.AutoSize = true; - this.circular.Location = new System.Drawing.Point(22, 108); - this.circular.Name = "circular"; - this.circular.Size = new System.Drawing.Size(118, 17); - this.circular.TabIndex = 6; - this.circular.Text = "Fixed circular curve"; - this.circular.UseVisualStyleBackColor = true; - this.circular.CheckedChanged += new System.EventHandler(this.circular_CheckedChanged); - // - // backwards - // - this.backwards.AutoSize = true; - this.backwards.Location = new System.Drawing.Point(22, 132); - this.backwards.Name = "backwards"; - this.backwards.Size = new System.Drawing.Size(109, 17); - this.backwards.TabIndex = 7; - this.backwards.Text = "Curve backwards"; - this.backwards.UseVisualStyleBackColor = true; - this.backwards.CheckedChanged += new System.EventHandler(this.backwards_CheckedChanged); - // - // CurveLinedefsForm - // - this.AcceptButton = this.apply; - 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(160, 199); - this.Controls.Add(this.backwards); - this.Controls.Add(this.circular); - this.Controls.Add(this.cancel); - this.Controls.Add(this.apply); - this.Controls.Add(this.anglebar); - this.Controls.Add(this.distancebar); - this.Controls.Add(this.verticesbar); - this.Controls.Add(this.angle); - this.Controls.Add(this.distance); - this.Controls.Add(this.vertices); - this.Controls.Add(this.label3); - this.Controls.Add(this.distancelabel); - this.Controls.Add(label1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "CurveLinedefsForm"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; - this.Text = "Curve Linedefs"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.CurveLinedefsForm_FormClosing); - this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.CurveLinedefsForm_HelpRequested); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label label3; - private CodeImp.DoomBuilder.Controls.NumericTextbox vertices; - private CodeImp.DoomBuilder.Controls.NumericTextbox distance; - private CodeImp.DoomBuilder.Controls.NumericTextbox angle; - private System.Windows.Forms.VScrollBar verticesbar; - private System.Windows.Forms.VScrollBar distancebar; - private System.Windows.Forms.VScrollBar anglebar; - private System.Windows.Forms.Button cancel; - private System.Windows.Forms.Button apply; - private System.Windows.Forms.CheckBox circular; - private System.Windows.Forms.Label distancelabel; - private System.Windows.Forms.CheckBox backwards; - } -} \ No newline at end of file diff --git a/Source/Plugins/BuilderModes/Interface/CurveLinedefsForm.cs b/Source/Plugins/BuilderModes/Interface/CurveLinedefsForm.cs deleted file mode 100644 index 3078816f384cda1808b53cdea0c7f3263d0ef881..0000000000000000000000000000000000000000 --- a/Source/Plugins/BuilderModes/Interface/CurveLinedefsForm.cs +++ /dev/null @@ -1,203 +0,0 @@ - -#region ================== Copyright (c) 2007 Pascal vd Heiden - -/* - * Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com - * This program is released under GNU General Public License - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#endregion - -#region ================== Namespaces - -using System; -using System.Windows.Forms; -using CodeImp.DoomBuilder.Windows; -using CodeImp.DoomBuilder.Geometry; -using System.Drawing; - -#endregion - -namespace CodeImp.DoomBuilder.BuilderModes -{ - public partial class CurveLinedefsForm : DelayedForm - { - #region ================== Constants - - private const int MIN_VERTICES = 1; - private const int MAX_VERTICES = 200; - private const int MIN_DISTANCE = 0; - private const int MAX_DISTANCE = 10000; - private const int MIN_ANGLE = 1; - private const int MAX_ANGLE = 350; - - #endregion - - #region ================== Properties - - public int Vertices { get { return -verticesbar.Value; } } - public float Distance { get { return -distancebar.Value; } } - public float Angle { get { return Angle2D.DegToRad(-anglebar.Value); } } - public bool FixedCurve { get { return circular.Checked; } } - public bool Backwards { get { return backwards.Checked; } } - - #endregion - - #region ================== Constructor / Disposer - - // Constructor - public CurveLinedefsForm() - { - // Initialize - InitializeComponent(); - - // Set negative properties for stupid - // scrollbars that work the other way around - verticesbar.Maximum = -MIN_VERTICES; - verticesbar.Minimum = -MAX_VERTICES; - distancebar.Maximum = -MIN_DISTANCE; - distancebar.Minimum = -MAX_DISTANCE; - anglebar.Maximum = -MIN_ANGLE; - anglebar.Minimum = -MAX_ANGLE; - } - - #endregion - - #region ================== Interface - - // Window closing - private void CurveLinedefsForm_FormClosing(object sender, FormClosingEventArgs e) - { - // User closing the window? - if(e.CloseReason == CloseReason.UserClosing) - { - // Just cancel - General.Editing.CancelMode(); - e.Cancel = true; - } - } - - // This shows the window - public void Show(Form owner) - { - // First time showing? - //if((this.Location.X == 0) && (this.Location.Y == 0)) - { - // Position at left-top of owner - this.Location = new Point(owner.Location.X + 20, owner.Location.Y + 90); - } - - // Show window - base.Show(owner); - } - - // Vertices bar changed - private void verticesbar_ValueChanged(object sender, EventArgs e) - { - int v = -verticesbar.Value; - vertices.Text = v.ToString(); - General.Interface.RedrawDisplay(); - } - - // Vertices loses focus - private void vertices_Leave(object sender, EventArgs e) - { - int v = -verticesbar.Value; - vertices.Text = v.ToString(); - } - - // Vertices change - private void vertices_TextChanged(object sender, EventArgs e) - { - int result = -vertices.GetResult(-verticesbar.Value); - if((result >= verticesbar.Minimum) && (result <= verticesbar.Maximum)) verticesbar.Value = result; - } - - // Distance bar changed - private void distancebar_ValueChanged(object sender, EventArgs e) - { - int v = -distancebar.Value; - distance.Text = v.ToString(); - General.Interface.RedrawDisplay(); - } - - // Distance loses focus - private void distance_Leave(object sender, EventArgs e) - { - int v = -distancebar.Value; - distance.Text = v.ToString(); - } - - // Distance changed - private void distance_TextChanged(object sender, EventArgs e) - { - int result = -distance.GetResult(-distancebar.Value); - if((result >= distancebar.Minimum) && (result <= distancebar.Maximum)) distancebar.Value = result; - } - - // Angle bar changed - private void anglebar_ValueChanged(object sender, EventArgs e) - { - int v = -anglebar.Value; - angle.Text = v.ToString(); - General.Interface.RedrawDisplay(); - } - - // Angle loses focus - private void angle_Leave(object sender, EventArgs e) - { - int v = -anglebar.Value; - angle.Text = v.ToString(); - } - - // Angle changed - private void angle_TextChanged(object sender, EventArgs e) - { - int result = -angle.GetResult(-anglebar.Value); - if((result >= anglebar.Minimum) && (result <= anglebar.Maximum)) anglebar.Value = result; - } - - // Circular curve switched - private void circular_CheckedChanged(object sender, EventArgs e) - { - // Enable/disable controls - distance.Enabled = !circular.Checked; - distancebar.Enabled = !circular.Checked; - distancelabel.Enabled = !circular.Checked; - General.Interface.RedrawDisplay(); - } - - // Curve backwards switched - private void backwards_CheckedChanged(object sender, EventArgs e) - { - General.Interface.RedrawDisplay(); - } - - // Cancel clicked - private void cancel_Click(object sender, EventArgs e) - { - // Cancel now - General.Editing.CancelMode(); - } - - // Apply clicked - private void apply_Click(object sender, EventArgs e) - { - // Apply now - General.Editing.AcceptMode(); - } - - private void CurveLinedefsForm_HelpRequested(object sender, HelpEventArgs hlpevent) - { - General.ShowHelp("e_curvelinedefs.html"); - } - - #endregion - } -} \ No newline at end of file diff --git a/Source/Plugins/BuilderModes/Interface/CurveLinedefsOptionsPanel.Designer.cs b/Source/Plugins/BuilderModes/Interface/CurveLinedefsOptionsPanel.Designer.cs new file mode 100644 index 0000000000000000000000000000000000000000..4e6d6a71df45eac08a61689e72097b5fa6f98116 --- /dev/null +++ b/Source/Plugins/BuilderModes/Interface/CurveLinedefsOptionsPanel.Designer.cs @@ -0,0 +1,269 @@ +namespace CodeImp.DoomBuilder.BuilderModes.Interface +{ + partial class CurveLinedefsOptionsPanel + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if(disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.toolstrip = new System.Windows.Forms.ToolStrip(); + this.vertslabel = new System.Windows.Forms.ToolStripLabel(); + this.verts = new CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown(); + this.distancelabel = new System.Windows.Forms.ToolStripLabel(); + this.distance = new CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown(); + this.anglelabel = new System.Windows.Forms.ToolStripLabel(); + this.angle = new CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown(); + this.reset = new System.Windows.Forms.ToolStripButton(); + this.separator1 = new System.Windows.Forms.ToolStripSeparator(); + this.fixedcurve = new System.Windows.Forms.ToolStripButton(); + this.separator2 = new System.Windows.Forms.ToolStripSeparator(); + this.apply = new System.Windows.Forms.ToolStripButton(); + this.cancel = new System.Windows.Forms.ToolStripButton(); + this.flip = new System.Windows.Forms.ToolStripButton(); + this.toolstrip.SuspendLayout(); + this.SuspendLayout(); + // + // toolstrip + // + this.toolstrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.vertslabel, + this.verts, + this.distancelabel, + this.distance, + this.anglelabel, + this.angle, + this.flip, + this.reset, + this.separator1, + this.fixedcurve, + this.separator2, + this.apply, + this.cancel}); + this.toolstrip.Location = new System.Drawing.Point(0, 0); + this.toolstrip.Name = "toolstrip"; + this.toolstrip.Size = new System.Drawing.Size(760, 25); + this.toolstrip.TabIndex = 0; + this.toolstrip.Text = "toolStrip1"; + // + // vertslabel + // + this.vertslabel.Name = "vertslabel"; + this.vertslabel.Size = new System.Drawing.Size(54, 22); + this.vertslabel.Text = "Vertices: "; + // + // verts + // + this.verts.AutoSize = false; + this.verts.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.verts.Margin = new System.Windows.Forms.Padding(3, 0, 6, 0); + this.verts.Maximum = new decimal(new int[] { + 200, + 0, + 0, + 0}); + this.verts.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.verts.Name = "verts"; + this.verts.Size = new System.Drawing.Size(56, 22); + this.verts.Text = "8"; + this.verts.Value = new decimal(new int[] { + 8, + 0, + 0, + 0}); + this.verts.ValueChanged += new System.EventHandler(this.OnUIValuesChanged); + // + // distancelabel + // + this.distancelabel.Name = "distancelabel"; + this.distancelabel.Size = new System.Drawing.Size(55, 22); + this.distancelabel.Text = "Distance:"; + // + // distance + // + this.distance.AutoSize = false; + this.distance.Increment = new decimal(new int[] { + 8, + 0, + 0, + 0}); + this.distance.Margin = new System.Windows.Forms.Padding(3, 0, 6, 0); + this.distance.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.distance.Minimum = new decimal(new int[] { + 10000, + 0, + 0, + -2147483648}); + this.distance.Name = "distance"; + this.distance.Size = new System.Drawing.Size(56, 25); + this.distance.Text = "128"; + this.distance.Value = new decimal(new int[] { + 128, + 0, + 0, + 0}); + this.distance.ValueChanged += new System.EventHandler(this.OnUIValuesChanged); + // + // anglelabel + // + this.anglelabel.Name = "anglelabel"; + this.anglelabel.Size = new System.Drawing.Size(41, 22); + this.anglelabel.Text = "Angle:"; + // + // angle + // + this.angle.AutoSize = false; + this.angle.Increment = new decimal(new int[] { + 8, + 0, + 0, + 0}); + this.angle.Margin = new System.Windows.Forms.Padding(3, 0, 6, 0); + this.angle.Maximum = new decimal(new int[] { + 350, + 0, + 0, + 0}); + this.angle.Minimum = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.angle.Name = "angle"; + this.angle.Size = new System.Drawing.Size(56, 22); + this.angle.Text = "180"; + this.angle.Value = new decimal(new int[] { + 180, + 0, + 0, + 0}); + this.angle.ValueChanged += new System.EventHandler(this.OnUIValuesChanged); + // + // reset + // + this.reset.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.reset.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Reset; + this.reset.ImageTransparentColor = System.Drawing.Color.Magenta; + this.reset.Margin = new System.Windows.Forms.Padding(0, 1, 3, 2); + this.reset.Name = "reset"; + this.reset.Size = new System.Drawing.Size(23, 22); + this.reset.Text = "Reset"; + this.reset.Click += new System.EventHandler(this.reset_Click); + // + // separator1 + // + this.separator1.Name = "separator1"; + this.separator1.Size = new System.Drawing.Size(6, 25); + // + // fixedcurve + // + this.fixedcurve.CheckOnClick = true; + this.fixedcurve.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.DrawCurveMode; + this.fixedcurve.ImageTransparentColor = System.Drawing.Color.Magenta; + this.fixedcurve.Margin = new System.Windows.Forms.Padding(3, 1, 3, 2); + this.fixedcurve.Name = "fixedcurve"; + this.fixedcurve.Size = new System.Drawing.Size(128, 22); + this.fixedcurve.Text = "Fixed circular curve"; + this.fixedcurve.CheckedChanged += new System.EventHandler(this.fixedcurve_CheckedChanged); + // + // separator2 + // + this.separator2.Name = "separator2"; + this.separator2.Size = new System.Drawing.Size(6, 25); + // + // apply + // + this.apply.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.apply.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Check; + this.apply.ImageTransparentColor = System.Drawing.Color.Magenta; + this.apply.Margin = new System.Windows.Forms.Padding(6, 1, 0, 2); + this.apply.Name = "apply"; + this.apply.Size = new System.Drawing.Size(23, 22); + this.apply.Text = "Apply"; + this.apply.Click += new System.EventHandler(this.apply_Click); + // + // cancel + // + this.cancel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.cancel.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Close; + this.cancel.ImageTransparentColor = System.Drawing.Color.Magenta; + this.cancel.Name = "cancel"; + this.cancel.Size = new System.Drawing.Size(23, 22); + this.cancel.Text = "Cancel"; + this.cancel.Click += new System.EventHandler(this.cancel_Click); + // + // flip + // + this.flip.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.flip.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Flip; + this.flip.ImageTransparentColor = System.Drawing.Color.Magenta; + this.flip.Name = "flip"; + this.flip.Size = new System.Drawing.Size(23, 22); + this.flip.Text = "Flip Curve"; + this.flip.Click += new System.EventHandler(this.flip_Click); + // + // CurveLinedefsOptionsPanel + // + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.Controls.Add(this.toolstrip); + this.Name = "CurveLinedefsOptionsPanel"; + this.Size = new System.Drawing.Size(760, 60); + this.toolstrip.ResumeLayout(false); + this.toolstrip.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ToolStrip toolstrip; + private System.Windows.Forms.ToolStripLabel vertslabel; + private CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown verts; + private System.Windows.Forms.ToolStripLabel distancelabel; + private CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown distance; + private System.Windows.Forms.ToolStripLabel anglelabel; + private CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown angle; + private System.Windows.Forms.ToolStripSeparator separator1; + private System.Windows.Forms.ToolStripButton fixedcurve; + private System.Windows.Forms.ToolStripSeparator separator2; + private System.Windows.Forms.ToolStripButton apply; + private System.Windows.Forms.ToolStripButton cancel; + private System.Windows.Forms.ToolStripButton reset; + private System.Windows.Forms.ToolStripButton flip; + } +} diff --git a/Source/Plugins/BuilderModes/Interface/CurveLinedefsOptionsPanel.cs b/Source/Plugins/BuilderModes/Interface/CurveLinedefsOptionsPanel.cs new file mode 100644 index 0000000000000000000000000000000000000000..e09b01c88291eb64e1015f74c8d585dea0d75f9b --- /dev/null +++ b/Source/Plugins/BuilderModes/Interface/CurveLinedefsOptionsPanel.cs @@ -0,0 +1,134 @@ +using System; +using System.Windows.Forms; + +namespace CodeImp.DoomBuilder.BuilderModes.Interface +{ + public partial class CurveLinedefsOptionsPanel : UserControl + { + #region ================== Event Handlers + + public event EventHandler OnValueChanged; + + #endregion + + #region ================== Variables + + private bool blockevents; + + #endregion + + #region ================== Properties + + public int Vertices { get { return (int)verts.Value; } set { verts.Value = General.Clamp(value, (int)verts.Minimum, (int)verts.Maximum); } } + public int Distance { get { return (int)distance.Value; } set { distance.Value = General.Clamp(value, (int)distance.Minimum, (int)distance.Maximum); } } + public int DistanceIncrement { get { return (int)distance.Increment; } } + public int Angle { get { return (int)angle.Value; } set { angle.Value = (decimal)General.Clamp(value, (float)angle.Minimum, (float)angle.Maximum); } } + public int AngleIncrement { get { return (int)angle.Increment; } } + public int MaximumAngle { get { return (int)angle.Maximum; } } + public bool FixedCurve { get { return fixedcurve.Checked; } } + + #endregion + + #region ================== Constructor + + public CurveLinedefsOptionsPanel() + { + InitializeComponent(); + } + + #endregion + + #region ================== Mathods + + public void SetValues(int verts, int distance, int angle, bool fixedcurve) + { + blockevents = true; + + this.verts.Value = General.Clamp(verts, (int)this.verts.Minimum, (int)this.verts.Maximum); + this.distance.Value = General.Clamp(distance, (int)this.distance.Minimum, (int)this.distance.Maximum); + this.angle.Value = General.Clamp(angle, (int)this.angle.Minimum, (int)this.angle.Maximum); + this.fixedcurve.Checked = fixedcurve; + + blockevents = false; + } + + public void Register() + { + General.Interface.AddButton(vertslabel); + General.Interface.AddButton(verts); + General.Interface.AddButton(distancelabel); + General.Interface.AddButton(distance); + General.Interface.AddButton(anglelabel); + General.Interface.AddButton(angle); + General.Interface.AddButton(flip); + General.Interface.AddButton(reset); + General.Interface.AddButton(separator1); + General.Interface.AddButton(fixedcurve); + General.Interface.AddButton(separator2); + General.Interface.AddButton(apply); + General.Interface.AddButton(cancel); + } + + public void Unregister() + { + General.Interface.RemoveButton(cancel); + General.Interface.RemoveButton(apply); + General.Interface.RemoveButton(anglelabel); + General.Interface.RemoveButton(separator2); + General.Interface.RemoveButton(fixedcurve); + General.Interface.RemoveButton(separator1); + General.Interface.RemoveButton(reset); + General.Interface.RemoveButton(flip); + General.Interface.RemoveButton(angle); + General.Interface.RemoveButton(anglelabel); + General.Interface.RemoveButton(distance); + General.Interface.RemoveButton(distancelabel); + General.Interface.RemoveButton(verts); + General.Interface.RemoveButton(vertslabel); + } + + #endregion + + #region ================== Events + + private void apply_Click(object sender, EventArgs e) + { + // Apply now + General.Editing.AcceptMode(); + } + + private void cancel_Click(object sender, EventArgs e) + { + // Cancel now + General.Editing.CancelMode(); + } + + private void OnUIValuesChanged(object sender, EventArgs e) + { + if(!blockevents && OnValueChanged != null) OnValueChanged(this, EventArgs.Empty); + } + + private void fixedcurve_CheckedChanged(object sender, EventArgs e) + { + // Enable/disable controls + distance.Enabled = !fixedcurve.Checked; + distancelabel.Enabled = !fixedcurve.Checked; + + if(!blockevents && OnValueChanged != null) OnValueChanged(this, EventArgs.Empty); + } + + private void flip_Click(object sender, EventArgs e) + { + distance.Value = -distance.Value; + } + + private void reset_Click(object sender, EventArgs e) + { + SetValues(CurveLinedefsMode.DEFAULT_VERTICES_COUNT, CurveLinedefsMode.DEFAULT_DISTANCE, CurveLinedefsMode.DEFAULT_ANGLE, false); + if(OnValueChanged != null) OnValueChanged(this, EventArgs.Empty); + } + + #endregion + + } +} diff --git a/Source/Plugins/BuilderModes/Interface/CurveLinedefsForm.resx b/Source/Plugins/BuilderModes/Interface/CurveLinedefsOptionsPanel.resx similarity index 78% rename from Source/Plugins/BuilderModes/Interface/CurveLinedefsForm.resx rename to Source/Plugins/BuilderModes/Interface/CurveLinedefsOptionsPanel.resx index 63dc566305a6ddd2002d2097cc3107d073096db9..58469c31eeec35ab3f79cde9c59d299ed32cf7c5 100644 --- a/Source/Plugins/BuilderModes/Interface/CurveLinedefsForm.resx +++ b/Source/Plugins/BuilderModes/Interface/CurveLinedefsOptionsPanel.resx @@ -117,31 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>False</value> - </metadata> - <metadata name="vertices.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="distance.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="angle.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="verticesbar.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="distancebar.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="anglebar.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="circular.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="backwards.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> + <metadata name="toolstrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> </metadata> </root> \ No newline at end of file diff --git a/Source/Plugins/BuilderModes/Interface/DrawCurveOptionsPanel.Designer.cs b/Source/Plugins/BuilderModes/Interface/DrawCurveOptionsPanel.Designer.cs index 2f0810b31a54e66a9e283d899c5aab0d434ba448..e6690dfa99cc8308f2d244572bb801275810f889 100644 --- a/Source/Plugins/BuilderModes/Interface/DrawCurveOptionsPanel.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/DrawCurveOptionsPanel.Designer.cs @@ -29,11 +29,12 @@ private void InitializeComponent() { this.toolstrip = new System.Windows.Forms.ToolStrip(); + this.continuousdrawing = new System.Windows.Forms.ToolStripButton(); + this.autoclosedrawing = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.seglabel = new System.Windows.Forms.ToolStripLabel(); this.seglen = new CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown(); this.reset = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.continuousdrawing = new System.Windows.Forms.ToolStripButton(); this.toolstrip.SuspendLayout(); this.SuspendLayout(); // @@ -41,16 +42,43 @@ // this.toolstrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.continuousdrawing, + this.autoclosedrawing, this.toolStripSeparator1, this.seglabel, this.seglen, this.reset}); this.toolstrip.Location = new System.Drawing.Point(0, 0); this.toolstrip.Name = "toolstrip"; - this.toolstrip.Size = new System.Drawing.Size(320, 25); + this.toolstrip.Size = new System.Drawing.Size(562, 25); this.toolstrip.TabIndex = 7; this.toolstrip.Text = "toolStrip1"; // + // continuousdrawing + // + this.continuousdrawing.CheckOnClick = true; + this.continuousdrawing.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Repeat; + this.continuousdrawing.ImageTransparentColor = System.Drawing.Color.Magenta; + this.continuousdrawing.Name = "continuousdrawing"; + this.continuousdrawing.Size = new System.Drawing.Size(135, 22); + this.continuousdrawing.Text = "Continuous drawing"; + this.continuousdrawing.CheckedChanged += new System.EventHandler(this.continuousdrawing_CheckedChanged); + // + // autoclosedrawing + // + this.autoclosedrawing.CheckOnClick = true; + this.autoclosedrawing.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.NewSector2; + this.autoclosedrawing.ImageTransparentColor = System.Drawing.Color.Magenta; + this.autoclosedrawing.Margin = new System.Windows.Forms.Padding(2, 1, 0, 2); + this.autoclosedrawing.Name = "autoclosedrawing"; + this.autoclosedrawing.Size = new System.Drawing.Size(131, 22); + this.autoclosedrawing.Text = "Auto-close drawing"; + this.autoclosedrawing.CheckedChanged += new System.EventHandler(this.autoclosedrawing_CheckedChanged); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); + // // seglabel // this.seglabel.Name = "seglabel"; @@ -87,32 +115,17 @@ this.reset.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Reset; this.reset.ImageTransparentColor = System.Drawing.Color.Magenta; this.reset.Name = "reset"; - this.reset.Size = new System.Drawing.Size(23, 20); + this.reset.Size = new System.Drawing.Size(23, 22); this.reset.Text = "Reset"; this.reset.Click += new System.EventHandler(this.reset_Click); // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); - // - // continuousdrawing - // - this.continuousdrawing.CheckOnClick = true; - this.continuousdrawing.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Repeat; - this.continuousdrawing.ImageTransparentColor = System.Drawing.Color.Magenta; - this.continuousdrawing.Name = "continuousdrawing"; - this.continuousdrawing.Size = new System.Drawing.Size(135, 22); - this.continuousdrawing.Text = "Continuous drawing"; - this.continuousdrawing.CheckedChanged += new System.EventHandler(this.continuousdrawing_CheckedChanged); - // // DrawCurveOptionsPanel // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.Controls.Add(this.toolstrip); this.Name = "DrawCurveOptionsPanel"; - this.Size = new System.Drawing.Size(320, 60); + this.Size = new System.Drawing.Size(562, 60); this.toolstrip.ResumeLayout(false); this.toolstrip.PerformLayout(); this.ResumeLayout(false); @@ -128,6 +141,7 @@ private System.Windows.Forms.ToolStripButton reset; private System.Windows.Forms.ToolStripButton continuousdrawing; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripButton autoclosedrawing; } } diff --git a/Source/Plugins/BuilderModes/Interface/DrawCurveOptionsPanel.cs b/Source/Plugins/BuilderModes/Interface/DrawCurveOptionsPanel.cs index f3cd053814622959294fb6ca0f046edf8d6ffbc9..1e1804c6105b5eb5b9ddfb581de7a2f415b7a9ca 100644 --- a/Source/Plugins/BuilderModes/Interface/DrawCurveOptionsPanel.cs +++ b/Source/Plugins/BuilderModes/Interface/DrawCurveOptionsPanel.cs @@ -7,10 +7,12 @@ namespace CodeImp.DoomBuilder.BuilderModes { public event EventHandler OnValueChanged; public event EventHandler OnContinuousDrawingChanged; + public event EventHandler OnAutoCloseDrawingChanged; private bool blockevents; public int SegmentLength { get { return (int)seglen.Value; } set { blockevents = true; seglen.Value = value; blockevents = false; } } public bool ContinuousDrawing { get { return continuousdrawing.Checked; } set { continuousdrawing.Checked = value; } } + public bool AutoCloseDrawing { get { return autoclosedrawing.Checked; } set { autoclosedrawing.Checked = value; } } public DrawCurveOptionsPanel(int minLength, int maxLength) { @@ -25,6 +27,7 @@ namespace CodeImp.DoomBuilder.BuilderModes public void Register() { General.Interface.AddButton(continuousdrawing); + General.Interface.AddButton(autoclosedrawing); General.Interface.AddButton(toolStripSeparator1); General.Interface.AddButton(seglabel); General.Interface.AddButton(seglen); @@ -37,6 +40,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.RemoveButton(seglen); General.Interface.RemoveButton(seglabel); General.Interface.RemoveButton(toolStripSeparator1); + General.Interface.RemoveButton(autoclosedrawing); General.Interface.RemoveButton(continuousdrawing); } @@ -54,5 +58,10 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(OnContinuousDrawingChanged != null) OnContinuousDrawingChanged(continuousdrawing.Checked, EventArgs.Empty); } + + private void autoclosedrawing_CheckedChanged(object sender, EventArgs e) + { + if(OnAutoCloseDrawingChanged != null) OnAutoCloseDrawingChanged(autoclosedrawing.Checked, EventArgs.Empty); + } } } diff --git a/Source/Plugins/BuilderModes/Interface/DrawEllipseOptionsPanel.Designer.cs b/Source/Plugins/BuilderModes/Interface/DrawEllipseOptionsPanel.Designer.cs index b95825fe62023c0146cb8da8905e45c24081d1e8..24f31282dd97e04e488be806a5b55d14a83e9d50 100644 --- a/Source/Plugins/BuilderModes/Interface/DrawEllipseOptionsPanel.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/DrawEllipseOptionsPanel.Designer.cs @@ -38,6 +38,7 @@ this.anglelabel = new System.Windows.Forms.ToolStripLabel(); this.angle = new CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown(); this.reset = new System.Windows.Forms.ToolStripButton(); + this.showguidelines = new System.Windows.Forms.ToolStripButton(); this.toolStrip1.SuspendLayout(); this.SuspendLayout(); // @@ -45,6 +46,7 @@ // this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.continuousdrawing, + this.showguidelines, this.toolStripSeparator1, this.subdivslabel, this.subdivs, @@ -55,7 +57,7 @@ this.reset}); this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Size = new System.Drawing.Size(582, 25); + this.toolStrip1.Size = new System.Drawing.Size(646, 25); this.toolStrip1.TabIndex = 6; this.toolStrip1.Text = "toolStrip1"; // @@ -171,13 +173,24 @@ this.reset.Text = "Reset"; this.reset.Click += new System.EventHandler(this.reset_Click); // + // showguidelines + // + this.showguidelines.CheckOnClick = true; + this.showguidelines.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Guidelines; + this.showguidelines.ImageTransparentColor = System.Drawing.Color.Magenta; + this.showguidelines.Margin = new System.Windows.Forms.Padding(2, 1, 0, 2); + this.showguidelines.Name = "showguidelines"; + this.showguidelines.Size = new System.Drawing.Size(82, 22); + this.showguidelines.Text = "Guidelines"; + this.showguidelines.CheckedChanged += new System.EventHandler(this.showguidelines_CheckedChanged); + // // DrawEllipseOptionsPanel // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.Controls.Add(this.toolStrip1); this.Name = "DrawEllipseOptionsPanel"; - this.Size = new System.Drawing.Size(582, 60); + this.Size = new System.Drawing.Size(646, 60); this.toolStrip1.ResumeLayout(false); this.toolStrip1.PerformLayout(); this.ResumeLayout(false); @@ -197,5 +210,6 @@ private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripLabel anglelabel; private CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown angle; + private System.Windows.Forms.ToolStripButton showguidelines; } } diff --git a/Source/Plugins/BuilderModes/Interface/DrawEllipseOptionsPanel.cs b/Source/Plugins/BuilderModes/Interface/DrawEllipseOptionsPanel.cs index eee4b7e6a02adf3df084ca4bf65440e7a3918a77..ae9c75ceab78d01c078b65f9a70e462d9972fed9 100644 --- a/Source/Plugins/BuilderModes/Interface/DrawEllipseOptionsPanel.cs +++ b/Source/Plugins/BuilderModes/Interface/DrawEllipseOptionsPanel.cs @@ -7,6 +7,8 @@ namespace CodeImp.DoomBuilder.BuilderModes { public event EventHandler OnValueChanged; public event EventHandler OnContinuousDrawingChanged; + public event EventHandler OnShowGuidelinesChanged; + private bool blockevents; public int Spikiness { get { return (int)spikiness.Value; } set { blockevents = true; spikiness.Value = value; blockevents = false; } } @@ -17,6 +19,7 @@ namespace CodeImp.DoomBuilder.BuilderModes public int MaxSpikiness { get { return (int)spikiness.Maximum; } set { spikiness.Maximum = value; } } public int MinSpikiness { get { return (int)spikiness.Minimum; } set { spikiness.Minimum = value; } } public bool ContinuousDrawing { get { return continuousdrawing.Checked; } set { continuousdrawing.Checked = value; } } + public bool ShowGuidelines { get { return showguidelines.Checked; } set { showguidelines.Checked = value; } } public DrawEllipseOptionsPanel() { @@ -30,6 +33,7 @@ namespace CodeImp.DoomBuilder.BuilderModes angle.ValueChanged += ValueChanged; General.Interface.AddButton(continuousdrawing); + General.Interface.AddButton(showguidelines); General.Interface.AddButton(toolStripSeparator1); General.Interface.AddButton(subdivslabel); General.Interface.AddButton(subdivs); @@ -50,6 +54,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.RemoveButton(subdivs); General.Interface.RemoveButton(subdivslabel); General.Interface.RemoveButton(toolStripSeparator1); + General.Interface.RemoveButton(showguidelines); General.Interface.RemoveButton(continuousdrawing); } @@ -75,5 +80,10 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(OnContinuousDrawingChanged != null) OnContinuousDrawingChanged(continuousdrawing.Checked, EventArgs.Empty); } + + private void showguidelines_CheckedChanged(object sender, EventArgs e) + { + if(OnShowGuidelinesChanged != null) OnShowGuidelinesChanged(showguidelines.Checked, EventArgs.Empty); + } } } diff --git a/Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.Designer.cs b/Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.Designer.cs index ad2e5fd57cf72d4878b2f074b8cba52c9b0b896a..4e7a0c011e368d93c8f6c3af6e4565e7692725e9 100644 --- a/Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.Designer.cs @@ -43,6 +43,7 @@ this.label3 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.showguidelines = new System.Windows.Forms.CheckBox(); this.continuousdrawing = new System.Windows.Forms.CheckBox(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.slicesV)).BeginInit(); @@ -214,14 +215,26 @@ // this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox3.Controls.Add(this.showguidelines); this.groupBox3.Controls.Add(this.continuousdrawing); this.groupBox3.Location = new System.Drawing.Point(3, 225); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(200, 55); + this.groupBox3.Size = new System.Drawing.Size(200, 71); this.groupBox3.TabIndex = 11; this.groupBox3.TabStop = false; this.groupBox3.Text = "Additional options"; // + // showguidelines + // + this.showguidelines.AutoSize = true; + this.showguidelines.Location = new System.Drawing.Point(20, 47); + this.showguidelines.Name = "showguidelines"; + this.showguidelines.Size = new System.Drawing.Size(75, 17); + this.showguidelines.TabIndex = 16; + this.showguidelines.Text = "Guidelines"; + this.showguidelines.UseVisualStyleBackColor = true; + this.showguidelines.CheckedChanged += new System.EventHandler(this.showguidelines_CheckedChanged); + // // continuousdrawing // this.continuousdrawing.AutoSize = true; @@ -272,5 +285,6 @@ private System.Windows.Forms.CheckBox continuousdrawing; private System.Windows.Forms.ComboBox gridlockmode; private System.Windows.Forms.Label label5; + private System.Windows.Forms.CheckBox showguidelines; } } diff --git a/Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.cs b/Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.cs index f9476fc7835e457b0c786dc31147f64482ee6f13..7b838bd35b3a2b2d812d140e94ab35eb26c48b68 100644 --- a/Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.cs +++ b/Source/Plugins/BuilderModes/Interface/DrawGridOptionsPanel.cs @@ -10,6 +10,8 @@ namespace CodeImp.DoomBuilder.BuilderModes public event EventHandler OnValueChanged; public event EventHandler OnGridLockModeChanged; public event EventHandler OnContinuousDrawingChanged; + public event EventHandler OnShowGuidelinesChanged; + private bool blockevents; public bool Triangulate { get { return triangulate.Checked; } set { blockevents = true; triangulate.Checked = value; blockevents = false; } } @@ -19,6 +21,8 @@ namespace CodeImp.DoomBuilder.BuilderModes public int VerticalSlices { get { return (int)slicesV.Value; } set { blockevents = true; slicesV.Value = value; blockevents = false; } } public int MaxVerticalSlices { get { return (int)slicesV.Maximum; } set { slicesV.Maximum = value; } } public bool ContinuousDrawing { get { return continuousdrawing.Checked; } set { continuousdrawing.Checked = value; } } + public bool ShowGuidelines { get { return showguidelines.Checked; } set { showguidelines.Checked = value; } } + public InterpolationMode HorizontalInterpolationMode { get @@ -89,5 +93,10 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(OnContinuousDrawingChanged != null) OnContinuousDrawingChanged(continuousdrawing.Checked, EventArgs.Empty); } + + private void showguidelines_CheckedChanged(object sender, EventArgs e) + { + if(OnShowGuidelinesChanged != null) OnShowGuidelinesChanged(showguidelines.Checked, EventArgs.Empty); + } } } diff --git a/Source/Plugins/BuilderModes/Interface/DrawLineOptionsPanel.Designer.cs b/Source/Plugins/BuilderModes/Interface/DrawLineOptionsPanel.Designer.cs index af61aca311e5b07ea8b810d3f9afb9df4a254465..1ba2a406fb524bfdb96b55e64a5373a332074638 100644 --- a/Source/Plugins/BuilderModes/Interface/DrawLineOptionsPanel.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/DrawLineOptionsPanel.Designer.cs @@ -30,16 +30,20 @@ { this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.continuousdrawing = new System.Windows.Forms.ToolStripButton(); + this.autoclosedrawing = new System.Windows.Forms.ToolStripButton(); + this.showguidelines = new System.Windows.Forms.ToolStripButton(); this.toolStrip1.SuspendLayout(); this.SuspendLayout(); // // toolStrip1 // this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.continuousdrawing}); + this.continuousdrawing, + this.autoclosedrawing, + this.showguidelines}); this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Size = new System.Drawing.Size(200, 25); + this.toolStrip1.Size = new System.Drawing.Size(619, 25); this.toolStrip1.TabIndex = 8; this.toolStrip1.Text = "toolStrip1"; // @@ -53,13 +57,35 @@ this.continuousdrawing.Text = "Continuous drawing"; this.continuousdrawing.CheckedChanged += new System.EventHandler(this.continuousdrawing_CheckedChanged); // + // autoclosedrawing + // + this.autoclosedrawing.CheckOnClick = true; + this.autoclosedrawing.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.NewSector2; + this.autoclosedrawing.ImageTransparentColor = System.Drawing.Color.Magenta; + this.autoclosedrawing.Margin = new System.Windows.Forms.Padding(2, 1, 0, 2); + this.autoclosedrawing.Name = "autoclosedrawing"; + this.autoclosedrawing.Size = new System.Drawing.Size(133, 22); + this.autoclosedrawing.Text = "Auto-finish drawing"; + this.autoclosedrawing.CheckedChanged += new System.EventHandler(this.autoclosedrawing_CheckedChanged); + // + // showguidelines + // + this.showguidelines.CheckOnClick = true; + this.showguidelines.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Guidelines; + this.showguidelines.ImageTransparentColor = System.Drawing.Color.Magenta; + this.showguidelines.Margin = new System.Windows.Forms.Padding(2, 1, 0, 2); + this.showguidelines.Name = "showguidelines"; + this.showguidelines.Size = new System.Drawing.Size(82, 22); + this.showguidelines.Text = "Guidelines"; + this.showguidelines.CheckedChanged += new System.EventHandler(this.showguidelines_CheckedChanged); + // // DrawLineOptionsPanel // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.toolStrip1); this.Name = "DrawLineOptionsPanel"; - this.Size = new System.Drawing.Size(200, 60); + this.Size = new System.Drawing.Size(619, 60); this.toolStrip1.ResumeLayout(false); this.toolStrip1.PerformLayout(); this.ResumeLayout(false); @@ -71,5 +97,7 @@ private System.Windows.Forms.ToolStrip toolStrip1; private System.Windows.Forms.ToolStripButton continuousdrawing; + private System.Windows.Forms.ToolStripButton autoclosedrawing; + private System.Windows.Forms.ToolStripButton showguidelines; } } diff --git a/Source/Plugins/BuilderModes/Interface/DrawLineOptionsPanel.cs b/Source/Plugins/BuilderModes/Interface/DrawLineOptionsPanel.cs index fbc34259572874728f491ffcfb9bb3564282c11f..178260b0c700a51ce7901b7d4c581fb1bf06278e 100644 --- a/Source/Plugins/BuilderModes/Interface/DrawLineOptionsPanel.cs +++ b/Source/Plugins/BuilderModes/Interface/DrawLineOptionsPanel.cs @@ -6,8 +6,12 @@ namespace CodeImp.DoomBuilder.BuilderModes internal partial class DrawLineOptionsPanel : UserControl { public event EventHandler OnContinuousDrawingChanged; + public event EventHandler OnAutoCloseDrawingChanged; + public event EventHandler OnShowGuidelinesChanged; public bool ContinuousDrawing { get { return continuousdrawing.Checked; } set { continuousdrawing.Checked = value; } } + public bool AutoCloseDrawing { get { return autoclosedrawing.Checked; } set { autoclosedrawing.Checked = value; } } + public bool ShowGuidelines { get { return showguidelines.Checked; } set { showguidelines.Checked = value; } } public DrawLineOptionsPanel() { @@ -17,10 +21,14 @@ namespace CodeImp.DoomBuilder.BuilderModes public void Register() { General.Interface.AddButton(continuousdrawing); + General.Interface.AddButton(autoclosedrawing); + General.Interface.AddButton(showguidelines); } public void Unregister() { + General.Interface.RemoveButton(showguidelines); + General.Interface.RemoveButton(autoclosedrawing); General.Interface.RemoveButton(continuousdrawing); } @@ -28,5 +36,15 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(OnContinuousDrawingChanged != null) OnContinuousDrawingChanged(continuousdrawing.Checked, EventArgs.Empty); } + + private void autoclosedrawing_CheckedChanged(object sender, EventArgs e) + { + if(OnAutoCloseDrawingChanged != null) OnAutoCloseDrawingChanged(autoclosedrawing.Checked, EventArgs.Empty); + } + + private void showguidelines_CheckedChanged(object sender, EventArgs e) + { + if(OnShowGuidelinesChanged != null) OnShowGuidelinesChanged(showguidelines.Checked, EventArgs.Empty); + } } } diff --git a/Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.Designer.cs b/Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.Designer.cs index edfc1649d47fae246ca72d5f7dd31d3fd7cd1240..098b70bec3bb484f8aebf09e5fc4ee6a399209ef 100644 --- a/Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.Designer.cs @@ -29,12 +29,13 @@ private void InitializeComponent() { this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.continuousdrawing = new System.Windows.Forms.ToolStripButton(); + this.showguidelines = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.radiuslabel = new System.Windows.Forms.ToolStripLabel(); this.radius = new CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown(); this.subdivslabel = new System.Windows.Forms.ToolStripLabel(); this.subdivs = new CodeImp.DoomBuilder.Controls.ToolStripNumericUpDown(); - this.continuousdrawing = new System.Windows.Forms.ToolStripButton(); this.reset = new System.Windows.Forms.ToolStripButton(); this.toolStrip1.SuspendLayout(); this.SuspendLayout(); @@ -43,6 +44,7 @@ // this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.continuousdrawing, + this.showguidelines, this.toolStripSeparator1, this.radiuslabel, this.radius, @@ -51,10 +53,31 @@ this.reset}); this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Size = new System.Drawing.Size(488, 25); + this.toolStrip1.Size = new System.Drawing.Size(750, 25); this.toolStrip1.TabIndex = 7; this.toolStrip1.Text = "toolStrip1"; // + // continuousdrawing + // + this.continuousdrawing.CheckOnClick = true; + this.continuousdrawing.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Repeat; + this.continuousdrawing.ImageTransparentColor = System.Drawing.Color.Magenta; + this.continuousdrawing.Name = "continuousdrawing"; + this.continuousdrawing.Size = new System.Drawing.Size(135, 22); + this.continuousdrawing.Text = "Continuous drawing"; + this.continuousdrawing.CheckedChanged += new System.EventHandler(this.continuousdrawing_CheckedChanged); + // + // showguidelines + // + this.showguidelines.CheckOnClick = true; + this.showguidelines.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Guidelines; + this.showguidelines.ImageTransparentColor = System.Drawing.Color.Magenta; + this.showguidelines.Margin = new System.Windows.Forms.Padding(2, 1, 0, 2); + this.showguidelines.Name = "showguidelines"; + this.showguidelines.Size = new System.Drawing.Size(82, 22); + this.showguidelines.Text = "Guidelines"; + this.showguidelines.CheckedChanged += new System.EventHandler(this.showguidelines_CheckedChanged); + // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; @@ -88,7 +111,6 @@ 0, 0, 0}); - this.radius.ValueChanged += new System.EventHandler(this.ValueChanged); // // subdivslabel // @@ -118,17 +140,6 @@ 0, 0, 0}); - this.subdivs.ValueChanged += new System.EventHandler(this.ValueChanged); - // - // continuousdrawing - // - this.continuousdrawing.CheckOnClick = true; - this.continuousdrawing.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Repeat; - this.continuousdrawing.ImageTransparentColor = System.Drawing.Color.Magenta; - this.continuousdrawing.Name = "continuousdrawing"; - this.continuousdrawing.Size = new System.Drawing.Size(135, 22); - this.continuousdrawing.Text = "Continuous drawing"; - this.continuousdrawing.CheckedChanged += new System.EventHandler(this.continuousdrawing_CheckedChanged); // // reset // @@ -146,7 +157,7 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.Controls.Add(this.toolStrip1); this.Name = "DrawRectangleOptionsPanel"; - this.Size = new System.Drawing.Size(488, 60); + this.Size = new System.Drawing.Size(750, 60); this.toolStrip1.ResumeLayout(false); this.toolStrip1.PerformLayout(); this.ResumeLayout(false); @@ -164,5 +175,6 @@ private System.Windows.Forms.ToolStripButton reset; private System.Windows.Forms.ToolStripButton continuousdrawing; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripButton showguidelines; } } diff --git a/Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.cs b/Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.cs index bb4f638729c2f670329da6ed3a401fd80a7ad8fe..a2f2c5588babed7a29f7aa629f7274bad2ff790b 100644 --- a/Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.cs +++ b/Source/Plugins/BuilderModes/Interface/DrawRectangleOptionsPanel.cs @@ -7,6 +7,8 @@ namespace CodeImp.DoomBuilder.BuilderModes { public event EventHandler OnValueChanged; public event EventHandler OnContinuousDrawingChanged; + public event EventHandler OnShowGuidelinesChanged; + private bool blockevents; public int BevelWidth { get { return (int)radius.Value; } set { blockevents = true; radius.Value = value; blockevents = false; } } @@ -16,6 +18,7 @@ namespace CodeImp.DoomBuilder.BuilderModes public int MaxSubdivisions { get { return (int)subdivs.Maximum; } set { subdivs.Maximum = value; } } public int MinSubdivisions { get { return (int)subdivs.Minimum; } set { subdivs.Minimum = value; } } public bool ContinuousDrawing { get { return continuousdrawing.Checked; } set { continuousdrawing.Checked = value; } } + public bool ShowGuidelines { get { return showguidelines.Checked; } set { showguidelines.Checked = value; } } public DrawRectangleOptionsPanel() { @@ -28,6 +31,7 @@ namespace CodeImp.DoomBuilder.BuilderModes subdivs.ValueChanged += ValueChanged; General.Interface.AddButton(continuousdrawing); + General.Interface.AddButton(showguidelines); General.Interface.AddButton(toolStripSeparator1); General.Interface.AddButton(radiuslabel); General.Interface.AddButton(radius); @@ -44,6 +48,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.RemoveButton(radius); General.Interface.RemoveButton(radiuslabel); General.Interface.RemoveButton(toolStripSeparator1); + General.Interface.RemoveButton(showguidelines); General.Interface.RemoveButton(continuousdrawing); } @@ -68,5 +73,10 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(OnContinuousDrawingChanged != null) OnContinuousDrawingChanged(continuousdrawing.Checked, EventArgs.Empty); } + + private void showguidelines_CheckedChanged(object sender, EventArgs e) + { + if(OnShowGuidelinesChanged != null) OnShowGuidelinesChanged(showguidelines.Checked, EventArgs.Empty); + } } } diff --git a/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.Designer.cs b/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.Designer.cs index 637d09b3bb3164d29d0a17c71df0873d5f275ef4..9def94da2c8bf9fd65b21317aa8891e4de451291 100644 --- a/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.Designer.cs @@ -16,6 +16,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(disposing && (components != null)) { components.Dispose(); + mode = null; //mxd } base.Dispose(disposing); } @@ -29,6 +30,7 @@ namespace CodeImp.DoomBuilder.BuilderModes private void InitializeComponent() { this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditSelectionPanel)); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.preciseposition = new System.Windows.Forms.CheckBox(); this.orgposy = new System.Windows.Forms.Button(); @@ -57,6 +59,8 @@ namespace CodeImp.DoomBuilder.BuilderModes this.abssizex = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); this.label3 = new System.Windows.Forms.Label(); this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.heightmode = new System.Windows.Forms.ComboBox(); + this.label10 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label(); this.flipv = new System.Windows.Forms.Button(); this.fliph = new System.Windows.Forms.Button(); @@ -111,11 +115,12 @@ namespace CodeImp.DoomBuilder.BuilderModes this.preciseposition.Location = new System.Drawing.Point(58, 115); this.preciseposition.Name = "preciseposition"; this.preciseposition.Size = new System.Drawing.Size(146, 17); - this.preciseposition.TabIndex = 36; + this.preciseposition.TabIndex = 6; this.preciseposition.Text = "High precision positioning"; this.tooltip.SetToolTip(this.preciseposition, "When checked, thing and vertex positions will be set using floating point precisi" + "on.\r\nOtherwise, they will be rounded to the nearest integer."); this.preciseposition.UseVisualStyleBackColor = true; + this.preciseposition.CheckedChanged += new System.EventHandler(this.preciseposition_CheckedChanged); // // orgposy // @@ -123,7 +128,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.orgposy.Location = new System.Drawing.Point(136, 23); this.orgposy.Name = "orgposy"; this.orgposy.Size = new System.Drawing.Size(72, 24); - this.orgposy.TabIndex = 29; + this.orgposy.TabIndex = 1; this.orgposy.Text = "-2000"; this.orgposy.UseVisualStyleBackColor = true; this.orgposy.Click += new System.EventHandler(this.orgposy_Click); @@ -134,7 +139,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.orgposx.Location = new System.Drawing.Point(58, 23); this.orgposx.Name = "orgposx"; this.orgposx.Size = new System.Drawing.Size(72, 24); - this.orgposx.TabIndex = 28; + this.orgposx.TabIndex = 0; this.orgposx.Text = "-2000"; this.orgposx.UseVisualStyleBackColor = true; this.orgposx.Click += new System.EventHandler(this.orgposx_Click); @@ -190,7 +195,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.relposy.Name = "relposy"; this.relposy.Size = new System.Drawing.Size(72, 24); this.relposy.StepValues = null; - this.relposy.TabIndex = 11; + this.relposy.TabIndex = 5; this.relposy.WhenEnterPressed += new System.EventHandler(this.relposy_Validated); this.relposy.Validated += new System.EventHandler(this.relposy_Validated); this.relposy.WhenButtonsClicked += new System.EventHandler(this.relposy_Validated); @@ -211,7 +216,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.relposx.Name = "relposx"; this.relposx.Size = new System.Drawing.Size(72, 24); this.relposx.StepValues = null; - this.relposx.TabIndex = 10; + this.relposx.TabIndex = 4; this.relposx.WhenEnterPressed += new System.EventHandler(this.relposx_Validated); this.relposx.Validated += new System.EventHandler(this.relposx_Validated); this.relposx.WhenButtonsClicked += new System.EventHandler(this.relposx_Validated); @@ -232,7 +237,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.absposy.Name = "absposy"; this.absposy.Size = new System.Drawing.Size(72, 24); this.absposy.StepValues = null; - this.absposy.TabIndex = 9; + this.absposy.TabIndex = 3; this.absposy.WhenEnterPressed += new System.EventHandler(this.absposy_Validated); this.absposy.Validated += new System.EventHandler(this.absposy_Validated); this.absposy.WhenButtonsClicked += new System.EventHandler(this.absposy_Validated); @@ -253,7 +258,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.absposx.Name = "absposx"; this.absposx.Size = new System.Drawing.Size(72, 24); this.absposx.StepValues = null; - this.absposx.TabIndex = 8; + this.absposx.TabIndex = 2; this.absposx.WhenEnterPressed += new System.EventHandler(this.absposx_Validated); this.absposx.Validated += new System.EventHandler(this.absposx_Validated); this.absposx.WhenButtonsClicked += new System.EventHandler(this.absposx_Validated); @@ -306,7 +311,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.orgsizey.Location = new System.Drawing.Point(136, 23); this.orgsizey.Name = "orgsizey"; this.orgsizey.Size = new System.Drawing.Size(72, 24); - this.orgsizey.TabIndex = 31; + this.orgsizey.TabIndex = 1; this.orgsizey.Text = "-2000"; this.orgsizey.UseVisualStyleBackColor = true; this.orgsizey.Click += new System.EventHandler(this.orgsizey_Click); @@ -317,7 +322,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.orgsizex.Location = new System.Drawing.Point(58, 23); this.orgsizex.Name = "orgsizex"; this.orgsizex.Size = new System.Drawing.Size(72, 24); - this.orgsizex.TabIndex = 30; + this.orgsizex.TabIndex = 0; this.orgsizex.Text = "-2000"; this.orgsizex.UseVisualStyleBackColor = true; this.orgsizex.Click += new System.EventHandler(this.orgsizex_Click); @@ -373,7 +378,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.relsizey.Name = "relsizey"; this.relsizey.Size = new System.Drawing.Size(72, 24); this.relsizey.StepValues = null; - this.relsizey.TabIndex = 15; + this.relsizey.TabIndex = 5; this.relsizey.WhenEnterPressed += new System.EventHandler(this.relsizey_Validated); this.relsizey.Validated += new System.EventHandler(this.relsizey_Validated); this.relsizey.WhenButtonsClicked += new System.EventHandler(this.relsizey_Validated); @@ -394,7 +399,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.relsizex.Name = "relsizex"; this.relsizex.Size = new System.Drawing.Size(72, 24); this.relsizex.StepValues = null; - this.relsizex.TabIndex = 14; + this.relsizex.TabIndex = 4; this.relsizex.WhenEnterPressed += new System.EventHandler(this.relsizex_Validated); this.relsizex.Validated += new System.EventHandler(this.relsizex_Validated); this.relsizex.WhenButtonsClicked += new System.EventHandler(this.relsizex_Validated); @@ -424,7 +429,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.abssizey.Name = "abssizey"; this.abssizey.Size = new System.Drawing.Size(72, 24); this.abssizey.StepValues = null; - this.abssizey.TabIndex = 12; + this.abssizey.TabIndex = 3; this.abssizey.WhenEnterPressed += new System.EventHandler(this.abssizey_Validated); this.abssizey.Validated += new System.EventHandler(this.abssizey_Validated); this.abssizey.WhenButtonsClicked += new System.EventHandler(this.abssizey_Validated); @@ -445,7 +450,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.abssizex.Name = "abssizex"; this.abssizex.Size = new System.Drawing.Size(72, 24); this.abssizex.StepValues = null; - this.abssizex.TabIndex = 11; + this.abssizex.TabIndex = 2; this.abssizex.WhenEnterPressed += new System.EventHandler(this.abssizex_Validated); this.abssizex.Validated += new System.EventHandler(this.abssizex_Validated); this.abssizex.WhenButtonsClicked += new System.EventHandler(this.abssizex_Validated); @@ -464,6 +469,8 @@ namespace CodeImp.DoomBuilder.BuilderModes // this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox3.Controls.Add(this.heightmode); + this.groupBox3.Controls.Add(this.label10); this.groupBox3.Controls.Add(this.label14); this.groupBox3.Controls.Add(this.flipv); this.groupBox3.Controls.Add(this.fliph); @@ -472,15 +479,42 @@ namespace CodeImp.DoomBuilder.BuilderModes this.groupBox3.Controls.Add(this.absrot); this.groupBox3.Location = new System.Drawing.Point(3, 272); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(243, 91); + this.groupBox3.Size = new System.Drawing.Size(243, 122); this.groupBox3.TabIndex = 2; this.groupBox3.TabStop = false; this.groupBox3.Text = "Transform:"; // + // heightmode + // + this.heightmode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.heightmode.FormattingEnabled = true; + this.heightmode.Items.AddRange(new object[] { + "Don\'t adjust height", + "Adjust floor height", + "Adjust ceiling height", + "Adjust floor and ceiling heights"}); + this.heightmode.Location = new System.Drawing.Point(58, 53); + this.heightmode.Name = "heightmode"; + this.heightmode.Size = new System.Drawing.Size(171, 21); + this.heightmode.TabIndex = 29; + this.heightmode.SelectedIndexChanged += new System.EventHandler(this.heightmode_SelectedIndexChanged); + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.label10.ForeColor = System.Drawing.SystemColors.HotTrack; + this.label10.Location = new System.Drawing.Point(14, 56); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(41, 13); + this.label10.TabIndex = 28; + this.label10.Text = "Height:"; + this.tooltip.SetToolTip(this.label10, resources.GetString("label10.ToolTip")); + // // label14 // this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(9, 61); + this.label14.Location = new System.Drawing.Point(9, 88); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(46, 13); this.label14.TabIndex = 27; @@ -490,10 +524,11 @@ namespace CodeImp.DoomBuilder.BuilderModes // this.flipv.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.flipv.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.FlipSelectionV; - this.flipv.Location = new System.Drawing.Point(94, 53); + this.flipv.Location = new System.Drawing.Point(94, 80); this.flipv.Name = "flipv"; this.flipv.Size = new System.Drawing.Size(30, 30); - this.flipv.TabIndex = 26; + this.flipv.TabIndex = 2; + this.tooltip.SetToolTip(this.flipv, "Flip Selection Vertically"); this.flipv.UseVisualStyleBackColor = true; this.flipv.Click += new System.EventHandler(this.flipv_Click); // @@ -501,10 +536,11 @@ namespace CodeImp.DoomBuilder.BuilderModes // this.fliph.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.fliph.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.FlipSelectionH; - this.fliph.Location = new System.Drawing.Point(58, 53); + this.fliph.Location = new System.Drawing.Point(58, 80); this.fliph.Name = "fliph"; this.fliph.Size = new System.Drawing.Size(30, 30); - this.fliph.TabIndex = 25; + this.fliph.TabIndex = 1; + this.tooltip.SetToolTip(this.fliph, "Flip Selection Horizontally"); this.fliph.UseVisualStyleBackColor = true; this.fliph.Click += new System.EventHandler(this.fliph_Click); // @@ -522,9 +558,9 @@ namespace CodeImp.DoomBuilder.BuilderModes this.label11.AutoSize = true; this.label11.Location = new System.Drawing.Point(146, 28); this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(13, 13); + this.label11.Size = new System.Drawing.Size(28, 13); this.label11.TabIndex = 22; - this.label11.Text = "�"; + this.label11.Text = "deg."; // // absrot // @@ -541,7 +577,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.absrot.Name = "absrot"; this.absrot.Size = new System.Drawing.Size(82, 24); this.absrot.StepValues = null; - this.absrot.TabIndex = 24; + this.absrot.TabIndex = 0; this.absrot.WhenEnterPressed += new System.EventHandler(this.absrot_Validated); this.absrot.Validated += new System.EventHandler(this.absrot_Validated); this.absrot.WhenButtonsClicked += new System.EventHandler(this.absrot_Validated); @@ -554,7 +590,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.ceiltexgroup.Controls.Add(this.ceiltexoffset); this.ceiltexgroup.Controls.Add(this.ceiltexrotation); this.ceiltexgroup.Controls.Add(this.ceiltexscale); - this.ceiltexgroup.Location = new System.Drawing.Point(3, 369); + this.ceiltexgroup.Location = new System.Drawing.Point(3, 401); this.ceiltexgroup.Name = "ceiltexgroup"; this.ceiltexgroup.Size = new System.Drawing.Size(243, 58); this.ceiltexgroup.TabIndex = 3; @@ -567,7 +603,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.ceiltexoffset.Location = new System.Drawing.Point(27, 28); this.ceiltexoffset.Name = "ceiltexoffset"; this.ceiltexoffset.Size = new System.Drawing.Size(54, 17); - this.ceiltexoffset.TabIndex = 30; + this.ceiltexoffset.TabIndex = 0; this.ceiltexoffset.Text = "Offset"; this.ceiltexoffset.UseVisualStyleBackColor = true; this.ceiltexoffset.CheckedChanged += new System.EventHandler(this.ceiltexoffset_CheckedChanged); @@ -578,7 +614,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.ceiltexrotation.Location = new System.Drawing.Point(89, 28); this.ceiltexrotation.Name = "ceiltexrotation"; this.ceiltexrotation.Size = new System.Drawing.Size(66, 17); - this.ceiltexrotation.TabIndex = 32; + this.ceiltexrotation.TabIndex = 1; this.ceiltexrotation.Text = "Rotation"; this.ceiltexrotation.UseVisualStyleBackColor = true; this.ceiltexrotation.CheckedChanged += new System.EventHandler(this.ceiltexrotation_CheckedChanged); @@ -589,7 +625,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.ceiltexscale.Location = new System.Drawing.Point(163, 28); this.ceiltexscale.Name = "ceiltexscale"; this.ceiltexscale.Size = new System.Drawing.Size(53, 17); - this.ceiltexscale.TabIndex = 35; + this.ceiltexscale.TabIndex = 2; this.ceiltexscale.Text = "Scale"; this.ceiltexscale.UseVisualStyleBackColor = true; this.ceiltexscale.CheckedChanged += new System.EventHandler(this.ceiltexscale_CheckedChanged); @@ -597,10 +633,10 @@ namespace CodeImp.DoomBuilder.BuilderModes // ceiltexall // this.ceiltexall.AutoSize = true; - this.ceiltexall.Location = new System.Drawing.Point(14, 368); + this.ceiltexall.Location = new System.Drawing.Point(14, 400); this.ceiltexall.Name = "ceiltexall"; this.ceiltexall.Size = new System.Drawing.Size(154, 17); - this.ceiltexall.TabIndex = 37; + this.ceiltexall.TabIndex = 0; this.ceiltexall.Text = "Ceiling Textures Transform:"; this.ceiltexall.UseVisualStyleBackColor = true; this.ceiltexall.CheckedChanged += new System.EventHandler(this.ceiltexall_CheckedChanged); @@ -611,7 +647,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.floortexrotation.Location = new System.Drawing.Point(89, 28); this.floortexrotation.Name = "floortexrotation"; this.floortexrotation.Size = new System.Drawing.Size(66, 17); - this.floortexrotation.TabIndex = 31; + this.floortexrotation.TabIndex = 1; this.floortexrotation.Text = "Rotation"; this.floortexrotation.UseVisualStyleBackColor = true; this.floortexrotation.CheckedChanged += new System.EventHandler(this.floortexrotation_CheckedChanged); @@ -622,7 +658,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.floortexoffset.Location = new System.Drawing.Point(27, 28); this.floortexoffset.Name = "floortexoffset"; this.floortexoffset.Size = new System.Drawing.Size(54, 17); - this.floortexoffset.TabIndex = 4; + this.floortexoffset.TabIndex = 0; this.floortexoffset.Text = "Offset"; this.floortexoffset.UseVisualStyleBackColor = true; this.floortexoffset.CheckedChanged += new System.EventHandler(this.floortexoffset_CheckedChanged); @@ -633,7 +669,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.floortexscale.Location = new System.Drawing.Point(163, 28); this.floortexscale.Name = "floortexscale"; this.floortexscale.Size = new System.Drawing.Size(53, 17); - this.floortexscale.TabIndex = 34; + this.floortexscale.TabIndex = 2; this.floortexscale.Text = "Scale"; this.floortexscale.UseVisualStyleBackColor = true; this.floortexscale.CheckedChanged += new System.EventHandler(this.floortexscale_CheckedChanged); @@ -641,10 +677,10 @@ namespace CodeImp.DoomBuilder.BuilderModes // floortexall // this.floortexall.AutoSize = true; - this.floortexall.Location = new System.Drawing.Point(14, 432); + this.floortexall.Location = new System.Drawing.Point(14, 464); this.floortexall.Name = "floortexall"; this.floortexall.Size = new System.Drawing.Size(146, 17); - this.floortexall.TabIndex = 36; + this.floortexall.TabIndex = 1; this.floortexall.Text = "Floor Textures Transform:"; this.floortexall.UseVisualStyleBackColor = true; this.floortexall.CheckedChanged += new System.EventHandler(this.floortexall_CheckedChanged); @@ -656,7 +692,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.floortexgroup.Controls.Add(this.floortexoffset); this.floortexgroup.Controls.Add(this.floortexrotation); this.floortexgroup.Controls.Add(this.floortexscale); - this.floortexgroup.Location = new System.Drawing.Point(3, 433); + this.floortexgroup.Location = new System.Drawing.Point(3, 465); this.floortexgroup.Name = "floortexgroup"; this.floortexgroup.Size = new System.Drawing.Size(243, 58); this.floortexgroup.TabIndex = 38; @@ -738,5 +774,7 @@ namespace CodeImp.DoomBuilder.BuilderModes private System.Windows.Forms.GroupBox floortexgroup; private System.Windows.Forms.CheckBox preciseposition; private System.Windows.Forms.ToolTip tooltip; + private System.Windows.Forms.ComboBox heightmode; + private System.Windows.Forms.Label label10; } } diff --git a/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.cs b/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.cs index c90399ae2b4f0e86461af9bfa204641de7565b69..05b7e4b709033c073137341b76b49fe901c119fd 100644 --- a/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.cs +++ b/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.cs @@ -33,20 +33,20 @@ namespace CodeImp.DoomBuilder.BuilderModes #region ================== Variables // Editing mode - readonly EditSelectionMode mode; + private EditSelectionMode mode; // Input private bool userinput; private bool preventchanges; //mxd // Values - Vector2D orgpos; - Vector2D orgsize; - Vector2D abspos; - Vector2D relpos; - Vector2D abssize; - Vector2D relsize; - float absrotate; + private Vector2D orgpos; + private Vector2D orgsize; + private Vector2D abspos; + private Vector2D relpos; + private Vector2D abssize; + private Vector2D relsize; + private float absrotate; #endregion @@ -59,17 +59,22 @@ namespace CodeImp.DoomBuilder.BuilderModes this.mode = mode; //mxd + preventchanges = true; if(General.Map.UDMF) { preciseposition.Checked = mode.UsePrecisePosition; preciseposition.Enabled = true; - preciseposition.CheckedChanged += preciseposition_CheckedChanged; } else { preciseposition.Checked = false; preciseposition.Enabled = false; } + preventchanges = false; + + //mxd. Otherwise the focus will go to one of TextBoxes + // and stay there forever preventing tab collapsing when in collapsed mode + label1.Focus(); } #endregion @@ -142,6 +147,15 @@ namespace CodeImp.DoomBuilder.BuilderModes preventchanges = false; } + //mxd + internal void SetHeightAdjustMode(EditSelectionMode.HeightAdjustMode adjustmode, bool enable) + { + preventchanges = true; + heightmode.SelectedIndex = (int)adjustmode; + heightmode.Enabled = enable; + preventchanges = false; + } + //mxd private void UpdateAllFloorTransformsCheckbox() { @@ -364,9 +378,17 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd private void preciseposition_CheckedChanged(object sender, EventArgs e) { + if(preventchanges) return; mode.UsePrecisePosition = preciseposition.Checked; General.Interface.FocusDisplay(); } + + //mxd + private void heightmode_SelectedIndexChanged(object sender, EventArgs e) + { + if(preventchanges || heightmode.SelectedIndex == -1) return; + mode.SectorHeightAdjustMode = (EditSelectionMode.HeightAdjustMode)heightmode.SelectedIndex; + } #endregion } diff --git a/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.resx b/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.resx index aa747e0add43c12e1337a1e40a6331676f4ade55..b6c665b7c777cc42410db3dc976008069dc14d3d 100644 --- a/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.resx +++ b/Source/Plugins/BuilderModes/Interface/EditSelectionPanel.resx @@ -120,6 +120,16 @@ <metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> + <data name="label10.ToolTip" xml:space="preserve"> + <value>Allows to adjust floor/ceiling heights of the selection +based on floor/ceiling heights difference between +sectors outside selected sectors. + +Applied only when selected sectors were surrounded +by sectors with the same target height when the mode +was enabled, and are surrounded by sectors with the +same target height when the mode is applied.</value> + </data> <metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> diff --git a/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.Designer.cs index 9c524100ec8c65bdc90a0f7e5654f3d7d890bada..cf779ea32a748c7e04e8ca9305487e29d2c1da19 100644 --- a/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.Designer.cs @@ -286,7 +286,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ErrorCheckForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; diff --git a/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.cs b/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.cs index f0dabd2aef2cace61766e8dfe188db1fc80977e4..9d74414ab417d8376090f9787f73e664eae35419 100644 --- a/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.cs +++ b/Source/Plugins/BuilderModes/Interface/ErrorCheckForm.cs @@ -92,6 +92,31 @@ namespace CodeImp.DoomBuilder.BuilderModes object[] attr = t.GetCustomAttributes(typeof(ErrorCheckerAttribute), true); if(attr.Length > 0) { + //mxd. Skip this check?.. + ErrorChecker checker; + + try + { + // Create instance + checker = (ErrorChecker)Assembly.GetExecutingAssembly().CreateInstance(t.FullName, false, BindingFlags.Default, null, null, CultureInfo.CurrentCulture, new object[0]); + } + catch(TargetInvocationException ex) + { + // Error! + General.ErrorLogger.Add(ErrorType.Error, "Failed to create class instance \"" + t.Name + "\""); + General.WriteLogLine(ex.InnerException.GetType().Name + ": " + ex.InnerException.Message); + throw; + } + catch(Exception ex) + { + // Error! + General.ErrorLogger.Add(ErrorType.Error, "Failed to create class instance \"" + t.Name + "\""); + General.WriteLogLine(ex.GetType().Name + ": " + ex.Message); + throw; + } + + if(checker.SkipCheck) continue; + ErrorCheckerAttribute checkerattr = (attr[0] as ErrorCheckerAttribute); // Add the type to the checkbox list diff --git a/Source/Plugins/BuilderModes/Interface/FilterSelectedThingsForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/FilterSelectedThingsForm.Designer.cs index ea9a41d7ed63793005260c73873f3c167ece0850..675736df5c4b302a9c5f7633b2d1db7783bc2c19 100644 --- a/Source/Plugins/BuilderModes/Interface/FilterSelectedThingsForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/FilterSelectedThingsForm.Designer.cs @@ -28,9 +28,9 @@ /// </summary> private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); this.cancel = new System.Windows.Forms.Button(); this.apply = new System.Windows.Forms.Button(); this.textBox1 = new System.Windows.Forms.TextBox(); @@ -90,14 +90,14 @@ this.dataGridView.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.dataGridView.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; this.dataGridView.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.ThingType, @@ -115,8 +115,8 @@ // ThingType // this.ThingType.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.ColumnHeader; - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.ThingType.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.ThingType.DefaultCellStyle = dataGridViewCellStyle2; this.ThingType.HeaderText = "Type"; this.ThingType.Name = "ThingType"; this.ThingType.ReadOnly = true; @@ -125,8 +125,8 @@ // ThingTitle // this.ThingTitle.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.ThingTitle.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.ThingTitle.DefaultCellStyle = dataGridViewCellStyle3; this.ThingTitle.HeaderText = "Title"; this.ThingTitle.Name = "ThingTitle"; this.ThingTitle.ReadOnly = true; @@ -153,7 +153,7 @@ this.Controls.Add(this.dataGridView); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; this.Name = "FilterSelectedThingsForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowInTaskbar = false; this.Text = "Filter Selected Things"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FilterSelectedThingsForm_FormClosing); diff --git a/Source/Plugins/BuilderModes/Interface/FindReplaceForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/FindReplaceForm.Designer.cs index a58c0dae5088a89921a89e4d0570e939eafb75fd..0754c7aec96e6aa053a4c7d0db50baec8e32a187 100644 --- a/Source/Plugins/BuilderModes/Interface/FindReplaceForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/FindReplaceForm.Designer.cs @@ -73,6 +73,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.searchtypes.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.searchtypes.FormattingEnabled = true; this.searchtypes.Location = new System.Drawing.Point(109, 12); + this.searchtypes.MaxDropDownItems = 40; this.searchtypes.Name = "searchtypes"; this.searchtypes.Size = new System.Drawing.Size(156, 21); this.searchtypes.Sorted = true; @@ -248,7 +249,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "FindReplaceForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; diff --git a/Source/Plugins/BuilderModes/Interface/FindReplaceForm.cs b/Source/Plugins/BuilderModes/Interface/FindReplaceForm.cs index 789112fa47269c5515c061af3576a19282e5b36e..debb4224b0a0106e3d75761ddf275cb985632177 100644 --- a/Source/Plugins/BuilderModes/Interface/FindReplaceForm.cs +++ b/Source/Plugins/BuilderModes/Interface/FindReplaceForm.cs @@ -36,12 +36,13 @@ namespace CodeImp.DoomBuilder.BuilderModes #region ================== Variables + private FindReplaceMode mode; //mxd private FindReplaceType newfinder; private FindReplaceType finder; private List<FindReplaceType> findtypeslist; - bool controlpressed; - bool shiftpressed; - bool suppressevents; + private bool controlpressed; + private bool shiftpressed; + private bool suppressevents; private Font hintfont; //mxd #endregion @@ -189,7 +190,11 @@ namespace CodeImp.DoomBuilder.BuilderModes // Withdraw the undo step if nothing was replaced if(resultslist.Items.Count < 1) + { + mode.Volatile = false; //mxd. Otherwice UndoManager.PerformUndo will cancel the mode... General.Map.UndoRedo.WithdrawUndo(); + mode.Volatile = true; //mxd + } } else { @@ -368,14 +373,13 @@ namespace CodeImp.DoomBuilder.BuilderModes #region ================== Methods // This shows the window - public void Show(Form owner) + public void Show(Form owner, FindReplaceMode mode) { - // First time showing? - //if((this.Location.X == 0) && (this.Location.Y == 0)) - { - // Position at left-top of owner - this.Location = new Point(owner.Location.X + 20, owner.Location.Y + 90); - } + //mxd + this.mode = mode; + + // Position at left-top of owner + this.Location = new Point(owner.Location.X + 20, owner.Location.Y + 90); // Re-fill the search types list searchtypes.Items.Clear(); @@ -396,8 +400,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } // Select first if none was selected - if(searchtypes.SelectedIndex < 0) - searchtypes.SelectedIndex = 0; + if(searchtypes.SelectedIndex < 0) searchtypes.SelectedIndex = 0; // Close results part resultspanel.Visible = false; diff --git a/Source/Plugins/BuilderModes/Interface/FitTexturesForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/FitTexturesForm.Designer.cs index 9a14dc4647413008108aa19a3d3301e93db545dc..eb432640c3485db3d7d187d6c270e264df7407c2 100644 --- a/Source/Plugins/BuilderModes/Interface/FitTexturesForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/FitTexturesForm.Designer.cs @@ -223,7 +223,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "FitTexturesForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Plugins/BuilderModes/Interface/MakeDoorForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/MakeDoorForm.Designer.cs index f61b2bad134faf86cb2b361ab2fda10d43f66a94..786bf2cf9918d2c19530de3eb9e93aac76744963 100644 --- a/Source/Plugins/BuilderModes/Interface/MakeDoorForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/MakeDoorForm.Designer.cs @@ -178,6 +178,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Interface this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "MakeDoorForm"; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Plugins/BuilderModes/Interface/MenusForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/MenusForm.Designer.cs index ae0a976627c52870d1f25ccadca16ce546f6316a..6ff53db583e68608b8c6edfff7f9d74a8893766a 100644 --- a/Source/Plugins/BuilderModes/Interface/MenusForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/MenusForm.Designer.cs @@ -127,6 +127,8 @@ namespace CodeImp.DoomBuilder.BuilderModes this.itemcopyprops = new System.Windows.Forms.ToolStripMenuItem(); this.itempasteprops = new System.Windows.Forms.ToolStripMenuItem(); this.itempastepropsoptions = new System.Windows.Forms.ToolStripMenuItem(); + this.alignsectorlinedefsitem = new System.Windows.Forms.ToolStripMenuItem(); + this.alignlinedefsitem = new System.Windows.Forms.ToolStripMenuItem(); this.menustrip.SuspendLayout(); this.manualstrip.SuspendLayout(); this.fileMenuStrip.SuspendLayout(); @@ -155,6 +157,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.selectdoublesideditem, this.toolStripMenuItem4, this.fliplinedefsitem, + this.alignlinedefsitem, this.flipsidedefsitem, this.toolStripMenuItem1, this.curvelinedefsitem, @@ -368,6 +371,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.mergesectorsitem, this.toolStripMenuItem2, this.flipsectorlinedefsitem, + this.alignsectorlinedefsitem, this.toolStripSeparator8, this.makedooritem, this.toolStripSeparator4, @@ -1078,6 +1082,23 @@ namespace CodeImp.DoomBuilder.BuilderModes this.itempastepropsoptions.Text = "Paste Properties Special..."; this.itempastepropsoptions.Click += new System.EventHandler(this.InvokeTaggedAction); // + // alignsectorlinedefsitem + // + this.alignsectorlinedefsitem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Flip; + this.alignsectorlinedefsitem.Name = "alignsectorlinedefsitem"; + this.alignsectorlinedefsitem.Size = new System.Drawing.Size(224, 22); + this.alignsectorlinedefsitem.Tag = "alignlinedefs"; + this.alignsectorlinedefsitem.Text = "Align &Linedefs"; + this.alignsectorlinedefsitem.Click += new System.EventHandler(this.InvokeTaggedAction); + // + // alignlinedefsitem + // + this.alignlinedefsitem.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.Flip; + this.alignlinedefsitem.Name = "alignlinedefsitem"; + this.alignlinedefsitem.Size = new System.Drawing.Size(224, 22); + this.alignlinedefsitem.Tag = "alignlinedefs"; + this.alignlinedefsitem.Text = "Align &Linedefs"; + // // MenusForm // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); @@ -1206,5 +1227,7 @@ namespace CodeImp.DoomBuilder.BuilderModes private System.Windows.Forms.ToolStripButton buttonPointAtCursor; private System.Windows.Forms.ToolStripButton buttonVertexSlopeAssist; private System.Windows.Forms.ToolStripMenuItem vertexSlopeAssistT; + private System.Windows.Forms.ToolStripMenuItem alignsectorlinedefsitem; + private System.Windows.Forms.ToolStripMenuItem alignlinedefsitem; } } \ No newline at end of file diff --git a/Source/Plugins/BuilderModes/Interface/MenusForm.cs b/Source/Plugins/BuilderModes/Interface/MenusForm.cs index 2b9b6fde57ff25720825b1f37bc45d6b331bef3d..cc6f6b83a78da4774198b3c70dbd898996a8bbb4 100644 --- a/Source/Plugins/BuilderModes/Interface/MenusForm.cs +++ b/Source/Plugins/BuilderModes/Interface/MenusForm.cs @@ -145,7 +145,7 @@ namespace CodeImp.DoomBuilder.BuilderModes public void Register() { // Add the menus to the core - foreach(ToolStripMenuItem i in menus) + foreach(ToolStripItem i in menus) General.Interface.AddMenu(i); // Add the buttons to the core @@ -153,7 +153,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.AddButton(b); //mxd. Export menu - foreach(ToolStripMenuItem i in exportmenuitems) + foreach(ToolStripItem i in exportmenuitems) General.Interface.AddMenu(i, MenuSection.FileExport); //mxd. Copy-paste propserties items @@ -165,7 +165,7 @@ namespace CodeImp.DoomBuilder.BuilderModes public void Unregister() { // Remove the menus from the core - foreach(ToolStripMenuItem i in menus) + foreach(ToolStripItem i in menus) General.Interface.RemoveMenu(i); // Remove the buttons from the core @@ -173,7 +173,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.RemoveButton(b); //mxd. Export menu - foreach(ToolStripMenuItem i in exportmenuitems) + foreach(ToolStripItem i in exportmenuitems) General.Interface.RemoveMenu(i); //mxd. Copy-paste propserties items @@ -184,7 +184,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // This hides all menus public void HideAllMenus() { - foreach(ToolStripMenuItem m in menus) m.Visible = false; + foreach(ToolStripItem m in menus) m.Visible = false; } // This hides all except one menu @@ -233,6 +233,11 @@ namespace CodeImp.DoomBuilder.BuilderModes private void buttonselectionnumbers_Click(object sender, EventArgs e) { BuilderPlug.Me.ViewSelectionNumbers = buttonselectionnumbers.Checked; + + //mxd. Notify current mode + BaseClassicMode mode = General.Editing.Mode as BaseClassicMode; + if(mode != null) mode.OnViewSelectionNumbersChanged(BuilderPlug.Me.ViewSelectionNumbers); + General.Interface.RedrawDisplay(); General.Interface.DisplayStatus(StatusType.Info, (buttonselectionnumbers.Checked ? "Show selection numbers." : @@ -243,6 +248,11 @@ namespace CodeImp.DoomBuilder.BuilderModes private void buttonselectioneffects_Click(object sender, EventArgs e) { BuilderPlug.Me.ViewSelectionEffects = buttonselectioneffects.Checked; + + // Notify current mode + BaseClassicMode mode = General.Editing.Mode as BaseClassicMode; + if(mode != null) mode.OnViewSelectionEffectsChanged(BuilderPlug.Me.ViewSelectionEffects); + General.Interface.RedrawDisplay(); General.Interface.DisplayStatus(StatusType.Info, (buttonselectioneffects.Checked ? "Show sector tags and effects." : diff --git a/Source/Plugins/BuilderModes/Interface/ParallelLinedefForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/ParallelLinedefForm.Designer.cs index c301ebdbbcbc1422b691c5397e6ff80cea399dfe..3f0512c2f1c2d87b21ffd3999996780d20cbef83 100644 --- a/Source/Plugins/BuilderModes/Interface/ParallelLinedefForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/ParallelLinedefForm.Designer.cs @@ -195,7 +195,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ParallelLinedefForm"; - this.Opacity = 1D; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; diff --git a/Source/Plugins/BuilderModes/Interface/PastePropertiesOptionsForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/PastePropertiesOptionsForm.Designer.cs index 85e509ff04f0b37a0aff7c33b4c3b41bb6cf4899..795b30bedaa1f4a04e992009ce812a055ec52f62 100644 --- a/Source/Plugins/BuilderModes/Interface/PastePropertiesOptionsForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/PastePropertiesOptionsForm.Designer.cs @@ -232,7 +232,7 @@ this.MinimizeBox = false; this.MinimumSize = new System.Drawing.Size(300, 200); this.Name = "PastePropertiesOptionsForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Plugins/BuilderModes/Interface/PerpendicularLinedefForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/PerpendicularLinedefForm.Designer.cs index 153297a88530aa0f757edcab8e7da1f7f2a1e497..224a9c4ffed84c00d069dbe73d3ac24cb8209a9a 100644 --- a/Source/Plugins/BuilderModes/Interface/PerpendicularLinedefForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/PerpendicularLinedefForm.Designer.cs @@ -227,7 +227,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "PerpendicularLinedefForm"; - this.Opacity = 1D; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; diff --git a/Source/Plugins/BuilderModes/Interface/PerpendicularVertexForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/PerpendicularVertexForm.Designer.cs index 5ecfc8466ec6a1b0289d4dba4b077cf89dd138c6..5be02dd35f280edc4de5f01d489674edd8955ec6 100644 --- a/Source/Plugins/BuilderModes/Interface/PerpendicularVertexForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/PerpendicularVertexForm.Designer.cs @@ -206,7 +206,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "PerpendicularVertexForm"; - this.Opacity = 1D; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; diff --git a/Source/Plugins/BuilderModes/Interface/PreferencesForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/PreferencesForm.Designer.cs index 2b1741aa02f41bd0732493f29eb0cc7946338d5c..be347c623c6515484e80d2f08080f30023851d90 100644 --- a/Source/Plugins/BuilderModes/Interface/PreferencesForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/PreferencesForm.Designer.cs @@ -241,23 +241,14 @@ namespace CodeImp.DoomBuilder.BuilderModes this.groupBox3.Controls.Add(this.editnewsector); this.groupBox3.Controls.Add(this.additiveselect); this.groupBox3.Controls.Add(this.dontusenodes); + this.groupBox3.Controls.Add(this.switchviewmodes); this.groupBox3.Location = new System.Drawing.Point(284, 104); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(379, 327); + this.groupBox3.Size = new System.Drawing.Size(379, 379); this.groupBox3.TabIndex = 18; this.groupBox3.TabStop = false; this.groupBox3.Text = " Options "; // - // additivepaintselect - // - this.additivepaintselect.AutoSize = true; - this.additivepaintselect.Location = new System.Drawing.Point(13, 124); - this.additivepaintselect.Name = "additivepaintselect"; - this.additivepaintselect.Size = new System.Drawing.Size(233, 17); - this.additivepaintselect.TabIndex = 11; - this.additivepaintselect.Text = "Additive paint selecting without holding Shift"; - this.additivepaintselect.UseVisualStyleBackColor = true; - // // autodrawonedit // this.autodrawonedit.AutoSize = true; @@ -272,7 +263,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // syncSelection // this.syncSelection.AutoSize = true; - this.syncSelection.Location = new System.Drawing.Point(13, 274); + this.syncSelection.Location = new System.Drawing.Point(13, 312); this.syncSelection.Name = "syncSelection"; this.syncSelection.Size = new System.Drawing.Size(295, 17); this.syncSelection.TabIndex = 10; @@ -282,7 +273,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // dontMoveGeometryOutsideBounds // this.dontMoveGeometryOutsideBounds.AutoSize = true; - this.dontMoveGeometryOutsideBounds.Location = new System.Drawing.Point(13, 249); + this.dontMoveGeometryOutsideBounds.Location = new System.Drawing.Point(13, 262); this.dontMoveGeometryOutsideBounds.Name = "dontMoveGeometryOutsideBounds"; this.dontMoveGeometryOutsideBounds.Size = new System.Drawing.Size(323, 17); this.dontMoveGeometryOutsideBounds.TabIndex = 9; @@ -292,7 +283,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // autoaligntexturesoncreate // this.autoaligntexturesoncreate.AutoSize = true; - this.autoaligntexturesoncreate.Location = new System.Drawing.Point(13, 224); + this.autoaligntexturesoncreate.Location = new System.Drawing.Point(13, 237); this.autoaligntexturesoncreate.Name = "autoaligntexturesoncreate"; this.autoaligntexturesoncreate.Size = new System.Drawing.Size(233, 17); this.autoaligntexturesoncreate.TabIndex = 7; @@ -302,31 +293,31 @@ namespace CodeImp.DoomBuilder.BuilderModes // autodragonpaste // this.autodragonpaste.AutoSize = true; - this.autodragonpaste.Location = new System.Drawing.Point(13, 199); + this.autodragonpaste.Location = new System.Drawing.Point(13, 212); this.autodragonpaste.Name = "autodragonpaste"; - this.autodragonpaste.Size = new System.Drawing.Size(202, 17); + this.autodragonpaste.Size = new System.Drawing.Size(201, 17); this.autodragonpaste.TabIndex = 6; - this.autodragonpaste.Text = "Drag selection automatically on paste"; + this.autodragonpaste.Text = "Automatically drag selection on paste"; this.autodragonpaste.UseVisualStyleBackColor = true; // // visualmodeclearselection // this.visualmodeclearselection.AutoSize = true; - this.visualmodeclearselection.Location = new System.Drawing.Point(13, 174); + this.visualmodeclearselection.Location = new System.Drawing.Point(13, 187); this.visualmodeclearselection.Name = "visualmodeclearselection"; - this.visualmodeclearselection.Size = new System.Drawing.Size(216, 17); + this.visualmodeclearselection.Size = new System.Drawing.Size(231, 17); this.visualmodeclearselection.TabIndex = 5; - this.visualmodeclearselection.Text = "Automatic clear selection in Visual Mode"; + this.visualmodeclearselection.Text = "Automatically clear selection in Visual Mode"; this.visualmodeclearselection.UseVisualStyleBackColor = true; // // autoclearselection // this.autoclearselection.AutoSize = true; - this.autoclearselection.Location = new System.Drawing.Point(13, 149); + this.autoclearselection.Location = new System.Drawing.Point(13, 162); this.autoclearselection.Name = "autoclearselection"; - this.autoclearselection.Size = new System.Drawing.Size(226, 17); + this.autoclearselection.Size = new System.Drawing.Size(241, 17); this.autoclearselection.TabIndex = 4; - this.autoclearselection.Text = "Automatic clear selection in Classic Modes"; + this.autoclearselection.Text = "Automatically clear selection in Classic Modes"; this.autoclearselection.UseVisualStyleBackColor = true; // // editnewthing @@ -344,9 +335,9 @@ namespace CodeImp.DoomBuilder.BuilderModes this.editnewsector.AutoSize = true; this.editnewsector.Location = new System.Drawing.Point(13, 87); this.editnewsector.Name = "editnewsector"; - this.editnewsector.Size = new System.Drawing.Size(258, 17); + this.editnewsector.Size = new System.Drawing.Size(253, 17); this.editnewsector.TabIndex = 2; - this.editnewsector.Text = "Edit sector properties when drawing a new sector"; + this.editnewsector.Text = "Edit sector properties after drawing a new sector"; this.editnewsector.UseVisualStyleBackColor = true; // // additiveselect @@ -354,15 +345,25 @@ namespace CodeImp.DoomBuilder.BuilderModes this.additiveselect.AutoSize = true; this.additiveselect.Location = new System.Drawing.Point(13, 112); this.additiveselect.Name = "additiveselect"; - this.additiveselect.Size = new System.Drawing.Size(205, 17); + this.additiveselect.Size = new System.Drawing.Size(207, 17); this.additiveselect.TabIndex = 3; this.additiveselect.Text = "Additive selecting without holding Shift"; this.additiveselect.UseVisualStyleBackColor = true; // + // additivepaintselect + // + this.additivepaintselect.AutoSize = true; + this.additivepaintselect.Location = new System.Drawing.Point(13, 137); + this.additivepaintselect.Name = "additivepaintselect"; + this.additivepaintselect.Size = new System.Drawing.Size(233, 17); + this.additivepaintselect.TabIndex = 11; + this.additivepaintselect.Text = "Additive paint selecting without holding Shift"; + this.additivepaintselect.UseVisualStyleBackColor = true; + // // dontusenodes // this.dontusenodes.AutoSize = true; - this.dontusenodes.Location = new System.Drawing.Point(13, 299); + this.dontusenodes.Location = new System.Drawing.Point(13, 337); this.dontusenodes.Name = "dontusenodes"; this.dontusenodes.Size = new System.Drawing.Size(349, 17); this.dontusenodes.TabIndex = 12; @@ -601,10 +602,13 @@ namespace CodeImp.DoomBuilder.BuilderModes // // switchviewmodes // - this.switchviewmodes.Location = new System.Drawing.Point(0, 0); + this.switchviewmodes.AutoSize = true; + this.switchviewmodes.Location = new System.Drawing.Point(13, 287); this.switchviewmodes.Name = "switchviewmodes"; - this.switchviewmodes.Size = new System.Drawing.Size(104, 24); - this.switchviewmodes.TabIndex = 0; + this.switchviewmodes.Size = new System.Drawing.Size(317, 17); + this.switchviewmodes.TabIndex = 11; + this.switchviewmodes.Text = "Switch view modes when switching to the same Classic Mode"; + this.switchviewmodes.UseVisualStyleBackColor = true; // // mouseselectionthreshold // @@ -647,7 +651,7 @@ namespace CodeImp.DoomBuilder.BuilderModes this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "PreferencesForm"; - this.Opacity = 1D; + this.Opacity = 0; this.ShowIcon = false; this.Text = "PreferencesForm"; this.tabs.ResumeLayout(false); diff --git a/Source/Plugins/BuilderModes/Interface/PreferencesForm.cs b/Source/Plugins/BuilderModes/Interface/PreferencesForm.cs index 4186f41d89e936284941eff16ebae23d80b28d50..c7a10db50e1d87beb033df10fd5f202e897f1c29 100644 --- a/Source/Plugins/BuilderModes/Interface/PreferencesForm.cs +++ b/Source/Plugins/BuilderModes/Interface/PreferencesForm.cs @@ -59,6 +59,7 @@ namespace CodeImp.DoomBuilder.BuilderModes autoaligntexturesoncreate.Checked = BuilderPlug.Me.AutoAlignTextureOffsetsOnCreate; //mxd dontMoveGeometryOutsideBounds.Checked = BuilderPlug.Me.DontMoveGeometryOutsideMapBoundary; //mxd syncSelection.Checked = BuilderPlug.Me.SyncSelection; //mxd + switchviewmodes.Checked = General.Settings.SwitchViewModes; //mxd autodrawonedit.Checked = BuilderPlug.Me.AutoDrawOnEdit; defaultbrightness.Text = General.Settings.DefaultBrightness.ToString(); //mxd defaultceilheight.Text = General.Settings.DefaultCeilingHeight.ToString();//mxd @@ -90,6 +91,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Settings.WritePluginSetting("autoaligntextureoffsetsoncreate", autoaligntexturesoncreate.Checked);//mxd General.Settings.WritePluginSetting("dontmovegeometryoutsidemapboundary", dontMoveGeometryOutsideBounds.Checked);//mxd General.Settings.WritePluginSetting("syncselection", syncSelection.Checked);//mxd + General.Settings.SwitchViewModes = switchviewmodes.Checked; //mxd General.Settings.SplitLineBehavior = (SplitLineBehavior)splitbehavior.SelectedIndex;//mxd //default sector values diff --git a/Source/Plugins/BuilderModes/Interface/PreferencesForm.resx b/Source/Plugins/BuilderModes/Interface/PreferencesForm.resx index ad3360f8893417ec2f1fda005b9806449643e91f..65beeaff2e51566dafceffd0d6e73b0c74a1a2c3 100644 --- a/Source/Plugins/BuilderModes/Interface/PreferencesForm.resx +++ b/Source/Plugins/BuilderModes/Interface/PreferencesForm.resx @@ -120,7 +120,4 @@ <metadata name="tabs.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> - <metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> </root> \ No newline at end of file diff --git a/Source/Plugins/BuilderModes/Interface/SelectSimilarElementOptionsPanel.Designer.cs b/Source/Plugins/BuilderModes/Interface/SelectSimilarElementOptionsPanel.Designer.cs index dbe3e6ec21fcd3e735a85df343fc2f350469adcd..3122b87cf4d5fa72415aece34c74022c969618f8 100644 --- a/Source/Plugins/BuilderModes/Interface/SelectSimilarElementOptionsPanel.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/SelectSimilarElementOptionsPanel.Designer.cs @@ -86,7 +86,8 @@ // // tabControl // - this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.tabControl.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.tabControl.Controls.Add(this.sectors); this.tabControl.Controls.Add(this.linedefs); @@ -227,10 +228,12 @@ this.Controls.Add(this.enableall); this.Controls.Add(this.apply); this.Controls.Add(this.cancel); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.MaximizeBox = false; this.MinimizeBox = false; - this.MinimumSize = new System.Drawing.Size(300, 200); + this.MinimumSize = new System.Drawing.Size(396, 200); this.Name = "SelectSimilarElementOptionsPanel"; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Plugins/BuilderModes/Interface/SelectSimilarElementOptionsPanel.cs b/Source/Plugins/BuilderModes/Interface/SelectSimilarElementOptionsPanel.cs index dcac386d5ffa383930c0d5959b72758056259c67..d955dfeb959cc2390801aa92f0755959b9da10e5 100644 --- a/Source/Plugins/BuilderModes/Interface/SelectSimilarElementOptionsPanel.cs +++ b/Source/Plugins/BuilderModes/Interface/SelectSimilarElementOptionsPanel.cs @@ -11,7 +11,6 @@ namespace CodeImp.DoomBuilder.BuilderModes { public partial class SelectSimilarElementOptionsPanel : DelayedForm { - private static Size size = Size.Empty; private static Point location = Point.Empty; private static readonly object[] flags = { new SectorPropertiesCopySettings(), @@ -30,10 +29,9 @@ namespace CodeImp.DoomBuilder.BuilderModes InitializeComponent(); //apply window size and location - if(!size.IsEmpty && !location.IsEmpty) + if(!location.IsEmpty) { this.StartPosition = FormStartPosition.Manual; - this.Size = size; this.Location = location; } @@ -79,6 +77,7 @@ namespace CodeImp.DoomBuilder.BuilderModes //fill flags showntabs = new List<TabPage>(); + int maxheight = int.MinValue; foreach(TabPage page in activetabs) { CheckboxArrayControl curControl = page.Controls[0] as CheckboxArrayControl; @@ -102,9 +101,18 @@ namespace CodeImp.DoomBuilder.BuilderModes { curControl.PositionCheckboxes(); showntabs.Add(page); + + // Store height + maxheight = Math.Max(maxheight, curControl.GetHeight()); } } + // Apply height + if(maxheight != int.MinValue) + { + this.Height += maxheight - activetabs[0].Controls[0].Height; + } + // Got anything to show? if(showntabs.Count == 0) return SetupFailed("This action doesn't support current editing mode..."); @@ -124,7 +132,6 @@ namespace CodeImp.DoomBuilder.BuilderModes private void SelectSimilarElementOptionsPanel_FormClosing(object sender, FormClosingEventArgs e) { - size = this.Size; location = this.Location; } diff --git a/Source/Plugins/BuilderModes/Interface/VertexIntoShapeForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/VertexIntoShapeForm.Designer.cs index 4edde3a1e0358d497c38e67a226b9a3bd0779384..3690369cd49a3c9d79d86a7e7df1167e6fcfc5aa 100644 --- a/Source/Plugins/BuilderModes/Interface/VertexIntoShapeForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/VertexIntoShapeForm.Designer.cs @@ -954,7 +954,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "VertexIntoShapeForm"; - this.Opacity = 1D; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; diff --git a/Source/Plugins/BuilderModes/Interface/VertexSlopeAssistForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/VertexSlopeAssistForm.Designer.cs index ed4bd6982772ac782b6c95b6ec7c6f400987e55b..e98785c6d08d230e2635b01d0c589451664a324f 100644 --- a/Source/Plugins/BuilderModes/Interface/VertexSlopeAssistForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/VertexSlopeAssistForm.Designer.cs @@ -1013,7 +1013,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "VertexSlopeAssistForm"; - this.Opacity = 1D; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; diff --git a/Source/Plugins/BuilderModes/Interface/VertexSlopeAssistTagForm.designer.cs b/Source/Plugins/BuilderModes/Interface/VertexSlopeAssistTagForm.designer.cs index cc470bee08a3f10fa2745d0f360d24e4e2c6a8ac..a62cbbc2006056d8734484ff60c9a395c9f9c8b3 100644 --- a/Source/Plugins/BuilderModes/Interface/VertexSlopeAssistTagForm.designer.cs +++ b/Source/Plugins/BuilderModes/Interface/VertexSlopeAssistTagForm.designer.cs @@ -120,7 +120,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "VertexSlopeAssistTagForm"; - this.Opacity = 1D; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; diff --git a/Source/Plugins/BuilderModes/Interface/WavefrontSettingsForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/WavefrontSettingsForm.Designer.cs index f51a4d6ff1b4e29235fa20cc24c072331fe4f1d5..adff1f8e5c9a1233e6289fe95f2d2b9e1586d03f 100644 --- a/Source/Plugins/BuilderModes/Interface/WavefrontSettingsForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/WavefrontSettingsForm.Designer.cs @@ -168,7 +168,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "WavefrontSettingsForm"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.Text = "Export to Wavefront .obj"; diff --git a/Source/Plugins/BuilderModes/Properties/AssemblyInfo.cs b/Source/Plugins/BuilderModes/Properties/AssemblyInfo.cs index 82a93b2a9f3025b56d907df049064b4c03970c5e..9381063042c6724564a79e7e9becfc6d5bc04f63 100644 --- a/Source/Plugins/BuilderModes/Properties/AssemblyInfo.cs +++ b/Source/Plugins/BuilderModes/Properties/AssemblyInfo.cs @@ -1,5 +1,6 @@ using System.Reflection; using System.Runtime.InteropServices; +using System.Resources; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -28,4 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.14.0.2501")] \ No newline at end of file +[assembly: AssemblyVersion("2.14.0.2501")] +[assembly: NeutralResourcesLanguageAttribute("en")] \ No newline at end of file diff --git a/Source/Plugins/BuilderModes/Properties/Resources.Designer.cs b/Source/Plugins/BuilderModes/Properties/Resources.Designer.cs index 01546ab33ee7826d4ba0835edc6fb95a14546034..2d1811fcd75b1488702a843cc87b65afc15d42c4 100644 --- a/Source/Plugins/BuilderModes/Properties/Resources.Designer.cs +++ b/Source/Plugins/BuilderModes/Properties/Resources.Designer.cs @@ -130,9 +130,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties { } } - /// <summary> - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// </summary> + internal static System.Drawing.Bitmap Check { + get { + object obj = ResourceManager.GetObject("Check", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Bitmap Close { get { object obj = ResourceManager.GetObject("Close", resourceCulture); @@ -140,9 +144,6 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties { } } - /// <summary> - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// </summary> internal static System.Drawing.Bitmap ColorPick { get { object obj = ResourceManager.GetObject("ColorPick", resourceCulture); @@ -403,6 +404,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties { /// <summary> /// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary> + internal static System.Drawing.Bitmap Guidelines { + get { + object obj = ResourceManager.GetObject("Guidelines", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Bitmap Hide { get { object obj = ResourceManager.GetObject("Hide", resourceCulture); @@ -470,6 +478,16 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties { } } + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + internal static System.Drawing.Bitmap NewSector2 { + get { + object obj = ResourceManager.GetObject("NewSector2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// <summary> /// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary> @@ -629,7 +647,17 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties { return ((System.Drawing.Bitmap)(obj)); } } - + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + internal static System.Drawing.Bitmap SoundRadius { + get { + object obj = ResourceManager.GetObject("SoundRadius", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// <summary> /// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary> diff --git a/Source/Plugins/BuilderModes/Properties/Resources.resx b/Source/Plugins/BuilderModes/Properties/Resources.resx index 7f184c3512a7c85cf75405113c451d896cff7b32..246a057f79a4acf5d9423ee110513a85e385eac6 100644 --- a/Source/Plugins/BuilderModes/Properties/Resources.resx +++ b/Source/Plugins/BuilderModes/Properties/Resources.resx @@ -118,6 +118,9 @@ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> + <data name="Join" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Join.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="FloorAlign" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\FloorAlign.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> @@ -136,6 +139,9 @@ <data name="ViewSelectionEffects" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\ViewSelectionEffects.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="Repeat" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Repeat.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="HideAll" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\HideAll.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> @@ -190,11 +196,14 @@ <data name="ThingPointAtCursor" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\ThingPointAtCursor.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="PlaceThings" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\PlaceThings.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="Text" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Text.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Show" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Show.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="SoundRadius" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\SoundRadius.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="BrightnessGradient" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\BrightnessGradient.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> @@ -202,6 +211,9 @@ <data name="FlipSelectionV" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\FlipSelectionV.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="Check" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Check.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="Door" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Door.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> @@ -211,8 +223,8 @@ <data name="Reset" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Reset.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Join" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Join.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="Show" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Show.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="ViewSelectionIndex" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\ViewSelectionIndex.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> @@ -223,20 +235,20 @@ <data name="Show2" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Show2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Folder" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\Folder.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> - </data> <data name="ColorPick" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\ColorPick.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="NewSector2" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\NewSector2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="Flip" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Flip.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="FlipSelectionH" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\FlipSelectionH.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="PlaceThings" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Resources\PlaceThings.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="Folder" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Folder.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="Angle" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Angle.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> @@ -319,4 +331,10 @@ <data name="Repeat" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\Repeat.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="NewSector2" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\NewSector2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Guidelines" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\Guidelines.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> </root> \ No newline at end of file diff --git a/Source/Plugins/BuilderModes/Resources/Actions.cfg b/Source/Plugins/BuilderModes/Resources/Actions.cfg index 257d7826b6fbac65d90f3ba5b71ee31026a92153..d9e59c47893b78194fe45de336a4ff146382ca4d 100644 --- a/Source/Plugins/BuilderModes/Resources/Actions.cfg +++ b/Source/Plugins/BuilderModes/Resources/Actions.cfg @@ -323,14 +323,25 @@ drawpoint removepoint { - title = "Remove Previous Vertex"; + title = "Remove Last Vertex"; category = "drawing"; - description = "Removes the previously drawn vertex from the drawing session."; + description = "Removes the last drawn vertex from the drawing session."; allowkeys = true; allowmouse = true; allowscroll = true; } +removefirstpoint +{ + title = "Remove First Vertex"; + category = "drawing"; + description = "Removes the first drawn vertex from the drawing session."; + allowkeys = true; + allowmouse = true; + allowscroll = true; + default = 131080; // Ctrl-Backspace +} + finishdraw { title = "Finish Drawing"; @@ -428,6 +439,16 @@ fliplinedefs allowscroll = true; } +alignlinedefs //mxd +{ + title = "Align Linedefs"; + category = "linedefs"; + description = "This aligns the selected linedefs, so their front (or back) point towards (or away from) the same sector."; + allowkeys = true; + allowmouse = true; + allowscroll = true; +} + flipsidedefs { title = "Flip Sidedefs"; @@ -889,9 +910,9 @@ movetexturedown movetextureleft8 { - title = "Move Texture Left by cur. grid size"; + title = "Move Texture Left by 8"; category = "visual"; - description = "Moves the offset of the targeted or selected textures to the left by current grid size."; + description = "Moves the offset of the targeted or selected textures to the left by 8 pixels."; allowkeys = true; allowmouse = true; allowscroll = true; @@ -901,9 +922,9 @@ movetextureleft8 movetextureright8 { - title = "Move Texture Right by cur. grid size"; + title = "Move Texture Right by 8"; category = "visual"; - description = "Moves the offset of the targeted or selected textures to the right by current grid size."; + description = "Moves the offset of the targeted or selected textures to the right by 8 pixels."; allowkeys = true; allowmouse = true; allowscroll = true; @@ -913,9 +934,9 @@ movetextureright8 movetextureup8 { - title = "Move Texture Up by cur. grid size"; + title = "Move Texture Up by 8"; category = "visual"; - description = "Moves the offset of the targeted or selected textures up by current grid size."; + description = "Moves the offset of the targeted or selected textures up by 8 pixels."; allowkeys = true; allowmouse = true; allowscroll = true; @@ -925,9 +946,9 @@ movetextureup8 movetexturedown8 { - title = "Move Texture Down by cur. grid size"; + title = "Move Texture Down by 8"; category = "visual"; - description = "Moves the offset of the targeted or selected textures down by current grid size."; + description = "Moves the offset of the targeted or selected textures down by 8 pixels."; allowkeys = true; allowmouse = true; allowscroll = true; @@ -935,6 +956,58 @@ movetexturedown8 default = 65576; } +//mxd +movetextureleftgs +{ + title = "Move Texture Left by Grid Size"; + category = "visual"; + description = "Moves the offset of the targeted or selected textures to the left by current grid size."; + allowkeys = true; + allowmouse = true; + allowscroll = true; + repeat = true; + default = 131109; +} + +//mxd +movetexturerightgs +{ + title = "Move Texture Right by Grid Size"; + category = "visual"; + description = "Moves the offset of the targeted or selected textures to the right by current grid size."; + allowkeys = true; + allowmouse = true; + allowscroll = true; + repeat = true; + default = 131111; +} + +//mxd +movetextureupgs +{ + title = "Move Texture Up by Grid Size"; + category = "visual"; + description = "Moves the offset of the targeted or selected textures up by current grid size."; + allowkeys = true; + allowmouse = true; + allowscroll = true; + repeat = true; + default = 131110; +} + +//mxd +movetexturedowngs +{ + title = "Move Texture Down by Grid Size"; + category = "visual"; + description = "Moves the offset of the targeted or selected textures down by current grid size."; + allowkeys = true; + allowmouse = true; + allowscroll = true; + repeat = true; + default = 131112; +} + //mxd scaleup { @@ -1172,17 +1245,6 @@ togglegravity allowscroll = true; } -togglehighlight -{ - title = "Toggle Highlight"; - category = "tools"; //mxd - description = "Toggles the highlight of the targeted and selected objects in Visual and Sectors modes."; - allowkeys = true; - allowmouse = true; - allowscroll = true; - default = 72; // H -} - resettexture { title = "Reset Texture Offsets"; @@ -1292,6 +1354,17 @@ toggleskew default = 262231; } +//mxd +alphabasedtexturehighlighting +{ + title = "Toggle Alpha-based Texture Highlighting"; + category = "visual"; + description = "Toggles Alpha-based Texture Highlighting. When enabled, 3d floor textures and middle textures on double-sided lines will be highlighted only when the crosshair points at a non-transparent pixel."; + allowkeys = true; + allowmouse = true; + allowscroll = true; +} + placevisualstart { title = "Place Visual Mode Camera"; @@ -1569,11 +1642,12 @@ gzdbvisualmode { title = "Visual Mode"; category = "modes"; - description = "Switches to the visual editing mode. Hold Shift key to invert 'Synhcronise selection between Visual and Classic modes' setting."; + description = "Switches to the (G)ZDoom visual editing mode. Hold Shift key to invert 'Sync selection between Visual and Classic modes' setting."; allowkeys = true; allowmouse = true; allowscroll = true; disregardshift = true; + disregardcontrol = true; default = 81; //Q } @@ -1608,17 +1682,6 @@ ceilingalignmode allowscroll = true; } -togglegzdoomgeometryeffects -{ - title = "Toggle Geometry Effects"; - category = "visual"; - description = "Toggles rendering of (G)ZDoom's geometry effects (slopes, 3D-floors etc.) in Visual mode."; - allowkeys = true; - allowmouse = true; - allowscroll = false; - default = 9; //Tab -} - togglesrb2geometryeffects { title = "Toggle SRB2 Invisible FOFs"; diff --git a/Source/Plugins/BuilderModes/Resources/Check.png b/Source/Plugins/BuilderModes/Resources/Check.png new file mode 100644 index 0000000000000000000000000000000000000000..286686e8514bcd5bfb06fa8b8ffbfeb99898338c Binary files /dev/null and b/Source/Plugins/BuilderModes/Resources/Check.png differ diff --git a/Source/Plugins/BuilderModes/Resources/DrawCurveMode.png b/Source/Plugins/BuilderModes/Resources/DrawCurveMode.png index ce2cc70348cc269b4809ec2e40e23b77dc76a90f..a74e65390472d39784dca7937173f1c14df7a3b3 100644 Binary files a/Source/Plugins/BuilderModes/Resources/DrawCurveMode.png and b/Source/Plugins/BuilderModes/Resources/DrawCurveMode.png differ diff --git a/Source/Plugins/BuilderModes/Resources/Guidelines.png b/Source/Plugins/BuilderModes/Resources/Guidelines.png new file mode 100644 index 0000000000000000000000000000000000000000..bae95463b40efd34175d208233187b132da16558 Binary files /dev/null and b/Source/Plugins/BuilderModes/Resources/Guidelines.png differ diff --git a/Source/Plugins/BuilderModes/Resources/Hints.cfg b/Source/Plugins/BuilderModes/Resources/Hints.cfg index b0b23178d5fce7f3277af4394fe8d61e294a62a9..df9e6d0848177a1ea9254cd1da9b46796afedf2f 100644 --- a/Source/Plugins/BuilderModes/Resources/Hints.cfg +++ b/Source/Plugins/BuilderModes/Resources/Hints.cfg @@ -212,6 +212,7 @@ group general "Press <k>builder_classicselect</k> to place a vertex" "Use <k>buildermodes_increasebevel</k> and <k>buildermodes_decreasebevel</k> to change bevel by current grid size" "Use <k>buildermodes_increasesubdivlevel</k> and <k>buildermodes_decreasesubdivlevel</k> to change the number of points in ellipse" +"Use <k>buildermodes_rotateclockwise</k> and <k>buildermodes_rotatecounterclockwise</k> to rotate ellipse shape" "Hold <b>Shift</b> to toggle grid snapping" "Hold <b>Ctrl</b> to toggle snapping to nearest vertex" "Hold <b>Alt - Shift</b> to snap to 4 cardinal directions" @@ -246,4 +247,13 @@ group gridlockhelp "Use <k>builder_griddec</k> and <k>builder_gridinc</k> to change grid size." "Hold <b>Alt - Shift</b> to snap to 4 cardinal directions" "Place second vertex to finish drawing" +"Press <k>builder_cancelmode</k> or <k>builder_classicedit</k> to cancel" + + +class CurveLinedefsMode +group general +"<b>LMB-drag</b> or use <k>buildermodes_increasebevel</k> and <k>buildermodes_decreasebevel</k> to change curve depth. Hold <b>Shift</b> while dragging to change by 1 map unit" +"<b>RMB-drag</b> or use <k>buildermodes_rotateclockwise</k> and <k>buildermodes_rotatecounterclockwise</k> to change curve bulginess. Hold <b>Shift</b> while dragging to change by 1 degree" +"<b>LMB+RMB-drag</b> or use <k>buildermodes_increasesubdivlevel</k> and <k>buildermodes_decreasesubdivlevel</k> to change the number of points in the curve" +"Press <k>builder_acceptmode</k> to accept" "Press <k>builder_cancelmode</k> or <k>builder_classicedit</k> to cancel" \ No newline at end of file diff --git a/Source/Plugins/BuilderModes/Resources/SoundRadius.png b/Source/Plugins/BuilderModes/Resources/SoundRadius.png new file mode 100644 index 0000000000000000000000000000000000000000..9246797f11f8dbde400b5ddc70110181445326a1 Binary files /dev/null and b/Source/Plugins/BuilderModes/Resources/SoundRadius.png differ diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs index 3d33932b666bef31548da483175d457c7579f48d..ad31c646d85ffeb00e4ffcac6b32d857a6c59285 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs @@ -181,115 +181,91 @@ namespace CodeImp.DoomBuilder.BuilderModes offsetx = (int)Math.Round(v.x); offsety = (int)Math.Round(v.y); - // Apply offsets + // Calculate deltas + int deltax, deltay; if(General.Interface.CtrlState && General.Interface.ShiftState) { //mxd. Clamp to grid size? int newoffsetx = startoffsetx - (int)Math.Round(offsetx); int newoffsety = startoffsety + (int)Math.Round(offsety); - int dx = prevoffsetx - newoffsetx; - int dy = prevoffsety - newoffsety; + deltax = prevoffsetx - newoffsetx; + deltay = prevoffsety - newoffsety; - if(Math.Abs(dx) >= General.Map.Grid.GridSize) + if(Math.Abs(deltax) >= General.Map.Grid.GridSize) { - dx = General.Map.Grid.GridSize * Math.Sign(dx); + deltax = General.Map.Grid.GridSize * Math.Sign(deltax); prevoffsetx = newoffsetx; } else { - dx = 0; + deltax = 0; } - if(Math.Abs(dy) >= General.Map.Grid.GridSize) + if(Math.Abs(deltay) >= General.Map.Grid.GridSize) { - dy = General.Map.Grid.GridSize * Math.Sign(dy); + deltay = General.Map.Grid.GridSize * Math.Sign(deltay); prevoffsety = newoffsety; } else { - dy = 0; + deltay = 0; } - - if(dx != 0 || dy != 0) mode.ApplyFlatOffsetChange(dx, dy); } else { int newoffsetx = startoffsetx - (int)Math.Round(offsetx); int newoffsety = startoffsety + (int)Math.Round(offsety); - mode.ApplyFlatOffsetChange(prevoffsetx - newoffsetx, prevoffsety - newoffsety); + + deltax = prevoffsetx - newoffsetx; + deltay = prevoffsety - newoffsety; + prevoffsetx = newoffsetx; prevoffsety = newoffsety; } - mode.ShowTargetInfo(); - } - - //mxd - public override Sector GetControlSector() - { - return level.sector; - } - - //mxd - protected void OnTextureChanged() - { - //Effects may need updating... - mode.RebuildElementData(); - - // As well as sky render flag... - UpdateSkyRenderFlag(); - - if (level.sector == this.Sector.Sector) + //mxd. Apply offset? + if(deltax != 0 || deltay != 0) { - this.Setup(); + mode.ApplyFlatOffsetChange(deltax, deltay); - //3D floors may need updating... - foreach(Sidedef s in level.sector.Sidedefs) + // Update sector geometry + Sector s = GetControlSector(); + if(s.Index != Sector.Sector.Index) { - // MascaraSnake: 3D floor handling - if(s.Line.Is3DFloor && s.Line.Front != null) - { - if (!General.Map.FormatInterface.HasLinedefParameters) s.Line.Set3DFloorArgs(); - int sectortag = ((General.Map.UDMF || (s.Line.Args[1] & 8) != 0) ? s.Line.Args[0] : s.Line.Args[0] + (s.Line.Args[4] << 8)); - foreach(Sector sector in General.Map.Map.Sectors) - { - if(sector.Tags.Contains(sectortag)) - { - BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(sector); - vs.UpdateSectorGeometry(false); - } - } - } + s.UpdateNeeded = true; + s.UpdateCache(); + mode.GetSectorData(s).Update(); + BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(s); + vs.UpdateSectorGeometry(false); + vs.Rebuild(); } + + Sector.Sector.UpdateNeeded = true; + Sector.Sector.UpdateCache(); + Sector.UpdateSectorGeometry(false); + Sector.Rebuild(); } - //As well as this sector's geometry - else if(mode.VisualSectorExists(level.sector)) - { - BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(level.sector); - vs.UpdateSectorGeometry(false); - } + + mode.ShowTargetInfo(); } //mxd - public virtual bool IsSelected() - { - return selected; - } + public override Sector GetControlSector() { return level.sector; } //mxd protected void AlignTextureToClosestLine(bool alignx, bool aligny) { if(!(mode.HighlightedObject is BaseVisualSector)) return; - //do we need to align this? (and also grab texture scale while we are at it) + // Do we need to align this? (and also grab texture scale while we are at it) float scaleX, scaleY; bool isFloor = (geometrytype == VisualGeometryType.FLOOR); if(mode.HighlightedTarget is VisualFloor) { - VisualFloor target = mode.HighlightedTarget as VisualFloor; + VisualFloor target = (VisualFloor)mode.HighlightedTarget; - //check texture + // Check texture if(target.Sector.Sector.FloorTexture != (isFloor ? Sector.Sector.FloorTexture : Sector.Sector.CeilTexture)) return; scaleX = target.Sector.Sector.Fields.GetValue("xscalefloor", 1.0f); @@ -297,9 +273,9 @@ namespace CodeImp.DoomBuilder.BuilderModes } else { - VisualCeiling target = mode.HighlightedTarget as VisualCeiling; + VisualCeiling target = (VisualCeiling)mode.HighlightedTarget; - //check texture + // Check texture if(target.Sector.Sector.CeilTexture != (isFloor ? Sector.Sector.FloorTexture : Sector.Sector.CeilTexture)) return; scaleX = target.Sector.Sector.Fields.GetValue("xscaleceiling", 1.0f); @@ -339,13 +315,13 @@ namespace CodeImp.DoomBuilder.BuilderModes if(alignx) { - if(Texture != null) offset.x %= Texture.Width / scaleX; + if(Texture != null && Texture.IsImageLoaded) offset.x %= Texture.Width / scaleX; UniFields.SetFloat(Sector.Sector.Fields, (isFloor ? "xpanningfloor" : "xpanningceiling"), (float)Math.Round(-offset.x), 0f); } if(aligny) { - if(Texture != null) offset.y %= Texture.Height / scaleY; + if(Texture != null && Texture.IsImageLoaded) offset.y %= Texture.Height / scaleY; UniFields.SetFloat(Sector.Sector.Fields, (isFloor ? "ypanningfloor" : "ypanningceiling"), (float)Math.Round(offset.y), 0f); } @@ -429,13 +405,13 @@ namespace CodeImp.DoomBuilder.BuilderModes if(alignx) { - if(Texture != null) offset.x %= Texture.Width / scaleX; + if(Texture != null && Texture.IsImageLoaded) offset.x %= Texture.Width / scaleX; UniFields.SetFloat(Sector.Sector.Fields, (isFloor ? "xpanningfloor" : "xpanningceiling"), (float)Math.Round(-offset.x), 0f); } if(aligny) { - if(Texture != null) offset.y %= Texture.Height / scaleY; + if(Texture != null && Texture.IsImageLoaded) offset.y %= Texture.Height / scaleY; UniFields.SetFloat(Sector.Sector.Fields, (isFloor ? "ypanningfloor" : "ypanningceiling"), (float)Math.Round(offset.y), 0f); } @@ -450,18 +426,29 @@ namespace CodeImp.DoomBuilder.BuilderModes mode.CreateUndo(undodescription); mode.SetActionResult(resultdescription); - Sector.Sector.Fields.BeforeFieldsChange(); + level.sector.Fields.BeforeFieldsChange(); - foreach(string key in keys) + foreach(string key in keys) { - if(Sector.Sector.Fields.ContainsKey(key)) + if(level.sector.Fields.ContainsKey(key)) { - Sector.Sector.Fields.Remove(key); - Sector.Sector.UpdateNeeded = true; + level.sector.Fields.Remove(key); + level.sector.UpdateNeeded = true; } } - if(Sector.Sector.UpdateNeeded) Sector.UpdateSectorGeometry(false); + if(level.sector.UpdateNeeded) + { + if(level.sector != Sector.Sector && mode.VisualSectorExists(level.sector)) + { + BaseVisualSector vs = (BaseVisualSector) mode.GetVisualSector(level.sector); + vs.UpdateSectorGeometry(false); + } + else + { + Sector.UpdateSectorGeometry(false); + } + } } #endregion @@ -482,7 +469,7 @@ namespace CodeImp.DoomBuilder.BuilderModes public virtual void OnInsert() { } protected virtual void SetTexture(string texturename) { } public virtual void ApplyLinedefFlag(string flag, bool set) { } - protected abstract void MoveTextureOffset(Point xy); + protected abstract void MoveTextureOffset(int offsetx, int offsety); protected abstract Point GetTextureOffset(); public virtual void OnPaintSelectEnd() { } // biwa @@ -615,12 +602,12 @@ namespace CodeImp.DoomBuilder.BuilderModes if(mode.VisualSectorExists(level.sector)) { BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(level.sector); - vs.UpdateSectorGeometry(true); + vs.UpdateSectorGeometry(false); } } // Processing - public virtual void OnProcess(float deltatime) + public virtual void OnProcess(long deltatime) { // If the texture was not loaded, but is loaded now, then re-setup geometry if(setuponloadedtexture != 0) @@ -757,23 +744,9 @@ namespace CodeImp.DoomBuilder.BuilderModes mode.CreateUndo("Paste sector properties"); mode.SetActionResult("Pasted sector properties."); - //mxd. Glow effect may require SectorData update - bool oldfloortextureglows = (SectorProperties.CopySettings.FloorTexture && General.Map.Data.GlowingFlats.ContainsKey(level.sector.LongFloorTexture)); - bool oldceiltextureglows = (SectorProperties.CopySettings.CeilingTexture && General.Map.Data.GlowingFlats.ContainsKey(level.sector.LongCeilTexture)); - //mxd. Added "usecopysettings" BuilderPlug.Me.CopiedSectorProps.Apply(level.sector, usecopysettings); - //mxd. Glow effect may require SectorData update - if(oldfloortextureglows || oldceiltextureglows - || (SectorProperties.CopySettings.FloorTexture && General.Map.Data.GlowingFlats.ContainsKey(level.sector.LongFloorTexture)) - || (SectorProperties.CopySettings.CeilingTexture && General.Map.Data.GlowingFlats.ContainsKey(level.sector.LongCeilTexture))) - { - mode.RebuildElementData(); - SectorData sd = mode.GetSectorData(level.sector); - sd.UpdateForced(); - } - if(mode.VisualSectorExists(level.sector)) { BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(level.sector); @@ -803,7 +776,13 @@ namespace CodeImp.DoomBuilder.BuilderModes { mode.CreateUndo("Change flat \"" + texture + "\""); SetTexture(texture); - OnTextureChanged(); //mxd + + // Update + if(mode.VisualSectorExists(level.sector)) + { + BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(level.sector); + vs.UpdateSectorGeometry(false); + } } // Copy texture @@ -870,8 +849,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } else { - //mxd. Need this to apply changes to 3d-floor even if control sector doesn't exist - //as BaseVisualSector + //mxd. Need this to apply changes to 3d-floor even if control sector doesn't exist as BaseVisualSector vs = mode.CreateBaseVisualSector(level.sector); } @@ -912,7 +890,10 @@ namespace CodeImp.DoomBuilder.BuilderModes undoticket = mode.CreateUndo("Change texture offsets"); //mxd - if(General.Map.UDMF && doSurfaceAngleCorrection) + changed = true; + + //mxd + if(General.Map.UDMF && doSurfaceAngleCorrection) { Point p = new Point(horizontal, vertical); float angle = Angle2D.RadToDeg(General.Map.VisualCamera.AngleXY); @@ -945,24 +926,21 @@ namespace CodeImp.DoomBuilder.BuilderModes } // Apply offsets - MoveTextureOffset(new Point(-horizontal, -vertical)); + MoveTextureOffset(-horizontal, -vertical); - // Update sector geometry - Sector s = GetControlSector(); - if(s.Index != Sector.Sector.Index) + // Rebuild sector + BaseVisualSector vs; + if(mode.VisualSectorExists(level.sector)) { - s.UpdateNeeded = true; - s.UpdateCache(); - mode.GetSectorData(s).Update(); - BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(s); - vs.UpdateSectorGeometry(false); - vs.Rebuild(); + vs = (BaseVisualSector)mode.GetVisualSector(level.sector); + } + else + { + //mxd. Need this to apply changes to 3d-floor even if control sector doesn't exist as BaseVisualSector + vs = mode.CreateBaseVisualSector(level.sector); } - Sector.Sector.UpdateNeeded = true; - Sector.Sector.UpdateCache(); - Sector.UpdateSectorGeometry(false); - Sector.Rebuild(); + if(vs != null) vs.UpdateSectorGeometry(false); } //mxd @@ -976,23 +954,27 @@ namespace CodeImp.DoomBuilder.BuilderModes string key = (GeometryType == VisualGeometryType.FLOOR ? "rotationfloor" : "rotationceiling"); mode.SetActionResult( (GeometryType == VisualGeometryType.FLOOR ? "Floor" : "Ceiling") + " rotation changed to " + angle); - //set value + // Set new angle Sector s = GetControlSector(); s.Fields.BeforeFieldsChange(); UniFields.SetFloat(s.Fields, key, angle, 0.0f); - if(s.Index != Sector.Sector.Index) + // Mark as changed + changed = true; + + // Rebuild sector + BaseVisualSector vs; + if(mode.VisualSectorExists(level.sector)) { - s.UpdateNeeded = true; - s.UpdateCache(); - mode.GetSectorData(s).Update(); - BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(s); - vs.UpdateSectorGeometry(false); + vs = (BaseVisualSector)mode.GetVisualSector(level.sector); + } + else + { + //mxd. Need this to apply changes to 3d-floor even if control sector doesn't exist as BaseVisualSector + vs = mode.CreateBaseVisualSector(level.sector); } - Sector.Sector.UpdateNeeded = true; - Sector.Sector.UpdateCache(); - Sector.UpdateSectorGeometry(false); + if(vs != null) vs.UpdateSectorGeometry(false); } //mxd @@ -1000,10 +982,47 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(!General.Map.UDMF || !Texture.IsImageLoaded) return; + changed = true; + if((General.Map.UndoRedo.NextUndo == null) || (General.Map.UndoRedo.NextUndo.TicketID != undoticket)) undoticket = mode.CreateUndo("Change texture scale"); - ChangeTextureScale(incrementX, incrementY); + // Adjust to camera view + float angle = Angle2D.RadToDeg(General.Map.VisualCamera.AngleXY); + if(GeometryType == VisualGeometryType.CEILING) angle += level.sector.Fields.GetValue("rotationceiling", 0f); + else angle += level.sector.Fields.GetValue("rotationfloor", 0f); + angle = General.ClampAngle(angle); + + if(angle > 315 || angle < 46) + { + ChangeTextureScale(incrementX, incrementY); + } + else if(angle > 225) + { + ChangeTextureScale(incrementY, incrementX); + } + else if(angle > 135) + { + ChangeTextureScale(incrementX, incrementY); + } + else + { + ChangeTextureScale(incrementY, incrementX); + } + + // Rebuild sector + BaseVisualSector vs; + if(mode.VisualSectorExists(level.sector)) + { + vs = (BaseVisualSector)mode.GetVisualSector(level.sector); + } + else + { + //mxd. Need this to apply changes to 3d-floor even if control sector doesn't exist as BaseVisualSector + vs = mode.CreateBaseVisualSector(level.sector); + } + + if(vs != null) vs.UpdateSectorGeometry(false); } // biwa diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs index 2b72450032aa237b8dee42662cb7abbe7228ab22..3fba0958986d9eacefd2191c3db92fd013150d32 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs @@ -64,8 +64,8 @@ namespace CodeImp.DoomBuilder.BuilderModes private static List<BaseVisualSector> updatelist; //mxd private bool performautoselection; //mxd - // Undo/redo - private int undoticket; + // Undo/redo + protected int undoticket; #endregion @@ -312,9 +312,9 @@ namespace CodeImp.DoomBuilder.BuilderModes if(v.z > cgz) { float cz = data.Ceiling.plane.GetZ(v.x, v.y); - float delta = ((v.z - cgz) / (cz - cgz)) * 0.9f; + float delta = 1.0f - (((v.z - cgz) / (cz - cgz)) * 0.9f); PixelColor vc = PixelColor.FromInt(v.c); - v.c = InterpolationTools.InterpolateColor(GetGlowColor(data.CeilingGlow, vc), vc, delta); + v.c = InterpolationTools.InterpolateColor(GetGlowColor(data.CeilingGlow, vc), vc, delta).WithAlpha(255).ToInt(); } } @@ -327,9 +327,9 @@ namespace CodeImp.DoomBuilder.BuilderModes if(v.z < fgz) { float fz = data.Floor.plane.GetZ(v.x, v.y); - float delta = ((v.z - fz) / (fgz - fz)) * 0.9f; + float delta = 1.0f - (((v.z - fz) / (fgz - fz)) * 0.9f); PixelColor vc = PixelColor.FromInt(v.c); - v.c = InterpolationTools.InterpolateColor(vc, GetGlowColor(data.FloorGlow, vc), delta); + v.c = InterpolationTools.InterpolateColor(vc, GetGlowColor(data.FloorGlow, vc), delta).WithAlpha(255).ToInt(); } } @@ -542,34 +542,12 @@ namespace CodeImp.DoomBuilder.BuilderModes } //mxd - private void OnTextureChanged() + public void SelectNeighbours(bool select, bool matchtexture, bool matchheight) { - //check for 3d floors - // MascaraSnake: 3D floor handling - if(Sidedef.Line.Is3DFloor) - { - if (!General.Map.FormatInterface.HasLinedefParameters) Sidedef.Line.Set3DFloorArgs(); - int sectortag = ((General.Map.UDMF || (Sidedef.Line.Args[1] & 8) != 0) ? Sidedef.Line.Args[0] : Sidedef.Line.Args[0] + (Sidedef.Line.Args[4] << 8)); - if(sectortag == 0) return; - - foreach(Sector sector in General.Map.Map.Sectors) - { - if(sector.Tags.Contains(sectortag)) - { - BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(sector); - vs.UpdateSectorGeometry(true); - } - } - } + SelectNeighbours(select, matchtexture, matchheight, true, true); } - //mxd - public void SelectNeighbours(bool select, bool matchtexture, bool matchheight) - { - SelectNeighbours(select, matchtexture, matchheight, true, true); - } - - private void SelectNeighbours(bool select, bool matchtexture, bool matchheight, bool clearlinedefs, bool forward) + private void SelectNeighbours(bool select, bool matchtexture, bool matchheight, bool clearlinedefs, bool forward) { if(Sidedef.Sector == null || Triangles < 1 || (!matchtexture && !matchheight)) return; @@ -674,12 +652,6 @@ namespace CodeImp.DoomBuilder.BuilderModes } } - //mxd - public virtual bool IsSelected() - { - return selected; - } - //mxd protected void FitTexture(FitTextureOptions options) { @@ -710,11 +682,13 @@ namespace CodeImp.DoomBuilder.BuilderModes if(options.FitWidth) { float scalex, offsetx; + float linelength = (float)Math.Round(Sidedef.Line.Length); // Let's use ZDoom-compatible line length here if(options.FitAcrossSurfaces) { - scalex = Texture.ScaledWidth / (Sidedef.Line.Length * (options.GlobalBounds.Width / Sidedef.Line.Length)) * options.HorizontalRepeat; - offsetx = (float)Math.Round((options.Bounds.X * scalex - Sidedef.OffsetX - options.ControlSideOffsetX) % Texture.Width, General.Map.FormatInterface.VertexDecimals); + scalex = Texture.ScaledWidth / (linelength * (options.GlobalBounds.Width / linelength)) * options.HorizontalRepeat; + offsetx = (float)Math.Round((options.Bounds.X * scalex - Sidedef.OffsetX - options.ControlSideOffsetX), General.Map.FormatInterface.VertexDecimals); + if(Texture.IsImageLoaded) offsetx %= Texture.Width; } else { @@ -756,17 +730,24 @@ namespace CodeImp.DoomBuilder.BuilderModes } else { - offsety = Tools.GetSidedefOffsetY(Sidedef, geometrytype, options.Bounds.Y * scaley - Sidedef.OffsetY - options.ControlSideOffsetY, scaley, true) % Texture.Height; + offsety = Tools.GetSidedefOffsetY(Sidedef, geometrytype, options.Bounds.Y * scaley - Sidedef.OffsetY - options.ControlSideOffsetY, scaley, true); + if(Texture.IsImageLoaded) offsety %= Texture.Height; } } else { scaley = Texture.ScaledHeight / options.Bounds.Height * options.VerticalRepeat; - if(this is VisualLower) // Special cases, special cases... + // Special cases, special cases... + if(this is VisualLower) + { offsety = GetLowerOffsetY(scaley); + } else - offsety = Tools.GetSidedefOffsetY(Sidedef, geometrytype, -Sidedef.OffsetY - options.ControlSideOffsetY, scaley, true) % Texture.Height; + { + offsety = Tools.GetSidedefOffsetY(Sidedef, geometrytype, -Sidedef.OffsetY - options.ControlSideOffsetY, scaley, true); + if(Texture.IsImageLoaded) offsety %= Texture.Height; + } } UniFields.SetFloat(controlside.Fields, "scaley_" + partname, (float)Math.Round(scaley, General.Map.FormatInterface.VertexDecimals), 1.0f); @@ -784,9 +765,14 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Oh so special cases... private float GetLowerOffsetY(float scaley) { - if(IsLowerUnpegged()) - return ((-Sidedef.OffsetY - Sidedef.GetMiddleHeight() - Sidedef.GetHighHeight()) * scaley) % Texture.Height; - return (-Sidedef.OffsetY * scaley) % Texture.Height; + float offsety; + if(Sidedef.Line.IsFlagSet(General.Map.Config.LowerUnpeggedFlag)) + offsety = (-Sidedef.OffsetY - Sidedef.GetMiddleHeight() - Sidedef.GetHighHeight()) * scaley; + else + offsety = -Sidedef.OffsetY * scaley; + + if(Texture.IsImageLoaded) offsety %= Texture.Height; + return offsety; } #endregion @@ -800,7 +786,7 @@ namespace CodeImp.DoomBuilder.BuilderModes protected abstract void SetTextureOffsetX(int x); protected abstract void SetTextureOffsetY(int y); protected virtual void ResetTextureScale() { } //mxd - protected abstract void MoveTextureOffset(Point xy); + protected abstract void MoveTextureOffset(int offsetx, int offsety); protected abstract Point GetTextureOffset(); public virtual void OnTextureFit(FitTextureOptions options) { } //mxd public virtual void OnPaintSelectEnd() { } // biwa @@ -827,7 +813,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Update VisualSector othersector = mode.GetVisualSector(Sidedef.Other.Sector); - if(othersector is BaseVisualSector) (othersector as BaseVisualSector).Changed = true; + if(othersector is BaseVisualSector) ((BaseVisualSector)othersector).Changed = true; } } } @@ -840,12 +826,13 @@ namespace CodeImp.DoomBuilder.BuilderModes mode.SetActionResult("Deleted a texture."); SetTexture("-"); - // Update - Sector.UpdateSectorGeometry(true); + //mxd. Update linked effects + SectorData sd = mode.GetSectorDataEx(Sector.Sector); + if(sd != null) sd.Reset(true); } // Processing - public virtual void OnProcess(float deltatime) + public virtual void OnProcess(long deltatime) { // If the texture was not loaded, but is loaded now, then re-setup geometry if(setuponloadedtexture != 0) @@ -920,12 +907,29 @@ namespace CodeImp.DoomBuilder.BuilderModes ResetTextureScale(); // And brightness - if(Sidedef.Fields.ContainsKey("light")) Sidedef.Fields.Remove("light"); - if(Sidedef.Fields.ContainsKey("lightabsolute")) Sidedef.Fields.Remove("lightabsolute"); + bool setupallparts = false; + if(Sidedef.Fields.ContainsKey("light")) + { + Sidedef.Fields.Remove("light"); + setupallparts = true; + } + if(Sidedef.Fields.ContainsKey("lightabsolute")) + { + Sidedef.Fields.Remove("lightabsolute"); + setupallparts = true; + } - // Update sidedef geometry - VisualSidedefParts parts = Sector.GetSidedefParts(Sidedef); - parts.SetupAllParts(); + if(setupallparts) + { + // Update all sidedef geometry + VisualSidedefParts parts = Sector.GetSidedefParts(Sidedef); + parts.SetupAllParts(); + } + else + { + // Update this part only + this.Setup(); + } } // Toggle upper-unpegged @@ -1086,7 +1090,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } // Do the alignment - Tools.FloodfillTextures(this.Sidedef, oldtexturelong, newtexture, false); + BuilderModesTools.FloodfillTextures(mode, Sidedef, texturehashes, newtexture, false); // Get the changed sidedefs List<Sidedef> changes = General.Map.Map.GetMarkedSidedefs(true); @@ -1095,7 +1099,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Update the parts for this sidedef! if(mode.VisualSectorExists(sd.Sector)) { - BaseVisualSector vs = (mode.GetVisualSector(sd.Sector) as BaseVisualSector); + BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(sd.Sector); VisualSidedefParts parts = vs.GetSidedefParts(sd); parts.SetupAllParts(); } @@ -1178,7 +1182,10 @@ namespace CodeImp.DoomBuilder.BuilderModes { mode.CreateUndo("Change texture " + texture); SetTexture(texture); - OnTextureChanged();//mxd + + //mxd. Update linked effects + SectorData sd = mode.GetSectorDataEx(Sector.Sector); + if(sd != null) sd.Reset(true); } // Paste texture @@ -1189,7 +1196,10 @@ namespace CodeImp.DoomBuilder.BuilderModes mode.CreateUndo("Paste texture \"" + BuilderPlug.Me.CopiedTexture + "\""); mode.SetActionResult("Pasted texture \"" + BuilderPlug.Me.CopiedTexture + "\"."); SetTexture(BuilderPlug.Me.CopiedTexture); - OnTextureChanged(); //mxd + + //mxd. Update linked effects + SectorData sd = mode.GetSectorDataEx(Sector.Sector); + if(sd != null) sd.Reset(true); } } @@ -1201,17 +1211,25 @@ namespace CodeImp.DoomBuilder.BuilderModes { SetTextureOffsetX(BuilderPlug.Me.CopiedOffsets.X); SetTextureOffsetY(BuilderPlug.Me.CopiedOffsets.Y); + + // Update sidedef part geometry + this.Setup(); } else { Sidedef.OffsetX = BuilderPlug.Me.CopiedOffsets.X; Sidedef.OffsetY = BuilderPlug.Me.CopiedOffsets.Y; + + // Update sidedef geometry + VisualSidedefParts parts = Sector.GetSidedefParts(Sidedef); + parts.SetupAllParts(); } + + //mxd. Update linked effects + SectorData sd = mode.GetSectorDataEx(Sector.Sector); + if(sd != null) sd.Reset(true); + mode.SetActionResult("Pasted texture offsets " + BuilderPlug.Me.CopiedOffsets.X + ", " + BuilderPlug.Me.CopiedOffsets.Y + "."); - - // Update sidedef geometry - VisualSidedefParts parts = Sector.GetSidedefParts(Sidedef); - parts.SetupAllParts(); } // Copy texture @@ -1324,9 +1342,13 @@ namespace CodeImp.DoomBuilder.BuilderModes updatelist.Add((BaseVisualSector)mode.GetVisualSector(l.Back.Sector)); } + //mxd. Always select front side for extrafloors + Linedef sourceline = GetControlLinedef(); + Sidedef target = (sourceline != Sidedef.Line && sourceline.Front != null ? sourceline.Front : Sidedef); + General.Interface.OnEditFormValuesChanged += Interface_OnEditFormValuesChanged; mode.StartRealtimeInterfaceUpdate(SelectionType.Linedefs); - DialogResult result = General.Interface.ShowEditLinedefs(linedefs, Sidedef.IsFront, !Sidedef.IsFront); + DialogResult result = General.Interface.ShowEditLinedefs(linedefs, target.IsFront, !target.IsFront); mode.StopRealtimeInterfaceUpdate(SelectionType.Linedefs); General.Interface.OnEditFormValuesChanged -= Interface_OnEditFormValuesChanged; @@ -1489,18 +1511,17 @@ namespace CodeImp.DoomBuilder.BuilderModes if(newlight == light) return; - //create undo + // Create undo mode.CreateUndo("Change wall brightness", UndoGroup.SurfaceBrightnessChange, Sector.Sector.FixedIndex); Sidedef.Fields.BeforeFieldsChange(); - //apply changes + // Apply changes UniFields.SetInteger(Sidedef.Fields, "light", newlight, (absolute ? int.MinValue : 0)); Tools.UpdateLightFogFlag(Sidedef); mode.SetActionResult("Changed wall brightness to " + newlight + "."); - Sector.Sector.UpdateCache(); - //rebuild sector - Sector.UpdateSectorGeometry(false); + // Update this part only + this.Setup(); } else if(!Sector.Changed) { @@ -1527,7 +1548,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(mode.VisualThingExists(t)) { // Update thing - BaseVisualThing vt = (mode.GetVisualThing(t) as BaseVisualThing); + BaseVisualThing vt = (BaseVisualThing)mode.GetVisualThing(t); vt.Changed = true; } } @@ -1544,10 +1565,13 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd if(General.Map.UDMF) { - // Apply UDMF offsets - MoveTextureOffset(new Point(-horizontal, -vertical)); + // Apply per-texture offsets + MoveTextureOffset(-horizontal, -vertical); Point p = GetTextureOffset(); mode.SetActionResult("Changed texture offsets to " + p.X + ", " + p.Y + "."); + + // Update this part only + this.Setup(); } else { @@ -1560,13 +1584,17 @@ namespace CodeImp.DoomBuilder.BuilderModes // Update sidedef geometry UpdateAfterTextureOffsetChange(); - } + + //mxd. Update linked effects + SectorData sd = mode.GetSectorDataEx(Sector.Sector); + if (sd != null) sd.Reset(true); + } protected virtual int ChangeOffsetX(int amount) { Sidedef.OffsetX -= amount; - if (Texture != null) - { + if (Texture != null && Texture.IsImageLoaded) + { int repeatmidtexoffset = General.Map.SRB2 && Sidedef.Line.IsFlagSet(General.Map.Config.RepeatMidtextureFlag) ? (Sidedef.OffsetX / 4096) * 4096 : 0; Sidedef.OffsetX %= Texture.Width; Sidedef.OffsetX += repeatmidtexoffset; @@ -1577,7 +1605,7 @@ namespace CodeImp.DoomBuilder.BuilderModes protected virtual int ChangeOffsetY(int amount) { Sidedef.OffsetY -= amount; - if (geometrytype != VisualGeometryType.WALL_MIDDLE && Texture != null) Sidedef.OffsetY %= Texture.Height; + if (geometrytype != VisualGeometryType.WALL_MIDDLE && Texture != null && Texture.IsImageLoaded) Sidedef.OffsetY %= Texture.Height; return Sidedef.OffsetY; } @@ -1590,7 +1618,7 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd public virtual void OnChangeScale(int incrementX, int incrementY) { - if(!General.Map.UDMF || !Texture.IsImageLoaded) return; + if(!General.Map.UDMF || Texture == null || !Texture.IsImageLoaded) return; if((General.Map.UndoRedo.NextUndo == null) || (General.Map.UndoRedo.NextUndo.TicketID != undoticket)) undoticket = mode.CreateUndo("Change wall scale"); @@ -1606,7 +1634,6 @@ namespace CodeImp.DoomBuilder.BuilderModes break; case VisualGeometryType.WALL_MIDDLE: - case VisualGeometryType.WALL_MIDDLE_3D: keyX = "scalex_mid"; keyY = "scaley_mid"; break; @@ -1641,8 +1668,13 @@ namespace CodeImp.DoomBuilder.BuilderModes UniFields.SetFloat(Sidedef.Fields, keyY, scaleY, 1.0f); } - //update geometry + // Update geometry Setup(); + + //mxd. Update linked effects + SectorData sd = mode.GetSectorDataEx(Sector.Sector); + if(sd != null) sd.Reset(true); + mode.SetActionResult("Wall scale changed to " + scaleX.ToString("F03", CultureInfo.InvariantCulture) + ", " + scaleY.ToString("F03", CultureInfo.InvariantCulture) + " (" + (int)Math.Round(Texture.Width / scaleX) + " x " + (int)Math.Round(Texture.Height / scaleY) + ")."); } diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs index 877acdb605120750eeaf58eaf69cdeecf79520ca..a7855daecc46be5cd49a4edf42c41105fb7d3f09 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs @@ -49,8 +49,8 @@ namespace CodeImp.DoomBuilder.BuilderModes { #region ================== Constants // Object picking - private const float PICK_INTERVAL = 80.0f; - private const float PICK_INTERVAL_PAINT_SELECT = 10.0f; // biwa + private const long PICK_INTERVAL = 80; + private const long PICK_INTERVAL_PAINT_SELECT = 10; // biwa private const float PICK_RANGE = 0.98f; // Gravity @@ -67,7 +67,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Object picking private VisualPickResult target; - private float lastpicktime; + private long lastpicktime; private bool locktarget; private bool useSelectionFromClassicMode;//mxd private readonly Timer selectioninfoupdatetimer; //mxd @@ -147,20 +147,16 @@ namespace CodeImp.DoomBuilder.BuilderModes get { // Geometry picked? - if(target.picked is VisualGeometry) + VisualGeometry vg = target.picked as VisualGeometry; + if(vg != null) { - VisualGeometry pickedgeo = (target.picked as VisualGeometry); - - if(pickedgeo.Sidedef != null) return pickedgeo.Sidedef; - if(pickedgeo.Sector != null) return pickedgeo.Sector; + if(vg.Sidedef != null) return vg.Sidedef; + if(vg.Sector != null) return vg.Sector; return null; } // Thing picked? - if(target.picked is VisualThing) - { - VisualThing pickedthing = (target.picked as VisualThing); - return pickedthing.Thing; - } + VisualThing vt = target.picked as VisualThing; + if(vt != null) return vt.Thing; return null; } @@ -212,12 +208,11 @@ namespace CodeImp.DoomBuilder.BuilderModes // Not already disposed? if(!isdisposed) { - // Clean up - bsp.Dispose(); - bsp = null; - - // Done - base.Dispose(); + // Clean up + selectioninfoupdatetimer.Dispose(); //mxd + + // Done + base.Dispose(); } } @@ -308,7 +303,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Reset changed flags foreach(KeyValuePair<Sector, VisualSector> vs in allsectors) { - BaseVisualSector bvs = (vs.Value as BaseVisualSector); + BaseVisualSector bvs = (BaseVisualSector)vs.Value; foreach(VisualFloor vf in bvs.ExtraFloors) vf.Changed = false; foreach(VisualCeiling vc in bvs.ExtraCeilings) vc.Changed = false; foreach(VisualFloor vf in bvs.ExtraBackFloors) vf.Changed = false; //mxd @@ -369,7 +364,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(vs.Value != null) { - BaseVisualSector bvs = vs.Value as BaseVisualSector; + BaseVisualSector bvs = (BaseVisualSector)vs.Value; if((bvs.Floor != null) && bvs.Floor.Selected) selectedobjects.Add(bvs.Floor); if((bvs.Ceiling != null) && bvs.Ceiling.Selected) selectedobjects.Add(bvs.Ceiling); foreach(Sidedef sd in vs.Key.Sidedefs) @@ -377,7 +372,7 @@ namespace CodeImp.DoomBuilder.BuilderModes List<VisualGeometry> sidedefgeos = bvs.GetSidedefGeometry(sd); foreach(VisualGeometry sdg in sidedefgeos) { - if(sdg.Selected) selectedobjects.Add((sdg as IVisualEventReceiver)); + if(sdg.Selected) selectedobjects.Add((IVisualEventReceiver)sdg); } } } @@ -387,7 +382,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(vt.Value != null) { - BaseVisualThing bvt = vt.Value as BaseVisualThing; + BaseVisualThing bvt = (BaseVisualThing)vt.Value; if(bvt.Selected) selectedobjects.Add(bvt); } } @@ -477,18 +472,18 @@ namespace CodeImp.DoomBuilder.BuilderModes // Geometry picked? if(target.picked is VisualGeometry) { - VisualGeometry pickedgeo = (target.picked as VisualGeometry); + VisualGeometry pickedgeo = (VisualGeometry)target.picked; // Sidedef? if(pickedgeo is BaseVisualGeometrySidedef) { - BaseVisualGeometrySidedef pickedsidedef = (pickedgeo as BaseVisualGeometrySidedef); + BaseVisualGeometrySidedef pickedsidedef = (BaseVisualGeometrySidedef)pickedgeo; General.Interface.ShowLinedefInfo(pickedsidedef.GetControlLinedef(), pickedsidedef.Sidedef); //mxd } // Sector? else if(pickedgeo is BaseVisualGeometrySector) { - BaseVisualGeometrySector pickedsector = (pickedgeo as BaseVisualGeometrySector); + BaseVisualGeometrySector pickedsector = (BaseVisualGeometrySector)pickedgeo; bool isceiling = (pickedsector is VisualCeiling); //mxd General.Interface.ShowSectorInfo(pickedsector.Level.sector, isceiling, !isceiling); } @@ -497,14 +492,16 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.HideInfo(); } } + // Thing picked? else if(target.picked is VisualThing) - { // Thing picked? - VisualThing pickedthing = (target.picked as VisualThing); + { + VisualThing pickedthing = (VisualThing)target.picked; General.Interface.ShowThingInfo(pickedthing.Thing); } - else if(target.picked is VisualVertex) //mxd + //mxd. Vertex picked? + else if(target.picked is VisualVertex) { - VisualVertex pickedvert = (target.picked as VisualVertex); + VisualVertex pickedvert = (VisualVertex)target.picked; General.Interface.ShowVertexInfo(pickedvert.Vertex); } } @@ -517,16 +514,11 @@ namespace CodeImp.DoomBuilder.BuilderModes // This updates the VisualSectors and VisualThings that have their Changed property set private void UpdateChangedObjects() { - //mxd - SectorData[] toupdate = new SectorData[sectordata.Values.Count]; - sectordata.Values.CopyTo(toupdate, 0); - foreach(SectorData data in toupdate) data.Update(); - foreach(KeyValuePair<Sector, VisualSector> vs in allsectors) { if(vs.Value != null) { - BaseVisualSector bvs = vs.Value as BaseVisualSector; + BaseVisualSector bvs = (BaseVisualSector)vs.Value; if(bvs.Changed) bvs.Rebuild(); } } @@ -535,7 +527,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(vt.Value != null) { - BaseVisualThing bvt = vt.Value as BaseVisualThing; + BaseVisualThing bvt = (BaseVisualThing)vt.Value; if(bvt.Changed) bvt.Rebuild(); } } @@ -567,7 +559,7 @@ namespace CodeImp.DoomBuilder.BuilderModes Vector3D[] translatedcoords = TranslateCoordinates(coords, direction, absoluteposition); for(int i = 0; i < visualthings.Count; i++) { - BaseVisualThing t = visualthings[i] as BaseVisualThing; + BaseVisualThing t = (BaseVisualThing)visualthings[i]; t.OnMove(translatedcoords[i]); } @@ -648,7 +640,7 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(IVisualEventReceiver obj in selectedobjects) { - if(!obj.IsSelected()) continue; + if(!obj.Selected) continue; if(obj is BaseVisualThing) numThings++; else if(obj is BaseVisualVertex) numVerts++; @@ -759,7 +751,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(!vertices.ContainsKey(v)) vertices.Add(v, new VisualVertexPair(new BaseVisualVertex(this, v, false), new BaseVisualVertex(this, v, true))); - return (floor ? vertices[v].FloorVertex as BaseVisualVertex : vertices[v].CeilingVertex as BaseVisualVertex); + return (floor ? (BaseVisualVertex)vertices[v].FloorVertex : (BaseVisualVertex)vertices[v].CeilingVertex); } //mxd @@ -799,20 +791,17 @@ namespace CodeImp.DoomBuilder.BuilderModes internal void RebuildElementData() { //mxd - Sector[] sectorsWithEffects = null; + HashSet<Sector> effectsectors = null; bsp.Build(); useblockmap = bsp.IsDeactivated; - if (!General.Settings.GZDoomRenderingEffects) - { - //store all sectors with effects + if(!General.Settings.EnhancedRenderingEffects) //mxd + { + // Store all sectors with effects if(sectordata != null && sectordata.Count > 0) - { - sectorsWithEffects = new Sector[sectordata.Count]; - sectordata.Keys.CopyTo(sectorsWithEffects, 0); - } + effectsectors = new HashSet<Sector>(sectordata.Keys); - //remove all vertex handles from selection + //Remove all vertex handles from selection if(vertices != null && vertices.Count > 0) { foreach(IVisualEventReceiver i in selectedobjects) @@ -831,17 +820,16 @@ namespace CodeImp.DoomBuilder.BuilderModes MessageBox.Show("Could not load the map's nodes: " + bsp.ErrorMessage + " Defaulting to blockmap.", "Error loading nodes!", MessageBoxButtons.OK, MessageBoxIcon.Error); - //mxd. rebuild all sectors with effects - if (sectorsWithEffects != null) + //mxd. Rebuild all sectors with effects + if (effectsectors != null) { - for(int i = 0; i < sectorsWithEffects.Length; i++) + foreach (Sector s in effectsectors) { + if (!VisualSectorExists(s)) continue; + // The visual sector associated is now outdated - if(VisualSectorExists(sectorsWithEffects[i])) - { - BaseVisualSector vs = GetVisualSector(sectorsWithEffects[i]) as BaseVisualSector; - vs.UpdateSectorGeometry(true); - } + BaseVisualSector vs = (BaseVisualSector)GetVisualSector(s); + vs.UpdateSectorGeometry(true); } } @@ -851,7 +839,7 @@ namespace CodeImp.DoomBuilder.BuilderModes vertices.Clear(); } - if (!General.Settings.GZDoomRenderingEffects) return; //mxd + if (!General.Settings.EnhancedRenderingEffects) return; //mxd if (General.Map.SRB2) { @@ -921,7 +909,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if (General.Map.Data.GlowingFlats.ContainsKey(s.LongFloorTexture) || General.Map.Data.GlowingFlats.ContainsKey(s.LongCeilTexture)) { SectorData sd = GetSectorData(s); - sd.AddEffectGlowingFlat(s); + //sd.AddEffectGlowingFlat(s); } } } @@ -1350,7 +1338,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } else if(obj is VisualFloor || obj is VisualCeiling) { - VisualGeometry vg = obj as VisualGeometry; + VisualGeometry vg = (VisualGeometry)obj; if(vg.Sector != null && vg.Sector.Sector != null && !selectedsectorindices.Contains(vg.Sector.Sector.Index)) { selectedsectorindices.Add(vg.Sector.Sector.Index); @@ -1360,7 +1348,7 @@ namespace CodeImp.DoomBuilder.BuilderModes else if(obj is VisualLower || obj is VisualUpper || obj is VisualMiddleDouble || obj is VisualMiddleSingle || obj is VisualMiddle3D) { - VisualGeometry vg = obj as VisualGeometry; + VisualGeometry vg = (VisualGeometry)obj; if(vg.Sidedef != null && !selectedlineindices.Contains(vg.Sidedef.Line.Index)) { selectedlineindices.Add(vg.Sidedef.Line.Index); @@ -1369,7 +1357,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } else if(obj is VisualVertex) { - VisualVertex v = obj as VisualVertex; + VisualVertex v = (VisualVertex)obj; if(!selectedvertexindices.Contains(v.Vertex.Index)) { selectedvertexindices.Add(v.Vertex.Index); @@ -1383,7 +1371,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } // Processing - public override void OnProcess(float deltatime) + public override void OnProcess(long deltatime) { float pickinterval = PICK_INTERVAL; // biwa // Process things? @@ -1475,7 +1463,14 @@ namespace CodeImp.DoomBuilder.BuilderModes MouseEventArgs args = new MouseEventArgs(General.Interface.MouseButtons, 0, 0, 0, 0); OnMouseMove(args); } - + + //mxd + public override void OnClockReset() + { + base.OnClockReset(); + lastpicktime = 0; + } + // This draws a frame public override void OnRedrawDisplay() { @@ -1486,9 +1481,9 @@ namespace CodeImp.DoomBuilder.BuilderModes renderer.SetFogMode(true); // Set target for highlighting - renderer.ShowSelection = General.Settings.GZOldHighlightMode || BuilderPlug.Me.UseHighlight; //mxd + renderer.ShowSelection = General.Settings.GZOldHighlightMode || General.Settings.UseHighlight; //mxd - if(BuilderPlug.Me.UseHighlight) + if(General.Settings.UseHighlight) renderer.SetHighlightedObject(target.picked); // Begin with geometry @@ -1571,7 +1566,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(sd.Marked && VisualSectorExists(sd.Sector)) { - BaseVisualSector vs = GetVisualSector(sd.Sector) as BaseVisualSector; + BaseVisualSector vs = (BaseVisualSector)GetVisualSector(sd.Sector); VisualSidedefParts parts = vs.GetSidedefParts(sd); parts.SetupAllParts(); } @@ -1582,23 +1577,26 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(s.Marked) { - SectorData sd = GetSectorData(s); - sd.Reset(false); //mxd (changed Reset implementation) - - // UpdateSectorGeometry for associated sectors (sd.UpdateAlso) as well! - foreach(KeyValuePair<Sector, bool> us in sd.UpdateAlso) + SectorData sd = GetSectorDataEx(s); + if(sd != null) { - if(VisualSectorExists(us.Key)) + sd.Reset(false); //mxd (changed Reset implementation) + + // UpdateSectorGeometry for associated sectors (sd.UpdateAlso) as well! + foreach(KeyValuePair<Sector, bool> us in sd.UpdateAlso) { - BaseVisualSector vs = GetVisualSector(us.Key) as BaseVisualSector; - vs.UpdateSectorGeometry(us.Value); + if(VisualSectorExists(us.Key)) + { + BaseVisualSector vs = (BaseVisualSector)GetVisualSector(us.Key); + vs.UpdateSectorGeometry(us.Value); + } } } // And update for this sector ofcourse if(VisualSectorExists(s)) { - BaseVisualSector vs = GetVisualSector(s) as BaseVisualSector; + BaseVisualSector vs = (BaseVisualSector)GetVisualSector(s); vs.UpdateSectorGeometry(false); } } @@ -1614,7 +1612,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if((vt.Value != null) && vt.Key.Marked) { if(vt.Key.IsDisposed) toremove.Add(vt.Key); //mxd. Disposed things will cause problems - else (vt.Value as BaseVisualThing).Rebuild(); + else ((BaseVisualThing)vt.Value).Rebuild(); } } @@ -1708,15 +1706,14 @@ namespace CodeImp.DoomBuilder.BuilderModes { base.OnUndoEnd(); - //mxd. Effects may've become invalid - if (General.Settings.GZDoomRenderingEffects && sectordata != null && sectordata.Count > 0) - RebuildElementData(); + //mxd. Effects may've become invalid + if(sectordata != null && sectordata.Count > 0) RebuildElementData(); //mxd. As well as geometry... foreach(KeyValuePair<Sector, VisualSector> group in visiblesectors) { - if(group.Value is BaseVisualSector) - (group.Value as BaseVisualSector).Rebuild(); + BaseVisualSector vs = (BaseVisualSector)group.Value; + if(vs != null) vs.Rebuild(); } RebuildSelectedObjectsList(); @@ -1731,13 +1728,13 @@ namespace CodeImp.DoomBuilder.BuilderModes base.OnRedoEnd(); //mxd. Effects may've become invalid - if(sectordata != null && sectordata.Count > 0) - RebuildElementData(); + if(sectordata != null && sectordata.Count > 0) RebuildElementData(); //mxd. As well as geometry... foreach(KeyValuePair<Sector, VisualSector> group in visiblesectors) { - if(group.Value is BaseVisualSector) (group.Value as BaseVisualSector).Rebuild(); + BaseVisualSector vs = (BaseVisualSector)group.Value; + if(vs != null) vs.Rebuild(); } RebuildSelectedObjectsList(); @@ -1751,7 +1748,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Reset changed flags foreach(KeyValuePair<Sector, VisualSector> vs in allsectors) { - BaseVisualSector bvs = (vs.Value as BaseVisualSector); + BaseVisualSector bvs = (BaseVisualSector)vs.Value; foreach(VisualFloor vf in bvs.ExtraFloors) vf.Changed = false; foreach(VisualCeiling vc in bvs.ExtraCeilings) vc.Changed = false; foreach(VisualFloor vf in bvs.ExtraBackFloors) vf.Changed = false; @@ -1779,7 +1776,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(VisualSectorExists(s.Key)) { - BaseVisualSector vs = GetVisualSector(s.Key) as BaseVisualSector; + BaseVisualSector vs = (BaseVisualSector)GetVisualSector(s.Key); vs.UpdateSectorGeometry(s.Value); } } @@ -1820,35 +1817,33 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Because Upper/Middle/Lower textures offsets should be threated separately in UDMF if(General.Map.UDMF) { - Dictionary<BaseVisualGeometrySidedef, bool> donesides = new Dictionary<BaseVisualGeometrySidedef, bool>(selectedobjects.Count); + HashSet<BaseVisualGeometrySidedef> donesides = new HashSet<BaseVisualGeometrySidedef>(); foreach(IVisualEventReceiver i in objs) { - if(!(i is BaseVisualGeometrySidedef)) continue; - BaseVisualGeometrySidedef vs = i as BaseVisualGeometrySidedef; //mxd - if(!donesides.ContainsKey(vs)) + BaseVisualGeometrySidedef vs = (BaseVisualGeometrySidedef)i; //mxd + if(!donesides.Contains(vs)) { //mxd. added scaling by texture scale if(vs.Texture.UsedInMap) //mxd. Otherwise it's MissingTexture3D and we probably don't want to drag that vs.OnChangeTextureOffset((int)(dx / vs.Texture.Scale.x), (int)(dy / vs.Texture.Scale.y), false); - donesides.Add(vs, false); + donesides.Add(vs); } } } else { - Dictionary<Sidedef, bool> donesides = new Dictionary<Sidedef, bool>(selectedobjects.Count); + HashSet<Sidedef> donesides = new HashSet<Sidedef>(); foreach(IVisualEventReceiver i in objs) { - if(!(i is BaseVisualGeometrySidedef)) continue; - BaseVisualGeometrySidedef vs = i as BaseVisualGeometrySidedef; //mxd - if(!donesides.ContainsKey(vs.Sidedef)) + BaseVisualGeometrySidedef vs = (BaseVisualGeometrySidedef)i; //mxd + if(!donesides.Contains(vs.Sidedef)) { //mxd. added scaling by texture scale if(vs.Texture.UsedInMap) //mxd. Otherwise it's MissingTexture3D and we probably don't want to drag that vs.OnChangeTextureOffset((int)(dx / vs.Texture.Scale.x), (int)(dy / vs.Texture.Scale.y), false); - donesides.Add(vs.Sidedef, false); + donesides.Add(vs.Sidedef); } } } @@ -1857,17 +1852,15 @@ namespace CodeImp.DoomBuilder.BuilderModes // Apply flat offsets public void ApplyFlatOffsetChange(int dx, int dy) { - Dictionary<Sector, int> donesectors = new Dictionary<Sector, int>(selectedobjects.Count); + HashSet<Sector> donesectors = new HashSet<Sector>(); List<IVisualEventReceiver> objs = GetSelectedObjects(true, false, false, false); foreach(IVisualEventReceiver i in objs) { - if(i is BaseVisualGeometrySector) + BaseVisualGeometrySector bvs = (BaseVisualGeometrySector)i; + if(bvs != null && !donesectors.Contains(bvs.Sector.Sector)) { - if(!donesectors.ContainsKey((i as BaseVisualGeometrySector).Sector.Sector)) - { - i.OnChangeTextureOffset(dx, dy, false); - donesectors.Add((i as BaseVisualGeometrySector).Sector.Sector, 0); - } + bvs.OnChangeTextureOffset(dx, dy, false); + donesectors.Add(bvs.Sector.Sector); } } } @@ -1909,46 +1902,69 @@ namespace CodeImp.DoomBuilder.BuilderModes { List<IVisualEventReceiver> objs = new List<IVisualEventReceiver>(); foreach(IVisualEventReceiver i in selectedobjects) - { - if (includesectors && (i is BaseVisualGeometrySector) /*&& ((BaseVisualGeometrySector)i).Triangles > 0*/) objs.Add(i); - else if (includesidedefs && (i is BaseVisualGeometrySidedef) /*&& ((BaseVisualGeometrySidedef)i).Triangles > 0*/) objs.Add(i); - else if (includethings && (i is BaseVisualThing)) objs.Add(i); - else if (includevertices && (i is BaseVisualVertex)) objs.Add(i); //mxd - } + { + if(includesectors && (i is BaseVisualGeometrySector)) objs.Add(i); + else if(includesidedefs && (i is BaseVisualGeometrySidedef)) objs.Add(i); + else if(includethings && (i is BaseVisualThing)) objs.Add(i); + else if(includevertices && (i is BaseVisualVertex)) objs.Add(i); //mxd + } // Add highlight? if (selectedobjects.Count == 0) { IVisualEventReceiver i = (target.picked as IVisualEventReceiver); - if (includesectors && (i is BaseVisualGeometrySector) /*&& ((BaseVisualGeometrySector)i).Triangles > 0*/) objs.Add(i); - else if (includesidedefs && (i is BaseVisualGeometrySidedef) /*&& ((BaseVisualGeometrySidedef)i).Triangles > 0*/) objs.Add(i); - else if (includethings && (i is BaseVisualThing)) objs.Add(i); - else if (includevertices && (i is BaseVisualVertex)) objs.Add(i); //mxd - } + if(includesectors && (i is BaseVisualGeometrySector)) objs.Add(i); + else if(includesidedefs && (i is BaseVisualGeometrySidedef)) objs.Add(i); + else if(includethings && (i is BaseVisualThing)) objs.Add(i); + else if(includevertices && (i is BaseVisualVertex)) objs.Add(i); //mxd + } return objs; } //mxd - internal List<IVisualEventReceiver> RemoveDuplicateSidedefs(List<IVisualEventReceiver> objs) + private static IEnumerable<IVisualEventReceiver> RemoveDuplicateSidedefs(IEnumerable<IVisualEventReceiver> objs) { - Dictionary<Sidedef, bool> processed = new Dictionary<Sidedef, bool>(); + HashSet<Sidedef> processed = new HashSet<Sidedef>(); List<IVisualEventReceiver> result = new List<IVisualEventReceiver>(); - foreach(IVisualEventReceiver obj in objs) + if(General.Map.UDMF) { - if(!(obj is BaseVisualGeometrySidedef)) + // For UDMF maps, we only need to remove duplicate extrafloor sidedefs + foreach(IVisualEventReceiver i in objs) { - result.Add(obj); + if(i is VisualMiddle3D) + { + VisualMiddle3D vm = i as VisualMiddle3D; + if(!processed.Contains(vm.Sidedef)) + { + processed.Add(vm.Sidedef); + result.Add(i); + } + } + else + { + result.Add(i); + } } - else + } + else + { + // For Doom/Hexen maps, we need to remove all duplicates + foreach(IVisualEventReceiver i in objs) { - Sidedef side = (obj as BaseVisualGeometrySidedef).Sidedef; - - if(!processed.ContainsKey(side)) + BaseVisualGeometrySidedef sidedef = i as BaseVisualGeometrySidedef; + if(sidedef != null) { - processed.Add(side, false); - result.Add(obj); + if(!processed.Contains(sidedef.Sidedef)) + { + processed.Add(sidedef.Sidedef); + result.Add(i); + } + } + else + { + result.Add(i); } } } @@ -1959,26 +1975,23 @@ namespace CodeImp.DoomBuilder.BuilderModes // This returns all selected sectors, no doubles public List<Sector> GetSelectedSectors() { - Dictionary<Sector, int> added = new Dictionary<Sector, int>(); + HashSet<Sector> added = new HashSet<Sector>(); List<Sector> sectors = new List<Sector>(); foreach(IVisualEventReceiver i in selectedobjects) { - if(i is BaseVisualGeometrySector) + BaseVisualGeometrySector sector = i as BaseVisualGeometrySector; + if(sector != null && !added.Contains(sector.Level.sector)) { - Sector s = (i as BaseVisualGeometrySector).Level.sector; - if(!added.ContainsKey(s)) - { - sectors.Add(s); - added.Add(s, 0); - } + sectors.Add(sector.Level.sector); + added.Add(sector.Level.sector); } } // Add highlight? if((selectedobjects.Count == 0) && (target.picked is BaseVisualGeometrySector)) { - Sector s = (target.picked as BaseVisualGeometrySector).Level.sector; - if(!added.ContainsKey(s)) sectors.Add(s); + Sector s = ((BaseVisualGeometrySector)target.picked).Level.sector; + if(!added.Contains(s)) sectors.Add(s); } return sectors; @@ -1987,17 +2000,18 @@ namespace CodeImp.DoomBuilder.BuilderModes // This returns all selected linedefs, no doubles public List<Linedef> GetSelectedLinedefs() { - Dictionary<Linedef, int> added = new Dictionary<Linedef, int>(); + HashSet<Linedef> added = new HashSet<Linedef>(); List<Linedef> linedefs = new List<Linedef>(); foreach(IVisualEventReceiver i in selectedobjects) { - if(i is BaseVisualGeometrySidedef) + BaseVisualGeometrySidedef sidedef = i as BaseVisualGeometrySidedef; + if(sidedef != null) { - Linedef l = (i as BaseVisualGeometrySidedef).GetControlLinedef(); //mxd - if(!added.ContainsKey(l)) + Linedef l = sidedef.GetControlLinedef(); //mxd + if(!added.Contains(l)) { linedefs.Add(l); - added.Add(l, 0); + added.Add(l); } } } @@ -2005,8 +2019,8 @@ namespace CodeImp.DoomBuilder.BuilderModes // Add highlight? if((selectedobjects.Count == 0) && (target.picked is BaseVisualGeometrySidedef)) { - Linedef l = (target.picked as BaseVisualGeometrySidedef).GetControlLinedef(); //mxd - if(!added.ContainsKey(l)) linedefs.Add(l); + Linedef l = ((BaseVisualGeometrySidedef)target.picked).GetControlLinedef(); //mxd + if(!added.Contains(l)) linedefs.Add(l); } return linedefs; @@ -2015,26 +2029,23 @@ namespace CodeImp.DoomBuilder.BuilderModes // This returns all selected sidedefs, no doubles public List<Sidedef> GetSelectedSidedefs() { - Dictionary<Sidedef, int> added = new Dictionary<Sidedef, int>(); + HashSet<Sidedef> added = new HashSet<Sidedef>(); List<Sidedef> sidedefs = new List<Sidedef>(); foreach(IVisualEventReceiver i in selectedobjects) { - if(i is BaseVisualGeometrySidedef) + BaseVisualGeometrySidedef sidedef = i as BaseVisualGeometrySidedef; + if(sidedef != null && !added.Contains(sidedef.Sidedef)) { - Sidedef sd = (i as BaseVisualGeometrySidedef).Sidedef; - if(!added.ContainsKey(sd)) - { - sidedefs.Add(sd); - added.Add(sd, 0); - } + sidedefs.Add(sidedef.Sidedef); + added.Add(sidedef.Sidedef); } } // Add highlight? if((selectedobjects.Count == 0) && (target.picked is BaseVisualGeometrySidedef)) { - Sidedef sd = (target.picked as BaseVisualGeometrySidedef).Sidedef; - if(!added.ContainsKey(sd)) sidedefs.Add(sd); + Sidedef sd = ((BaseVisualGeometrySidedef)target.picked).Sidedef; + if(!added.Contains(sd)) sidedefs.Add(sd); } return sidedefs; @@ -2043,26 +2054,23 @@ namespace CodeImp.DoomBuilder.BuilderModes // This returns all selected things, no doubles public List<Thing> GetSelectedThings() { - Dictionary<Thing, int> added = new Dictionary<Thing, int>(); + HashSet<Thing> added = new HashSet<Thing>(); List<Thing> things = new List<Thing>(); foreach(IVisualEventReceiver i in selectedobjects) { - if(i is BaseVisualThing) + BaseVisualThing thing = i as BaseVisualThing; + if(thing != null && !added.Contains(thing.Thing)) { - Thing t = (i as BaseVisualThing).Thing; - if(!added.ContainsKey(t)) - { - things.Add(t); - added.Add(t, 0); - } + things.Add(thing.Thing); + added.Add(thing.Thing); } } // Add highlight? if((selectedobjects.Count == 0) && (target.picked is BaseVisualThing)) { - Thing t = (target.picked as BaseVisualThing).Thing; - if(!added.ContainsKey(t)) things.Add(t); + Thing t = ((BaseVisualThing)target.picked).Thing; + if(!added.Contains(t)) things.Add(t); } return things; @@ -2071,29 +2079,24 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. This returns all selected vertices, no doubles public List<Vertex> GetSelectedVertices() { - Dictionary<Vertex, int> added = new Dictionary<Vertex, int>(); + HashSet<Vertex> added = new HashSet<Vertex>(); List<Vertex> verts = new List<Vertex>(); - foreach(IVisualEventReceiver i in selectedobjects) + foreach(IVisualEventReceiver i in selectedobjects) { - if(i is BaseVisualVertex) + BaseVisualVertex vertex = i as BaseVisualVertex; + if(vertex != null && !added.Contains(vertex.Vertex)) { - Vertex v = (i as BaseVisualVertex).Vertex; - - if(!added.ContainsKey(v)) - { - verts.Add(v); - added.Add(v, 0); - } + verts.Add(vertex.Vertex); + added.Add(vertex.Vertex); } } // Add highlight? if((selectedobjects.Count == 0) && (target.picked is BaseVisualVertex)) { - Vertex v = (target.picked as BaseVisualVertex).Vertex; - if(!added.ContainsKey(v)) - verts.Add(v); + Vertex v = ((BaseVisualVertex)target.picked).Vertex; + if(!added.Contains(v)) verts.Add(v); } return verts; @@ -2106,7 +2109,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(singleselection || target.picked.Selected || targetonly) { - return target.picked as IVisualEventReceiver; + return (IVisualEventReceiver)target.picked; } if(selectedobjects.Count > 0) @@ -2114,7 +2117,7 @@ namespace CodeImp.DoomBuilder.BuilderModes return selectedobjects[0]; } - return target.picked as IVisualEventReceiver; + return (IVisualEventReceiver)target.picked; } return new NullVisualEventReceiver(); @@ -2192,7 +2195,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(vt.Value != null) { - BaseVisualThing bvt = vt.Value as BaseVisualThing; + BaseVisualThing bvt = (BaseVisualThing)vt.Value; bvt.Selected = false; } } @@ -2227,7 +2230,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(General.Interface.AltState) { - target.SelectNeighbours(target.IsSelected(), General.Interface.ShiftState, General.Interface.CtrlState); + target.SelectNeighbours(target.Selected, General.Interface.ShiftState, General.Interface.CtrlState); } else { @@ -2235,7 +2238,7 @@ namespace CodeImp.DoomBuilder.BuilderModes selectedobjects.CopyTo(selection); foreach(IVisualEventReceiver obj in selection) - obj.SelectNeighbours(target.IsSelected(), General.Interface.ShiftState, General.Interface.CtrlState); + obj.SelectNeighbours(target.Selected, General.Interface.ShiftState, General.Interface.CtrlState); } } @@ -2326,20 +2329,19 @@ namespace CodeImp.DoomBuilder.BuilderModes // Get selection if(selectedobjects.Count == 0) { - IVisualEventReceiver i = (target.picked as IVisualEventReceiver); - if(i is VisualFloor) + if(target.picked is VisualFloor) { - VisualFloor vf = i as VisualFloor; + VisualFloor vf = (VisualFloor)target.picked; floors.Add(vf.Level.sector, vf); } - else if(i is VisualCeiling) + else if(target.picked is VisualCeiling) { - VisualCeiling vc = i as VisualCeiling; + VisualCeiling vc = (VisualCeiling)target.picked; ceilings.Add(vc.Level.sector, vc); } - else if(i is BaseVisualThing) + else if(target.picked is BaseVisualThing) { - things.Add(i as BaseVisualThing); + things.Add((BaseVisualThing)target.picked); } } else @@ -2348,17 +2350,17 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(i is VisualFloor) { - VisualFloor vf = i as VisualFloor; + VisualFloor vf = (VisualFloor)i; floors.Add(vf.Level.sector, vf); } else if(i is VisualCeiling) { - VisualCeiling vc = i as VisualCeiling; + VisualCeiling vc = (VisualCeiling)i; ceilings.Add(vc.Level.sector, vc); } else if(i is BaseVisualThing) { - things.Add(i as BaseVisualThing); + things.Add((BaseVisualThing)i); } } } @@ -2524,23 +2526,22 @@ namespace CodeImp.DoomBuilder.BuilderModes List<BaseVisualThing> things = new List<BaseVisualThing>(); bool withinSelection = General.Interface.CtrlState; - //get selection + // Get selection if(selectedobjects.Count == 0) { - IVisualEventReceiver i = (target.picked as IVisualEventReceiver); - if(i is VisualFloor) + if(target.picked is VisualFloor) { - VisualFloor vf = i as VisualFloor; + VisualFloor vf = (VisualFloor)target.picked; floors.Add(vf.Level.sector, vf); } - else if(i is VisualCeiling) + else if(target.picked is VisualCeiling) { - VisualCeiling vc = i as VisualCeiling; + VisualCeiling vc = (VisualCeiling)target.picked; ceilings.Add(vc.Level.sector, vc); } - else if(i is BaseVisualThing) + else if(target.picked is BaseVisualThing) { - things.Add(i as BaseVisualThing); + things.Add((BaseVisualThing)target.picked); } } else @@ -2549,17 +2550,17 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(i is VisualFloor) { - VisualFloor vf = i as VisualFloor; + VisualFloor vf = (VisualFloor)i; floors.Add(vf.Level.sector, vf); } else if(i is VisualCeiling) { - VisualCeiling vc = i as VisualCeiling; + VisualCeiling vc = (VisualCeiling)i; ceilings.Add(vc.Level.sector, vc); } else if(i is BaseVisualThing) { - things.Add(i as BaseVisualThing); + things.Add((BaseVisualThing)i); } } } @@ -2730,7 +2731,7 @@ namespace CodeImp.DoomBuilder.BuilderModes return; } - IVisualEventReceiver highlighted = (target.picked as IVisualEventReceiver); + IVisualEventReceiver highlighted = (IVisualEventReceiver)target.picked; if(highlighted is BaseVisualThing) { @@ -2742,7 +2743,7 @@ namespace CodeImp.DoomBuilder.BuilderModes int targetbrightness; if(highlighted is VisualFloor) { - VisualFloor v = highlighted as VisualFloor; + VisualFloor v = (VisualFloor)highlighted; targetbrightness = v.Level.sector.Fields.GetValue("lightfloor", 0); if(!v.Level.sector.Fields.GetValue("lightfloorabsolute", false)) { @@ -2751,7 +2752,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } else if(highlighted is VisualCeiling) { - VisualCeiling v = highlighted as VisualCeiling; + VisualCeiling v = (VisualCeiling)highlighted; targetbrightness = v.Level.sector.Fields.GetValue("lightceiling", 0); if(!v.Level.sector.Fields.GetValue("lightceilingabsolute", false)) { @@ -2760,7 +2761,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } else if(highlighted is VisualUpper || highlighted is VisualMiddleSingle || highlighted is VisualMiddleDouble || highlighted is VisualLower) { - BaseVisualGeometrySidedef v = highlighted as BaseVisualGeometrySidedef; + BaseVisualGeometrySidedef v = (BaseVisualGeometrySidedef)highlighted; targetbrightness = v.Sidedef.Fields.GetValue("light", 0); if(!v.Sidedef.Fields.GetValue("lightabsolute", false)) { @@ -2769,7 +2770,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } else if(highlighted is VisualMiddle3D) { - VisualMiddle3D v = highlighted as VisualMiddle3D; + VisualMiddle3D v = (VisualMiddle3D)highlighted; Sidedef sd = v.GetControlLinedef().Front; if(sd == null) { @@ -2800,7 +2801,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(obj is VisualFloor) { - VisualFloor v = obj as VisualFloor; + VisualFloor v = (VisualFloor)obj; v.Level.sector.Fields.BeforeFieldsChange(); v.Sector.Changed = true; @@ -2817,7 +2818,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } else if(obj is VisualCeiling) { - VisualCeiling v = obj as VisualCeiling; + VisualCeiling v = (VisualCeiling)obj; v.Level.sector.Fields.BeforeFieldsChange(); v.Sector.Changed = true; v.Sector.Sector.UpdateNeeded = true; @@ -2835,7 +2836,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } else if(obj is VisualUpper || obj is VisualMiddleSingle || obj is VisualMiddleDouble || obj is VisualLower) { - BaseVisualGeometrySidedef v = obj as BaseVisualGeometrySidedef; + BaseVisualGeometrySidedef v = (BaseVisualGeometrySidedef)obj; v.Sidedef.Fields.BeforeFieldsChange(); v.Sector.Changed = true; @@ -2883,143 +2884,42 @@ namespace CodeImp.DoomBuilder.BuilderModes PostAction(); } - [BeginAction("movetextureleft")] - public void MoveTextureLeft1() - { - PreAction(UndoGroup.TextureOffsetChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false); - if(!General.Map.UDMF) objs = RemoveDuplicateSidedefs(objs); //mxd - foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(-1, 0, true); - PostAction(); - } - - [BeginAction("movetextureright")] - public void MoveTextureRight1() - { - PreAction(UndoGroup.TextureOffsetChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false); - if(!General.Map.UDMF) objs = RemoveDuplicateSidedefs(objs); //mxd - foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(1, 0, true); - PostAction(); - } - - [BeginAction("movetextureup")] - public void MoveTextureUp1() - { - PreAction(UndoGroup.TextureOffsetChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false); - if(!General.Map.UDMF) objs = RemoveDuplicateSidedefs(objs); //mxd - foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(0, -1, true); - PostAction(); - } - - [BeginAction("movetexturedown")] - public void MoveTextureDown1() - { - PreAction(UndoGroup.TextureOffsetChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false); - if(!General.Map.UDMF) objs = RemoveDuplicateSidedefs(objs); //mxd - foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(0, 1, true); - PostAction(); - } - - [BeginAction("movetextureleft8")] - public void MoveTextureLeft8() - { - PreAction(UndoGroup.TextureOffsetChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false); - if(!General.Map.UDMF) objs = RemoveDuplicateSidedefs(objs); //mxd - foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(-General.Map.Grid.GridSize, 0, true); - PostAction(); - } - - [BeginAction("movetextureright8")] - public void MoveTextureRight8() - { - PreAction(UndoGroup.TextureOffsetChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false); - if(!General.Map.UDMF) objs = RemoveDuplicateSidedefs(objs); //mxd - foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(General.Map.Grid.GridSize, 0, true); - PostAction(); - } - - [BeginAction("movetextureup8")] - public void MoveTextureUp8() - { - PreAction(UndoGroup.TextureOffsetChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false); - if(!General.Map.UDMF) objs = RemoveDuplicateSidedefs(objs); //mxd - foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(0, -General.Map.Grid.GridSize, true); - PostAction(); - } - - [BeginAction("movetexturedown8")] - public void MoveTextureDown8() - { - PreAction(UndoGroup.TextureOffsetChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false); - if(!General.Map.UDMF) objs = RemoveDuplicateSidedefs(objs); //mxd - foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(0, General.Map.Grid.GridSize, true); - PostAction(); - } - - //mxd - [BeginAction("scaleup")] - public void ScaleTextureUp() - { - PreAction(UndoGroup.TextureScaleChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true, false); - foreach(IVisualEventReceiver i in objs) i.OnChangeScale(1, 1); - PostAction(); - } - - //mxd - [BeginAction("scaledown")] - public void ScaleTextureDown() - { - PreAction(UndoGroup.TextureScaleChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true, false); - foreach(IVisualEventReceiver i in objs) i.OnChangeScale(-1, -1); - PostAction(); - } - - //mxd - [BeginAction("scaleupx")] - public void ScaleTextureUpX() - { - PreAction(UndoGroup.TextureScaleChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true, false); - foreach(IVisualEventReceiver i in objs) i.OnChangeScale(1, 0); - PostAction(); - } + [BeginAction("movetextureleft")] public void MoveTextureLeft1() { MoveTextureByOffset(-1, 0); } + [BeginAction("movetextureright")] public void MoveTextureRight1() { MoveTextureByOffset(1, 0); } + [BeginAction("movetextureup")] public void MoveTextureUp1() { MoveTextureByOffset(0, -1); } + [BeginAction("movetexturedown")] public void MoveTextureDown1() { MoveTextureByOffset(0, 1); } + [BeginAction("movetextureleft8")] public void MoveTextureLeft8() { MoveTextureByOffset(-8, 0); } + [BeginAction("movetextureright8")] public void MoveTextureRight8() { MoveTextureByOffset(8, 0); } + [BeginAction("movetextureup8")] public void MoveTextureUp8() { MoveTextureByOffset(0, -8); } + [BeginAction("movetexturedown8")] public void MoveTextureDown8() { MoveTextureByOffset(0, 8); } + [BeginAction("movetextureleftgs")] public void MoveTextureLeftGrid() { MoveTextureByOffset(-General.Map.Grid.GridSize, 0); } //mxd + [BeginAction("movetexturerightgs")] public void MoveTextureRightGrid() { MoveTextureByOffset(General.Map.Grid.GridSize, 0); } //mxd + [BeginAction("movetextureupgs")] public void MoveTextureUpGrid() { MoveTextureByOffset(0, -General.Map.Grid.GridSize); } //mxd + [BeginAction("movetexturedowngs")] public void MoveTextureDownGrid() { MoveTextureByOffset(0, General.Map.Grid.GridSize); } //mxd //mxd - [BeginAction("scaledownx")] - public void ScaleTextureDownX() + private void MoveTextureByOffset(int ox, int oy) { - PreAction(UndoGroup.TextureScaleChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true, false); - foreach(IVisualEventReceiver i in objs) i.OnChangeScale(-1, 0); + PreAction(UndoGroup.TextureOffsetChange); + IEnumerable<IVisualEventReceiver> objs = RemoveDuplicateSidedefs(GetSelectedObjects(true, true, false, false)); + foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(ox, oy, true); PostAction(); } //mxd - [BeginAction("scaleupy")] - public void ScaleTextureUpY() - { - PreAction(UndoGroup.TextureScaleChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true, false); - foreach(IVisualEventReceiver i in objs) i.OnChangeScale(0, 1); - PostAction(); - } + [BeginAction("scaleup")] public void ScaleTextureUp() { ScaleTexture(1, 1); } + [BeginAction("scaledown")] public void ScaleTextureDown() { ScaleTexture(-1, -1); } + [BeginAction("scaleupx")] public void ScaleTextureUpX() { ScaleTexture(1, 0); } + [BeginAction("scaledownx")] public void ScaleTextureDownX() { ScaleTexture(-1, 0); } + [BeginAction("scaleupy")] public void ScaleTextureUpY() { ScaleTexture(0, 1); } + [BeginAction("scaledowny")] public void ScaleTextureDownY() { ScaleTexture(0, -1); } //mxd - [BeginAction("scaledowny")] - public void ScaleTextureDownY() + private void ScaleTexture(int incrementx, int incrementy) { PreAction(UndoGroup.TextureScaleChange); List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true, false); - foreach(IVisualEventReceiver i in objs) i.OnChangeScale(0, -1); + foreach(IVisualEventReceiver i in objs) i.OnChangeScale(incrementx, incrementy); PostAction(); } @@ -3030,7 +2930,6 @@ namespace CodeImp.DoomBuilder.BuilderModes renderer.SetCrosshairBusy(true); General.Interface.RedrawDisplay(); GetTargetEventReceiver(false).OnSelectTexture(); - RebuildElementData(); //mxd. Extrafloors or Glow effects may've been changed renderer.SetCrosshairBusy(false); PostAction(); } @@ -3039,7 +2938,9 @@ namespace CodeImp.DoomBuilder.BuilderModes public void TextureCopy() { PreActionNoChange(); - GetTargetEventReceiver(true).OnCopyTexture(); //mxd + IVisualEventReceiver i = GetTargetEventReceiver(true); + i.OnCopyTexture(); //mxd + if(!(i is VisualThing)) copybuffer.Clear(); //mxd. Not copying things any more... PostAction(); } @@ -3154,7 +3055,7 @@ namespace CodeImp.DoomBuilder.BuilderModes //align foreach(IVisualEventReceiver i in objs) { - BaseVisualGeometrySidedef side = i as BaseVisualGeometrySidedef; + BaseVisualGeometrySidedef side = (BaseVisualGeometrySidedef)i; // Make sure the texture is loaded (we need the texture size) if(!side.Texture.IsImageLoaded) side.Texture.LoadImage(); @@ -3170,7 +3071,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Update the parts for this sidedef! if(VisualSectorExists(sd.Sector)) { - BaseVisualSector vs = (GetVisualSector(sd.Sector) as BaseVisualSector); + BaseVisualSector vs = (BaseVisualSector)GetVisualSector(sd.Sector); VisualSidedefParts parts = vs.GetSidedefParts(sd); parts.SetupAllParts(); } @@ -3187,9 +3088,10 @@ namespace CodeImp.DoomBuilder.BuilderModes // Get selection List<IVisualEventReceiver> objs = GetSelectedObjects(false, true, false, false); List<BaseVisualGeometrySidedef> sides = new List<BaseVisualGeometrySidedef>(); - foreach(IVisualEventReceiver side in objs) + foreach(IVisualEventReceiver i in objs) { - if(side is BaseVisualGeometrySidedef) sides.Add(side as BaseVisualGeometrySidedef); + BaseVisualGeometrySidedef side = (BaseVisualGeometrySidedef)i; + if(side != null) sides.Add(side); } if(sides.Count == 0) @@ -3248,14 +3150,6 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.DisplayStatus(StatusType.Action, "Gravity is now " + onoff + "."); } - [BeginAction("togglehighlight")] - public void ToggleHighlight() - { - BuilderPlug.Me.UseHighlight = !BuilderPlug.Me.UseHighlight; - string onoff = BuilderPlug.Me.UseHighlight ? "ON" : "OFF"; - General.Interface.DisplayStatus(StatusType.Action, "Highlight is now " + onoff + "."); - } - [BeginAction("resettexture")] public void ResetTexture() { @@ -3335,7 +3229,7 @@ namespace CodeImp.DoomBuilder.BuilderModes added = new HashSet<int>(); foreach(IVisualEventReceiver receiver in obj) { - VisualGeometry vg = receiver as VisualGeometry; + VisualGeometry vg = (VisualGeometry)receiver; if(vg != null && !added.Contains(vg.Sector.GetHashCode())) { selection.Add(receiver); @@ -3354,7 +3248,7 @@ namespace CodeImp.DoomBuilder.BuilderModes added = new HashSet<int>(); foreach(IVisualEventReceiver receiver in obj) { - VisualGeometry vg = receiver as VisualGeometry; + VisualGeometry vg = (VisualGeometry)receiver; if(vg != null && !added.Contains(vg.Sidedef.Line.GetHashCode())) { selection.Add(receiver); @@ -3373,7 +3267,7 @@ namespace CodeImp.DoomBuilder.BuilderModes added = new HashSet<int>(); foreach(IVisualEventReceiver receiver in obj) { - VisualThing vt = receiver as VisualThing; + VisualThing vt = (VisualThing)receiver; if(vt != null && !added.Contains(vt.Thing.GetHashCode())) { selection.Add(receiver); @@ -3392,7 +3286,7 @@ namespace CodeImp.DoomBuilder.BuilderModes added = new HashSet<int>(); foreach(IVisualEventReceiver receiver in obj) { - VisualVertex vv = receiver as VisualVertex; + VisualVertex vv = (VisualVertex)receiver; if(vv != null && !added.Contains(vv.Vertex.GetHashCode())) { selection.Add(receiver); @@ -3476,10 +3370,12 @@ namespace CodeImp.DoomBuilder.BuilderModes copybuffer.Clear(); foreach(IVisualEventReceiver i in objs) { - VisualThing vt = i as VisualThing; + VisualThing vt = (VisualThing)i; if(vt != null) copybuffer.Add(new ThingCopyData(vt.Thing)); } - General.Interface.DisplayStatus(StatusType.Info, "Copied " + copybuffer.Count + " Things"); + + string rest = copybuffer.Count + (copybuffer.Count > 1 ? " things." : " thing."); + General.Interface.DisplayStatus(StatusType.Info, "Copied " + rest); } //mxd @@ -3489,14 +3385,14 @@ namespace CodeImp.DoomBuilder.BuilderModes CopySelection(); //Create undo - string rest = copybuffer.Count + " thing" + (copybuffer.Count > 1 ? "s." : "."); + string rest = copybuffer.Count + (copybuffer.Count > 1 ? " things." : " thing."); CreateUndo("Cut " + rest); General.Interface.DisplayStatus(StatusType.Info, "Cut " + rest); List<IVisualEventReceiver> objs = GetSelectedObjects(false, false, true, false); foreach(IVisualEventReceiver i in objs) { - BaseVisualThing thing = i as BaseVisualThing; + BaseVisualThing thing = (BaseVisualThing)i; thing.Thing.Fields.BeforeFieldsChange(); thing.Thing.Dispose(); thing.Dispose(); @@ -3515,7 +3411,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(copybuffer.Count == 0) { - General.Interface.DisplayStatus(StatusType.Warning, "Nothing to paste, cut or copy some Things first!"); + TexturePaste(); // I guess we may paste a texture or two instead return; } @@ -3527,7 +3423,7 @@ namespace CodeImp.DoomBuilder.BuilderModes return; } - string rest = copybuffer.Count + " thing" + (copybuffer.Count > 1 ? "s" : ""); + string rest = copybuffer.Count + (copybuffer.Count > 1 ? " things." : " thing."); General.Map.UndoRedo.CreateUndo("Paste " + rest); General.Interface.DisplayStatus(StatusType.Info, "Pasted " + rest); @@ -3564,18 +3460,18 @@ namespace CodeImp.DoomBuilder.BuilderModes [BeginAction("rotateclockwise")] public void RotateCW() { - RotateThingsAndTextures(5); + RotateThingsAndTextures(General.Map.Config.DoomThingRotationAngles ? 45 : 5, 5); } //mxd. Rotate counterclockwise [BeginAction("rotatecounterclockwise")] public void RotateCCW() { - RotateThingsAndTextures(-5); + RotateThingsAndTextures(General.Map.Config.DoomThingRotationAngles ? -45 : -5, - 5); } //mxd - private void RotateThingsAndTextures(int increment) + private void RotateThingsAndTextures(int thingangleincrement, int textureangleincrement) { PreAction(UndoGroup.ThingAngleChange); @@ -3586,18 +3482,37 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(obj is BaseVisualThing) { - BaseVisualThing t = obj as BaseVisualThing; - t.SetAngle(General.ClampAngle(t.Thing.AngleDoom + increment)); + BaseVisualThing t = (BaseVisualThing)obj; + int loops = (General.Map.SRB2) ? t.Thing.AngleDoom - (t.Thing.AngleDoom % 360) : 0; + + int newangle = t.Thing.AngleDoom + thingangleincrement; + if(General.Map.Config.DoomThingRotationAngles) newangle = newangle / 45 * 45; + t.SetAngle(General.ClampAngle(newangle) + loops); + + // Visual sectors may be affected by this thing... + if(thingdata.ContainsKey(t.Thing)) + { + // Update what must be updated + ThingData td = GetThingData(t.Thing); + foreach(KeyValuePair<Sector, bool> s in td.UpdateAlso) + { + if(VisualSectorExists(s.Key)) + { + BaseVisualSector vs = (BaseVisualSector)GetVisualSector(s.Key); + vs.UpdateSectorGeometry(s.Value); + } + } + } } else if(obj is VisualFloor) { - VisualFloor vf = obj as VisualFloor; - vf.OnChangeTextureRotation(General.ClampAngle(vf.GetControlSector().Fields.GetValue("rotationfloor", 0.0f) + increment)); + VisualFloor vf = (VisualFloor)obj; + vf.OnChangeTextureRotation(General.ClampAngle(vf.GetControlSector().Fields.GetValue("rotationfloor", 0.0f) + textureangleincrement)); } else if(obj is VisualCeiling) { - VisualCeiling vc = obj as VisualCeiling; - vc.OnChangeTextureRotation(General.ClampAngle(vc.GetControlSector().Fields.GetValue("rotationceiling", 0.0f) + increment)); + VisualCeiling vc = (VisualCeiling)obj; + vc.OnChangeTextureRotation(General.ClampAngle(vc.GetControlSector().Fields.GetValue("rotationceiling", 0.0f) + textureangleincrement)); } } @@ -3628,9 +3543,8 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(IVisualEventReceiver obj in selection) { - if(!(obj is BaseVisualThing)) continue; - BaseVisualThing t = obj as BaseVisualThing; - t.SetPitch(General.ClampAngle(t.Thing.Pitch + increment)); + BaseVisualThing t = (BaseVisualThing)obj; + if(t != null) t.SetPitch(General.ClampAngle(t.Thing.Pitch + increment)); } PostAction(); @@ -3660,23 +3574,21 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(IVisualEventReceiver obj in selection) { - if(!(obj is BaseVisualThing)) continue; - BaseVisualThing t = obj as BaseVisualThing; - t.SetRoll(General.ClampAngle(t.Thing.Roll + increment)); + BaseVisualThing t = (BaseVisualThing)obj; + if(t != null) t.SetRoll(General.ClampAngle(t.Thing.Roll + increment)); } PostAction(); } //mxd - [BeginAction("togglegzdoomgeometryeffects")] - public void ToggleGZDoomRenderingEffects() + [BeginAction("gztoggleenhancedrendering", BaseAction = true)] + public void ToggleEnhancedRendering() { - General.Settings.GZDoomRenderingEffects = !General.Settings.GZDoomRenderingEffects; - RebuildElementData(); + // Actual toggling is done in MainForm.ToggleEnhancedRendering(), so we only need to update the view here + RebuildElementData(); UpdateChangedObjects(); - General.Interface.DisplayStatus(StatusType.Info, "(G)ZDoom geometry effects are " + (General.Settings.GZDoomRenderingEffects ? "ENABLED" : "DISABLED")); - } + } //mxd [BeginAction("togglesrb2geometryeffects")] @@ -3738,11 +3650,9 @@ namespace CodeImp.DoomBuilder.BuilderModes } //align things - int thingsCount = General.Map.Map.Things.Count; - foreach(Thing t in things) { - List<Linedef> excludedLines = new List<Linedef>(); + HashSet<Linedef> excludedLines = new HashSet<Linedef>(); bool aligned; do @@ -3754,7 +3664,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { excludedLines.Add(l); - if(excludedLines.Count == thingsCount) + if(excludedLines.Count == General.Map.Map.Linedefs.Count) { ThingTypeInfo tti = General.Map.Data.GetThingInfo(t.SRB2Type); General.ErrorLogger.Add(ErrorType.Warning, "Unable to align Thing �" + t.Index + " (" + tti.Title + ") to any linedef in a map!"); @@ -3767,7 +3677,7 @@ namespace CodeImp.DoomBuilder.BuilderModes //apply changes to Visual Things for(int i = 0; i < visualThings.Count; i++) { - BaseVisualThing t = visualThings[i] as BaseVisualThing; + BaseVisualThing t = (BaseVisualThing)visualThings[i]; t.Changed = true; // Update what must be updated @@ -4106,7 +4016,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } //add to update list - if(update) toUpdate.Add(vg.Sector as BaseVisualSector); + if(update) toUpdate.Add((BaseVisualSector)vg.Sector); } //update changed geometry @@ -4450,6 +4360,15 @@ namespace CodeImp.DoomBuilder.BuilderModes UpdateChangedObjects(); } + + //mxd + [BeginAction("alphabasedtexturehighlighting")] + public void ToggleAlphaBasedTextureHighlighting() + { + BuilderPlug.Me.AlphaBasedTextureHighlighting = !BuilderPlug.Me.AlphaBasedTextureHighlighting; + General.Interface.DisplayStatus(StatusType.Info, "Alpha-based textures highlighting is " + (BuilderPlug.Me.AlphaBasedTextureHighlighting ? "ENABLED" : "DISABLED")); + } + #endregion #region ================== Texture Alignment @@ -4500,6 +4419,9 @@ namespace CodeImp.DoomBuilder.BuilderModes first.controlSide = start.Sidedef; } + //mxd + HashSet<long> texturehashes = new HashSet<long> { texture.LongName }; + first.forward = true; todo.Push(first); @@ -4530,7 +4452,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Wrap the value within the width of the texture (to prevent ridiculous values) // NOTE: We don't use ScaledWidth here because the texture offset is in pixels, not mappixels - if(texture.IsImageLoaded && Tools.SidedefTextureMatch(j.sidedef, texture.LongName)) + if(texture.IsImageLoaded && BuilderModesTools.SidedefTextureMatch(this, j.sidedef, texturehashes)) { if (alignx) { @@ -4547,11 +4469,11 @@ namespace CodeImp.DoomBuilder.BuilderModes // Add sidedefs forward (connected to the right vertex) Vertex v = j.sidedef.IsFront ? j.sidedef.Line.End : j.sidedef.Line.Start; - AddSidedefsForAlignment(todo, v, true, forwardoffset, 1.0f, texture.LongName, false); + AddSidedefsForAlignment(todo, v, true, forwardoffset, 1.0f, texturehashes, false); // Add sidedefs backward (connected to the left vertex) v = j.sidedef.IsFront ? j.sidedef.Line.Start : j.sidedef.Line.End; - AddSidedefsForAlignment(todo, v, false, backwardoffset, 1.0f, texture.LongName, false); + AddSidedefsForAlignment(todo, v, false, backwardoffset, 1.0f, texturehashes, false); } else { @@ -4575,7 +4497,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Wrap the value within the width of the texture (to prevent ridiculous values) // NOTE: We don't use ScaledWidth here because the texture offset is in pixels, not mappixels - if(texture.IsImageLoaded && Tools.SidedefTextureMatch(j.sidedef, texture.LongName)) + if(texture.IsImageLoaded && BuilderModesTools.SidedefTextureMatch(this, j.sidedef, texturehashes)) { if(alignx) j.sidedef.OffsetX %= texture.Width; if (aligny) @@ -4587,11 +4509,11 @@ namespace CodeImp.DoomBuilder.BuilderModes // Add sidedefs backward (connected to the left vertex) Vertex v = j.sidedef.IsFront ? j.sidedef.Line.Start : j.sidedef.Line.End; - AddSidedefsForAlignment(todo, v, false, backwardoffset, 1.0f, texture.LongName, false); + AddSidedefsForAlignment(todo, v, false, backwardoffset, 1.0f, texturehashes, false); // Add sidedefs forward (connected to the right vertex) v = j.sidedef.IsFront ? j.sidedef.Line.End : j.sidedef.Line.Start; - AddSidedefsForAlignment(todo, v, true, forwardoffset, 1.0f, texture.LongName, false); + AddSidedefsForAlignment(todo, v, true, forwardoffset, 1.0f, texturehashes, false); } } } @@ -4602,7 +4524,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // When resetsidemarks is set to true, all sidedefs will first be marked false (not aligned). // Setting resetsidemarks to false is usefull to align only within a specific selection // (set the marked property to true for the sidedefs outside the selection) - private void AutoAlignTexturesUDMF(BaseVisualGeometrySidedef start, ImageData texture, bool alignx, bool aligny, bool resetsidemarks, bool checkSelectedSidedefParts) + private void AutoAlignTexturesUDMF(BaseVisualGeometrySidedef start, ImageData texture, bool alignx, bool aligny, bool resetsidemarks, bool checkselectedsidedefparts) { // Mark all sidedefs false (they will be marked true when the texture is aligned) if(resetsidemarks) General.Map.Map.ClearMarkedSidedefs(false); @@ -4612,26 +4534,35 @@ namespace CodeImp.DoomBuilder.BuilderModes float scalex = (General.Map.Config.ScaledTextureOffsets && !texture.WorldPanning) ? texture.Scale.x : 1.0f; float scaley = (General.Map.Config.ScaledTextureOffsets && !texture.WorldPanning) ? texture.Scale.y : 1.0f; - SidedefAlignJob first = new SidedefAlignJob(); - first.sidedef = start.Sidedef; - first.offsetx = start.Sidedef.OffsetX; + SidedefAlignJob first = new SidedefAlignJob { sidedef = start.Sidedef, offsetx = start.Sidedef.OffsetX }; + first.controlSide = (start.GeometryType == VisualGeometryType.WALL_MIDDLE_3D ? start.GetControlLinedef().Front : start.Sidedef); - if(start.GeometryType == VisualGeometryType.WALL_MIDDLE_3D) - first.controlSide = start.GetControlLinedef().Front; - else - first.controlSide = start.Sidedef; + //mxd. We potentially need to deal with 2 textures (because of long and short texture names)... + HashSet<long> texturehashes = new HashSet<long> { texture.LongName }; + switch(start.GeometryType) + { + case VisualGeometryType.WALL_LOWER: + texturehashes.Add(first.controlSide.LongLowTexture); + break; + + case VisualGeometryType.WALL_MIDDLE: + case VisualGeometryType.WALL_MIDDLE_3D: + texturehashes.Add(first.controlSide.LongMiddleTexture); + break; + + case VisualGeometryType.WALL_UPPER: + texturehashes.Add(first.controlSide.LongHighTexture); + break; + } //mxd List<BaseVisualGeometrySidedef> selectedVisualSides = new List<BaseVisualGeometrySidedef>(); - if(checkSelectedSidedefParts && !singleselection) + if(checkselectedsidedefparts && !singleselection) { - foreach(IVisualEventReceiver i in selectedobjects) + foreach(IVisualEventReceiver i in selectedobjects) { - if(i is BaseVisualGeometrySidedef) - { - BaseVisualGeometrySidedef sd = i as BaseVisualGeometrySidedef; - if(!selectedVisualSides.Contains(sd)) selectedVisualSides.Add(sd); - } + BaseVisualGeometrySidedef side = i as BaseVisualGeometrySidedef; + if(side != null && !selectedVisualSides.Contains(side)) selectedVisualSides.Add(side); } } @@ -4698,23 +4629,34 @@ namespace CodeImp.DoomBuilder.BuilderModes while(todo.Count > 0) { Vertex v; - float forwardoffset; - float backwardoffset; + float forwardoffset, backwardoffset; + bool matchtop = false; + bool matchmid = false; + bool matchbottom = false; // Get the align job to do SidedefAlignJob j = todo.Pop(); - bool matchtop = (!j.sidedef.Marked && (!singleselection || j.sidedef.LongHighTexture == texture.LongName) && j.sidedef.HighRequired()); - bool matchbottom = (!j.sidedef.Marked && (!singleselection || j.sidedef.LongLowTexture == texture.LongName) && j.sidedef.LowRequired()); - bool matchmid = ((!singleselection || j.controlSide.LongMiddleTexture == texture.LongName) && (j.controlSide.MiddleRequired() || j.controlSide.LongMiddleTexture != MapSet.EmptyLongName)); //mxd - - //mxd. If there's a selection, check if matched part is actually selected - if(checkSelectedSidedefParts && !singleselection) + //mxd. Get visual parts + if(VisualSectorExists(j.sidedef.Sector)) { - if(matchtop) matchtop = SidePartIsSelected(selectedVisualSides, j.sidedef, VisualGeometryType.WALL_UPPER); - if(matchbottom) matchbottom = SidePartIsSelected(selectedVisualSides, j.sidedef, VisualGeometryType.WALL_LOWER); - if(matchmid) matchmid = SidePartIsSelected(selectedVisualSides, j.sidedef, VisualGeometryType.WALL_MIDDLE) || - SidePartIsSelected(selectedVisualSides, j.sidedef, VisualGeometryType.WALL_MIDDLE_3D); + VisualSidedefParts parts = ((BaseVisualSector)GetVisualSector(j.sidedef.Sector)).GetSidedefParts(j.sidedef); + VisualSidedefParts controlparts = (j.sidedef != j.controlSide ? ((BaseVisualSector)GetVisualSector(j.controlSide.Sector)).GetSidedefParts(j.controlSide) : parts); + + matchtop = (!j.sidedef.Marked && (!singleselection || texturehashes.Contains(j.sidedef.LongHighTexture)) && (parts.upper != null && parts.upper.Triangles > 0)); + matchbottom = (!j.sidedef.Marked && (!singleselection || texturehashes.Contains(j.sidedef.LongLowTexture)) && (parts.lower != null && parts.lower.Triangles > 0)); + matchmid = ((!singleselection || texturehashes.Contains(j.controlSide.LongMiddleTexture)) + && ((controlparts.middledouble != null && controlparts.middledouble.Triangles > 0) || (controlparts.middlesingle != null && controlparts.middlesingle.Triangles > 0))); //mxd + + //mxd. If there's a selection, check if matched part is actually selected + if(checkselectedsidedefparts && !singleselection) + { + if(matchtop) matchtop = parts.upper.Selected; + if(matchbottom) matchbottom = parts.lower.Selected; + if(matchmid) matchmid = ((parts.middledouble != null && parts.middledouble.Selected) + || (parts.middlesingle != null && parts.middlesingle.Selected) + || SidePartIsSelected(selectedVisualSides, j.sidedef, VisualGeometryType.WALL_MIDDLE_3D)); + } } if(!matchbottom && !matchtop && !matchmid) continue; //mxd @@ -4756,9 +4698,17 @@ namespace CodeImp.DoomBuilder.BuilderModes offset -= j.sidedef.OffsetX; if(matchtop) - j.sidedef.Fields["offsetx_top"] = new UniValue(UniversalType.Float, (float)Math.Round(offset % General.Map.Data.GetTextureImage(j.sidedef.LongHighTexture).Width, General.Map.FormatInterface.VertexDecimals)); + { + ImageData tex = General.Map.Data.GetTextureImage(j.sidedef.LongHighTexture); + int texwidth = (tex != null && tex.IsImageLoaded) ? tex.Width : 1; + j.sidedef.Fields["offsetx_top"] = new UniValue(UniversalType.Float, (float)Math.Round(offset % texwidth, General.Map.FormatInterface.VertexDecimals)); + } if(matchbottom) - j.sidedef.Fields["offsetx_bottom"] = new UniValue(UniversalType.Float, (float)Math.Round(offset % General.Map.Data.GetTextureImage(j.sidedef.LongLowTexture).Width, General.Map.FormatInterface.VertexDecimals)); + { + ImageData tex = General.Map.Data.GetTextureImage(j.sidedef.LongLowTexture); + int texwidth = (tex != null && tex.IsImageLoaded) ? tex.Width : 1; + j.sidedef.Fields["offsetx_bottom"] = new UniValue(UniversalType.Float, (float)Math.Round(offset % texwidth, General.Map.FormatInterface.VertexDecimals)); + } if(matchmid) { if(j.sidedef.Index != j.controlSide.Index) //mxd. if it's a part of 3d-floor @@ -4767,7 +4717,9 @@ namespace CodeImp.DoomBuilder.BuilderModes offset -= j.controlSide.Fields.GetValue("offsetx_mid", 0.0f); } - j.sidedef.Fields["offsetx_mid"] = new UniValue(UniversalType.Float, (float)Math.Round(offset % General.Map.Data.GetTextureImage(j.controlSide.LongMiddleTexture).Width, General.Map.FormatInterface.VertexDecimals)); + ImageData tex = General.Map.Data.GetTextureImage(j.controlSide.LongMiddleTexture); + int texwidth = (tex != null && tex.IsImageLoaded) ? tex.Width : 1; + j.sidedef.Fields["offsetx_mid"] = new UniValue(UniversalType.Float, (float)Math.Round(offset % texwidth, General.Map.FormatInterface.VertexDecimals)); } } @@ -4777,9 +4729,19 @@ namespace CodeImp.DoomBuilder.BuilderModes offset -= j.sidedef.OffsetY; //mxd if(matchtop) - j.sidedef.Fields["offsety_top"] = new UniValue(UniversalType.Float, (float)Math.Round(Tools.GetSidedefTopOffsetY(j.sidedef, offset, j.scaleY / scaley, true) % General.Map.Data.GetTextureImage(j.sidedef.LongHighTexture).Height, General.Map.FormatInterface.VertexDecimals)); //mxd + { + ImageData tex = General.Map.Data.GetTextureImage(j.sidedef.LongHighTexture); + int texheight = (tex != null && tex.IsImageLoaded) ? tex.Height : 1; + j.sidedef.Fields["offsety_top"] = new UniValue(UniversalType.Float, + (float)Math.Round(Tools.GetSidedefTopOffsetY(j.sidedef, offset, j.scaleY / scaley, true) % texheight, General.Map.FormatInterface.VertexDecimals)); //mxd + } if(matchbottom) - j.sidedef.Fields["offsety_bottom"] = new UniValue(UniversalType.Float, (float)Math.Round(Tools.GetSidedefBottomOffsetY(j.sidedef, offset, j.scaleY / scaley, true) % General.Map.Data.GetTextureImage(j.sidedef.LongLowTexture).Height, General.Map.FormatInterface.VertexDecimals)); //mxd + { + ImageData tex = General.Map.Data.GetTextureImage(j.sidedef.LongLowTexture); + int texheight = (tex != null && tex.IsImageLoaded) ? tex.Height : 1; + j.sidedef.Fields["offsety_bottom"] = new UniValue(UniversalType.Float, + (float)Math.Round(Tools.GetSidedefBottomOffsetY(j.sidedef, offset, j.scaleY / scaley, true) % texheight, General.Map.FormatInterface.VertexDecimals)); //mxd + } if(matchmid) { //mxd. Side is part of a 3D floor? @@ -4787,43 +4749,51 @@ namespace CodeImp.DoomBuilder.BuilderModes { offset -= j.controlSide.OffsetY; offset -= j.controlSide.Fields.GetValue("offsety_mid", 0.0f); - j.sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, (float)Math.Round(offset % General.Map.Data.GetTextureImage(j.controlSide.LongMiddleTexture).Height, General.Map.FormatInterface.VertexDecimals)); + + ImageData tex = General.Map.Data.GetTextureImage(j.controlSide.LongMiddleTexture); + int texheight = (tex != null && tex.IsImageLoaded) ? tex.Height : 1; + j.sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, + (float)Math.Round(offset % texheight, General.Map.FormatInterface.VertexDecimals)); } else { - ImageData midtex = General.Map.Data.GetTextureImage(j.sidedef.LongMiddleTexture); + ImageData tex = General.Map.Data.GetTextureImage(j.sidedef.LongMiddleTexture); offset = Tools.GetSidedefMiddleOffsetY(j.sidedef, offset, j.scaleY / scaley, true); - bool startisnonwrappedmidtex = (start.Sidedef.Other != null && start.GeometryType == VisualGeometryType.WALL_MIDDLE && !start.Sidedef.IsFlagSet("wrapmidtex") && !start.Sidedef.Line.IsFlagSet("wrapmidtex")); - bool cursideisnonwrappedmidtex = (j.sidedef.Other != null && !j.sidedef.IsFlagSet("wrapmidtex") && !j.sidedef.Line.IsFlagSet("wrapmidtex")); - - //mxd. Only clamp when the texture is wrapped - if(!cursideisnonwrappedmidtex) offset %= midtex.Height; - - if(!startisnonwrappedmidtex && cursideisnonwrappedmidtex) + if(tex != null && tex.IsImageLoaded) { - //mxd. This should be doublesided non-wrapped line. Find the nearset aligned position - float curoffset = UniFields.GetFloat(j.sidedef.Fields, "offsety_mid") + j.sidedef.OffsetY; - offset += midtex.Height * (float)Math.Round(curoffset / midtex.Height - 0.5f * Math.Sign(j.scaleY)); + bool startisnonwrappedmidtex = (start.Sidedef.Other != null && start.GeometryType == VisualGeometryType.WALL_MIDDLE && !start.Sidedef.IsFlagSet("wrapmidtex") && !start.Sidedef.Line.IsFlagSet("wrapmidtex")); + bool cursideisnonwrappedmidtex = (j.sidedef.Other != null && !j.sidedef.IsFlagSet("wrapmidtex") && !j.sidedef.Line.IsFlagSet("wrapmidtex")); + + //mxd. Only clamp when the texture is wrapped + if(!cursideisnonwrappedmidtex) offset %= tex.Height; - // Make sure the surface stays between floor and ceiling - if(j.sidedef.Line.IsFlagSet(General.Map.Config.LowerUnpeggedFlag) || Math.Sign(j.scaleY) == -1) + if(!startisnonwrappedmidtex && cursideisnonwrappedmidtex) { - if(offset < -midtex.Height) - offset += midtex.Height; - else if(offset > j.sidedef.GetMiddleHeight()) - offset -= midtex.Height; - } - else - { - if(offset < -(j.sidedef.GetMiddleHeight() + midtex.Height)) - offset += midtex.Height; - else if(offset > midtex.Height) - offset -= midtex.Height; + //mxd. This should be doublesided non-wrapped line. Find the nearset aligned position + float curoffset = UniFields.GetFloat(j.sidedef.Fields, "offsety_mid") + j.sidedef.OffsetY; + offset += tex.Height * (float)Math.Round(curoffset / tex.Height - 0.5f * Math.Sign(j.scaleY)); + + // Make sure the surface stays between floor and ceiling + if(j.sidedef.Line.IsFlagSet(General.Map.Config.LowerUnpeggedFlag) || Math.Sign(j.scaleY) == -1) + { + if(offset < -tex.Height) + offset += tex.Height; + else if(offset > j.sidedef.GetMiddleHeight()) + offset -= tex.Height; + } + else + { + if(offset < -(j.sidedef.GetMiddleHeight() + tex.Height)) + offset += tex.Height; + else if(offset > tex.Height) + offset -= tex.Height; + } } } - j.sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, (float)Math.Round(offset, General.Map.FormatInterface.VertexDecimals)); //mxd + j.sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, + (float)Math.Round(offset, General.Map.FormatInterface.VertexDecimals)); //mxd } } } @@ -4837,11 +4807,11 @@ namespace CodeImp.DoomBuilder.BuilderModes // Add sidedefs backward (connected to the left vertex) v = j.sidedef.IsFront ? j.sidedef.Line.Start : j.sidedef.Line.End; - AddSidedefsForAlignment(todo, v, false, backwardoffset, j.scaleY, texture.LongName, true); + AddSidedefsForAlignment(todo, v, false, backwardoffset, j.scaleY, texturehashes, true); // Add sidedefs forward (connected to the right vertex) v = j.sidedef.IsFront ? j.sidedef.Line.End : j.sidedef.Line.Start; - AddSidedefsForAlignment(todo, v, true, forwardoffset, j.scaleY, texture.LongName, true); + AddSidedefsForAlignment(todo, v, true, forwardoffset, j.scaleY, texturehashes, true); } else { @@ -4852,9 +4822,19 @@ namespace CodeImp.DoomBuilder.BuilderModes offset -= j.sidedef.OffsetX; if(matchtop) - j.sidedef.Fields["offsetx_top"] = new UniValue(UniversalType.Float, (float)Math.Round(offset % General.Map.Data.GetTextureImage(j.sidedef.LongHighTexture).Width, General.Map.FormatInterface.VertexDecimals)); + { + ImageData tex = General.Map.Data.GetTextureImage(j.sidedef.LongHighTexture); + int texwidth = (tex != null && tex.IsImageLoaded) ? tex.Width : 1; + j.sidedef.Fields["offsetx_top"] = new UniValue(UniversalType.Float, + (float)Math.Round(offset % texwidth, General.Map.FormatInterface.VertexDecimals)); + } if(matchbottom) - j.sidedef.Fields["offsetx_bottom"] = new UniValue(UniversalType.Float, (float)Math.Round(offset % General.Map.Data.GetTextureImage(j.sidedef.LongLowTexture).Width, General.Map.FormatInterface.VertexDecimals)); + { + ImageData tex = General.Map.Data.GetTextureImage(j.sidedef.LongLowTexture); + int texwidth = (tex != null && tex.IsImageLoaded) ? tex.Width : 1; + j.sidedef.Fields["offsetx_bottom"] = new UniValue(UniversalType.Float, + (float)Math.Round(offset % texwidth, General.Map.FormatInterface.VertexDecimals)); + } if(matchmid) { if(j.sidedef.Index != j.controlSide.Index) //mxd @@ -4863,7 +4843,10 @@ namespace CodeImp.DoomBuilder.BuilderModes offset -= j.controlSide.Fields.GetValue("offsetx_mid", 0.0f); } - j.sidedef.Fields["offsetx_mid"] = new UniValue(UniversalType.Float, (float)Math.Round(offset % General.Map.Data.GetTextureImage(j.controlSide.LongMiddleTexture).Width, General.Map.FormatInterface.VertexDecimals)); + ImageData tex = General.Map.Data.GetTextureImage(j.controlSide.LongMiddleTexture); + int texwidth = (tex != null && tex.IsImageLoaded) ? tex.Width : 1; + j.sidedef.Fields["offsetx_mid"] = new UniValue(UniversalType.Float, + (float)Math.Round(offset % texwidth, General.Map.FormatInterface.VertexDecimals)); } } @@ -4873,9 +4856,19 @@ namespace CodeImp.DoomBuilder.BuilderModes offset -= j.sidedef.OffsetY; //mxd if(matchtop) - j.sidedef.Fields["offsety_top"] = new UniValue(UniversalType.Float, (float)Math.Round(Tools.GetSidedefTopOffsetY(j.sidedef, offset, j.scaleY / scaley, true) % General.Map.Data.GetTextureImage(j.sidedef.LongHighTexture).Height, General.Map.FormatInterface.VertexDecimals)); //mxd + { + ImageData tex = General.Map.Data.GetTextureImage(j.sidedef.LongHighTexture); + int texheight = (tex != null && tex.IsImageLoaded) ? tex.Height : 1; + j.sidedef.Fields["offsety_top"] = new UniValue(UniversalType.Float, + (float)Math.Round(Tools.GetSidedefTopOffsetY(j.sidedef, offset, j.scaleY / scaley, true) % texheight, General.Map.FormatInterface.VertexDecimals)); //mxd + } if(matchbottom) - j.sidedef.Fields["offsety_bottom"] = new UniValue(UniversalType.Float, (float)Math.Round(Tools.GetSidedefBottomOffsetY(j.sidedef, offset, j.scaleY / scaley, true) % General.Map.Data.GetTextureImage(j.sidedef.LongLowTexture).Height, General.Map.FormatInterface.VertexDecimals)); //mxd + { + ImageData tex = General.Map.Data.GetTextureImage(j.sidedef.LongLowTexture); + int texheight = (tex != null && tex.IsImageLoaded) ? tex.Height : 1; + j.sidedef.Fields["offsety_bottom"] = new UniValue(UniversalType.Float, + (float)Math.Round(Tools.GetSidedefBottomOffsetY(j.sidedef, offset, j.scaleY / scaley, true) % texheight, General.Map.FormatInterface.VertexDecimals)); //mxd + } if(matchmid) { //mxd. Side is part of a 3D floor? @@ -4883,43 +4876,51 @@ namespace CodeImp.DoomBuilder.BuilderModes { offset -= j.controlSide.OffsetY; offset -= j.controlSide.Fields.GetValue("offsety_mid", 0.0f); - j.sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, (float)Math.Round(offset % General.Map.Data.GetTextureImage(j.controlSide.LongMiddleTexture).Height, General.Map.FormatInterface.VertexDecimals)); //mxd + + ImageData tex = General.Map.Data.GetTextureImage(j.controlSide.LongMiddleTexture); + int texheight = (tex != null && tex.IsImageLoaded) ? tex.Height : 1; + j.sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, + (float)Math.Round(offset % texheight, General.Map.FormatInterface.VertexDecimals)); //mxd } else { - ImageData midtex = General.Map.Data.GetTextureImage(j.sidedef.LongMiddleTexture); + ImageData tex = General.Map.Data.GetTextureImage(j.sidedef.LongMiddleTexture); offset = Tools.GetSidedefMiddleOffsetY(j.sidedef, offset, j.scaleY / scaley, true); - bool startisnonwrappedmidtex = (start.Sidedef.Other != null && start.GeometryType == VisualGeometryType.WALL_MIDDLE && !start.Sidedef.IsFlagSet("wrapmidtex") && !start.Sidedef.Line.IsFlagSet("wrapmidtex")); - bool cursideisnonwrappedmidtex = (j.sidedef.Other != null && !j.sidedef.IsFlagSet("wrapmidtex") && !j.sidedef.Line.IsFlagSet("wrapmidtex")); - - //mxd. Only clamp when the texture is wrapped - if(!cursideisnonwrappedmidtex) offset %= midtex.Height; - - if(!startisnonwrappedmidtex && cursideisnonwrappedmidtex) + if(tex != null && tex.IsImageLoaded) { - //mxd. This should be doublesided non-wrapped line. Find the nearset aligned position - float curoffset = UniFields.GetFloat(j.sidedef.Fields, "offsety_mid") + j.sidedef.OffsetY; - offset += midtex.Height * (float)Math.Round(curoffset / midtex.Height - 0.5f * Math.Sign(j.scaleY)); + bool startisnonwrappedmidtex = (start.Sidedef.Other != null && start.GeometryType == VisualGeometryType.WALL_MIDDLE && !start.Sidedef.IsFlagSet("wrapmidtex") && !start.Sidedef.Line.IsFlagSet("wrapmidtex")); + bool cursideisnonwrappedmidtex = (j.sidedef.Other != null && !j.sidedef.IsFlagSet("wrapmidtex") && !j.sidedef.Line.IsFlagSet("wrapmidtex")); + + //mxd. Only clamp when the texture is wrapped + if(!cursideisnonwrappedmidtex) offset %= tex.Height; - // Make sure the surface stays between floor and ceiling - if(j.sidedef.Line.IsFlagSet(General.Map.Config.LowerUnpeggedFlag) || Math.Sign(j.scaleY) == -1) - { - if(offset < -midtex.Height) - offset += midtex.Height; - else if(offset > j.sidedef.GetMiddleHeight()) - offset -= midtex.Height; - } - else + if(!startisnonwrappedmidtex && cursideisnonwrappedmidtex) { - if(offset < -(j.sidedef.GetMiddleHeight() + midtex.Height)) - offset += midtex.Height; - else if(offset > midtex.Height) - offset -= midtex.Height; + //mxd. This should be doublesided non-wrapped line. Find the nearset aligned position + float curoffset = UniFields.GetFloat(j.sidedef.Fields, "offsety_mid") + j.sidedef.OffsetY; + offset += tex.Height * (float)Math.Round(curoffset / tex.Height - 0.5f * Math.Sign(j.scaleY)); + + // Make sure the surface stays between floor and ceiling + if(j.sidedef.Line.IsFlagSet(General.Map.Config.LowerUnpeggedFlag) || Math.Sign(j.scaleY) == -1) + { + if(offset < -tex.Height) + offset += tex.Height; + else if(offset > j.sidedef.GetMiddleHeight()) + offset -= tex.Height; + } + else + { + if(offset < -(j.sidedef.GetMiddleHeight() + tex.Height)) + offset += tex.Height; + else if(offset > tex.Height) + offset -= tex.Height; + } } } - j.sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, (float)Math.Round(offset, General.Map.FormatInterface.VertexDecimals)); //mxd + j.sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, + (float)Math.Round(offset, General.Map.FormatInterface.VertexDecimals)); //mxd } } } @@ -4933,17 +4934,17 @@ namespace CodeImp.DoomBuilder.BuilderModes // Add sidedefs forward (connected to the right vertex) v = j.sidedef.IsFront ? j.sidedef.Line.End : j.sidedef.Line.Start; - AddSidedefsForAlignment(todo, v, true, forwardoffset, j.scaleY, texture.LongName, true); + AddSidedefsForAlignment(todo, v, true, forwardoffset, j.scaleY, texturehashes, true); // Add sidedefs backward (connected to the left vertex) v = j.sidedef.IsFront ? j.sidedef.Line.Start : j.sidedef.Line.End; - AddSidedefsForAlignment(todo, v, false, backwardoffset, j.scaleY, texture.LongName, true); + AddSidedefsForAlignment(todo, v, false, backwardoffset, j.scaleY, texturehashes, true); } } } // This adds the matching, unmarked sidedefs from a vertex for texture alignment - private void AddSidedefsForAlignment(Stack<SidedefAlignJob> stack, Vertex v, bool forward, float offsetx, float scaleY, long texturelongname, bool udmf) + private void AddSidedefsForAlignment(Stack<SidedefAlignJob> stack, Vertex v, bool forward, float offsetx, float scaleY, HashSet<long> texturelongnames, bool udmf) { foreach(Linedef ld in v.Linedefs) { @@ -4961,7 +4962,7 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(Sidedef s in controlSides) { - if(!singleselection || Tools.SidedefTextureMatch(s, texturelongname)) + if(!singleselection || BuilderModesTools.SidedefTextureMatch(this, s, texturelongnames)) { SidedefAlignJob nj = new SidedefAlignJob(); nj.forward = forward; @@ -4979,7 +4980,7 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(Sidedef s in controlSides) { - if(!singleselection || Tools.SidedefTextureMatch(s, texturelongname)) + if(!singleselection || BuilderModesTools.SidedefTextureMatch(this, s, texturelongnames)) { SidedefAlignJob nj = new SidedefAlignJob(); nj.forward = forward; @@ -5005,11 +5006,11 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd private List<Sidedef> GetControlSides(Sidedef side, bool udmf) { - if(side.Other == null) return new List<Sidedef>() { side }; - if(side.Other.Sector.Tag == 0) return new List<Sidedef>() { side }; + if(side.Other == null) return new List<Sidedef> { side }; + if(side.Other.Sector.Tag == 0) return new List<Sidedef> { side }; - SectorData data = GetSectorData(side.Other.Sector); - if(data.ExtraFloors.Count == 0) return new List<Sidedef>() { side }; + SectorData data = GetSectorDataEx(side.Other.Sector); + if(data == null || data.ExtraFloors.Count == 0) return new List<Sidedef> { side }; List<Sidedef> sides = new List<Sidedef>(); foreach(Effect3DFloor ef in data.ExtraFloors) diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualSector.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualSector.cs index cc06ba6703b405c3f4b244b390a1a9687df32a0c..0be3384c41296e3526949ae886e3940d5daf3b38 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualSector.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualSector.cs @@ -124,16 +124,13 @@ namespace CodeImp.DoomBuilder.BuilderModes SectorData data = mode.GetSectorDataEx(this.Sector); //mxd if(data != null) //mxd { - data.Reset(includeneighbours); + data.Reset(false); // Update sectors that rely on this sector foreach(KeyValuePair<Sector, bool> s in data.UpdateAlso) { - if(mode.VisualSectorExists(s.Key)) - { - BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(s.Key); - vs.Changed = true; - } + SectorData other = mode.GetSectorDataEx(s.Key); + if(other != null) other.Reset(s.Value); } } @@ -145,7 +142,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(mode.VisualThingExists(t)) { // Update thing - BaseVisualThing vt = (mode.GetVisualThing(t) as BaseVisualThing); + BaseVisualThing vt = (BaseVisualThing)mode.GetVisualThing(t); vt.Changed = true; } } @@ -160,8 +157,16 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(mode.VisualSectorExists(sd.Other.Sector)) { - BaseVisualSector bvs = (BaseVisualSector)mode.GetVisualSector(sd.Other.Sector); - bvs.Changed = true; + SectorData other = mode.GetSectorDataEx(sd.Other.Sector); + if(other != null) + { + other.Reset(false); + } + else + { + BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(sd.Other.Sector); + vs.Changed = true; + } } } } @@ -189,7 +194,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(mode.VisualThingExists(t)) { // Update thing - BaseVisualThing vt = (mode.GetVisualThing(t) as BaseVisualThing); + BaseVisualThing vt = (BaseVisualThing)mode.GetVisualThing(t); vt.Rebuild(); } } diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualThing.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualThing.cs index 7ef65e8d58c7d79dd42e6b76aaaa4479bcb0a803..b22aecc8f1cdba07c6037e0510531af95c646816 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualThing.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualThing.cs @@ -294,12 +294,13 @@ namespace CodeImp.DoomBuilder.BuilderModes base.Texture = Sprite; // Determine sprite size and offset - float radius = Sprite.ScaledWidth * 0.5f; - float height = Sprite.ScaledHeight; - if(Sprite is SpriteImage) + float radius = sprite.ScaledWidth * 0.5f; + float height = sprite.ScaledHeight; + SpriteImage spriteimg = sprite as SpriteImage; + if(spriteimg != null) { - offsetx = radius - (Sprite as SpriteImage).OffsetX; - offsety = (Sprite as SpriteImage).OffsetY - height; + offsetx = radius - spriteimg.OffsetX; + offsety = spriteimg.OffsetY - height; } // Scale by thing type/actor scale @@ -673,7 +674,7 @@ namespace CodeImp.DoomBuilder.BuilderModes public void OnToggleLowerUnpegged() { } public void OnTogglePegMidtexture() { } public void OnToggleRepeatMidtexture() { } - public void OnProcess(float deltatime) { } + public void OnProcess(long deltatime) { } public void OnTextureFloodfill() { } public void OnInsert() { } public void OnTextureFit(FitTextureOptions options) { } //mxd @@ -747,7 +748,7 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(Thing t in things) { VisualThing vt = mode.GetVisualThing(t); - if(vt != null) updateList.Add(vt as BaseVisualThing); + if(vt != null) updateList.Add((BaseVisualThing)vt); } General.Interface.OnEditFormValuesChanged += Interface_OnEditFormValuesChanged; diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualVertex.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualVertex.cs index 918e68f380e15e1313b437d626d8651c22a08385..53d2b49f3ea97120e635dc7b1243a547f3f191ae 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualVertex.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualVertex.cs @@ -256,7 +256,7 @@ namespace CodeImp.DoomBuilder.BuilderModes public void OnToggleRepeatMidtexture() { } public void OnResetTextureOffset() { } public void OnResetLocalTextureOffset() { } //mxd - public void OnProcess(float deltatime) { } + public void OnProcess(long deltatime) { } public void OnTextureFloodfill() { } public void OnInsert() { } public void ApplyTexture(string texture) { } diff --git a/Source/Plugins/BuilderModes/VisualModes/EffectGlowingFlat.cs b/Source/Plugins/BuilderModes/VisualModes/EffectGlowingFlat.cs index d1d36e8a61cc9dbfcb08da998036bdde0bc0bd8d..25227e7e8eb070d74cf5759b62c331172e687638 100644 --- a/Source/Plugins/BuilderModes/VisualModes/EffectGlowingFlat.cs +++ b/Source/Plugins/BuilderModes/VisualModes/EffectGlowingFlat.cs @@ -1,45 +1,35 @@ -using CodeImp.DoomBuilder.Map; -using CodeImp.DoomBuilder.Rendering; +using CodeImp.DoomBuilder.Rendering; namespace CodeImp.DoomBuilder.BuilderModes { - internal class EffectGlowingFlat : SectorEffect + internal class EffectGlowingFlat { - private readonly Sector sector; + private readonly SectorData data; // Level planes private SectorLevel ceillevel; private SectorLevel floorlevel; // Constructor - public EffectGlowingFlat(SectorData data, Sector sourcesector) : base(data) + public EffectGlowingFlat(SectorData sourcedata) { - sector = sourcesector; - - // New effect added: This sector needs an update! - if(data.Mode.VisualSectorExists(data.Sector)) - { - BaseVisualSector vs = (BaseVisualSector)data.Mode.GetVisualSector(data.Sector); - vs.UpdateSectorGeometry(false); - } + data = sourcedata; } - public override void Update() + public void Update() { // Create ceiling glow effect? - if(General.Map.Data.GlowingFlats.ContainsKey(sector.LongCeilTexture)) + if(General.Map.Data.GlowingFlats.ContainsKey(data.Sector.LongCeilTexture)) { // Create ceiling level? if(ceillevel == null) { - ceillevel = new SectorLevel(data.Ceiling); - ceillevel.type = SectorLevelType.Glow; - ceillevel.disablelighting = true; + ceillevel = new SectorLevel(data.Ceiling) { type = SectorLevelType.Glow, disablelighting = true }; data.AddSectorLevel(ceillevel); } // Update ceiling level - data.CeilingGlow = General.Map.Data.GlowingFlats[sector.LongCeilTexture]; + data.CeilingGlow = General.Map.Data.GlowingFlats[data.Sector.LongCeilTexture]; ceillevel.brightnessbelow = -1; // We need this plane for clipping only, ceillevel.color = 0; // so we need to reset all shading and coloring ceillevel.plane = data.Ceiling.plane; @@ -52,19 +42,17 @@ namespace CodeImp.DoomBuilder.BuilderModes } // Create floor glow effect? - if(General.Map.Data.GlowingFlats.ContainsKey(sector.LongFloorTexture)) + if(General.Map.Data.GlowingFlats.ContainsKey(data.Sector.LongFloorTexture)) { // Create floor level? if(floorlevel == null) { - floorlevel = new SectorLevel(data.Floor); - floorlevel.type = SectorLevelType.Glow; - floorlevel.disablelighting = true; + floorlevel = new SectorLevel(data.Floor) { type = SectorLevelType.Glow, disablelighting = true }; data.AddSectorLevel(floorlevel); } // Update floor level - data.FloorGlow = General.Map.Data.GlowingFlats[sector.LongFloorTexture]; + data.FloorGlow = General.Map.Data.GlowingFlats[data.Sector.LongFloorTexture]; floorlevel.plane = data.Floor.plane.GetInverted(); floorlevel.plane.Offset += data.FloorGlow.Height; diff --git a/Source/Plugins/BuilderModes/VisualModes/EffectLineSlope.cs b/Source/Plugins/BuilderModes/VisualModes/EffectLineSlope.cs index 06c2cc7062e9e4905d260936ade8568f8d0671bf..6898b4a89eee48970818be718e84ef47612551fc 100644 --- a/Source/Plugins/BuilderModes/VisualModes/EffectLineSlope.cs +++ b/Source/Plugins/BuilderModes/VisualModes/EffectLineSlope.cs @@ -1,5 +1,6 @@ #region === Copyright (c) 2010 Pascal van der Heiden === +using System.Collections.Generic; using CodeImp.DoomBuilder.Geometry; using CodeImp.DoomBuilder.Map; @@ -11,6 +12,8 @@ namespace CodeImp.DoomBuilder.BuilderModes { // Linedef that is used to create this effect private readonly Linedef l; + private Plane storedfloor; //mxd. SectorData recreates floor/ceiling planes before updating effects + private Plane storedceiling; //mxd // Constructor public EffectLineSlope(SectorData data, Linedef sourcelinedef) : base(data) @@ -43,6 +46,9 @@ namespace CodeImp.DoomBuilder.BuilderModes founddist = d; } } + + if(foundv == null) return; //mxd + bool updatesides = false; // Align floor with back of line if((l.Args[0] == 1) && (l.Front.Sector == data.Sector)) @@ -50,12 +56,14 @@ namespace CodeImp.DoomBuilder.BuilderModes Vector3D v1 = new Vector3D(l.Start.Position.x, l.Start.Position.y, l.Back.Sector.FloorHeight); Vector3D v2 = new Vector3D(l.End.Position.x, l.End.Position.y, l.Back.Sector.FloorHeight); Vector3D v3 = new Vector3D(foundv.Position.x, foundv.Position.y, data.Sector.FloorHeight); - if(l.SideOfLine(v3) < 0.0f) - data.Floor.plane = new Plane(v1, v2, v3, true); - else - data.Floor.plane = new Plane(v2, v1, v3, true); - SectorData sd = data.Mode.GetSectorData(l.Back.Sector); - sd.AddUpdateSector(data.Sector, true); + data.Floor.plane = (l.SideOfLine(v3) < 0.0f ? new Plane(v1, v2, v3, true) : new Plane(v2, v1, v3, true)); + + //mxd. Update only when actually changed + if(storedfloor != data.Floor.plane) + { + storedfloor = data.Floor.plane; + updatesides = true; + } } // Align floor with front of line else if((l.Args[0] == 2) && (l.Back.Sector == data.Sector)) @@ -63,12 +71,14 @@ namespace CodeImp.DoomBuilder.BuilderModes Vector3D v1 = new Vector3D(l.Start.Position.x, l.Start.Position.y, l.Front.Sector.FloorHeight); Vector3D v2 = new Vector3D(l.End.Position.x, l.End.Position.y, l.Front.Sector.FloorHeight); Vector3D v3 = new Vector3D(foundv.Position.x, foundv.Position.y, data.Sector.FloorHeight); - if(l.SideOfLine(v3) < 0.0f) - data.Floor.plane = new Plane(v1, v2, v3, true); - else - data.Floor.plane = new Plane(v2, v1, v3, true); - SectorData sd = data.Mode.GetSectorData(l.Front.Sector); - sd.AddUpdateSector(data.Sector, true); + data.Floor.plane = (l.SideOfLine(v3) < 0.0f ? new Plane(v1, v2, v3, true) : new Plane(v2, v1, v3, true)); + + //mxd. Update only when actually changed + if(storedfloor != data.Floor.plane) + { + storedfloor = data.Floor.plane; + updatesides = true; + } } // Align ceiling with back of line @@ -77,12 +87,14 @@ namespace CodeImp.DoomBuilder.BuilderModes Vector3D v1 = new Vector3D(l.Start.Position.x, l.Start.Position.y, l.Back.Sector.CeilHeight); Vector3D v2 = new Vector3D(l.End.Position.x, l.End.Position.y, l.Back.Sector.CeilHeight); Vector3D v3 = new Vector3D(foundv.Position.x, foundv.Position.y, data.Sector.CeilHeight); - if(l.SideOfLine(v3) > 0.0f) - data.Ceiling.plane = new Plane(v1, v2, v3, false); - else - data.Ceiling.plane = new Plane(v2, v1, v3, false); - SectorData sd = data.Mode.GetSectorData(l.Back.Sector); - sd.AddUpdateSector(data.Sector, true); + data.Ceiling.plane = (l.SideOfLine(v3) > 0.0f ? new Plane(v1, v2, v3, false) : new Plane(v2, v1, v3, false)); + + //mxd. Update only when actually changed + if(storedceiling != data.Ceiling.plane) + { + storedceiling = data.Ceiling.plane; + updatesides = true; + } } // Align ceiling with front of line else if((l.Args[1] == 2) && (l.Back.Sector == data.Sector)) @@ -90,12 +102,73 @@ namespace CodeImp.DoomBuilder.BuilderModes Vector3D v1 = new Vector3D(l.Start.Position.x, l.Start.Position.y, l.Front.Sector.CeilHeight); Vector3D v2 = new Vector3D(l.End.Position.x, l.End.Position.y, l.Front.Sector.CeilHeight); Vector3D v3 = new Vector3D(foundv.Position.x, foundv.Position.y, data.Sector.CeilHeight); - if(l.SideOfLine(v3) > 0.0f) - data.Ceiling.plane = new Plane(v1, v2, v3, false); - else - data.Ceiling.plane = new Plane(v2, v1, v3, false); - SectorData sd = data.Mode.GetSectorData(l.Front.Sector); - sd.AddUpdateSector(data.Sector, true); + data.Ceiling.plane = (l.SideOfLine(v3) > 0.0f ? new Plane(v1, v2, v3, false) : new Plane(v2, v1, v3, false)); + + //mxd. Update only when actually changed + if(storedceiling != data.Ceiling.plane) + { + storedceiling = data.Ceiling.plane; + updatesides = true; + } + } + + //mxd. Update outer sidedef geometry + if(updatesides) + { + UpdateSectorSides(data.Sector); + + // Update sectors with PlaneCopySlope Effect... + List<SectorData> toupdate = new List<SectorData>(); + foreach(Sector s in data.UpdateAlso.Keys) + { + SectorData osd = data.Mode.GetSectorDataEx(s); + if(osd == null) continue; + foreach(SectorEffect e in osd.Effects) + { + if(e is EffectPlaneCopySlope) + { + toupdate.Add(osd); + break; + } + } + } + + // Do it in 2 steps, because SectorData.Reset() may change SectorData.UpdateAlso collection... + foreach(SectorData sd in toupdate) + { + // Update PlaneCopySlope Effect... + sd.Reset(false); + + // Update outer sides... + UpdateSectorSides(sd.Sector); + } + + // Update all things in the sector + foreach(Thing t in General.Map.Map.Things) + { + if(t.Sector == data.Sector) + { + if(data.Mode.VisualThingExists(t)) + { + // Update thing + BaseVisualThing vt = (BaseVisualThing)data.Mode.GetVisualThing(t); + vt.Changed = true; + } + } + } + } + } + + //mxd + private void UpdateSectorSides(Sector s) + { + foreach(Sidedef side in s.Sidedefs) + { + if(side.Other != null && side.Other.Sector != null && data.Mode.VisualSectorExists(side.Other.Sector)) + { + BaseVisualSector vs = (BaseVisualSector)data.Mode.GetVisualSector(side.Other.Sector); + vs.GetSidedefParts(side.Other).SetupAllParts(); + } } } } diff --git a/Source/Plugins/BuilderModes/VisualModes/EffectPlaneCopySlope.cs b/Source/Plugins/BuilderModes/VisualModes/EffectPlaneCopySlope.cs index a1ec5aa449d0eea190859bcfc82394cc1e379ab0..ee2e25a062da826ba131ae428820597e305a3842 100644 --- a/Source/Plugins/BuilderModes/VisualModes/EffectPlaneCopySlope.cs +++ b/Source/Plugins/BuilderModes/VisualModes/EffectPlaneCopySlope.cs @@ -1,4 +1,5 @@ -using CodeImp.DoomBuilder.Map; +using System.Collections.Generic; +using CodeImp.DoomBuilder.Map; namespace CodeImp.DoomBuilder.BuilderModes { @@ -26,6 +27,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { Sector sourcesector = null; SectorData sourcesectordata = null; + bool updatesides = false; // Copy slopes from tagged sectors //check which arguments we must use @@ -51,6 +53,8 @@ namespace CodeImp.DoomBuilder.BuilderModes data.Floor.plane = sourcesectordata.Floor.plane; sourcesectordata.AddUpdateSector(data.Sector, true); + + updatesides = true; } } @@ -77,6 +81,8 @@ namespace CodeImp.DoomBuilder.BuilderModes data.Ceiling.plane = sourcesectordata.Ceiling.plane; sourcesectordata.AddUpdateSector(data.Sector, true); + + updatesides = true; } } @@ -105,26 +111,73 @@ namespace CodeImp.DoomBuilder.BuilderModes } // Copy slope across the line - if(!copyFloor && !copyCeiling) return; + if((copyFloor || copyCeiling) && linedef.Front != null && linedef.Back != null) + { + // Get appropriate source sector data + sourcesectordata = data.Mode.GetSectorData(front ? linedef.Back.Sector : linedef.Front.Sector); + if(!sourcesectordata.Updated) sourcesectordata.Update(); - //get appropriate source sector data - sourcesectordata = data.Mode.GetSectorData(front ? linedef.Back.Sector : linedef.Front.Sector); - if(!sourcesectordata.Updated) sourcesectordata.Update(); + //copy floor slope? + if(copyFloor) + { + data.Floor.plane = sourcesectordata.Floor.plane; + sourcesectordata.AddUpdateSector(data.Sector, true); + } - //copy floor slope? - if(copyFloor) + //copy ceiling slope? + if(copyCeiling) + { + data.Ceiling.plane = sourcesectordata.Ceiling.plane; + sourcesectordata.AddUpdateSector(data.Sector, true); + } + + updatesides = true; + } + + // Update outer sidedef geometry + if(updatesides) { - data.Floor.plane = sourcesectordata.Floor.plane; - sourcesectordata.AddUpdateSector(data.Sector, true); + UpdateSectorSides(data.Sector); + + // Update sectors with PlaneCopySlope Effect... + List<SectorData> toupdate = new List<SectorData>(); + foreach(Sector s in data.UpdateAlso.Keys) + { + SectorData osd = data.Mode.GetSectorDataEx(s); + if(osd == null) continue; + foreach(SectorEffect e in osd.Effects) + { + if(e is EffectPlaneCopySlope) + { + toupdate.Add(osd); + break; + } + } + } + + // Do it in 2 steps, because SectorData.Reset() may change SectorData.UpdateAlso collection... + foreach(SectorData sd in toupdate) + { + // Update PlaneCopySlope Effect... + sd.Reset(false); + + // Update outer sides... + UpdateSectorSides(sd.Sector); + } } + } - //copy ceiling slope? - if(copyCeiling) + //mxd + private void UpdateSectorSides(Sector s) + { + foreach(Sidedef side in s.Sidedefs) { - data.Ceiling.plane = sourcesectordata.Ceiling.plane; - sourcesectordata.AddUpdateSector(data.Sector, true); + if(side.Other != null && side.Other.Sector != null && data.Mode.VisualSectorExists(side.Other.Sector)) + { + BaseVisualSector vs = (BaseVisualSector)data.Mode.GetVisualSector(side.Other.Sector); + vs.GetSidedefParts(side.Other).SetupAllParts(); + } } - } } } diff --git a/Source/Plugins/BuilderModes/VisualModes/EffectThingLineSlope.cs b/Source/Plugins/BuilderModes/VisualModes/EffectThingLineSlope.cs index 145fe0591267f6ea079473eb6e18b6c246f457ff..40ccb2edf15c4da2f0737c99ffbd6684c78b708d 100644 --- a/Source/Plugins/BuilderModes/VisualModes/EffectThingLineSlope.cs +++ b/Source/Plugins/BuilderModes/VisualModes/EffectThingLineSlope.cs @@ -30,6 +30,9 @@ namespace CodeImp.DoomBuilder.BuilderModes // This makes sure we are updated with the source linedef information public override void Update() { + //mxd. Skip if arg0 is 0. + if(thing.Args[0] == 0) return; + ThingData td = data.Mode.GetThingData(thing); Thing t = thing; diff --git a/Source/Plugins/BuilderModes/VisualModes/EffectTransferCeilingBrightness.cs b/Source/Plugins/BuilderModes/VisualModes/EffectTransferCeilingBrightness.cs index 5ed4ee03d0db4414a5fdabf248ca416579160720..f71db4bf420f0ff0397204d978f5786487857409 100644 --- a/Source/Plugins/BuilderModes/VisualModes/EffectTransferCeilingBrightness.cs +++ b/Source/Plugins/BuilderModes/VisualModes/EffectTransferCeilingBrightness.cs @@ -1,6 +1,7 @@ #region === Copyright (c) 2015 MaxED === using CodeImp.DoomBuilder.Map; +using CodeImp.DoomBuilder.Rendering; #endregion @@ -31,8 +32,10 @@ namespace CodeImp.DoomBuilder.BuilderModes if(!sd.Updated) sd.Update(); sd.AddUpdateSector(data.Sector, false); - // Transfer ceiling brightness - data.Ceiling.color = General.Map.Renderer3D.CalculateBrightness(sd.Sector.Brightness); + // Transfer ceiling brightness, keep sector color + PixelColor lightcolor = PixelColor.FromInt(data.Sector.Fields.GetValue("lightcolor", -1)); + PixelColor brightness = PixelColor.FromInt(General.Map.Renderer3D.CalculateBrightness(sd.Sector.Brightness)); + data.Ceiling.color = PixelColor.Modulate(lightcolor, brightness).WithAlpha(255).ToInt(); } } } diff --git a/Source/Plugins/BuilderModes/VisualModes/EffectTransferFloorBrightness.cs b/Source/Plugins/BuilderModes/VisualModes/EffectTransferFloorBrightness.cs index 129c8bb320520fbc1c8095cc6ec840eeab2f2d38..270a6ff4c7c8df9e4883c80302b47251b6012a98 100644 --- a/Source/Plugins/BuilderModes/VisualModes/EffectTransferFloorBrightness.cs +++ b/Source/Plugins/BuilderModes/VisualModes/EffectTransferFloorBrightness.cs @@ -1,6 +1,7 @@ #region === Copyright (c) 2015 MaxED === using CodeImp.DoomBuilder.Map; +using CodeImp.DoomBuilder.Rendering; #endregion @@ -31,8 +32,10 @@ namespace CodeImp.DoomBuilder.BuilderModes if(!sd.Updated) sd.Update(); sd.AddUpdateSector(data.Sector, false); - // Transfer floor brightness - data.Floor.color = General.Map.Renderer3D.CalculateBrightness(sd.Sector.Brightness); + // Transfer floor brightness, keep sector color + PixelColor lightcolor = PixelColor.FromInt(data.Sector.Fields.GetValue("lightcolor", -1)); + PixelColor brightness = PixelColor.FromInt(General.Map.Renderer3D.CalculateBrightness(sd.Sector.Brightness)); + data.Floor.color = PixelColor.Modulate(lightcolor, brightness).WithAlpha(255).ToInt(); data.Floor.brightnessbelow = sd.Floor.brightnessbelow; } } diff --git a/Source/Plugins/BuilderModes/VisualModes/IVisualEventReceiver.cs b/Source/Plugins/BuilderModes/VisualModes/IVisualEventReceiver.cs index c3b6134d639fe5a50086bb08cc8dd1be7ef7d17a..64a5640d49f70109be3cce6d3811c19740fcbfc1 100644 --- a/Source/Plugins/BuilderModes/VisualModes/IVisualEventReceiver.cs +++ b/Source/Plugins/BuilderModes/VisualModes/IVisualEventReceiver.cs @@ -24,6 +24,9 @@ namespace CodeImp.DoomBuilder.BuilderModes { internal interface IVisualEventReceiver { + //mxd. Properties + bool Selected { get; } + // The events that must be handled void OnSelectBegin(); void OnSelectEnd(); @@ -50,7 +53,7 @@ namespace CodeImp.DoomBuilder.BuilderModes void OnToggleLowerUnpegged(); void OnTogglePegMidtexture(); void OnToggleRepeatMidtexture(); - void OnProcess(float deltatime); + void OnProcess(long deltatime); void OnInsert(); void OnDelete(); void OnPaintSelectBegin(); // biwa @@ -62,7 +65,6 @@ namespace CodeImp.DoomBuilder.BuilderModes // Other methods string GetTextureName(); - void SelectNeighbours(bool select, bool matchtexture, bool matchheight); //mxd - bool IsSelected(); //mxd - } + void SelectNeighbours(bool select, bool matchtexture, bool matchheight); //mxd + } } diff --git a/Source/Plugins/BuilderModes/VisualModes/NullVisualEventReceiver.cs b/Source/Plugins/BuilderModes/VisualModes/NullVisualEventReceiver.cs index 83ffa5424f1f707d77428a5e46910e42fce30e25..dce96a4af277df28a494c36664b0f6ab3575382d 100644 --- a/Source/Plugins/BuilderModes/VisualModes/NullVisualEventReceiver.cs +++ b/Source/Plugins/BuilderModes/VisualModes/NullVisualEventReceiver.cs @@ -25,6 +25,8 @@ namespace CodeImp.DoomBuilder.BuilderModes // This doesn't do jack shit. internal class NullVisualEventReceiver : IVisualEventReceiver { + public bool Selected { get { return false; } } //mxd + public void OnSelectBegin() { } public void OnSelectEnd() { } public void OnEditBegin() { } @@ -50,7 +52,7 @@ namespace CodeImp.DoomBuilder.BuilderModes public void OnToggleLowerUnpegged() { } public void OnTogglePegMidtexture() { } public void OnToggleRepeatMidtexture() { } - public void OnProcess(float deltatime) { } + public void OnProcess(long deltatime) { } public void OnInsert() { } public void OnDelete() { } public void OnPaintSelectBegin() { } // biwa @@ -59,6 +61,5 @@ namespace CodeImp.DoomBuilder.BuilderModes public void ApplyLinedefFlag(string flag, bool set) { } public string GetTextureName() { return ""; } public void SelectNeighbours(bool select, bool withSameTexture, bool withSameHeight) { } //mxd - public bool IsSelected() { return false; } //mxd } } diff --git a/Source/Plugins/BuilderModes/VisualModes/SectorData.cs b/Source/Plugins/BuilderModes/VisualModes/SectorData.cs index 03ea37e64b99ee146508747871cf0a92ab8df228..bea8fef5943731fb3d3baaaaba82b26381821520 100644 --- a/Source/Plugins/BuilderModes/VisualModes/SectorData.cs +++ b/Source/Plugins/BuilderModes/VisualModes/SectorData.cs @@ -37,6 +37,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Effects private readonly List<SectorEffect> alleffects; private readonly List<Effect3DFloor> extrafloors; + private readonly EffectGlowingFlat glowingflateffect; //mxd internal GlowingFlatData CeilingGlow; //mxd internal GlowingFlatData FloorGlow; //mxd @@ -59,6 +60,12 @@ namespace CodeImp.DoomBuilder.BuilderModes private bool floorchanged; private bool ceilingchanged; + //mxd. Absolute lights are not affected by brightness transfers... + private bool lightfloorabsolute; + private bool lightceilingabsolute; + private int lightfloor; + private int lightceiling; + #endregion #region ================== Properties @@ -69,6 +76,7 @@ namespace CodeImp.DoomBuilder.BuilderModes public bool CeilingChanged { get { return ceilingchanged; } set { ceilingchanged |= value; } } public List<SectorLevel> LightLevels { get { return lightlevels; } } public List<Effect3DFloor> ExtraFloors { get { return extrafloors; } } + public List<SectorEffect> Effects { get { return alleffects; } } //mxd public SectorLevel Floor { get { return floor; } } public SectorLevel Ceiling { get { return ceiling; } } public BaseVisualMode Mode { get { return mode; } } @@ -95,12 +103,13 @@ namespace CodeImp.DoomBuilder.BuilderModes this.floorbase = new SectorLevel(sector, SectorLevelType.Floor); //mxd this.ceiling = new SectorLevel(sector, SectorLevelType.Ceiling); this.ceilingbase = new SectorLevel(sector, SectorLevelType.Ceiling); //mxd - - BasicSetup(); + this.glowingflateffect = new EffectGlowingFlat(this); //mxd // Add ceiling and floor lightlevels.Add(floor); lightlevels.Add(ceiling); + + BasicSetup(); } #endregion @@ -198,13 +207,6 @@ namespace CodeImp.DoomBuilder.BuilderModes EffectUDMFVertexOffset e = new EffectUDMFVertexOffset(this); alleffects.Add(e); } - - //mxd. - public void AddEffectGlowingFlat(Sector sourcesector) - { - EffectGlowingFlat e = new EffectGlowingFlat(this, sourcesector); - alleffects.Add(e); - } // This adds a sector for updating public void AddUpdateSector(Sector s, bool includeneighbours) @@ -303,18 +305,17 @@ namespace CodeImp.DoomBuilder.BuilderModes // Fetch ZDoom fields int color = sector.Fields.GetValue("lightcolor", -1); - int flight = sector.Fields.GetValue("lightfloor", 0); - bool fabs = sector.Fields.GetValue("lightfloorabsolute", false); - int clight = sector.Fields.GetValue("lightceiling", 0); - bool cabs = sector.Fields.GetValue("lightceilingabsolute", false); - //int alpha = sector.Fields.GetValue("lightalpha", 255); + lightfloor = sector.Fields.GetValue("lightfloor", 0); + lightfloorabsolute = sector.Fields.GetValue("lightfloorabsolute", false); + lightceiling = sector.Fields.GetValue("lightceiling", 0); + lightceilingabsolute = sector.Fields.GetValue("lightceilingabsolute", false); // Determine colors & light levels PixelColor lightcolor = PixelColor.FromInt(color); - if(!fabs) flight = sector.Brightness + flight; - if(!cabs) clight = sector.Brightness + clight; - PixelColor floorbrightness = PixelColor.FromInt(mode.CalculateBrightness(flight)); - PixelColor ceilingbrightness = PixelColor.FromInt(mode.CalculateBrightness(clight)); + if(!lightfloorabsolute) lightfloor = sector.Brightness + lightfloor; + if(!lightceilingabsolute) lightceiling = sector.Brightness + lightceiling; + PixelColor floorbrightness = PixelColor.FromInt(mode.CalculateBrightness(lightfloor)); + PixelColor ceilingbrightness = PixelColor.FromInt(mode.CalculateBrightness(lightceiling)); PixelColor floorcolor = PixelColor.Modulate(lightcolor, floorbrightness); PixelColor ceilingcolor = PixelColor.Modulate(lightcolor, ceilingbrightness); floor.color = floorcolor.WithAlpha(255).ToInt(); @@ -327,6 +328,13 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Store a copy of initial settings floor.CopyProperties(floorbase); ceiling.CopyProperties(ceilingbase); + + //mxd. We need sector brightness here, unaffected by custom ceiling brightness... + ceilingbase.brightnessbelow = sector.Brightness; + ceilingbase.color = PixelColor.FromInt(mode.CalculateBrightness(sector.Brightness)).WithAlpha(255).ToInt(); + + //mxd + glowingflateffect.Update(); } //mxd @@ -366,7 +374,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { lightlevels[lightlevels.Count - 1].colorbelow = stored.colorbelow; lightlevels[lightlevels.Count - 1].brightnessbelow = stored.brightnessbelow; - lightlevels[lightlevels.Count - 1].color = stored.colorbelow.ToInt(); + lightlevels[lightlevels.Count - 1].color = GetLevelColor(stored, lightlevels[lightlevels.Count - 1]); } //mxd. Cast light properties from top to bottom @@ -387,12 +395,12 @@ namespace CodeImp.DoomBuilder.BuilderModes { l.colorbelow = stored.colorbelow; l.brightnessbelow = stored.brightnessbelow; - l.color = stored.color; + l.color = GetLevelColor(stored, l); } else if(l.restrictlighting) { if(!pl.restrictlighting && pl != ceiling) stored = pl; - l.color = stored.color; + l.color = GetLevelColor(stored, l); // This is the bottom side of extrafloor with "restrict lighting" flag. Make it cast stored light props. if(l.type == SectorLevelType.Ceiling) @@ -403,11 +411,10 @@ namespace CodeImp.DoomBuilder.BuilderModes // Use light and color settings from previous layer l.colorbelow = pl.colorbelow; l.brightnessbelow = pl.brightnessbelow; - l.color = pl.colorbelow.ToInt(); + l.color = GetLevelColor(pl, l); // Also colorize previous layer using next higher level color - if(i + 2 < lightlevels.Count) - pl.color = lightlevels[i + 2].colorbelow.ToInt(); + if(i + 2 < lightlevels.Count) pl.color = GetLevelColor(lightlevels[i + 2], pl); } else { @@ -450,12 +457,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(src.colorbelow.a > 0 && src.brightnessbelow != -1) { // Only surface brightness is retained when a glowing flat is used as extrafloor texture - if(!l.affectedbyglow) - { - PixelColor brightness = PixelColor.FromInt(mode.CalculateBrightness(src.brightnessbelow)); - PixelColor color = PixelColor.Modulate(src.colorbelow, brightness); - l.color = color.WithAlpha(255).ToInt(); - } + if(!l.affectedbyglow) l.color = GetLevelColor(src, l); // Transfer brightnessbelow and colorbelow if current level is not extrafloor top if(!(l.extrafloor && l.type == SectorLevelType.Floor)) @@ -605,6 +607,21 @@ namespace CodeImp.DoomBuilder.BuilderModes return found; } + + //mxd + private int GetLevelColor(SectorLevel src, SectorLevel target) + { + PixelColor brightness; + if(lightfloorabsolute && target == floor) + brightness = PixelColor.FromInt(mode.CalculateBrightness(lightfloor)); + else if(lightceilingabsolute && target == ceiling) + brightness = PixelColor.FromInt(mode.CalculateBrightness(lightceiling)); + else + brightness = PixelColor.FromInt(mode.CalculateBrightness(src.brightnessbelow)); + + PixelColor color = PixelColor.Modulate(src.colorbelow, brightness); + return color.WithAlpha(255).ToInt(); + } #endregion } diff --git a/Source/Plugins/BuilderModes/VisualModes/VisualCeiling.cs b/Source/Plugins/BuilderModes/VisualModes/VisualCeiling.cs index efb5a88e800e6b1ea6e21d4d7ec4abf756acf615..9c471e8d3eaa1e9b7379555b548bdfebdacedaf2 100644 --- a/Source/Plugins/BuilderModes/VisualModes/VisualCeiling.cs +++ b/Source/Plugins/BuilderModes/VisualModes/VisualCeiling.cs @@ -93,9 +93,9 @@ namespace CodeImp.DoomBuilder.BuilderModes base.Texture = General.Map.Data.UnknownTexture3D; setuponloadedtexture = s.LongCeilTexture; } - else + else if(!base.Texture.IsImageLoaded) { - if(!base.Texture.IsImageLoaded) setuponloadedtexture = s.LongCeilTexture; + setuponloadedtexture = s.LongCeilTexture; } } else @@ -111,29 +111,45 @@ namespace CodeImp.DoomBuilder.BuilderModes else texscale = new Vector2D(1.0f / 64.0f, 1.0f / 64.0f); - // Determine brightness - int color = PixelColor.FromInt(level.color).WithAlpha((byte)General.Clamp(level.alpha, 0, 255)).ToInt(); - - //mxd. Top extrafloor level should calculate fogdensity - //from the brightness of the level above it - int targetbrightness; - if (extrafloor != null && !extrafloor.VavoomType && !level.disablelighting) - { - targetbrightness = 0; - SectorData sd = mode.GetSectorData(this.Sector.Sector); - for (int i = 0; i < sd.LightLevels.Count - 1; i++) - { - if (sd.LightLevels[i] == level) - { - targetbrightness = sd.LightLevels[i + 1].brightnessbelow; - break; - } - } - } - else - { - targetbrightness = level.brightnessbelow; - } + // Determine brightness + byte alpha = (byte)General.Clamp(level.alpha, 0, 255); + int color = PixelColor.FromInt(level.color).WithAlpha(alpha).ToInt(); + int targetbrightness; + if(extrafloor != null && !extrafloor.VavoomType && !level.disablelighting) + { + //mxd. Top extrafloor level should calculate fogdensity from the brightness of the level above it + if(!innerside) + { + targetbrightness = 0; + SectorData sd = mode.GetSectorData(this.Sector.Sector); + for(int i = 0; i < sd.LightLevels.Count - 1; i++) + { + if(sd.LightLevels[i] == level) + { + targetbrightness = sd.LightLevels[i + 1].brightnessbelow; + break; + } + } + } + //mxd. Inner extrafloor ceilings must be colored using control sector's color and brightness + else + { + targetbrightness = level.brightnessbelow; + SectorData sd = mode.GetSectorData(this.Sector.Sector); + for(int i = 0; i < sd.LightLevels.Count; i++) + { + if(sd.LightLevels[i] == level) + { + if(i > 0) color = PixelColor.FromInt(sd.LightLevels[i - 1].color).WithAlpha(alpha).ToInt(); + break; + } + } + } + } + else + { + targetbrightness = level.brightnessbelow; + } //mxd. Determine fog density fogfactor = CalculateFogFactor(targetbrightness); @@ -227,15 +243,54 @@ namespace CodeImp.DoomBuilder.BuilderModes #region ================== Methods - // Return texture coordinates - protected override Point GetTextureOffset() + //mxd + public override void OnChangeScale(int incrementX, int incrementY) + { + // Only do this when not done yet in this call + // Because we may be able to select the same 3D floor multiple times through multiple sectors + SectorData sd = mode.GetSectorData(level.sector); + if(!sd.CeilingChanged) + { + sd.CeilingChanged = true; + base.OnChangeScale(incrementX, incrementY); + } + } + + //mxd + public override void OnChangeTextureRotation(float angle) + { + // Only do this when not done yet in this call + // Because we may be able to select the same 3D floor multiple times through multiple sectors + SectorData sd = mode.GetSectorData(level.sector); + if(!sd.CeilingChanged) + { + sd.CeilingChanged = true; + base.OnChangeTextureRotation(angle); + } + } + + // Return texture coordinates + protected override Point GetTextureOffset() { return new Point { X = (int)Sector.Sector.Fields.GetValue("xpanningceiling", 0.0f), Y = (int)Sector.Sector.Fields.GetValue("ypanningceiling", 0.0f) }; } + //mxd + public override void OnChangeTextureOffset(int horizontal, int vertical, bool doSurfaceAngleCorrection) + { + // Only do this when not done yet in this call + // Because we may be able to select the same 3D floor multiple times through multiple sectors + SectorData sd = mode.GetSectorData(level.sector); + if(!sd.CeilingChanged) + { + sd.CeilingChanged = true; + base.OnChangeTextureOffset(horizontal, vertical, doSurfaceAngleCorrection); + } + } + // Move texture coordinates - protected override void MoveTextureOffset(Point xy) + protected override void MoveTextureOffset(int offsetx, int offsety) { //mxd Sector s = GetControlSector(); @@ -258,8 +313,8 @@ namespace CodeImp.DoomBuilder.BuilderModes if (!alignment.IsFlagSet("8192")) alignment.SetFlag("8192", true); - alignment.Front.OffsetX += xy.X; - alignment.Front.OffsetY += xy.Y; + alignment.Front.OffsetX += offsetx; + alignment.Front.OffsetY += offsety; float rotation = General.ClampAngle(90f - alignment.Angle * Angle2D.PIDEG); float rotationrad = rotation / Angle2D.PIDEG; @@ -281,8 +336,8 @@ namespace CodeImp.DoomBuilder.BuilderModes } else { - float nx = (s.Fields.GetValue("xpanningceiling", 0.0f) + xy.X) % (Texture.ScaledWidth / s.Fields.GetValue("xscaleceiling", 1.0f)); - float ny = (s.Fields.GetValue("ypanningceiling", 0.0f) + xy.Y) % (Texture.ScaledHeight / s.Fields.GetValue("yscaleceiling", 1.0f)); + float nx = (s.Fields.GetValue("xpanningceiling", 0.0f) + offsetx) % (Texture.ScaledWidth / s.Fields.GetValue("xscaleceiling", 1.0f)); + float ny = (s.Fields.GetValue("ypanningceiling", 0.0f) + offsety) % (Texture.ScaledHeight / s.Fields.GetValue("yscaleceiling", 1.0f)); s.Fields["xpanningceiling"] = new UniValue(UniversalType.Float, nx); s.Fields["ypanningceiling"] = new UniValue(UniversalType.Float, ny); s.UpdateNeeded = true; @@ -294,6 +349,7 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Texture scale change protected override void ChangeTextureScale(int incrementX, int incrementY) { + if(Texture == null || !Texture.IsImageLoaded) return; Sector s = GetControlSector(); float scaleX = s.Fields.GetValue("xscaleceiling", 1.0f); float scaleY = s.Fields.GetValue("yscaleceiling", 1.0f); @@ -316,17 +372,6 @@ namespace CodeImp.DoomBuilder.BuilderModes UniFields.SetFloat(s.Fields, "yscaleceiling", scaleY, 1.0f); } - //update geometry - OnTextureChanged(); - - s.UpdateNeeded = true; - s.UpdateCache(); - if(s.Index != Sector.Sector.Index) - { - Sector.Sector.UpdateNeeded = true; - Sector.Sector.UpdateCache(); - } - mode.SetActionResult("Ceiling scale changed to " + scaleX.ToString("F03", CultureInfo.InvariantCulture) + ", " + scaleY.ToString("F03", CultureInfo.InvariantCulture) + " (" + (int)Math.Round(Texture.Width / scaleX) + " x " + (int)Math.Round(Texture.Height / scaleY) + ")."); } @@ -374,8 +419,12 @@ namespace CodeImp.DoomBuilder.BuilderModes SetTexture(BuilderPlug.Me.CopiedFlat); - //mxd. 3D floors may need updating... - OnTextureChanged(); + // Update + if(mode.VisualSectorExists(level.sector)) + { + BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(level.sector); + vs.UpdateSectorGeometry(false); + } } } @@ -428,14 +477,14 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd private void ChangeVertexHeight(int amount) { - List<Vertex> verts = new List<Vertex>(3); + HashSet<Vertex> verts = new HashSet<Vertex>(); - //do this only if all 3 verts have offsets + // Do this only if all 3 verts have offsets foreach(Sidedef side in level.sector.Sidedefs) { if(float.IsNaN(side.Line.Start.ZCeiling) || float.IsNaN(side.Line.End.ZCeiling)) return; - if(!verts.Contains(side.Line.Start)) verts.Add(side.Line.Start); - if(!verts.Contains(side.Line.End)) verts.Add(side.Line.End); + verts.Add(side.Line.Start); + verts.Add(side.Line.End); } foreach(Vertex v in verts) @@ -531,11 +580,11 @@ namespace CodeImp.DoomBuilder.BuilderModes Sidedef sd = MapSet.NearestSidedef(Sector.Sector.Sidedefs, pickintersect); float side = sd.Line.SideOfLine(pickintersect); - //mxd. Alpha based picking. Used only on extrafloors with transparent or masked textures - if ((side <= 0.0f && sd.IsFront) || (side > 0.0f && !sd.IsFront)) - { - if (!Texture.IsImageLoaded || extrafloor == null || RenderPass == RenderPass.Solid || (!Texture.IsTranslucent && !Texture.IsMasked)) - return true; + //mxd. Alpha based picking. Used only on extrafloors with transparent or masked textures + if((side <= 0.0f && sd.IsFront) || (side > 0.0f && !sd.IsFront)) + { + if(!BuilderPlug.Me.AlphaBasedTextureHighlighting || !Texture.IsImageLoaded || extrafloor == null || RenderPass == RenderPass.Solid || (!Texture.IsTranslucent && !Texture.IsMasked)) + return true; // Fetch ZDoom fields float rotate = Angle2D.DegToRad(level.sector.Fields.GetValue("rotationceiling", 0.0f)); @@ -575,20 +624,8 @@ namespace CodeImp.DoomBuilder.BuilderModes // This changes the texture protected override void SetTexture(string texturename) { - //mxd. Glow effect may require SectorData and geometry update - bool prevtextureglows = General.Map.Data.GlowingFlats.ContainsKey(Sector.Sector.LongCeilTexture); - // Set new texture level.sector.SetCeilTexture(texturename); - - //mxd. Glow effect may require SectorData and geometry update - if(prevtextureglows - && !General.Map.Data.GlowingFlats.ContainsKey(Sector.Sector.LongCeilTexture) - && mode.VisualSectorExists(level.sector)) - { - ((BaseVisualSector)mode.GetVisualSector(level.sector)).Changed = true; - } - General.Map.Data.UpdateUsedTextures(); } @@ -616,14 +653,14 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(side.Other != null && side.Other.Sector != Sector.Sector && !neighbours.Contains(side.Other.Sector)) { - BaseVisualSector vs = mode.GetVisualSector(side.Other.Sector) as BaseVisualSector; + BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(side.Other.Sector); if(vs == null) continue; // When current ceiling is part of a 3d floor, it looks like a floor, so we need to select adjacent floors if(level.sector != Sector.Sector && !regularorvavoom) { - if((withSameTexture && side.Other.Sector.LongFloorTexture == level.sector.LongCeilTexture) || - (withSameHeight && side.Other.Sector.FloorHeight == level.sector.CeilHeight)) + if((!withSameTexture || side.Other.Sector.LongFloorTexture == level.sector.LongCeilTexture) && + (!withSameHeight || side.Other.Sector.FloorHeight == level.sector.CeilHeight)) { neighbours.Add(side.Other.Sector); @@ -635,8 +672,8 @@ namespace CodeImp.DoomBuilder.BuilderModes else // Regular ceiling or vavoom-type extra ceiling { // (De)select adjacent ceilings - if((withSameTexture && side.Other.Sector.LongCeilTexture == level.sector.LongCeilTexture) || - (withSameHeight && side.Other.Sector.CeilHeight == level.sector.CeilHeight)) + if((!withSameTexture || side.Other.Sector.LongCeilTexture == level.sector.LongCeilTexture) && + (!withSameHeight || side.Other.Sector.CeilHeight == level.sector.CeilHeight)) { neighbours.Add(side.Other.Sector); @@ -650,8 +687,8 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(VisualCeiling ec in vs.ExtraCeilings) { if(select == ec.Selected || ec.extrafloor.VavoomType != regularorvavoom) continue; - if((withSameTexture && level.sector.LongCeilTexture == ec.level.sector.LongCeilTexture) || - (withSameHeight && level.sector.CeilHeight == ec.level.sector.CeilHeight)) + if((!withSameTexture || level.sector.LongCeilTexture == ec.level.sector.LongCeilTexture) && + (!withSameHeight || level.sector.CeilHeight == ec.level.sector.CeilHeight)) { ec.SelectNeighbours(select, withSameTexture, withSameHeight); } @@ -661,8 +698,8 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(VisualFloor ef in vs.ExtraFloors) { if(select == ef.Selected || ef.ExtraFloor.VavoomType == regularorvavoom) continue; - if((withSameTexture && level.sector.LongCeilTexture == ef.Level.sector.LongFloorTexture) || - (withSameHeight && level.sector.CeilHeight == ef.Level.sector.FloorHeight)) + if((!withSameTexture || level.sector.LongCeilTexture == ef.Level.sector.LongFloorTexture) && + (!withSameHeight || level.sector.CeilHeight == ef.Level.sector.FloorHeight)) { ef.SelectNeighbours(select, withSameTexture, withSameHeight); } diff --git a/Source/Plugins/BuilderModes/VisualModes/VisualFloor.cs b/Source/Plugins/BuilderModes/VisualModes/VisualFloor.cs index c0125c0d7838dd31e3072586fcfa3dd971684e30..81ec35b0b45c955a86daaa389856cb1c78146729 100644 --- a/Source/Plugins/BuilderModes/VisualModes/VisualFloor.cs +++ b/Source/Plugins/BuilderModes/VisualModes/VisualFloor.cs @@ -93,10 +93,9 @@ namespace CodeImp.DoomBuilder.BuilderModes base.Texture = General.Map.Data.UnknownTexture3D; setuponloadedtexture = s.LongFloorTexture; } - else + else if(!base.Texture.IsImageLoaded) { - if(!base.Texture.IsImageLoaded) - setuponloadedtexture = s.LongFloorTexture; + setuponloadedtexture = s.LongFloorTexture; } } else @@ -228,6 +227,32 @@ namespace CodeImp.DoomBuilder.BuilderModes #region ================== Methods + //mxd + public override void OnChangeScale(int incrementX, int incrementY) + { + // Only do this when not done yet in this call + // Because we may be able to select the same 3D floor multiple times through multiple sectors + SectorData sd = mode.GetSectorData(level.sector); + if(!sd.FloorChanged) + { + sd.FloorChanged = true; + base.OnChangeScale(incrementX, incrementY); + } + } + + //mxd + public override void OnChangeTextureRotation(float angle) + { + // Only do this when not done yet in this call + // Because we may be able to select the same 3D floor multiple times through multiple sectors + SectorData sd = mode.GetSectorData(level.sector); + if(!sd.FloorChanged) + { + sd.FloorChanged = true; + base.OnChangeTextureRotation(angle); + } + } + // Return texture coordinates protected override Point GetTextureOffset() { @@ -235,8 +260,21 @@ namespace CodeImp.DoomBuilder.BuilderModes Y = (int)Sector.Sector.Fields.GetValue("ypanningfloor", 0.0f) }; } + //mxd + public override void OnChangeTextureOffset(int horizontal, int vertical, bool doSurfaceAngleCorrection) + { + // Only do this when not done yet in this call + // Because we may be able to select the same 3D floor multiple times through multiple sectors + SectorData sd = mode.GetSectorData(level.sector); + if(!sd.FloorChanged) + { + sd.FloorChanged = true; + base.OnChangeTextureOffset(horizontal, vertical, doSurfaceAngleCorrection); + } + } + // Move texture coordinates - protected override void MoveTextureOffset(Point xy) + protected override void MoveTextureOffset(int offsetx, int offsety) { //mxd Sector s = GetControlSector(); @@ -259,8 +297,8 @@ namespace CodeImp.DoomBuilder.BuilderModes if (!alignment.IsFlagSet("8192")) alignment.SetFlag("8192", true); - alignment.Front.OffsetX += xy.X; - alignment.Front.OffsetY += xy.Y; + alignment.Front.OffsetX += offsetx; + alignment.Front.OffsetY += offsety; float rotation = General.ClampAngle(90f - alignment.Angle * Angle2D.PIDEG); float rotationrad = rotation / Angle2D.PIDEG; @@ -280,8 +318,8 @@ namespace CodeImp.DoomBuilder.BuilderModes } else { - float nx = (s.Fields.GetValue("xpanningfloor", 0.0f) + xy.X) % (Texture.ScaledWidth / s.Fields.GetValue("xscalefloor", 1.0f)); - float ny = (s.Fields.GetValue("ypanningfloor", 0.0f) + xy.Y) % (Texture.ScaledHeight / s.Fields.GetValue("yscalefloor", 1.0f)); + float nx = (s.Fields.GetValue("xpanningfloor", 0.0f) + offsetx) % (Texture.ScaledWidth / s.Fields.GetValue("xscalefloor", 1.0f)); + float ny = (s.Fields.GetValue("ypanningfloor", 0.0f) + offsety) % (Texture.ScaledHeight / s.Fields.GetValue("yscalefloor", 1.0f)); s.Fields["xpanningfloor"] = new UniValue(UniversalType.Float, nx); s.Fields["ypanningfloor"] = new UniValue(UniversalType.Float, ny); s.UpdateNeeded = true; @@ -293,6 +331,7 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Texture scale change protected override void ChangeTextureScale(int incrementX, int incrementY) { + if(Texture == null || !Texture.IsImageLoaded) return; Sector s = GetControlSector(); float scaleX = s.Fields.GetValue("xscalefloor", 1.0f); float scaleY = s.Fields.GetValue("yscalefloor", 1.0f); @@ -315,17 +354,6 @@ namespace CodeImp.DoomBuilder.BuilderModes UniFields.SetFloat(s.Fields, "yscalefloor", scaleY, 1.0f); } - //update geometry - OnTextureChanged(); - - s.UpdateNeeded = true; - s.UpdateCache(); - if(s.Index != Sector.Sector.Index) - { - Sector.Sector.UpdateNeeded = true; - Sector.Sector.UpdateCache(); - } - mode.SetActionResult("Floor scale changed to " + scaleX.ToString("F03", CultureInfo.InvariantCulture) + ", " + scaleY.ToString("F03", CultureInfo.InvariantCulture) + " (" + (int)Math.Round(Texture.Width / scaleX) + " x " + (int)Math.Round(Texture.Height / scaleY) + ")."); } @@ -373,8 +401,12 @@ namespace CodeImp.DoomBuilder.BuilderModes SetTexture(BuilderPlug.Me.CopiedFlat); - //mxd. 3D floors may need updating... - OnTextureChanged(); + // Update + if(mode.VisualSectorExists(level.sector)) + { + BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(level.sector); + vs.UpdateSectorGeometry(false); + } } } @@ -427,14 +459,14 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd private void ChangeVertexHeight(int amount) { - List<Vertex> verts = new List<Vertex>(3); + HashSet<Vertex> verts = new HashSet<Vertex>(); - //do this only if all 3 verts have offsets + // Do this only if all 3 verts have offsets foreach(Sidedef side in level.sector.Sidedefs) { if(float.IsNaN(side.Line.Start.ZFloor) || float.IsNaN(side.Line.End.ZFloor)) return; - if(!verts.Contains(side.Line.Start)) verts.Add(side.Line.Start); - if(!verts.Contains(side.Line.End)) verts.Add(side.Line.End); + verts.Add(side.Line.Start); + verts.Add(side.Line.End); } foreach(Vertex v in verts) @@ -502,11 +534,11 @@ namespace CodeImp.DoomBuilder.BuilderModes Sidedef sd = MapSet.NearestSidedef(Sector.Sector.Sidedefs, pickintersect); float side = sd.Line.SideOfLine(pickintersect); - //mxd. Alpha based picking. Used only on extrafloors with transparent or masked textures - if ((side <= 0.0f && sd.IsFront) || (side > 0.0f && !sd.IsFront)) - { - if (!Texture.IsImageLoaded || extrafloor == null || RenderPass == RenderPass.Solid || (!Texture.IsTranslucent && !Texture.IsMasked)) - return true; + //mxd. Alpha based picking. Used only on extrafloors with transparent or masked textures + if((side <= 0.0f && sd.IsFront) || (side > 0.0f && !sd.IsFront)) + { + if(!BuilderPlug.Me.AlphaBasedTextureHighlighting || !Texture.IsImageLoaded || extrafloor == null || RenderPass == RenderPass.Solid || (!Texture.IsTranslucent && !Texture.IsMasked)) + return true; // Fetch ZDoom fields float rotate = Angle2D.DegToRad(level.sector.Fields.GetValue("rotationfloor", 0.0f)); @@ -546,20 +578,8 @@ namespace CodeImp.DoomBuilder.BuilderModes // This changes the texture protected override void SetTexture(string texturename) { - //mxd. Glow effect may require SectorData and geometry update - bool prevtextureglows = General.Map.Data.GlowingFlats.ContainsKey(Sector.Sector.LongFloorTexture); - // Set new texture level.sector.SetFloorTexture(texturename); - - //mxd. Glow effect may require SectorData and geometry update - if(prevtextureglows - && !General.Map.Data.GlowingFlats.ContainsKey(Sector.Sector.LongFloorTexture) - && mode.VisualSectorExists(level.sector)) - { - ((BaseVisualSector)mode.GetVisualSector(level.sector)).Changed = true; - } - General.Map.Data.UpdateUsedTextures(); } @@ -587,14 +607,14 @@ namespace CodeImp.DoomBuilder.BuilderModes { if(side.Other != null && side.Other.Sector != Sector.Sector && !neighbours.Contains(side.Other.Sector)) { - BaseVisualSector vs = mode.GetVisualSector(side.Other.Sector) as BaseVisualSector; + BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(side.Other.Sector); if(vs == null) continue; // When current floor is part of a 3d floor, it looks like a ceiling, so we need to select adjacent ceilings if(level.sector != Sector.Sector && !regularorvavoom) { - if((withSameTexture && side.Other.Sector.LongCeilTexture == level.sector.LongFloorTexture) || - (withSameHeight && side.Other.Sector.CeilHeight == level.sector.FloorHeight)) + if((!withSameTexture || side.Other.Sector.LongCeilTexture == level.sector.LongFloorTexture) && + (!withSameHeight || side.Other.Sector.CeilHeight == level.sector.FloorHeight)) { neighbours.Add(side.Other.Sector); @@ -606,8 +626,8 @@ namespace CodeImp.DoomBuilder.BuilderModes else // Regular floor or vavoom-type extrafloor { // (De)select adjacent floor - if((withSameTexture && side.Other.Sector.LongFloorTexture == level.sector.LongFloorTexture) || - (withSameHeight && side.Other.Sector.FloorHeight == level.sector.FloorHeight)) + if((!withSameTexture || side.Other.Sector.LongFloorTexture == level.sector.LongFloorTexture) && + (!withSameHeight || side.Other.Sector.FloorHeight == level.sector.FloorHeight)) { neighbours.Add(side.Other.Sector); @@ -621,8 +641,8 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(VisualFloor ef in vs.ExtraFloors) { if(select == ef.Selected || ef.extrafloor.VavoomType != regularorvavoom) continue; - if((withSameTexture && level.sector.LongFloorTexture == ef.level.sector.LongFloorTexture) || - (withSameHeight && level.sector.FloorHeight == ef.level.sector.FloorHeight)) + if((!withSameTexture || level.sector.LongFloorTexture == ef.level.sector.LongFloorTexture) && + (!withSameHeight || level.sector.FloorHeight == ef.level.sector.FloorHeight)) { ef.SelectNeighbours(select, withSameTexture, withSameHeight); } @@ -632,8 +652,8 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach(VisualCeiling ec in vs.ExtraCeilings) { if(select == ec.Selected || ec.ExtraFloor.VavoomType == regularorvavoom) continue; - if((withSameTexture && level.sector.LongFloorTexture == ec.Level.sector.LongCeilTexture) || - (withSameHeight && level.sector.FloorHeight == ec.Level.sector.CeilHeight)) + if((!withSameTexture || level.sector.LongFloorTexture == ec.Level.sector.LongCeilTexture) && + (!withSameHeight || level.sector.FloorHeight == ec.Level.sector.CeilHeight)) { ec.SelectNeighbours(select, withSameTexture, withSameHeight); } @@ -669,8 +689,9 @@ namespace CodeImp.DoomBuilder.BuilderModes slopeSource = side.Line; isFront = true; break; - } - else if(side.Line.Args[0] == 2 && side.Line.Back != null && side.Line.Back == side) + } + + if(side.Line.Args[0] == 2 && side.Line.Back != null && side.Line.Back == side) { slopeSource = side.Line; break; diff --git a/Source/Plugins/BuilderModes/VisualModes/VisualFogBoundary.cs b/Source/Plugins/BuilderModes/VisualModes/VisualFogBoundary.cs index 297506ff41bdf663b06c531592b6de05808cdebe..9d1325ee2cf8bfbeaf8d608e3059c88e6c26ea26 100644 --- a/Source/Plugins/BuilderModes/VisualModes/VisualFogBoundary.cs +++ b/Source/Plugins/BuilderModes/VisualModes/VisualFogBoundary.cs @@ -151,7 +151,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Unused protected override void SetTextureOffsetX(int x) { } protected override void SetTextureOffsetY(int y) { } - protected override void MoveTextureOffset(Point xy) { } + protected override void MoveTextureOffset(int offsetx, int offsety) { } protected override Point GetTextureOffset() { return Point.Empty; } #endregion diff --git a/Source/Plugins/BuilderModes/VisualModes/VisualLower.cs b/Source/Plugins/BuilderModes/VisualModes/VisualLower.cs index 63f841778b2218a3bb36810005d6af9906c3a701..05a8a8a6edfda6427137886b35c6eccc26f48367 100644 --- a/Source/Plugins/BuilderModes/VisualModes/VisualLower.cs +++ b/Source/Plugins/BuilderModes/VisualModes/VisualLower.cs @@ -299,15 +299,16 @@ namespace CodeImp.DoomBuilder.BuilderModes Sidedef.Fields["offsety_bottom"] = new UniValue(UniversalType.Float, (float)y); } - protected override void MoveTextureOffset(Point xy) + protected override void MoveTextureOffset(int offsetx, int offsety) { Sidedef.Fields.BeforeFieldsChange(); float oldx = Sidedef.Fields.GetValue("offsetx_bottom", 0.0f); float oldy = Sidedef.Fields.GetValue("offsety_bottom", 0.0f); float scalex = Sidedef.Fields.GetValue("scalex_bottom", 1.0f); float scaley = Sidedef.Fields.GetValue("scaley_bottom", 1.0f); - Sidedef.Fields["offsetx_bottom"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldx, xy.X, scalex, Texture != null ? Texture.Width : -1)); //mxd - Sidedef.Fields["offsety_bottom"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldy, xy.Y, scaley, Texture != null ? Texture.Height : -1)); //mxd + bool textureloaded = (Texture != null && Texture.IsImageLoaded); //mxd + Sidedef.Fields["offsetx_bottom"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldx, offsetx, scalex, textureloaded ? Texture.Width : -1)); //mxd + Sidedef.Fields["offsety_bottom"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldy, offsety, scaley, textureloaded ? Texture.Height : -1)); //mxd } protected override Point GetTextureOffset() diff --git a/Source/Plugins/BuilderModes/VisualModes/VisualMiddle3D.cs b/Source/Plugins/BuilderModes/VisualModes/VisualMiddle3D.cs index 742ee4d10461c916d23626a6b2e59f241798309e..3c5b052902e962d26bc2499fb75a055b136ed56c 100644 --- a/Source/Plugins/BuilderModes/VisualModes/VisualMiddle3D.cs +++ b/Source/Plugins/BuilderModes/VisualModes/VisualMiddle3D.cs @@ -19,6 +19,7 @@ using System; using System.Collections.Generic; using System.Drawing; +using System.Globalization; using CodeImp.DoomBuilder.Map; using CodeImp.DoomBuilder.Geometry; using CodeImp.DoomBuilder.Rendering; @@ -30,7 +31,7 @@ using CodeImp.DoomBuilder.Data; namespace CodeImp.DoomBuilder.BuilderModes { - internal sealed class VisualMiddle3D : BaseVisualGeometrySidedef + internal class VisualMiddle3D : BaseVisualGeometrySidedef { #region ================== Constants @@ -38,7 +39,7 @@ namespace CodeImp.DoomBuilder.BuilderModes #region ================== Variables - private Effect3DFloor extrafloor; + protected Effect3DFloor extrafloor; #endregion @@ -99,36 +100,35 @@ namespace CodeImp.DoomBuilder.BuilderModes SectorData sd = mode.GetSectorData(Sidedef.Sector); //mxd. which texture we must use? - long textureLong = 0; + long texturelong = 0; if((sourceside.Line.Args[2] & (int)Effect3DFloor.Flags.UseUpperTexture) != 0) { if(Sidedef.LongHighTexture != MapSet.EmptyLongName) - textureLong = Sidedef.LongHighTexture; + texturelong = Sidedef.LongHighTexture; } else if((sourceside.Line.Args[2] & (int)Effect3DFloor.Flags.UseLowerTexture) != 0) { if(Sidedef.LongLowTexture != MapSet.EmptyLongName) - textureLong = Sidedef.LongLowTexture; + texturelong = Sidedef.LongLowTexture; } else if(sourceside.LongMiddleTexture != MapSet.EmptyLongName) { - textureLong = sourceside.LongMiddleTexture; + texturelong = sourceside.LongMiddleTexture; } // Texture given? - if(textureLong != 0) + if(texturelong != 0) { // Load texture - base.Texture = General.Map.Data.GetTextureImage(textureLong); + base.Texture = General.Map.Data.GetTextureImage(texturelong); if(base.Texture == null || base.Texture is UnknownImage) { base.Texture = General.Map.Data.UnknownTexture3D; - setuponloadedtexture = textureLong; + setuponloadedtexture = texturelong; } - else + else if(!base.Texture.IsImageLoaded) { - if(!base.Texture.IsImageLoaded) - setuponloadedtexture = textureLong; + setuponloadedtexture = texturelong; } } else @@ -270,6 +270,10 @@ namespace CodeImp.DoomBuilder.BuilderModes if(translucent && !othertranslucent && !ef.ClipSidedefs) continue; if(ef.ClipSidedefs == extrafloor.ClipSidedefs || ef.ClipSidedefs) { + //TODO: find out why ef can be not updated at this point + //TODO: [this crashed on me once when performing auto-align on myriad of textures on BoA C1M0] + if(ef.Floor == null || ef.Ceiling == null) ef.Update(); + int num = polygons.Count; for(int pi = 0; pi < num; pi++) { @@ -378,10 +382,10 @@ namespace CodeImp.DoomBuilder.BuilderModes return base.PickFastReject(from, to, dir); } - //mxd. Alpha based picking - public override bool PickAccurate(Vector3D from, Vector3D to, Vector3D dir, ref float u_ray) - { - if (!Texture.IsImageLoaded || (!Texture.IsTranslucent && !Texture.IsMasked)) return base.PickAccurate(from, to, dir, ref u_ray); + //mxd. Alpha based picking + public override bool PickAccurate(Vector3D from, Vector3D to, Vector3D dir, ref float u_ray) + { + if(!BuilderPlug.Me.AlphaBasedTextureHighlighting || !Texture.IsImageLoaded || (!Texture.IsTranslucent && !Texture.IsMasked)) return base.PickAccurate(from, to, dir, ref u_ray); float u; Sidedef sourceside = extrafloor.Linedef.Front; @@ -431,14 +435,8 @@ namespace CodeImp.DoomBuilder.BuilderModes extrafloor.Linedef.Front.SetTextureMid(texturename); General.Map.Data.UpdateUsedTextures(); - this.Sector.Rebuild(); - - //mxd. Other sector also may require updating - SectorData sd = mode.GetSectorData(Sidedef.Other.Sector); - if(sd.ExtraFloors.Count > 0) - ((BaseVisualSector)mode.GetVisualSector(Sidedef.Other.Sector)).Rebuild(); - //mxd. As well as model sector + //mxd. Update model sector mode.GetVisualSector(extrafloor.Linedef.Front.Sector).UpdateSectorGeometry(false); } @@ -454,13 +452,15 @@ namespace CodeImp.DoomBuilder.BuilderModes Sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, (float)y); } - protected override void MoveTextureOffset(Point xy) + protected override void MoveTextureOffset(int offsetx, int offsety) { Sidedef.Fields.BeforeFieldsChange(); float oldx = Sidedef.Fields.GetValue("offsetx_mid", 0.0f); float oldy = Sidedef.Fields.GetValue("offsety_mid", 0.0f); - Sidedef.Fields["offsetx_mid"] = new UniValue(UniversalType.Float, oldx + xy.X); - Sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, oldy + xy.Y); + float scalex = extrafloor.Linedef.Front.Fields.GetValue("scalex_mid", 1.0f); //mxd + float scaley = extrafloor.Linedef.Front.Fields.GetValue("scaley_mid", 1.0f); //mxd + Sidedef.Fields["offsetx_mid"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldx, offsetx, scalex, Texture.Width)); //mxd + Sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldy, offsety, scaley, Texture.Height)); //mxd } protected override Point GetTextureOffset() @@ -482,7 +482,78 @@ namespace CodeImp.DoomBuilder.BuilderModes if(!General.Map.UDMF) return; if(string.IsNullOrEmpty(extrafloor.Linedef.Front.MiddleTexture) || extrafloor.Linedef.Front.MiddleTexture == "-" || !Texture.IsImageLoaded) return; FitTexture(options); - Setup(); + + // Update the model sector to update all 3d floors + mode.GetVisualSector(extrafloor.Linedef.Front.Sector).UpdateSectorGeometry(false); + } + + //mxd. Only control sidedef scale is used by GZDoom + public override void OnChangeScale(int incrementX, int incrementY) + { + if(!General.Map.UDMF || Texture == null || !Texture.IsImageLoaded) return; + + if((General.Map.UndoRedo.NextUndo == null) || (General.Map.UndoRedo.NextUndo.TicketID != undoticket)) + undoticket = mode.CreateUndo("Change wall scale"); + + Sidedef target = extrafloor.Linedef.Front; + if(target == null) return; + + float scaleX = target.Fields.GetValue("scalex_mid", 1.0f); + float scaleY = target.Fields.GetValue("scaley_mid", 1.0f); + + target.Fields.BeforeFieldsChange(); + + if(incrementX != 0) + { + float pix = (int)Math.Round(Texture.Width * scaleX) - incrementX; + float newscaleX = (float)Math.Round(pix / Texture.Width, 3); + scaleX = (newscaleX == 0 ? scaleX * -1 : newscaleX); + UniFields.SetFloat(target.Fields, "scalex_mid", scaleX, 1.0f); + } + + if(incrementY != 0) + { + float pix = (int)Math.Round(Texture.Height * scaleY) - incrementY; + float newscaleY = (float)Math.Round(pix / Texture.Height, 3); + scaleY = (newscaleY == 0 ? scaleY * -1 : newscaleY); + UniFields.SetFloat(target.Fields, "scaley_mid", scaleY, 1.0f); + } + + // Update the model sector to update all 3d floors + mode.GetVisualSector(extrafloor.Linedef.Front.Sector).UpdateSectorGeometry(false); + + // Display result + mode.SetActionResult("Wall scale changed to " + scaleX.ToString("F03", CultureInfo.InvariantCulture) + ", " + scaleY.ToString("F03", CultureInfo.InvariantCulture) + " (" + (int)Math.Round(Texture.Width / scaleX) + " x " + (int)Math.Round(Texture.Height / scaleY) + ")."); + } + + //mxd + protected override void ResetTextureScale() + { + Sidedef target = extrafloor.Linedef.Front; + target.Fields.BeforeFieldsChange(); + if(target.Fields.ContainsKey("scalex_mid")) target.Fields.Remove("scalex_mid"); + if(target.Fields.ContainsKey("scaley_mid")) target.Fields.Remove("scaley_mid"); + } + + //mxd + public override void OnResetTextureOffset() + { + base.OnResetTextureOffset(); + + // Update the model sector to update all 3d floors + mode.GetVisualSector(extrafloor.Linedef.Front.Sector).UpdateSectorGeometry(false); + } + + //mxd + public override void OnResetLocalTextureOffset() + { + if(!General.Map.UDMF) + { + OnResetTextureOffset(); + return; + } + + base.OnResetLocalTextureOffset(); // Update the model sector to update all 3d floors mode.GetVisualSector(extrafloor.Linedef.Front.Sector).UpdateSectorGeometry(false); diff --git a/Source/Plugins/BuilderModes/VisualModes/VisualMiddleBack.cs b/Source/Plugins/BuilderModes/VisualModes/VisualMiddleBack.cs index d5e9113f7fd45068a377fa78ff378a720b0ea7ef..80035fb104dad2fde2fca0e5fdb065653850dd3c 100644 --- a/Source/Plugins/BuilderModes/VisualModes/VisualMiddleBack.cs +++ b/Source/Plugins/BuilderModes/VisualModes/VisualMiddleBack.cs @@ -1,12 +1,9 @@ #region ================== Namespaces -using System; using System.Collections.Generic; -using System.Drawing; using CodeImp.DoomBuilder.Map; using CodeImp.DoomBuilder.Geometry; using CodeImp.DoomBuilder.Rendering; -using CodeImp.DoomBuilder.Types; using CodeImp.DoomBuilder.VisualModes; using CodeImp.DoomBuilder.Data; @@ -15,31 +12,16 @@ using CodeImp.DoomBuilder.Data; namespace CodeImp.DoomBuilder.BuilderModes { //mxd. Used to render translucent 3D floor's inner sides - internal sealed class VisualMiddleBack : BaseVisualGeometrySidedef + internal sealed class VisualMiddleBack : VisualMiddle3D { - #region ================== Variables - - private Effect3DFloor extrafloor; - - #endregion - #region ================== Constructor / Setup // Constructor - public VisualMiddleBack(BaseVisualMode mode, VisualSector vs, Sidedef s) - : base(mode, vs, s) - { - //mxd - geometrytype = VisualGeometryType.WALL_MIDDLE; - partname = "mid"; - - // We have no destructor - GC.SuppressFinalize(this); - } + public VisualMiddleBack(BaseVisualMode mode, VisualSector vs, Sidedef s) : base(mode, vs, s) { } // This builds the geometry. Returns false when no geometry created. public override bool Setup() { return this.Setup(this.extrafloor); } - public bool Setup(Effect3DFloor extrafloor) + public new bool Setup(Effect3DFloor extrafloor) { Sidedef sourceside = extrafloor.Linedef.Front; this.extrafloor = extrafloor; @@ -77,35 +59,35 @@ namespace CodeImp.DoomBuilder.BuilderModes SectorData sd = mode.GetSectorData(Sidedef.Other.Sector); //mxd. which texture we must use? - long longtexture = 0; + long texturelong = 0; if((sourceside.Line.Args[2] & (int)Effect3DFloor.Flags.UseUpperTexture) != 0) { - if(Sidedef.Other.LongHighTexture != MapSet.EmptyLongName) - longtexture = Sidedef.Other.LongHighTexture; + if(Sidedef.LongHighTexture != MapSet.EmptyLongName) + texturelong = Sidedef.LongHighTexture; } else if((sourceside.Line.Args[2] & (int)Effect3DFloor.Flags.UseLowerTexture) != 0) { - if(Sidedef.Other.LongLowTexture != MapSet.EmptyLongName) - longtexture = Sidedef.Other.LongLowTexture; + if(Sidedef.LongLowTexture != MapSet.EmptyLongName) + texturelong = Sidedef.LongLowTexture; } - else if((sourceside.LongMiddleTexture != MapSet.EmptyLongName)) + else if(sourceside.LongMiddleTexture != MapSet.EmptyLongName) { - longtexture = sourceside.LongMiddleTexture; + texturelong = sourceside.LongMiddleTexture; } // Texture given? - if(longtexture != 0) + if(texturelong != 0) { // Load texture - base.Texture = General.Map.Data.GetTextureImage(longtexture); - if(base.Texture == null || base.Texture is UnknownImage) + base.Texture = General.Map.Data.GetTextureImage(texturelong); + if(base.Texture == null || base.Texture is UnknownImage) { base.Texture = General.Map.Data.UnknownTexture3D; - setuponloadedtexture = longtexture; + setuponloadedtexture = texturelong; } else if(!base.Texture.IsImageLoaded) { - setuponloadedtexture = longtexture; + setuponloadedtexture = texturelong; } } else @@ -180,8 +162,8 @@ namespace CodeImp.DoomBuilder.BuilderModes if(((cl - fl) > 0.01f) || ((cr - fr) > 0.01f)) { // Keep top and bottom planes for intersection testing - bottom = extrafloor.Ceiling.plane; top = extrafloor.Floor.plane; + bottom = extrafloor.Ceiling.plane; // Create initial polygon, which is just a quad between floor and ceiling WallPolygon poly = new WallPolygon(); @@ -190,7 +172,7 @@ namespace CodeImp.DoomBuilder.BuilderModes poly.Add(new Vector3D(vr.x, vr.y, cr)); poly.Add(new Vector3D(vr.x, vr.y, fr)); - // Determine initial color + // Determine initial color. Inside parts are shaded using control sector's brightness int lightlevel; PixelColor levelcolor; //mxd if(((sourceside.Line.Args[2] & (int)Effect3DFloor.Flags.DisableLighting) != 0)) @@ -227,6 +209,9 @@ namespace CodeImp.DoomBuilder.BuilderModes // or when only our extrafloor is translucent if (ef.ClipSidedefs == extrafloor.ClipSidedefs || ef.ClipSidedefs) { + //TODO: [this crashed on me once when performing auto-align on myriad of textures on BoA C1M0] + if(ef.Floor == null || ef.Ceiling == null) ef.Update(); + int num = polygons.Count; for(int pi = 0; pi < num; pi++) { @@ -304,89 +289,18 @@ namespace CodeImp.DoomBuilder.BuilderModes else return base.ChangeOffsetY(amount); } - protected override void UpdateAfterTextureOffsetChange() - { - if (General.Map.SRB2) - { - //Update all sidedefs in the sector, since the Y offset of the 3D floor may have changed. - foreach (Sidedef sd in Sidedef.Sector.Sidedefs) - { - VisualSidedefParts parts = Sector.GetSidedefParts(sd); - parts.SetupAllParts(); - } - } - else base.UpdateAfterTextureOffsetChange(); - } - - // Return texture name - public override string GetTextureName() - { - //mxd - if((extrafloor.Linedef.Args[2] & (int)Effect3DFloor.Flags.UseUpperTexture) != 0) - return Sidedef.HighTexture; - if((extrafloor.Linedef.Args[2] & (int)Effect3DFloor.Flags.UseLowerTexture) != 0) - return Sidedef.LowTexture; - return extrafloor.Linedef.Front.MiddleTexture; - } - - // This changes the texture - protected override void SetTexture(string texturename) - { - //mxd - if((extrafloor.Linedef.Args[2] & (int)Effect3DFloor.Flags.UseUpperTexture) != 0) - Sidedef.Other.SetTextureHigh(texturename); - if((extrafloor.Linedef.Args[2] & (int)Effect3DFloor.Flags.UseLowerTexture) != 0) - Sidedef.Other.SetTextureLow(texturename); - else - extrafloor.Linedef.Front.SetTextureMid(texturename); - - General.Map.Data.UpdateUsedTextures(); - this.Sector.Rebuild(); - - //mxd. Other sector also may require updating - ((BaseVisualSector)mode.GetVisualSector(Sidedef.Other.Sector)).Rebuild(); - - //mxd. As well as model sector - mode.GetVisualSector(extrafloor.Linedef.Front.Sector).UpdateSectorGeometry(false); - } - - protected override void SetTextureOffsetX(int x) + protected override void UpdateAfterTextureOffsetChange() { - Sidedef.Fields.BeforeFieldsChange(); - Sidedef.Fields["offsetx_mid"] = new UniValue(UniversalType.Float, (float)x); - } - - protected override void SetTextureOffsetY(int y) - { - Sidedef.Fields.BeforeFieldsChange(); - Sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, (float)y); - } - - protected override void MoveTextureOffset(Point xy) - { - Sidedef.Fields.BeforeFieldsChange(); - float oldx = Sidedef.Fields.GetValue("offsetx_mid", 0.0f); - float oldy = Sidedef.Fields.GetValue("offsety_mid", 0.0f); - float scalex = Sidedef.Fields.GetValue("scalex_mid", 1.0f); - float scaley = Sidedef.Fields.GetValue("scaley_mid", 1.0f); - Sidedef.Fields["offsetx_mid"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldx, xy.X, scalex, Texture != null ? Texture.Width : -1)); //mxd - - //mxd. Don't clamp offsetY of clipped mid textures - bool dontClamp = (Texture == null || Sidedef.IsFlagSet("clipmidtex") || Sidedef.Line.IsFlagSet("clipmidtex")); - Sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldy, xy.Y, scaley, dontClamp ? -1 : Texture.Height)); - } - - protected override Point GetTextureOffset() - { - float oldx = Sidedef.Fields.GetValue("offsetx_mid", 0.0f); - float oldy = Sidedef.Fields.GetValue("offsety_mid", 0.0f); - return new Point((int)oldx, (int)oldy); - } - - //mxd - public override Linedef GetControlLinedef() - { - return extrafloor.Linedef; + if (General.Map.SRB2) + { + //Update all sidedefs in the sector, since the Y offset of the 3D floor may have changed. + foreach (Sidedef sd in Sidedef.Sector.Sidedefs) + { + VisualSidedefParts parts = Sector.GetSidedefParts(sd); + parts.SetupAllParts(); + } + } + else base.UpdateAfterTextureOffsetChange(); } #endregion diff --git a/Source/Plugins/BuilderModes/VisualModes/VisualMiddleDouble.cs b/Source/Plugins/BuilderModes/VisualModes/VisualMiddleDouble.cs index 2fd568f813f0e57cf497dfa9dfb504d8bf8025c3..aacc32588d5f719baa43dc038b3c0deca9ec533d 100644 --- a/Source/Plugins/BuilderModes/VisualModes/VisualMiddleDouble.cs +++ b/Source/Plugins/BuilderModes/VisualModes/VisualMiddleDouble.cs @@ -399,7 +399,7 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Alpha based picking public override bool PickAccurate(Vector3D from, Vector3D to, Vector3D dir, ref float u_ray) { - if (!Texture.IsImageLoaded || (!Texture.IsTranslucent && !Texture.IsMasked)) return base.PickAccurate(from, to, dir, ref u_ray); + if(!BuilderPlug.Me.AlphaBasedTextureHighlighting || !Texture.IsImageLoaded || (!Texture.IsTranslucent && !Texture.IsMasked)) return base.PickAccurate(from, to, dir, ref u_ray); float u; new Line2D(from, to).GetIntersection(Sidedef.Line.Line, out u); @@ -464,18 +464,19 @@ namespace CodeImp.DoomBuilder.BuilderModes Sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, (float)y); } - protected override void MoveTextureOffset(Point xy) + protected override void MoveTextureOffset(int offsetx, int offsety) { Sidedef.Fields.BeforeFieldsChange(); float oldx = Sidedef.Fields.GetValue("offsetx_mid", 0.0f); float oldy = Sidedef.Fields.GetValue("offsety_mid", 0.0f); float scalex = Sidedef.Fields.GetValue("scalex_mid", 1.0f); float scaley = Sidedef.Fields.GetValue("scaley_mid", 1.0f); - Sidedef.Fields["offsetx_mid"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldx, xy.X, scalex, Texture != null ? Texture.Width : -1)); //mxd + bool textureloaded = (Texture != null && Texture.IsImageLoaded); //mxd + Sidedef.Fields["offsetx_mid"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldx, offsetx, scalex, textureloaded ? Texture.Width : -1)); //mxd //mxd. Don't clamp offsetY of clipped mid textures - bool dontClamp = (Texture == null || (!Sidedef.IsFlagSet("wrapmidtex") && !Sidedef.Line.IsFlagSet("wrapmidtex"))); - Sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldy, xy.Y, scaley, dontClamp ? -1 : Texture.Height)); + bool dontClamp = (!textureloaded || (!Sidedef.IsFlagSet("wrapmidtex") && !Sidedef.Line.IsFlagSet("wrapmidtex"))); + Sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldy, offsety, scaley, dontClamp ? -1 : Texture.Height)); } protected override Point GetTextureOffset() diff --git a/Source/Plugins/BuilderModes/VisualModes/VisualMiddleSingle.cs b/Source/Plugins/BuilderModes/VisualModes/VisualMiddleSingle.cs index 953734549db770c51bbf382eb7242198f20dfd49..4b614ce41831dc2306bfe7e743d00106ac55a66d 100644 --- a/Source/Plugins/BuilderModes/VisualModes/VisualMiddleSingle.cs +++ b/Source/Plugins/BuilderModes/VisualModes/VisualMiddleSingle.cs @@ -293,15 +293,15 @@ namespace CodeImp.DoomBuilder.BuilderModes Sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, (float)y); } - protected override void MoveTextureOffset(Point xy) + protected override void MoveTextureOffset(int offsetx, int offsety) { Sidedef.Fields.BeforeFieldsChange(); float oldx = Sidedef.Fields.GetValue("offsetx_mid", 0.0f); float oldy = Sidedef.Fields.GetValue("offsety_mid", 0.0f); float scalex = Sidedef.Fields.GetValue("scalex_mid", 1.0f); float scaley = Sidedef.Fields.GetValue("scaley_mid", 1.0f); - Sidedef.Fields["offsetx_mid"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldx, xy.X, scalex, Texture.Width)); //mxd - Sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldy, xy.Y, scaley, Texture.Height)); //mxd + Sidedef.Fields["offsetx_mid"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldx, offsetx, scalex, Texture.Width)); //mxd + Sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldy, offsety, scaley, Texture.Height)); //mxd } protected override Point GetTextureOffset() @@ -326,6 +326,10 @@ namespace CodeImp.DoomBuilder.BuilderModes if(string.IsNullOrEmpty(Sidedef.MiddleTexture) || Sidedef.MiddleTexture == "-" || !Texture.IsImageLoaded) return; FitTexture(options); Setup(); + + // Update linked effects + SectorData sd = mode.GetSectorDataEx(Sector.Sector); + if(sd != null) sd.Reset(true); } #endregion diff --git a/Source/Plugins/BuilderModes/VisualModes/VisualUpper.cs b/Source/Plugins/BuilderModes/VisualModes/VisualUpper.cs index a281d5f48cac29efbccb486a0145f9ca5e5c24ba..636b28cf99c71bf1715688f73d293e6282714ec1 100644 --- a/Source/Plugins/BuilderModes/VisualModes/VisualUpper.cs +++ b/Source/Plugins/BuilderModes/VisualModes/VisualUpper.cs @@ -294,15 +294,16 @@ namespace CodeImp.DoomBuilder.BuilderModes Sidedef.Fields["offsety_top"] = new UniValue(UniversalType.Float, (float)y); } - protected override void MoveTextureOffset(Point xy) + protected override void MoveTextureOffset(int offsetx, int offsety) { Sidedef.Fields.BeforeFieldsChange(); float oldx = Sidedef.Fields.GetValue("offsetx_top", 0.0f); float oldy = Sidedef.Fields.GetValue("offsety_top", 0.0f); float scalex = Sidedef.Fields.GetValue("scalex_top", 1.0f); float scaley = Sidedef.Fields.GetValue("scaley_top", 1.0f); - Sidedef.Fields["offsetx_top"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldx, xy.X, scalex, Texture != null ? Texture.Width : -1)); //mxd - Sidedef.Fields["offsety_top"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldy, xy.Y, scaley, Texture != null ? Texture.Height : -1)); //mxd + bool textureloaded = (Texture != null && Texture.IsImageLoaded); //mxd + Sidedef.Fields["offsetx_top"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldx, offsetx, scalex, textureloaded ? Texture.Width : -1)); //mxd + Sidedef.Fields["offsety_top"] = new UniValue(UniversalType.Float, GetRoundedTextureOffset(oldy, offsety, scaley, textureloaded ? Texture.Height : -1)); //mxd } protected override Point GetTextureOffset() diff --git a/Source/Plugins/ColorPicker/BuilderPlug.cs b/Source/Plugins/ColorPicker/BuilderPlug.cs index 0fa187edc95e9971e37a1ccb884000c98a38d506..ad547bfab3dcc2b47f5bf5f55716f35b2fc9e229 100644 --- a/Source/Plugins/ColorPicker/BuilderPlug.cs +++ b/Source/Plugins/ColorPicker/BuilderPlug.cs @@ -17,7 +17,7 @@ namespace CodeImp.DoomBuilder.ColorPicker private static BuilderPlug me; public static BuilderPlug Me { get { return me; } } - public override int MinimumRevision { get { return 1869; } } + public override int MinimumRevision { get { return 2500; } } public override string Name { get { return "Color Picker"; } } @@ -40,25 +40,25 @@ namespace CodeImp.DoomBuilder.ColorPicker public override void OnMapOpenEnd() { base.OnMapOpenEnd(); - toolsform.Register(); + if(!General.Map.DOOM) toolsform.Register(); } public override void OnMapNewEnd() { base.OnMapNewEnd(); - toolsform.Register(); + if(!General.Map.DOOM) toolsform.Register(); } public override void OnMapCloseEnd() { base.OnMapCloseEnd(); - toolsform.Unregister(); + if(!General.Map.DOOM) toolsform.Unregister(); } public override void OnReloadResources() { base.OnReloadResources(); - toolsform.Register(); + if(!General.Map.DOOM) toolsform.Register(); } public override void Dispose() @@ -80,7 +80,7 @@ namespace CodeImp.DoomBuilder.ColorPicker [BeginAction("togglelightpannel")] private void ToggleLightPannel() { - if(General.Editing.Mode == null) return; + if(General.Editing.Mode == null || General.Map.DOOM) return; string currentModeName = General.Editing.Mode.GetType().Name; //display one of colorPickers or tell the user why we can't do that diff --git a/Source/Plugins/ColorPicker/Windows/LightColorPicker.Designer.cs b/Source/Plugins/ColorPicker/Windows/LightColorPicker.Designer.cs index 953750e968554bdfa48e62b7752482a3fb71e505..ba17a1e2a4d3dd043382cdf14f122497fd365e6b 100644 --- a/Source/Plugins/ColorPicker/Windows/LightColorPicker.Designer.cs +++ b/Source/Plugins/ColorPicker/Windows/LightColorPicker.Designer.cs @@ -88,6 +88,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "LightColorPicker"; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; diff --git a/Source/Plugins/ColorPicker/Windows/SectorColorPicker.Designer.cs b/Source/Plugins/ColorPicker/Windows/SectorColorPicker.Designer.cs index 876991a50e37d64d516ecc7dabc3f6d7704a603c..8ec6830b071b673f5fe8f3c2034a7c55f85ed470 100644 --- a/Source/Plugins/ColorPicker/Windows/SectorColorPicker.Designer.cs +++ b/Source/Plugins/ColorPicker/Windows/SectorColorPicker.Designer.cs @@ -86,6 +86,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "SectorColorPicker"; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; diff --git a/Source/Plugins/CommentsPanel/Properties/AssemblyInfo.cs b/Source/Plugins/CommentsPanel/Properties/AssemblyInfo.cs index 4a1d9e2bead3d87656b1f0b9e5da8418d970b3ec..353100fecbbb72e6d7b531629943da14446d9ad4 100644 --- a/Source/Plugins/CommentsPanel/Properties/AssemblyInfo.cs +++ b/Source/Plugins/CommentsPanel/Properties/AssemblyInfo.cs @@ -1,5 +1,6 @@ using System.Reflection; using System.Runtime.InteropServices; +using System.Resources; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -32,3 +33,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: NeutralResourcesLanguageAttribute("en")] diff --git a/Source/Plugins/NodesViewer/BuilderPlug.cs b/Source/Plugins/NodesViewer/BuilderPlug.cs index ac70a22e738f9428e2ed125ec65f890f510fa33f..5baff071e3922983c91020adaa2d40f10a30cdf8 100644 --- a/Source/Plugins/NodesViewer/BuilderPlug.cs +++ b/Source/Plugins/NodesViewer/BuilderPlug.cs @@ -67,7 +67,7 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer #region ================== Methods // This returns a unique temp filename - public static string MakeTempFilename(string extension) + /*public static string MakeTempFilename(string extension) { string filename; const string chars = "abcdefghijklmnopqrstuvwxyz1234567890"; @@ -85,7 +85,7 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer // Return the filename return filename; - } + }*/ #endregion } diff --git a/Source/Plugins/NodesViewer/NodesForm.Designer.cs b/Source/Plugins/NodesViewer/NodesForm.Designer.cs index f52aaff056e433f722aa109a447a929be2ea8e7b..bd84b5db236ff85021f812323628d868984504d4 100644 --- a/Source/Plugins/NodesViewer/NodesForm.Designer.cs +++ b/Source/Plugins/NodesViewer/NodesForm.Designer.cs @@ -748,6 +748,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "NodesForm"; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; diff --git a/Source/Plugins/NodesViewer/NodesForm.cs b/Source/Plugins/NodesViewer/NodesForm.cs index 4b49d853b0a61e1277cfb83ed49489af1e302356..6b15ae43abb1835a12d175312f2f8a3e889b37bc 100644 --- a/Source/Plugins/NodesViewer/NodesForm.cs +++ b/Source/Plugins/NodesViewer/NodesForm.cs @@ -168,6 +168,7 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer NodesViewerMode newmode = new NodesViewerMode(); General.Editing.ChangeMode(newmode); newmode.Form.showsegsvertices.Checked = this.showsegsvertices.Checked; + newmode.Form.Location = this.Location; //mxd } #endregion diff --git a/Source/Plugins/NodesViewer/NodesForm.resx b/Source/Plugins/NodesViewer/NodesForm.resx index 6adf4366fed937a1f046823cba660fa6ce0d386d..c3e6df159b0bbd54d293353e522fd1e5c590e990 100644 --- a/Source/Plugins/NodesViewer/NodesForm.resx +++ b/Source/Plugins/NodesViewer/NodesForm.resx @@ -300,36 +300,6 @@ <metadata name="label12.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> - <metadata name="rightindex.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="rightarea.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="righttype.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="label15.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="rightbutton.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="leftindex.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="leftarea.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="lefttype.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="label7.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="leftbutton.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> <metadata name="closebutton.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> diff --git a/Source/Plugins/NodesViewer/NodesViewerMode.cs b/Source/Plugins/NodesViewer/NodesViewerMode.cs index 45f89e50737206e3ee1d103ce02ca1b1d8d5041a..6003e35d7d53bbfa41fa02c06c557bc4582fa55f 100644 --- a/Source/Plugins/NodesViewer/NodesViewerMode.cs +++ b/Source/Plugins/NodesViewer/NodesViewerMode.cs @@ -129,8 +129,6 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer nodes[i].leftsubsector = (leftindex & 0x8000) != 0; } nodesreader.Close(); - nodesstream.Close(); - nodesstream.Dispose(); // Add additional properties to nodes nodes[nodes.Length - 1].parent = -1; @@ -153,16 +151,14 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer segs = new Seg[numsegs]; for(int i = 0; i < segs.Length; i++) { - segs[i].startvertex = segsreader.ReadInt16(); - segs[i].endvertex = segsreader.ReadInt16(); - segs[i].angle = Angle2D.DoomToReal(segsreader.ReadInt16()); - segs[i].lineindex = segsreader.ReadInt16(); + segs[i].startvertex = segsreader.ReadUInt16(); + segs[i].endvertex = segsreader.ReadUInt16(); + segs[i].angle = Angle2D.DegToRad(General.ClampAngle(segsreader.ReadInt16() / 182 + 90)); //mxd 182 == 65536 / 360; + segs[i].lineindex = segsreader.ReadUInt16(); segs[i].leftside = segsreader.ReadInt16() != 0; segs[i].offset = segsreader.ReadInt16(); } segsreader.Close(); - segsstream.Close(); - segsstream.Dispose(); // Load the vertexes structure MemoryStream vertsstream = General.Map.GetLumpData("VERTEXES"); @@ -185,8 +181,6 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer verts[i].y = vertsreader.ReadInt16(); } vertsreader.Close(); - vertsstream.Close(); - vertsstream.Dispose(); // Load the subsectors structure MemoryStream ssecstream = General.Map.GetLumpData("SSECTORS"); @@ -209,8 +203,6 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer ssectors[i].firstseg = ssecreader.ReadUInt16(); } ssecreader.Close(); - ssecstream.Close(); - ssecstream.Dispose(); // Link all segs to their subsectors for(int i = 0; i < ssectors.Length; i++) @@ -228,176 +220,176 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer //mxd. This loads all data from the ZNODES lump private bool LoadZNodes() { - List<string> supportedFormats = new List<string> { "XNOD", "XGLN", "XGL2", "XGL3" }; - using(MemoryStream stream = General.Map.GetLumpData("ZNODES")) + List<string> supportedformats = new List<string> { "XNOD", "XGLN", "XGL2", "XGL3" }; + MemoryStream stream = General.Map.GetLumpData("ZNODES"); + + // Boilerplate... + if(stream.Length < 4) { - //boilerplate... - if(stream.Length < 4) + MessageBox.Show("ZNODES lump is empty.", "Nodes Viewer mode", MessageBoxButtons.OK, MessageBoxIcon.Error); + stream.Close(); + return false; + } + + using(BinaryReader reader = new BinaryReader(stream)) + { + // Read signature + nodesformat = new string(reader.ReadChars(4)); + if(!supportedformats.Contains(nodesformat)) { - MessageBox.Show("ZNODES lump is empty.", "Nodes Viewer mode", MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show("\"" + nodesformat + "\" node format is not supported.", "Nodes Viewer mode", MessageBoxButtons.OK, MessageBoxIcon.Error); return false; } - using(BinaryReader reader = new BinaryReader(stream)) - { - //read signature - nodesformat = new string(reader.ReadChars(4)); - if(!supportedFormats.Contains(nodesformat)) - { - MessageBox.Show("\"" + nodesformat + "\" node format is not supported.", "Nodes Viewer mode", MessageBoxButtons.OK, MessageBoxIcon.Error); - return false; - } + uint vertscount = reader.ReadUInt32(); + uint newvertscount = reader.ReadUInt32(); - uint vertsCount = reader.ReadUInt32(); - uint newVertsCount = reader.ReadUInt32(); + // Boilerplate... + if(vertscount != General.Map.Map.Vertices.Count) + { + MessageBox.Show("Error while reading ZNODES: vertices count in ZNODES lump (" + vertscount + ") doesn't match with map's vertices count (" + General.Map.Map.Vertices.Count + ")!", "Nodes Viewer mode", MessageBoxButtons.OK, MessageBoxIcon.Error); + return false; + } - //boilerplate... - if(vertsCount != General.Map.Map.Vertices.Count) - { - MessageBox.Show("Error while reading ZNODES: vertices count in ZNODES lump (" + vertsCount + ") doesn't match with map's vertices count (" + General.Map.Map.Vertices.Count + ")!", "Nodes Viewer mode", MessageBoxButtons.OK, MessageBoxIcon.Error); - return false; - } + // Add map vertices + verts = new Vector2D[vertscount + newvertscount]; + int counter = 0; + foreach(Vertex v in General.Map.Map.Vertices) verts[counter++] = v.Position; - //add map vertices - verts = new Vector2D[vertsCount + newVertsCount]; - int counter = 0; - foreach(Vertex v in General.Map.Map.Vertices) verts[counter++] = v.Position; + // Read extra vertices + for(int i = counter; i < counter + newvertscount; i++) + { + verts[i].x = reader.ReadInt32() / 65536.0f; + verts[i].y = reader.ReadInt32() / 65536.0f; + } - //read extra vertices - for(int i = counter; i < counter + newVertsCount; i++) - { - verts[i].x = reader.ReadInt32() / 65536.0f; - verts[i].y = reader.ReadInt32() / 65536.0f; - } + // Read subsectors + uint sseccount = reader.ReadUInt32(); + ssectors = new Subsector[sseccount]; - //read subsectors - uint ssecCount = reader.ReadUInt32(); - ssectors = new Subsector[ssecCount]; + int firstseg = 0; + for(int i = 0; i < ssectors.Length; i++) + { + ssectors[i].numsegs = (int)reader.ReadUInt32(); + ssectors[i].firstseg = firstseg; + firstseg += ssectors[i].numsegs; + } - int firstseg = 0; - for(int i = 0; i < ssectors.Length; i++) - { - ssectors[i].numsegs = (int)reader.ReadUInt32(); - ssectors[i].firstseg = firstseg; - firstseg += ssectors[i].numsegs; - } + // Read segments. Offset and angle are unused anyway + uint segscount = reader.ReadUInt32(); + segs = new Seg[segscount]; - //read segments. offset and angle are unused anyway - uint segsCount = reader.ReadUInt32(); - segs = new Seg[segsCount]; + switch(nodesformat) + { + case "XGLN": + for(int i = 0; i < segs.Length; i++) + { + segs[i].startvertex = (int)reader.ReadUInt32(); + reader.BaseStream.Position += 4; //skip partner + segs[i].lineindex = reader.ReadUInt16(); + segs[i].leftside = reader.ReadBoolean(); + } + break; - switch(nodesformat) - { - case "XGLN": - for(int i = 0; i < segs.Length; i++) - { - segs[i].startvertex = (int)reader.ReadUInt32(); - reader.BaseStream.Position += 4; //skip partner - segs[i].lineindex = reader.ReadUInt16(); - segs[i].leftside = reader.ReadBoolean(); - } - break; - - case "XGL3": - case "XGL2": - for(int i = 0; i < segs.Length; i++) - { - segs[i].startvertex = (int)reader.ReadUInt32(); - reader.BaseStream.Position += 4; //skip partner - uint lineindex = reader.ReadUInt32(); - segs[i].lineindex = (lineindex == 0xFFFFFFFF ? -1 : (int)lineindex); - segs[i].leftside = reader.ReadBoolean(); - } - break; - - case "XNOD": - for(int i = 0; i < segs.Length; i++) - { - segs[i].startvertex = (int)reader.ReadUInt32(); - segs[i].endvertex = (int)reader.ReadUInt32(); - segs[i].lineindex = reader.ReadUInt16(); - segs[i].leftside = reader.ReadBoolean(); - } - break; - } + case "XGL3": + case "XGL2": + for(int i = 0; i < segs.Length; i++) + { + segs[i].startvertex = (int)reader.ReadUInt32(); + reader.BaseStream.Position += 4; //skip partner + uint lineindex = reader.ReadUInt32(); + segs[i].lineindex = (lineindex == 0xFFFFFFFF ? -1 : (int)lineindex); + segs[i].leftside = reader.ReadBoolean(); + } + break; - //set second vertex, angle and reverse segs order - if(nodesformat == "XGLN" || nodesformat == "XGL2" || nodesformat == "XGL3") - { - int index = 0; - foreach(Subsector ss in ssectors) + case "XNOD": + for(int i = 0; i < segs.Length; i++) { - //set the last vert - int lastseg = ss.firstseg + ss.numsegs - 1; - segs[lastseg].endvertex = segs[ss.firstseg].startvertex; + segs[i].startvertex = (int)reader.ReadUInt32(); + segs[i].endvertex = (int)reader.ReadUInt32(); + segs[i].lineindex = reader.ReadUInt16(); + segs[i].leftside = reader.ReadBoolean(); + } + break; + } - //set the rest - for(int i = ss.firstseg + 1; i <= lastseg; i++) segs[i - 1].endvertex = segs[i].startvertex; + // Set second vertex, angle and reverse segs order + if(nodesformat == "XGLN" || nodesformat == "XGL2" || nodesformat == "XGL3") + { + int index = 0; + foreach(Subsector ss in ssectors) + { + // Set the last vert + int lastseg = ss.firstseg + ss.numsegs - 1; + segs[lastseg].endvertex = segs[ss.firstseg].startvertex; - //set angle and subsector index - for(int i = ss.firstseg; i <= lastseg; i++) - { - segs[i].angle = Vector2D.GetAngle(verts[segs[i].endvertex], verts[segs[i].startvertex]); - segs[i].ssector = index; - } + // Set the rest + for(int i = ss.firstseg + 1; i <= lastseg; i++) segs[i - 1].endvertex = segs[i].startvertex; - index++; + // Set angle and subsector index + for(int i = ss.firstseg; i <= lastseg; i++) + { + segs[i].angle = Vector2D.GetAngle(verts[segs[i].endvertex], verts[segs[i].startvertex]); + segs[i].ssector = index; } + + index++; } + } - //read nodes - uint nodesCount = reader.ReadUInt32(); + // Read nodes + uint nodescount = reader.ReadUInt32(); - //boilerplate... - if(nodesCount < 1) - { - MessageBox.Show("The map has only one subsector.", "Why are you doing this, Stanley?..", MessageBoxButtons.OK, MessageBoxIcon.Error); - return false; - } + // Boilerplate... + if(nodescount < 1) + { + MessageBox.Show("The map has only one subsector.", "Why are you doing this, Stanley?..", MessageBoxButtons.OK, MessageBoxIcon.Error); + return false; + } - nodes = new Node[nodesCount]; + nodes = new Node[nodescount]; - for(int i = 0; i < nodes.Length; i++) + for(int i = 0; i < nodes.Length; i++) + { + if(nodesformat == "XGL3") { - if(nodesformat == "XGL3") - { - nodes[i].linestart.x = reader.ReadInt32() / 65536.0f; - nodes[i].linestart.y = reader.ReadInt32() / 65536.0f; - nodes[i].linedelta.x = reader.ReadInt32() / 65536.0f; - nodes[i].linedelta.y = reader.ReadInt32() / 65536.0f; - } - else - { - nodes[i].linestart.x = reader.ReadInt16(); - nodes[i].linestart.y = reader.ReadInt16(); - nodes[i].linedelta.x = reader.ReadInt16(); - nodes[i].linedelta.y = reader.ReadInt16(); - } - - float top = reader.ReadInt16(); - float bot = reader.ReadInt16(); - float left = reader.ReadInt16(); - float right = reader.ReadInt16(); - nodes[i].rightbox = new RectangleF(left, top, (right - left), (bot - top)); - - top = reader.ReadInt16(); - bot = reader.ReadInt16(); - left = reader.ReadInt16(); - right = reader.ReadInt16(); - nodes[i].leftbox = new RectangleF(left, top, (right - left), (bot - top)); - - uint rightindex = reader.ReadUInt32(); - uint leftindex = reader.ReadUInt32(); - nodes[i].rightchild = (int)(rightindex & 0x7FFFFFFF); - nodes[i].leftchild = (int)(leftindex & 0x7FFFFFFF); - nodes[i].rightsubsector = (rightindex & 0x80000000) != 0; - nodes[i].leftsubsector = (leftindex & 0x80000000) != 0; + nodes[i].linestart.x = reader.ReadInt32() / 65536.0f; + nodes[i].linestart.y = reader.ReadInt32() / 65536.0f; + nodes[i].linedelta.x = reader.ReadInt32() / 65536.0f; + nodes[i].linedelta.y = reader.ReadInt32() / 65536.0f; + } + else + { + nodes[i].linestart.x = reader.ReadInt16(); + nodes[i].linestart.y = reader.ReadInt16(); + nodes[i].linedelta.x = reader.ReadInt16(); + nodes[i].linedelta.y = reader.ReadInt16(); } - // Add additional properties to nodes - nodes[nodes.Length - 1].parent = -1; - RecursiveSetupNodes(nodes.Length - 1); + float top = reader.ReadInt16(); + float bot = reader.ReadInt16(); + float left = reader.ReadInt16(); + float right = reader.ReadInt16(); + nodes[i].rightbox = new RectangleF(left, top, (right - left), (bot - top)); + + top = reader.ReadInt16(); + bot = reader.ReadInt16(); + left = reader.ReadInt16(); + right = reader.ReadInt16(); + nodes[i].leftbox = new RectangleF(left, top, (right - left), (bot - top)); + + uint rightindex = reader.ReadUInt32(); + uint leftindex = reader.ReadUInt32(); + nodes[i].rightchild = (int)(rightindex & 0x7FFFFFFF); + nodes[i].leftchild = (int)(leftindex & 0x7FFFFFFF); + nodes[i].rightsubsector = (rightindex & 0x80000000) != 0; + nodes[i].leftsubsector = (leftindex & 0x80000000) != 0; } + + // Add additional properties to nodes + nodes[nodes.Length - 1].parent = -1; + RecursiveSetupNodes(nodes.Length - 1); } return true; @@ -537,7 +529,7 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer { // Split line with plane and insert the vertex float u; - Line2D.GetIntersection(split.pos, split.pos + split.delta, prev.x, prev.y, cur.x, cur.y, out u); + Line2D.GetIntersection(split.pos, split.pos + split.delta, prev.x, prev.y, cur.x, cur.y, out u, false); Vector2D newv = prev + (cur - prev) * u; newp.Add(newv); } @@ -551,7 +543,7 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer { // Split line with plane and insert the vertex float u; - Line2D.GetIntersection(split.pos, split.pos + split.delta, prev.x, prev.y, cur.x, cur.y, out u); + Line2D.GetIntersection(split.pos, split.pos + split.delta, prev.x, prev.y, cur.x, cur.y, out u, false); Vector2D newv = prev + (cur - prev) * u; newp.Add(newv); } @@ -706,7 +698,7 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer for(int i = 0; i < poly.Length; i++) poly[i].c = intcolor; // Draw - renderer.RenderGeometry(poly, General.Map.Data.WhiteTexture, true); + renderer.RenderGeometry(poly, null, true); } // For rendering @@ -714,7 +706,7 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer { if(vertices == null) return; if(vertices.Length < 3) return; - renderer.RenderGeometry(vertices, General.Map.Data.WhiteTexture, true); + renderer.RenderGeometry(vertices, null, true); } // For rendering @@ -782,7 +774,7 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer } // Draw - renderer.RenderGeometry(fverts, General.Map.Data.WhiteTexture, true); + renderer.RenderGeometry(fverts, null, true); } } diff --git a/Source/Plugins/NodesViewer/Properties/AssemblyInfo.cs b/Source/Plugins/NodesViewer/Properties/AssemblyInfo.cs index 08916019ef31336eb2e52ca9d236004d3845f698..54582569ea91e57b6f24939d56f5020b81d47785 100644 --- a/Source/Plugins/NodesViewer/Properties/AssemblyInfo.cs +++ b/Source/Plugins/NodesViewer/Properties/AssemblyInfo.cs @@ -1,5 +1,6 @@ using System.Reflection; using System.Runtime.InteropServices; +using System.Resources; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -33,3 +34,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: NeutralResourcesLanguageAttribute("en")] diff --git a/Source/Plugins/SoundPropagationMode/BuilderPlug.cs b/Source/Plugins/SoundPropagationMode/BuilderPlug.cs index cdf0bc72e1b4b7aa9a3c6447fe74e27830d6e44d..250a79a7591fd618e8e54c2db978e262a48fe764 100644 --- a/Source/Plugins/SoundPropagationMode/BuilderPlug.cs +++ b/Source/Plugins/SoundPropagationMode/BuilderPlug.cs @@ -46,6 +46,7 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode #region ================== Constants internal const int SOUND_ENVIROMNEMT_THING_TYPE = 9048; //mxd + internal const float LINE_LENGTH_SCALER = 0.001f; //mxd #endregion @@ -243,7 +244,9 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode // and id, no matter in what order they are discovered for(int i = 0; i < soundenvironmenthings.Count; i++) { - secolor[soundenvironmenthings[i]] = distinctcolors[i % distinctcolors.Count]; + //mxd. Make sure same environments use the same color + int seid = (soundenvironmenthings[i].Args[0] << 8) + soundenvironmenthings[i].Args[1]; + secolor[soundenvironmenthings[i]] = distinctcolors[seid % distinctcolors.Count]; senumber.Add(soundenvironmenthings[i], i + 1); } @@ -312,6 +315,7 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode environment.ID = senumber[environment.Things[0]]; // Create the data for the overlay geometry + List<FlatVertex> severtslist = new List<FlatVertex>(environment.Sectors.Count * 3); //mxd foreach(Sector s in environment.Sectors) { FlatVertex[] fv = new FlatVertex[s.FlatVertices.Length]; @@ -319,15 +323,16 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode for(int j = 0; j < fv.Length; j++) fv[j].c = environment.Color.WithAlpha(128).ToInt(); vertsList.AddRange(fv); + severtslist.AddRange(fv); //mxd // Get all Linedefs that will block sound environments foreach(Sidedef sd in s.Sidedefs) { - if(LinedefBlocksSoundEnvironment(sd.Line)) - lock (blockinglinedefs) - { - blockinglinedefs.Add(sd.Line); - } + if(!LinedefBlocksSoundEnvironment(sd.Line)) continue; + lock(blockinglinedefs) + { + blockinglinedefs.Add(sd.Line); + } } } @@ -338,7 +343,7 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode } else { - lock (overlayGeometry) + lock(overlayGeometry) { overlayGeometry = vertsList.ToArray(); } @@ -380,7 +385,7 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode //mxd. Still no suitable name?.. if(environment.Name == SoundEnvironment.DEFAULT_NAME) environment.Name += " " + environment.ID; - lock (soundenvironments) + lock(soundenvironments) { soundenvironments.Add(environment); } @@ -405,7 +410,7 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode } else { - lock (overlayGeometry) + lock(overlayGeometry) { overlayGeometry = vertsList.ToArray(); } diff --git a/Source/Plugins/SoundPropagationMode/Interface/SoundEnvironmentPanel.Designer.cs b/Source/Plugins/SoundPropagationMode/Interface/SoundEnvironmentPanel.Designer.cs index a06c55465312d6c8e4a7b5f2ab2c63e8a72c92f1..5858cb93e1d407ba669a78efedfe50404a3196c3 100644 --- a/Source/Plugins/SoundPropagationMode/Interface/SoundEnvironmentPanel.Designer.cs +++ b/Source/Plugins/SoundPropagationMode/Interface/SoundEnvironmentPanel.Designer.cs @@ -29,7 +29,7 @@ private void InitializeComponent() { this.showwarningsonly = new System.Windows.Forms.CheckBox(); - this.soundenvironments = new CodeImp.DoomBuilder.SoundPropagationMode.BufferedTreeView(); + this.soundenvironments = new CodeImp.DoomBuilder.Controls.BufferedTreeView(); this.SuspendLayout(); // // showwarningsonly @@ -73,7 +73,7 @@ #endregion - private BufferedTreeView soundenvironments; + private CodeImp.DoomBuilder.Controls.BufferedTreeView soundenvironments; private System.Windows.Forms.CheckBox showwarningsonly; diff --git a/Source/Plugins/SoundPropagationMode/Interface/SoundEnvironmentPanel.cs b/Source/Plugins/SoundPropagationMode/Interface/SoundEnvironmentPanel.cs index f24a9be85e28edd7c3a0c67fd0b407622e9e829e..e07d4e8d1c369478b07d8de84430f47647eb1643 100644 --- a/Source/Plugins/SoundPropagationMode/Interface/SoundEnvironmentPanel.cs +++ b/Source/Plugins/SoundPropagationMode/Interface/SoundEnvironmentPanel.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; +using CodeImp.DoomBuilder.Controls; using CodeImp.DoomBuilder.Map; using CodeImp.DoomBuilder.Editing; using CodeImp.DoomBuilder.Geometry; diff --git a/Source/Plugins/SoundPropagationMode/Properties/AssemblyInfo.cs b/Source/Plugins/SoundPropagationMode/Properties/AssemblyInfo.cs index e1affcbc014b1c4346c6630f4b09642a7429b845..ca4cdf1ac72828785d433108824bfc1d1c93a354 100644 --- a/Source/Plugins/SoundPropagationMode/Properties/AssemblyInfo.cs +++ b/Source/Plugins/SoundPropagationMode/Properties/AssemblyInfo.cs @@ -1,5 +1,6 @@ using System.Reflection; using System.Runtime.InteropServices; +using System.Resources; // Allgemeine Informationen über eine Assembly werden über die folgenden // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, @@ -33,3 +34,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("0.1.0.0")] +[assembly: NeutralResourcesLanguageAttribute("en")] diff --git a/Source/Plugins/SoundPropagationMode/SoundEnvironmentMode.cs b/Source/Plugins/SoundPropagationMode/SoundEnvironmentMode.cs index a687aeb056dc94d94a6f5f2a020859117efa2550..4f70ee02555c22be8dc744a84be1fc55508bc808 100644 --- a/Source/Plugins/SoundPropagationMode/SoundEnvironmentMode.cs +++ b/Source/Plugins/SoundPropagationMode/SoundEnvironmentMode.cs @@ -163,7 +163,7 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode panel = new SoundEnvironmentPanel(); panel.OnShowWarningsOnlyChanged += PanelOnOnShowWarningsOnlyChanged; docker = new Docker("soundenvironments", "Sound Environments", panel); - General.Interface.AddDocker(docker); + General.Interface.AddDocker(docker, true); General.Interface.SelectDocker(docker); worker = new BackgroundWorker(); @@ -252,6 +252,7 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode base.OnDisengage(); worker.CancelAsync(); + worker.Dispose(); General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.ColorConfiguration); General.Interface.RemoveDocker(docker); @@ -305,20 +306,21 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode // Render things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_BACK_ALPHA); - renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_HIDDEN_ALPHA); - renderer.RenderNiGHTSPath(); + renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha); + renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.InactiveThingsAlpha); + renderer.RenderNiGHTSPath(); - lock (BuilderPlug.Me.SoundEnvironments) + lock (BuilderPlug.Me.SoundEnvironments) { foreach(SoundEnvironment se in BuilderPlug.Me.SoundEnvironments) { - if(se.Things.Count > 0) renderer.RenderThingSet(se.Things, Presentation.THINGS_ALPHA); + if(se.Things.Count > 0) renderer.RenderThingSet(se.Things, General.Settings.ActiveThingsAlpha); } } //mxd. Render highlighted thing - if(highlightedthing != null) renderer.RenderThing(highlightedthing, General.Colors.Selection, Presentation.THINGS_ALPHA); + if(highlightedthing != null) + renderer.RenderThing(highlightedthing, General.Colors.Selection, General.Settings.ActiveThingsAlpha); renderer.Finish(); } diff --git a/Source/Plugins/SoundPropagationMode/SoundPropagation.csproj b/Source/Plugins/SoundPropagationMode/SoundPropagation.csproj index 6790b324a77c352774a2d854825113fadd818609..54e40c621f3fda9b85d57ecc9da9113e64b2d63d 100644 --- a/Source/Plugins/SoundPropagationMode/SoundPropagation.csproj +++ b/Source/Plugins/SoundPropagationMode/SoundPropagation.csproj @@ -76,9 +76,6 @@ <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> - <Compile Include="BufferedTreeView.cs"> - <SubType>Component</SubType> - </Compile> <Compile Include="BuilderPlug.cs" /> <Compile Include="Interface\SoundEnvironmentPanel.cs"> <SubType>UserControl</SubType> diff --git a/Source/Plugins/SoundPropagationMode/SoundPropagationMode.cs b/Source/Plugins/SoundPropagationMode/SoundPropagationMode.cs index c0c5a1484725028faf23f7a34598662cf6db5498..2ef6bf20768d5d73cc304ea275e7c37e087ea778 100644 --- a/Source/Plugins/SoundPropagationMode/SoundPropagationMode.cs +++ b/Source/Plugins/SoundPropagationMode/SoundPropagationMode.cs @@ -276,12 +276,12 @@ namespace CodeImp.DoomBuilder.SoundPropagationMode // Render things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, Presentation.THINGS_BACK_ALPHA); - renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, Presentation.THINGS_HIDDEN_ALPHA); - renderer.RenderNiGHTSPath(); - foreach (Thing thing in huntingThings) + renderer.RenderThingSet(General.Map.ThingsFilter.HiddenThings, General.Settings.HiddenThingsAlpha); + renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, General.Settings.InactiveThingsAlpha); + renderer.RenderNiGHTSPath(); + foreach (Thing thing in huntingThings) { - renderer.RenderThing(thing, General.Colors.Selection, Presentation.THINGS_ALPHA); + renderer.RenderThing(thing, General.Colors.Selection, General.Settings.ActiveThingsAlpha); } renderer.Finish(); diff --git a/Source/Plugins/SoundPropagationMode/Windows/ColorConfiguration.designer.cs b/Source/Plugins/SoundPropagationMode/Windows/ColorConfiguration.designer.cs index 3b17ffba5ea9b1c8d6f7b1da01aec0d109132123..05aee7564c70c93d3058a9c29bb4d992f93e380b 100644 --- a/Source/Plugins/SoundPropagationMode/Windows/ColorConfiguration.designer.cs +++ b/Source/Plugins/SoundPropagationMode/Windows/ColorConfiguration.designer.cs @@ -147,7 +147,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ColorConfiguration"; - this.Opacity = 1; + this.Opacity = 0; this.ShowIcon = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Color Configuration"; diff --git a/Source/Plugins/SoundPropagationMode/Windows/ReverbsPickerForm.Designer.cs b/Source/Plugins/SoundPropagationMode/Windows/ReverbsPickerForm.Designer.cs index 63357c6a6c4a7f76a2a4904dbf47d29279bf789b..7c24eca049840b27cc99b9700059b71078fd3613 100644 --- a/Source/Plugins/SoundPropagationMode/Windows/ReverbsPickerForm.Designer.cs +++ b/Source/Plugins/SoundPropagationMode/Windows/ReverbsPickerForm.Designer.cs @@ -106,6 +106,7 @@ this.MinimizeBox = false; this.MinimumSize = new System.Drawing.Size(230, 200); this.Name = "ReverbsPickerForm"; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Plugins/StairSectorBuilder/Properties/AssemblyInfo.cs b/Source/Plugins/StairSectorBuilder/Properties/AssemblyInfo.cs index d24b97f22997a4f11115678910f5346beeb0a56b..53f2450c4798a8c3a5a37fa293a111e111a5064e 100644 --- a/Source/Plugins/StairSectorBuilder/Properties/AssemblyInfo.cs +++ b/Source/Plugins/StairSectorBuilder/Properties/AssemblyInfo.cs @@ -1,5 +1,6 @@ using System.Reflection; using System.Runtime.InteropServices; +using System.Resources; // Управление общими сведениями о сборке осуществляется с помощью // набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, @@ -33,3 +34,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: NeutralResourcesLanguageAttribute("en")] diff --git a/Source/Plugins/StairSectorBuilder/StairSectorBuilderMode.cs b/Source/Plugins/StairSectorBuilder/StairSectorBuilderMode.cs index b51b669828d98ab8f5429238708819fd58fc5a61..0a6e2c3ee998e16424391b8b8196578a68fb90d5 100644 --- a/Source/Plugins/StairSectorBuilder/StairSectorBuilderMode.cs +++ b/Source/Plugins/StairSectorBuilder/StairSectorBuilderMode.cs @@ -1480,7 +1480,7 @@ namespace CodeImp.DoomBuilder.StairSectorBuilderMode // Render things if(renderer.StartThings(true)) { - renderer.RenderThingSet(General.Map.Map.Things, Presentation.THINGS_ALPHA); + renderer.RenderThingSet(General.Map.Map.Things, General.Settings.ActiveThingsAlpha); renderer.Finish(); } diff --git a/Source/Plugins/TagExplorer/BuilderPlug.cs b/Source/Plugins/TagExplorer/BuilderPlug.cs index 8ea3b62b365d7d58cac1e6cfb623356030e134aa..c3d0b8309c33d1c40f5adfe11daf8a8c38037dfa 100644 --- a/Source/Plugins/TagExplorer/BuilderPlug.cs +++ b/Source/Plugins/TagExplorer/BuilderPlug.cs @@ -74,6 +74,12 @@ namespace CodeImp.DoomBuilder.TagExplorer if(tagExplorer != null) tagExplorer.UpdateTreeSoon(); } + // Edit performed + public override void OnEditAccept() + { + if(tagExplorer != null) tagExplorer.UpdateTreeSoon(); + } + public override void OnActionEnd(Actions.Action action) { if(tagExplorer != null && action.Name == "builder_deleteitem") diff --git a/Source/Plugins/TagExplorer/Controls/TagExplorer.Designer.cs b/Source/Plugins/TagExplorer/Controls/TagExplorer.Designer.cs index 1e6ad6ea32020c070e91b2f55d0a6bd5cd74f248..240cb4def98c448730b2b06d335639d2a22aeff7 100644 --- a/Source/Plugins/TagExplorer/Controls/TagExplorer.Designer.cs +++ b/Source/Plugins/TagExplorer/Controls/TagExplorer.Designer.cs @@ -16,7 +16,7 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TagExplorer)); - this.treeView = new System.Windows.Forms.TreeView(); + this.treeView = new CodeImp.DoomBuilder.Controls.BufferedTreeView(); this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.cbDisplayMode = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); @@ -243,7 +243,7 @@ #endregion - private System.Windows.Forms.TreeView treeView; + private CodeImp.DoomBuilder.Controls.BufferedTreeView treeView; private System.Windows.Forms.ComboBox cbDisplayMode; private System.Windows.Forms.Label label1; private System.Windows.Forms.ComboBox cbSortMode; diff --git a/Source/Plugins/TagExplorer/Controls/TagExplorer.cs b/Source/Plugins/TagExplorer/Controls/TagExplorer.cs index db2b9e84f08c35c193b3c87dc2b0b8f96d809388..8bdfe877531694510ccb5e276837213c6db4b048 100644 --- a/Source/Plugins/TagExplorer/Controls/TagExplorer.cs +++ b/Source/Plugins/TagExplorer/Controls/TagExplorer.cs @@ -39,11 +39,19 @@ namespace CodeImp.DoomBuilder.TagExplorer public sealed partial class TagExplorer : UserControl { + private struct SectorEffectData + { + public int Effect; //1024 + public string CategoryName; // "Secret" + public string EffectName; // "Secret: Yes" + public bool IsGeneralized; + } + private const string DISPLAY_TAGS_AND_ACTIONS = "Tags and Action Specials"; private const string DISPLAY_TAGS = "Tags"; private const string DISPLAY_ACTIONS = "Action Specials"; private const string DISPLAY_POLYOBJECTS = "Polyobjects"; - private readonly object[] DISPLAY_MODES = new object[] { DISPLAY_TAGS_AND_ACTIONS, DISPLAY_TAGS, DISPLAY_ACTIONS, DISPLAY_POLYOBJECTS }; + private readonly object[] DISPLAY_MODES = { DISPLAY_TAGS_AND_ACTIONS, DISPLAY_TAGS, DISPLAY_ACTIONS, DISPLAY_POLYOBJECTS }; private string currentDisplayMode; private string currentSortMode; @@ -144,9 +152,9 @@ namespace CodeImp.DoomBuilder.TagExplorer string comment = ""; string serachStr = tbSearch.Text.ToLowerInvariant(); - List<int> filteredtags = new List<int>(); - List<int> filteredactions = new List<int>(); - List<int> filteredpolyobjects = new List<int>(); + HashSet<int> filteredtags = new HashSet<int>(); + HashSet<int> filteredactions = new HashSet<int>(); + HashSet<int> filteredpolyobjects = new HashSet<int>(); GetSpecialValues(serachStr, ref filteredtags, ref filteredactions, ref filteredpolyobjects); if(!udmf || filteredtags.Count > 0 || filteredactions.Count > 0 || filteredpolyobjects.Count > 0) @@ -333,31 +341,30 @@ namespace CodeImp.DoomBuilder.TagExplorer { if((showTags && s.Tag != 0) || (showActions && s.Effect > 0)) { - if(filteredtags.Count > 0 && !filteredtags.Contains(s.Tag)) continue; if(filteredactions.Count > 0 && !filteredactions.Contains(s.Effect)) continue; + for(int i = 0; i < s.Tags.Count; i++) + { + if(filteredtags.Count > 0 && !filteredtags.Contains(s.Tags[i])) continue; - NodeInfo info = new NodeInfo(s); - string name = info.GetName(ref comment, currentSortMode); - hasComment = comment.Length > 0; - - if(!hasComment && cbCommentsOnly.Checked) continue; + NodeInfo info = new NodeInfo(s, i); + string name = info.GetName(ref comment, currentSortMode); + hasComment = comment.Length > 0; - if(!udmf || serachStr.Length == 0 || (hasComment && comment.ToLowerInvariant().IndexOf(serachStr) != -1)) - { - TreeNode node = new TreeNode(name, 3, 3) { Tag = info, ToolTipText = nodetooltip }; - if(hasComment) node.ForeColor = commentColor; - nodes.Add(node); + if(!hasComment && cbCommentsOnly.Checked) continue; + if(!udmf || serachStr.Length == 0 || (hasComment && comment.ToLowerInvariant().IndexOf(serachStr) != -1)) + { + TreeNode node = new TreeNode(name, 3, 3) { Tag = info, ToolTipText = nodetooltip }; + if(hasComment) node.ForeColor = commentColor; + nodes.Add(node); - if(info.Index == selection.Index && info.Type == selection.Type) - selectedNode = node; + if(info.Index == selection.Index && info.Type == selection.Type) + selectedNode = node; + } } } } - //sort nodes - Sort(ref nodes, currentSortMode); - - //add category + // Add category if(nodes.Count > 0) { switch(currentSortMode) @@ -369,25 +376,89 @@ namespace CodeImp.DoomBuilder.TagExplorer foreach(TreeNode node in nodes) { - NodeInfo nodeInfo = node.Tag as NodeInfo; + NodeInfo info = node.Tag as NodeInfo; - if(nodeInfo.Action == 0) + if(info.Action == 0) { noAction.Nodes.Add(node); continue; } - SectorEffectInfo sei = General.Map.Config.GetSectorEffectInfo(nodeInfo.Action); - - if(!categories.ContainsKey(sei.Index)) - categories.Add(sei.Index, new TreeNode(sei.Index + " - " + sei.Title, 2, 2, new[] { node })); + List<SectorEffectData> effects = GetSectorEffects(info.Action); + if(effects.Count == 1 && !effects[0].IsGeneralized) + { + // The first node is already has all relevant data. Just add it + if(!categories.ContainsKey(effects[0].Effect)) + { + TreeNode catnode = new TreeNode(effects[0].Effect + " - " + effects[0].CategoryName, 2, 2, new[] {node}); + catnode.Tag = effects[0].Effect; + categories.Add(effects[0].Effect, catnode); + } + else + { + categories[effects[0].Effect].Nodes.Add(node); + } + } else - categories[sei.Index].Nodes.Add(node); + { + // Add generalized effects + foreach(SectorEffectData data in effects) + { + // Create NodeInfo for each effect... + NodeInfo geninfo = new NodeInfo(info, data.Effect); + + // Copy the initial node, otherwise it won't be added several times + string name = geninfo.GetName(ref comment, currentSortMode); + TreeNode nodecopy = new TreeNode(name, node.ImageIndex, node.SelectedImageIndex) + { + Tag = geninfo, + ToolTipText = node.ToolTipText + }; + + if(!categories.ContainsKey(data.Effect)) + { + TreeNode catnode = new TreeNode(data.Effect + " - " + data.CategoryName, 2, 2, new[] {nodecopy}); + catnode.Tag = data.Effect; + categories.Add(data.Effect, catnode); + } + else + { + categories[data.Effect].Nodes.Add(nodecopy); + } + } + } } - TreeNode[] catNodes = new TreeNode[categories.Values.Count]; - categories.Values.CopyTo(catNodes, 0); - TreeNode category = new TreeNode(CAT_SECTORS, 2, 2, catNodes); + // Because of generalized effects shenanigans, category and nodes resortings are required... + TreeNode[] catnodes = new TreeNode[categories.Values.Count]; + categories.Values.CopyTo(catnodes, 0); + + // Sort categories + Array.Sort(catnodes, delegate(TreeNode t1, TreeNode t2) + { + int effect1 = (int)t1.Tag; + int effect2 = (int)t2.Tag; + + if(effect1 > effect2) return 1; + if(effect1 == effect2) return 0; + return -1; + }); + + // Sort nodes + foreach(TreeNode n in catnodes) + { + if(n.Nodes.Count > 0) + { + List<TreeNode> tosort = new List<TreeNode>(n.Nodes.Count); + foreach(TreeNode nn in n.Nodes) tosort.Add(nn); + Sort(ref tosort, currentSortMode); + + n.Nodes.Clear(); + n.Nodes.AddRange(tosort.ToArray()); + } + } + + TreeNode category = new TreeNode(CAT_SECTORS, 2, 2, catnodes); if(noAction.Nodes.Count > 0) category.Nodes.Add(noAction); treeView.Nodes.Add(category); @@ -399,6 +470,9 @@ namespace CodeImp.DoomBuilder.TagExplorer Dictionary<int, TreeNode> categories = new Dictionary<int, TreeNode>(); TreeNode noTag = new TreeNode("No Tag", 2, 2); + // Sort nodes + Sort(ref nodes, currentSortMode); + foreach(TreeNode node in nodes) { NodeInfo nodeInfo = node.Tag as NodeInfo; @@ -433,6 +507,9 @@ namespace CodeImp.DoomBuilder.TagExplorer break; default: + // Sort nodes + Sort(ref nodes, currentSortMode); + treeView.Nodes.Add(new TreeNode(CAT_SECTORS, 2, 2, nodes.ToArray())); break; } @@ -449,31 +526,34 @@ namespace CodeImp.DoomBuilder.TagExplorer { if((showTags && l.Tag != 0) || (showActions && l.Action > 0)) { - if(filteredtags.Count > 0 && !filteredtags.Contains(l.Tag)) continue; if(filteredactions.Count > 0 && !filteredactions.Contains(l.Action)) continue; - NodeInfo info = new NodeInfo(l); - if(filteredpolyobjects.Count > 0 && !filteredpolyobjects.Contains(info.PolyobjectNumber)) - continue; + NodeInfo firstinfo = new NodeInfo(l, 0); + if(filteredpolyobjects.Count > 0 && !filteredpolyobjects.Contains(firstinfo.PolyobjectNumber)) continue; - string name = info.GetName(ref comment, currentSortMode); - hasComment = comment.Length > 0; + for(int i = 0; i < l.Tags.Count; i++) + { + if(filteredtags.Count > 0 && !filteredtags.Contains(l.Tags[i])) continue; - if(!hasComment && cbCommentsOnly.Checked) continue; + NodeInfo info = new NodeInfo(l, i); + string name = info.GetName(ref comment, currentSortMode); + hasComment = comment.Length > 0; - if(!udmf || serachStr.Length == 0 || (hasComment && comment.ToLowerInvariant().IndexOf(serachStr) != -1)) - { - TreeNode node = new TreeNode(name, 5, 5) { Tag = info, ToolTipText = nodetooltip }; - if(hasComment) node.ForeColor = commentColor; - nodes.Add(node); + if(!hasComment && cbCommentsOnly.Checked) continue; + if(!udmf || serachStr.Length == 0 || (hasComment && comment.ToLowerInvariant().IndexOf(serachStr) != -1)) + { + TreeNode node = new TreeNode(name, 5, 5) { Tag = info, ToolTipText = nodetooltip }; + if(hasComment) node.ForeColor = commentColor; + nodes.Add(node); - if(info.Index == selection.Index && info.Type == selection.Type) - selectedNode = node; + if(info.Index == selection.Index && info.Type == selection.Type) + selectedNode = node; + } } } else if(currentDisplayMode == DISPLAY_POLYOBJECTS) { - NodeInfo info = new NodeInfo(l); + NodeInfo info = new NodeInfo(l, 0); if(info.PolyobjectNumber != int.MinValue && (filteredpolyobjects.Count == 0 || filteredpolyobjects.Contains(info.PolyobjectNumber))) { string name = info.GetName(ref comment, SortMode.SORT_BY_POLYOBJ_NUMBER); @@ -508,7 +588,7 @@ namespace CodeImp.DoomBuilder.TagExplorer LinedefActionInfo lai = General.Map.Config.GetLinedefActionInfo(nodeInfo.Action); - if(!categories.ContainsKey(lai.Index)) categories.Add(lai.Index, new TreeNode(lai.Index + " - " + lai.Name, 4, 4, new[] { node })); + if(!categories.ContainsKey(lai.Index)) categories.Add(lai.Index, new TreeNode(lai.Index + " - " + lai.Title, 4, 4, new[] { node })); else categories[lai.Index].Nodes.Add(node); } TreeNode[] catNodes = new TreeNode[categories.Values.Count]; @@ -579,12 +659,12 @@ namespace CodeImp.DoomBuilder.TagExplorer //update Export button bExportToFile.Enabled = (treeView.Nodes != null && treeView.Nodes.Count > 0); - //loose focus - if(focusDisplay) General.Interface.FocusDisplay(); + // Loose focus when the main windows is active + if(focusDisplay && Form.ActiveForm == General.Interface) General.Interface.FocusDisplay(); } //tag/action search - private static void GetSpecialValues(string serachstr, ref List<int> filteredtags, ref List<int> filteredactions, ref List<int> filteredpolyobjects) + private static void GetSpecialValues(string serachstr, ref HashSet<int> filteredtags, ref HashSet<int> filteredactions, ref HashSet<int> filteredpolyobjects) { if(serachstr.Length == 0) return; @@ -704,6 +784,79 @@ namespace CodeImp.DoomBuilder.TagExplorer return -1; } + // This returns information on a sector effect + private static List<SectorEffectData> GetSectorEffects(int effect) + { + List<SectorEffectData> result = new List<SectorEffectData>(1); + + // No effect? + if(effect == 0) + { + result.Add(new SectorEffectData { Effect = 0, CategoryName = "None", EffectName = "None" }); + } + // Known effect? + else if(General.Map.Config.SectorEffects.ContainsKey(effect)) + { + string title = General.Map.Config.SectorEffects[effect].Title; + result.Add(new SectorEffectData { Effect = effect, CategoryName = title, EffectName = title }); + } + else + { + // Generalized effect(s)? + int initialeffect = effect; + + // Check all effects, in bigger to smaller order + for(int i = General.Map.Config.GenEffectOptions.Count - 1; i > -1; i--) + { + for(int j = General.Map.Config.GenEffectOptions[i].Bits.Count - 1; j > -1; j--) + { + GeneralizedBit bit = General.Map.Config.GenEffectOptions[i].Bits[j]; + if(bit.Index > 0 && (effect & bit.Index) == bit.Index) + { + initialeffect -= bit.Index; + result.Add(new SectorEffectData + { + Effect = bit.Index, + CategoryName = General.Map.Config.GenEffectOptions[i].Name, + EffectName = General.Map.Config.GenEffectOptions[i].Name + ": " + bit.Title, + IsGeneralized = true, + }); + break; + } + } + } + + // Add combined effect? + if(result.Count > 0 && initialeffect > 0) + { + string combinedeffect = General.Map.Config.GetGeneralizedSectorEffectName(effect); + result.Add(new SectorEffectData { Effect = effect, CategoryName = combinedeffect, EffectName = combinedeffect + ": " + effect, }); + } + + if(initialeffect > 0) + { + // Insert non-generalized effect as the first one + if(General.Map.Config.SectorEffects.ContainsKey(initialeffect)) + { + string title = General.Map.Config.SectorEffects[initialeffect].Title; + result.Insert(0, new SectorEffectData { Effect = initialeffect, CategoryName = title, EffectName = title }); + } + else + { + // Unknown effect... + result.Insert(0, new SectorEffectData { Effect = initialeffect, CategoryName = "Unknown", EffectName = "Unknown" }); + } + } + else if(result.Count == 0) + { + // Unknown effect... + result.Add(new SectorEffectData { Effect = effect, CategoryName = "Unknown", EffectName = "Unknown" }); + } + } + + return result; + } + #endregion #region ================== Events @@ -916,6 +1069,9 @@ namespace CodeImp.DoomBuilder.TagExplorer if(e.Label != null) info.Comment = e.Label; e.Node.Text = info.GetName(ref comment, currentSortMode); e.Node.ForeColor = string.IsNullOrEmpty(info.Comment) ? Color.Black : commentColor; + + // Because of multiple tags, several nodes can link to the same sector/linedef + UpdateTree(false); } //It is called every time a dialog window closes. diff --git a/Source/Plugins/TagExplorer/NodeInfo.cs b/Source/Plugins/TagExplorer/NodeInfo.cs index a88f65180810db534aa47b31b55f044ce54ed01e..a544761ed7b35b47790f4e57f7bf0393b49a05fe 100644 --- a/Source/Plugins/TagExplorer/NodeInfo.cs +++ b/Source/Plugins/TagExplorer/NodeInfo.cs @@ -1,4 +1,5 @@ -using CodeImp.DoomBuilder.Config; +using System; +using CodeImp.DoomBuilder.Config; using CodeImp.DoomBuilder.Map; using CodeImp.DoomBuilder.Types; @@ -12,13 +13,13 @@ namespace CodeImp.DoomBuilder.TagExplorer private readonly int action; private readonly int tag; private readonly int polyobjnumber; - private readonly string defaultName; + private readonly string defaultname; public int Index { get { return index; } } public int Tag { get { return tag; } } public int PolyobjectNumber { get { return polyobjnumber; } } public int Action { get { return action; } } - public string DefaultName { get { return defaultName; } } + public string DefaultName { get { return defaultname; } } public NodeInfoType Type { get { return type; } } public string Comment { get { return GetComment(); } set { SetComment(value); } } @@ -31,41 +32,70 @@ namespace CodeImp.DoomBuilder.TagExplorer tag = t.Tag; polyobjnumber = ((t.SRB2Type > 9299 && t.SRB2Type < 9304) ? t.AngleDoom : int.MinValue); ThingTypeInfo tti = General.Map.Data.GetThingInfoEx(t.SRB2Type); - defaultName = (tti != null ? tti.Title : "Thing"); + defaultname = (tti != null ? tti.Title : "Thing"); } - public NodeInfo(Sector s) + public NodeInfo(Sector s, int tagindex) { type = NodeInfoType.SECTOR; index = s.Index; action = s.Effect; - tag = s.Tag; + tag = s.Tags[tagindex]; if(General.Map.Config.SectorEffects.ContainsKey(action)) - { - defaultName = General.Map.Config.SectorEffects[action].Title; - } + defaultname = General.Map.Config.SectorEffects[action].Title; + else if(action > 0) + defaultname = General.Map.Config.GetGeneralizedSectorEffectName(action); else - { - defaultName = "Sector"; - } + defaultname = "Sector"; } - public NodeInfo(Linedef l) + public NodeInfo(Linedef l, int tagindex) { type = NodeInfoType.LINEDEF; index = l.Index; action = l.Action; - tag = l.Tag; + tag = l.Tags[tagindex]; polyobjnumber = ((l.Action > 0 && l.Action < 9) ? l.Args[0] : int.MinValue); - if(General.Map.Config.LinedefActions.ContainsKey(l.Action)) - { - defaultName = General.Map.Config.LinedefActions[l.Action].Title; - } + if(General.Map.Config.LinedefActions.ContainsKey(action)) + defaultname = General.Map.Config.LinedefActions[action].Title; + else if(action > 0 && GameConfiguration.IsGeneralized(action)) + defaultname = "Generalized (" + General.Map.Config.GetGeneralizedActionCategory(action) + ")"; else + defaultname = "Linedef"; + } + + // Copy constructor + public NodeInfo(NodeInfo other, int neweffect) + { + this.type = other.type; + this.index = other.index; + this.action = neweffect; + this.tag = other.tag; + this.polyobjnumber = other.polyobjnumber; + + switch(type) { - defaultName = "Linedef"; + case NodeInfoType.LINEDEF: + if(General.Map.Config.LinedefActions.ContainsKey(action)) + defaultname = General.Map.Config.LinedefActions[action].Title; + else if(action > 0 && GameConfiguration.IsGeneralized(action)) + defaultname = "Generalized (" + General.Map.Config.GetGeneralizedActionCategory(action) + ")"; + else + defaultname = "Linedef"; + break; + + case NodeInfoType.SECTOR: + if(General.Map.Config.SectorEffects.ContainsKey(action)) + defaultname = General.Map.Config.SectorEffects[action].Title; + else if(action > 0) + defaultname = General.Map.Config.GetGeneralizedSectorEffectName(action); + else + defaultname = "Sector"; + break; + + default: throw new NotImplementedException("Not implemented..."); } } @@ -165,7 +195,7 @@ namespace CodeImp.DoomBuilder.TagExplorer private string CombineName(string comment, string sortmode) { - string name = (!string.IsNullOrEmpty(comment) ? comment : defaultName); + string name = (!string.IsNullOrEmpty(comment) ? comment : defaultname); switch(sortmode) { @@ -179,7 +209,7 @@ namespace CodeImp.DoomBuilder.TagExplorer return (action > 0 ? "Action " + action + ": " : "") + name + ", Index " + index; case SortMode.SORT_BY_POLYOBJ_NUMBER: - return "PO " + polyobjnumber + ": " + defaultName + ", Index " + index; + return "PO " + polyobjnumber + ": " + defaultname + ", Index " + index; default: return name; diff --git a/Source/Plugins/TagRange/Properties/AssemblyInfo.cs b/Source/Plugins/TagRange/Properties/AssemblyInfo.cs index c70989e2382fb620e615cbe2bf16520c5b0ed6cf..6e4b4873db641327988d429a251d02bc64a00225 100644 --- a/Source/Plugins/TagRange/Properties/AssemblyInfo.cs +++ b/Source/Plugins/TagRange/Properties/AssemblyInfo.cs @@ -1,5 +1,6 @@ using System.Reflection; using System.Runtime.InteropServices; +using System.Resources; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -32,3 +33,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: NeutralResourcesLanguageAttribute("en")] diff --git a/Source/Plugins/TagRange/TagRangeForm.Designer.cs b/Source/Plugins/TagRange/TagRangeForm.Designer.cs index 368a803590a13912ff1fdb1522482dbedf206d57..1d2c90819d4d0f0301bef50b051d2aa347880dbc 100644 --- a/Source/Plugins/TagRange/TagRangeForm.Designer.cs +++ b/Source/Plugins/TagRange/TagRangeForm.Designer.cs @@ -49,7 +49,10 @@ namespace CodeImp.DoomBuilder.TagRange this.rangestart.AllowNegative = false; this.rangestart.AllowRelative = false; this.rangestart.ButtonStep = 1; + this.rangestart.ButtonStepBig = 10F; this.rangestart.ButtonStepFloat = 1F; + this.rangestart.ButtonStepSmall = 0.1F; + this.rangestart.ButtonStepsUseModifierKeys = false; this.rangestart.ButtonStepsWrapAround = false; this.rangestart.Location = new System.Drawing.Point(76, 12); this.rangestart.Name = "rangestart"; @@ -164,7 +167,10 @@ namespace CodeImp.DoomBuilder.TagRange this.rangestep.AllowNegative = true; this.rangestep.AllowRelative = false; this.rangestep.ButtonStep = 1; + this.rangestep.ButtonStepBig = 10F; this.rangestep.ButtonStepFloat = 1F; + this.rangestep.ButtonStepSmall = 0.1F; + this.rangestep.ButtonStepsUseModifierKeys = false; this.rangestep.ButtonStepsWrapAround = false; this.rangestep.Location = new System.Drawing.Point(76, 42); this.rangestep.Name = "rangestep"; @@ -220,6 +226,7 @@ namespace CodeImp.DoomBuilder.TagRange this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "TagRangeForm"; + this.Opacity = 0; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/Source/Plugins/VisplaneExplorer/BuilderPlug.cs b/Source/Plugins/VisplaneExplorer/BuilderPlug.cs index 797ebd15f2c940f89f8593fa02222e5f637eb7f1..616ab0505f07b1dbbe8bb6c0ae56bcf4c5778390 100644 --- a/Source/Plugins/VisplaneExplorer/BuilderPlug.cs +++ b/Source/Plugins/VisplaneExplorer/BuilderPlug.cs @@ -34,7 +34,6 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer private static BuilderPlug me; private VPOManager vpo; private InterfaceForm interfaceform; - private bool enabled; //mxd // Palettes private Palette[] palettes; @@ -54,22 +53,22 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer #region ================== Initialize / Dispose - //mxd. Initialize when we can check the map format - public override void OnMapNewEnd() { OnMapOpenEnd(); } - public override void OnMapOpenEnd() + public override void OnInitialize() { - enabled = (General.Map.DOOM || General.Map.HEXEN || General.Map.SRB2); - if(enabled) - { - // Load interface controls - interfaceform = new InterfaceForm(); + base.OnInitialize(); - // Load VPO manager (manages multithreading and communication with vpo.dll) - vpo = new VPOManager(); + // Keep a static reference + me = this; + } - // Keep a static reference - me = this; - } + //mxd + public static void InitVPO() + { + // Load interface controls + if(me.interfaceform == null) me.interfaceform = new InterfaceForm(); + + // Load VPO manager (manages multithreading and communication with vpo.dll) + if(me.vpo == null) me.vpo = new VPOManager(); } // Preferences changed @@ -85,18 +84,21 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer //mxd. Active and not already disposed? if(!IsDisposed) { - if(enabled) + if(interfaceform != null) { - // Clean up interfaceform.Dispose(); interfaceform = null; + } + + if(vpo != null) + { vpo.Dispose(); vpo = null; - - // Done - me = null; } + // Done + me = null; + base.Dispose(); } } diff --git a/Source/Plugins/VisplaneExplorer/InterfaceForm.cs b/Source/Plugins/VisplaneExplorer/InterfaceForm.cs index c9e3c3aeaac3728f4acfc4650fd7da59a1f715c4..f8f067253963f599abcfb23d9dafd6348c53cdc3 100644 --- a/Source/Plugins/VisplaneExplorer/InterfaceForm.cs +++ b/Source/Plugins/VisplaneExplorer/InterfaceForm.cs @@ -16,11 +16,15 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer #endregion + #region ================== mxd. Event handlers + + public event EventHandler OnOpenDoorsChanged; + + #endregion + #region ================== Variables private ViewStats viewstats; - private static bool opendoors; //mxd - private static bool showheatmap; //mxd private Point oldttposition; #endregion @@ -28,8 +32,8 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer #region ================== Properties internal ViewStats ViewStats { get { return viewstats; } } - internal bool OpenDoors { get { return opendoors; } } //mxd - internal bool ShowHeatmap { get { return showheatmap; } } //mxd + internal bool OpenDoors { get { return cbopendoors.Checked; } } //mxd + internal bool ShowHeatmap { get { return cbheatmap.Checked; } } //mxd #endregion @@ -39,8 +43,8 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer public InterfaceForm() { InitializeComponent(); - cbopendoors.Checked = opendoors; //mxd - cbheatmap.Checked = showheatmap; //mxd + cbopendoors.Checked = General.Settings.ReadPluginSetting("opendoors", false); //mxd + cbheatmap.Checked = General.Settings.ReadPluginSetting("showheatmap", false); //mxd } #endregion @@ -63,6 +67,10 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer General.Interface.RemoveButton(cbopendoors); //mxd General.Interface.RemoveButton(separator); //mxd General.Interface.RemoveButton(statsbutton); + + //mxd. Save settings + General.Settings.WritePluginSetting("opendoors", cbopendoors.Checked); + General.Settings.WritePluginSetting("showheatmap", cbheatmap.Checked); } // This shows a tooltip @@ -106,18 +114,13 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer //mxd private void cbheatmap_Click(object sender, EventArgs e) { - showheatmap = cbheatmap.Checked; General.Interface.RedrawDisplay(); } //mxd private void cbopendoors_Click(object sender, EventArgs e) { - opendoors = cbopendoors.Checked; - - // Restart processing - BuilderPlug.VPO.Restart(); - General.Interface.RedrawDisplay(); + if(OnOpenDoorsChanged != null) OnOpenDoorsChanged(this, EventArgs.Empty); } #endregion diff --git a/Source/Plugins/VisplaneExplorer/Properties/AssemblyInfo.cs b/Source/Plugins/VisplaneExplorer/Properties/AssemblyInfo.cs index 8f48b96b0ffa750fe8599fa8bfb1a2bddb8b4201..c01054c604ff62be41f48f432c25c3a1db768ff2 100644 --- a/Source/Plugins/VisplaneExplorer/Properties/AssemblyInfo.cs +++ b/Source/Plugins/VisplaneExplorer/Properties/AssemblyInfo.cs @@ -1,5 +1,6 @@ using System.Reflection; using System.Runtime.InteropServices; +using System.Resources; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -33,3 +34,4 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: NeutralResourcesLanguageAttribute("en")] diff --git a/Source/Plugins/VisplaneExplorer/VPOManager.cs b/Source/Plugins/VisplaneExplorer/VPOManager.cs index f98e9f3af6312c6f014386b16576fd5f68b37c81..cc642a9e0eebe416f9c97f999f64962820eb4f7f 100644 --- a/Source/Plugins/VisplaneExplorer/VPOManager.cs +++ b/Source/Plugins/VisplaneExplorer/VPOManager.cs @@ -251,21 +251,14 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer } } - //mxd - internal void Restart() - { - Stop(); - Start(filename, mapname); - } - // This clears the list of enqueued points - public void ClearPoints() + /*public void ClearPoints() { lock(points) { points.Clear(); } - } + }*/ // This gives points to process and returns the total points left in the buffer public int EnqueuePoints(IEnumerable<TilePoint> newpoints) diff --git a/Source/Plugins/VisplaneExplorer/VisplaneExplorerMode.cs b/Source/Plugins/VisplaneExplorer/VisplaneExplorerMode.cs index b379f2d594eb00ff8245ccd50345d9d8e970653e..ec8456270bfe419f5492e351de8d6b023691db3f 100644 --- a/Source/Plugins/VisplaneExplorer/VisplaneExplorerMode.cs +++ b/Source/Plugins/VisplaneExplorer/VisplaneExplorerMode.cs @@ -3,12 +3,12 @@ using System; using System.Collections.Generic; using System.Drawing; +using System.Drawing.Imaging; using System.IO; using System.Runtime.InteropServices; using System.Windows.Forms; using CodeImp.DoomBuilder.Data; using CodeImp.DoomBuilder.Editing; -using System.Drawing.Imaging; using CodeImp.DoomBuilder.Geometry; using CodeImp.DoomBuilder.Map; using CodeImp.DoomBuilder.Rendering; @@ -29,10 +29,6 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer AllowCopyPaste = false)] public class VisplaneExplorerMode : ClassicMode { - #region ================== Constants - - #endregion - #region ================== APIs [DllImport("kernel32.dll")] @@ -59,21 +55,13 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer private Dictionary<Point, Tile> tiles = new Dictionary<Point, Tile>(); // Time when to do another update - private DateTime nextupdate; + private long nextupdate; // Are we processing? private bool processingenabled; #endregion - #region ================== Properties - - #endregion - - #region ================== Constructor / Destructor - - #endregion - #region ================== Methods // This cleans up anything we used for this mode @@ -130,8 +118,7 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer int viewstats = (int)BuilderPlug.InterfaceForm.ViewStats; Palette pal = (BuilderPlug.InterfaceForm.ShowHeatmap ? BuilderPlug.Palettes[(int)ViewStats.Heatmap] : BuilderPlug.Palettes[viewstats]); - Size canvassize = canvas.Size; - BitmapData bd = canvas.LockBits(new Rectangle(0, 0, canvassize.Width, canvassize.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); + BitmapData bd = canvas.LockBits(new Rectangle(0, 0, canvas.Size.Width, canvas.Size.Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb); RtlZeroMemory(bd.Scan0, bd.Width * bd.Height * 4); int* p = (int*)bd.Scan0.ToPointer(); @@ -253,9 +240,12 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer base.OnEngage(); General.Interface.DisplayStatus(StatusType.Busy, "Setting up test environment..."); + BuilderPlug.InitVPO(); //mxd + CleanUp(); BuilderPlug.InterfaceForm.AddToInterface(); + BuilderPlug.InterfaceForm.OnOpenDoorsChanged += OnOpenDoorsChanged; //mxd lastviewstats = BuilderPlug.InterfaceForm.ViewStats; // Export the current map to a temporary WAD file @@ -276,29 +266,7 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer mapbounds = Rectangle.Round(MapSet.CreateArea(General.Map.Map.Vertices)); // Create tiles for all points inside the map - Point lt = TileForPoint(mapbounds.Left - Tile.TILE_SIZE, mapbounds.Top - Tile.TILE_SIZE); - Point rb = TileForPoint(mapbounds.Right + Tile.TILE_SIZE, mapbounds.Bottom + Tile.TILE_SIZE); - Rectangle tilesrect = new Rectangle(lt.X, lt.Y, rb.X - lt.X, rb.Y - lt.Y); - NearestLineBlockmap blockmap = new NearestLineBlockmap(tilesrect); - for(int x = tilesrect.X; x <= tilesrect.Right; x += Tile.TILE_SIZE) - { - for(int y = tilesrect.Y; y <= tilesrect.Bottom; y += Tile.TILE_SIZE) - { - // If the tile is obviously outside the map, don't create it - Vector2D pc = new Vector2D(x + (Tile.TILE_SIZE >> 1), y + (Tile.TILE_SIZE >> 1)); - Linedef ld = MapSet.NearestLinedef(blockmap.GetBlockAt(pc).Lines, pc); - float distancesq = ld.DistanceToSq(pc, true); - if(distancesq > (Tile.TILE_SIZE * Tile.TILE_SIZE)) - { - float side = ld.SideOfLine(pc); - if((side > 0.0f) && (ld.Back == null)) - continue; - } - - Point tp = new Point(x, y); - tiles.Add(tp, new Tile(tp)); - } - } + CreateTiles(); //mxd QueuePoints(0); @@ -323,7 +291,7 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer renderer.SetPresentation(p); // Setup processing - nextupdate = DateTime.Now + new TimeSpan(0, 0, 0, 0, 100); + nextupdate = Clock.CurrentTime + 100; General.Interface.EnableProcessing(); processingenabled = true; @@ -333,6 +301,34 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer General.Interface.DisplayReady(); } + //mxd + private void CreateTiles() + { + Point lt = TileForPoint(mapbounds.Left - Tile.TILE_SIZE, mapbounds.Top - Tile.TILE_SIZE); + Point rb = TileForPoint(mapbounds.Right + Tile.TILE_SIZE, mapbounds.Bottom + Tile.TILE_SIZE); + Rectangle tilesrect = new Rectangle(lt.X, lt.Y, rb.X - lt.X, rb.Y - lt.Y); + NearestLineBlockmap blockmap = new NearestLineBlockmap(tilesrect); + for(int x = tilesrect.X; x <= tilesrect.Right; x += Tile.TILE_SIZE) + { + for(int y = tilesrect.Y; y <= tilesrect.Bottom; y += Tile.TILE_SIZE) + { + // If the tile is obviously outside the map, don't create it + Vector2D pc = new Vector2D(x + (Tile.TILE_SIZE >> 1), y + (Tile.TILE_SIZE >> 1)); + Linedef ld = MapSet.NearestLinedef(blockmap.GetBlockAt(pc).Lines, pc); + float distancesq = ld.DistanceToSq(pc, true); + if(distancesq > (Tile.TILE_SIZE * Tile.TILE_SIZE)) + { + float side = ld.SideOfLine(pc); + if((side > 0.0f) && (ld.Back == null)) + continue; + } + + Point tp = new Point(x, y); + tiles.Add(tp, new Tile(tp)); + } + } + } + // Mode ends public override void OnDisengage() { @@ -358,7 +354,7 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer RedrawAllTiles(); // Update the screen sooner - nextupdate = DateTime.Now + new TimeSpan(0, 0, 0, 0, 100); + nextupdate = Clock.CurrentTime + 100; } // Draw the display @@ -380,10 +376,10 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer } // Processing - public override void OnProcess(float deltatime) + public override void OnProcess(long deltatime) { base.OnProcess(deltatime); - if(DateTime.Now >= nextupdate) + if(Clock.CurrentTime >= nextupdate) { // Get the processed points from the VPO manager List<PointData> points = new List<PointData>(); @@ -405,7 +401,7 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer RedrawAllTiles(); General.Interface.RedrawDisplay(); - nextupdate = DateTime.Now + new TimeSpan(0, 0, 0, 0, 500); + nextupdate = Clock.CurrentTime + 500; } else { @@ -485,6 +481,17 @@ namespace CodeImp.DoomBuilder.Plugins.VisplaneExplorer BuilderPlug.InterfaceForm.HideTooltip(); } + //mxd + private void OnOpenDoorsChanged(object sender, EventArgs e) + { + // Restart processing + BuilderPlug.VPO.Stop(); + tiles.Clear(); + CreateTiles(); + BuilderPlug.VPO.Start(tempfile, General.Map.Options.LevelName); + General.Interface.RedrawDisplay(); + } + #endregion } }