diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 82b66369f..5cee5b38c 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -50,7 +50,6 @@ body: 2. Click on '....' 3. Scroll down to '....' 4. See error - render: text validations: required: true - type: textarea @@ -58,7 +57,6 @@ body: attributes: label: Expected Behavior description: What did you expect to happen instead? - render: text validations: required: false - type: textarea @@ -68,6 +66,5 @@ body: description: If applicable, add screenshots to help explain your problem. value: | ![DESCRIPTION](LINK.png) - render: text validations: required: false diff --git a/.github/ISSUE_TEMPLATE/crash.yml b/.github/ISSUE_TEMPLATE/crash.yml index 598d62738..4efc7f9a8 100644 --- a/.github/ISSUE_TEMPLATE/crash.yml +++ b/.github/ISSUE_TEMPLATE/crash.yml @@ -46,7 +46,6 @@ body: 2. Click on '....' 3. Scroll down to '....' 4. Crash occurrs - render: text validations: required: true - type: textarea @@ -64,6 +63,5 @@ body: description: If applicable, add screenshots to help explain how to reproduce the crash. value: | ![DESCRIPTION](LINK.png) - render: text validations: required: false diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index 5f35b2b46..30c090e4b 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -27,7 +27,6 @@ body: description: "What exactly are you looking for in SLADE?" value: | I would like SLADE to ... - render: text validations: required: true - type: textarea @@ -37,6 +36,5 @@ body: description: "If applicable ONLY, add mock-ups to help explain your feature request." value: | ![DESCRIPTION](LINK.png) - render: text validations: required: false diff --git a/.github/ISSUE_TEMPLATE/other.yml b/.github/ISSUE_TEMPLATE/other.yml index e1cd2dd21..5422e9d84 100644 --- a/.github/ISSUE_TEMPLATE/other.yml +++ b/.github/ISSUE_TEMPLATE/other.yml @@ -25,6 +25,5 @@ body: id: repro attributes: label: Issue Details - render: text validations: required: true diff --git a/dist/res/actions/mapw_general.cfg b/dist/res/actions/mapw_general.cfg index 53983b1db..b5b08230a 100644 --- a/dist/res/actions/mapw_general.cfg +++ b/dist/res/actions/mapw_general.cfg @@ -15,6 +15,14 @@ action mapw_saveas shortcut = "Ctrl+Shift+S"; } +action mapw_close +{ + text = "&Close"; + icon = "close"; + help_text = "Close the current map"; + shortcut = "Ctrl+W"; +} + action mapw_rename { text = "&Rename Map"; diff --git a/dist/res/actions/scrm.cfg b/dist/res/actions/scrm.cfg index 48da59918..6d3b6e587 100644 --- a/dist/res/actions/scrm.cfg +++ b/dist/res/actions/scrm.cfg @@ -98,3 +98,11 @@ action scrm_jump_to_line help_text = "Jump to a specific line number"; keybind = "ted_jumptoline"; } + +action scrm_close +{ + text = "&Close"; + icon = "close"; + help_text = "Close the tab or window"; + shortcut = "Ctrl+W"; +} \ No newline at end of file diff --git a/dist/res/config/entry_types/text.cfg b/dist/res/config/entry_types/text.cfg index 33b012ca6..d49dfa828 100644 --- a/dist/res/config/entry_types/text.cfg +++ b/dist/res/config/entry_types/text.cfg @@ -608,6 +608,8 @@ zscript : text { name = "ZScript"; match_name = "zscript"; + match_ext = "zs", "zsc", "zc"; + match_extorname = 1; text_language = "zscript"; icon = "code"; } diff --git a/dist/res/config/languages/decorate.txt b/dist/res/config/languages/decorate.txt index dff6e759e..4c6956b38 100644 --- a/dist/res/config/languages/decorate.txt +++ b/dist/res/config/languages/decorate.txt @@ -176,7 +176,8 @@ decorate : cstyle { BOUNCEONUNRIPPABLES, DONTBOUNCEONSHOOTABLES, DONTBOUNCEONSKY, RETARGETAFTERSLAM, E1M8BOSS, E2M8BOSS, E3M8BOSS, E4M6BOSS, E4M8BOSS, MAP07BOSS1, MAP07BOSS2, HIGHERMPROB, DONTFOLLOWPLAYERS, SEEFRIENDLYMONSTERS, ADDLIGHTLEVEL, CROSSLINECHECK, MASTERNOSEE, INVISIBLEINMIRRORS, ONLYVISIBLEINMIRRORS, ONLYSLAMSOLID, - SHADOWAIM, DOSHADOWBLOCK, SHADOWBLOCK, SHADOWAIMVERT, NOSAVEGAME, + SHADOWAIM, DOSHADOWBLOCK, SHADOWBLOCK, SHADOWAIMVERT, NOSAVEGAME, DECOUPLEDANIMATIONS, BILLBOARDFACECAMERA, + BILLBOARDNOFACECAMERA, FLIPSPRITEOFFSETX, FLIPSPRITEOFFSETY, // INVENTORY. INVENTORY, @@ -388,7 +389,7 @@ decorate : cstyle { // A_SpawnParticle flags SPF_FULLBRIGHT, SPF_RELACCEL, SPF_RELANG, SPF_RELATIVE, SPF_RELPOS, SPF_RELVEL, SPF_NOTIMEFREEZE, - SPF_ROLL, SPF_REPLACE, + SPF_ROLL, SPF_REPLACE, SPF_NO_XY_BILLBOARD, SPF_LOCAL_ANIM, // Render styles STYLE_None, STYLE_Normal, STYLE_Fuzzy, STYLE_SoulTrans, STYLE_OptFuzzy, STYLE_Stencil, STYLE_Translucent, diff --git a/dist/res/config/languages/zdoom.txt b/dist/res/config/languages/zdoom.txt index 99fbbedba..d80d25c35 100644 --- a/dist/res/config/languages/zdoom.txt +++ b/dist/res/config/languages/zdoom.txt @@ -257,7 +257,8 @@ z_mapinfo { e2m8special, e3m8special, e4m6special, e4m8special, disableshadowmap, enableshadowmap, avoidmelee, compat_avoidhazards, compat_stayonlift, compat_nombf21, compat_vileghosts, attenuatelights, intro, outro, lightblendmode, cvar_redirect, compat_voodoozombies, - nopassover, passover, + nopassover, passover, colormap, nogravity, lightningsound, isocam_pitch, isometricmode, + isometricsprites, iso_dist, orthographic, // GZDoom FogDensity, OutsideFogDensity, SkyFog, LightMode, NoColoredSpriteLighting, SkyRotate, PixelRatio, @@ -359,13 +360,13 @@ z_modeldef { MODEL, PATH, SKIN, SCALE, FRAME, FRAMEINDEX, Rotation-Speed, Rotation-Vector, Rotation-Center, Offset, AngleOffset, PitchOffset, RollOffset, ZOffset, SurfaceSkin, - Animation + Animation, BaseFrame } constants = { PITCHFROMMOMENTUM, IGNORETRANSLATION, INTERPOLATEDOUBLEDFRAMES, ROTATING, NOINTERPOLATION, INHERITACTORPITCH, INHERITACTORROLL, USEACTORPITCH, USEACTORROLL, DONTCULLBACKFACES, - SCALEWEAPONFOV, MODELSAREATTACHMENTS, CORRECTPIXELSTRETCH + SCALEWEAPONFOV, MODELSAREATTACHMENTS, CORRECTPIXELSTRETCH, FORCECULLBACKFACES } } diff --git a/dist/res/config/languages/zscript.txt b/dist/res/config/languages/zscript.txt index 73af3eb5b..78362ea34 100644 --- a/dist/res/config/languages/zscript.txt +++ b/dist/res/config/languages/zscript.txt @@ -16,14 +16,192 @@ zscript extend, clearscope, vararg, ui, play, virtual, virtualscope, meta, Property, version, in, out, states, action, override, super, is, let, const, replaces, protected, self, abstract, enum, switch, case, until, nullptr, foreach, array, - map, mapiterator, sealed + map, mapiterator, sealed, function } types = { object, vector2, vector3, name, string, color, sound, void, double, bool, int, float, uint8, uint16, uint, int8, int16, TextureID, SpriteID, - voidptr, short, fvector2, fvector3, fvector4, vector4, fquat, quat + voidptr, short, fvector2, fvector3, fvector4, vector4, fquat, quat, + TranslationID + } + + properties = + { + // Actor flags (as variables accessible from scripts) + + // Internal flags + bINCHASE, bUNMORPHED, bFLY, bONMOBJ, bARGSDEFINED, bNOSIGHTCHECK, bCRASHED, + bWARNBOT, bHUNTPLAYERS, bNOHATEPLAYERS, bSCROLLMOVE, bVFRICTION, bBOSSSPAWNED, + bAVOIDINGDROPOFF, bCHASEGOAL, bINCONVERSATION, bARMED, bFALLING, bLINEDONE, + bSHATTERING, bKILLED, bBOSSCUBE, bINTRYMOVE, bHANDLENODELAY, bFLYCHEAT, + bRESPAWNINVUL, + + // MF + bPICKUP, bSPECIAL, bSOLID, bSHOOTABLE, bNOSECTOR, bNOBLOCKMAP, bAMBUSH, bJUSTHIT, + bJUSTATTACKED, bSPAWNCEILING, bNOGRAVITY, bDROPOFF, bNOCLIP, bFLOAT, bTELEPORT, + bMISSILE, bDROPPED, bSHADOW, bNOBLOOD, bCORPSE, bINFLOAT, bCOUNTKILL, bCOUNTITEM, + bSKULLFLY, bNOTDMATCH, bSPAWNSOUNDSOURCE, bFRIENDLY, bNOLIFTDROP, bSTEALTH, + bICECORPSE, + + // MF2 + bDONTREFLECT, bWINDTHRUST, bDONTSEEKINVISIBLE, bBLASTED, bFLOORCLIP, bSPAWNFLOAT, + bNOTELEPORT, bRIPPER, bPUSHABLE, bSLIDESONWALLS, bCANPASS, bCANNOTPUSH, bTHRUGHOST, + bBOSS, bNODAMAGETHRUST, bDONTTRANSLATE, bTELESTOMP, bFLOATBOB, bTHRUACTORS, + bACTIVATEIMPACT, bCANPUSHWALLS, bACTIVATEMCROSS, bACTIVATEPCROSS, + bCANTLEAVEFLOORPIC, bNONSHOOTABLE, bINVULNERABLE, bDORMANT, bSEEKERMISSILE, + bREFLECTIVE, + + // MF3 + bFLOORHUGGER, bCEILINGHUGGER, bNORADIUSDMG, bGHOST, bSPECIALFLOORCLIP, bALWAYSPUFF, + bDONTSPLASH, bDONTOVERLAP, bDONTMORPH, bDONTSQUASH, bEXPLOCOUNT, bFULLVOLACTIVE, + bISMONSTER, bSKYEXPLODE, bSTAYMORPHED, bDONTBLAST, bCANBLAST, bNOTARGET, bDONTGIB, + bNOBLOCKMONST, bFULLVOLDEATH, bAVOIDMELEE, bSCREENSEEKER, bFOILINVUL, bNOTELEOTHER, + bBLOODLESSIMPACT, bNOEXPLODEFLOOR, bPUFFONACTORS, + + // MF4 + bQUICKTORETALIATE, bNOICEDEATH, bRANDOMIZE, bFIXMAPTHINGPOS, bACTLIKEBRIDGE, + bSTRIFEDAMAGE, bCANUSEWALLS, bMISSILEMORE, bMISSILEEVENMORE, bFORCERADIUSDMG, + bDONTFALL, bSEESDAGGERS, bINCOMBAT, bLOOKALLAROUND, bSTANDSTILL, bSPECTRAL, + bNOSPLASHALERT, bSYNCHRONIZED, bNOTARGETSWITCH, bDONTHARMCLASS, bSHIELDREFLECT, + bDEFLECT, bALLOWPARTICLES, bEXTREMEDEATH, bNOEXTREMEDEATH, bFRIGHTENED, bNOSKIN, + bBOSSDEATH, + + // MF5 + bDONTDRAIN, bGETOWNER, bNODROPOFF, bNOFORWARDFALL, bCOUNTSECRET, bNODAMAGE, + bBLOODSPLATTER, bOLDRADIUSDMG, bDEHEXPLOSION, bPIERCEARMOR, bNOBLOODDECALS, + bUSESPECIAL, bNOPAIN, bALWAYSFAST, bNEVERFAST, bALWAYSRESPAWN, bNEVERRESPAWN, + bDONTRIP, bNOINFIGHTING, bNOINTERACTION, bNOTIMEFREEZE, bPUFFGETSOWNER, + bSPECIALFIREDAMAGE, bSUMMONEDMONSTER, bNOVERTICALMELEERANGE, bBRIGHT, bCANTSEEK, + bPAINLESS, bMOVEWITHSECTOR, + + // MF6 + bNOBOSSRIP, bTHRUSPECIES, bMTHRUSPECIES, bFORCEPAIN, bNOFEAR, bBUMPSPECIAL, + bDONTHARMSPECIES, bSTEPMISSILE, bNOTELEFRAG, bTOUCHY, bCANJUMP, bJUMPDOWN, + bVULNERABLE, bNOTRIGGER, bADDITIVEPOISONDAMAGE, bADDITIVEPOISONDURATION, + bBLOCKEDBYSOLIDACTORS, bNOMENU, bSEEINVISIBLE, bDONTCORPSE, bDOHARMSPECIES, + bPOISONALWAYS, bNOTAUTOAIMED, bNOTONAUTOMAP, bRELATIVETOFLOOR, + + // MF7 + bNEVERTARGET, bNOTELESTOMP, bALWAYSTELEFRAG, bWEAPONSPAWN, bHARMFRIENDS, bBUDDHA, + bFOILBUDDHA, bDONTTHRUST, bALLOWPAIN, bCAUSEPAIN, bTHRUREFLECT, bMIRRORREFLECT, + bAIMREFLECT, bHITTARGET, bHITMASTER, bHITTRACER, bNODECAL, bFORCEDECAL, bLAXTELEFRAGDMG, + bICESHATTER, bALLOWTHRUFLAGS, bUSEKILLSCRIPTS, bNOKILLSCRIPTS, bSPRITEANGLE, + bSMASHABLE, bNOSHIELDREFLECT, bFORCEZERORADIUSDMG, bNOINFIGHTSPECIES, bFORCEINFIGHTING, + + // MF8 + bFRIGHTENING, bBLOCKASPLAYER, bDONTFACETALKER, bHITOWNER, bNOFRICTION, + bNOFRICTIONBOUNCE, bRETARGETAFTERSLAM, bSTOPRAILS, bFALLDAMAGE, bMINVISIBLE, + bMVISBLOCKED, bABSVIEWANGLES, bALLOWTHRUBITS, bFULLVOLSEE, bE1M8BOSS, bE2M8BOSS, + bE3M8BOSS, bE4M8BOSS, bE4M6BOSS, bMAP07BOSS1, bMAP07BOSS2, bAVOIDHAZARDS, + bSTAYONLIFT, bDONTFOLLOWPLAYERS, bSEEFRIENDLYMONSTERS, bCROSSLINECHECK, + bMASTERNOSEE, bADDLIGHTLEVEL, bONLYSLAMSOLID, + + // MF9 + bSHADOWAIM, bDOSHADOWBLOCK, bSHADOWBLOCK, bSHADOWAIMVERT, bDECOUPLEDANIMATIONS, + + // Effect flags + bVISIBILITYPULSE, bROCKETTRAIL, bGRENADETRAIL, bINVISIBLE, bFORCEYBILLBOARD, + bFORCEXYBILLBOARD, bROLLSPRITE, bFLATSPRITE, bWALLSPRITE, bDONTFLIP, bROLLCENTER, + bMASKROTATION, bABSMASKANGLE, bABSMASKPITCH, bXFLIP, bYFLIP, bINTERPOLATEANGLES, + bDONTINTERPOLATE, bSPRITEFLIP, bZDOOMTRANS, bCASTSPRITESHADOW, bNOSPRITESHADOW, + bINVISIBLEINMIRRORS, bONLYVISIBLEINMIRRORS, bBILLBOARDFACECAMERA, + bBILLBOARDNOFACECAMERA, bFLIPSPRITEOFFSETX, bFLIPSPRITEOFFSETY, + + // Bounce flags + bBOUNCEONWALLS, bBOUNCEONFLOORS, bBOUNCEONCEILINGS, bALLOWBOUNCEONACTORS, + bBOUNCEAUTOOFF, bBOUNCELIKEHERETIC, bCANBOUNCEWATER, bNOWALLBOUNCESND, + bNOBOUNCESOUND, bBOUNCEONACTORS, bEXPLODEONWATER, bMBFBOUNCER, bBOUNCEAUTOOFFFLOORONLY, + bUSEBOUNCESTATE, bDONTBOUNCEONSHOOTABLES, bBOUNCEONUNRIPPABLES, bDONTBOUNCEONSKY, + + // Misc + bNOSAVEGAME + } + + constants = + { + // Actor flags (used in an actor's definition) + + // MF + PICKUP, SPECIAL, SOLID, SHOOTABLE, NOSECTOR, NOBLOCKMAP, AMBUSH, JUSTHIT, + JUSTATTACKED, SPAWNCEILING, NOGRAVITY, DROPOFF, NOCLIP, FLOAT, TELEPORT, + MISSILE, DROPPED, SHADOW, NOBLOOD, CORPSE, INFLOAT, COUNTKILL, COUNTITEM, + SKULLFLY, NOTDMATCH, SPAWNSOUNDSOURCE, FRIENDLY, NOLIFTDROP, STEALTH, + ICECORPSE, + + // MF2 + DONTREFLECT, WINDTHRUST, DONTSEEKINVISIBLE, BLASTED, FLOORCLIP, SPAWNFLOAT, + NOTELEPORT, RIPPER, PUSHABLE, SLIDESONWALLS, CANPASS, CANNOTPUSH, THRUGHOST, + BOSS, NODAMAGETHRUST, DONTTRANSLATE, TELESTOMP, FLOATBOB, THRUACTORS, + ACTIVATEIMPACT, CANPUSHWALLS, ACTIVATEMCROSS, ACTIVATEPCROSS, + CANTLEAVEFLOORPIC, NONSHOOTABLE, INVULNERABLE, DORMANT, SEEKERMISSILE, + REFLECTIVE, + + // MF3 + FLOORHUGGER, CEILINGHUGGER, NORADIUSDMG, GHOST, SPECIALFLOORCLIP, ALWAYSPUFF, + DONTSPLASH, DONTOVERLAP, DONTMORPH, DONTSQUASH, EXPLOCOUNT, FULLVOLACTIVE, + ISMONSTER, SKYEXPLODE, STAYMORPHED, DONTBLAST, CANBLAST, NOTARGET, DONTGIB, + NOBLOCKMONST, FULLVOLDEATH, AVOIDMELEE, SCREENSEEKER, FOILINVUL, NOTELEOTHER, + BLOODLESSIMPACT, NOEXPLODEFLOOR, PUFFONACTORS, + + // MF4 + QUICKTORETALIATE, NOICEDEATH, RANDOMIZE, FIXMAPTHINGPOS, ACTLIKEBRIDGE, + STRIFEDAMAGE, CANUSEWALLS, MISSILEMORE, MISSILEEVENMORE, FORCERADIUSDMG, + DONTFALL, SEESDAGGERS, INCOMBAT, LOOKALLAROUND, STANDSTILL, SPECTRAL, + NOSPLASHALERT, SYNCHRONIZED, NOTARGETSWITCH, DONTHARMCLASS, SHIELDREFLECT, + DEFLECT, ALLOWPARTICLES, EXTREMEDEATH, NOEXTREMEDEATH, FRIGHTENED, NOSKIN, + BOSSDEATH, + + // MF5 + DONTDRAIN, GETOWNER, NODROPOFF, NOFORWARDFALL, COUNTSECRET, NODAMAGE, + BLOODSPLATTER, OLDRADIUSDMG, DEHEXPLOSION, PIERCEARMOR, NOBLOODDECALS, + USESPECIAL, NOPAIN, ALWAYSFAST, NEVERFAST, ALWAYSRESPAWN, NEVERRESPAWN, + DONTRIP, NOINFIGHTING, NOINTERACTION, NOTIMEFREEZE, PUFFGETSOWNER, + SPECIALFIREDAMAGE, SUMMONEDMONSTER, NOVERTICALMELEERANGE, BRIGHT, CANTSEEK, + PAINLESS, MOVEWITHSECTOR, + + // MF6 + NOBOSSRIP, THRUSPECIES, MTHRUSPECIES, FORCEPAIN, NOFEAR, BUMPSPECIAL, + DONTHARMSPECIES, STEPMISSILE, NOTELEFRAG, TOUCHY, CANJUMP, JUMPDOWN, + VULNERABLE, NOTRIGGER, ADDITIVEPOISONDAMAGE, ADDITIVEPOISONDURATION, + BLOCKEDBYSOLIDACTORS, NOMENU, SEEINVISIBLE, DONTCORPSE, DOHARMSPECIES, + POISONALWAYS, NOTAUTOAIMED, NOTONAUTOMAP, RELATIVETOFLOOR, + + // MF7 + NEVERTARGET, NOTELESTOMP, ALWAYSTELEFRAG, WEAPONSPAWN, HARMFRIENDS, BUDDHA, + FOILBUDDHA, DONTTHRUST, ALLOWPAIN, CAUSEPAIN, THRUREFLECT, MIRRORREFLECT, + AIMREFLECT, HITTARGET, HITMASTER, HITTRACER, NODECAL, FORCEDECAL, LAXTELEFRAGDMG, + ICESHATTER, ALLOWTHRUFLAGS, USEKILLSCRIPTS, NOKILLSCRIPTS, SPRITEANGLE, + SMASHABLE, NOSHIELDREFLECT, FORCEZERORADIUSDMG, NOINFIGHTSPECIES, FORCEINFIGHTING, + + // MF8 + FRIGHTENING, BLOCKASPLAYER, DONTFACETALKER, HITOWNER, NOFRICTION, + NOFRICTIONBOUNCE, RETARGETAFTERSLAM, STOPRAILS, FALLDAMAGE, MINVISIBLE, + MVISBLOCKED, ABSVIEWANGLES, ALLOWTHRUBITS, FULLVOLSEE, E1M8BOSS, E2M8BOSS, + E3M8BOSS, E4M8BOSS, E4M6BOSS, MAP07BOSS1, MAP07BOSS2, AVOIDHAZARDS, + STAYONLIFT, DONTFOLLOWPLAYERS, SEEFRIENDLYMONSTERS, CROSSLINECHECK, + MASTERNOSEE, ADDLIGHTLEVEL, ONLYSLAMSOLID, + + // MF9 + SHADOWAIM, DOSHADOWBLOCK, SHADOWBLOCK, SHADOWAIMVERT, DECOUPLEDANIMATIONS, + + // Effect flags + VISIBILITYPULSE, ROCKETTRAIL, GRENADETRAIL, INVISIBLE, FORCEYBILLBOARD, + FORCEXYBILLBOARD, ROLLSPRITE, FLATSPRITE, WALLSPRITE, DONTFLIP, ROLLCENTER, + MASKROTATION, ABSMASKANGLE, ABSMASKPITCH, XFLIP, YFLIP, INTERPOLATEANGLES, + DONTINTERPOLATE, SPRITEFLIP, ZDOOMTRANS, CASTSPRITESHADOW, NOSPRITESHADOW, + INVISIBLEINMIRRORS, ONLYVISIBLEINMIRRORS, BILLBOARDFACECAMERA, + BILLBOARDNOFACECAMERA, FLIPSPRITEOFFSETX, FLIPSPRITEOFFSETY, + + // Bounce flags + BOUNCEONWALLS, BOUNCEONFLOORS, BOUNCEONCEILINGS, ALLOWBOUNCEONACTORS, + BOUNCEAUTOOFF, BOUNCELIKEHERETIC, CANBOUNCEWATER, NOWALLBOUNCESND, + NOBOUNCESOUND, BOUNCEONACTORS, EXPLODEONWATER, MBFBOUNCER, BOUNCEAUTOOFFFLOORONLY, + USEBOUNCESTATE, DONTBOUNCEONSHOOTABLES, BOUNCEONUNRIPPABLES, DONTBOUNCEONSKY, + + // Misc + NOSAVEGAME } // Function info we cannot parse from (g)zdoom.pk3 diff --git a/net.mancubus.SLADE.metainfo.xml b/net.mancubus.SLADE.metainfo.xml index 3efd7edad..db5910da1 100644 --- a/net.mancubus.SLADE.metainfo.xml +++ b/net.mancubus.SLADE.metainfo.xml @@ -4,7 +4,7 @@ SLADE It's a Doom editor CC0-1.0 - GPL-2.0 + GPL-2.0-only Simon Judd https://slade.mancubus.net/ https://github.com/sirjuddington/SLADE/issues @@ -22,7 +22,7 @@ SLADE3 can be considered a successor to both SLumpEd and SLADE - it combines the features of both, to create an all-in-one editor. Why does it keep the name of what was previously just a map editor? Because it fits :)

- As with SLumpEd and previous versions of SLADE, SLADE3 is fully cross-platform. It can be run on various operating systems, including Windows, Linux and Mac OS/X. So no matter your preferred OS, SLADE3 is available for you. + As with SLumpEd and previous versions of SLADE, SLADE3 is fully cross-platform. It can be run on various operating systems, including Windows, Linux and macOS. So no matter your preferred OS, SLADE3 is available for you.

diff --git a/src/MainEditor/UI/EntryPanel/GfxEntryPanel.cpp b/src/MainEditor/UI/EntryPanel/GfxEntryPanel.cpp index 1c5118865..411a98673 100644 --- a/src/MainEditor/UI/EntryPanel/GfxEntryPanel.cpp +++ b/src/MainEditor/UI/EntryPanel/GfxEntryPanel.cpp @@ -407,7 +407,7 @@ void GfxEntryPanel::setupToolbars() auto* g_tool = new SToolBarGroup(toolbar_left_, "Tool"); g_tool->addActionButton("tool_drag", "Drag offsets", "gfx_drag", "Drag image to change its offsets") ->setChecked(true); - g_tool->addActionButton("tool_draw", "Drag pixels", "gfx_draw", "Draw on the image"); + g_tool->addActionButton("tool_draw", "Draw pixels", "gfx_draw", "Draw on the image"); g_tool->addActionButton("tool_erase", "Erase pixels", "gfx_erase", "Erase pixels from the image"); g_tool->addActionButton( "tool_translate", "Translate pixels", "gfx_translate", "Apply a translation to pixels of the image"); diff --git a/src/MapEditor/Renderer/MapRenderer3D.cpp b/src/MapEditor/Renderer/MapRenderer3D.cpp index a4cb57378..a31efdf13 100644 --- a/src/MapEditor/Renderer/MapRenderer3D.cpp +++ b/src/MapEditor/Renderer/MapRenderer3D.cpp @@ -160,9 +160,6 @@ MapRenderer3D::MapRenderer3D(SLADEMap* map) : map_{ map } // ----------------------------------------------------------------------------- MapRenderer3D::~MapRenderer3D() { - delete[] quads_; - delete[] flats_; - if (vbo_flats_ > 0) glDeleteBuffers(1, &vbo_flats_); if (vbo_walls_ > 0) @@ -193,16 +190,8 @@ void MapRenderer3D::refresh() { // Clear any existing map data dist_sectors_.clear(); - if (quads_) - { - delete[] quads_; - quads_ = nullptr; - } - if (flats_) - { - delete[] flats_; - flats_ = nullptr; - } + quads_.clear(); + flats_.clear(); // Clear VBOs if (vbo_flats_ != 0) @@ -3004,8 +2993,10 @@ float MapRenderer3D::calcDistFade(double distance, double max) const void MapRenderer3D::checkVisibleQuads() { // Create quads array if empty - if (!quads_) - quads_ = new Quad*[map_->nLines() * 4]; + // if (!quads_) + // quads_ = new Quad*[map_->nLines() * 4]; + if (quads_.empty()) + quads_.resize(map_->nLines() * 4); // Go through lines MapLine* line; @@ -3108,7 +3099,7 @@ void MapRenderer3D::checkVisibleQuads() void MapRenderer3D::checkVisibleFlats() { // Update flats array - delete[] flats_; + flats_.clear(); n_flats_ = 0; for (unsigned a = 0; a < sector_flats_.size(); a++) { @@ -3118,19 +3109,15 @@ void MapRenderer3D::checkVisibleFlats() n_flats_ += sector_flats_[a].size(); } - flats_ = new Flat*[n_flats_]; - - for (unsigned a = 0; a < n_flats_; a++) - flats_[a] = nullptr; + flats_.resize(n_flats_); // Go through sectors - MapSector* sector; - float alpha; - unsigned flat_idx = 0; - auto cam = cam_position_.xy(); + float alpha; + unsigned flat_idx = 0; + auto cam = cam_position_.xy(); for (unsigned a = 0; a < map_->nSectors(); a++) { - sector = map_->sector(a); + const auto sector = map_->sector(a); // Skip if invisible if (dist_sectors_[a] < 0) diff --git a/src/MapEditor/Renderer/MapRenderer3D.h b/src/MapEditor/Renderer/MapRenderer3D.h index 0102d109f..6c883d65a 100644 --- a/src/MapEditor/Renderer/MapRenderer3D.h +++ b/src/MapEditor/Renderer/MapRenderer3D.h @@ -222,11 +222,11 @@ class MapRenderer3D // Map Structures vector lines_; - Quad** quads_ = nullptr; + vector quads_; vector quads_transparent_; vector things_; vector> sector_flats_; - Flat** flats_ = nullptr; + vector flats_; // VBOs unsigned vbo_flats_ = 0; diff --git a/src/MapEditor/UI/MapEditorWindow.cpp b/src/MapEditor/UI/MapEditorWindow.cpp index d76c7a094..b4c0b66af 100644 --- a/src/MapEditor/UI/MapEditorWindow.cpp +++ b/src/MapEditor/UI/MapEditorWindow.cpp @@ -231,6 +231,8 @@ void MapEditorWindow::setupMenu() menu_map->AppendSeparator(); SAction::fromId("mapw_run_map")->addToMenu(menu_map); SAction::fromId("mapw_quick_run_map")->addToMenu(menu_map); + menu_map->AppendSeparator(); + SAction::fromId("mapw_close")->addToMenu(menu_map); menu->Append(menu_map, "&Map"); // Edit menu @@ -1228,6 +1230,13 @@ bool MapEditorWindow::handleAction(string_view id) return true; } + // Map->Close + if (id == "mapw_close") + { + wxWindow::Close(); + return true; + } + // Edit->Undo if (id == "mapw_undo") { diff --git a/src/Scripting/UI/ScriptManagerWindow.cpp b/src/Scripting/UI/ScriptManagerWindow.cpp index 7f79fdc9f..aba5d3da2 100644 --- a/src/Scripting/UI/ScriptManagerWindow.cpp +++ b/src/Scripting/UI/ScriptManagerWindow.cpp @@ -368,6 +368,8 @@ void ScriptManagerWindow::setupMenu() // File menu auto file_menu = new wxMenu(); SAction::fromId("scrm_newscript_editor")->addToMenu(file_menu); + file_menu->AppendSeparator(); + SAction::fromId("scrm_close")->addToMenu(file_menu); menu->Append(file_menu, "&File"); // Script menu @@ -646,7 +648,7 @@ void ScriptManagerWindow::openScriptTab(Script* script) const Script* ScriptManagerWindow::currentScript() const { auto page = tabs_scripts_->GetCurrentPage(); - if (page->GetName() == "script") + if (page && page->GetName() == "script") return dynamic_cast(page)->script(); return nullptr; @@ -681,7 +683,7 @@ bool ScriptManagerWindow::handleAction(string_view id) if (current && current->handleAction(id)) return true; - // File->New->Editor Script + // File->New Editor Script if (id == "scrm_newscript_editor") { NewEditorScriptDialog dlg(this); @@ -705,6 +707,23 @@ bool ScriptManagerWindow::handleAction(string_view id) return true; } + // File->Close + if (id == "scrm_close") + { + auto script = currentScript(); + + if (script) + { + closeScriptTab(script); + } + else + { + wxWindow::Close(); + } + + return true; + } + // Script->Run if (id == "scrm_run") { diff --git a/src/TextEditor/UI/TextEditorCtrl.cpp b/src/TextEditor/UI/TextEditorCtrl.cpp index bf4be0b42..61c00e37d 100644 --- a/src/TextEditor/UI/TextEditorCtrl.cpp +++ b/src/TextEditor/UI/TextEditorCtrl.cpp @@ -79,6 +79,7 @@ CVAR(Int, txed_line_extra_height, 0, CVar::Flag::Save) CVAR(Bool, txed_tab_spaces, false, CVar::Flag::Save) CVAR(Int, txed_show_whitespace, 0, CVar::Flag::Save) CVAR(Bool, txed_calltips_argset_kb, true, CVar::Flag::Save) +CVAR(Bool, txed_use_directwrite, true, CVar::Flag::Save) CVAR(Int, txed_font_quality, wxSTC_EFF_QUALITY_DEFAULT, CVar::Flag::Save) CVAR(Bool, txed_fr_matchcase, false, CVar::Save) CVAR(Bool, txed_fr_matchword, false, CVar::Save) @@ -291,7 +292,8 @@ void TextEditorCtrl::setup() SetDoubleBuffered(true); SetBufferedDraw(true); SetUseAntiAliasing(true); - SetTechnology(wxSTC_TECHNOLOGY_DIRECTWRITE); + if (txed_use_directwrite) + SetTechnology(wxSTC_TECHNOLOGY_DIRECTWRITE); SetFontQuality(txed_font_quality); SetMultipleSelection(true); SetAdditionalSelectionTyping(true);