diff --git a/Build/Compilers/BCC/bcc.cfg b/Build/Compilers/BCC/bcc.cfg new file mode 100644 index 00000000..41f747bc --- /dev/null +++ b/Build/Compilers/BCC/bcc.cfg @@ -0,0 +1,15 @@ + +compilers +{ + // This defines what files a compiler uses + // The setting named "program" defines what .exe to run + // The "interface" setting defines what interal interface to use for processing and error feedback + // All others are the required files (the setting names do not matter) + bcc + { + interface = "AccCompiler"; + program = "bcc.exe"; + zcommon = "zcommon.acs"; + std = "std.acs"; + } +} diff --git a/Build/Compilers/BCC/bcc.exe b/Build/Compilers/BCC/bcc.exe new file mode 100644 index 00000000..cb62e5b1 Binary files /dev/null and b/Build/Compilers/BCC/bcc.exe differ diff --git a/Build/Compilers/BCC/std.acs b/Build/Compilers/BCC/std.acs new file mode 100644 index 00000000..5f66d32d --- /dev/null +++ b/Build/Compilers/BCC/std.acs @@ -0,0 +1,1408 @@ +/* + + The following declarations are based on the declarations found in the + zdefs.acs and zspecial.acs files, both shipped with the acc compiler. + +*/ + +region std { + +enum ON = 1; +enum OFF = 0; +enum YES = 1; +enum NO = 0; + +enum LINE_FRONT = 0; +enum LINE_BACK = 1; + +enum SIDE_FRONT = 0; +enum SIDE_BACK = 1; + +enum TEXTURE_TOP = 0; +enum TEXTURE_MIDDLE = 1; +enum TEXTURE_BOTTOM = 2; + +enum TEXFLAG_TOP = 1; +enum TEXFLAG_MIDDLE = 2; +enum TEXFLAG_BOTTOM = 4; +enum TEXFLAG_ADDOFFSET = 8; + +enum { + GAME_SINGLE_PLAYER, + GAME_NET_COOPERATIVE, + GAME_NET_DEATHMATCH, + GAME_TITLE_MAP +}; + +enum CLASS_FIGHTER = 0; +enum CLASS_CLERIC = 1; +enum CLASS_MAGE = 2; + +enum { + SKILL_VERY_EASY, + SKILL_EASY, + SKILL_NORMAL, + SKILL_HARD, + SKILL_VERY_HARD +}; + +enum { + BLOCK_NOTHING, + BLOCK_CREATURES, + BLOCK_EVERYTHING, + BLOCK_RAILING, + BLOCK_PLAYERS +}; + +enum SCROLL = 0; +enum CARRY = 1; +enum SCROLL_AND_CARRY = 2; + +enum { + MOD_UNKNOWN, + MOD_ROCKET = 5, + MOD_R_SPLASH, + MOD_PLASMARIFLE, + MOD_BFG_BOOM, + MOD_BFG_SPLASH, + MOD_CHAINSAW, + MOD_SSHOTGUN, + MOD_WATER, + MOD_SLIME, + MOD_LAVA, + MOD_CRUSH, + MOD_TELEFRAG, + MOD_FALLING, + MOD_SUICIDE, + MOD_BARREL, + MOD_EXIT, + MOD_SPLASH, + MOD_HIT, + MOD_RAILGUN, + MOD_ICE, + MOD_DISINTEGRATE, + MOD_POISON, + MOD_ELECTRIC +}; + +enum MOVIE_PLAYED = 0; +enum MOVIE_PLAYED_NOVIDEO = 1; +enum MOVIE_PLAYED_ABORTED = 2; +enum MOVIE_FAILED = -1; + +enum { + PROP_FROZEN, + PROP_NOTARGET, + PROP_INSTANTWEAPONSWITCH, + PROP_FLY, + PROP_TOTALLYFROZEN, + PROP_INVULNERABILITY, + PROP_STRENGTH, + PROP_INVISIBILITY, + PROP_RADIATIONSUIT, + PROP_ALLMAP, + PROP_INFRARED, + PROP_WEAPONLEVEL2, + PROP_FLIGHT, + PROP_SPEED = 15, + PROP_BUDDHA +}; + +enum { + INPUT_OLDBUTTONS, + INPUT_BUTTONS, + INPUT_PITCH, + INPUT_YAW, + INPUT_ROLL, + INPUT_FORWARDMOVE, + INPUT_SIDEMOVE, + INPUT_UPMOVE +}; + +enum { + MODINPUT_OLDBUTTONS = 8, + MODINPUT_BUTTONS, + MODINPUT_PITCH, + MODINPUT_YAW, + MODINPUT_ROLL, + MODINPUT_FORWARDMOVE, + MODINPUT_SIDEMOVE, + MODINPUT_UPMOVE +}; + +enum BT_ATTACK = 0x1; +enum BT_USE = 0x2; +enum BT_JUMP = 0x4; +enum BT_CROUCH = 0x8; +enum BT_TURN180 = 0x10; +enum BT_ALTATTACK = 0x20; +enum BT_RELOAD = 0x40; +enum BT_ZOOM = 0x80; +enum BT_SPEED = 0x100; +enum BT_STRAFE = 0x200; +enum BT_MOVERIGHT = 0x400; +enum BT_MOVELEFT = 0x800; +enum BT_BACK = 0x1000; +enum BT_FORWARD = 0x2000; +enum BT_RIGHT = 0x4000; +enum BT_LEFT = 0x8000; +enum BT_LOOKUP = 0x10000; +enum BT_LOOKDOWN = 0x20000; +enum BT_MOVEUP = 0x40000; +enum BT_MOVEDOWN = 0x80000; +enum BT_SHOWSCORES = 0x100000; +enum BT_USER1 = 0x200000; +enum BT_USER2 = 0x400000; +enum BT_USER3 = 0x800000; +enum BT_USER4 = 0x1000000; + +enum { + CR_UNTRANSLATED = -1, + CR_BRICK, + CR_TAN, + CR_GRAY, + CR_GREY = CR_GRAY, + CR_GREEN, + CR_BROWN, + CR_GOLD, + CR_RED, + CR_BLUE, + CR_ORANGE, + CR_WHITE, + CR_YELLOW, + CR_BLACK = 12, + CR_LIGHTBLUE, + CR_CREAM, + CR_OLIVE, + CR_DARKGREEN, + CR_DARKRED, + CR_DARKBROWN, + CR_PURPLE, + CR_DARKGRAY, + CR_DARKGREY = CR_DARKGRAY, + CR_CYAN +}; + +enum HUDMSG_PLAIN = 0; +enum HUDMSG_FADEOUT = 1; +enum HUDMSG_TYPEON = 2; +enum HUDMSG_FADEINOUT = 3; +enum HUDMSG_LOG = 0x80000000; +enum HUDMSG_COLORSTRING = 0x40000000; +enum HUDMSG_ADDBLEND = 0x20000000; +enum HUDMSG_ALPHA = 0x10000000; +enum HUDMSG_NOWRAP = 0x8000000; +enum HUDMSG_LAYER_OVERHUD = 0x0; +enum HUDMSG_LAYER_UNDERHUD = 0x1000; +enum HUDMSG_LAYER_OVERMAP = 0x2000; +enum HUDMSG_NOTWITH3DVIEW = 0x10000; +enum HUDMSG_NOTWITHFULLMAP = 0x20000; +enum HUDMSG_NOTWITHOVERLAYMAP = 0x40000; + +enum { + MARINEWEAPON_DUMMY, + MARINEWEAPON_FIST, + MARINEWEAPON_BERSERKFIST, + MARINEWEAPON_CHAINSAW, + MARINEWEAPON_PISTOL, + MARINEWEAPON_SHOTGUN, + MARINEWEAPON_SUPERSHOTGUN, + MARINEWEAPON_CHAINGUN, + MARINEWEAPON_ROCKETLAUNCHER, + MARINEWEAPON_PLASMARIFLE, + MARINEWEAPON_RAILGUN, + MARINEWEAPON_BFG +}; + +enum { + APROP_HEALTH, + APROP_SPEED, + APROP_DAMAGE, + APROP_ALPHA, + APROP_RENDERSTYLE, + APROP_SEESOUND, + APROP_ATTACKSOUND, + APROP_PAINSOUND, + APROP_DEATHSOUND, + APROP_ACTIVESOUND, + APROP_AMBUSH, + APROP_INVULNERABLE, + APROP_JUMPZ, + APROP_CHASEGOAL, + APROP_FRIGHTENED, + APROP_GRAVITY, + APROP_FRIENDLY, + APROP_SPAWNHEALTH, + APROP_DROPPED, + APROP_NOTARGET, + APROP_SPECIES, + APROP_NAMETAG, + APROP_SCORE, + APROP_NOTRIGGER, + APROP_DAMAGEFACTOR, + APROP_MASTERTID, + APROP_TARGETTID, + APROP_TRACERTID, + APROP_WATERLEVEL, + APROP_SCALEX, + APROP_SCALEY, + APROP_DORMANT, + APROP_MASS, + APROP_ACCURACY, + APROP_STAMINA, + APROP_HEIGHT, + APROP_RADIUS, + APROP_REACTIONTIME, + APROP_MELEERANGE, + APROP_VIEWHEIGHT, + APROP_ATTACKZOFFSET, + APROP_STENCILCOLOR +}; + +enum { + STYLE_NONE, + STYLE_NORMAL, + STYLE_FUZZY, + STYLE_SOULTRANS, + STYLE_OPTFUZZY, + STYLE_STENCIL, + STYLE_ADDSTENCIL, + STYLE_ADDSHADED, + STYLE_TRANSLUCENT = 64, + STYLE_ADD, + STYLE_SHADED, + STYLE_TRANSLUCENTSTENCIL, + STYLE_SHADOW, + STYLE_SUBTRACT +}; + +enum { + LEVELINFO_PAR_TIME, + LEVELINFO_CLUSTERNUM, + LEVELINFO_LEVELNUM, + LEVELINFO_TOTAL_SECRETS, + LEVELINFO_FOUND_SECRETS, + LEVELINFO_TOTAL_ITEMS, + LEVELINFO_FOUND_ITEMS, + LEVELINFO_TOTAL_MONSTERS, + LEVELINFO_KILLED_MONSTERS, + LEVELINFO_SUCK_TIME +}; + +enum { + PLAYERINFO_TEAM, + PLAYERINFO_AIMDIST, + PLAYERINFO_COLOR, + PLAYERINFO_GENDER, + PLAYERINFO_NEVERSWITCH, + PLAYERINFO_MOVEBOB, + PLAYERINFO_STILLBOB, + PLAYERINFO_PLAYERCLASS, + PLAYERINFO_FOV, + PLAYERINFO_DESIREDFOV +}; + +enum NOT_BOTTOM = 1; +enum NOT_MIDDLE = 2; +enum NOT_TOP = 4; +enum NOT_FLOOR = 8; +enum NOT_CEILING = 16; + +enum DAMAGE_PLAYERS = 1; +enum DAMAGE_NONPLAYERS = 2; +enum DAMAGE_IN_AIR = 4; +enum DAMAGE_SUBCLASSES_PROTECT = 8; + +enum MRF_OLDEFFECTS = 0x0; +enum MRF_ADDSTAMINA = 0x1; +enum MRF_FULLHEALTH = 0x2; +enum MRF_UNDOBYTOMEOFPOWER = 0x4; +enum MRF_UNDOBYCHAOSDEVICE = 0x8; +enum MRF_FAILNOTELEFRAG = 0x10; +enum MRF_FAILNOLAUGH = 0x20; +enum MRF_WHENINVULNERABLE = 0x40; +enum MRF_LOSEACTUALWEAPON = 0x80; +enum MRF_NEWTIDBEHAVIOUR = 0x100; +enum MRF_UNDOBYDEATH = 0x200; +enum MRF_UNDOBYDEATHFORCED = 0x400; +enum MRF_UNDOBYDEATHSAVES = 0x800; + +enum { + T_ROCK1 = 41, + T_ROCK2, + T_ROCK3, + T_DIRT1, + T_DIRT2, + T_DIRT3, + T_DIRT4, + T_DIRT5, + T_DIRT6, + T_STAINEDGLASS1 = 54, + T_STAINEDGLASS2, + T_STAINEDGLASS3, + T_STAINEDGLASS4, + T_STAINEDGLASS5, + T_STAINEDGLASS6, + T_STAINEDGLASS7, + T_STAINEDGLASS8, + T_STAINEDGLASS9, + T_STAINEDGLASS0 +}; + +enum { + T_NONE, + T_SHOTGUY, + T_CHAINGUY, + T_BARON, + T_ZOMBIE, + T_IMP, + T_ARACHNOTRON, + T_SPIDERMASTERMIND, + T_DEMON, + T_SPECTRE, + T_IMPFIREBALL, + T_CLIP, + T_SHELLS, + T_CACODEMON = 19, + T_REVENANT, + T_BRIDGE, + T_ARMORBONUS, + T_STIMPACK, + T_MEDKIT, + T_SOULSPHERE, + T_SHOTGUN = 27, + T_CHAINGUN, + T_ROCKETLAUNCHER, + T_PLASMAGUN, + T_BFG, + T_CHAINSAW, + T_SUPERSHOTGUN, + T_PLASMABOLT = 51, + T_TRACER = 53, + T_GREENARMOR = 68, + T_BLUEARMOR, + T_CELL = 75, + T_BLUEKEYCARD = 85, + T_REDKEYCARD, + T_YELLOWKEYCARD, + T_YELLOWSKULLKEY, + T_REDSKULLKEY, + T_BLUESKULLKEY, + T_TEMPLARGEFLAME = 98, + T_STEALTHBARON = 100, + T_STEALTHKNIGHT, + T_STEALTHZOMBIE, + T_STEALTHSHOTGUY, + T_LOSTSOUL = 110, + T_VILE, + T_MANCUBUS, + T_HELLKNIGHT, + T_CYBERDEMON, + T_PAINELEMENTAL, + T_WOLFSS, + T_STEALTHARACHNOTRON, + T_STEALTHVILE, + T_STEALTHCACODEMON, + T_STEALTHCHAINGUY, + T_STEALTHSERGEANT, + T_STEALTHIMP, + T_STEALTHMANCUBUS, + T_STEALTHREVENANT, + T_BARREL, + T_CACODEMONSHOT, + T_ROCKET, + T_BFGSHOT, + T_ARACHNOTRONPLASMA, + T_BLOOD, + T_PUFF, + T_MEGASPHERE, + T_INVULNERABILITY, + T_BERSERK, + T_INVISIBILITY, + T_IRONFEET, + T_COMPUTERMAP, + T_LIGHTAMP, + T_AMMOBOX, + T_ROCKETAMMO, + T_ROCKETBOX, + T_BATTERY, + T_SHELLBOX, + T_BACKPACK, + T_GUTS, + T_BLOODPOOL, + T_BLOODPOOL1, + T_BLOODPOOL2, + T_FLAMINGBARREL, + T_BRAINS, + T_SCRIPTEDMARINE, + T_HEALTHBONUS, + T_MANCUBUSSHOT, + T_BARONBALL +}; + +enum { + T_CLINK = 1, + T_MUMMYLEADER, + T_BEAST, + T_MUMMY, + T_KNIGHT = 6, + T_IMPLEADER, + T_MUMMYGHOST, + T_MUMMYLEADERGHOST, + T_WIMPYWANDAMMO = 11, + T_HEFTYWANDAMMO, + T_ITEMEGG = 14, + T_ITEMFLIGHT, + T_ITEMTELEPORT = 18, + T_WIZARD, + T_IRONLICH, + T_ITEMHEALTHPOTION = 23, + T_ITEMHEALTHFLASH, + T_ITEMHEALTHFLASK = T_ITEMHEALTHFLASH, + T_ITEMHEALTHFULL, + T_CROSSBOW = 27, + T_BLASTER, + T_PHOENIXROD, + T_SKULLROD, + T_MACE, + T_GAUNTLETS, + T_WIMPYCROSSBOWAMMO, + T_HEFTYCROSSBOWAMMO, + T_WIMPYMACEAMMO, + T_HEFTYMACEAMMO, + T_WIMPYBLASTERAMMO, + T_HEFTYBLASTERAMMO, + T_MORPHBLAST = 40, + T_SHIELD1 = 68, + T_SHIELD2, + T_ITEMTIMEBOMB = 72, + T_ITEMTORCH, + T_BLUEKEY = 85, + T_GREENKEY, + T_YELLOWKEY, + T_SOUND_WIND = 110, + T_SOUND_WATERFALL, + T_BEASTBALL = 120, + T_FEATHER, + T_CHICKEN, + T_VOLCANOBALL, + T_TINYVOLCANOBALL, + T_POD, + T_PODGENERATOR, + T_KNIGHTAXE, + T_KNIGHTBLOODAXE, + T_KNIGHTGHOST, + T_MUMMYHEAD = 131, + T_SNAKE, + T_ITEMINVULNERABILITY, + T_ITEMTOME, + T_ITEMINVISIBILITY, + T_ITEMBAGOFHOLDING, + T_ITEMALLMAP, + T_SNAKEPROJECTILE, + T_SNAKEPROJECTILEBIG, + T_WIZARDSHOT, + T_DSPARILTELEPORTDEST, + T_DSPARILONSERPENT, + T_DSPARILALONE, + T_SERPENTFIREBALL, + T_DSPARILBLUESHOT, + T_DSPARILWIZARDSPAWNER, + T_CROSSBOWMAINBLAST, + T_CROSSBOWMINIBLAST, + T_CROSSBOWPOWERBLAST, + T_VOLCANO, + T_POWERWANDMINIBLAST, + T_POWERWANDBIGGERBLAST, + T_DEATHBALL, + T_NOGRAVITYMACEBALL, + T_BOUNCYMACEBALL, + T_HEAVYMACEBALL, + T_RIPPER, + T_WIMPYSKULLRODAMMO, + T_HEFTYSKULLRODAMMO, + T_SKULLRODBLAST, + T_WIMPYPHOENIXRODAMMO, + T_HEFTYPHOENIXRODAMMO, + T_PHOENIXSHOT, + T_IRONLICHBLUESHOT, + T_WHIRLWIND, + T_REDTELEGLITTER, + T_BLUETELEGLITTER +}; + +enum { + T_CENTAUR = 1, + T_CENTAURLEADER, + T_DEMON1, + T_ETTIN, + T_FIREGARGOYLE, + T_WATERLURKER, + T_WATERLURKERLEADER, + T_WRAITH, + T_WRAITHBURIED, + T_FIREBALL1, + T_MANA1, + T_MANA2, + T_ITEMBOOTS, + T_ITEMPORK, + T_ITEMSUMMON = 16, + T_ITEMTPORTOTHER, + T_BISHOP = 19, + T_ICEGOLEM, + T_DRAGONSKINBRACERS = 22, + T_ITEMBOOSTMANA = 26, + T_FIGHTERAXE, + T_FIGHTERHAMMER, + T_FIGHTERSWORD1, + T_FIGHTERSWORD2, + T_FIGHTERSWORD3, + T_CLERICSTAFF, + T_CLERICHOLY1, + T_CLERICHOLY2, + T_CLERICHOLY3, + T_MAGESHARDS, + T_MAGESTAFF1, + T_MAGESTAFF2, + T_MAGESTAFF3, + T_ARROW = 50, + T_DART, + T_POISONDART, + T_RIPPERBALL, + T_BLADE = 64, + T_ICESHARD, + T_FLAME_SMALL, + T_FLAME_LARGE, + T_MESHARMOR, + T_FALCONSHIELD, + T_PLATINUMHELM, + T_AMULETOFWARDING, + T_ITEMFLECHETTE, + T_ITEMREPULSION = 74, + T_MANA3, + T_PUZZSKULL, + T_PUZZGEMBIG, + T_PUZZGEMRED, + T_PUZZGEMGREEN1, + T_PUZZGEMGREEN2, + T_PUZZGEMBLUE1, + T_PUZZGEMBLUE2, + T_PUZZBOOK1, + T_PUZZBOOK2, + T_METALKEY, + T_SMALLMETALKEY, + T_AXEKEY, + T_FIREKEY, + T_EMERALDKEY, + T_MACEKEY, + T_SILVERKEY, + T_RUSTYKEY, + T_HORNKEY, + T_SERPENTKEY, + T_WATERDRIP, + T_TEMPSMALLFLAME, + T_PERMSMALLFLAME, + T_PERMLARGEFLAME = 99, + T_DEMON_MASH, + T_DEMON2_MASH, + T_ETTIN_MASH, + T_CENTAUR_MASH, + T_THRUSTSPIKEUP, + T_THRUSTSPIKEDOWN, + T_FLESH_DRIP1, + T_FLESH_DRIP2, + T_SPARK_DRIP +}; + +enum ACTOR_NONE = 0x0; +enum ACTOR_WORLD = 0x1; +enum ACTOR_PLAYER = 0x2; +enum ACTOR_BOT = 0x4; +enum ACTOR_VOODOODOLL = 0x8; +enum ACTOR_MONSTER = 0x10; +enum ACTOR_ALIVE = 0x20; +enum ACTOR_DEAD = 0x40; +enum ACTOR_MISSILE = 0x80; +enum ACTOR_GENERIC = 0x100; + +enum { + SECSEQ_FLOOR = 1, + SECSEQ_CEILING, + SECSEQ_FULLHEIGHT, + SECSEQ_INTERIOR +}; + +enum CHAN_AUTO = 0; +enum CHAN_WEAPON = 1; +enum CHAN_VOICE = 2; +enum CHAN_ITEM = 3; +enum CHAN_BODY = 4; +enum CHAN_LISTENERZ = 0x8; +enum CHAN_MAYBE_LOCAL = 0x10; +enum CHAN_UI = 0x20; +enum CHAN_NOPAUSE = 0x40; + +enum ATTN_NONE = 0; +enum ATTN_NORM = 1.0; +enum ATTN_IDLE = 1.001; +enum ATTN_STATIC = 3.0; + +enum { + SOUND_SEE, + SOUND_ATTACK, + SOUND_PAIN, + SOUND_DEATH, + SOUND_ACTIVE, + SOUND_USE, + SOUND_BOUNCE, + SOUND_WALLBOUNCE, + SOUND_CRUSHPAIN, + SOUND_HOWL +}; + +enum SDF_ABSANGLE = 0x1; +enum SDF_PERMANENT = 0x2; + +enum AAPTR_DEFAULT = 0x0; +enum AAPTR_NULL = 0x1; +enum AAPTR_TARGET = 0x2; +enum AAPTR_MASTER = 0x4; +enum AAPTR_TRACER = 0x8; +enum AAPTR_PLAYER_GETTARGET = 0x10; +enum AAPTR_PLAYER_GETCONVERSATION = 0x20; +enum AAPTR_PLAYER1 = 0x40; +enum AAPTR_PLAYER2 = 0x80; +enum AAPTR_PLAYER3 = 0x100; +enum AAPTR_PLAYER4 = 0x200; +enum AAPTR_PLAYER5 = 0x400; +enum AAPTR_PLAYER6 = 0x800; +enum AAPTR_PLAYER7 = 0x1000; +enum AAPTR_PLAYER8 = 0x2000; +enum AAPTR_FRIENDPLAYER = 0x4000; + +enum PTROP_UNSAFETARGET = 0x1; +enum PTROP_UNSAFEMASTER = 0x2; +enum PTROP_NOSAFEGUARDS = PTROP_UNSAFETARGET | PTROP_UNSAFEMASTER; + +enum SPAC_NONE = 0x0; +enum SPAC_CROSS = 0x1; +enum SPAC_USE = 0x2; +enum SPAC_MCROSS = 0x4; +enum SPAC_IMPACT = 0x8; +enum SPAC_PUSH = 0x10; +enum SPAC_PCROSS = 0x20; +enum SPAC_ANYCROSS = 0x40; +enum SPAC_MUSE = 0x80; +enum SPAC_MPUSH = 0x100; +enum SPAC_USEBACK = 0x200; + +enum TEAM_BLUE = 0; +enum TEAM_RED = 1; +enum NO_TEAM = 2; + +enum { + TPROP_NAME, + TPROP_SCORE, + TPROP_ISVALID, + TPROP_NUMPLAYERS, + TPROP_NUMLIVEPLAYERS, + TPROP_TEXTCOLOR, + TPROP_PLAYERSTARTNUM, + TPROP_SPREAD, + TPROP_CARRIER, + TPROP_ASSISTER, + TPROP_FRAGCOUNT, + TPROP_DEATHCOUNT, + TPROP_WINCOUNT, + TPROP_POINTCOUNT, + TPROP_RETURNTICS, + TPROP_TEAMITEM, + TPROP_WINNERTHEME, + TPROP_LOSERTHEME +}; + +enum { + IS_WAITINGFORPLAYERS, + IS_FIRSTCOUNTDOWN, + IS_INPROGRESS, + IS_BOSSFIGHT, + IS_WAVECOMPLETE, + IS_COUNDOWN +}; + +enum { + T_GRENADE = 216, + T_BFG10KSHOT, + T_DARKIMPFIREBALL, + T_CACOLANTERNSHOT, + T_ABADDONSHOT = 221 +}; + +enum { + T_DARKIMP = 155, + T_BLOODDEMON, + T_SSGGUY, + T_HECTEBUS, + T_CACOLANTERN, + T_BELPHEGOR = 215, + T_ABADDON = 220 +}; + +enum { + T_PISTOL = 162, + T_GRENADELAUNCHER, + T_RAILGUN, + T_BFG10000, + T_MINIGUN = 214 +}; + +enum { + T_MAXHEALTHBONUS = 166, + T_MAXARMORBONUS, + T_REDARMOR +}; + +enum { + T_TURBOSPHERE = 169, + T_ANTIGRAVBELT, + T_TIMEFREEZER, + T_INFRAGOGGLES, + T_INFRATRACKER, + T_TRANSLUCENCY, + T_DOOMSPHERE, + T_RANDOMPOWERUP +}; + +enum { + T_BLUEFLAG = 177, + T_REDFLAG, + T_WHITEFLAG +}; + +enum { + T_STRENGTH = 180, + T_RAGE, + T_DRAIN, + T_SPREAD, + T_RESISTANCE, + T_REGENERATION, + T_PROSPERITY, + T_REFLECTION, + T_HIGHJUMP, + T_HASTE +}; + +enum { + EV_KEYDOWN = 1, + EV_KEYREPEAT, + EV_KEYUP, + EV_CHAR, + EV_MOUSEMOVE, + EV_LBUTTONDOWN, + EV_LBUTTONUP, + EV_LBUTTONDBLCLICK, + EV_MBUTTONDOWN, + EV_MBUTTONUP, + EV_MBUTTONDBLCLICK, + EV_RBUTTONDOWN, + EV_RBUTTONUP, + EV_RBUTTONDBLCLICK, + EV_WHEELDOWN, + EV_WHEELUP +}; + +enum GKM_SHIFT = 0x100; +enum GKM_CTRL = 0x200; +enum GKM_ALT = 0x400; +enum GKM_LBUTTON = 0x800; +enum GKM_MBUTTON = 0x1000; +enum GKM_RBUTTON = 0x2000; + +enum { + GK_PGDN = 1, + GK_PGUP, + GK_HOME, + GK_END, + GK_LEFT, + GK_RIGHT, + GK_ALERT, + GK_BACKSPACE, + GK_TAB, + GK_LINEFEED, + GK_DOWN = GK_LINEFEED, + GK_VTAB, + GK_UP = GK_VTAB, + GK_FORMFEED, + GK_RETURN, + GK_F1, + GK_F2, + GK_F3, + GK_F4, + GK_F5, + GK_F6, + GK_F7, + GK_F8, + GK_F9, + GK_F10, + GK_F11, + GK_F12, + GK_DEL, + GK_ESCAPE, + GK_FREE1, + GK_FREE2, + GK_FREE3, + GK_CESCAPE +}; + +enum CHANGELEVEL_KEEPFACING = 0x1; +enum CHANGELEVEL_RESETINVENTORY = 0x2; +enum CHANGELEVEL_NOMONSTERS = 0x4; +enum CHANGELEVEL_CHANGESKILL = 0x8; +enum CHANGELEVEL_NOINTERMISSION = 0x10; +enum CHANGELEVEL_RESETHEALTH = 0x20; +enum CHANGELEVEL_PRERAISEWEAPON = 0x40; + +enum NO_CHANGE = 32767.0; + +enum SECF_SILENT = 0x1; +enum SECF_NOFALLINGDAMAGE = 0x2; +enum SECF_FLOORDROP = 0x4; +enum SECF_NORESPAWN = 0x8; + +enum BLOCKF_CREATURES = 0x1; +enum BLOCKF_MONSTERS = 0x2; +enum BLOCKF_PLAYERS = 0x4; +enum BLOCKF_FLOATERS = 0x8; +enum BLOCKF_PROJECTILES = 0x10; +enum BLOCKF_EVERYTHING = 0x20; +enum BLOCKF_RAILING = 0x40; +enum BLOCKF_USE = 0x80; +enum BLOCKF_SIGHT = 0x100; + +enum FOGP_DENSITY = 0; +enum FOGP_OUTSIDEDENSITY = 1; +enum FOGP_SKYFOG = 2; + +enum PRINTNAME_LEVELNAME = -1; +enum PRINTNAME_LEVEL = -2; +enum PRINTNAME_SKILL = -3; + +enum CSF_NOFAKEFLOORS = 0x1; +enum CSF_NOBLOCKALL = 0x2; + +enum FHF_NORANDOMPUFFZ = 0x1; + +enum { + GAMESTATE_UNSPECIFIED = -1, + GAMESTATE_WAITFORPLAYERS, + GAMESTATE_COUNTDOWN, + GAMESTATE_INPROGRESS, + GAMESTATE_INRESULTSEQUENCE +}; + +enum { + GAMEEVENT_PLAYERFRAGS, + GAMEEVENT_MEDALS, + GAMEEVENT_CAPTURES, + GAMEEVENT_TOUCHES, + GAMEEVENT_RETURNS, + GAMEEVENT_ROUND_STARTS, + GAMEEVENT_ROUND_ENDS, + GAMEEVENT_ROUND_ABORTED +}; + +enum DB_ORDER_DESC = false; +enum DB_ORDER_ASC = true; + +// Action specials +// Tail format: = , +int Polyobj_StartLine( int, int, int, int ) = 1, 0; +int Polyobj_RotateLeft( int, int, int ) = 2, 1; +int Polyobj_RotateRight( int, int, int ) = 3, 1; +int Polyobj_Move( int, int, int, int ) = 4, 1; +int Polyobj_ExplicitLine( int, int, int, int, int ) = 5, 0; +int Polyobj_MoveTimes8( int, int, int, int ) = 6, 1; +int Polyobj_DoorSwing( int, int, int, int ) = 7, 1; +int Polyobj_DoorSlide( int, int, int, int, int ) = 8, 1; +int Line_Horizon() = 9, 0; +int Door_Close( int, int, int = 0 ) = 10, 1; +int Door_Open( int, int, int = 0 ) = 11, 1; +int Door_Raise( int, int, int, int = 0 ) = 12, 1; +int Door_LockedRaise( int, int, int, int, int = 0 ) = 13, 1; +int Door_Animated( int, int, int, int = 0 ) = 14, 1; +int Autosave() = 15, 1; +int Transfer_WallLight( int, int ) = 16, 0; +int Thing_Raise( int ) = 17, 1; +int StartConversation( int, int = 0 ) = 18, 1; +int Thing_Stop( int ) = 19, 1; +int Floor_LowerByValue( int, int, int ) = 20, 1; +int Floor_LowerToLowest( int, int ) = 21, 1; +int Floor_LowerToNearest( int, int ) = 22, 1; +int Floor_RaiseByValue( int, int, int ) = 23, 1; +int Floor_RaiseToHighest( int, int ) = 24, 1; +int Floor_RaiseToNearest( int, int ) = 25, 1; +int Stairs_BuildDown( int, int, int, int, int ) = 26, 1; +int Stairs_BuildUp( int, int, int, int, int ) = 27, 1; +int Floor_RaiseAndCrush( int, int, int, int = 0 ) = 28, 1; +int Pillar_Build( int, int, int ) = 29, 1; +int Pillar_Open( int, int, int, int ) = 30, 1; +int Stairs_BuildDownSync( int, int, int, int ) = 31, 1; +int Stairs_BuildUpSync( int, int, int, int ) = 32, 1; +int ForceField() = 33, 1; +int ClearForceField( int ) = 34, 1; +int Floor_RaiseByValueTimes8( int, int, int ) = 35, 1; +int Floor_LowerByValueTimes8( int, int, int ) = 36, 1; +int Floor_MoveToValue( int, int, int, int = 0 ) = 37, 1; +int Ceiling_Waggle( int, int, int, int, int ) = 38, 1; +int Teleport_ZombieChanger( int, int ) = 39, 1; +int Ceiling_LowerByValue( int, int, int ) = 40, 1; +int Ceiling_RaiseByValue( int, int, int ) = 41, 1; +int Ceiling_CrushAndRaise( int, int, int, int = 0 ) = 42, 1; +int Ceiling_LowerAndCrush( int, int, int, int = 0 ) = 43, 1; +int Ceiling_CrushStop( int ) = 44, 1; +int Ceiling_CrushRaiseAndStay( int, int, int, int = 0 ) = 45, 1; +int Floor_CrushStop( int ) = 46, 1; +int Ceiling_MoveToValue( int, int, int, int = 0 ) = 47, 1; +int Sector_Attach3dMidTex( int, int, int ) = 48, 0; +int GlassBreak( int = 0 ) = 49, 1; +int ExtraFloor_LightOnly( int, int ) = 50, 0; +int Sector_SetLink( int, int, int, int ) = 51, 1; +int Scroll_Wall( int, int, int, int, int ) = 52, 1; +int Line_SetTextureOffset( int, int, int, int, int ) = 53, 1; +int Sector_ChangeFlags( int, int, int ) = 54, 1; +int Line_SetBlocking( int, int, int ) = 55, 1; +int Line_SetTextureScale( int, int, int, int, int ) = 56, 1; +int Sector_SetPortal( int, int, int, int, int ) = 57, 0; +int Sector_CopyScroller( int, int ) = 58, 0; +int Polyobj_Or_MoveToSpot( int, int, int ) = 59, 1; +int Plat_PerpetualRaise( int, int, int ) = 60, 1; +int Plat_Stop( int ) = 61, 1; +int Plat_DownWaitUpStay( int, int, int ) = 62, 1; +int Plat_DownByValue( int, int, int, int ) = 63, 1; +int Plat_UpWaitDownStay( int, int, int ) = 64, 1; +int Plat_UpByValue( int, int, int, int ) = 65, 1; +int Floor_LowerInstant( int, int, int ) = 66, 1; +int Floor_RaiseInstant( int, int, int ) = 67, 1; +int Floor_MoveToValueTimes8( int, int, int, int ) = 68, 1; +int Ceiling_MoveToValueTimes8( int, int, int, int ) = 69, 1; +int Teleport( int, int = 0, int = 0 ) = 70, 1; +int Teleport_NoFog( int, int = 0, int = 0, int = 0 ) = 71, 1; +int ThrustThing( int, int, int = 0, int = 0 ) = 72, 1; +int DamageThing( int, int = 0 ) = 73, 1; +int Teleport_NewMap( int, int, int = 0 ) = 74, 1; +int Teleport_EndGame() = 75, 1; +int TeleportOther( int, int, int ) = 76, 1; +int TeleportGroup( int, int, int, int, int ) = 77, 1; +int TeleportInSector( int, int, int, int, int = 0 ) = 78, 1; +int Thing_SetConversation( int, int ) = 79, 1; +int Acs_Execute( int, int, int = 0, int = 0, int = 0 ) = 80, 1; +int Acs_Suspend( int, int ) = 81, 1; +int Acs_Terminate( int, int ) = 82, 1; +int Acs_LockedExecute( int, int, int, int, int ) = 83, 1; +int Acs_ExecuteWithResult( int, int = 0, int = 0, int = 0 ) = 84, 1; +int Acs_LockedExecuteDoor( int, int, int, int, int ) = 85, 1; +int Polyobj_MoveToSpot( int, int, int ) = 86, 1; +int Polyobj_Stop( int ) = 87, 1; +int Polyobj_MoveTo( int, int, int, int ) = 88, 1; +int Polyobj_Or_MoveTo( int, int, int, int ) = 89, 1; +int Polyobj_Or_RotateLeft( int, int, int ) = 90, 1; +int Polyobj_Or_RotateRight( int, int, int ) = 91, 1; +int Polyobj_Or_Move( int, int, int, int ) = 92, 1; +int Polyobj_Or_MoveTimes8( int, int, int, int ) = 93, 1; +int Pillar_BuildAndCrush( int, int, int, int, int = 0 ) = 94, 1; +int FloorAndCeiling_LowerByValue( int, int, int ) = 95, 1; +int FloorAndCeiling_RaiseByValue( int, int, int ) = 96, 1; +int Ceiling_LowerAndCrushDist( int, int, int, int = 0, int = 0 ) = 97, 1; +int Sector_SetTranslucent( int, int, int, int ) = 98, 1; +int Floor_RaiseAndCrushDoom( int, int, int, int = 0 ) = 99, 1; +int Scroll_Texture_Left( int, int = 0 ) = 100, 0; +int Scroll_Texture_Right( int, int = 0 ) = 101, 0; +int Scroll_Texture_Up( int, int = 0 ) = 102, 0; +int Scroll_Texture_Down( int, int = 0 ) = 103, 0; +int Light_ForceLightning( int ) = 109, 1; +int Light_RaiseByValue( int, int ) = 110, 1; +int Light_LowerByValue( int, int ) = 111, 1; +int Light_ChangeToValue( int, int ) = 112, 1; +int Light_Fade( int, int, int ) = 113, 1; +int Light_Glow( int, int, int, int ) = 114, 1; +int Light_Flicker( int, int, int ) = 115, 1; +int Light_Strobe( int, int, int, int, int ) = 116, 1; +int Light_Stop( int ) = 117, 1; +int Plane_Copy( int, int, int, int, int ) = 118, 0; +int Thing_Damage( int, int, int = 0 ) = 119, 1; +int Radius_Quake( int, int, int, int, int ) = 120, 1; +int Line_SetIdentification( int, int, int, int, int ) = 121, 0; +int Thing_Move( int, int, int = 0 ) = 125, 1; +int Thing_SetSpecial( int, int, int, int, int ) = 127, 1; +int ThrustThingZ( int, int, int, int ) = 128, 1; +int UsePuzzleItem() = 129, 0; +int Thing_Activate( int ) = 130, 1; +int Thing_Deactivate( int ) = 131, 1; +int Thing_Remove( int ) = 132, 1; +int Thing_Destroy( int, int = 0 ) = 133, 1; +int Thing_Projectile( int, int, int, int, int ) = 134, 1; +int Thing_Spawn( int, int, int, int = 0 ) = 135, 1; +int Thing_ProjectileGravity( int, int, int, int, int ) = 136, 1; +int Thing_SpawnNoFog( int, int, int, int = 0 ) = 137, 1; +int Floor_Waggle( int, int, int, int, int ) = 138, 1; +int Thing_SpawnFacing( int, int, int = 0, int = 0 ) = 139, 1; +int Sector_ChangeSound( int, int ) = 140, 1; +int Player_SetTeam( int ) = 145, 1; +int Team_Score( int, int ) = 152, 1; +int Team_GivePoints( int, int, int ) = 153, 1; +int Teleport_NoStop( int, int, int = 0 ) = 154, 1; +int SetGlobalFogParameter( int, int ) = 157, 1; +int Fs_Excute( int, int = 0, int = 0, int = 0 ) = 158, 1; +int Sector_SetPlaneReflection( int, int, int ) = 159, 1; +int Sector_Set3dFloor( int, int, int, int, int ) = 160, 0; +int Sector_SetContents( int, int, int ) = 161, 0; +int Ceiling_CrushAndRaiseDist( int, int, int, int, int = 0 ) = 168, 1; +int Generic_Crusher2( int, int, int, int, int ) = 169, 1; +int Sector_SetCeilingScale2( int, int, int ) = 170, 1; +int Sector_SetFloorScale2( int, int, int ) = 171, 1; +int Plat_UpNearestWaitDownStay( int, int, int ) = 172, 1; +int NoiseAlert( int, int ) = 173, 1; +int SendToCommunicator( int, int, int, int ) = 174, 1; +int Thing_ProjectileIntercept( int, int, int, int, int ) = 175, 1; +int Thing_ChangeTid( int, int ) = 176, 1; +int Thing_Hate( int, int, int = 0 ) = 177, 1; +int Thing_ProjectileAimed( int, int, int, int, int = 0 ) = 178, 1; +int ChangeSkill( int ) = 179, 1; +int Thing_SetTranslation( int, int ) = 180, 1; +int Plane_Align( int, int, int ) = 181, 0; +int Line_Mirror() = 182, 0; +int Line_AlignCeiling( int, int ) = 183, 1; +int Line_AlignFloor( int, int ) = 184, 1; +int Sector_SetRotation( int, int, int ) = 185, 1; +int Sector_SetCeilingPanning( int, int, int, int, int ) = 186, 1; +int Sector_SetFloorPanning( int, int, int, int, int ) = 187, 1; +int Sector_SetCeilingScale( int, int, int, int, int ) = 188, 1; +int Sector_SetFloorScale( int, int, int, int, int ) = 189, 1; +int Static_Init( int, int, int, int ) = 190, 0; +int SetPlayerProperty( int, int, int ) = 191, 1; +int Ceiling_LowerToHighestFloor( int, int ) = 192, 1; +int Ceiling_LowerInstant( int, int, int ) = 193, 1; +int Ceiling_RaiseInstant( int, int, int ) = 194, 1; +int Ceiling_CrushRaiseAndStayA( int, int, int, int, int = 0 ) = 195, 1; +int Ceiling_CrushAndRaiseA( int, int, int, int, int = 0 ) = 196, 1; +int Ceiling_CrushAndRaiseSilentA( int, int, int, int, int = 0 ) = 197, 1; +int Ceiling_RaiseByValueTimes8( int, int, int ) = 198, 1; +int Ceiling_LowerByValueTImes8( int, int, int ) = 199, 1; +int Generic_Floor( int, int, int, int, int ) = 200, 1; +int Generic_Ceiling( int, int, int, int, int ) = 201, 1; +int Generic_Door( int, int, int, int, int ) = 202, 1; +int Generic_Lift( int, int, int, int, int ) = 203, 1; +int Generic_Stairs( int, int, int, int, int ) = 204, 1; +int Generic_Crusher( int, int, int, int, int ) = 205, 1; +int Plat_DownWaitUpStayLip( int, int, int, int, int = 0 ) = 206, 1; +int Plat_PerpetualRaiseLip( int, int, int, int ) = 207, 1; +int TranslucentLine( int, int, int = 0 ) = 208, 1; +int Transfer_Heights( int, int ) = 209, 0; +int Transfer_FloorLight( int ) = 210, 0; +int Transfer_CeilingLight( int ) = 211, 0; +int Sector_SetColor( int, int, int, int, int = 0 ) = 212, 1; +int Sector_SetFade( int, int, int, int ) = 213, 1; +int Sector_SetDamage( int, int, int ) = 214, 1; +int Teleport_Line( int, int ) = 215, 1; +int Sector_SetGravity( int, int, int ) = 216, 1; +int Stairs_BuildUpDoom( int, int, int, int, int ) = 217, 1; +int Sector_SetWind( int, int, int, int ) = 218, 1; +int Sector_SetFriction( int, int ) = 219, 1; +int Sector_SetCurrent( int, int, int, int ) = 220, 1; +int Scroll_Texture_Both( int, int, int, int, int ) = 221, 1; +int Scroll_Texture_Model( int, int ) = 222, 0; +int Scroll_Floor( int, int, int, int ) = 223, 1; +int Scroll_Ceiling( int, int, int, int ) = 224, 1; +int Scroll_Texture_Offsets( int ) = 225, 0; +int Acs_ExecuteAlways( int, int, int = 0, int = 0, int = 0 ) = 226, 1; +int PointPush_SetForce( int, int, int, int ) = 227, 0; +int Plat_RaiseAndStayTx0( int, int, int = 0 ) = 228, 1; +int Thing_SetGoal( int, int, int, int = 0 ) = 229, 1; +int Plat_UpByValueStayTx( int, int, int ) = 230, 1; +int Plat_ToggleCeiling( int ) = 231, 1; +int Light_StrobeDoom( int, int, int ) = 232, 1; +int Light_MinNeighbor( int ) = 233, 1; +int Light_MaxNeighbor( int ) = 234, 1; +int Floor_TransferTrigger( int ) = 235, 1; +int Floor_TransferNumeric( int ) = 236, 1; +int ChangeCamera( int, int, int ) = 237, 1; +int Floor_RaiseToLowestCeiling( int, int ) = 238, 1; +int Floor_RaiseByValueTxTy( int, int, int ) = 239, 1; +int Floor_RaiseByTexture( int, int ) = 240, 1; +int Floor_LowerToLowestTxTy( int, int ) = 241, 1; +int Floor_LowerToHighest( int, int, int ) = 242, 1; +int Exit_Normal( int ) = 243, 1; +int Exit_Secret( int ) = 244, 1; +int Elevator_RaiseToNearest( int, int ) = 245, 1; +int Elevator_MoveToFloor( int, int ) = 246, 1; +int Elevator_LowerToNearest( int, int ) = 247, 1; +int HealThing( int, int = 0 ) = 248, 1; +int Door_CloseWaitOpen( int, int, int, int = 0 ) = 249, 1; +int Floor_Donut( int, int, int ) = 250, 1; +int FloorAndCeiling_LowerRaise( int, int, int, int = 0 ) = 251, 1; +int Ceiling_RaiseToNearest( int, int ) = 252, 1; +int Ceiling_LowerToLowest( int, int ) = 253, 1; +int Ceiling_LowerToFloor( int, int ) = 254, 1; +int Ceiling_CrushRaiseAndStaySilA( int, int, int, int, + int = 0 ) = 255, 1; + +// Extension functions +// Tail format: -= +int GetLineUdmfInt( int, str ) -= 1; +int GetLineUdmfFixed( int, str ) -= 2; +int GetThingUdmfInt( int, str ) -= 3; +int GetThingUdmfFixed( int, str ) -= 4; +int GetSectorUdmfInt( int, str ) -= 5; +int GetSectorUdmfFixed( int, str ) -= 6; +int GetSideUdmfInt( int, bool, str ) -= 7; +int GetSideUdmfFixed( int, bool, str ) -= 8; +int GetActorVelX( int ) -= 9; +int GetActorVelY( int ) -= 10; +int GetActorVelZ( int ) -= 11; +bool SetActivator( int ) -= 12; +bool SetActivatorToTarget( int ) -= 13; +int GetActorViewHeight( int ) -= 14; +int GetChar( str, int ) -= 15; +int GetAirSupply( int ) -= 16; +bool SetAirSupply( int, int ) -= 17; +void SetSkyScrollSpeed( int, int ) -= 18; +int GetArmorType( str, int ) -= 19; +int SpawnSpotForced( str, int, int = 0, int = 0 ) -= 20; +int SpawnSpotFacingForced( str, int, int = 0 ) -= 21; +bool CheckActorProperty( int, int, int ) -= 22; +bool SetActorVelocity( int, int, int, int, bool, bool ) -= 23; +void SetUserVariable( int, str, int ) -= 24; +int GetUserVariable( int, str ) -= 25; +void Radius_Quake2( int, int, int, int, int, str ) -= 26; +bool CheckActorClass( int, str ) -= 27; +void SetUserArray( int, str, int, int ) -= 28; +int GetUserArray( int, str, int ) -= 29; +void SoundSequenceOnActor( int, str ) -= 30; +void SoundSequenceOnSector( int, str, int ) -= 31; +void SoundSequenceOnPolyobj( int, str ) -= 32; +int GetPolyobjX( int ) -= 33; +int GetPolyobjY( int ) -= 34; +bool CheckSight( int, int, int ) -= 35; +int SpawnForced( str, int, int, int, int = 0, int = 0 ) -= 36; +void AnnouncerSound( str, int ) -= 37; +bool SetPointer( int, int, int = 0, int = 0 ) -= 38; +bool Acs_NamedExecute( str, int, int = 0, int = 0, int = 0 ) -= 39; +bool Acs_NamedSuspend( str, int ) -= 40; +bool Acs_NamedTerminate( str, int ) -= 41; +bool Acs_NamedLockedExecute( str, int, int, int, int ) -= 42; +bool Acs_NamedLockedExecuteDoor( str, int, int, int, int ) -= 43; +int Acs_NamedExecuteWithResult( str, int = 0, int = 0, int = 0 ) -= 44; +bool Acs_NamedExecuteAlways( str, int, int = 0, int = 0, int = 0 ) -= 45; +int UniqueTid( int = 0, int = 0 ) -= 46; +bool IsTidUsed( int ) -= 47; +int Sqrt( int ) -= 48; +int FixedSqrt( int ) -= 49; +int VectorLength( int, int ) -= 50; +void SetHudClipRect( int, int, int, int, int = 0 ) -= 51; +void SetHudWrapWidth( int ) -= 52; +bool SetCVar( str, int ) -= 53; +int GetUserCVar( int, str ) -= 54; +bool SetUserCVar( int, str, int ) -= 55; +str GetCVarString( str ) -= 56; +bool SetCVarString( str, str ) -= 57; +str GetUserCVarString( int, str ) -= 58; +bool SetUserCVarString( int, str, str ) -= 59; +void LineAttack( int, int, int, int, str, str, int, int = 0 ) -= 60; +void PlaySound( int, str, int, int, bool, int ) -= 61; +void StopSound( int, int ) -= 62; +int Strcmp( str, str, int = 0 ) -= 63; +int Stricmp( str, str, int = 0 ) -= 64; +int Strcasecmp( str, str, int = 0 ) -= 64; +str StrLeft( str, int ) -= 65; +str StrRight( str, int ) -= 66; +str StrMid( str, int, int ) -= 67; +str GetActorClass( int ) -= 68; +str GetWeapon() -= 69; +void SoundVolume( int, int, int ) -= 70; +void PlayActorSound( int, int, int = 0, int = 0.0, bool = false, + int = 0.0 ) -= 71; +int SpawnDecal( int, str, int = 0, int = 0.0, int = 0.0, int = 0.0 ) -= 72; +bool CheckFont( str ) -= 73; +int DropItem( int, str, int = 0, int = 0 ) -= 74; +bool CheckFlag( int, str ) -= 75; +void SetLineActivation( int, int ) -= 76; +int GetLineActivation( int ) -= 77; +int GetActorPowerupTics( int, str ) -= 78; +void ChangeActorAngle( int, int, bool = false ) -= 79; +void ChangeActorPitch( int, int, bool = false ) -= 80; +bool ResetMap() -= 100; +bool PlayerIsSpectator( int ) -= 101; +int ConsolePlayerNumber() -= 102; +int GetTeamProperty( int, int ) -= 103; +int GetPlayerLivesLeft( int ) -= 104; +bool SetPlayerLivesLeft( int, int ) -= 105; +bool KickFromGame( int, str ) -= 106; +int GetGamemodeState() -= 107; +void SetDBEntry( str, str, int ) -= 108; +int GetDBEntry( str, str ) -= 109; +void SetDBEntryString( str, str, str ) -= 110; +str GetDBEntryString( str, str ) -= 111; +void IncrementDBEntry( str, str, int ) -= 112; +bool PlayerIsLoggedIn( int ) -= 113; +str GetPlayerAccountName( int ) -= 114; +int QuerySortedDBEntries( str, int, int, bool ) -= 115; +int GetDBResultSize( int ) -= 116; +void ClearDBResultHandle( int ) -= 117; +str GetDBResultEntryNameString( int, int ) -= 118; +str GetDBResultEntryValueString( int, int ) -= 119; +int GetDBEntryRank( str, str, bool ) -= 120; + +// Dedicated functions +// Tail format: += , +void Delay( int ) += 55, 1; +int Random( int, int ) += 57, 0; +int ThingCount( int, int = 0 ) += 59, 0; +void TagWait( int ) += 61, 1; +void PolyWait( int ) += 63, 1; +void ChangeFloor( int, str ) += 65, 0; +void ChangeCeiling( int, str ) += 67, 0; +int LineSide() += 80, 0; +void ScriptWait( int ) += 81, 1; +void ClearLineSpecial() += 83, 0; +int PlayerCount() += 90, 0; +int GameType() += 91, 0; +int GameSkill() += 92, 0; +int Timer() += 93, 0; +void SectorSound( str, int ) += 94, 0; +void AmbientSound( str, int ) += 95, 0; +void SoundSequence( str ) += 96, 0; +void SetLineTexture( int, int, int, str ) += 97, 0; +void SetLineBlocking( int, int ) += 98, 0; +void SetLineSpecial( int, int, int = 0, int = 0, int = 0, int = 0, + int = 0 ) += 99, 0; +void ThingSound( int, str, int ) += 100, 0; +void ActivatorSound( str, int ) += 102, 0; +void LocalAmbientSound( str, int ) += 103, 0; +void SetLineMonsterBlocking( int, int ) += 104, 0; +bool IsMultiplayer() += 118, 0; +int PlayerTeam() += 119, 0; +int PlayerHealth() += 120, 0; +int PlayerArmorPoints() += 121, 0; +int PlayerFrags() += 122, 0; +int BlueCount() += 124, 0; +int BlueTeamCount() += 124, 0; +int RedCount() += 125, 0; +int RedTeamCount() += 125, 0; +int BlueScore() += 126, 0; +int BlueTeamScore() += 126, 0; +int RedScore() += 127, 0; +int RedTeamScore() += 127, 0; +bool IsOneFlagCtf() += 128, 0; +int GetInvasionWave() += 129, 0; +int GetInvasionState() += 130, 0; +void Music_Change( str, int ) += 132, 0; +void ConsoleCommand( str, int = 0, int = 0 ) += 134, 0; +bool SinglePlayer() += 135, 0; +int FixedMul( int, int ) += 136, 0; +int FixedDiv( int, int ) += 137, 0; +void SetGravity( int ) += 138, 0; +void SetAirControl( int ) += 140, 0; +void ClearInventory() += 142, 0; +void GiveInventory( str, int ) += 143, 0; +void TakeInventory( str, int ) += 145, 0; +int CheckInventory( str ) += 147, 0; +int Spawn( str, int, int, int, int = 0, int = 0 ) += 149, 0; +int SpawnSpot( str, int, int = 0, int = 0 ) += 151, 0; +void SetMusic( str, int = 0, int = 0 ) += 153, 0; +void LocalSetMusic( str, int = 0, int = 0 ) += 155, 0; +void SetFont( str ) += 165, 0; +void SetThingSpecial( int, int, int = 0, int = 0, int = 0, int = 0, + int = 0 ) += 180, 0; +void FadeTo( int, int, int, int, int ) += 190, 0; +void FadeRange( int, int, int, int, int, int, int, int, int ) += 191, 0; +void CancelFade() += 192, 0; +int PlayMovie( str ) += 193, 0; +void SetFloorTrigger( int, int, int, int = 0, int = 0, int = 0, + int = 0, int = 0 ) += 194, 0; +void SetCeilingTrigger( int, int, int, int = 0, int = 0, int = 0, + int = 0, int = 0 ) += 195, 0; +int GetActorX( int ) += 196, 0; +int GetActorY( int ) += 197, 0; +int GetActorZ( int ) += 198, 0; +int Sin( int ) += 220, 0; +int Cos( int ) += 221, 0; +int VectorAngle( int, int ) += 222, 0; +bool CheckWeapon( str ) += 223, 0; +bool SetWeapon( str ) += 224, 0; +void SetMarineWeapon( int, int ) += 244, 0; +void SetActorProperty( int, int, int ) += 245, 0; +int GetActorProperty( int, int ) += 246, 0; +int PlayerNumber() += 247, 0; +int ActivatorTid() += 248, 0; +void SetMarineSprite( int, str ) += 249, 0; +int GetScreenWidth() += 250, 0; +int GetScreenHeight() += 251, 0; +void Thing_Projectile2( int, int, int, int, int, int, int ) += 252, 0; +int StrLen( str ) += 253, 0; +void SetHudSize( int, int, bool ) += 254, 0; +int GetCvar( str ) += 255, 0; +void SetResultValue( int ) += 257, 0; +int GetLineRowOffset() += 258, 0; +int GetActorFloorZ( int ) += 259, 0; +int GetActorAngle( int ) += 260, 0; +int GetSectorFloorZ( int, int, int ) += 261, 0; +int GetSectorCeilingZ( int, int, int ) += 262, 0; +int GetSigilPieces() += 264, 0; +int GetLevelInfo( int ) += 265, 0; +void ChangeSky( str, str ) += 266, 0; +bool PlayerInGame( int ) += 267, 0; +bool PlayerIsBot( int ) += 268, 0; +void SetCameraToTexture( int, str, int ) += 269, 0; +int GetAmmoCapacity( str ) += 271, 0; +void SetAmmoCapacity( str, int ) += 272, 0; +void SetActorAngle( int, int ) += 276, 0; +void SpawnProjectile( int, str, int, int, int, int, int ) += 280, 0; +int GetSectorLightLevel( int ) += 281, 0; +int GetActorCeilingZ( int ) += 282, 0; +bool SetActorPosition( int, int, int, int, bool ) += 283, 0; +void ClearActorInventory( int ) += 284, 0; +void GiveActorInventory( int, str, int ) += 285, 0; +void TakeActorInventory( int, str, int ) += 286, 0; +int CheckActorInventory( int, str ) += 287, 0; +int ThingCountName( str, int ) += 288, 0; +int SpawnSpotFacing( str, int, int = 0 ) += 289, 0; +int PlayerClass( int ) += 290, 0; +int GetPlayerInfo( int, int ) += 326, 0; +void ChangeLevel( str, int, int, int = 0 ) += 327, 0; +void SectorDamage( int, int, str, str, int ) += 328, 0; +void ReplaceTextures( str, str, int = 0 ) += 329, 0; +int GetActorPitch( int ) += 331, 0; +void SetActorPitch( int, int ) += 332, 0; +int SetActorState( int, str, bool = false ) += 334, 0; +int Thing_Damage2( int, int, str ) += 335, 0; +int UseInventory( str ) += 336, 0; +int UseActorInventory( int, str ) += 337, 0; +bool CheckActorCeilingTexture( int, str ) += 338, 0; +bool CheckActorFloorTexture( int, str ) += 339, 0; +int GetActorLightLevel( int ) += 340, 0; +void SetMugShotState( str ) += 341, 0; +int ThingCountSector( str, int, int ) += 342, 0; +int ThingCountNameSector( str, int, int ) += 343, 0; +int CheckPlayerCamera( int ) += 344, 0; +int MorphActor( int, str = "", str = "", int = 0, int = 0, str = "", + str = "" ) += 345, 0; +int UnmorphActor( int, int = 0 ) += 346, 0; +int GetPlayerInput( int, int ) += 347, 0; +int ClassifyActor( int ) += 348, 0; + +// Format functions +// Tail format: *= +void Print( {} ) *= 86; +void PrintBold( {} ) *= 101; +void HudMessage( {}, int, int, int, int, int, int, int = 0.0, + int = 0.0 ) *= 161; +void HudMessageBold( {}, int, int, int, int, int, int, int = 0.0, + int = 0.0 ) *= 162; +void Log( {} ) *= 270; +str StrParam( {} ) *= 352; + +// Internal functions +// Tail format: /= +void Acs_ExecuteWait( int, int = 0, int = 0, int = 0, int = 0 ) /= 0; + +} \ No newline at end of file diff --git a/Build/Compilers/BCC/zcommon.acs b/Build/Compilers/BCC/zcommon.acs new file mode 100644 index 00000000..ce5b00de --- /dev/null +++ b/Build/Compilers/BCC/zcommon.acs @@ -0,0 +1,3 @@ +#include "std.acs" + +import upmost: region = std; \ No newline at end of file diff --git a/Build/Configurations/Includes/ZDoom_common.cfg b/Build/Configurations/Includes/ZDoom_common.cfg index 041b9172..a0115223 100644 --- a/Build/Configurations/Includes/ZDoom_common.cfg +++ b/Build/Configurations/Includes/ZDoom_common.cfg @@ -187,6 +187,9 @@ mapformat_hexen // The format interface handles the map data format formatinterface = "HexenMapSetIO"; + //mxd. The default script compiler to use + defaultscriptcompiler = "zdoom_acs.cfg"; + maplumpnames { include("Doom_misc.cfg", "hexenmaplumpnames"); @@ -295,6 +298,9 @@ mapformat_udmf // The format interface handles the map data format formatinterface = "UniversalMapSetIO"; + //mxd. The default script compiler to use + defaultscriptcompiler = "zdoom_acs.cfg"; + // Maximum length of texture name length in characters (0 for unlimited) // WARNING: changing this may destroy your WAD file. Only change it when // you know what you're doing! diff --git a/Build/Configurations/Includes/ZDoom_misc.cfg b/Build/Configurations/Includes/ZDoom_misc.cfg index a84213ed..e070890f 100644 --- a/Build/Configurations/Includes/ZDoom_misc.cfg +++ b/Build/Configurations/Includes/ZDoom_misc.cfg @@ -398,6 +398,7 @@ required = Lump is required to exist. blindcopy = Lump will be copied along with the map blindly. (useful for lumps Doom Builder doesn't use) nodebuild = The nodebuilder generates this lump. allowempty = The nodebuilder is allowed to leave this lump empty. +scriptbuild = This lump is a text-based script, which should be compiled using current script compiler; script = This lump is a text-based script. Specify the filename of the script configuration to use. */ @@ -428,7 +429,7 @@ hexenmaplumpnames { required = false; nodebuild = false; - script = "ZDoom_ACS.cfg"; + scriptbuild = true; } } @@ -474,7 +475,7 @@ udmfmaplumpnames { required = false; nodebuild = false; - script = "ZDoom_ACS.cfg"; + scriptbuild = true; } } diff --git a/Build/Configurations/Zandronum_DoomHexen.cfg b/Build/Configurations/Zandronum_DoomHexen.cfg index 39d60a6b..f687dff9 100644 --- a/Build/Configurations/Zandronum_DoomHexen.cfg +++ b/Build/Configurations/Zandronum_DoomHexen.cfg @@ -26,6 +26,9 @@ include("Includes\\ZDoom_common.cfg", "common"); // Settings common to Hexen map format include("Includes\\ZDoom_common.cfg", "mapformat_hexen"); +// mxd. Default script compiler +defaultscriptcompiler = "zandronum_acs.cfg"; + // Settings common to Doom games include("Includes\\Game_Doom.cfg"); diff --git a/Build/Configurations/Zandronum_DoomUDMF.cfg b/Build/Configurations/Zandronum_DoomUDMF.cfg index da30fc23..08bda09e 100644 --- a/Build/Configurations/Zandronum_DoomUDMF.cfg +++ b/Build/Configurations/Zandronum_DoomUDMF.cfg @@ -26,6 +26,9 @@ include("Includes\\ZDoom_common.cfg", "common"); // Settings common to text map format include("Includes\\ZDoom_common.cfg", "mapformat_udmf"); +// mxd. Default script compiler +defaultscriptcompiler = "zandronum_acs.cfg"; + // Settings common to Doom games include("Includes\\Game_Doom.cfg"); diff --git a/Build/Configurations/Zandronum_HereticHexen.cfg b/Build/Configurations/Zandronum_HereticHexen.cfg index 32a89c06..d97b8d50 100644 --- a/Build/Configurations/Zandronum_HereticHexen.cfg +++ b/Build/Configurations/Zandronum_HereticHexen.cfg @@ -26,6 +26,9 @@ include("Includes\\ZDoom_common.cfg", "common"); // Settings common to Hexen map format include("Includes\\ZDoom_common.cfg", "mapformat_hexen"); +// mxd. Default script compiler +defaultscriptcompiler = "zandronum_acs.cfg"; + // Settings common to Heretic games include("Includes\\Game_Heretic.cfg"); diff --git a/Build/Configurations/Zandronum_HereticUDMF.cfg b/Build/Configurations/Zandronum_HereticUDMF.cfg index aece09d8..addf0654 100644 --- a/Build/Configurations/Zandronum_HereticUDMF.cfg +++ b/Build/Configurations/Zandronum_HereticUDMF.cfg @@ -26,6 +26,9 @@ include("Includes\\ZDoom_common.cfg", "common"); // Settings common to text map format include("Includes\\ZDoom_common.cfg", "mapformat_udmf"); +// mxd. Default script compiler +defaultscriptcompiler = "zandronum_acs.cfg"; + // Settings common to Heretic games include("Includes\\Game_Heretic.cfg"); diff --git a/Build/Configurations/Zandronum_HexenHexen.cfg b/Build/Configurations/Zandronum_HexenHexen.cfg index 32d89f4c..e5cc0e96 100644 --- a/Build/Configurations/Zandronum_HexenHexen.cfg +++ b/Build/Configurations/Zandronum_HexenHexen.cfg @@ -26,6 +26,9 @@ include("Includes\\ZDoom_common.cfg", "common"); // Settings common to Hexen map format include("Includes\\ZDoom_common.cfg", "mapformat_hexen"); +// mxd. Default script compiler +defaultscriptcompiler = "zandronum_acs.cfg"; + // Settings common to Hexen games include("Includes\\Game_Hexen.cfg"); diff --git a/Build/Configurations/Zandronum_HexenUDMF.cfg b/Build/Configurations/Zandronum_HexenUDMF.cfg index 87573534..5077c150 100644 --- a/Build/Configurations/Zandronum_HexenUDMF.cfg +++ b/Build/Configurations/Zandronum_HexenUDMF.cfg @@ -26,6 +26,9 @@ include("Includes\\ZDoom_common.cfg", "common"); // Settings common to text map format include("Includes\\ZDoom_common.cfg", "mapformat_udmf"); +// mxd. Default script compiler +defaultscriptcompiler = "zandronum_acs.cfg"; + // Settings common to Hexen games include("Includes\\Game_Hexen.cfg"); diff --git a/Build/Configurations/Zandronum_StrifeHexen.cfg b/Build/Configurations/Zandronum_StrifeHexen.cfg index 622e0b18..d737554d 100644 --- a/Build/Configurations/Zandronum_StrifeHexen.cfg +++ b/Build/Configurations/Zandronum_StrifeHexen.cfg @@ -26,6 +26,9 @@ include("Includes\\ZDoom_common.cfg", "common"); // Settings common to Hexen map format include("Includes\\ZDoom_common.cfg", "mapformat_hexen"); +// mxd. Default script compiler +defaultscriptcompiler = "zandronum_acs.cfg"; + // Settings common to Strife games include("Includes\\Game_Strife.cfg"); diff --git a/Build/Configurations/Zandronum_StrifeUDMF.cfg b/Build/Configurations/Zandronum_StrifeUDMF.cfg index 6028cd99..b2adeedd 100644 --- a/Build/Configurations/Zandronum_StrifeUDMF.cfg +++ b/Build/Configurations/Zandronum_StrifeUDMF.cfg @@ -26,6 +26,9 @@ include("Includes\\ZDoom_common.cfg", "common"); // Settings common to text map format include("Includes\\ZDoom_common.cfg", "mapformat_udmf"); +// mxd. Default script compiler +defaultscriptcompiler = "zandronum_acs.cfg"; + // Settings common to Strife games include("Includes\\Game_Strife.cfg"); diff --git a/Build/Scripting/BCS.cfg b/Build/Scripting/BCS.cfg new file mode 100644 index 00000000..36e72287 --- /dev/null +++ b/Build/Scripting/BCS.cfg @@ -0,0 +1,1168 @@ +/*******************************************************************\ + Doom Builder Script highlighting definitions for BCS +\*******************************************************************/ + +// Compiler settings +compiler = "bcc"; +parameters = "-I \"%PT\" -I \"%PS\" %FI %FO"; +resultlump = "BEHAVIOR"; + +// Editor settings +description = "BCS script"; +codepage = 0; +extensions = "bcs"; +casesensitive = false; +insertcase = 0; // 0=Normal, 1=Lowercase, 2=Uppercase +lexer = 35; // CPP-style, case-insensitive +functionopen = "("; +functionclose = ")"; +argumentdelimiter = ","; +terminator = ";"; +keywordhelp = "http://www.zdoom.org/wiki/index.php?title=%K"; +snippetsdir = "acs"; +scripttype = 1; //0 = unknown script, 1 = acc, 2 = modeldef, 3 = decorate + +keywords +{ + #Define = "#Define identifier expression"; + #EncryptStrings = "#EncryptStrings"; + #Import = "#Import"; + #Include = "#Include"; + #LibDefine = "#LibDefine identifier expression"; + #Library = "#Library"; + #NoCompact = "#NoCompact"; + enum = "Enumeration"; + struct = "Structure"; + region = "A code region block"; + goto = "Goto statement"; + upmost = "The upmost region"; + ACS_Execute = "ACS_Execute(script, map, arg1, arg2, arg3)"; + ACS_ExecuteAlways = "ACS_ExecuteAlways(script, map, arg1, arg2, arg3)"; + ACS_ExecuteWait = "ACS_ExecuteWait(script, unused, arg1, arg2, arg3)"; + ACS_ExecuteWithResult = "ACS_ExecuteWithResult(script, arg1, arg2, arg3)"; + ACS_LockedExecute = "ACS_LockedExecute(script, map, arg1, arg2, lock)"; + ACS_LockedExecuteDoor = "ACS_LockedExecuteDoor(script, map, arg1, arg2, lock)"; + ACS_NamedExecute = "ACS_NamedExecute(script, map, arg1, arg2, arg3)"; + ACS_NamedExecuteAlways = "ACS_NamedExecuteAlways(script, map, arg1, arg2, arg3)"; + ACS_NamedExecuteWait = "ACS_NamedExecuteWait(script, unused, arg1, arg2, arg3)"; + ACS_NamedExecuteWithResult = "ACS_NamedExecuteWithResult(script, arg1, arg2, arg3)"; + ACS_NamedLockedExecute = "ACS_NamedLockedExecute(script, map, arg1, arg2, lock)"; + ACS_NamedLockedExecuteDoor = "ACS_NamedLockedExecuteDoor(script, map, arg1, arg2, lock)"; + ACS_NamedSuspend = "ACS_NamedSuspend(script, map)"; + ACS_NamedTerminate = "ACS_NamedTerminate(script, map)"; + ACS_Suspend = "ACS_Suspend(script, map)"; + ACS_Terminate = "ACS_Terminate(script, map)"; + ActivatorSound = "ActivatorSound(sound, volume)"; + ActivatorTID = "ActivatorTID()"; + AmbientSound = "AmbientSound(sound, volume)"; + AnnouncerSound = "AnnouncerSound(sound, flags)"; + Autosave = "Autosave()"; + BlueCount = "BlueCount()"; + BlueReturn = "Script expression BlueReturn"; + BlueScore = "BlueScore()"; + BlueTeamCount = "BlueTeamCount()"; + BlueTeamScore = "BlueTeamScore()"; + Bool = "Bool expression"; + Break = "Break"; + CancelFade = "CancelFade()"; + Case = "Case expression:"; + Ceiling_CrushAndRaise = "Ceiling_CrushAndRaise(tag, speed, crush, crushmode)"; + Ceiling_CrushAndRaiseA = "Ceiling_CrushAndRaiseA(tag, dspeed, uspeed, crush, crushmode)"; + Ceiling_CrushAndRaiseDist = "Ceiling_CrushAndRaiseDist(tag, dist, speed, damage, crushmode)"; + Ceiling_CrushAndRaiseSilentA = "Ceiling_CrushAndRaiseSilentA(tag, dspeed, uspeed, crush, crushmode)"; + Ceiling_CrushRaiseAndStay = "Ceiling_CrushRaiseAndStay(tag, speed, crush, crushmode)"; + Ceiling_CrushRaiseAndStayA = "Ceiling_CrushRaiseAndStayA(tag, dspeed, uspeed, crush, crushmode)"; + Ceiling_CrushRaiseAndStaySilA = "Ceiling_CrushRaiseAndStaySilA(tag, dspeed, uspeed, crush, crushmode)"; + Ceiling_CrushStop = "Ceiling_CrushStop(tag)"; + Ceiling_LowerAndCrush = "Ceiling_LowerAndCrush(tag, speed, crush, crushmode)"; + Ceiling_LowerAndCrushDist = "Ceiling_LowerAndCrushDist(tag, speed, crush, dist, crushmode)"; + Ceiling_LowerByValue = "Ceiling_LowerByValue(tag, speed, height)"; + Ceiling_LowerByValueTimes8 = "Ceiling_LowerByValueTimes8(tag, speed, height)"; + Ceiling_LowerInstant = "Ceiling_LowerInstant(tag, unused, height)"; + Ceiling_LowerToFloor = "Ceiling_LowerToFloor(tag, speed)"; + Ceiling_LowerToHighestFloor = "Ceiling_LowerToHighestFloor(tag, speed)"; + Ceiling_LowerToLowest = "Ceiling_LowerToLowest(tag, speed)"; + Ceiling_MoveToValue = "Ceiling_MoveToValue(tag, speed, height, neg)"; + Ceiling_MoveToValueTimes8 = "Ceiling_MoveToValueTimes8(tag, speed, height, neg)"; + Ceiling_RaiseByValue = "Ceiling_RaiseByValue(tag, speed, height)"; + Ceiling_RaiseByValueTimes8 = "Ceiling_RaiseByValueTimes8(tag, speed, height)"; + Ceiling_RaiseInstant = "Ceiling_RaiseInstant(tag, unused, height)"; + Ceiling_RaiseToNearest = "Ceiling_RaiseToNearest(tag, speed)"; + Ceiling_Waggle = "Ceiling_Waggle(tag, amp, freq, offset, time)"; + ChangeActorAngle = "ChangeActorAngle(int tid, fixed angle, bool interpolate = false)"; + ChangeActorPitch = "ChangeActorPitch(int tid, fixed pitch, bool interpolate = false)"; + ChangeCamera = "ChangeCamera(tid, who, revert)"; + ChangeCeiling = "ChangeCeiling(tag, flat)"; + ChangeFloor = "ChangeFloor(tag, flat)"; + ChangeLevel = "ChangeLevel(mapname, position, flags, skill)"; + ChangeSkill = "ChangeSkill(skill)"; + ChangeSky = "ChangeSky(sky1, sky2)"; + CheckActorCeilingTexture = "CheckActorCeilingTexture(tid, texture)"; + CheckActorClass = "CheckActorClass(tid, class)"; + CheckActorFloorTexture = "CheckActorFloorTexture(tid, texture)"; + CheckActorInventory = "CheckActorInventory(tid, inventoryitem)"; + CheckActorProperty = "CheckActorProperty(tid, property, value)"; + CheckFlag = "bool CheckFlag(int tid, string 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."; + CheckInventory = "CheckInventory(inventoryitem)"; + CheckPlayerCamera = "CheckPlayerCamera(player)"; + CheckSight = "CheckSight(source, dest, flags)"; + CheckWeapon = "CheckWeapon(weapon)"; + ClassifyActor = "ClassifyActor(tid)"; + ClearActorInventory = "ClearActorInventory(tid)"; + ClearForceField = "ClearForceField(tag)"; + ClearInventory = "ClearInventory()"; + ClearLineSpecial = "ClearLineSpecial()"; + ConsoleCommand = "ConsoleCommand(command)"; + Const = "Const"; + Continue = "Continue"; + cos = "cos(angle)"; + CreateTranslation = "CreateTranslation(transnumber, translation, translation, translation, ...)"; + DamageThing = "DamageThing(amount, mod)"; + Death = "Script expression Death"; + Default = "Default:"; + Delay = "Delay(tics)"; + Disconnect = "Script expression Disconnect"; + Do = "Do"; + Door_Animated = "Door_Animated(tag, speed, delay, lock)"; + Door_Close = "Door_Close(tag, speed, lighttag)"; + Door_CloseWaitOpen = "Door_CloseWaitOpen(tag, speed, delay, lighttag)"; + Door_LockedRaise = "Door_LockedRaise(tag, speed, delay, lock, lighttag)"; + Door_Open = "Door_Open(tag, speed, lighttag)"; + Door_Raise = "Door_Raise(tag, speed, delay, lighttag)"; + DropItem = "int DropItem(int tid, string item, int dropamount = -1, int chance = 256)\nCauses actors with the matching tid to drop the specified item.\nIf tid is 0, the activator of the script is considered to be the dropper of the item.\nThis works in a similar way to the DropItem actor property.\nThe return value of the function is the number of dropped items."; + Elevator_LowerToNearest = "Elevator_LowerToNearest(tag, speed)"; + Elevator_MoveToFloor = "Elevator_MoveToFloor(tag, speed)"; + Elevator_RaiseToNearest = "Elevator_RaiseToNearest(tag, speed)"; + Else = "Else"; + Enter = "Script expression Enter"; + Exit_Normal = "Exit_Normal(pos)"; + Exit_Secret = "Exit_Secret(pos)"; + FadeRange = "FadeRange(red1, green1, blue1, amount1, red2, green2, blue2, amount2, seconds)"; + FadeTo = "FadeTo(red, green, blue, amount, seconds)"; + FixedDiv = "FixedDiv(a, b)"; + FixedMul = "FixedMul(a, b)"; + FixedSqrt = "FixedSqrt(number)"; + Floor_CrushStop = "Floor_CrushStop(tag)"; + Floor_Donut = "Floor_Donut(ptag, pspeed, sspeed)"; + Floor_LowerByValue = "Floor_LowerByValue(tag, speed, height)"; + Floor_LowerByValueTimes8 = "Floor_LowerByValueTimes8(tag, speed, height)"; + Floor_LowerInstant = "Floor_LowerInstant(tag, unused, height)"; + Floor_LowerToHighest = "Floor_LowerToHighest(tag, speed, adjust, force_adjust)"; + Floor_LowerToLowest = "Floor_LowerToLowest(tag, speed)"; + Floor_LowerToLowestTxTy = "Floor_LowerToLowestTxTy(tag, speed)"; + Floor_LowerToNearest = "Floor_LowerToNearest(tag, speed)"; + Floor_MoveToValue = "Floor_MoveToValue(tag, speed, height, neg)"; + Floor_MoveToValueTimes8 = "Floor_MoveToValueTimes8(tag, speed, height, neg)"; + Floor_RaiseAndCrush = "Floor_RaiseAndCrush(tag, speed, crush, crushmode)"; + Floor_RaiseAndCrushDoom = "Floor_RaiseAndCrushDoom(tag, speed, crush, crushmode)"; + Floor_RaiseByTexture = "Floor_RaiseByTexture(tag, speed)"; + Floor_RaiseByValue = "Floor_RaiseByValue(tag, speed, height)"; + Floor_RaiseByValueTimes8 = "Floor_RaiseByValueTimes8(tag, speed, height)"; + Floor_RaiseByValueTxTy = "Floor_RaiseByValueTxTy(tag, speed, height)"; + Floor_RaiseInstant = "Floor_RaiseInstant(tag, unused, height)"; + Floor_RaiseToHighest = "Floor_RaiseToHighest(tag, speed)"; + Floor_RaiseToLowestCeiling = "Floor_RaiseToLowestCeiling(tag, speed)"; + Floor_RaiseToNearest = "Floor_RaiseToNearest(tag, speed)"; + Floor_TransferNumeric = "Floor_TransferNumeric(tag)"; + Floor_TransferTrigger = "Floor_TransferTrigger(tag)"; + Floor_Waggle = "Floor_Waggle(tag, amp, freq, offset, time)"; + FloorAndCeiling_LowerByValue = "FloorAndCeiling_LowerByValue(tag, speed, height)"; + FloorAndCeiling_LowerRaise = "FloorAndCeiling_LowerRaise(tag, fspeed, cspeed, boomemu)"; + FloorAndCeiling_RaiseByValue = "FloorAndCeiling_RaiseByValue(tag, speed, height)"; + For = "For(initialization, condition, iteration)"; + ForceField = "ForceField()"; + FS_Execute = "FS_Execute(script, side, keynum, message)"; + Function = "Function Void expression (Void)"; + GameSkill = "GameSkill()"; + GameType = "GameType()"; + Generic_Ceiling = "Generic_Ceiling(tag, speed, height, target, flag)"; + Generic_Crusher = "Generic_Crusher(tag, dspeed, uspeed, silent, crush)"; + Generic_Crusher2 = "Generic_Crusher2(tag, dspeed, uspeed, silent, crush)"; + Generic_Door = "Generic_Door(tag, speed, kind, delay, lock)"; + Generic_Floor = "Generic_Floor(tag, speed, height, target, flags)"; + Generic_Lift = "Generic_Lift(tag, speed, delay, type, height)"; + Generic_Stairs = "Generic_Stairs(tag, speed, height, flags, reset)"; + GetActorAngle = "GetActorAngle(tid)"; + GetActorCeilingZ = "GetActorCeilingZ(tid)"; + GetActorClass = "GetActorClass(tid)"; + GetActorFloorZ = "GetActorFloorZ(tid)"; + GetActorLightLevel = "GetActorLightLevel(tid)"; + GetActorPitch = "GetActorPitch(tid)"; + GetActorProperty = "GetActorProperty(tid, property)"; + GetActorVelX = "GetActorVelX(tid)"; + GetActorVelY = "GetActorVelY(tid)"; + GetActorVelZ = "GetActorVelZ(tid)"; + GetActorViewHeight = "GetActorViewHeight(tid)"; + GetActorX = "GetActorX(tid)"; + GetActorY = "GetActorY(tid)"; + GetActorZ = "GetActorZ(tid)"; + GetAirSupply = "GetAirSupply(playernumber)"; + GetAmmoCapacity = "GetAmmoCapacity(ammotype)"; + GetArmorType = "GetArmorType(armortype, playernumber)"; + GetChar = "GetChar(string, index)"; + GetCVar = "GetCVar(cvarname)"; + GetCVarString = "GetCVarString(cvarname)"; + GetInvasionState = "GetInvasionState()"; + GetInvasionWave = "GetInvasionWave()"; + GetLevelInfo = "GetLevelInfo(levelinfo)"; + GetLineActivation = "int GetLineActivation(int lineid)\nlineid: The id of the line of which to get the activation flags.\nReturns SPAC flags as a bitfield"; + GetLineRowOffset = "GetLineRowOffset()"; + GetLineUDMFFixed = "GetLineUDMFFixed(lineid, key)"; + GetLineUDMFInt = "GetLineUDMFInt(lineid, key)"; + GetPlayerInfo = "GetPlayerInfo(playernumber, playerinfo)"; + GetPlayerInput = "GetPlayerInput(playernumber, input)"; + GetPolyobjX = "GetPolyobjX(polyid)"; + GetPolyobjY = "GetPolyobjY(polyid)"; + GetScreenHeight = "GetScreenHeight()"; + GetScreenWidth = "GetScreenWidth()"; + GetSectorCeilingZ = "GetSectorCeilingZ(tag, x, y)"; + GetSectorFloorZ = "GetSectorFloorZ(tag, x, y)"; + GetSectorLightLevel = "GetSectorLightLevel(tag)"; + GetSectorUDMFFixed = "GetSectorUDMFFixed(tag, key)"; + GetSectorUDMFInt = "GetSectorUDMFInt(tag, key)"; + GetSideUDMFFixed = "GetSideUDMFFixed(lineid, side, key)"; + GetSideUDMFInt = "GetSideUDMFInt(lineid, side, key)"; + GetThingUDMFFixed = "GetThingUDMFFixed(tid, key)"; + GetThingUDMFInt = "GetThingUDMFInt(tid, key)"; + GetUserArray = "GetUserArray(tid, name, pos)"; + GetUserCVar = "GetUserCVar(playernum, cvarname)"; + GetUserCVarString = "GetUserCVarString(playernum, cvarname)"; + GetUserVariable = "GetUserVariable(tid, name)"; + GetWeapon = "GetWeapon()"; + GiveActorInventory = "GiveActorInventory(tid, inventoryitem, amount)"; + GiveInventory = "GiveInventory(inventoryitem, amount)"; + GlassBreak = "GlassBreak(dontspawnjunk)"; + Global = "Global Int expression:identifier"; + HealThing = "HealThing(amount)"; + HudMessage = "HudMessage(text; type, id, color, x, y, holdtime, alpha)"; + HudMessageBold = "HudMessageBold(text; type, id, color, x, y, holdtime, alpha)"; + If = "If(expression)"; + Int = "Int expression"; + IsMultiplayer = "IsMultiplayer()"; + IsOneFlagCTF = "IsOneFlagCTF()"; + IsTIDUsed = "IsTIDUsed(tid)"; + Light_ChangeToValue = "Light_ChangeToValue(tag, value)"; + Light_Fade = "Light_Fade(tag, value, tics)"; + Light_Flicker = "Light_Flicker(tag, upper, lower)"; + Light_ForceLightning = "Light_ForceLightning(mode)"; + Light_Glow = "Light_Glow(tag, upper, lower, tics)"; + Light_LowerByValue = "Light_LowerByValue(tag, value)"; + Light_MaxNeighbor = "Light_MaxNeighbor(tag)"; + Light_MinNeighbor = "Light_MinNeighbor(tag)"; + Light_RaiseByValue = "Light_RaiseByValue(tag, value)"; + Light_Stop = "Light_Stop(tag)"; + Light_Strobe = "Light_Strobe(tag, upper, lower, u-tics, l-tics)"; + Light_StrobeDoom = "Light_StrobeDoom(tag, u-tics, l-tics)"; + Lightning = "Script expression Lightning"; + LineAttack = "LineAttack(int tid, fixed angle, fixed pitch, int damage, str pufftype = 'BulletPuff', str damagetype = 'None', fixed range = 2048, int flags = 0)\nFires a hitscan attack. If tid is 0, the activator of the script is the source of the attack."; + Line_AlignCeiling = "Line_AlignCeiling(lineid, side)"; + Line_AlignFloor = "Line_AlignFloor(lineid, side)"; + Line_SetBlocking = "Line_SetBlocking(lineid, setflags, clearflags)"; + Line_SetTextureOffset = "Line_SetTextureOffset(lineid, x, y, side, flags)"; + Line_SetTextureScale = "Line_SetTextureScale(lineid, x, y, side, flags)"; + LineSide = "LineSide()"; + LocalAmbientSound = "LocalAmbientSound(sound, volume)"; + LocalSetMusic = "LocalSetMusic(song, order, unused)"; + Log = "Log(type:expression)"; + MorphActor = "MorphActor(tid, playerclass, monsterclass, duration, style, morphflash, unmorphflash)"; + Music_Change = "Music_Change(music, pattern)"; + NamedScriptWait = "NamedScriptWait(script)"; + Net = "Script expression Net"; + NoiseAlert = "NoiseAlert(target_tid, emiter_tid)"; + Open = "Script expression Open"; + Pickup = "Script expression Pickup"; + Pillar_Build = "Pillar_Build(tag, speed, height)"; + Pillar_BuildAndCrush = "Pillar_BuildAndCrush(tag, speed, height, crush, crushmode)"; + Pillar_Open = "Pillar_Open(tag, speed, fdist, cdist)"; + Plat_DownByValue = "Plat_DownByValue(tag, speed, delay, height)"; + Plat_DownWaitUpStay = "Plat_DownWaitUpStay(tag, speed, delay)"; + Plat_DownWaitUpStayLip = "Plat_DownWaitUpStayLip(tag, speed, delay, lip, sound)"; + Plat_PerpetualRaise = "Plat_PerpetualRaise(tag, speed, delay)"; + Plat_PerpetualRaiseLip = "Plat_PerpetualRaiseLip(tag, speed, delay, lip)"; + Plat_RaiseAndStayTx0 = "Plat_RaiseAndStayTx0(tag, speed, lockout)"; + Plat_Stop = "Plat_Stop(tag)"; + Plat_ToggleCeiling = "Plat_ToggleCeiling(tag)"; + Plat_UpByValue = "Plat_UpByValue(tag, speed, delay, height)"; + Plat_UpByValueStayTx = "Plat_UpByValueStayTx(tag, speed, height)"; + Plat_UpNearestWaitDownStay = "Plat_UpNearestWaitDownStay(tag, speed, delay)"; + Plat_UpWaitDownStay = "Plat_UpWaitDownStay(tag, speed, delay)"; + PlayActorSound = "PlayActorSound(tid, sound, channel, volume, looping, attenuation)"; + Player_SetTeam = "Player_SetTeam(team)"; + PlayerArmorpoints = "PlayerArmorpoints()"; + PlayerClass = "PlayerClass(playernumber)"; + PlayerCount = "PlayerCount()"; + PlayerFrags = "PlayerFrags()"; + PlayerHealth = "PlayerHealth()"; + PlayerInGame = "PlayerInGame(playernumber)"; + PlayerIsBot = "PlayerIsBot(playernumber)"; + PlayerNumber = "PlayerNumber()"; + PlayerTeam = "PlayerTeam()"; + PlayMovie = "PlayMovie(moviename)"; + PlaySound = "PlaySound(tid, sound, channel, volume, looping, attenuation)"; + Polyobj_DoorSlide = "Polyobj_DoorSlide(po, speed, angle, dist, delay)"; + Polyobj_DoorSwing = "Polyobj_DoorSwing(po, speed, angle, delay)"; + Polyobj_Move = "Polyobj_Move(po, speed, angle, dist)"; + Polyobj_MoveTimes8 = "Polyobj_MoveTimes8(po, speed, angle, dist)"; + Polyobj_MoveTo = "Polyobj_MoveTo(po, speed, pos_x, pos_y)"; + Polyobj_MoveToSpot = "Polyobj_MoveToSpot(po, speed, target)"; + Polyobj_OR_Move = "Polyobj_OR_Move(po, speed, angle, distance)"; + Polyobj_OR_MoveTimes8 = "Polyobj_OR_MoveTimes8(po, speed, angle, distance)"; + Polyobj_OR_MoveTo = "Polyobj_OR_MoveTo(po, speed, pos_x, pos_y)"; + Polyobj_OR_MoveToSpot = "Polyobj_OR_MoveToSpot(po, speed, target)"; + Polyobj_OR_RotateLeft = "Polyobj_OR_RotateLeft(po, speed, angle)"; + Polyobj_OR_RotateRight = "Polyobj_OR_RotateRight(po, speed, angle)"; + Polyobj_RotateLeft = "Polyobj_RotateLeft(po, speed, angle)"; + Polyobj_RotateRight = "Polyobj_RotateRight(po, speed, angle)"; + Polyobj_Stop = "Polyobj_Stop(po)"; + PolyWait = "PolyWait(polyid)"; + Print = "Print(type:expression)"; + PrintBold = "PrintBold(type:expression)"; + Radius_Quake = "Radius_Quake(intensity, duration, damrad, tremrad, tid)"; + Radius_Quake2 = "Radius_Quake2(tid, intensity, duration, damrad, tremrad, sound)"; + Random = "Random(min, max)"; + RedCount = "RedCount()"; + RedReturn = "Script expression RedReturn"; + RedScore = "RedScore()"; + RedTeamCount = "RedTeamCount()"; + RedTeamScore = "RedTeamScore()"; + ReplaceTextures = "ReplaceTextures(oldtexture, newtexture, flags)"; + Respawn = "Script expression Respawn"; + Restart = "Restart"; + Return = "Return"; + Script = "Script expression (Void)"; + ScriptWait = "ScriptWait(script)"; + Scroll_Ceiling = "Scroll_Ceiling(tag, x-move, y-move, unused)"; + Scroll_Floor = "Scroll_Floor(tag, x-move, y-move, type)"; + Scroll_Texture_Both = "Scroll_Texture_Both(lineid, left, right, down, up)"; + Scroll_Wall = "Scroll_Wall(lineid, x, y, side, flags)"; + Sector_ChangeFlags = "Sector_ChangeFlags(tag, setflags, clearflags)"; + Sector_ChangeSound = "Sector_ChangeSound(tag, newsequence)"; + Sector_SetCeilingPanning = "Sector_SetCeilingPanning(tag, u-int, u-frac, v-int, v-frac)"; + Sector_SetCeilingScale = "Sector_SetCeilingScale(tag, u-int, u-frac, v-int, v-frac)"; + Sector_SetCeilingScale2 = "Sector_SetCeilingScale2(tag, u-fixed, v-fixed)"; + Sector_SetColor = "Sector_SetColor(tag, red, green, blue, desaturation)"; + Sector_SetCurrent = "Sector_SetCurrent(tag, amount, angle, useline)"; + Sector_SetDamage = "Sector_SetDamage(tag, amount, mod)"; + Sector_SetFade = "Sector_SetFade(tag, red, green, blue)"; + Sector_SetFloorPanning = "Sector_SetFloorPanning(tag, u-int, u-frac, v-int, v-frac)"; + Sector_SetFloorScale = "Sector_SetFloorScale(tag, u-int, u-frac, v-int, v-frac)"; + Sector_SetFloorScale2 = "Sector_SetFloorScale2(tag, u-fixed, v-fixed)"; + Sector_SetFriction = "Sector_SetFriction(tag, amount)"; + Sector_SetGravity = "Sector_SetGravity(tag, ipart, fpart)"; + Sector_SetLink = "Sector_SetLink(controltag, tag, surface, movetype)"; + Sector_SetPlaneReflection = "Sector_SetPlaneReflection(tag, floor, ceiling)"; + Sector_SetRotation = "Sector_SetRotation(tag, floor-angle, ceiling-angle)"; + Sector_SetTranslucent = "Sector_SetTranslucent(tag, plane, amount, type)"; + Sector_SetWind = "Sector_SetWind(tag, amount, angle, useline)"; + SectorDamage = "SectorDamage(tag, amount, type, protectionitem, flags)"; + SectorSound = "SectorSound(sound, volume)"; + SendToCommunicator = "SendToCommunicator(voc_id, front_only, indentify, nolog)"; + SetActivator = "SetActivator(tid, pointer_selector)"; + SetActivatorToTarget = "SetActivatorToTarget(tid)"; + SetActorAngle = "SetActorAngle(tid, angle)"; + SetActorPitch = "SetActorPitch(tid, pitch)"; + SetActorPosition = "SetActorPosition(tid, x, y, z, fog)"; + SetActorProperty = "SetActorProperty(tid, property, value)"; + SetActorState = "SetActorState(tid, state, exact)"; + SetActorVelocity = "SetActorVelocity(tid, velx, vely, velz, add, setbob)"; + SetAirControl = "SetAirControl(amount)"; + SetAirSupply = "SetAirSupply(playernumber, tics)"; + SetAmmoCapacity = "SetAmmoCapacity(ammotype, maxamount)"; + SetCameraToTexture = "SetCameraToTexture(tag, texture, fov)"; + SetCeilingTrigger = "SetCeilingTrigger(tag, height, special, arg1, arg2, arg3, arg4, arg5)"; + SetCVar = "SetCVar(cvarname, newvalue)"; + SetCVarString = "SetCVarString(cvarname, newvalue)"; + SetFloorTrigger = "SetFloorTrigger(tag, height, special, arg1, arg2, arg3, arg4, arg5)"; + SetFont = "SetFont(font)"; + SetGlobalFogParameter = "SetGlobalFogParameter(property, value)"; + SetGravity = "SetGravity(amount)"; + SetHUDClipRect = "SetHUDClipRect(x, y, width, height, wrapwidth)"; + SetHudSize = "SetHudSize(width, height, statusbar)"; + SetHUDWrapWidth = "SetHUDWrapWidth(wrapwidth)"; + SetLineActivation = "void SetLineActivation(int lineid, int activation)\nlineid: The id of the line of which to set the activation flags\nactivation: SPAC flags to set. Multiple flags can be set by using the pipe character | between the constant names"; + SetLineBlocking = "SetLineBlocking(lineid, setting)"; + SetLineMonsterBlocking = "SetLineMonsterBlocking(lineid, setting)"; + SetLineSpecial = "SetLineSpecial(lineid, special, arg1, arg2, arg3, arg4, arg5)"; + SetLineTexture = "SetLineTexture(lineid, side, position, texture)"; + SetMarineSprite = "SetMarineSprite(tid, actorclass)"; + SetMarineWeapon = "SetMarineWeapon(tid, weapon)"; + SetMugShotState = "SetMugShotState(state)"; + SetMusic = "SetMusic(song, order, unused)"; + SetPlayerProperty = "SetPlayerProperty(who, set, which)"; + SetPointer = "SetPointer(assign_slot, tid, pointer_selector, flags)"; + SetResultValue = "SetResultValue(value)"; + SetSkyScrollSpeed = "SetSkyScrollSpeed(skynumber, speed)"; + SetThingSpecial = "SetThingSpecial(tid, special, arg1, arg2, arg3, arg4, arg5)"; + SetUserArray = "SetUserArray(tid, name, pos, value)"; + SetUserCVar = "SetUserCVar(playernum, cvarname, newvalue)"; + SetUserCVarString = "SetUserCVarString(playernum, cvarname, newvalue)"; + SetUserVariable = "SetUserVariable(tid, name, value)"; + SetWeapon = "SetWeapon(weapon)"; + sin = "sin(angle)"; + SinglePlayer = "SinglePlayer()"; + SoundSequence = "SoundSequence(sndseq)"; + SoundSequenceOnActor = "SoundSequenceOnActor(tid, sndseq)"; + SoundSequenceOnPolyObj = "SoundSequenceOnPolyObj(polyid, sndseq)"; + SoundSequenceOnSector = "SoundSequenceOnSector(tag, sndseq, location)"; + SoundVolume = "SoundVolume(tid, channel, volume)"; + Spawn = "Spawn(classname, x, y, z, newtid, angle)"; + SpawnForced = "SpawnForced(classname, x, y, z, newtid, angle)"; + SpawnProjectile = "SpawnProjectile(tid, classname, angle, speed, vspeed, gravity, newtid)"; + SpawnSpot = "SpawnSpot(classname, spottid, newtid, angle)"; + SpawnSpotFacing = "SpawnSpotFacing(classname, spottid, newtid)"; + SpawnSpotFacingForced = "SpawnSpotFacingForced(classname, spottid, newtid)"; + SpawnSpotForced = "SpawnSpotForced(classname, spottid, newtid, angle)"; + Special = "Special"; + Sqrt = "Sqrt(number)"; + Stairs_BuildDown = "Stairs_BuildDown(tag, speed, height, delay, reset)"; + Stairs_BuildDownSync = "Stairs_BuildDownSync(tag, speed, height, reset)"; + Stairs_BuildUp = "Stairs_BuildUp(tag, speed, height, delay, reset)"; + Stairs_BuildUpDoom = "Stairs_BuildUpDoom(tag, speed, height, delay, reset)"; + Stairs_BuildUpSync = "Stairs_BuildUpSync(tag, speed, height, reset)"; + StartConversation = "StartConversation(talker_tid, facetalker)"; + StopSound = "StopSound(tid, channel)"; + Str = "Str expression"; + StrCmp = "StrCmp(string1, string2, maxcomparenum)"; + StrCpy = "StrCpy(a:destination, source, sourceindex)"; + StrIcmp = "StrIcmp(string1, string2, maxcomparenum)"; + StrLeft = "string StrLeft(string string, int length)\nCreates a new string containing the length first characters of string.\nIf string does not exist, an empty string is returned.\nIf string is shorter than length characters, the entire string is returned."; + StrLen = "StrLen(string)"; + StrMid = "string StrMid(string string, int start, int length)\nCreates a new string containing the length characters of string starting from the one at position start.\nIf string does not exist or is shorter than start characters, an empty string is returned. \nIf string is shorter than start + length characters, the entire substring beginning at start is returned."; + StrParam = "StrParam(type:expression)"; + StrRight = "string StrRight(string string, int length)\nCreates a new string containing the length last characters of string.\nIf string does not exist, an empty string is returned.\nIf string is shorter than length characters, the entire string is returned."; + Suspend = "Suspend"; + Switch = "Switch(expression)"; + TagWait = "TagWait(tag)"; + TakeActorInventory = "TakeActorInventory(tid, inventoryitem, amount)"; + TakeInventory = "TakeInventory(inventoryitem, amount)"; + Team_GivePoints = "Team_GivePoints(team, points, announce)"; + Team_Score = "Team_Score(points, nogrin)"; + Teleport = "Teleport(tid, tag, nosourcefog)"; + Teleport_EndGame = "Teleport_EndGame()"; + Teleport_NewMap = "Teleport_NewMap(map, pos, face)"; + Teleport_NoFog = "Teleport_NoFog(tid, useangle, tag)"; + Teleport_NoStop = "Teleport_NoStop(tid, tag, nofog)"; + Teleport_ZombieChanger = "Teleport_ZombieChanger(tid, tag)"; + TeleportGroup = "TeleportGroup(groupid, sourceid, destinationid, movesource, fog)"; + TeleportInSector = "TeleportInSector(tag, sourceid, destinationid, fog, groupid)"; + TeleportOther = "TeleportOther(tid, destinationid, fog)"; + Terminate = "Terminate"; + Thing_Activate = "Thing_Activate(tid)"; + Thing_ChangeTID = "Thing_ChangeTID(oldtid, newtid)"; + Thing_Damage = "Thing_Damage(tid, amount, mod)"; + Thing_Damage2 = "Thing_Damage2(tid, amount, damagetype)"; + Thing_Deactivate = "Thing_Deactivate(tid)"; + Thing_Destroy = "Thing_Destroy(tid, extreme, tag)"; + Thing_Hate = "Thing_Hate(hater, hatee, type)"; + Thing_Move = "Thing_Move(tid, destid, nofog)"; + Thing_Projectile = "Thing_Projectile(tid, type, angle, speed, vspeed)"; + Thing_Projectile2 = "Thing_Projectile2(tid, classname, angle, speed, vspeed, gravity, newtid)"; + Thing_ProjectileAimed = "Thing_ProjectileAimed(tid, type, speed, target, newtid)"; + Thing_ProjectileGravity = "Thing_ProjectileGravity(tid, type, angle, speed, vspeed)"; + Thing_ProjectileIntercept = "Thing_ProjectileIntercept(tid, type, speed, target, newtid)"; + Thing_Raise = "Thing_Raise(tid)"; + Thing_Remove = "Thing_Remove(tid)"; + Thing_SetConversation = "Thing_SetConversation(tid, conversationid)"; + Thing_SetGoal = "Thing_SetGoal(tid, goal, delay, dontchasetarget)"; + Thing_SetSpecial = "Thing_SetSpecial(tid, special, arg1, arg2, arg3)"; + Thing_SetTranslation = "Thing_SetTranslation(tid, translation)"; + Thing_Spawn = "Thing_Spawn(tid, type, angle, newtid)"; + Thing_SpawnFacing = "Thing_SpawnFacing(tid, type, nofog, newtid)"; + Thing_SpawnNoFog = "Thing_SpawnNoFog(tid, type, angle, newtid)"; + Thing_Stop = "Thing_Stop(tid)"; + ThingCount = "ThingCount(type, tid)"; + ThingCountName = "ThingCountName(classname, tid)"; + ThingCountNameSector = "ThingCountNameSector(classname, tid, tag)"; + ThingCountSector = "ThingCountSector(type, tid, tag)"; + ThingSound = "ThingSound(tid, sound, volume)"; + ThrustThing = "ThrustThing(angle, force, nolimit, tid)"; + ThrustThingZ = "ThrustThingZ(tid, speed, up_or_down, add_or_set)"; + Timer = "Timer()"; + TranslucentLine = "TranslucentLine(lineid, amount, additive, moreflags)"; + UniqueTID = "UniqueTID(tid, limit)"; + Unloading = "Script expression Unloading"; + UnMorphActor = "UnMorphActor(tid, force)"; + Until = "Until(expression)"; + UseActorInventory = "UseActorInventory(tid, inventoryitem)"; + UseInventory = "UseInventory(inventoryitem)"; + UsePuzzleItem = "UsePuzzleItem(item, script, arg1, arg2, arg3)"; + VectorAngle = "VectorAngle(x, y)"; + VectorLength = "VectorLength(x, y)"; + Void = "Void"; + While = "While(expression)"; + WhiteReturn = "Script expression WhiteReturn"; + World = "World Int expression:identifier"; +} + +constants +{ + AAPTR_DEFAULT; + AAPTR_FRIENDPLAYER; + AAPTR_MASTER; + AAPTR_NULL; + AAPTR_PLAYER_GETCONVERSATION; + AAPTR_PLAYER_GETTARGET; + AAPTR_PLAYER1; + AAPTR_PLAYER2; + AAPTR_PLAYER3; + AAPTR_PLAYER4; + AAPTR_PLAYER5; + AAPTR_PLAYER6; + AAPTR_PLAYER7; + AAPTR_PLAYER8; + AAPTR_TARGET; + AAPTR_TRACER; + ACTOR_ALIVE; + ACTOR_BOT; + ACTOR_DEAD; + ACTOR_GENERIC; + ACTOR_MISSILE; + ACTOR_MONSTER; + ACTOR_NONE; + ACTOR_PLAYER; + ACTOR_VOODOODOLL; + ACTOR_WORLD; + APROP_Accuracy; + APROP_ActiveSound; + APROP_Alpha; + APROP_Ambush; + APROP_AttackSound; + APROP_AttackZOffset; + APROP_ChaseGoal; + APROP_Damage; + APROP_DamageFactor; + APROP_DeathSound; + APROP_Dormant; + APROP_Dropped; + APROP_Friendly; + APROP_Frightened; + APROP_Gravity; + APROP_Health; + APROP_Height; + APROP_Invulnerable; + APROP_JumpZ; + APROP_Mass; + APROP_MasterTID; + APROP_MeleeRange; + APROP_NameTag; + APROP_NoTarget; + APROP_NoTrigger; + APROP_PainSound; + APROP_Radius; + APROP_RenderStyle; + APROP_ScaleX; + APROP_ScaleY; + APROP_Score; + APROP_SeeSound; + APROP_SpawnHealth; + APROP_Species; + APROP_Speed; + APROP_Stamina; + APROP_TargetTID; + APROP_TracerTID; + APROP_ViewHeight; + APROP_Waterlevel; + ATTN_IDLE; + ATTN_NONE; + ATTN_NORM; + ATTN_STATIC; + BLOCK_CREATURES; + BLOCK_EVERYTHING; + BLOCK_NOTHING; + BLOCK_PLAYERS; + BLOCK_RAILING; + BLOCKF_CREATURES; + BLOCKF_EVERYTHING; + BLOCKF_FLOATERS; + BLOCKF_HITSCAN; + BLOCKF_MONSTERS; + BLOCKF_PLAYERS; + BLOCKF_PROJECTILES; + BLOCKF_RAILING; + BLOCKF_SIGHT; + BLOCKF_USE; + BT_ALTATTACK; + BT_ATTACK; + BT_BACK; + BT_CROUCH; + BT_FORWARD; + BT_JUMP; + BT_LEFT; + BT_LOOKDOWN; + BT_LOOKUP; + BT_MOVEDOWN; + BT_MOVELEFT; + BT_MOVERIGHT; + BT_MOVEUP; + BT_RELOAD; + BT_RIGHT; + BT_SHOWSCORES; + BT_SPEED; + BT_STRAFE; + BT_TURN180; + BT_USE; + BT_USER1; + BT_USER2; + BT_USER3; + BT_USER4; + BT_ZOOM; + CARRY; + CHAN_AUTO; + CHAN_BODY; + CHAN_ITEM; + CHAN_LISTENERZ; + CHAN_MAYBE_LOCAL; + CHAN_NOPAUSE; + CHAN_UI; + CHAN_VOICE; + CHAN_WEAPON; + CHANGELEVEL_KEEPFACING; + CHANGELEVEL_NOINTERMISSION; + CHANGELEVEL_NOMONSTERS; + CHANGELEVEL_PRERAISEWEAPON; + CHANGELEVEL_RESETHEALTH; + CHANGELEVEL_RESETINVENTORY; + CLASS_CLERIC; + CLASS_FIGHTER; + CLASS_MAGE; + CR_BLACK; + CR_BLUE; + CR_BRICK; + CR_BROWN; + CR_CREAM; + CR_CYAN; + CR_DARKBROWN; + CR_DARKGRAY; + CR_DARKGREEN; + CR_DARKGREY; + CR_DARKRED; + CR_GOLD; + CR_GRAY; + CR_GREEN; + CR_GREY; + CR_LIGHTBLUE; + CR_OLIVE; + CR_ORANGE; + CR_PURPLE; + CR_RED; + CR_TAN; + CR_UNTRANSLATED; + CR_WHITE; + CR_YELLOW; + CSF_NOBLOCKALL; + CSF_NOFAKEFLOORS; + DAMAGE_IN_AIR; + DAMAGE_NONPLAYERS; + DAMAGE_PLAYERS; + DAMAGE_SUBCLASSES_PROTECT; + FALSE; + FHF_NORANDOMPUFFZ; + FOGP_DENSITY; + FOGP_OUTSIDEDENSITY; + FOGP_SKYFOG; + GAME_NET_COOPERATIVE; + GAME_NET_DEATHMATCH; + GAME_SINGLE_PLAYER; + GAME_TITLE_MAP; + HUDMSG_ADDBLEND; + HUDMSG_ALPHA; + HUDMSG_COLORSTRING; + HUDMSG_FADEINOUT; + HUDMSG_FADEOUT; + HUDMSG_LAYER_OVERHUD; + HUDMSG_LAYER_OVERMAP; + HUDMSG_LAYER_UNDERHUD; + HUDMSG_LOG; + HUDMSG_NOTWITH3DVIEW; + HUDMSG_NOTWITHFULLMAP; + HUDMSG_NOTWITHOVERLAYMAP; + HUDMSG_NOWRAP; + HUDMSG_PLAIN; + HUDMSG_TYPEON; + INPUT_BUTTONS; + INPUT_FORWARDMOVE; + INPUT_OLDBUTTONS; + INPUT_PITCH; + INPUT_ROLL; + INPUT_SIDEMOVE; + INPUT_UPMOVE; + INPUT_YAW; + IS_BOSSFIGHT; + IS_COUNTDOWN; + IS_FIRSTCOUNTDOWN; + IS_INPROGRESS; + IS_WAITINGFORPLAYERS; + IS_WAVECOMPLETE; + LEVELINFO_CLUSTERNUM; + LEVELINFO_FOUND_ITEMS; + LEVELINFO_FOUND_SECRETS; + LEVELINFO_KILLED_MONSTERS; + LEVELINFO_LEVELNUM; + LEVELINFO_PAR_TIME; + LEVELINFO_SUCK_TIME; + LEVELINFO_TOTAL_ITEMS; + LEVELINFO_TOTAL_MONSTERS; + LEVELINFO_TOTAL_SECRETS; + LINE_BACK; + LINE_FRONT; + MARINEWEAPON_BerserkFist; + MARINEWEAPON_BFG; + MARINEWEAPON_Chaingun; + MARINEWEAPON_Chainsaw; + MARINEWEAPON_Dummy; + MARINEWEAPON_Fist; + MARINEWEAPON_Pistol; + MARINEWEAPON_PlasmaRifle; + MARINEWEAPON_Railgun; + MARINEWEAPON_RocketLauncher; + MARINEWEAPON_Shotgun; + MARINEWEAPON_SuperShotgun; + MOD_BFG_SPLASH; + MOD_CRUSH; + MOD_DISINTEGRATE; + MOD_ELECTRIC; + MOD_EXIT; + MOD_FALLING; + MOD_HIT; + MOD_ICE; + MOD_LAVA; + MOD_POISON; + MOD_RAILGUN; + MOD_SLIME; + MOD_SUICIDE; + MOD_TELEFRAG; + MOD_UNKNOWN; + MOD_WATER; + MODINPUT_BUTTONS; + MODINPUT_FORWARDMOVE; + MODINPUT_OLDBUTTONS; + MODINPUT_PITCH; + MODINPUT_ROLL; + MODINPUT_SIDEMOVE; + MODINPUT_UPMOVE; + MODINPUT_YAW; + MOVIE_Failed; + MOVIE_Played; + MOVIE_Played_Aborted; + MOVIE_Played_NoVideo; + MRF_ADDSTAMINA; + MRF_FAILNOLAUGH; + MRF_FAILNOTELEFRAG; + MRF_FULLHEALTH; + MRF_LOSEACTUALWEAPON; + MRF_NEWTIDBEHAVIOUR; + MRF_OLDEFFECTS; + MRF_UNDOBYCHAOSDEVICE; + MRF_UNDOBYDEATH; + MRF_UNDOBYDEATHFORCED; + MRF_UNDOBYDEATHSAVES; + MRF_UNDOBYTOMEOFPOWER; + MRF_WHENINVULNERABLE; + NO; + NO_CHANGE; + NO_TEAM; + NOT_BOTTOM; + NOT_CEILING; + NOT_FLOOR; + NOT_MIDDLE; + NOT_TOP; + OFF; + ON; + PLAYERINFO_AIMDIST; + PLAYERINFO_COLOR; + PLAYERINFO_DESIREDFOV; + PLAYERINFO_FOV; + PLAYERINFO_GENDER; + PLAYERINFO_MOVEBOB; + PLAYERINFO_NEVERSWITCH; + PLAYERINFO_PLAYERCLASS; + PLAYERINFO_STILLBOB; + PLAYERINFO_TEAM; + PRINTNAME_LEVEL; + PRINTNAME_LEVELNAME; + PRINTNAME_SKILL; + PROP_ALLMAP; + PROP_BUDDHA; + PROP_FLIGHT; + PROP_FLY; + PROP_FROZEN; + PROP_INFRARED; + PROP_INSTANTWEAPONSWITCH; + PROP_INVISIBILITY; + PROP_INVULNERABILITY; + PROP_NOTARGET; + PROP_RADIATIONSUIT; + PROP_SPEED; + PROP_STRENGTH; + PROP_TOTALLYFROZEN; + PROP_WEAPONLEVEL2; + PTROP_NOSAFEGUARDS; + PTROP_UNSAFEMASTER; + PTROP_UNSAFETARGET; + SCROLL; + SCROLL_AND_CARRY; + SECF_FLOORDROP; + SECF_NOFALLINGDAMAGE; + SECF_NORESPAWN; + SECF_SILENT; + SECSEQ_CEILING; + SECSEQ_FLOOR; + SECSEQ_FULLHEIGHT; + SECSEQ_INTERIOR; + SIDE_BACK; + SIDE_FRONT; + SKILL_EASY; + SKILL_HARD; + SKILL_NORMAL; + SKILL_VERY_EASY; + SKILL_VERY_HARD; + SPAC_None; + SPAC_Cross; + SPAC_Use; + SPAC_MCross; + SPAC_Impact; + SPAC_Push; + SPAC_PCross; + SPAC_UseThrough; + SPAC_AnyCross; + SPAC_MUse; + SPAC_MPush; + SPAC_UseBack; + STYLE_Add; + STYLE_Fuzzy; + STYLE_None; + STYLE_Normal; + STYLE_OptFuzzy; + STYLE_Shaded; + STYLE_SoulTrans; + STYLE_Stencil; + STYLE_Translucent; + STYLE_TranslucentStencil; + T_ABADDON; + T_ABADDONSHOT; + T_AMMOBOX; + T_AMULETOFWARDING; + T_ANTIGRAVBELT; + T_ARACHNOTRON; + T_ARACHNOTRONPLASMA; + T_ARMORBONUS; + T_ARROW; + T_AXEKEY; + T_BACKPACK; + T_BARON; + T_BARONBALL; + T_BARREL; + T_BATTERY; + T_BEAST; + T_BEASTBALL; + T_BELPHEGOR; + T_BERSERK; + T_BFG; + T_BFG10000; + T_BFG10KSHOT; + T_BFGSHOT; + T_BISHOP; + T_BLADE; + T_BLASTER; + T_BLOOD; + T_BLOODDEMON; + T_BLOODPOOL; + T_BLOODPOOL1; + T_BLOODPOOL2; + T_BLUEARMOR; + T_BLUEFLAG; + T_BLUEKEY; + T_BLUEKEYCARD; + T_BLUESKULLKEY; + T_BLUETELEGLITTER; + T_BOUNCYMACEBALL; + T_BRAINS; + T_BRIDGE; + T_CACODEMON; + T_CACODEMONSHOT; + T_CACOLANTERN; + T_CACOLANTERNSHOT; + T_CELL; + T_CENTAUR; + T_CENTAUR_MASH; + T_CENTAURLEADER; + T_CHAINGUN; + T_CHAINGUY; + T_CHAINSAW; + T_CHICKEN; + T_CLERICHOLY1; + T_CLERICHOLY2; + T_CLERICHOLY3; + T_CLERICSTAFF; + T_CLINK; + T_CLIP; + T_COMPUTERMAP; + T_CROSSBOW; + T_CROSSBOWMAINBLAST; + T_CROSSBOWMINIBLAST; + T_CROSSBOWPOWERBLAST; + T_CYBERDEMON; + T_DARKIMP; + T_DARKIMPFIREBALL; + T_DART; + T_DEATHBALL; + T_DEMON; + T_DEMON_MASH; + T_DEMON1; + T_DEMON2_MASH; + T_DIRT1; + T_DIRT2; + T_DIRT3; + T_DIRT4; + T_DIRT5; + T_DIRT6; + T_DOOMSPHERE; + T_DRAGONSKINBRACERS; + T_DRAIN; + T_DSPARILALONE; + T_DSPARILBLUESHOT; + T_DSPARILONSERPENT; + T_DSPARILTELEPORTDEST; + T_DSPARILWIZARDSPAWNER; + T_EMERALDKEY; + T_ETTIN; + T_ETTIN_MASH; + T_FALCONSHIELD; + T_FEATHER; + T_FIGHTERAXE; + T_FIGHTERHAMMER; + T_FIGHTERSWORD1; + T_FIGHTERSWORD2; + T_FIGHTERSWORD3; + T_FIREBALL1; + T_FIREGARGOYLE; + T_FIREKEY; + T_FLAME_LARGE; + T_FLAME_SMALL; + T_FLAMINGBARREL; + T_FLESH_DRIP1; + T_FLESH_DRIP2; + T_GAUNTLETS; + T_GREENARMOR; + T_GREENKEY; + T_GRENADE; + T_GRENADELAUNCHER; + T_GUTS; + T_HASTE; + T_HEALTHBONUS; + T_HEAVYMACEBALL; + T_HECTEBUS; + T_HEFTYBLASTERAMMO; + T_HEFTYCROSSBOWAMMO; + T_HEFTYMACEAMMO; + T_HEFTYPHOENIXRODAMMO; + T_HEFTYSKULLRODAMMO; + T_HEFTYWANDAMMO; + T_HELLKNIGHT; + T_HIGHJUMP; + T_HORNKEY; + T_ICEGOLEM; + T_ICESHARD; + T_IMP; + T_IMPFIREBALL; + T_IMPLEADER; + T_INFRAGOGGLES; + T_INFRATRACKER; + T_INVISIBILITY; + T_INVULNERABILITY; + T_IRONFEET; + T_IRONLICH; + T_IRONLICHBLUESHOT; + T_ITEMALLMAP; + T_ITEMBAGOFHOLDING; + T_ITEMBOOSTMANA; + T_ITEMBOOTS; + T_ITEMEGG; + T_ITEMFLECHETTE; + T_ITEMFLIGHT; + T_ITEMHEALTHFLASH; + T_ITEMHEALTHFLASK; + T_ITEMHEALTHFULL; + T_ITEMHEALTHPOTION; + T_ITEMINVISIBILITY; + T_ITEMINVULNERABILITY; + T_ITEMPORK; + T_ITEMREPULSION; + T_ITEMSUMMON; + T_ITEMTELEPORT; + T_ITEMTIMEBOMB; + T_ITEMTOME; + T_ITEMTORCH; + T_ITEMTPORTOTHER; + T_KNIGHT; + T_KNIGHTAXE; + T_KNIGHTBLOODAXE; + T_KNIGHTGHOST; + T_LIGHTAMP; + T_LOSTSOUL; + T_MACE; + T_MACEKEY; + T_MAGESHARDS; + T_MAGESTAFF1; + T_MAGESTAFF2; + T_MAGESTAFF3; + T_MANA1; + T_MANA2; + T_MANA3; + T_MANCUBUS; + T_MANCUBUSSHOT; + T_MAXARMORBONUS; + T_MAXHEALTHBONUS; + T_MEDKIT; + T_MEGASPHERE; + T_MESHARMOR; + T_METALKEY; + T_MINIGUN; + T_MORPHBLAST; + T_MUMMY; + T_MUMMYGHOST; + T_MUMMYHEAD; + T_MUMMYLEADER; + T_MUMMYLEADERGHOST; + T_NOGRAVITYMACEBALL; + T_NONE; + T_PAINELEMENTAL; + T_PERMLARGEFLAME; + T_PERMSMALLFLAME; + T_PHOENIXROD; + T_PHOENIXSHOT; + T_PISTOL; + T_PLASMABOLT; + T_PLASMAGUN; + T_PLATINUMHELM; + T_POD; + T_PODGENERATOR; + T_POISONDART; + T_POWERWANDBIGGERBLAST; + T_POWERWANDMINIBLAST; + T_PROSPERITY; + T_PUFF; + T_PUZZBOOK1; + T_PUZZBOOK2; + T_PUZZGEMBIG; + T_PUZZGEMBLUE1; + T_PUZZGEMBLUE2; + T_PUZZGEMGREEN1; + T_PUZZGEMGREEN2; + T_PUZZGEMRED; + T_PUZZSKULL; + T_RAGE; + T_RAILGUN; + T_RANDOMPOWERUP; + T_REDARMOR; + T_REDFLAG; + T_REDKEYCARD; + T_REDSKULLKEY; + T_REDTELEGLITTER; + T_REFLECTION; + T_REGENERATION; + T_RESISTANCE; + T_REVENANT; + T_RIPPER; + T_RIPPERBALL; + T_ROCK1; + T_ROCK2; + T_ROCK3; + T_ROCKET; + T_ROCKETAMMO; + T_ROCKETBOX; + T_ROCKETLAUNCHER; + T_RUSTYKEY; + T_SCRIPTEDMARINE; + T_SERPENTFIREBALL; + T_SERPENTKEY; + T_SHELLBOX; + T_SHELLS; + T_SHIELD1; + T_SHIELD2; + T_SHOTGUN; + T_SHOTGUY; + T_SILVERKEY; + T_SKULLROD; + T_SKULLRODBLAST; + T_SMALLMETALKEY; + T_SNAKE; + T_SNAKEPROJECTILE; + T_SNAKEPROJECTILEBIG; + T_SOULSPHERE; + T_SOUND_WATERFALL; + T_SOUND_WIND; + T_SPARK_DRIP; + T_SPECTRE; + T_SPIDERMASTERMIND; + T_SPREAD; + T_SSGGUY; + T_STAINEDGLASS0; + T_STAINEDGLASS1; + T_STAINEDGLASS2; + T_STAINEDGLASS3; + T_STAINEDGLASS4; + T_STAINEDGLASS5; + T_STAINEDGLASS6; + T_STAINEDGLASS7; + T_STAINEDGLASS8; + T_STAINEDGLASS9; + T_STEALTHARACHNOTRON; + T_STEALTHBARON; + T_STEALTHCACODEMON; + T_STEALTHCHAINGUY; + T_STEALTHIMP; + T_STEALTHKNIGHT; + T_STEALTHMANCUBUS; + T_STEALTHREVENANT; + T_STEALTHSERGEANT; + T_STEALTHSHOTGUY; + T_STEALTHVILE; + T_STEALTHZOMBIE; + T_STIMPACK; + T_STRENGTH; + T_SUPERSHOTGUN; + T_TEMPLARGEFLAME; + T_TEMPSMALLFLAME; + T_THRUSTSPIKEDOWN; + T_THRUSTSPIKEUP; + T_TIMEFREEZER; + T_TINYVOLCANOBALL; + T_TRACER; + T_TRANSLUCENCY; + T_TURBOSPHERE; + T_VILE; + T_VOLCANO; + T_VOLCANOBALL; + T_WATERDRIP; + T_WATERLURKER; + T_WATERLURKERLEADER; + T_WHIRLWIND; + T_WHITEFLAG; + T_WIMPYBLASTERAMMO; + T_WIMPYCROSSBOWAMMO; + T_WIMPYMACEAMMO; + T_WIMPYPHOENIXRODAMMO; + T_WIMPYSKULLRODAMMO; + T_WIMPYWANDAMMO; + T_WIZARD; + T_WIZARDSHOT; + T_WOLFSS; + T_WRAITH; + T_WRAITHBURIED; + T_YELLOWKEY; + T_YELLOWKEYCARD; + T_YELLOWSKULLKEY; + T_ZOMBIE; + TEAM_BLUE; + TEAM_RED; + TEXFLAG_ADDOFFSET; + TEXFLAG_BOTTOM; + TEXFLAG_MIDDLE; + TEXFLAG_TOP; + TEXTURE_BOTTOM; + TEXTURE_MIDDLE; + TEXTURE_TOP; + TRUE; + YES; +} \ No newline at end of file diff --git a/Build/Scripting/GZDoom_MODELDEF.cfg b/Build/Scripting/GZDoom_MODELDEF.cfg index d9fc2d2d..a47f8cdd 100644 --- a/Build/Scripting/GZDoom_MODELDEF.cfg +++ b/Build/Scripting/GZDoom_MODELDEF.cfg @@ -10,6 +10,7 @@ casesensitive = false; insertcase = 1; // 0=Normal, 1=Lowercase, 2=Uppercase lexer = 35; // CPP-style, case-insensitive keywordhelp = "http://zdoom.org/wiki/MODELDEF"; +scripttype = 2; //0 = unknown script, 1 = acc, 2 = modeldef, 3 = decorate keywords { diff --git a/Build/Scripting/Hexen_ACS.cfg b/Build/Scripting/Hexen_ACS.cfg index c42b04b7..e2179aa6 100644 --- a/Build/Scripting/Hexen_ACS.cfg +++ b/Build/Scripting/Hexen_ACS.cfg @@ -20,6 +20,7 @@ argumentdelimiter = ","; terminator = ";"; keywordhelp = "http://www.zdoom.org/wiki/index.php?title=%K"; snippetsdir = "acs"; +scripttype = 1; //0 = unknown script, 1 = acc, 2 = modeldef, 3 = decorate keywords { diff --git a/Build/Scripting/ZDoom_ACS.cfg b/Build/Scripting/ZDoom_ACS.cfg index be8f2545..d4892488 100644 --- a/Build/Scripting/ZDoom_ACS.cfg +++ b/Build/Scripting/ZDoom_ACS.cfg @@ -20,6 +20,7 @@ argumentdelimiter = ","; terminator = ";"; keywordhelp = "http://www.zdoom.org/wiki/index.php?title=%K"; snippetsdir = "acs"; +scripttype = 1; //0 = unknown script, 1 = acc, 2 = modeldef, 3 = decorate keywords { diff --git a/Build/Scripting/ZDoom_DECORATE.cfg b/Build/Scripting/ZDoom_DECORATE.cfg index ae2ff9b9..5eb1b3f0 100644 --- a/Build/Scripting/ZDoom_DECORATE.cfg +++ b/Build/Scripting/ZDoom_DECORATE.cfg @@ -14,6 +14,7 @@ functionclose = ")"; argumentdelimiter = ","; terminator = ";"; keywordhelp = "http://www.zdoom.org/wiki/index.php?title=%K"; +scripttype = 3; //0 = unknown script, 1 = acc, 2 = modeldef, 3 = decorate keywords { diff --git a/Build/Scripting/Skulltag_ACS.cfg b/Build/Scripting/Zandronum_ACS.cfg similarity index 96% rename from Build/Scripting/Skulltag_ACS.cfg rename to Build/Scripting/Zandronum_ACS.cfg index 8cf5ddfa..7cb2596b 100644 --- a/Build/Scripting/Skulltag_ACS.cfg +++ b/Build/Scripting/Zandronum_ACS.cfg @@ -8,7 +8,7 @@ parameters = "-I \"%PT\" -I \"%PS\" %FI %FO"; resultlump = "BEHAVIOR"; // Editor settings -description = "Skulltag ACS script"; +description = "Zandronum ACS script"; codepage = 0; extensions = "acs"; casesensitive = false; @@ -20,6 +20,7 @@ argumentdelimiter = ","; terminator = ";"; keywordhelp = "http://www.zdoom.org/wiki/index.php?title=%K"; snippetsdir = "acs"; +scripttype = 1; //0 = unknown script, 1 = acc, 2 = modeldef, 3 = decorate keywords { diff --git a/Source/Core/Builder.csproj b/Source/Core/Builder.csproj index 5ac9cbab..d20f9990 100644 --- a/Source/Core/Builder.csproj +++ b/Source/Core/Builder.csproj @@ -704,6 +704,12 @@ PasteOptionsControl.cs + + UserControl + + + SectorSlopeControl.cs + UserControl @@ -796,7 +802,6 @@ - @@ -931,6 +936,9 @@ Designer PasteOptionsControl.cs + + SectorSlopeControl.cs + StatisticsControl.cs diff --git a/Source/Core/Config/ConfigurationInfo.cs b/Source/Core/Config/ConfigurationInfo.cs index 09b6c25f..7a887a5f 100644 --- a/Source/Core/Config/ConfigurationInfo.cs +++ b/Source/Core/Config/ConfigurationInfo.cs @@ -53,6 +53,7 @@ namespace CodeImp.DoomBuilder.Config private string defaultlumpname; private string nodebuildersave; private string nodebuildertest; + private readonly string defaultscriptcompiler; //mxd private DataLocationList resources; private Configuration config; //mxd private bool enabled; //mxd @@ -76,6 +77,7 @@ namespace CodeImp.DoomBuilder.Config public string DefaultLumpName { get { return defaultlumpname; } } public string NodebuilderSave { get { return nodebuildersave; } internal set { nodebuildersave = value; } } public string NodebuilderTest { get { return nodebuildertest; } internal set { nodebuildertest = value; } } + public string DefaultScriptCompiler { get { return defaultscriptcompiler; } } //mxd internal DataLocationList Resources { get { return resources; } } internal Configuration Configuration { get { return config; } } //mxd public bool Enabled { get { return enabled; } internal set { enabled = value; } } //mxd @@ -116,6 +118,7 @@ namespace CodeImp.DoomBuilder.Config // Load settings from program configuration this.nodebuildersave = General.Settings.ReadSetting("configurations." + settingskey + ".nodebuildersave", MISSING_NODEBUILDER); this.nodebuildertest = General.Settings.ReadSetting("configurations." + settingskey + ".nodebuildertest", MISSING_NODEBUILDER); + this.defaultscriptcompiler = cfg.ReadSetting("defaultscriptcompiler", ""); //mxd this.resources = new DataLocationList(General.Settings.Config, "configurations." + settingskey + ".resources"); this.startmode = General.Settings.ReadSetting("configurations." + settingskey + ".startmode", "VerticesMode"); this.enabled = General.Settings.ReadSetting("configurations." + settingskey + ".enabled", config.ReadSetting("enabledbydefault", false)); //mxd diff --git a/Source/Core/Config/MapLumpInfo.cs b/Source/Core/Config/MapLumpInfo.cs index 55d1a7ba..4f970457 100644 --- a/Source/Core/Config/MapLumpInfo.cs +++ b/Source/Core/Config/MapLumpInfo.cs @@ -25,12 +25,13 @@ namespace CodeImp.DoomBuilder.Config public struct MapLumpInfo { // Members - public string name; - public bool required; - public bool blindcopy; - public bool nodebuild; - public bool allowempty; - internal ScriptConfiguration script; + public readonly string name; + public readonly bool required; + public readonly bool blindcopy; + public readonly bool nodebuild; + public readonly bool allowempty; + public readonly bool scriptbuild; //mxd + internal readonly ScriptConfiguration script; // Construct from IDictionary internal MapLumpInfo(string name, Configuration cfg) @@ -42,6 +43,7 @@ namespace CodeImp.DoomBuilder.Config this.blindcopy = cfg.ReadSetting("maplumpnames." + name + ".blindcopy", false); this.nodebuild = cfg.ReadSetting("maplumpnames." + name + ".nodebuild", false); this.allowempty = cfg.ReadSetting("maplumpnames." + name + ".allowempty", false); + this.scriptbuild = cfg.ReadSetting("maplumpnames." + name + ".scriptbuild", false); //mxd string scriptconfig = cfg.ReadSetting("maplumpnames." + name + ".script", ""); // Find script configuration diff --git a/Source/Core/Config/ScriptConfiguration.cs b/Source/Core/Config/ScriptConfiguration.cs index 02a18fca..bf567703 100644 --- a/Source/Core/Config/ScriptConfiguration.cs +++ b/Source/Core/Config/ScriptConfiguration.cs @@ -26,6 +26,14 @@ using CodeImp.DoomBuilder.IO; namespace CodeImp.DoomBuilder.Config { + //mxd + internal enum ScriptType { + UNKNOWN = 0, + ACS = 1, + MODELDEF = 2, + DECORATE = 3, + } + internal class ScriptConfiguration : IComparable { #region ================== Constants @@ -52,6 +60,7 @@ namespace CodeImp.DoomBuilder.Config private readonly string argumentdelimiter; private readonly string terminator; private readonly string functionregex; + private readonly ScriptType scripttype; //mxd // Collections private readonly Dictionary keywords; @@ -82,6 +91,7 @@ namespace CodeImp.DoomBuilder.Config public string ArgumentDelimiter { get { return argumentdelimiter; } } public string Terminator { get { return terminator; } } public string FunctionRegEx { get { return functionregex; } } + public ScriptType ScriptType { get { return scripttype; } } //mxd public Dictionary Snippets { get { return snippets; } } //mxd // Collections @@ -116,6 +126,7 @@ namespace CodeImp.DoomBuilder.Config terminator = ""; functionregex = ""; description = "Plain text"; + scripttype = ScriptType.UNKNOWN; //mxd extensions = new[] { "txt" }; snippets = new Dictionary(StringComparer.Ordinal); //mxd } @@ -146,6 +157,7 @@ namespace CodeImp.DoomBuilder.Config argumentdelimiter = cfg.ReadSetting("argumentdelimiter", ""); terminator = cfg.ReadSetting("terminator", ""); functionregex = cfg.ReadSetting("functionregex", ""); + scripttype = (ScriptType)cfg.ReadSetting("scripttype", (int)ScriptType.UNKNOWN); //mxd // Make extensions array extensions = extensionsstring.Split(','); @@ -262,6 +274,12 @@ namespace CodeImp.DoomBuilder.Config { return string.Compare(this.description, other.description, true); } + + //mxd + public override string ToString() + { + return description; + } #endregion } diff --git a/Source/Core/Controls/ScriptDocumentTab.cs b/Source/Core/Controls/ScriptDocumentTab.cs index bdc0ca37..0a74d39d 100644 --- a/Source/Core/Controls/ScriptDocumentTab.cs +++ b/Source/Core/Controls/ScriptDocumentTab.cs @@ -310,8 +310,24 @@ namespace CodeImp.DoomBuilder.Controls protected void updateNavigator() { //mxd. known script type? - if (Array.IndexOf(ScriptTypes.TYPES, config.Description) != -1) { - updateNavigator(new MemoryStream(editor.GetText()), config.Description); + if (config.ScriptType != ScriptType.UNKNOWN) { + switch(config.ScriptType) { + case ScriptType.ACS: + updateNavigatorAcs(new MemoryStream(editor.GetText())); + break; + + case ScriptType.DECORATE: + updateNavigatorDecorate(new MemoryStream(editor.GetText())); + break; + + case ScriptType.MODELDEF: + updateNavigatorModeldef(new MemoryStream(editor.GetText())); + break; + + default: + throw new NotImplementedException("Script type " + config.ScriptType + " navigator support is not implemented!"); + } + navigator.Enabled = true; }else{ navigator.Items.Clear(); @@ -319,18 +335,6 @@ namespace CodeImp.DoomBuilder.Controls } } - //mxd - private void updateNavigator(MemoryStream stream, string scriptType) - { - if (scriptType == ScriptTypes.TYPES[(int)ScriptType.ACS]) { - updateNavigatorAcs(stream); - } else if (scriptType == ScriptTypes.TYPES[(int)ScriptType.MODELDEF]) { - updateNavigatorModeldef(stream); - } else if (scriptType == ScriptTypes.TYPES[(int)ScriptType.DECORATE]) { - updateNavigatorDecorate(stream); - } - } - //mxd private void updateNavigatorDecorate(MemoryStream stream) { @@ -384,7 +388,7 @@ namespace CodeImp.DoomBuilder.Controls { ScriptTypeParserSE parser = new ScriptTypeParserSE(); if (parser.Parse(new MemoryStream(editor.GetText()), config.Description)) { - if (parser.ScriptType != (int)ScriptType.UNKNOWN && config.Description != ScriptTypes.TYPES[(int)parser.ScriptType]) + if (parser.ScriptType != ScriptType.UNKNOWN && config.ScriptType != parser.ScriptType) return parser.ScriptType; } return ScriptType.UNKNOWN; diff --git a/Source/Core/Controls/ScriptEditorPanel.cs b/Source/Core/Controls/ScriptEditorPanel.cs index 0d413a7e..335de1fb 100644 --- a/Source/Core/Controls/ScriptEditorPanel.cs +++ b/Source/Core/Controls/ScriptEditorPanel.cs @@ -114,6 +114,12 @@ namespace CodeImp.DoomBuilder.Controls // Load this! ScriptLumpDocumentTab t = new ScriptLumpDocumentTab(this, maplumpinfo.name, maplumpinfo.script); tabs.TabPages.Add(t); + } + else if(maplumpinfo.scriptbuild) //mxd + { + // Load this! + ScriptLumpDocumentTab t = new ScriptLumpDocumentTab(this, maplumpinfo.name, General.CompiledScriptConfigs[General.Map.Options.ScriptCompiler]); + tabs.TabPages.Add(t); } } @@ -525,9 +531,8 @@ namespace CodeImp.DoomBuilder.Controls //mxd ScriptType st = t.VerifyScriptType(); if (st != ScriptType.UNKNOWN) { - string cfgType = ScriptTypes.TYPES[(int)st]; foreach (ScriptConfiguration cfg in scriptconfigs) { - if (cfg.Description == cfgType) { + if (cfg.ScriptType == st) { t.ChangeScriptConfig(cfg); break; } diff --git a/Source/Core/Controls/ScriptFileDocumentTab.cs b/Source/Core/Controls/ScriptFileDocumentTab.cs index 7fd29d71..4964c933 100644 --- a/Source/Core/Controls/ScriptFileDocumentTab.cs +++ b/Source/Core/Controls/ScriptFileDocumentTab.cs @@ -62,7 +62,7 @@ namespace CodeImp.DoomBuilder.Controls SetTitle("Untitled" + ext); editor.ClearUndoRedo(); //mxd - navigator.Enabled = Array.IndexOf(ScriptTypes.TYPES, config.Description) != -1; + navigator.Enabled = (config.ScriptType != ScriptType.UNKNOWN); } #endregion @@ -119,7 +119,7 @@ namespace CodeImp.DoomBuilder.Controls } //mxd. Should be called only if script is compiled successfully - if (compiler.Errors.Length == 0 && config.Description == ScriptTypes.TYPES[(int)ScriptType.ACS]) { + if (compiler.Errors.Length == 0 && config.ScriptType == ScriptType.ACS) { General.Map.UpdateScriptNames(); } } diff --git a/Source/Core/Controls/ScriptLumpDocumentTab.cs b/Source/Core/Controls/ScriptLumpDocumentTab.cs index ec6ff9b1..e8bc43ab 100644 --- a/Source/Core/Controls/ScriptLumpDocumentTab.cs +++ b/Source/Core/Controls/ScriptLumpDocumentTab.cs @@ -97,7 +97,7 @@ namespace CodeImp.DoomBuilder.Controls success = General.Map.CompileLump(lumpname, true); //mxd - if (success && config.Description == ScriptTypes.TYPES[(int)ScriptType.ACS]) + if (success && config.ScriptType == ScriptType.ACS) General.Map.UpdateScriptNames(); // Feed errors to panel diff --git a/Source/Core/Controls/SectorSlopeControl.Designer.cs b/Source/Core/Controls/SectorSlopeControl.Designer.cs new file mode 100644 index 00000000..d2e40863 --- /dev/null +++ b/Source/Core/Controls/SectorSlopeControl.Designer.cs @@ -0,0 +1,201 @@ +namespace CodeImp.DoomBuilder.Controls +{ + partial class SectorSlopeControl + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) { + if(disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() { + this.slopeangle = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.label23 = new System.Windows.Forms.Label(); + this.sloperotation = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.label24 = new System.Windows.Forms.Label(); + this.reset = new System.Windows.Forms.Button(); + this.slopeoffset = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); + this.label18 = new System.Windows.Forms.Label(); + this.rotationcontrol = new CodeImp.DoomBuilder.GZBuilder.Controls.AngleControl(); + this.angletrackbar = new System.Windows.Forms.TrackBar(); + this.label1 = new System.Windows.Forms.Label(); + this.pivotmodeselector = new System.Windows.Forms.ComboBox(); + ((System.ComponentModel.ISupportInitialize)(this.angletrackbar)).BeginInit(); + this.SuspendLayout(); + // + // slopeangle + // + this.slopeangle.AllowDecimal = true; + this.slopeangle.AllowNegative = true; + this.slopeangle.AllowRelative = true; + this.slopeangle.ButtonStep = 1; + this.slopeangle.ButtonStepFloat = 1F; + this.slopeangle.Location = new System.Drawing.Point(85, 78); + this.slopeangle.Name = "slopeangle"; + this.slopeangle.Size = new System.Drawing.Size(82, 24); + this.slopeangle.StepValues = null; + this.slopeangle.TabIndex = 29; + this.slopeangle.WhenTextChanged += new System.EventHandler(this.slopeangle_WhenTextChanged); + // + // label23 + // + this.label23.Location = new System.Drawing.Point(3, 83); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(76, 14); + this.label23.TabIndex = 28; + this.label23.Text = "Slope angle:"; + this.label23.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // sloperotation + // + this.sloperotation.AllowDecimal = true; + this.sloperotation.AllowNegative = true; + this.sloperotation.AllowRelative = true; + this.sloperotation.ButtonStep = 1; + this.sloperotation.ButtonStepFloat = 1F; + this.sloperotation.Location = new System.Drawing.Point(85, 48); + this.sloperotation.Name = "sloperotation"; + this.sloperotation.Size = new System.Drawing.Size(82, 24); + this.sloperotation.StepValues = null; + this.sloperotation.TabIndex = 27; + this.sloperotation.WhenTextChanged += new System.EventHandler(this.sloperotation_WhenTextChanged); + // + // label24 + // + this.label24.Location = new System.Drawing.Point(3, 53); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(76, 14); + this.label24.TabIndex = 26; + this.label24.Text = "Rotation:"; + this.label24.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // reset + // + this.reset.Location = new System.Drawing.Point(85, 138); + this.reset.Name = "reset"; + this.reset.Size = new System.Drawing.Size(82, 23); + this.reset.TabIndex = 25; + this.reset.Text = "Reset"; + this.reset.UseVisualStyleBackColor = true; + this.reset.Click += new System.EventHandler(this.reset_Click); + // + // slopeoffset + // + this.slopeoffset.AllowDecimal = true; + this.slopeoffset.AllowNegative = true; + this.slopeoffset.AllowRelative = true; + this.slopeoffset.ButtonStep = 1; + this.slopeoffset.ButtonStepFloat = 16F; + this.slopeoffset.Location = new System.Drawing.Point(85, 108); + this.slopeoffset.Name = "slopeoffset"; + this.slopeoffset.Size = new System.Drawing.Size(82, 24); + this.slopeoffset.StepValues = null; + this.slopeoffset.TabIndex = 24; + this.slopeoffset.WhenTextChanged += new System.EventHandler(this.slopeoffset_WhenTextChanged); + // + // label18 + // + this.label18.Location = new System.Drawing.Point(3, 113); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(76, 14); + this.label18.TabIndex = 23; + this.label18.Text = "Height offset:"; + this.label18.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // rotationcontrol + // + this.rotationcontrol.Angle = 0; + this.rotationcontrol.Location = new System.Drawing.Point(173, 36); + this.rotationcontrol.Name = "rotationcontrol"; + this.rotationcontrol.Size = new System.Drawing.Size(44, 44); + this.rotationcontrol.TabIndex = 56; + this.rotationcontrol.AngleChanged += new CodeImp.DoomBuilder.GZBuilder.Controls.AngleControl.AngleChangedDelegate(this.rotationcontrol_AngleChanged); + // + // angletrackbar + // + this.angletrackbar.Location = new System.Drawing.Point(173, 82); + this.angletrackbar.Maximum = 85; + this.angletrackbar.Minimum = -85; + this.angletrackbar.Name = "angletrackbar"; + this.angletrackbar.Size = new System.Drawing.Size(175, 45); + this.angletrackbar.TabIndex = 57; + this.angletrackbar.TickFrequency = 10; + this.angletrackbar.ValueChanged += new System.EventHandler(this.angletrackbar_ValueChanged); + // + // label1 + // + this.label1.Location = new System.Drawing.Point(3, 12); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(76, 14); + this.label1.TabIndex = 58; + this.label1.Text = "Pivot:"; + this.label1.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // pivotmodeselector + // + this.pivotmodeselector.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.pivotmodeselector.FormattingEnabled = true; + this.pivotmodeselector.Items.AddRange(new object[] { + "Origin", + "Selection center", + "Sector center"}); + this.pivotmodeselector.Location = new System.Drawing.Point(85, 9); + this.pivotmodeselector.Name = "pivotmodeselector"; + this.pivotmodeselector.Size = new System.Drawing.Size(132, 21); + this.pivotmodeselector.TabIndex = 59; + this.pivotmodeselector.SelectedIndexChanged += new System.EventHandler(this.pivotmodeselector_SelectedIndexChanged); + // + // SectorSlopeControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.Controls.Add(this.pivotmodeselector); + this.Controls.Add(this.label1); + this.Controls.Add(this.angletrackbar); + this.Controls.Add(this.rotationcontrol); + this.Controls.Add(this.slopeangle); + this.Controls.Add(this.label23); + this.Controls.Add(this.sloperotation); + this.Controls.Add(this.label24); + this.Controls.Add(this.reset); + this.Controls.Add(this.slopeoffset); + this.Controls.Add(this.label18); + this.Name = "SectorSlopeControl"; + this.Size = new System.Drawing.Size(353, 169); + ((System.ComponentModel.ISupportInitialize)(this.angletrackbar)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private ButtonsNumericTextbox slopeangle; + private System.Windows.Forms.Label label23; + private ButtonsNumericTextbox sloperotation; + private System.Windows.Forms.Label label24; + private System.Windows.Forms.Button reset; + private ButtonsNumericTextbox slopeoffset; + private System.Windows.Forms.Label label18; + private CodeImp.DoomBuilder.GZBuilder.Controls.AngleControl rotationcontrol; + private System.Windows.Forms.TrackBar angletrackbar; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ComboBox pivotmodeselector; + } +} diff --git a/Source/Core/Controls/SectorSlopeControl.cs b/Source/Core/Controls/SectorSlopeControl.cs new file mode 100644 index 00000000..01acfa15 --- /dev/null +++ b/Source/Core/Controls/SectorSlopeControl.cs @@ -0,0 +1,165 @@ +using System; +using System.Windows.Forms; +using CodeImp.DoomBuilder.Geometry; + +namespace CodeImp.DoomBuilder.Controls +{ + #region ================== Enums + + internal enum SlopePivotMode + { + ORIGIN, // pivot around 0, 0 + GLOBAL, // pivot around globalslopepivot + LOCAL, // pivot around localslopepivots + } + + #endregion + + public partial class SectorSlopeControl : UserControl + { + + #region ================== Events + + public event EventHandler OnValuesChanged; //mxd + + #endregion + + #region ================== Variables + + private static SlopePivotMode pivotmode = SlopePivotMode.LOCAL; + internal SlopePivotMode PivotMode { get { return pivotmode; } } + + private bool blockUpdate; + + //slope values + private float anglexy; + private float anglez; + private float offset; + + public float AngleXY { get { return anglexy; } } + public float AngleZ { get { return anglez; } } + public float Offset { get { return offset; } } + + #endregion + + public SectorSlopeControl() { + InitializeComponent(); + pivotmodeselector.SelectedIndex = (int) pivotmode; + } + + #region ================== Methods + + public void SetValues(float anglexy, float anglez, float offset, bool first) { + blockUpdate = true; + + //update values + if (first) { + this.anglexy = anglexy; + this.anglez = anglez; + this.offset = offset; + } else { + if(!float.IsNaN(this.anglexy) && this.anglexy != anglexy) this.anglexy = float.NaN; + if(!float.IsNaN(this.anglez) && this.anglez != anglez) this.anglez = float.NaN; + if(!float.IsNaN(this.offset) && this.offset != offset) this.offset = float.NaN; + } + + //update controls + if(float.IsNaN(this.anglexy)) { + sloperotation.Text = ""; + rotationcontrol.Angle = 0; + } else { + sloperotation.Text = this.anglexy.ToString(); + rotationcontrol.Angle = (int)Math.Round(Angle2D.RadToDeg(this.anglexy)); + } + + if(float.IsNaN(this.anglez)) { + slopeangle.Text = ""; + angletrackbar.Value = 0; + } else { + slopeangle.Text = this.anglez.ToString(); + angletrackbar.Value = General.Clamp((int)Math.Round(Angle2D.RadToDeg(this.anglez)), angletrackbar.Minimum, angletrackbar.Maximum); + } + + slopeoffset.Text = float.IsNaN(this.offset) ? "" : this.offset.ToString(); + + blockUpdate = false; + } + + #endregion + + #region ================== Events + + private void sloperotation_WhenTextChanged(object sender, EventArgs e) { + if(blockUpdate) return; + blockUpdate = true; + + anglexy = Angle2D.DegToRad(sloperotation.GetResultFloat(0f)); + rotationcontrol.Angle = (int)Math.Round(sloperotation.GetResultFloat(0f)); + + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + blockUpdate = false; + } + + private void rotationcontrol_AngleChanged() { + if(blockUpdate) return; + blockUpdate = true; + + sloperotation.Text = rotationcontrol.Angle.ToString(); + anglexy = Angle2D.DegToRad(rotationcontrol.Angle); + + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + blockUpdate = false; + } + + private void slopeangle_WhenTextChanged(object sender, EventArgs e) { + if(blockUpdate) return; + blockUpdate = true; + + int anglezdeg = General.Clamp((int)Math.Round(slopeangle.GetResultFloat(0f)), angletrackbar.Minimum, angletrackbar.Maximum); + angletrackbar.Value = anglezdeg; + anglez = Angle2D.DegToRad(anglezdeg); + + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + blockUpdate = false; + } + + private void angletrackbar_ValueChanged(object sender, EventArgs e) { + if(blockUpdate) return; + blockUpdate = true; + + slopeangle.Text = angletrackbar.Value.ToString(); + anglez = Angle2D.DegToRad(angletrackbar.Value); + + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + blockUpdate = false; + } + + private void slopeoffset_WhenTextChanged(object sender, EventArgs e) { + offset = slopeoffset.GetResultFloat(0f); + if(OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + } + + private void reset_Click(object sender, EventArgs e) { + blockUpdate = true; + + sloperotation.Text = "0"; + rotationcontrol.Angle = 0; + slopeangle.Text = "0"; + angletrackbar.Value = 0; + slopeoffset.Text = "0"; + anglexy = 0f; + anglez = 0f; + offset = 0f; + + if (OnValuesChanged != null) OnValuesChanged(this, EventArgs.Empty); + blockUpdate = false; + } + + private void pivotmodeselector_SelectedIndexChanged(object sender, EventArgs e) { + pivotmode = (SlopePivotMode)pivotmodeselector.SelectedIndex; + } + + #endregion + + } +} diff --git a/Source/Core/Controls/SectorSlopeControl.resx b/Source/Core/Controls/SectorSlopeControl.resx new file mode 100644 index 00000000..ff31a6db --- /dev/null +++ b/Source/Core/Controls/SectorSlopeControl.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Source/Core/GZBuilder/Controls/PairedFieldsControl.cs b/Source/Core/GZBuilder/Controls/PairedFieldsControl.cs index 3b341081..e4be4857 100644 --- a/Source/Core/GZBuilder/Controls/PairedFieldsControl.cs +++ b/Source/Core/GZBuilder/Controls/PairedFieldsControl.cs @@ -26,7 +26,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls private bool allowValueLinking; private bool linkValues; private bool blockUpdate; - private int bResetOffsetX; + private readonly int bResetOffsetX; #endregion diff --git a/Source/Core/GZBuilder/Data/ScriptType.cs b/Source/Core/GZBuilder/Data/ScriptType.cs deleted file mode 100644 index fb16be07..00000000 --- a/Source/Core/GZBuilder/Data/ScriptType.cs +++ /dev/null @@ -1,14 +0,0 @@ - -namespace CodeImp.DoomBuilder.GZBuilder.Data { - internal enum ScriptType { - UNKNOWN = 0, - ACS = 1, - MODELDEF = 2, - DECORATE = 3, - } - - internal struct ScriptTypes { - private static string[] knownScriptTypes = { "UNKNOWN SCRIPT", "ZDoom ACS script", "GZDoom MODELDEF", "ZDoom DECORATE" }; - internal static string[] TYPES { get { return knownScriptTypes; } } - } -} diff --git a/Source/Core/GZBuilder/GZDoom/ScriptTypeParserSE.cs b/Source/Core/GZBuilder/GZDoom/ScriptTypeParserSE.cs index 66043052..11f61cd8 100644 --- a/Source/Core/GZBuilder/GZDoom/ScriptTypeParserSE.cs +++ b/Source/Core/GZBuilder/GZDoom/ScriptTypeParserSE.cs @@ -1,6 +1,6 @@ using System.IO; +using CodeImp.DoomBuilder.Config; using CodeImp.DoomBuilder.ZDoom; -using CodeImp.DoomBuilder.GZBuilder.Data; //mxd. Parser used to determine which script type given text is. namespace CodeImp.DoomBuilder.GZBuilder.GZDoom { diff --git a/Source/Core/General/General.cs b/Source/Core/General/General.cs index a31d8751..44e71240 100644 --- a/Source/Core/General/General.cs +++ b/Source/Core/General/General.cs @@ -176,6 +176,7 @@ namespace CodeImp.DoomBuilder private static List compilers; private static List nodebuilders; private static Dictionary scriptconfigs; + private static Dictionary compiledscriptconfigs; //mxd // States private static bool debugbuild; @@ -216,6 +217,7 @@ namespace CodeImp.DoomBuilder internal static List Nodebuilders { get { return nodebuilders; } } internal static List Compilers { get { return compilers; } } internal static Dictionary ScriptConfigs { get { return scriptconfigs; } } + internal static Dictionary CompiledScriptConfigs { get { return compiledscriptconfigs; } } //mxd public static MapManager Map { get { return map; } } public static ActionManager Actions { get { return actions; } } public static HintsManager Hints { get { return hints; } } //mxd @@ -404,6 +406,7 @@ namespace CodeImp.DoomBuilder // Make collection scriptconfigs = new Dictionary(StringComparer.Ordinal); + compiledscriptconfigs = new Dictionary(StringComparer.Ordinal); //mxd // Go for all cfg files in the scripts directory filenames = Directory.GetFiles(scriptspath, "*.cfg", SearchOption.TopDirectoryOnly); @@ -429,6 +432,10 @@ namespace CodeImp.DoomBuilder ScriptConfiguration scfg = new ScriptConfiguration(cfg); string filename = Path.GetFileName(filepath); scriptconfigs.Add(filename.ToLowerInvariant(), scfg); + + //mxd. Store acc compilers in a separate dictionary + if(scfg.ScriptType == ScriptType.ACS) + compiledscriptconfigs.Add(filename.ToLowerInvariant(), scfg); } catch(Exception e) { diff --git a/Source/Core/General/MapManager.cs b/Source/Core/General/MapManager.cs index 7f5bffe4..bec5abf8 100644 --- a/Source/Core/General/MapManager.cs +++ b/Source/Core/General/MapManager.cs @@ -1398,7 +1398,7 @@ namespace CodeImp.DoomBuilder { // Go for all the map lumps foreach (MapLumpInfo lumpinfo in config.MapLumps.Values) { // Is this a script lump? - if (lumpinfo.script != null) { + if(lumpinfo.script != null || lumpinfo.scriptbuild) { // Compile it now success &= CompileLump(lumpinfo.name, false); } @@ -1416,7 +1416,12 @@ namespace CodeImp.DoomBuilder { string reallumpname = lumpname; //mxd. Does lump require compiling? - ScriptConfiguration scriptconfig = config.MapLumps[lumpname].script; + ScriptConfiguration scriptconfig; + if(config.MapLumps[lumpname].scriptbuild) { + scriptconfig = General.CompiledScriptConfigs[General.Map.Options.ScriptCompiler]; + } else { + scriptconfig = config.MapLumps[lumpname].script; + } if (scriptconfig.Compiler == null) return true; // Find the lump diff --git a/Source/Core/Map/MapOptions.cs b/Source/Core/Map/MapOptions.cs index 991cbd1f..83b50802 100644 --- a/Source/Core/Map/MapOptions.cs +++ b/Source/Core/Map/MapOptions.cs @@ -57,6 +57,9 @@ namespace CodeImp.DoomBuilder.Map // Script files opened private List scriptfiles; + // mxd. Script compiler + private string scriptcompiler; + //mxd. Sector drawing options private string defaultfloortexture; private string defaultceiltexture; @@ -85,6 +88,7 @@ namespace CodeImp.DoomBuilder.Map internal DataLocationList Resources { get { return resources; } } internal bool StrictPatches { get { return strictpatches; } set { strictpatches = value; } } internal List ScriptFiles { get { return scriptfiles; } set { scriptfiles = value; } } + internal string ScriptCompiler { get { return scriptcompiler; } set { scriptcompiler = value; } } //mxd internal string PreviousName { get { return previousname; } set { previousname = value; } } internal string CurrentName { @@ -140,6 +144,7 @@ namespace CodeImp.DoomBuilder.Map this.resources = new DataLocationList(); this.mapconfig = new Configuration(true); this.scriptfiles = new List(); + this.scriptcompiler = ""; //mxd this.tagLabels = new Dictionary(); //mxd //mxd. Sector drawing options @@ -182,6 +187,9 @@ namespace CodeImp.DoomBuilder.Map tagLabels.Add(tag, label); } + //mxd. Script compiler + scriptcompiler = this.mapconfig.ReadSetting("scriptcompiler", string.Empty); + //mxd. Read Sector drawing options defaultfloortexture = this.mapconfig.ReadSetting("defaultfloortexture", string.Empty); defaultceiltexture = this.mapconfig.ReadSetting("defaultceiltexture", string.Empty); @@ -321,6 +329,9 @@ namespace CodeImp.DoomBuilder.Map // Write grid settings General.Map.Grid.WriteToConfig(mapconfig, "grid"); + //mxd. Write script compiler + if(!string.IsNullOrEmpty(scriptcompiler)) mapconfig.WriteSetting("scriptcompiler", scriptcompiler); + // Write scripts to config mapconfig.DeleteSetting("scripts"); for(int i = 0; i < scriptfiles.Count; i++) diff --git a/Source/Core/Windows/MainForm.cs b/Source/Core/Windows/MainForm.cs index ccc8698c..6181ccc2 100644 --- a/Source/Core/Windows/MainForm.cs +++ b/Source/Core/Windows/MainForm.cs @@ -2300,7 +2300,7 @@ namespace CodeImp.DoomBuilder.Windows // Get configuration setting filename = General.Settings.ReadSetting("recentfiles.file" + i, ""); - if(filename != "") + if(filename != "" && File.Exists(filename)) { // Set up item int number = i + 1; diff --git a/Source/Core/Windows/MapOptionsForm.Designer.cs b/Source/Core/Windows/MapOptionsForm.Designer.cs index 49d057d0..5d330fe2 100644 --- a/Source/Core/Windows/MapOptionsForm.Designer.cs +++ b/Source/Core/Windows/MapOptionsForm.Designer.cs @@ -33,6 +33,8 @@ namespace CodeImp.DoomBuilder.Windows System.Windows.Forms.Label label1; System.Windows.Forms.GroupBox panelsettings; System.Windows.Forms.Label label4; + this.scriptcompiler = new System.Windows.Forms.ComboBox(); + this.scriptcompilerlabel = new System.Windows.Forms.Label(); this.levelname = new System.Windows.Forms.TextBox(); this.config = new System.Windows.Forms.ComboBox(); this.apply = new System.Windows.Forms.Button(); @@ -52,7 +54,7 @@ namespace CodeImp.DoomBuilder.Windows // label3 // label3.AutoSize = true; - label3.Location = new System.Drawing.Point(239, 60); + label3.Location = new System.Drawing.Point(239, 83); label3.Name = "label3"; label3.Size = new System.Drawing.Size(90, 14); label3.TabIndex = 9; @@ -61,7 +63,7 @@ namespace CodeImp.DoomBuilder.Windows // label2 // label2.AutoSize = true; - label2.Location = new System.Drawing.Point(58, 60); + label2.Location = new System.Drawing.Point(58, 83); label2.Name = "label2"; label2.Size = new System.Drawing.Size(65, 14); label2.TabIndex = 7; @@ -69,17 +71,19 @@ namespace CodeImp.DoomBuilder.Windows // // label1 // - label1.AutoSize = true; - label1.Location = new System.Drawing.Point(18, 27); + label1.Location = new System.Drawing.Point(13, 27); label1.Name = "label1"; - label1.Size = new System.Drawing.Size(105, 14); + label1.Size = new System.Drawing.Size(110, 14); label1.TabIndex = 5; label1.Text = "Game Configuration:"; + label1.TextAlign = System.Drawing.ContentAlignment.TopRight; // // panelsettings // panelsettings.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + panelsettings.Controls.Add(this.scriptcompiler); + panelsettings.Controls.Add(this.scriptcompilerlabel); panelsettings.Controls.Add(label3); panelsettings.Controls.Add(this.levelname); panelsettings.Controls.Add(label2); @@ -87,15 +91,35 @@ namespace CodeImp.DoomBuilder.Windows panelsettings.Controls.Add(label1); panelsettings.Location = new System.Drawing.Point(12, 12); panelsettings.Name = "panelsettings"; - panelsettings.Size = new System.Drawing.Size(397, 88); + panelsettings.Size = new System.Drawing.Size(397, 112); panelsettings.TabIndex = 0; panelsettings.TabStop = false; panelsettings.Text = " Settings "; // + // scriptcompiler + // + this.scriptcompiler.DropDownHeight = 206; + this.scriptcompiler.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.scriptcompiler.FormattingEnabled = true; + this.scriptcompiler.IntegralHeight = false; + this.scriptcompiler.Location = new System.Drawing.Point(129, 52); + this.scriptcompiler.Name = "scriptcompiler"; + this.scriptcompiler.Size = new System.Drawing.Size(254, 22); + this.scriptcompiler.TabIndex = 10; + // + // scriptcompilerlabel + // + this.scriptcompilerlabel.Location = new System.Drawing.Point(13, 55); + this.scriptcompilerlabel.Name = "scriptcompilerlabel"; + this.scriptcompilerlabel.Size = new System.Drawing.Size(110, 14); + this.scriptcompilerlabel.TabIndex = 11; + this.scriptcompilerlabel.Text = "Script Language:"; + this.scriptcompilerlabel.TextAlign = System.Drawing.ContentAlignment.TopRight; + // // levelname // this.levelname.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper; - this.levelname.Location = new System.Drawing.Point(129, 57); + this.levelname.Location = new System.Drawing.Point(129, 80); this.levelname.MaxLength = 8; this.levelname.Name = "levelname"; this.levelname.Size = new System.Drawing.Size(94, 20); @@ -128,7 +152,7 @@ namespace CodeImp.DoomBuilder.Windows // apply // this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.apply.Location = new System.Drawing.Point(297, 358); + this.apply.Location = new System.Drawing.Point(297, 378); this.apply.Name = "apply"; this.apply.Size = new System.Drawing.Size(112, 25); this.apply.TabIndex = 2; @@ -140,7 +164,7 @@ namespace CodeImp.DoomBuilder.Windows // this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancel.Location = new System.Drawing.Point(179, 358); + this.cancel.Location = new System.Drawing.Point(179, 378); this.cancel.Name = "cancel"; this.cancel.Size = new System.Drawing.Size(112, 25); this.cancel.TabIndex = 3; @@ -155,7 +179,7 @@ namespace CodeImp.DoomBuilder.Windows this.panelres.Controls.Add(this.strictpatches); this.panelres.Controls.Add(this.datalocations); this.panelres.Controls.Add(label4); - this.panelres.Location = new System.Drawing.Point(12, 106); + this.panelres.Location = new System.Drawing.Point(12, 130); this.panelres.Name = "panelres"; this.panelres.Size = new System.Drawing.Size(397, 240); this.panelres.TabIndex = 1; @@ -188,7 +212,7 @@ namespace CodeImp.DoomBuilder.Windows this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.CancelButton = this.cancel; - this.ClientSize = new System.Drawing.Size(421, 391); + this.ClientSize = new System.Drawing.Size(421, 411); this.Controls.Add(this.panelres); this.Controls.Add(this.cancel); this.Controls.Add(this.apply); @@ -221,6 +245,8 @@ namespace CodeImp.DoomBuilder.Windows private System.Windows.Forms.GroupBox panelres; private CodeImp.DoomBuilder.Controls.ResourceListEditor datalocations; private System.Windows.Forms.CheckBox strictpatches; + private System.Windows.Forms.ComboBox scriptcompiler; + private System.Windows.Forms.Label scriptcompilerlabel; } diff --git a/Source/Core/Windows/MapOptionsForm.cs b/Source/Core/Windows/MapOptionsForm.cs index 197c7338..6d89516f 100644 --- a/Source/Core/Windows/MapOptionsForm.cs +++ b/Source/Core/Windows/MapOptionsForm.cs @@ -17,6 +17,7 @@ #region ================== Namespaces using System; +using System.Collections.Generic; using System.Windows.Forms; using CodeImp.DoomBuilder.Map; using CodeImp.DoomBuilder.Data; @@ -96,6 +97,46 @@ namespace CodeImp.DoomBuilder.Windows //mxd if(General.Map != null) datalocations.StartPath = General.Map.FilePathName; + //mxd. Set script compiler + if (config.SelectedIndex != -1) + { + ConfigurationInfo ci = config.SelectedItem as ConfigurationInfo; + + foreach(KeyValuePair group in General.CompiledScriptConfigs) + { + scriptcompiler.Items.Add(group.Value); + if(group.Key == options.ScriptCompiler) + scriptcompiler.SelectedIndex = scriptcompiler.Items.Count - 1; + } + + //Nothing selected? Let's try default one form the game configuration, if we have any + if(scriptcompiler.SelectedIndex == -1 && !string.IsNullOrEmpty(ci.DefaultScriptCompiler)) + { + int cfgindex = 0; + + foreach(KeyValuePair group in General.CompiledScriptConfigs) + { + if(group.Key == ci.DefaultScriptCompiler) + { + scriptcompiler.SelectedIndex = cfgindex; + break; + } + cfgindex++; + } + } + + if(General.CompiledScriptConfigs.Count == 0 || string.IsNullOrEmpty(ci.DefaultScriptCompiler)) + { + scriptcompiler.Enabled = false; + scriptcompilerlabel.Enabled = false; + } + else if (scriptcompiler.SelectedIndex == -1 && scriptcompiler.Items.Count > 0) + { + scriptcompiler.SelectedIndex = 0; + } + } + + // Set the level name if (!string.IsNullOrEmpty(options.CurrentName)) levelname.Text = options.CurrentName; //mxd @@ -208,6 +249,21 @@ namespace CodeImp.DoomBuilder.Windows options.CurrentName = levelname.Text.Trim().ToUpper(); options.StrictPatches = strictpatches.Checked; options.CopyResources(datalocations.GetResources()); + + //mxd. Store script compiler + if(scriptcompiler.Enabled && scriptcompiler.SelectedIndex > -1) + { + ScriptConfiguration scriptcfg = scriptcompiler.SelectedItem as ScriptConfiguration; + + foreach(KeyValuePair group in General.CompiledScriptConfigs) + { + if(group.Value == scriptcfg) + { + options.ScriptCompiler = group.Key; + break; + } + } + } // Hide window this.DialogResult = DialogResult.OK; @@ -237,6 +293,22 @@ namespace CodeImp.DoomBuilder.Windows // Get default lump name from configuration levelname.Text = ci.DefaultLumpName; } + + //mxd + bool enablescriptcompiler = !string.IsNullOrEmpty(ci.DefaultScriptCompiler); + scriptcompiler.Enabled = enablescriptcompiler; + scriptcompilerlabel.Enabled = enablescriptcompiler; + + //mxd. Select default script compiler for this game configuration + if (scriptcompiler.Enabled) + { + if (General.CompiledScriptConfigs.ContainsKey(ci.DefaultScriptCompiler)) + scriptcompiler.SelectedItem = General.CompiledScriptConfigs[ci.DefaultScriptCompiler]; + } + else + { + scriptcompiler.SelectedIndex = -1; + } // Show resources datalocations.FixedResourceLocationList(ci.Resources);