⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 atypes.pas

📁 3D GameStudio 的Delphi开发包
💻 PAS
📖 第 1 页 / 共 2 页
字号:
HBYTE_ENTITY       = 4;
HBYTE_PARTICLE     = 23;
HBYTE_FONT         = 11;
HBYTE_TEXT         = 20;
HBYTE_PANEL        = 21;
HBYTE_VIEW         = 22;


// vector types ////////////////////////////////////////////
Type

PVector = ^TVector;
TVector = Packed Record
            x,y,z : Var_;
          end;

PColor_ = ^TColor_;
TColor_ = Packed Record
            blue,green,red : Var_;
          end;

TColor4 = Packed Record
   	    blue,green,red,alpha : Var_;
          end;

PAngle = ^TAngle;
TAngle = Packed Record
           pan,tilt,roll : Var_;
         end;

///////////////////////////////////////////////////////////////////////
// Acknex object structs
// Note: some struct members are not available in all versions
// (see comments). If you use them, your code should check the
// engine version though the VERSION engine variable.

// use for the C-Script compiler
PC_Link = ^TC_Link;
TC_Link = Packed Record      // C-Script object header
            index : LongInt; // index number of the object (handle)
            next  : PC_Link; // pointer to next object
            name  : PChar;   // pointer to C-Script name of the object (if any)
          end;

PPEvent = ^PEvent;
PEvent = PByte;  // just a pointer to a machine code function

PPString = ^PString;
PString = ^TString;
TString = Packed Record
            C_Link : TC_Link;
            char   : PChar;    // pointer to null terminated string
            length : LongInt;  // allocated length of string
            flags  : LongInt;  // 0 = don't save, 1 = save string at SAVE/LOAD
          end;

PSound = ^TSound;
TSound = Packed Record
           C_Link : TC_Link;
           length : LongInt;
           buffer : PByte;
           Atype  : LongInt;  // 2 = WAV, 5 = OGG
         end;

PBMap = ^TBMap;
TBMap = Packed Record
          C_Link  : TC_Link;
          width,
          height  : LongInt;  // size of the bitmap
          bytespp : LongInt;  // original bytes per pixel (1..4)
          ptr     : Pointer;  // internal use
          pixels  : PByte;    // ptr to palettized, 565, 4444, 888 or 8888 coded original image
          flags   : LongInt;
          d3dtex  : Pointer;  // LPDIRECT3DTEXTURE9
        end;

PMaterial = ^TMaterial;
TMaterial = Packed Record
              C_Link  : TC_Link;
              ambient_blue,
              ambient_green,
              ambient_red,
              diffuse_blue,
              diffuse_green,
              diffuse_red,
	      specular_blue,
              specular_green,
              specular_red,
	      emissive_blue,
              emissive_green,
              emissive_red,
	      map_blue,
              map_green,
              map_red,
	      alpha,
	      power,		// for specular reflection
	      sun_albedo,
	      scale1,scale2,
	      cycle   : Var_;
              skill   : Array[0..19] of Var_;
              matrix  : Array[0..15] of Single;
              flags   : LongInt;
              effect  : PChar;
              unused  : LongInt;
              skin    : Array[0..3] of PBMap;
              event   : PEvent; // event function
            end;

PEntity = ^TEntity;
TEntity = Packed Record
            C_Link  : TC_Link;
            Atype   : PChar;    // entity file name
            x,y,z,		// position of the entity
	    pan,tilt,roll,	// euler angles
	    scale_x,
            scale_y,
            scale_z : Var_;	// scale factors, 0..255
            flags   : LongInt;	// entity flags
            frame,   		// frame number for sprites & models
	    nextframe,	        // interpolation target frame for models
	    skin,    		// skin texture number for models
	    ambient, 	        // -100..+100
	    albedo,		// 0..100, light reflectivity
	    alpha,		// 0..100, transparency, default 50
	    lightrange,	        // dynamic light range in quants
	    blue,
            green,
            red     : Var_;	// dynamic light color, 0..255
            emask,		// event enable flags, EVF...
	    eflags  : LongInt;	// hull and status flags
            bmin,
	    bmax  : TVector;	// bounding box for entity->entity collisions
            trigger_range,
	    push,
	    floor_dist : Var_;                // distance to the floor - A6.23 or above
            smask,		              // nosend_... flags - A6.20 or above
	    client_id  : LongInt;             // client # that has created this entity
	    				      // or view pointer for a layer entity
            skill : Array[0..99] of Var_;     // entity skills (skills > 40 only available for A6.2 or above)
            pose  : Var_; 	              // current bones pose number
            material : PMaterial;	      // entity material
            intern1 : Array [0..2] of LongInt;// internal use
            flags2  : LongInt;		      // sky flags
            attachname : PChar;
            event,		// event function
	    local : PEvent; 	// client side function
            layer : Var_;	// layer for 2D entities and skies
            intern2 : LongInt;
            string1,
            string2 : PChar;    // strings
            intern3 : Array[0..3] of LongInt;
	    parent : PEntity;
          end;

PParticle = ^TParticle;
TParticle = Packed Record
              C_Link  : TC_Link;
              lifespan,	        // time until removal in ticks; set to 0 for removing
	      x,y,z,	        // position
	      vel_x,
              vel_y,
              vel_z,	        // speed or beam vector
	      size : Var_;	// in quants
              bmap : PBMap;	// particle image, or NULL
              event : PEvent;	// particle function, executed every frame
              flags : LongInt;
              skill_x,
              skill_y,
              skill_z,
	      gravity,
	      unused,
	      alpha : Var_; 	// opacity 0..100
              creator : PEntity;// Entity that created the particle effect, or NULL
              blue,
              green,
              red   : Var_;
	      skill : Array[0..3] of Var_;	// more general purpose skills
            end;

PFont_ = ^TFont_;
TFont_ = Packed Record
           C_Link  : TC_Link;
           dx,dy,   		// width/height of single character
           num,		        // number of characters - 11, 128, or 256
     	   cpl     : Integer; 	// characters per bitmap line, or -1 for a TTF font
           Atype   : PChar; 	// image file or truetype font name
           bmap    : TBMap;	// bitmap that holds the characters
         end;

PText = ^TText;
TText = Packed Record
          C_Link  : TC_Link;
          Atype   : LongInt; 	// internal use only
          layer,		// layer number (read only)
	  pos_x,
          pos_y   : Var_;	// screen position in pixels
          flags   : LongInt; 	//
          alpha,		// opacity
	  offset_y,		// vertical offset
	  size_y  : Var_;	// vertical clip size
          font    : PFont_;	// font used for the text
          length  : LongInt;	// internal use only
          Astring : PPString;   // pointer to array of string pointers
          scale_x,
          scale_y,
	  blue,
          green,
          red,     	        // color for Truetype fonts
	  strings : Var_;	// number of strings (read only)
	  target_map : PBMap;
        end;

PPanel = ^TPanel;
TPanel = Packed Record
           C_Link  : TC_Link;
           Atype   : LongInt; 	// internal use only
           layer,		// layer number (read only)
           pos_x,
           pos_y   : Var_;	// screen position in pixels
           flags   : LongInt;	//
           alpha   : Var_;	// transparency factor
           bmap    : PBMap;	// background bitmap
           scale_x,
           scale_y,
	   blue,
           green,
           red,	                // color for background and Truetype fonts
	   size_x,
           size_y,         	// panel dimension
           angle,
           center_x,
           center_y : Var_;     // rotation center
           mouse_map,
           target_map : PBMap;
           event : PEvent;	// panel function, executed on mouse click
         end;

PView = ^TView;
TView = Packed Record
          C_Link  : TC_Link;
          Atype   : LongInt; 	// internal use only
          layer,		// layer number (read only)
          pos_x,
          pos_y   : Var_;	// screen position in pixels
          flags   : LongInt;	//
          size_x,
          size_y,	        // screen size in pixels
	  x,y,z,		// position of the camera
	  pan,
          tilt,
          roll,	                // camera angles
	  offset_x,
          offset_y,	        // eye offsets
	  arc,		        // camera FOV, used for zooming
	  aspect,		// width to height ratio
	  ambient,	        // brightness
	  fog,		        // fog strength (only used when fog_end == 0)
	  alpha,		// transparency
	  portal_x,
          portal_y,
          portal_z,	        // portal plane vertex
	  pnormal_x,
          pnormal_y,
          pnormal_z,            // portal plane normal
	  fog_start,
          fog_end,	        // fog start/end range in D3D mode
	  unused  : Var_;
          genius  : PEntity; 	// calculates valid BSP tree leaf for the view
          portal  : PView;	// portal view
          bmap    : PBMap;	// render target
          clip_near,
          clip_far : Var_;
        end;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -