mirror of
https://github.com/ZDoom/acc.git
synced 2024-11-15 00:41:30 +00:00
467 lines
15 KiB
Text
467 lines
15 KiB
Text
|
|
||
|
//**************************************************************************
|
||
|
//**
|
||
|
//** zdefs.acs
|
||
|
//**
|
||
|
//** Common definitions for use when compiling ACS scripts for ZDoom
|
||
|
//**
|
||
|
//**************************************************************************
|
||
|
|
||
|
#define TRUE 1
|
||
|
#define FALSE 0
|
||
|
#define ON 1
|
||
|
#define OFF 0
|
||
|
#define YES 1
|
||
|
#define NO 0
|
||
|
|
||
|
#define LINE_FRONT 0
|
||
|
#define LINE_BACK 1
|
||
|
|
||
|
#define SIDE_FRONT 0
|
||
|
#define SIDE_BACK 1
|
||
|
|
||
|
#define TEXTURE_TOP 0
|
||
|
#define TEXTURE_MIDDLE 1
|
||
|
#define TEXTURE_BOTTOM 2
|
||
|
|
||
|
#define GAME_SINGLE_PLAYER 0
|
||
|
#define GAME_NET_COOPERATIVE 1
|
||
|
#define GAME_NET_DEATHMATCH 2
|
||
|
#define GAME_TITLE_MAP 3
|
||
|
|
||
|
// Classes are only useful with Hexen
|
||
|
#define CLASS_FIGHTER 0
|
||
|
#define CLASS_CLERIC 1
|
||
|
#define CLASS_MAGE 2
|
||
|
|
||
|
#define SKILL_VERY_EASY 0
|
||
|
#define SKILL_EASY 1
|
||
|
#define SKILL_NORMAL 2
|
||
|
#define SKILL_HARD 3
|
||
|
#define SKILL_VERY_HARD 4
|
||
|
|
||
|
#define BLOCK_NOTHING 0
|
||
|
#define BLOCK_CREATURES 1
|
||
|
#define BLOCK_EVERYTHING 2
|
||
|
#define BLOCK_RAILING 3
|
||
|
|
||
|
#define SCROLL 0
|
||
|
#define CARRY 1
|
||
|
#define SCROLL_AND_CARRY 2
|
||
|
|
||
|
// Means-of-death for Sector_SetDamage --------------------------------------
|
||
|
|
||
|
#define MOD_UNKNOWN 0
|
||
|
#define MOD_ROCKET 5
|
||
|
#define MOD_R_SPLASH 6
|
||
|
#define MOD_PLASMARIFLE 7
|
||
|
#define MOD_BFG_BOOM 8
|
||
|
#define MOD_BFG_SPLASH 9
|
||
|
#define MOD_CHAINSAW 10
|
||
|
#define MOD_SSHOTGUN 11
|
||
|
#define MOD_WATER 12
|
||
|
#define MOD_SLIME 13
|
||
|
#define MOD_LAVA 14
|
||
|
#define MOD_CRUSH 15
|
||
|
#define MOD_TELEFRAG 16
|
||
|
#define MOD_FALLING 17
|
||
|
#define MOD_SUICIDE 18
|
||
|
#define MOD_BARREL 19
|
||
|
#define MOD_EXIT 20
|
||
|
#define MOD_SPLASH 21
|
||
|
#define MOD_HIT 22
|
||
|
#define MOD_RAILGUN 23
|
||
|
#define MOD_ICE 24
|
||
|
#define MOD_DISINTEGRATE 25
|
||
|
#define MOD_POISON 26
|
||
|
#define MOD_ELECTRIC 27
|
||
|
|
||
|
// Return values for PlayMovie ----------------------------------------------
|
||
|
|
||
|
#define MOVIE_Played 0
|
||
|
#define MOVIE_Played_NoVideo 1
|
||
|
#define MOVIE_Played_Aborted 2
|
||
|
#define MOVIE_Failed -1
|
||
|
|
||
|
|
||
|
// Player properties --------------------------------------------------------
|
||
|
|
||
|
#define PROP_FROZEN 0
|
||
|
#define PROP_NOTARGET 1
|
||
|
#define PROP_INSTANTWEAPONSWITCH 2
|
||
|
#define PROP_FLY 3
|
||
|
#define PROP_TOTALLYFROZEN 4
|
||
|
|
||
|
// The following properties correspond to powers given by certain items
|
||
|
#define PROP_INVULNERABILITY 5
|
||
|
#define PROP_STRENGTH 6
|
||
|
#define PROP_INVISIBILITY 7
|
||
|
#define PROP_RADIATIONSUIT 8
|
||
|
#define PROP_ALLMAP 9
|
||
|
#define PROP_INFRARED 10
|
||
|
#define PROP_WEAPONLEVEL2 11
|
||
|
#define PROP_FLIGHT 12
|
||
|
#define PROP_SPEED 15
|
||
|
|
||
|
// Text colors for hudmessage -----------------------------------------------
|
||
|
|
||
|
#define CR_UNTRANSLATED -1
|
||
|
#define CR_BRICK 0
|
||
|
#define CR_TAN 1
|
||
|
#define CR_GRAY 2
|
||
|
#define CR_GREY 2
|
||
|
#define CR_GREEN 3
|
||
|
#define CR_BROWN 4
|
||
|
#define CR_GOLD 5
|
||
|
#define CR_RED 6
|
||
|
#define CR_BLUE 7
|
||
|
#define CR_ORANGE 8
|
||
|
#define CR_WHITE 9
|
||
|
#define CR_YELLOW 10
|
||
|
|
||
|
// HUD message types --------------------------------------------------------
|
||
|
|
||
|
#define HUDMSG_PLAIN 0
|
||
|
#define HUDMSG_FADEOUT 1
|
||
|
#define HUDMSG_TYPEON 2
|
||
|
#define HUDMSG_FADEINOUT 3
|
||
|
|
||
|
// OR this with one of the above to log the hudmessage to the console.
|
||
|
// i.e. instead of HUDMSG_PLAIN, you can use HUDMSG_PLAIN | HUDMSG_LOG
|
||
|
#define HUDMSG_LOG 0x80000000
|
||
|
|
||
|
// "Scripted" Marine weapon types -------------------------------------------
|
||
|
|
||
|
#define MARINEWEAPON_Dummy 0
|
||
|
#define MARINEWEAPON_Fist 1
|
||
|
#define MARINEWEAPON_BerserkFist 2
|
||
|
#define MARINEWEAPON_Chainsaw 3
|
||
|
#define MARINEWEAPON_Pistol 4
|
||
|
#define MARINEWEAPON_Shotgun 5
|
||
|
#define MARINEWEAPON_SuperShotgun 6
|
||
|
#define MARINEWEAPON_Chaingun 7
|
||
|
#define MARINEWEAPON_RocketLauncher 8
|
||
|
#define MARINEWEAPON_PlasmaRifle 9
|
||
|
#define MARINEWEAPON_Railgun 10
|
||
|
#define MARINEWEAPON_BFG 11
|
||
|
|
||
|
// Actor properties you can get/set -----------------------------------------
|
||
|
|
||
|
#define APROP_Health 0
|
||
|
#define APROP_Speed 1
|
||
|
#define APROP_Damage 2
|
||
|
#define APROP_Alpha 3
|
||
|
#define APROP_RenderStyle 4
|
||
|
#define APROP_Ambush 10
|
||
|
#define APROP_Invulnerable 11
|
||
|
#define APROP_SeeSound 5 // Sounds can only be set, not gotten
|
||
|
#define APROP_AttackSound 6
|
||
|
#define APROP_PainSound 7
|
||
|
#define APROP_DeathSound 8
|
||
|
#define APROP_ActiveSound 9
|
||
|
|
||
|
// Render Styles ------------------------------------------------------------
|
||
|
|
||
|
#define STYLE_None 0 // Do not draw
|
||
|
#define STYLE_Normal 1 // Normal; just copy the image to the screen
|
||
|
#define STYLE_Fuzzy 2 // Draw silhouette using "fuzz" effect
|
||
|
#define STYLE_SoulTrans 3 // Draw translucent with amount in r_transsouls
|
||
|
#define STYLE_OptFuzzy 4 // Draw as fuzzy or translucent, based on user preference
|
||
|
#define STYLE_Translucent 64 // Draw translucent
|
||
|
#define STYLE_Add 65 // Draw additive
|
||
|
|
||
|
// Properties you can use with GetLevelInfo() -------------------------------
|
||
|
|
||
|
#define LEVELINFO_PAR_TIME 0
|
||
|
#define LEVELINFO_CLUSTERNUM 1
|
||
|
#define LEVELINFO_LEVELNUM 2
|
||
|
#define LEVELINFO_TOTAL_SECRETS 3
|
||
|
#define LEVELINFO_FOUND_SECRETS 4
|
||
|
#define LEVELINFO_TOTAL_ITEMS 5
|
||
|
#define LEVELINFO_FOUND_ITEMS 6
|
||
|
#define LEVELINFO_TOTAL_MONSTERS 7
|
||
|
#define LEVELINFO_KILLED_MONSTERS 8
|
||
|
#define LEVELINFO_SUCK_TIME 9
|
||
|
|
||
|
|
||
|
// Shared spawnable things from Hexen. You can spawn these in the other -----
|
||
|
// games if you provide sprites for them, otherwise they'll be invisible. ---
|
||
|
|
||
|
#define T_ROCK1 41
|
||
|
#define T_ROCK2 42
|
||
|
#define T_ROCK3 43
|
||
|
#define T_DIRT1 44
|
||
|
#define T_DIRT2 45
|
||
|
#define T_DIRT3 46
|
||
|
#define T_DIRT4 47
|
||
|
#define T_DIRT5 48
|
||
|
#define T_DIRT6 49
|
||
|
#define T_STAINEDGLASS1 54
|
||
|
#define T_STAINEDGLASS2 55
|
||
|
#define T_STAINEDGLASS3 56
|
||
|
#define T_STAINEDGLASS4 57
|
||
|
#define T_STAINEDGLASS5 58
|
||
|
#define T_STAINEDGLASS6 59
|
||
|
#define T_STAINEDGLASS7 60
|
||
|
#define T_STAINEDGLASS8 61
|
||
|
#define T_STAINEDGLASS9 62
|
||
|
#define T_STAINEDGLASS0 63
|
||
|
|
||
|
// Doom Spawnable things (used for thingcount() and thing spawners) ---------
|
||
|
|
||
|
#define T_NONE 0
|
||
|
#define T_SHOTGUY 1
|
||
|
#define T_CHAINGUY 2
|
||
|
#define T_BARON 3
|
||
|
#define T_ZOMBIE 4
|
||
|
#define T_IMP 5
|
||
|
#define T_ARACHNOTRON 6
|
||
|
#define T_SPIDERMASTERMIND 7
|
||
|
#define T_DEMON 8
|
||
|
#define T_SPECTRE 9
|
||
|
#define T_IMPFIREBALL 10
|
||
|
#define T_CLIP 11
|
||
|
#define T_SHELLS 12
|
||
|
#define T_CACODEMON 19
|
||
|
#define T_REVENANT 20
|
||
|
#define T_BRIDGE 21
|
||
|
#define T_ARMORBONUS 22
|
||
|
#define T_STIMPACK 23
|
||
|
#define T_MEDKIT 24
|
||
|
#define T_SOULSPHERE 25
|
||
|
#define T_SHOTGUN 27
|
||
|
#define T_CHAINGUN 28
|
||
|
#define T_ROCKETLAUNCHER 29
|
||
|
#define T_PLASMAGUN 30
|
||
|
#define T_BFG 31
|
||
|
#define T_CHAINSAW 32
|
||
|
#define T_SUPERSHOTGUN 33
|
||
|
#define T_PLASMABOLT 51
|
||
|
#define T_TRACER 53
|
||
|
#define T_GREENARMOR 68
|
||
|
#define T_BLUEARMOR 69
|
||
|
#define T_CELL 75
|
||
|
#define T_BLUEKEYCARD 85
|
||
|
#define T_REDKEYCARD 86
|
||
|
#define T_YELLOWKEYCARD 87
|
||
|
#define T_YELLOWSKULLKEY 88
|
||
|
#define T_REDSKULLKEY 89
|
||
|
#define T_BLUESKULLKEY 90
|
||
|
#define T_TEMPLARGEFLAME 98
|
||
|
#define T_STEALTHBARON 100
|
||
|
#define T_STEALTHKNIGHT 101
|
||
|
#define T_STEALTHZOMBIE 102
|
||
|
#define T_STEALTHSHOTGUY 103
|
||
|
|
||
|
#define T_LOSTSOUL 110
|
||
|
#define T_VILE 111
|
||
|
#define T_MANCUBUS 112
|
||
|
#define T_HELLKNIGHT 113
|
||
|
#define T_CYBERDEMON 114
|
||
|
#define T_PAINELEMENTAL 115
|
||
|
#define T_WOLFSS 116
|
||
|
#define T_STEALTHARACHNOTRON 117
|
||
|
#define T_STEALTHVILE 118
|
||
|
#define T_STEALTHCACODEMON 119
|
||
|
#define T_STEALTHCHAINGUY 120
|
||
|
#define T_STEALTHSERGEANT 121
|
||
|
#define T_STEALTHIMP 122
|
||
|
#define T_STEALTHMANCUBUS 123
|
||
|
#define T_STEALTHREVENANT 124
|
||
|
#define T_BARREL 125
|
||
|
#define T_CACODEMONSHOT 126
|
||
|
#define T_ROCKET 127
|
||
|
#define T_BFGSHOT 128
|
||
|
#define T_ARACHNOTRONPLASMA 129
|
||
|
#define T_BLOOD 130
|
||
|
#define T_PUFF 131
|
||
|
#define T_MEGASPHERE 132
|
||
|
#define T_INVULNERABILITY 133
|
||
|
#define T_BERSERK 134
|
||
|
#define T_INVISIBILITY 135
|
||
|
#define T_IRONFEET 136
|
||
|
#define T_COMPUTERMAP 137
|
||
|
#define T_LIGHTAMP 138
|
||
|
#define T_AMMOBOX 139
|
||
|
#define T_ROCKETAMMO 140
|
||
|
#define T_ROCKETBOX 141
|
||
|
#define T_BATTERY 142
|
||
|
#define T_SHELLBOX 143
|
||
|
#define T_BACKPACK 144
|
||
|
#define T_GUTS 145
|
||
|
#define T_BLOODPOOL 146
|
||
|
#define T_BLOODPOOL1 147
|
||
|
#define T_BLOODPOOL2 148
|
||
|
#define T_FLAMINGBARREL 149
|
||
|
#define T_BRAINS 150
|
||
|
#define T_SCRIPTEDMARINE 151
|
||
|
#define T_HEALTHBONUS 152
|
||
|
#define T_MANCUBUSSHOT 153
|
||
|
#define T_BARONBALL 154
|
||
|
|
||
|
// Heretic Spawnable things (used for thingcount() and thing spawners) ------
|
||
|
|
||
|
#define T_CLINK 1
|
||
|
#define T_MUMMYLEADER 2
|
||
|
#define T_BEAST 3
|
||
|
#define T_MUMMY 4
|
||
|
//#define T_IMP 5 // Defined above
|
||
|
#define T_KNIGHT 6
|
||
|
#define T_IMPLEADER 7
|
||
|
#define T_MUMMYGHOST 8
|
||
|
#define T_MUMMYLEADERGHOST 9
|
||
|
//#define T_IMPFIREBALL 10
|
||
|
#define T_WIMPYWANDAMMO 11
|
||
|
#define T_HEFTYWANDAMMO 12
|
||
|
#define T_ITEMEGG 14
|
||
|
#define T_ITEMFLIGHT 15
|
||
|
#define T_ITEMTELEPORT 18
|
||
|
#define T_WIZARD 19
|
||
|
#define T_IRONLICH 20
|
||
|
#define T_ITEMHEALTHPOTION 23
|
||
|
#define T_ITEMHEALTHFLASH 24
|
||
|
#define T_ITEMHEALTHFULL 25
|
||
|
#define T_CROSSBOW 27
|
||
|
#define T_BLASTER 28
|
||
|
#define T_PHOENIXROD 29
|
||
|
#define T_SKULLROD 30
|
||
|
#define T_MACE 31
|
||
|
#define T_GAUNTLETS 32
|
||
|
#define T_WIMPYCROSSBOWAMMO 33
|
||
|
#define T_HEFTYCROSSBOWAMMO 34
|
||
|
#define T_WIMPYMACEAMMO 35
|
||
|
#define T_HEFTYMACEAMMO 36
|
||
|
#define T_WIMPYBLASTERAMMO 37
|
||
|
#define T_HEFTYBLASTERAMMO 38
|
||
|
#define T_MORPHBLAST 40
|
||
|
#define T_SHIELD1 68
|
||
|
#define T_SHIELD2 69
|
||
|
#define T_ITEMTIMEBOMB 72
|
||
|
#define T_ITEMTORCH 73
|
||
|
#define T_BLUEKEY 85
|
||
|
#define T_GREENKEY 86
|
||
|
#define T_YELLOWKEY 87
|
||
|
|
||
|
#define T_SOUND_WIND 110
|
||
|
#define T_SOUND_WATERFALL 111
|
||
|
|
||
|
#define T_BEASTBALL 120
|
||
|
#define T_FEATHER 121
|
||
|
#define T_CHICKEN 122
|
||
|
#define T_VOLCANOBALL 123
|
||
|
#define T_TINYVOLCANOBALL 124
|
||
|
#define T_POD 125
|
||
|
#define T_PODGENERATOR 126
|
||
|
#define T_KNIGHTAXE 127
|
||
|
#define T_KNIGHTBLOODAXE 128
|
||
|
#define T_KNIGHTGHOST 129
|
||
|
#define T_MUMMYHEAD 131
|
||
|
#define T_SNAKE 132
|
||
|
#define T_ITEMINVULNERABILITY 133
|
||
|
#define T_ITEMTOME 134
|
||
|
#define T_ITEMINVISIBILITY 135
|
||
|
#define T_ITEMBAGOFHOLDING 136
|
||
|
#define T_ITEMALLMAP 137
|
||
|
#define T_SNAKEPROJECTILE 138
|
||
|
#define T_SNAKEPROJECTILEBIG 139
|
||
|
#define T_WIZARDSHOT 140
|
||
|
|
||
|
// All D'Sparil teleport destinations must be spawned before D'Sparil alone.
|
||
|
// D'Sparil can be spawned alone manually, and he is also spawned automatically
|
||
|
// when he "dies" on his serpent.
|
||
|
#define T_DSPARILTELEPORTDEST 141
|
||
|
#define T_DSPARILONSERPENT 142
|
||
|
#define T_DSPARILALONE 143
|
||
|
#define T_SERPENTFIREBALL 144
|
||
|
#define T_DSPARILBLUESHOT 145
|
||
|
#define T_DSPARILWIZARDSPAWNER 146
|
||
|
|
||
|
#define T_CROSSBOWMAINBLAST 147
|
||
|
#define T_CROSSBOWMINIBLAST 148
|
||
|
#define T_CROSSBOWPOWERBLAST 149
|
||
|
#define T_VOLCANO 150
|
||
|
#define T_POWERWANDMINIBLAST 151
|
||
|
#define T_POWERWANDBIGGERBLAST 152
|
||
|
#define T_DEATHBALL 153
|
||
|
#define T_NOGRAVITYMACEBALL 154
|
||
|
#define T_BOUNCYMACEBALL 155
|
||
|
#define T_HEAVYMACEBALL 156
|
||
|
#define T_RIPPER 157
|
||
|
#define T_WIMPYSKULLRODAMMO 158
|
||
|
#define T_HEFTYSKULLRODAMMO 159
|
||
|
#define T_SKULLRODBLAST 160
|
||
|
#define T_WIMPYPHOENIXRODAMMO 161
|
||
|
#define T_HEFTYPHOENIXRODAMMO 162
|
||
|
#define T_PHOENIXSHOT 163
|
||
|
#define T_IRONLICHBLUESHOT 164
|
||
|
#define T_WHIRLWIND 165
|
||
|
#define T_REDTELEGLITTER 166
|
||
|
#define T_BLUETELEGLITTER 167
|
||
|
|
||
|
// Events when you have input grabbed
|
||
|
|
||
|
#define EV_KeyDown 1 // data1: unshifted ASCII, data2: shifted ASCII
|
||
|
#define EV_KeyRepeat 2 // data1: unshifted ASCII, data2: shifted ASCII
|
||
|
#define EV_KeyUp 3 // data1: unshifted ASCII, data2: shifted ASCII
|
||
|
#define EV_Char 4 // data1: translated character for text input
|
||
|
#define EV_MouseMove 5 // data1: x, data2: y
|
||
|
#define EV_LButtonDown 6
|
||
|
#define EV_LButtonUp 7
|
||
|
#define EV_LButtonDblClick 8
|
||
|
#define EV_MButtonDown 9
|
||
|
#define EV_MButtonUp 10
|
||
|
#define EV_MButtonDblClick 11
|
||
|
#define EV_RButtonDown 12
|
||
|
#define EV_RButtonUp 13
|
||
|
#define EV_RButtonDblClick 14
|
||
|
#define EV_WheelDown 15
|
||
|
#define EV_WheelUp 16
|
||
|
|
||
|
// Key modifiers (or'd with event type)
|
||
|
|
||
|
#define GKM_SHIFT 256
|
||
|
#define GKM_CTRL 512
|
||
|
#define GKM_ALT 1024
|
||
|
|
||
|
// Button modifiers are only valid for EV_MouseMove events
|
||
|
|
||
|
#define GKM_LBUTTON 2048
|
||
|
#define GKM_MBUTTON 4096
|
||
|
#define GKM_RBUTTON 8192
|
||
|
|
||
|
// Special codes for some GUI keys, including a few real ASCII codes.
|
||
|
|
||
|
#define GK_PGDN 1
|
||
|
#define GK_PGUP 2
|
||
|
#define GK_HOME 3
|
||
|
#define GK_END 4
|
||
|
#define GK_LEFT 5
|
||
|
#define GK_RIGHT 6
|
||
|
#define GK_ALERT 7 // ASCII bell
|
||
|
#define GK_BACKSPACE 8 // ASCII
|
||
|
#define GK_TAB 9 // ASCII
|
||
|
#define GK_LINEFEED 10 // ASCII
|
||
|
#define GK_DOWN 10
|
||
|
#define GK_VTAB 11 // ASCII
|
||
|
#define GK_UP 11
|
||
|
#define GK_FORMFEED 12 // ASCII
|
||
|
#define GK_RETURN 13 // ASCII
|
||
|
#define GK_F1 14
|
||
|
#define GK_F2 15
|
||
|
#define GK_F3 16
|
||
|
#define GK_F4 17
|
||
|
#define GK_F5 18
|
||
|
#define GK_F6 19
|
||
|
#define GK_F7 20
|
||
|
#define GK_F8 21
|
||
|
#define GK_F9 22
|
||
|
#define GK_F10 23
|
||
|
#define GK_F11 24
|
||
|
#define GK_F12 25
|
||
|
#define GK_DEL 26
|
||
|
#define GK_ESCAPE 27 // ASCII
|
||
|
#define GK_FREE1 28
|
||
|
#define GK_FREE2 29
|
||
|
#define GK_FREE3 30
|
||
|
#define GK_CESCAPE 31 // color escape
|