Jump to content
  • Revista PROGRAMAR: Já está disponível a edição #60 da revista programar. Faz já o download aqui!

Sign in to follow this  
djoker

DXCore3D Motor de jogos

Recommended Posts

djoker

Olá a comunidade :P

este é um dos meus projectos actual.

desculpem na andar muito por aki mas eu devia contribuir + para a comunidade gamedevPT 

este motor tem como base o irrlicht mas totalmente modiicado por mim e so tem directx9 como render

http://www.box.net/shared/zc92042efo

PARTICLES

screenshot_11302034.jpg

screenshot_11338027.jpg

PARTICLES AND LIGHT

screenshot_11378042.jpg

screenshot_11358920.jpg

screenshot_11363659.jpg

screenshot_11372203.jpg

screenshot_11382629.jpg

SIMPLE CAMERA AND MESH

screenshot_16085677.jpg

ANIMATED MESH

screenshot_16210687.jpg

QUAKE BSP WITH SHADERS

screenshot_16267566.jpg

screenshot_16285088.jpg

screenshot_16313134.jpg

PIXEL AND VERTEX SHADERS

screenshot_16353387.jpg

MESHBUILDER(CREATE WORLDS BY CODE)

screenshot_16394643.jpg

screenshot_16404620.jpg

CREATE MESH BY CODE(FULL CONTROL OF VERTEX)

screenshot_16428833.jpg

screenshot_16447744.jpg

SHADER BY FX FILE (TEXTURE MODEL AND BLEND)

screenshot_16485192.jpg

SCREEN SHADER EFECTS

screenshot_16505217.jpg

screenshot_16531710.jpg

screenshot_16551809.jpg

screenshot_16572172.jpg

SHADOWS

screenshot_16594810.jpg

screenshot_16608528.jpg

screenshot_16622362.jpg

WATER SHADER

screenshot_16646957.jpg

screenshot_16670661.jpg

COLIDER

screenshot_21278200.jpg

<a target="_blank" href="http://f.imagehost.org/view/0836/screenshot_21272391"><img src="http://f.imagehost.org/t/0836/screenshot_21272391.jpg" border="0" width="150" height="120" alt="screenshot_21272391.jpg (37 KB)"></a>

TERRAINMESH WITH PRESISION LEVEL AND GEOMIPMAP

screenshot_15130412.jpg

screenshot_15142608.jpg

unit DXCore;

interface
uses windows,DXCoreTypes;

procedure  Engine_Start(const caption:pwidechar;w,h,bits:integer;fullscreen:boolean=false;vsync:boolean=false;stencilbuffer:boolean=false;AntiAlias:boolean=false;HighPrecisionFPU:boolean=false);cdecl ;external DX_DLL;
procedure  Engine_Drop;cdecl ;external DX_DLL;


function  Engine_Run:boolean;cdecl ;external DX_DLL;
procedure Engine_Close;cdecl ;external DX_DLL;

function  Engine_Clear(color:dword; backBuffer:boolean=true;zBuffer:boolean=true):boolean;cdecl ;external DX_DLL;
function  Engine_BeginScene:boolean;cdecl ;external DX_DLL;
function  Engine_EndScene:boolean;cdecl ;external DX_DLL;
function  Engine_Flip(SourceRect:prect):boolean;cdecl ;external DX_DLL;

function  Engine_GetFPS:integer;cdecl ;external DX_DLL;
function  Engine_GetMaterialRender:integer;cdecl ;external DX_DLL;
function  Engine_GetPrimitivesDraw:integer;cdecl ;external DX_DLL;
function  Engine_GetVBODraw:integer;cdecl ;external DX_DLL;
function  Engine_GetSOFDraw:integer;cdecl ;external DX_DLL;

procedure Engine_SetTextureCreationFlag(flag:TEXTURE_CREATION_FLAG; enabled:boolean);cdecl ;external DX_DLL;


//******************************************************
//*
//******************************************************
function LoadZipFile(const filename:pchar;ignoreCase:boolean=true;ignorePaths:boolean=true ):boolean;cdecl ;external DX_DLL;
function LoadPackFile(const filename:pchar;ignoreCase:boolean=true;ignorePaths:boolean=true ):boolean;cdecl ;external DX_DLL;
function GetWorkingDirectory:pchar;cdecl ;external DX_DLL;
function  SetWorkingDirectory(const newDirectory:pchar):boolean;cdecl ;external DX_DLL;
procedure SetCursorVisible(value:boolean);cdecl ;external DX_DLL;
procedure  LogWrite(const text:pchar;LEVEL:LOGLEVEL);cdecl ;external DX_DLL;
//******************************************************
//*
//******************************************************


//******************************************************
//*
//******************************************************
procedure  RenderWorld;cdecl ;external DX_DLL;

procedure SetActiveCamera(ID:Void);cdecl ;external DX_DLL;
procedure SetView(Position,LookAt:vector3);cdecl ;external DX_DLL;
procedure SetCamera(Position,LookAt,UpVector:vector3);cdecl ;external DX_DLL;

procedure SetCullMeshBuffer(value:boolean);cdecl ;external DX_DLL;

function GetVideoModeCount:integer;cdecl ;external DX_DLL;
procedure GetVideeoModeResolution  (index:integer;var x:integer;var y:integer);cdecl ;external DX_DLL;
procedure GetVideoModeDepth (index:integer;var d:integer);cdecl ;external DX_DLL;

procedure TakeScreenShot( dir:pchar);cdecl ;external DX_DLL;
procedure TakeScreenShotEx( filename:pchar);cdecl ;external DX_DLL;

function LockFrameRate(fps:integer):boolean;cdecl ;external DX_DLL;
function GetFrameTime:single;cdecl ;external DX_DLL;
function GetTime:integer;cdecl ;external DX_DLL;

function GetTicks:integer;cdecl ;external DX_DLL;

procedure SetTransform(state:TRANSFORMATION_STATE;const Matrix:PCMatrix4);cdecl ;external DX_DLL;
procedure GetTransform(state:TRANSFORMATION_STATE; Matrix:PCMatrix4);cdecl ;external DX_DLL;
//******************************************************
//*       CREATE ENTITYS
//******************************************************
function  CreateAndStripMesh(const filename:pchar;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateCamera(id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateCameraEx(Position,LookAt:vector3;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateFpsCamera(rotateSpeed:single=100.0;moveSpeed:single=0.1;jumpSpeed:single=1.0;noVerticalMovement:boolean=false;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateMaysCamera(rotateSpeed:single= -1500.0;zoomSpeed:single=200.0;translationSpeed:single=1500.0;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreatePivot(id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateParticleSystem(withDefaultEmitter:boolean;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateEntity(AnimatedMesh:Void;VBO:boolean=false;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateEntityEx(const filename:pchar;VBO:boolean=false;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateStaticEntity(StaticMesh:Void;VBO:boolean=false;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateOctree(AnimatedMesh:Void;minimalPolysPerNode:integer=512;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateStaticOctree(StaticMesh:Void;minimalPolysPerNode:integer=512;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateQaudTree(AnimatedMesh:Void;minimalPolysPerNode:integer=512;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateStaticQaudTree(StaticMesh:Void;minimalPolysPerNode:integer=512;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateBspTree(AnimatedMesh:Void;MaxVertex:integer;CullFrustum:boolean;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateStaticBspTree(Mesh:Void;MaxVertex:integer;CullFrustum:boolean;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateCube(size:single=1.0;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateSphere(radius:single=1;segments:integer=16;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateCone (radius,length:single;colorTop,colorBottom:DWord;tesselation:integer=16;oblique:single=0.0;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateCylinder  (radius,length:single;color:DWord;CloseTop:boolean=true;tesselation:integer=8;oblique:single=0.0;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreatePlane ( Width, Height:single;tilesx,tilesy:integer;tu,tv:single;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateHills (hillHeight:integer;countHillsX,countHillsY:single;Width, Height:single;tilesx,tilesy:integer;tu,tv:single;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateArrow (vtxColor0,vtxColor1:DWord;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateSkyBox(top,bottom,left,right,front,back:pchar;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateSkyDome(const texture:pchar;horiRes:integer=16;vertRes:integer=8;texturePercentage:double=0.9;spherePercentage:double=2.0;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateSkyCurve(const texture:pchar;divisions:integer=15;PlanetRadius:single=500.0;AtmosphereRadius:single=900.0;hTile:single=1.0; vTile:single=1.0):Void;cdecl ;external DX_DLL;
function  CreateWaterSurface(mesh:Void;waveHeight:single=2.0;waveSpeed:single=300.0;waveLength:single=10.0;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateBillboard(w,h:single;pos:vector3;color:dword;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  Create3DText(font:Void;const text:pwidechar;w,h:single;pos:vector3;color:dword;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateBoidFromCamera(Texture:Void;w,h:single):Void;cdecl ;external DX_DLL;
function  CreateBoid(Vbegin,VEnd:vector3;Texture:Void;w,h:single):Void;cdecl ;external DX_DLL;
function  CreateVolumeLight  (FootColor,TailColor:DWORD;subdivU:integer=32;subdivV:integer=32;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function  CreateScreenQuad(id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;

//******************************************************
//*      WATER PLANE MATRIX
//******************************************************

//*** bugs
function CreateWaterPlane(numx,numy:integer;h:single;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
procedure AddForce(id:Void;numx,numy:integer;force:single)cdecl ;external DX_DLL;
procedure RemoveForce(id:Void;numx,numy:integer)cdecl ;external DX_DLL;
procedure AddForceCube(id:Void;beginx,beginy,endx,endy:integer;force:single)cdecl ;external DX_DLL;
procedure RemoveForceCube(id:Void;beginx,beginy,endx,endy:integer)cdecl ;external DX_DLL;

//******************************************************
//*      QUAKE BSP SHADERS
//******************************************************
function LoadBspMesh(const  filename:pchar):Void;cdecl ;external DX_DLL;
function CreateBspEntity(Mesh:Void;minimalPolysPerNode:integer=512 ):Void;cdecl ;external DX_DLL;

//******************************************************
//*      LENSFLARE
//******************************************************

function CreateLensFlare(
  const BaseTexture:pchar;
  Position:vector3;
  size:single;
    isStatic:boolean=true;
    selector:Void=nil;
	  id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
procedure AddRing(ID:Void;const texture:pchar;index:integer; size:single;color:dword=$FFFFFFFF);cdecl ;external DX_DLL;

//******************************************************
//*      SAHDER WATER
//******************************************************

function CreateShaderWater(
 const Texture:Pchar;
 pos:vector3;
   color:Dword;
 width,
 height,
 renderTargetSizeWidth,
 renderTargetSizeHeight:single;
 id:integer=-1):Void;cdecl ;external DX_DLL;
procedure SetBlendFactor(water:Void;value:single=0.2);cdecl ;external DX_DLL;
procedure SetWaterColor(water:Void;color:dword);cdecl ;external DX_DLL;
procedure SetWindForce(water:Void;value:single=10.0);cdecl ;external DX_DLL;
procedure SetWindDirection(water:Void;x:single=0.0;y:single=1.0);cdecl ;external DX_DLL;
procedure SetWaveHeight(water:Void;value:single=0.3);cdecl ;external DX_DLL;

//******************************************************
//*      CREATE AND LOADMESHS
//******************************************************
function   LoadMesh(const filename:pchar):Void;cdecl ;external DX_DLL;

function   CreateTerrainMesh(MeshName:pchar;texture:pchar;heightMapFileName:pchar;stretchSizex:single=10;stretchSizey:single=10;maxHeight:single=20.0;defaultVertexBlockSizex:integer=64;defaultVertexBlockSizey:integer=64):Void;cdecl ;external DX_DLL;
function   CreateLandscapeMesh(MeshName:pchar;heightMapFileName:pchar;Precision:single=16;YFactor:single=0.1):Void;cdecl ;external DX_DLL;
function   CreateHillsMesh(const name:pchar;
hillHeight:integer;
countHillsX,countHillsY:single;
Width, Height:single;
tilesx,tilesy:integer;
tu,tv:single):Void;cdecl ;external DX_DLL;
//******************************************************
//*
//******************************************************
procedure  ShadowColor (SColor:dword);cdecl ;external DX_DLL;
procedure  AmbientColor (SColor:dword);cdecl ;external DX_DLL;


function    CreateLight  (LIGHT_TYPE:LIGHT_TYPE;id:integer=-1;Parent:Void=nil):Void;cdecl ;external DX_DLL;
procedure   LightRange  (LID:Void;range:single);cdecl ;external DX_DLL;
procedure   LightColorf  (LID:Void;r,g,b:single);cdecl ;external DX_DLL;
procedure   LightColor  (LID:Void;r,g,b:integer);cdecl ;external DX_DLL;
procedure   LightConeAngles  (LID:Void;inner_angle,outer_angle:single);cdecl ;external DX_DLL;
procedure   LightFallof  (LID:Void;Falloff:single);cdecl ;external DX_DLL;
//******************************************************
//*
//******************************************************
procedure PlanarTextureMapping(mesh:Void;resolution:single);cdecl ;external DX_DLL;
procedure FlipMeshSurfaces(mesh:Void);cdecl ;external DX_DLL;
procedure SetMeshVertexColors(mesh:Void;color:Dword);cdecl ;external DX_DLL;
procedure SetMeshVertexColorAlpha(mesh:Void;alpha:single);cdecl ;external DX_DLL;

procedure ScaleMeshTCoords(mesh:Void;factorx,factory:single;layer:integer=1);cdecl ;external DX_DLL;
procedure ScaleBufferTCoords(mesh:Void;factorx,factory:single;layer:integer=1);cdecl ;external DX_DLL;

procedure ScaleBuffer(Buffer:Void;factor:vector3);cdecl ;external DX_DLL;
procedure ScaleMesh(mesh:Void;factor:vector3);cdecl ;external DX_DLL;

procedure RecalculateBufferNormals(mesh:Void);cdecl ;external DX_DLL;
procedure RecalculateMeshNormals(mesh:Void);cdecl ;external DX_DLL;


procedure TransformMesh(mesh:Void;matrix:PCMatrix4);cdecl ;external DX_DLL;
procedure TransformBuffer(buffer:Void;matrix:PCMatrix4);cdecl ;external DX_DLL;

procedure RotateMesh(mesh:Void;factor:vector3);cdecl ;external DX_DLL;
procedure RotateBuffer(mesh:Void;factor:vector3);cdecl ;external DX_DLL;


procedure TranslateMesh(mesh:Void;factor:vector3);cdecl ;external DX_DLL;
procedure TranslateBuffer(mesh:Void;factor:vector3);cdecl ;external DX_DLL;

//******************************************************
//*
//******************************************************
function  FontCreate(const filename:pchar):Void;cdecl ;external DX_DLL;
procedure PrintText(FontID:Void;const text:pchar;x, y:integer;color:integer);cdecl ;external DX_DLL;
//******************************************************
//*
//******************************************************
//Scene Entity
function  EntityRoot:Void;cdecl ;external DX_DLL;

procedure EntityDrop(ID:Void);cdecl ;external DX_DLL;

//if not on scene
procedure EntityDraw(ID:Void);cdecl ;external DX_DLL;
procedure EntityAnimate(ID:Void;time:integer);cdecl ;external DX_DLL;

procedure NameEntity(ID:Void;const name:pchar);cdecl ;external DX_DLL;
function  EntityName(ID:Void):pchar;cdecl ;external DX_DLL;

procedure AddEntityToDeletionQueue(ID:Void);cdecl ;external DX_DLL;

procedure AddEntityToScene(child:Void);cdecl ;external DX_DLL;

procedure PositionEntity (ID:Void;x,y,z:single);cdecl ;external DX_DLL;
procedure PositionEntityEx (ID:Void;vector:vector3);cdecl ;external DX_DLL;
procedure EntityMove (ID:Void;x,y,z:single);cdecl ;external DX_DLL;
procedure EntityMoveRelative(ID:Void;Front,Up,Strafe:single);cdecl ;external DX_DLL;
procedure EntityMoveAddSpeed(ID:Void;Trasvector:vector3;speed:single);cdecl ;external DX_DLL;
procedure ScaleEntity  (ID:Void;x,y,z:single);cdecl ;external DX_DLL;
procedure ScaleEntityEx  (ID:Void;vector:vector3);cdecl ;external DX_DLL;
procedure RotateEntity (ID:Void;x,y,z:single);cdecl ;external DX_DLL;
procedure RotateEntityEx  (ID:Void;vector:vector3);cdecl ;external DX_DLL;
procedure TurnEntity (ID:Void;x,y,z:single);cdecl ;external DX_DLL;
procedure TurnEntityEx  (ID:Void;vector:vector3);cdecl ;external DX_DLL;
procedure EntityYawPitchRoll(ID:Void;yaw,pitch,roll:single);cdecl ;external DX_DLL;
procedure EntityYaw(ID:Void;value:single);cdecl ;external DX_DLL;
procedure EntityAddYaw(ID:Void;value:single);cdecl ;external DX_DLL;
procedure EntityPitch(ID:Void;value:single);cdecl ;external DX_DLL;
procedure EntityAddPitch(ID:Void;value:single);cdecl ;external DX_DLL;
procedure EntityRoll(ID:Void;value:single);cdecl ;external DX_DLL;
procedure EntityAddRoll(ID:Void;value:single);cdecl ;external DX_DLL;
procedure EntityGetRotateEx(ID:Void;var x,y,z:single);cdecl ;external DX_DLL;
function  EntityGetRotate(ID:Void):vector3;cdecl ;external DX_DLL;
function  EntityGetScale(ID:Void):vector3;cdecl ;external DX_DLL;
function  EntityGetPosition(ID:Void):vector3;cdecl ;external DX_DLL;
procedure PointEntity(A,B:Void);cdecl ;external DX_DLL;
procedure EntityPoint(A:Void;target:vector3);cdecl ;external DX_DLL;
procedure EntityMoveToNode(A,B:Void;speed:single);cdecl ;external DX_DLL;
function EntityDistance(A,B:Void):single;cdecl ;external DX_DLL;
function EntityBoxHit(A,B:Void):boolean;cdecl ;external DX_DLL;
function EntityRadius(A:Void):vector3;cdecl ;external DX_DLL;

function  MeshEntity(A:Void):Void;cdecl ;external DX_DLL;
procedure EntityMesh(ID:Void;mesh:Void);cdecl ;external DX_DLL;

procedure EntitySetShadow(ID:Void;zfailmethod:boolean=true;infinity:single=10000.0);cdecl ;external DX_DLL;

procedure EntityDebug(ID:Void;visible:DEBUG_SCENE_TYPE);cdecl ;external DX_DLL;

procedure VisibleEntity(id:void;value:boolean);cdecl ;external DX_DLL;
function EntityVisible(id:void):boolean;cdecl ;external DX_DLL;

function EntityTransformPoint(ID:Void;point:vector3):vector3;cdecl ;external DX_DLL;
function EntityTransformPointEx(ID:Void;point:vector3):vector3;cdecl ;external DX_DLL;

function EntityGetVertexPosition(ID:void;NumVertex,nMeshBuffer:integer):vector3;cdecl ;external DX_DLL;

procedure  EntityMaterialFlag(ID:Void; flag:MATERIAL_FLAG;value:boolean);cdecl ;external DX_DLL;
procedure  EntityMaterialType(ID:Void;newType:MATERIAL_TYPE;numMat:integer=0);cdecl ;external DX_DLL;
procedure  EntityAllMaterialType(ID:Void; newType:MATERIAL_TYPE);cdecl ;external DX_DLL;

procedure  EntityWireFrame(ID:Void;value:boolean);cdecl ;external DX_DLL;
procedure  EntityLighting (ID:Void;value:boolean);cdecl ;external DX_DLL;
procedure  EntityMaterialTypeParam(ID:Void;value:single);cdecl ;external DX_DLL;

procedure EntityAddString(ID:Void;Font:Void;text:pchar;color:dword);cdecl ;external DX_DLL;

procedure EntityRotateTexture(ID:Void;angle:single;index:integer=0);cdecl ;external DX_DLL;
procedure EntityMoveTexture(ID:Void;x,y:single;index:integer=0);cdecl ;external DX_DLL;
procedure EntityScaleTexture(ID:Void;x,y:single;index:integer=0);cdecl ;external DX_DLL;


procedure EntitySetTexture(ID:Void;layer:integer; const filename:pchar);cdecl ;external DX_DLL;
procedure EntitySetTextureEx(ID:Void;layer:integer;texture:Void);cdecl ;external DX_DLL;

procedure EntitySetMaterialTexture(ID:Void;const filename:pchar;layer:integer=0;Material:integer=0);cdecl ;external DX_DLL;
procedure EntitySetMaterialTextureEx(ID:Void;texture:Void;layer:integer=0;Material:integer=0);cdecl ;external DX_DLL;

procedure EntityAddAnimator(ID,Ani:Void);cdecl ;external DX_DLL;
procedure EntityRemoveAnimator(ID,Ani:Void);cdecl ;external DX_DLL;

procedure EntityAddChilld(ID,Child:Void);cdecl ;external DX_DLL;
function  EntityRemoveChilld(ID,Child:Void):boolean;cdecl ;external DX_DLL;
function  EntityGetChilld(ID:Void;Num:integer):Void;cdecl ;external DX_DLL;

procedure EntitySetEffect(ID:Void;FX:Void);cdecl ;external DX_DLL;
procedure EntitySetShader(node:Void;shader:integer);cdecl ;external dx_DLL;
procedure EntitySetShaderLayer(node:Void;layer:integer;shader:integer);cdecl ;external dx_DLL;


//******************************************************
//*             3D ENTITY BEAVERS ANIMATORS
//******************************************************
function CreateRotationAnimator(rotationPerSecond:vector3):Void;cdecl ;external DX_DLL;
function CreateFlyCircleAnimator(center, direction:vector3;radius,speed:single):Void;cdecl ;external DX_DLL;
function CreateFlyStraightAnimator( startPoint, endPoint:vector3;timeForWay:single; loop:boolean):Void;cdecl ;external DX_DLL;
function CreateDeleteAnimator(time:integer):Void;cdecl ;external DX_DLL;
function CreateFollowSplineAnimator(NPoints:integer;Vectors:pointer;time:integer;speed,tightness:single ):Void;cdecl ;external DX_DLL;
function CreateTextureAnimator(NumTextures:integer;Textures:pointer;timePerFrame:integer;loop:boolean):Void;cdecl ;external DX_DLL;
procedure DropAnimator(anim:Void)cdecl ;external DX_DLL;
//******************************************************
//*             MODEL ANIMATIONS
//******************************************************
procedure  SetMD2Animation(AID:Void;anim:MD2_ANIMATION_TYPE);cdecl ;external dx_DLL;
procedure  SetMD2AnimationEx(AID:Void;const animationName:pchar);cdecl ;external dx_DLL;
procedure  SetAnimationSpeed(AID:Void;framesPerSecond:single);cdecl ;external dx_DLL;
procedure  SetCurrentFrame (AID:Void;frame:single);cdecl ;external dx_DLL;
procedure  SetFrameLoop (AID:Void;FBegin,FEnd:integer);cdecl ;external dx_DLL;
procedure  SetLoopMode (AID:Void;playAnimationLooped:boolean);cdecl ;external dx_DLL;
procedure  SetTransitionTime  (AID:Void;time:single);cdecl ;external dx_DLL;
function   GetFrameNr (AID:Void):integer;cdecl ;external dx_DLL;
function   GetStartFrame (AID:Void):integer;cdecl ;external dx_DLL;
function   GetEndFrame (AID:Void):integer;cdecl ;external dx_DLL;
//******************************************************
//*
//******************************************************
function CreateCollisionResponse(TrianglesSelector:Void;Entity:Void;ellipsoidRadius,gravityPerSecond,ellipsoidTranslation:vector3;slidingValue:single):Void;cdecl ;external DX_DLL;
function CreateCollisionResponseEx(TrianglesSelector:Void;Entity:Void;gravityPerSecond,ellipsoidTranslation:vector3;slidingValue:single):Void;cdecl ;external DX_DLL;
procedure DropColider(ID:Void);cdecl ;external DX_DLL;
procedure SetGravity(ID:Void;v:vector3);cdecl ;external DX_DLL;
procedure EllipsoidRadius (ID:Void;v:vector3);cdecl ;external DX_DLL;
procedure EllipsoidTranslation (ID:Void;V:vector3);cdecl ;external DX_DLL;
function  IsFalling (ID:Void):boolean;cdecl ;external DX_DLL;
procedure SetJump(ID:Void;speed:single);cdecl ;external DX_DLL;
function GetCollisionResponse(ITriangleSelector:Void;
   slidingSpeed:single;
   outFalling:boolean;
 ellipsoidPosition,
 ellipsoidRadius,
 ellipsoidDirectionAndSpeed,
   gravityDirectionAndSpeed:vector3;
 var triout:XTriangle):vector3;cdecl ;external DX_DLL;

//******************************************************
//*
//******************************************************
function CreateOctTreeTriangleSelector(mesh:Void;Entity:Void;minimalPolysPerNode:integer=32):Void;cdecl ;external DX_DLL;
function CreateTerrainTriangleSelector(TerrainEntity:Void;LOD:integer=0):Void;cdecl ;external DX_DLL;
function CreateBoxTriangleSelector(Entity:Void):Void;cdecl ;external DX_DLL;
procedure DropSelector(Selector:Void);cdecl ;external DX_DLL;
//******************************************************
//*
//******************************************************
function  CreateSelectorList():Void;cdecl ;external DX_DLL;
procedure DropSelectorList(SelectorList:Void);cdecl ;external DX_DLL;
procedure AddSelector(SelectorList,Selector:Void );cdecl ;external DX_DLL;
//******************************************************
//*
//******************************************************
function ScreenRay(x,y:integer):XRAY;cdecl ;external dx_DLL;
function CameraRay(dist:integer):XRAY;cdecl ;external dx_DLL;
function VectorRay(Position, Target:vector3;dist:integer):XRay;cdecl ;external dx_DLL;
function Pick(line:XRAY;idBitMask:integer=0):Void;cdecl ;external DX_DLL;
function CameraPick(idBitMask:integer=0):Void;cdecl ;external DX_DLL;
function ScreenPick(x,y:integer;idBitMask:integer=0):Void;cdecl ;external DX_DLL;
function RayPickTriangles(ray:XRay;Selector:Void;var outCollisionPoint:vector3;var outTriangle:XTriangle):boolean;cdecl ;external DX_DLL;
function CameraPickTriangles(Selector,Camera:Void;var outCollisionPoint:vector3;var outNormal:vector3;var outTriangle:XTriangle;dist:single=1000.0):boolean;cdecl ;external DX_DLL;
//******************************************************
//*
//******************************************************
function LoadEffect(SrcFile:pchar):Void;cdecl ;external DX_DLL;
function SetEffectTexture(FXID:Void;SrcFile:pchar;texture:Void):boolean;cdecl ;external DX_DLL;
function SetEffectTechnique(FXID:Void;name:pchar):boolean;cdecl ;external DX_DLL;

//******************************************************
//*
//******************************************************
function   CreateMeshBuilder:Void;cdecl ;external DX_DLL;
procedure  FreeMeshBuilder(MeshBuilder:Void);cdecl ;external DX_DLL;
function  AddFloor(MeshBuilder:Void;VBotomLeft,VTopRight:vector3; texture:Void;tu:single=1;tv:single=1):integer;cdecl ;external DX_DLL;
function  AddRoof(MeshBuilder:Void;VBotomLeft,VTopRight:vector3; texture:Void;tu:single=1;tv:single=1):integer;cdecl ;external DX_DLL;
function  AddLeftWall(MeshBuilder:Void;VBotomLeft,VTopRight:vector3; texture:Void;tu:single=1;tv:single=1):integer;cdecl ;external DX_DLL;
function  AddRightWall(MeshBuilder:Void;VBotomLeft,VTopRight:vector3; texture:Void;tu:single=1;tv:single=1):integer;cdecl ;external DX_DLL;
function  AddWallFront(MeshBuilder:Void;VBotomLeft,VTopRight:vector3; texture:Void;tu:single=1;tv:single=1):integer;cdecl ;external DX_DLL;
function  AddWallBack(MeshBuilder:Void;VBotomLeft,VTopRight:vector3; texture:Void;tu:single=1;tv:single=1):integer;cdecl ;external DX_DLL;
function  AddWall(MeshBuilder:Void;position,rotation,scale:vector3;texture:Void;tu:single=1;tv:single=1):integer;cdecl ;external DX_DLL;

procedure   SetBufferType(Mesh:Void;index:integer;mtype:MATERIAL_TYPE)cdecl ;external DX_DLL;
procedure   SetBufferTexture(Mesh:Void;index:integer;texture:Void)cdecl ;external DX_DLL;

function  AddRoom(MeshBuilder:Void;VBotomLeft,VTopRight:vector3;
										  TextureIDLeft:Void;
										  TextureIDRight:Void;
										  TextureIDTop:Void;
										  TextureIDBottom:Void;
										  TextureIDFront:Void;
										  TextureIDBack:Void;
                        tu:single=1;tv:single=1):integer;cdecl ;external DX_DLL;
function  AddPilar(MeshBuilder:Void;pos:vector3;radius,length:single;texture:Void;tu:single=1;tv:single=1;quality:integer=8;curve:single=0):integer;cdecl ;external DX_DLL;
function  AddSurface(MeshBuilder:Void;Surface:Void;dropsurface:boolean=true):integer;cdecl ;external DX_DLL;
function   CreateMeshFromBuilder(MeshName:pchar;MeshBuilder:Void;DropMesh:boolean=true):Void;cdecl ;external DX_DLL;
//******************************************************
//*
//******************************************************
function   CreateSurface():Void;cdecl ;external DX_DLL;
procedure  SurfaceDrop (surface:Void);cdecl ;external DX_DLL;
procedure  PaintSurface(surface,Brush:Void;dropBrush:boolean=true);cdecl ;external DX_DLL;
function   AddVertex (surface:Void;x,y,z,u,v:single):integer;cdecl ;external DX_DLL;
function   AddTriangle  (surface:Void;v1,v2,v3:integer):integer;cdecl ;external DX_DLL;
procedure  VertexCoords(surface:Void;index:integer;x,y,z:single);cdecl ;external DX_DLL;
procedure  VertexNormal(surface:Void;index:integer;nx,ny,nz:single);cdecl ;external DX_DLL;
procedure  VertexColor (surface:Void;index:integer;r,g,b,a:integer);cdecl ;external DX_DLL;
procedure  VertexTexCoords (surface:Void;index:integer;u,v:single;coord_set:integer=0);cdecl ;external DX_DLL;
//******************************************************
//*
//******************************************************
function  CreateBrush  (r:integer=255;g:integer=255;b:integer=255;a:integer=255):Void;cdecl ;external DX_DLL;
function  LoadBrush  (layer:integer;const texture:pchar):Void;cdecl ;external DX_DLL;
procedure BrushType (brush:Void;newType:MATERIAL_TYPE );cdecl ;external DX_DLL;
procedure BrushFlag (brush:Void;flag:MATERIAL_FLAG ;value:boolean)cdecl ;external DX_DLL;
procedure BrushDrop  (brush:Void);cdecl ;external DX_DLL;
procedure BrushTexture (brush:Void;layer:integer;Textue:Void);cdecl ;external DX_DLL;
procedure BrushAlphaRef(brush:Void;value:single)cdecl ;external DX_DLL;
//******************************************************
//*
//******************************************************
function  CreatMeshBuffer:Void;cdecl ;external DX_DLL;
procedure DropBuffer(buffer:Void);cdecl ;external DX_DLL;
procedure RebuildBufferBBox (buffer:Void);cdecl ;external DX_DLL;
procedure DrawBuffer (buffer:Void);cdecl ;external DX_DLL;
function  VertexPushBack (buffer:Void;v:S3DVertex):integer;cdecl ;external DX_DLL;
function  IndicesPushBack (buffer:Void;indice:smallint):integer;cdecl ;external DX_DLL;
procedure AddBrush (buffer:Void;Brush:Void;dropbrush:boolean=true);cdecl ;external DX_DLL;
function  NumVertex(buffer:Void):integer;cdecl ;external DX_DLL;
function  NumIndices(buffer:Void):integer;cdecl ;external DX_DLL;
procedure GetBufferIndices(buffer:Void;indices:pointer)cdecl ;external DX_DLL;
procedure GetBufferVertices(buffer:Void;vertices:pointer);cdecl ;external DX_DLL;
function  GetBufferBBox(buffer:Void):XBOX;cdecl ;external DX_DLL;
procedure SetBufferBBox(buffer:Void;bbox:XBOX);cdecl ;external DX_DLL;
procedure AppendVertices(Mesh:Void;vetices:pointer;numvertices:integer;indices:p16;numindices:integer)cdecl ;external DX_DLL;
//******************************************************
//*
//******************************************************
function  CreatMesh ():Void;cdecl ;external DX_DLL;
procedure AddMeshBuffer (Mesh,MeshBuffer:Void;dropbuffer:boolean=true);cdecl ;external DX_DLL;
function  GetBuffer (SMesh:Void;num:integer):Void;cdecl ;external DX_DLL;
function  GetBBox(Mesh:Void):XBOX;cdecl ;external DX_DLL;
procedure SetBBox(Mesh:Void;bbox:XBOX);cdecl ;external DX_DLL;
function  NumBuffers(Mesh:Void):integer;cdecl ;external DX_DLL;
procedure MeshUpdateBBox(Mesh:Void);cdecl ;external DX_DLL;
procedure MeshUpdateBuffers(Mesh:Void);cdecl ;external DX_DLL;
procedure MeshDrop (Mesh:Void);cdecl ;external DX_DLL;
//******************************************************
//*            NEXT RENDER MATERIAL
//******************************************************
procedure NextRenderDefaults(
							   Wireframe:boolean=false;
							   PointCloud:boolean=false;
							   GouraudShading:boolean=false;
							   Lighting:boolean=false;
	               ZBuffer:boolean=true;
	               ZWriteEnable:boolean=true;
	               BackfaceCulling:boolean=true;
              	 FogEnable:boolean=false;
                   NormalizeNormals:boolean=false);cdecl ;external DX_DLL;


procedure SetRenderTexture(tex:Void;layer:integer);cdecl ;external DX_DLL;
procedure SetRenderLighting(Lighting:boolean);cdecl ;external DX_DLL;
procedure SetRenderBackfaceCulling( BackfaceCulling:boolean);cdecl ;external DX_DLL;
procedure SetRenderType(newType:MATERIAL_TYPE);cdecl ;external DX_DLL;
procedure SetRenderFlag(flag:MATERIAL_FLAG;value:boolean);cdecl ;external DX_DLL;
procedure SetRenderTypeParam(value:single);cdecl ;external DX_DLL;
procedure ApplyNextRender();cdecl ;external DX_DLL

//******************************************************
//*
//******************************************************
procedure Draw2DLine(x,y,x2,y2:integer;color:dword);cdecl ;external DX_DLL;
procedure DrawImage(texture:Void;x,y:integer;Color:dword;UseAlpha:boolean=true)cdecl ;external DX_DLL;
procedure DrawImagePart(texture:Void;x,y:integer;SourceRect:Trect;Color:dword;UseAlpha:boolean=true)cdecl ;external DX_DLL;
procedure DrawImageRotate(texture:Void;x,y:integer; w, h:single;rot:single;color:dword;UseAlpha:boolean=true)cdecl ;external DX_DLL;
procedure Draw3DGrid( countx,county,Size:integer);cdecl ;external DX_DLL;
procedure Draw3DRect(Position:vector3;Width,Deph:single);cdecl ;external DX_DLL;
procedure DrawTriangle(triangle:XTriangle;Color:dword);cdecl ;external DX_DLL;
procedure DrawCube(x,y,z,w,h,d:single;Color:DWord=$FFFFFFFF);cdecl ;external DX_DLL;
procedure DrawSphere(x,y,z,r:single;Color:DWord=$FFFFFFFF);cdecl ;external DX_DLL;

procedure DrawVertexIndexList(vertices:pointer;vertexcount:integer;indices:pointer;primCount:integer;vType:VERTEX_TYPE;pType:PRIMITIVE_TYPE;iType:INDEX_TYPE);cdecl ;external DX_DLL;
procedure DrawVertexList(vertices:pointer;vertexcount:integer;primCount:integer;vType:VERTEX_TYPE;pType:PRIMITIVE_TYPE);cdecl ;external DX_DLL;

//******************************************************
//*
//******************************************************
procedure TextureFree(id:Void);cdecl ;external DX_DLL;
procedure MakeTextureColorKey(id:Void;Color:dword);cdecl ;external DX_DLL;
function   CreateRenderTargetTexture(w,h:integer):Void;cdecl ;external DX_DLL;
function  RenderTarget(texture:Void;color:DWord=0;clearBackBuffer:boolean=true;clearZBuffer:boolean=true):boolean;cdecl ;external DX_DLL;
procedure ResetRenderTarget;cdecl ;external DX_DLL;
procedure  RenderQuad(id:Void);cdecl ;external DX_DLL;
function   LoadTexture(const filetoload:pchar):Void;cdecl ;external DX_DLL;
function   GetTexture(index:integer):Void;cdecl ;external DX_DLL;


//******************************************************
//*               GEOMIPMAP TERRAIN
//******************************************************
function  CreateTerrain(const heightMapFileName:pchar;maxLOD:integer=5;smoothFactor:integer=0;patchSize:TERRAIN_PATCH_SIZE=ETPS_17;VBO:boolean=true;id:integer=-1;Parent:Void=nil):Void;cdecl ;external DX_DLL;
function  GetHeight(Terrain:Void;x,y:integer):single;cdecl ;external DX_DLL;
procedure ScaleTexture(Terrain:Void;x,y:single);cdecl ;external DX_DLL;
//******************************************************
//*
//******************************************************
function  XBegin(primitiveType:PRIMITIVE_TYPE ):boolean;cdecl ;external DX_DLL;
procedure XVertex3f(x,y,z:single);cdecl ;external DX_DLL;
procedure XNormal3f(x,y,z:single);cdecl ;external DX_DLL;
procedure XTexCoord2f(tu,tv:single);cdecl ;external DX_DLL;
procedure XColor3f(r,g,b:single);cdecl ;external DX_DLL;
procedure XColor4f(a,r,g,b:single);cdecl ;external DX_DLL;
procedure XColor4i(a,r,g,b:integer);cdecl ;external DX_DLL;
procedure XColor3i(r,g,b:integer);cdecl ;external DX_DLL;
function  XEnd():boolean;cdecl ;external DX_DLL;
//******************************************************
//*
//******************************************************
procedure  XApplyMatrix;cdecl ;external DX_DLL;
procedure  XLoadIdentity;cdecl ;external DX_DLL;
procedure  XTranslatef(x,y,z:single);cdecl ;external DX_DLL;
procedure  XRotatef(a,x,y,z:single);cdecl ;external DX_DLL;
procedure  XScalef(x,y,z:single);cdecl ;external DX_DLL;
function   XPushMatrix:boolean;cdecl ;external DX_DLL;
function   XPopMatrix:boolean;cdecl ;external DX_DLL;
//******************************************************
//*
//******************************************************
procedure SetFarValue   (CameraNode:Void;fFar:single);cdecl ;external DX_DLL;
procedure SetNearValue  (CameraNode:Void;fNear:single);cdecl ;external DX_DLL;
procedure SetAspectRatio(CameraNode:Void;faspect:single);cdecl ;external DX_DLL;
procedure SetFOV        (CameraNode:Void;fFovy:single);cdecl ;external DX_DLL;

procedure  TurnRight(camera:Void;acc:single);cdecl ;external DX_DLL;
procedure  TurnLeft(camera:Void;acc:single);cdecl ;external DX_DLL;
procedure  TurnUp(camera:Void;acc:single);cdecl ;external DX_DLL;
procedure  TurnDown(camera:Void;acc:single);cdecl ;external DX_DLL;
procedure  MoveForward(camera:Void;acc:single);cdecl ;external DX_DLL;
procedure  MoveBack(camera:Void;acc:single);cdecl ;external DX_DLL;
procedure  MoveRight(camera:Void;acc:single);cdecl ;external DX_DLL;
procedure  MoveLeft(camera:Void;acc:single);cdecl ;external DX_DLL;

function  GetViewBox(camera:Void):XBOX;cdecl ;external DX_DLL;

procedure  SetTarget(CameraNode:Void;x,y,z:single);cdecl ;external DX_DLL;
procedure  SetTargetEx(CameraNode:Void;vec:vector3);cdecl ;external DX_DLL;


function GetActiveCamera():Void;cdecl ;external DX_DLL;
function GetTarget(Camera:Void):vector3;cdecl ;external DX_DLL;
function GetUpVector(Camera:Void):vector3;cdecl ;external DX_DLL;
function GetRotation(Camera:Void):vector3;cdecl ;external DX_DLL;

procedure  FollowingNode(IDCamera,IDTargetNod:Void;Distance,AltitudeCamera,DeltaCible:single);cdecl ;external DX_DLL;
procedure  CockpitFollowing(IDCamera,IDTargetNod:Void;offset:vector3);cdecl ;external DX_DLL;
procedure  FollowingNodeWithSpring(IDCamera,IDTargetNod:Void;
offset:vector3;
offsetDistance,dampingConstant,springConstant,elapsedTimeSec:single);cdecl ;external DX_DLL;

//******************************************************
//*
//******************************************************

function   CreateFadeOutAffector(Par:Void;TargetColor:dword;timeNeededToFadeOut:integer=1000):Void;cdecl ;external dx_DLL;
function   CreateAttractionAffector(Par:Void;point:VECTOR3;
speed:single=1.0;
attract:boolean=true;
affectX:boolean=true;
affectY:boolean=true;
affectZ:boolean=true):Void;cdecl ;external dx_DLL;
function  CreateGravityAffector( Par:Void;gravity:VECTOR3;timeForceLost:integer=1000):Void;cdecl ;external dx_DLL;
function  CreateRotationAffector(Par:Void; speed,pivotPoint:VECTOR3):Void;cdecl ;external dx_DLL;
function  CreateScaleAffector(Par:Void;scaletoX,scaleToY:single):Void;cdecl ;external dx_DLL;
function  CreateUserAffector(Par:Void;Userdata:TParticleCallBak):Void;cdecl ;external dx_DLL;
function  CreateDroperAffector(Par:Void;when:integer):Void;cdecl ;external dx_DLL;

procedure SetMinParticlesPerSecond(EM:Void;minPPS:integer);cdecl ;external dx_DLL;
procedure SetMaxParticlesPerSecond(EM:Void;maxPPS:integer);cdecl ;external dx_DLL;
procedure SetMinStartColor(EM:Void;Color:dword);cdecl ;external dx_DLL;
procedure SetMaxStartColor(EM:Void;Color:dword);cdecl ;external dx_DLL;
procedure SetMaxStartSize(EM:Void;mw,mh:single);cdecl ;external dx_DLL;
procedure SetMinStartSize(EM:Void;mw,mh:single);cdecl ;external dx_DLL;

procedure ParticlesSize(ParticlID:void;w,h:single);cdecl ;external dx_DLL;

procedure DropEmitter(Emitter:Void);cdecl ;external dx_DLL;
procedure DropAffector(Affector:Void);cdecl ;external dx_DLL;

procedure SetEmitter(System,Emitter:void);cdecl ;external dx_DLL;
procedure AddAffector(System,Affector:void);cdecl ;external dx_DLL;

function  CreateBoxEmitter(Par:Void;
									   BoxXMin,
									   BoxYMin,
									   BoxZMin,
									   BoxXMax,
									   BoxYMax,
									   BoxZMax:single;
									   direction:VECTOR3;
									   minStartColor:dword=$FF;
									   maxStartColor:dword=$FFFFFFFF;
									   minParticlesPerSecond:integer=5;
									   maxParticlesPerSecond:integer=10;
									   lifeTimeMin:integer=2000;
									   lifeTimeMax:integer=4000;
									   maxAngleDegrees:double=0;
                       minStartSizeX:Single=5.0;minStartSizeY:single=5.0;
									   maxStartSizeX:single=5.0;maxStartSizeY:single=5.0):Void;cdecl ;external dx_DLL;





function  CreateMeshEmitter(Par:Void;
                                    Node:Void;
								                  direction:VECTOR3;
									   minStartColor:dword=$FF;
									   maxStartColor:dword=$FFFFFFFF;
									   normalDirectionModifier:single=100.0;
									   mbNumber:integer=-1;
									   everyMeshVertex:boolean=false;
									   useNormalDirection:boolean=true;
									    minParticlesPerSecond:integer=100;
									   maxParticlesPerSecond:integer=200;
									   lifeTimeMin:integer=800;
									   lifeTimeMax:integer=2000;
									   maxAngleDegrees:double=0;
                       minStartSizeX:Single=5.0;minStartSizeY:single=5.0;
									   maxStartSizeX:single=5.0;maxStartSizeY:single=5.0):Void;cdecl ;external dx_DLL;



function   CreateCylinderEmitter(
                         Par:Void;
                         Center:VECTOR3;
									     radius:single;
									     Normal:VECTOR3;
									    length:single;
									    Direction:VECTOR3;
									   minStartColor:dword=$FF;
									   maxStartColor:dword=$FFFFFFFF;
                       outlineOnly:boolean=false;
									   minParticlesPerSecond:integer=15;
									   maxParticlesPerSecond:integer=20;
									   lifeTimeMin:integer=2000;
									   lifeTimeMax:integer=4000;
									   maxAngleDegrees:double=0;
                       minStartSizeX:Single=5.0;minStartSizeY:single=5.0;
									   maxStartSizeX:single=5.0;maxStartSizeY:single=5.0):Void;cdecl ;external dx_DLL;





function  CreatePointEmitter(
                          Par:Void;
								        Direction:VECTOR3;
									   minStartColor:dword=$FF;
									   maxStartColor:dword=$FFFFFFFF;
									   minParticlesPerSecond:integer=25;
									   maxParticlesPerSecond:integer=30;
									   lifeTimeMin:integer=2000;
									   lifeTimeMax:integer=4000;
									   maxAngleDegrees:double=0;
                       minStartSizeX:Single=5.0;minStartSizeY:single=5.0;
									   maxStartSizeX:single=5.0;maxStartSizeY:single=5.0):Void;cdecl ;external dx_DLL;




function  CreateRingEmitter(
                           Par:Void;
								         center:VECTOR3;
									       radius:single;
									       ringThickness:single;
                           Direction:VECTOR3;
									   minStartColor:dword=$FF;
									   maxStartColor:dword=$FFFFFFFF;

									   minParticlesPerSecond:integer=25;
									   maxParticlesPerSecond:integer=30;
									   lifeTimeMin:integer=2000;
									   lifeTimeMax:integer=4000;
									   maxAngleDegrees:double=0;
                       minStartSizeX:Single=5.0;minStartSizeY:single=5.0;
									   maxStartSizeX:single=5.0;maxStartSizeY:single=5.0):Void;cdecl ;external dx_DLL;



function  CreateSphereEmitter( Par:Void;
								         center:VECTOR3;
									       radius:single;
		                     Direction:VECTOR3;
									   minStartColor:dword=$FF;
									   maxStartColor:dword=$FFFFFFFF;
									   minParticlesPerSecond:integer=5;
									   maxParticlesPerSecond:integer=10;
									   lifeTimeMin:integer=2000;
									   lifeTimeMax:integer=4000;
									   maxAngleDegrees:double=0;
                       minStartSizeX:Single=5.0;minStartSizeY:single=5.0;
									   maxStartSizeX:single=5.0;maxStartSizeY:single=5.0):Void;cdecl ;external dx_DLL;


//******************************************************
//*
//******************************************************

function Matrix_GetScale(const Matrix:PCMatrix4):vector3;cdecl ;external dx_DLL;
function Matrix_GetTranslation(const Matrix:PCMatrix4):vector3;cdecl ;external dx_DLL;
function Matrix_GetRotationDegrees(const Matrix:PCMatrix4):vector3;cdecl ;external dx_DLL;
procedure Matrix_GetTranformations(const Matrix:PCMatrix4;var Pos,Rot,Scale:vector3);cdecl ;external dx_DLL;
function Matrix_TransformVect(const Matrix:PCMatrix4;const vect:vector3):vector3;cdecl ;external dx_DLL;
procedure Matrix_SetTrasform(Matrix:PCMatrix4;Traslate:vector3 ;Rotation:vector3 ;Scale:vector3 );cdecl ;external dx_DLL;
procedure  Matrix_SetTrasformXMat(Matrix:PCMatrix4;const newMatrix:PCMatrix4 ;Traslate:vector3 ;Rotation:vector3 ;Scale:vector3 );cdecl ;external dx_DLL;
procedure Matrix_GetAbsTransformNode(node:Void; Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_GetTransformNode(node:Void; Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_SeByNode(node:Void);cdecl ;external dx_DLL;
procedure Matrix_GetAbsTransformCamera(node:Void; Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_GetTransformCamera(node:Void; Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_MultWithCamera(Matrix:PCMatrix4;node:Void;const OutMatrix:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_SetTransformNode(node:Void;const Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_Traslate( Matrix:PCMatrix4;  x , y,z:single);cdecl ;external dx_DLL;
procedure Matrix_RotateInDegrees( Matrix:PCMatrix4;  x , y,z:single);cdecl ;external dx_DLL;
procedure Matrix_RotateInRadians( Matrix:PCMatrix4;  x , y,z:single);cdecl ;external dx_DLL;
procedure Matrix_Scale( Matrix:PCMatrix4;  x , y,z:single);cdecl ;external dx_DLL;
procedure Matrix_Mult(Matrix:PCMatrix4;const AMat:PCMatrix4;const BMat:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_Add(Matrix, AMat ,BMat:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_Sub(Matrix, AMat ,BMat:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_MakeIdentity(Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_BuildShadowMatrix(Matrix:PCmatrix4;light:vector3;plane:XPlane;point:single=1.0000);cdecl ;external dx_DLL;
procedure Matrix_TextureScale(Matrix:PCMatrix4;sx,sy:single);cdecl ;external dx_DLL;
procedure Matrix_TextureRotationCenter(Matrix:PCMatrix4;radAngle:single);cdecl ;external dx_DLL;
procedure Matrix_TextureScaleCenter(Matrix:PCMatrix4;sx,sy:single);cdecl ;external dx_DLL;
procedure Matrix_TextureTranslate(Matrix:PCMatrix4;x,y:single);cdecl ;external dx_DLL;
procedure Matrix_Inverse(OutMatrix:PCMatrix4;matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_Transposed(OutMatrix:PCMatrix4;matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_LookAtLH(Matrix:PCMatrix4;position,target,upVector:vector3);cdecl ;external dx_DLL;
//******************************************************
//*
//******************************************************
function Input_Init(mouseExclusive:boolean ):boolean;cdecl ;external DX_DLL;
function Input_Update():boolean;cdecl ;external DX_DLL;
function Input_KeyPressed(Key:integer):boolean;cdecl ;external DX_DLL;
function Input_KeyReleased(Key:integer):boolean;cdecl ;external DX_DLL;
function Input_MousePressed(But:integer):boolean;cdecl ;external DX_DLL;
function Input_MouseReleased(But:integer):boolean;cdecl ;external DX_DLL;
function Input_MouseX:integer;cdecl ;external DX_DLL;
function Input_MouseY:integer;cdecl ;external DX_DLL;
function Input_MouseAbsX:integer;cdecl ;external DX_DLL;
function Input_MouseAbsY:integer;cdecl ;external DX_DLL;
function Input_MouseAbsWheel:integer;cdecl ;external DX_DLL;
procedure Input_Free;cdecl ;external DX_DLL;
//******************************************************
//*
//******************************************************
function Sound_Init(scale:single):boolean;cdecl ;external DX_DLL;
function Sound_SetVolume(volume:integer):boolean;cdecl ;external DX_DLL;
function Sound_UpdateListener( VLook,Vposition, Vvelocity,VUp:Vector3 ):boolean;cdecl ;external DX_DLL;
procedure  Sound_Close();cdecl ;external DX_DLL;
function Sound_Load(filename:pchar;is3d:boolean):Void;cdecl ;external DX_DLL;
procedure Sound_Free(sound:Void);cdecl ;external DX_DLL;
procedure Sound_Play(sound:Void;Loop:boolean);cdecl ;external DX_DLL;
procedure Sound_Stop(sound:Void);cdecl ;external DX_DLL;
function Sound_IsPlaying(sound:Void):boolean;cdecl ;external DX_DLL;
procedure Sound_Set3DPosition(sound:Void;position:vector3);cdecl ;external DX_DLL;
procedure Sound_Set3DVelocity( sound:Void;velocity:Vector3 );cdecl ;external DX_DLL;
procedure Sound_Set3DMaxDistance( sound:Void;dist:single );cdecl ;external DX_DLL;
procedure Sound_Set3DMinDistance( sound:Void;dist:single );cdecl ;external DX_DLL;
//******************************************************
//*
//******************************************************
function Music_Load(filename:pchar):Void;cdecl ;external DX_DLL;
procedure Music_Free(music:Void);cdecl ;external DX_DLL;
function Music_Play(music:Void):boolean;cdecl ;external DX_DLL;
function Music_Stop(music:Void):boolean;cdecl ;external DX_DLL;
function Music_Pause(music:Void):boolean;cdecl ;external DX_DLL;
function Music_SetVolume(music:Void;value:integer):boolean;cdecl ;external DX_DLL;
function Music_SetBalance(music:Void;value:integer):boolean;cdecl ;external DX_DLL;
function Music_SetPlayRate(music:Void;value:single):boolean;cdecl ;external DX_DLL;
function Music_SetPosition(music:Void;pstar,send:integer):boolean;cdecl ;external DX_DLL;
//******************************************************
//*
//******************************************************
procedure Net_End;cdecl ;external DX_DLL;
function  Net_Start(DPLAYAPP:TGUID;msg:PTMESSAGEHANDLER):integer;cdecl ;external DX_DLL;
function NET_HostGame(PlayerName,SessionName:pchar;Port,MaxPlayers:dword):integer;cdecl ;external DX_DLL;
function Net_FindSessions(playername:pchar;Port:dword;Hostddr:pchar):integer;cdecl ;external DX_DLL;
function Net_ConectToHost(Playername:pchar;Port:dword;HostAddr:pchar):integer;cdecl ;external DX_DLL;
function Net_JoinSession(Session:integer;PlayerName:pchar):integer;cdecl ;external DX_DLL;
procedure Net_CloseConection;cdecl ;external DX_DLL;
function Net_SendData(Const Players:dword;data:pointer;size:integer):integer;cdecl ;external DX_DLL;
function Net_GetNumPlayers:integer;cdecl ;external DX_DLL;
function Net_GetPlayer( DPNID :dword ):TPlayerInfo;cdecl ;external DX_DLL;
function Net_GetPlayerByID( index:integer ):TPlayerInfo;cdecl ;external DX_DLL;
function Net_GetNumSessions:integer;cdecl ;external DX_DLL;
function Net_GetSession(index:integer;var SessionInfo :TSessionInfo ):boolean;cdecl ;external DX_DLL;
function Net_KickPlayer( dpnid:dword ):integer;cdecl ;external DX_DLL;
//******************************************************
//*
//******************************************************
procedure Shader_InitGPU;cdecl ;external dx_DLL;

function  Shader_AddHighLevelShaderMaterialFromFiles(
	  vertexShaderProgram:pchar;  vertexShaderEntryPointName:pchar;vsCompileTarget:	E_VERTEX_SHADER_TYPE;
	  pixelShaderProgram:pchar;  pixelShaderEntryPointName:pchar;	 psCompileTarget:E_PIXEL_SHADER_TYPE;
	baseMaterial:MATERIAL_TYPE;CallBack:TShaderCallBack;userData:integer=0):integer;cdecl ;external dx_DLL;



function  Shader_AddHighLevelShaderMaterial(
	  vertexShaderProgram:pchar;  vertexShaderEntryPointName:pchar;vsCompileTarget:	E_VERTEX_SHADER_TYPE;
	  pixelShaderProgram:pchar;  pixelShaderEntryPointName:pchar;	 psCompileTarget:E_PIXEL_SHADER_TYPE;
   		baseMaterial:MATERIAL_TYPE;CallBack:TShaderCallBack;userData:integer=0):integer;cdecl ;external dx_DLL;


function  Shader_AddShaderMaterialFromFiles(
	  vertexShaderProgramFileName:pchar;  pixelShaderProgramFileName:pchar;
   		baseMaterial:MATERIAL_TYPE;CallBack:TShaderCallBack;userData:integer=0):integer;cdecl ;external dx_DLL;
function  Shader_AddShaderMaterial(
	  vertexShaderProgramFileName:pchar;  pixelShaderProgramFileName:pchar;
   		baseMaterial:MATERIAL_TYPE;CallBack:TShaderCallBack;userData:integer=0):integer;cdecl ;external dx_DLL;









//high level vertex shader
procedure VShader_SetHLSMatrixView(Service:Void;name:pchar);cdecl ;external dx_DLL;
procedure VShader_SetHLSMatrixWorldInversse(Service:Void;name:pchar);cdecl ;external dx_DLL;
procedure VShader_SetHLSMatrixWorldViewProj(Service:Void;name:pchar);cdecl ;external dx_DLL;
procedure VShader_SetHLSMatrixTransposed(Service:Void;name:pchar);cdecl ;external dx_DLL;
procedure VShader_SetHLSMatrixWorldReflectionViewProj(Service:Void;const name:pchar);cdecl ;external dx_DLL;
procedure VShader_SetHLSVector(Service:Void;name:pchar;vect:vector3);cdecl ;external dx_DLL;
procedure VShader_SetHLSColor(Service:Void;name:pchar;r,g,b,a:single);cdecl ;external dx_DLL;
procedure VShader_SetHLSMatrix(Service:Void;name:pchar;const Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure VShader_SetHLSTexture(Service:Void;const name:pchar;tex:Void);cdecl ;external dx_DLL;
//high level pixel shader
procedure PShader_SetHLSMatrixView(Service:Void;name:pchar);cdecl ;external dx_DLL;
procedure PShader_SetHLSMatrixWorldInversse(Service:Void;name:pchar);cdecl ;external dx_DLL;
procedure PShader_SetHLSMatrixWorldViewProj(name:pchar);cdecl ;external dx_DLL;
procedure PShader_SetHLSMatrixTransposed(Service:Void;name:pchar);cdecl ;external dx_DLL;
procedure PShader_SetHLSMatrixWorldReflectionViewProj(Service:Void;const name:pchar);cdecl ;external dx_DLL;
procedure PShader_SetHLSVector(Service:Void;name:pchar;vect:vector3);cdecl ;external dx_DLL;
procedure PShader_SetHLSColor(Service:Void;name:pchar;r,g,b,a:single);cdecl ;external dx_DLL;
procedure PShader_SetHLSMatrix(Service:Void;name:pchar;const Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure PShader_SetHLSTexture(Service:Void;const name:pchar;tex:Void);cdecl ;external dx_DLL;



// vertex shader
procedure VShader_SetMatrixView(Service:Void);cdecl ;external dx_DLL;
procedure VShader_SetMatrixWorldInversse(Service:Void);cdecl ;external dx_DLL;
procedure VShader_SetMatrixWorldViewProj(Service:Void);cdecl ;external dx_DLL;
procedure VShader_SetMatrixTransposed(Service:Void);cdecl ;external dx_DLL;
procedure VShader_SetMatrixWorldReflectionViewProj(Service:Void);cdecl ;external dx_DLL;
procedure VShader_SetVector(Service:Void;vect:vector3);cdecl ;external dx_DLL;
procedure VShader_SetColor(Service:Void;r,g,b,a:single);cdecl ;external dx_DLL;
procedure VShader_SetMatrix(Service:Void;const Matrix:PCMatrix4);cdecl ;external dx_DLL;
//pixel shader
procedure PShader_SetMatrixView(Service:Void);cdecl ;external dx_DLL;
procedure PShader_SetMatrixWorldInversse(Service:Void);cdecl ;external dx_DLL;
procedure PShader_SetMatrixWorldViewProj(Service:Void);cdecl ;external dx_DLL;
procedure PShader_SetMatrixTransposed(Service:Void);cdecl ;external dx_DLL;
procedure PShader_SetMatrixWorldReflectionViewProj(Service:Void);cdecl ;external dx_DLL;
procedure PShader_SetVector(Service:Void;vect:vector3);cdecl ;external dx_DLL;
procedure PShader_SetColor(Service:Void;r,g,b,a:single);cdecl ;external dx_DLL;
procedure PShader_SetMatrix(Service:Void;const Matrix:PCMatrix4);cdecl ;external dx_DLL;


function  Shader_SetHLSVertexShaderConstant(Service:Void;const name:pchar;const floats:PSingle;count:integer):boolean;cdecl ;external dx_DLL;
procedure Shader_SetVertexShaderConstant(Service:Void;const data:psingle;startRegister:integer;constantAmount:integer=1);cdecl ;external dx_DLL;

function  Shader_SetHLSPixelShaderConstant(Service:Void;const name:pchar;const floats:PSingle;count:integer):boolean;cdecl ;external dx_DLL;
procedure Shader_SetPixelShaderConstant(Service:Void;const data:psingle;startRegister:integer;constantAmount:integer=1);cdecl ;external dx_DLL;

//******************************************************
//*                     MATRIX UTIL
//******************************************************
procedure  GetMatrixWorld(Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure  GetMatrixView(Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure  GetMatrixProjection(Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure  GetMatrixWorldInversse(Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure  GetMatrixWorldViewProj(Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure  GetMatrixWorldTransposed(Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure  GetMatrixWorldInverseTranspose(Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure  GetMatrixViewInversse(Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure  GetMatrixViewTranspose(Matrix:PCMatrix4);cdecl ;external dx_DLL;[/pascal]

Share this post


Link to post
Share on other sites
djoker

Gostei, muito porreiro! :P

Já agora, não sei se conheces: LEAF2

Outro motor feito por um português.

sim claro tenho trocado algumas ideias com o relfos

Share this post


Link to post
Share on other sites
TheDark

É suficientemente parecido para poder causar problemas. Não quer dizer que vão acontecer, mas é só uma chamada de atenção.

Já agora, parece porreiro :P


Desaparecido.

Share this post


Link to post
Share on other sites
dicas3d

Parabéns, do que vi gostei.

Porem tenho uma questão:

Esse código é para usar em que programa.

É que no freepascal não dá.

E os executáveis também não.


Abraços

dicas3d

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.