📄 atypes.pas
字号:
///////////////////////////////////////////////////////////////////////
// Acknex engine constants and structs
// (c) Conitec / JCL 2004
///////////////////////////////////////////////////////////////////////
//
// Delphi Conversion for using the A6_5x Engine done by
// Michal Messerschmidt aka LazyDog of Lazy Dog Software
// (www.LazyDogSoftware.com)
//
// SDK Version 6.50.6
//
// tested on Delphi 5,6,7,2005 & 2006
///////////////////////////////////////////////////////////////////////
// Acknex flag/mask definitions
// note: all other flag bits are used internally and must not be modified!!
///////////////////////////////////////////////////////////////////////
Const
ON = 1;
OFF = 0;
// entity flags
FLAG1 = 1 shl 0; // flag1..flag8 for C-Script use
FLAG2 = 1 shl 1;
FLAG3 = 1 shl 2;
FLAG4 = 1 shl 3;
FLAG5 = 1 shl 4;
FLAG6 = 1 shl 5;
FLAG7 = 1 shl 6;
FLAG8 = 1 shl 7;
INVISIBLE = 1 shl 8;
PASSABLE = 1 shl 9;
TRANSLUCENT = 1 shl 10; // transparent
OVERLAY = 1 shl 12; // for models and panels
FACING = 1 shl 13; // for sprites
ZNEAR = 1 shl 14;
NOFILTER = 1 shl 16; // point filtering
UNLIT = 1 shl 17; // no light from environment
SHADOW = 1 shl 18; // cast dynamic shadows
LIGHT = 1 shl 19; // tinted by own light color
NOFOG = 1 shl 20; // ignores fog
BRIGHT = 1 shl 21; // additive blending
DECAL = 1 shl 22; // sprite without backside
METAL = 1 shl 22; // use metal material
CAST = 1 shl 23; // don't receive shadows
_POLYGON = 1 shl 26; // polygonal collision detection
// entity nosend flags
NOSEND_TYPE = 1 shl 0;
NOSEND_SCALE = 1 shl 1;
NOSEND_ORIGIN = 1 shl 2;
NOSEND_ANGLES = 1 shl 3;
NOSEND_FRAME = 1 shl 4;
NOSEND_SKIN = 1 shl 5;
NOSEND_FLAGS = 1 shl 6;
NOSEND_AMBIENT = 1 shl 7;
NOSEND_ALPHA = 1 shl 8;
NOSEND_LIGHT = 1 shl 9;
NOSEND_COLOR = 1 shl 10;
NOSEND_UV = 1 shl 11;
NOSEND_SOUND = 1 shl 12;
NOSEND_ATTACH = 1 shl 13;
NOSEND = 1 shl 15; // send nothing
SEND_NOW = 1 shl 20; // send entity update immediately
// entity flags2
UNTOUCHABLE = 1 shl 0; // don't react on mouse clicks
SPOTLIGHT = 1 shl 1;
DIRECTIONAL = 1 shl 2;
// entity eflags
FAT = 1 shl 0; // fat hull
NARROW = 1 shl 1; // narrow hull
CLIPPED = 1 shl 21; // entity was clipped away in the last frame
// particle effect flags when different from entity flags
STREAK = 1 shl 8;
BEAM = 1 shl 9;
MOVE = 1 shl 11;
//sky flags for sky->flags2
SKY = 1 shl 17; // sky entity
DOME = 1 shl 18; // half dome
SCENE = 1 shl 19; // don't use the z buffer
CUBE = 1 shl 20; // six sided cube
CYLINDER = 1 shl 21; // 360 degrees cylinder
LOCAL = 1 shl 25; // local entity
//event definitions
EVENT_SURFACE = 1; // collision with level surface
EVENT_ENTITY = 2; // collisions with entity
EVENT_STUCK = 3; // stuck in a corner
EVENT_PUSH = 4;
EVENT_IMPACT = 5; // hit by another entity
EVENT_FRICTION = 6;
EVENT_DETECT = 7;
EVENT_SCAN = 8;
EVENT_SHOOT = 9;
EVENT_TRIGGER = 10;
EVENT_SONAR = 11;
EVENT_FRAME = 12;
EVENT_RECEIVE = 13; // Entity received skills
EVENT_DISCONNECT = 20; // Entity client has disconnected
EVENT_CLICKUP = 14; // left click over down toggle
EVENT_BUTTONUP = 15; // mouse button released over entity
EVENT_TOUCH = 16; // mouse pointer moves over entity
EVENT_RELEASE = 17; // mouse pointer leaves entity
EVENT_CLICK = 18; // left click over entity
EVENT_RIGHTCLICK = 19; // right click over entity
// Entity event flags
DYNAMIC = 1 shl 0;
ENABLE_SURFACE = 1 shl EVENT_SURFACE;
ENABLE_ENTITY = 1 shl EVENT_ENTITY;
ENABLE_STUCK = 1 shl EVENT_STUCK;
ENABLE_PUSH = 1 shl EVENT_PUSH;
ENABLE_IMPACT = 1 shl EVENT_IMPACT;
ENABLE_FRICTION = 1 shl EVENT_FRICTION;
ENABLE_DETECT = 1 shl EVENT_DETECT;
ENABLE_SCAN = 1 shl EVENT_SCAN;
ENABLE_SHOOT = 1 shl EVENT_SHOOT;
ENABLE_TRIGGER = 1 shl EVENT_TRIGGER;
ENABLE_SONAR = 1 shl EVENT_SONAR;
ENABLE_FRAME = 1 shl EVENT_FRAME;
ENABLE_RECEIVE = 1 shl EVENT_RECEIVE;
ENABLE_DISCONNECT = 1 shl EVENT_DISCONNECT;
ENABLE_BUTTONUP = 1 shl EVENT_BUTTONUP;
ENABLE_TOUCH = 1 shl EVENT_TOUCH;
ENABLE_RELEASE = 1 shl EVENT_RELEASE;
ENABLE_CLICK = 1 shl EVENT_CLICK;
ENABLE_RIGHTCLICK = 1 shl EVENT_RIGHTCLICK;
// c_trace / c_move mode flags
IGNORE_ME = 1 shl 0;
IGNORE_YOU = 1 shl 1;
IGNORE_PASSABLE = 1 shl 2;
IGNORE_PASSENTS = 1 shl 3;
IGNORE_MODELS = 1 shl 4;
IGNORE_SPRITES = 1 shl 5;
IGNORE_CONTENT = 1 shl 6;
IGNORE_MAPS = 1 shl 7;
IGNORE_WORLD = 1 shl 8;
IGNORE_PUSH = 1 shl 9;
ACTIVATE_SHOOT = 1 shl 10;
ACTIVATE_SONAR = 1 shl 11;
ACTIVATE_TRIGGER = 1 shl 12;
USE_BOX = 1 shl 13;
GET_HITVERTEX = 1 shl 14;
USE_AXIS = 1 shl 15;
USE_AXISR = 1 shl 16;
SCAN_TEXTURE = 1 shl 16;
USE_AABB = 1 shl 17;
GLIDE = 1 shl 18;
USE_POLYGON = 1 shl 19;
IGNORE_FLAG2 = 1 shl 21;
// scan mode flags
SCAN_ENTS = 0 shl 14;
SCAN_PATHS = 2 shl 14;
SCAN_NODES = 3 shl 14;
SCAN_POS = 4 shl 14;
SCAN_LIGHTS = 5 shl 14;
SCAN_LIMIT = 1 shl 18;
// save mode flags
SV_VARS = 1 shl 0;
SV_INFO = 1 shl 1;
SV_STRINGS = 1 shl 2;
SV_POINTERS = 1 shl 3;
SV_BMAPS = 1 shl 4;
SV_FUNCTIONS = 1 shl 5;
SV_KEYS = 1 shl 6;
SV_LEVEL = 1 shl 7;
SV_SKY = 1 shl 8;
SV_VIEWS = 1 shl 9;
SV_PANELS = 1 shl 10;
SV_SYS = 1 shl 12;
SV_MATERIAL = 1 shl 13;
SV_PATH = 1 shl 14;
SV_STRUCT = 1 shl 15;
SV_PHYSICS = 1 shl 17;
SV_ALL = $000FFFFF;
// material flags
TANGENT = 1 shl 16;
ENABLE_RENDER = 1 shl 17; // call event before object rendering
ENABLE_VIEW = 1 shl 18; // call event before view rendering
ENABLE_TREE = 1 shl 19; // call event before entity sorting
// bitmap flags
BMPF_ARGB = 1 shl 8; // bitmap contains alpha channel
BMPF_SAVE = 1 shl 9; // bitmap was modified
BMPF_MIPMAPS = 1 shl 10; // bmap->pixels contains 3 mipmaps
// text, view & panel flags
PORTALCLIP= 1 shl 8; // use view clipping plane
CENTER_X = 1 shl 8; // center text horizontally
CENTER_Y = 1 shl 9; // center text vertically
NOSHADER = 1 shl 12; // suppress shaders
CONDENSED = 1 shl 13; // draw text condensed
WIREBOX = 1 shl 13; // view bounding boxes
_VISIBLE = 1 shl 14; // panel / view / text visible
AUDIBLE = 1 shl 15; // view has sound focus
OUTLINE = 1 shl 15; // draw text outlined
WIREFRAME = 1 shl 16; // view wireframe
CULL_CW = 1 shl 17; // view with reversed culling
NOCULL = 1 shl 18; // view without BSP culling
FILTER = 1 shl 20; // text / panel linear filtering
NOFLAG1 = 1 shl 21; // text / panel linear filtering
NOSHADOW = 1 shl 22; // suppress shadows
NOPARTICLE= 1 shl 23; // suppress particles
// connection
CONNECT_SERVER = 1;
CONNECT_CLIENT = 2;
// send
SEND_VEC = 1;
SEND_ALL = 2;
SEND_RATE = 4;
SEND_UNRELIABLE = 8;
// animate
ANM_CYCLE = 1 shl 0;
ANM_ADD = 1 shl 1;
ANM_SKIP = 1 shl 2;
// physics
PH_RIGID = 1; // Constant for setting up physics body
PH_WAVE = 2; // Constant for setting up water body
PH_BOX = 0;
PH_SPHERE = 1;
PH_CYLINDER = 2;
PH_POLY = 3;
PH_BALL = 1;
PH_HINGE = 2;
PH_SLIDER = 3;
PH_WHEEL = 4;
// run_mode
RUN_SCRIPT = 1;
RUN_LEVEL = 2;
RUN_ENT = 3;
RUN_SKY = 4;
RUN_MEDIA = 5;
//various
PROC_EARLY = 1 shl 0;
PROC_LATE = 1 shl 1;
// Constants for passing variable type to the engine_getvar function
// type is set to the type of the variable:
VAR_STRUCT = 0;
VAR_CHAR = 1;
VAR_SHORT = 2;
VAR_FIXED = 3;
VAR_LONG = 4;
VAR_FLOAT = 5;
VAR_DOUBLE = 7;
VAR_POINTER = 16; // added if it's a pointer
// Hi bytes of C_LINK index
HBYTE_STRING = 10; // Hi byte of the STRING C_LINK index
HBYTE_SOUND = 14;
HBYTE_BMAP = 12;
HBYTE_MATERIAL = 13;
HBYTE_ENTITY_LOCAL = 5;
HBYTE_ENTITY_LAYER = 8;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -