////////////////////////////////////////////////////////////////////////////// // DoomScript highlighter by Jhawk // last updated: 09-10-2004 ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // language name Language: DoomScript ////////////////////////////////////////////////////////////////////////////// // default file filter // note: if more than one extension is associated, eg: // C/C++ files (*.c,*.cpp,*.h,*.hpp)|*.c;*.cpp;*.h;*.hpp Filter: DoomScript (*.script)|*.script ////////////////////////////////////////////////////////////////////////////// // help file which will be invokend when F1 is pressed HelpFile: ////////////////////////////////////////////////////////////////////////////// // language case sensitivity // 0 - no // 1 - yes CaseSensitive: 1 ////////////////////////////////////////////////////////////////////////////// // comment type: LineComment - comment to the end of line // BlockCommentBeg - block comment begin, it could be // multiline // BlockCommentEnd - block comment end LineComment: // BlockCommentBeg: /* BlockCommentEnd: */ ////////////////////////////////////////////////////////////////////////////// // identifier characters // note: characters shouldn't be delimited, except arrays // array of chars could be defined as from_char..to_char //IdentifierBegChars: a..z A..Z % | = & , ! + - ' //IdentifierChars: a..z A..Z _ = - ' IdentifierBegChars: 0..9 a..z A..Z IdentifierChars: 0..9 a..z A..Z _ - ////////////////////////////////////////////////////////////////////////////// // numeric constants begin characters // note: characters shouldn't be delimited, except arrays // array of chars could be defined as from_char..to_char // number always starts with 0..9 except when NumConstBeg // defines other NumConstBegChars: $ NumConstChars: 0..9 a..z A..Z _ ////////////////////////////////////////////////////////////////////////////// // escape character EscapeChar: \ ////////////////////////////////////////////////////////////////////////////// // keyword table // note: delimited with spaces, lines could be wrapped // you may divide keywords into three groups which can be // highlighted differently ////////////////////////////////////////////////////////////////////////////// // General syntax keywords. Note: taken from PHP, so not all necessarily apply to DoomScript. Makes a good base though :) KeyWords1: for foreach while switch case break and or if else elseif as global break return ////////////////////////////////////////////////////////////////////////////// // Script commands from the Doom 3 Script Reference at doom3.stroms.biz KeyWords2: activate activateTargets bind bindPosition bindToJoint cacheSoundShader callFunction clearSignal distanceTo distanceToPoint fadeSound getAngles getAngularVelocity getColor getEntityKey getFloatKey getIntKey getKey getLinearVelocity getMaxs getMins getName getNextKey getOrigin getShaderParm getSize getTarget getVectorKey getWorldOrigin hasFunction hide isHidden numTargets randomTarget remove removeBinds restorePosition setAngles setAngularVelocity setColor setGuiFloat setGuiParm setKey setLinearVelocity setModel setName setNeverDormant setOrigin setOwner setShaderParm setShaderParms setSize setSkin setWorldOrigin show startFx startSound startSoundShader stopSound touches unbind wait waitFrame angToForward angToRight angToUp assert clearPersistantArgs clearSignalThread copySpawnArgs cos CrossProduct debugArrow debugBounds debugCircle debugLine DotProduct drawText error fadeIn fadeOut fadeTo firstPerson getcvar getEntity getFrameTime getPersistantFloat getPersistantString getPersistantVector getTicsPerSecond getTime getTraceBody getTraceEndPos getTraceEntity getTraceFraction getTraceJoint getTraceNormal influenceActive isClient isMultiplayer killthread music onSignal pause print println radiusDamage random respawn say setCamera setcvar setPersistantArg setSpawnArg sin spawn SpawnFloat SpawnString SpawnVector sqrt strLeft strLength strMid strRight strSkip strToFloat terminate threadname trace tracePoint trigger vecLength vecNormalize VecToAngles waitFor waitForThread warning start stop fadeInLight fadeOutLight getLightParm Off On setLightParm setLightParms setRadius setRadiusXYZ setShader Toggle launchMissiles leftFoot rightFoot startRagdoll accelSound accelTime accelTo bob closePortal decelSound decelTime decelTo disableSplineAngles enableSplineAngles isMoving isRotating move moveSound moveTo moveToPos openPortal removeInitialSplineAngles rotate rotateDownTo rotateOnce rotateTo rotateUpTo speed startSpline stopMoving stopRotating stopSpline sway time close disable enable isLocked isOpen lock open setFingerAngle stopFingers becomeNonSolid enableDamage isAtRest clearAllJoints clearJoint getJointAngle getJointHandle getJointPos setJointAngle setJointPos addToClip allowDrop ammoAvailable ammoInClip animDone autoReload clipSize createProjectile flashlight getBlendFrames getOwner getWorldModel isInvisible launchProjectiles melee netEndReload netReload nextWeapon playAnim playCycle setBlendFrames totalAmmoCount useAmmo weaponHolstered weaponLowering weaponOutOfAmmo weaponReady weaponReloading weaponRising weaponState getProjectileState markUsed animDistance animLength animState checkAnim chooseAnim closestEnemyToPoint disableEyeFocus disablePain enableAnim enableEyeFocus enablePain finishAction getAnimState getHead getPainAnim getState hasAnim hasEnemies idleAnim inAnimState nextEnemy overrideAnim preventPain setAnimPrefix SetConstraintPosition setNextState setState setSyncedAnimWeight stopAnim disableWeapon enableWeapon getButtons getCurrentWeapon getMove getPreviousWeapon getViewAngles getWeaponEntity inPDA openPDA selectWeapon randomPath allowDamage allowHiddenMovement allowMovement animTurn attackBegin attackEnd attackMelee attackMissile becomeRagdoll becomeSolid burn canBecomeSolid canHitEnemy canHitEnemyFromAnim canHitEnemyFromJoint canReachEnemy canReachEntity canReachPosition canSee chargeAttack clearBurn clearEnemy clearFlyOffset closestReachableEnemyOfEntity createMissile directDamage disableAFPush disableClip disableGravity enableAFPush enableClip enableGravity enemyInCombatCone enemyPositionValid enemyRange enemyRange2D entityInAttackCone faceEnemy faceEntity facingIdeal findActorsInBounds findEnemy findEnemyAI findEnemyInCombatNodes fireMissileAtTarget getClosestHiddenTarget getCombatNode getCurrentYaw getEnemy getEnemyEyePos getEnemyPos getHealth getJumpVelocity getMoveType getObstacle getRandomTarget getReachableEntityPosition getTalkTarget getTurnDelta getTurnRate heardSound ignoreDamage kickObstacles kill launchMissile locateEnemy lookAt lookAtEnemy meleeAttackToJoint moveOutOfRange moveStatus moveToAttackPosition moveToCover moveToEnemy moveToEnemyHeight moveToEntity moveToPosition muzzleFlash numSmokeEmitters preBurn predictEnemyPos pushPointIntoAAS radiusDamageFromJoint restoreMove saveMove setBoneMod setEnemy setFlyOffset setFlySpeed setHealth setMoveType setSmokeVisibility setTalkState setTalkTarget setTurnRate shrivel slideTo stopMove stopRagdoll stopThinking testAnimAttack testAnimMove testAnimMoveTowardEnemy testChargeAttack testMeleeAttack testMoveToPosition travelDistanceBetweenEntities travelDistanceBetweenPoints travelDistanceToEntity travelDistanceToPoint turnTo turnToEntity turnToPos waitAction waitMove wakeOnFlashlight wander vagary_ChooseObjectToThrow vagary_ThrowObjectAtEnemy abs anglemod180 anglemod360 CalcTimeForRotationAroundEntity clearSmoke crossFadeEnt delayRemove delayRemoveThread DelayTime fadeInEnt fadeOutEnt func_clipmodel headlook_off headlook_on interpolateShaderParm overrideLegs overrideTorso RandomDelay RandomTime setShaderTime unpause waitForButtonPress // Unused KeyWords3: ////////////////////////////////////////////////////////////////////////////// // string delimiter: StringBegChar - string begin char // StringEndChar - string end char // MultilineStrings - enables multiline strings, as perl // has it StringBegChar: ' " StringEndChar: ' " MultilineStrings: 1 ////////////////////////////////////////////////////////////////////////////// // use preprocessor: 0 - no // 1 - yes // note: if yes, '#' and statements after it will be // highlighted with Preprocessor defined colors UsePreprocessor: 1 ////////////////////////////////////////////////////////////////////////////// // highlight line: 0 - no // 1 - yes // note: if yes, current line will be highlighted CurrLineHighlighted: 1 ////////////////////////////////////////////////////////////////////////////// // colors // note: first value is foreground, second is background color // and third (optional) represents font attribute: // B - bold // I - italic // U - underline // S - strike out // attributes can be combined: eg. B or BI // as value, it could be used any standard windows color: // clBlack, clMaroon, clGreen, clOlive, clNavy, // clPurple, clTeal, clGray, clSilver, clRed, clLime, // clYellow, clBlue, clFuchsia, clAqua, clLtGray, // clDkGray, clWhite, clScrollBar, clBackground, // clActiveCaption, clInactiveCaption, clMenu, clWindow, // clWindowFrame, clMenuText, clWindowText, clCaptionText, // clActiveBorder, clInactiveBorder, clAppWorkSpace, // clHighlight, clHighlightText, clBtnFace, clBtnShadow, // clGrayText, clBtnText, clInactiveCaptionText, // clBtnHighlight, cl3DDkShadow, cl3DLight, clInfoText, // clInfoBk // as value, it could be used hex numeric constant too: // $BBGGRR - BB: blue, GG: green, RR: red, eg: $FF6A00 SpaceCol: clWindowText clWindow Keyword1Col: clBlue clWindow Keyword2Col: clNavy clWindow Keyword3Col: clYellow clWindow IdentifierCol: $00333333 clWindow CommentCol: clGray clWindow NumberCol: clTeal clWindow StringCol: clMaroon clWindow SymbolCol: clGray clWindow PreprocessorCol: clGreen clWindow SelectionCol: clWhite clHighlight CurrentLineCol: clBlack $00EEEEEE OverrideTxtFgColor: 0 BlockAutoindent: 0 BlockBegStr: { BlockEndStr: }