;; ----------------------------------------------------------------------------
;; Blitz \ Irrlicht 1.8.3 Interface by Ed Musolino Jr (2015) {AquaLung}
;; Based off of Frank Dodd's Irrlicht 1.7.1 Freebasic Wrapper (2006-2010)
;; ----------------------------------------------------------------------------

;;  This software is provided 'as-is', without any express Or implied
;;  warranty.  In no event will the authors be held liable For any damages
;;  arising from the use of this software.

;;  Permission is granted To anyone To use this software For any purpose,
;;  including commercial applications, And To redistribute it
;;  freely, subject To the following restrictions:

;;  1. The Origin of this software must Not be misrepresented; you must not
;;     claim that you wrote the original software. If you use this software
;;     in a product, an acknowledgement in the product documentation would be
;;     appreciated but is Not required.
;;  2. This notice may Not be removed Or altered from any source distribution.
;;
;; /////////////////////////////////////////////////////////////////////////////

.lib "bIrrlicht.dll"

;;	GLOBAL

iIrr3D%(width%,height%,bpp%,fullscreen%):"iIrr3D"
iIrr3DAdvanced%(drivertype%,scrWidth%,scrHeight%,bits%,fullscreen%,shadows%,dontignoreinput%,vsyncenabled%,devicetype%,doublebufferenabled%,antialiasenabled%,highprecisionfpu%):"iIrr3DAdvanced"
iUseDirect3D9():"iUseDirect3D9"
iVSync(apply%):"iVSync"
iUseOpenGL():"iUseOpenGL"
iUseSoftware():"iUseSoftware"
iEndIrr3D():"iEndIrr3D"
iRun%():"iRun"
iBeginScene():"iBeginScene"
iBeginSceneAdvanced(sceneBackgroundColor%,clearBackBuffer%,clearZBuffer%):"iBeginSceneAdvanced"
iCameraCLSColor(r%,g%,b%):"iCameraCLSColor"
iDrawScene():"iDrawScene"
iEndScene():"iEndScene"
iTrisDrawn%():"iTrisDrawn"
iQueryFeature%(feature%):"iQueryFeature"
iDisableFeature(feature%,state%):"iDisableFeature"
iGetFPS%():"iGetFPS"
iAppTitle(title$):"iAppTitle"
iDrawGUI():"iDrawGUI"
iTime%():"iTime"
iGraphicsWidth%():"iGraphicsWidth"
iGraphicsHeight%():"iGraphicsHeight"
iViewPort(x%,y%,width%,height%):"iViewPort"
iClearScene():"iClearScene"
iAmbientLight(r#,g#,b#):"iAmbientLight"
iMakeARGB%(alpha%,red%,green%,blue%)
iShadowColor(alpha%,r%,g%,b%):"iShadowColor"
iCameraFog(r%,g%,b%,fogtype%,near#,far#,density#):"iCameraFog"
iDraw3DLine(xStart#,yStart#,zStart#,xEnd#,yEnd#,zEnd#,R%,G%,B%):"iDraw3DLine"
iWritePixelFast(x%,y%,image%):"iWritePixelFast"
iReadPixelFast%(x%,y%,image%):"iReadPixelFast"
iLoadScene(filename$):"iLoadScene"
iSaveScene(filename$):"iSaveScene"
iTransparentZWrite(on%):"iTransparentZWrite"


;;  FONT AND TEXT

iLoadFont%(path$):"iLoadFont"
iText(font%,text$,top_x%,top_y%,bottom_x%,bottom_y%):"iText"
iColor(alpha%,red%,green%,blue%):"iColor"


;;  EVENTS KEYBOARD \ MOUSE \ GUI

iKeyHit%(key%):"iKeyHit"
iKeyDown%(key%):"iKeyDown"
iFlushKeys():"iFlushKeys"
iMouseDown%(button%):"iMouseDown"
iMouseWheel#():"iMouseWheel"
iFlushMouse():"iFlushMouse"
iGUIEventAvailable%():"iGUIEventAvailable"
iReadGUIEvent():"iReadGUIEvent"
iGUIEventID%():"iGUIEventID"
iGUIEvent%():"iGUIEvent"
iGUIEventData%():"iGUIEventData"
iShowMouse():"iShowMouse"
iHideMouse():"iHideMouse"
iMoveMouse(x#,y#):"iMoveMouse"
iMouseX%():"iMouseX"
iMouseY%():"iMouseY"
iGetKey%():"iGetKey"
iWaitKey():"iWaitKey"
iGetLastSelectedFile$():"iGetLastSelectedFile"


;;  NODE MOVEMENT

iScaleNode(node%,x#,y#,z#):"iScaleNode"
iPositionNode(node%,X#,Y#,Z#):"iPositionNode"
iRotateNode(node%,x#,y#,z#):"iRotateNode"
iTurnNode(node%,pitch#,yaw#,roll#):"iTurnNode"
iMoveNode(node%,x#,y#,z#):"iMoveNode"


;;  NODE SPECIAL

iCreateWater%(mesh%,waveHeight#,waveSpeed#,waveLength#,parent%,id%,positionX#,positionY#,positionZ#,rotationX#,rotationY#,rotationZ#,scaleX#,scaleY#,scaleZ#):"iCreateWater"
iCreateClouds%(texture%,lod%,depth%,density%):"iCreateClouds"
iCreateFlare%(texture%):"iCreateFlare"
iFlareScale(flare%,source#,optics#):"iFlareScale"
iCreateGrass%(terrain%,x%,y%,patchSize%,fadeDistance#,crossed%,grassScale#,maxDensity%,dataPositionX%,dataPositionY%,heightMap%,textureMap%,grassMap%,grassTexture%):"iCreateGrass"
iGrassDensity(grass%,density%,distance#):"iGrassDensity"
iGrassWind(grass%,strength#,resolution#):"iGrassWind"
iGrassDrawCount%(grass%):"iGrassDrawCount"
iCreateBolt%():"iCreateBolt"
iBoltProperties(bolt%,sx#,sy#,sz#,ex#,ey#,ez#,updateTime%,height%,thickness#,parts%,bolts%,steadyend%,r%,g%,b%,alpha%):"iBoltProperties"
iCreateBeam%():"iCreateBeam"
iBeamSize(beam%,size#):"iBeamSize"
iPositionBeam(beam%,sx#,sy#,sz#,ex#,ey#,ez#):"iPositionBeam"
iCreatePivot%():"iCreatePivot"
iCreateSkybox%(up_texture%,down_texture%,left_texture%,right_texture%,front_texture%,back_texture%):"iCreateSkybox" 


;;  NODE STATE

iNodeX#(node%,global%):"iNodeX"
iNodeY#(node%,global%):"iNodeY"
iNodeZ#(node%,global%):"iNodeZ"
iNodeRoll#(node%,global%):"iNodeRoll"
iNodeYaw#(node%,global%):"iNodeYaw"
iNodePitch#(node%,global%):"iNodePitch"
iLinePick%(x#,y#,z#,dx#,dy#,dz#):"iLinePick"
iCameraPick%(camera%,x%,y%):"iCameraPick"
iPickedX#():"iPickedX"
iPickedY#():"iPickedY"
iPickedZ#():"iPickedZ"
iPickedNX#():"iPickedNX"
iPickedNY#():"iPickedNY"
iPickedNZ#():"iPickedNZ"
iNodeClass%(node%):"iNodeClass"
iNodeName$(node%):"iNodeName"
iNodeID%(node%):"iNodeID"
iCountChildren%(node%):"iCountChildren"
iGetChild%(node%,index%):"iGetChild"
iNodeShadow%(node%):"iNodeShadow"
iRemoveNodeShadow%(node%,shadow%):"iRemoveNodeShadow"
iNodeDistance#(src_node%,dest_node%):"iNodeDistance"
iDebugNode(node%,state%):"iDebugNode"
iNodeMaterialFlag(node%,flag%,value%):"iNodeMaterialFlag"
iNodeMaterialType(node%,mat_type%):"iNodeMaterialType"
iGetNodeByID%(id%):"iGetNodeByID"
iGetNodeByName%(name$):"iGetNodeByName"


;;  NODE CONTROL

iFreeNode%(node%):"iFreeNode"
iCopyNode%(node%,parent%):"iCopyNode"
iNodeTexture(node%,texture%,index%):"iNodeTexture"
iNodeColor(node%,r%,g%,b%,alpha%):"iNodeColor"
iNodeAlpha(node%,alpha%):"iNodeAlpha"
iNameNode(node%,name$):"iNameNode"
iIDNode(node%,id%):"iIDNode"
iNodeParent(node%,parent%):"iNodeParent"
iGetParent%(node%):"iGetParent"
iShowNode(node%):"iShowNode"
iHideNode(node%):"iHideNode"
iNodeXScale#(node%):"iNodeXScale"
iNodeYScale#(node%):"iNodeYScale"
iNodeZScale#(node%):"iNodeZScale"
iGetNodeJoint%(node%,joint_name$):"iGetNodeJoint"


;;  NODE COLLISION  --  NOT COMPLETELY IMPLEMENTED YET!

iResetNode(node%):"iResetNode"
iNodeRadius(node%,x_raduis#,y_radius#):"iNodeRadius"
iNodeBox(node%,x#,y#,z#,width#,height#,depth#):"iNodeBox"
iNodeType(node%,collision_type%,recursive%):"iNodeType"
iNodePickMode(node%,pick_geometry%,obscurer%):"iNodePickMode"
iNodeCollided%(node%,type%):"iNodeCollided"
iCountCollisions%(node%):"iCountCollisions"
iCollisionX#(node%,index%):"iCollisionX"
iCollisionY#(node%,index%):"iCollisionY"
iCollisionZ#(node%,index%):"iCollisionZ"
iCollisionNX#(node%,index%):"iCollisionNX"
iCollisionNY#(node%,index%):"iCollisionNY"
iCollisionNZ#(node%,index%):"iCollisionNZ"
iCollisionTime%(node%,index%):"iCollisionTime"
iCollisionNode%(node%,index%):"iCollisionNode"
iCollisionSurface%(node%,index%):"iCollisionSurface"
iCollisionTriangle%(node%,index%):"iCollisionTriangle"
iGetNodeType%(node%):"iGetNodeType"
iGetScreenXFrom3DPosition(pos_x#,pos_y#,pos_z#):"iGetScreenXFrom3DPosition"
iGetScreenYFrom3DPosition(pos_x#,pos_y#,pos_z#):"iGetScreenYFrom3DPosition"
i3DPositionXFromScreen#(screenX%,screenY%,camera%,normalX#,normalY#,normalZ#,distanceFromOrigin#):"i3DPositionXFromScreen"
i3DPositionYFromScreen#(screenX%,screenY%,camera%,normalX#,normalY#,normalZ#,distanceFromOrigin#):"i3DPositionYFromScreen"
i3DPositionZFromScreen#(screenX%,screenY%,camera%,normalX#,normalY#,normalZ#,distanceFromOrigin#):"i3DPositionZFromScreen"


;	ORIGINAL COLLISION COMMANDS TO BE RE-WRITTEN

iGetCollisionGroupFromMesh%(node%,frame%):"iGetCollisionGroupFromMesh"
iGetCollisionGroupFromComplexMesh%(mesh%,node%,frame%):"iGetCollisionGroupFromComplexMesh"
iGetCollisionGroupFromBox%(node%):"iGetCollisionGroupFromBox"
iGetCollisionGroupFromTerrain%(node%,level_of_detail%):"iGetCollisionGroupFromTerrain"
iAttachCollisionGroupToNode(collision%,node%):"iAttachCollisionGroupToNode"
iRemoveCollisionGroup(collision%,node%):"iRemoveCollisionGroup"
iSetNodeTriangleSelector(node%,collision%):"iSetNodeTriangleSelector" 
iCreateCombinedCollisionGroup%():"iCreateCombinedCollisionGroup"
iAddCollisionGroupToCombination(combined_collision_group%,collision_group%):"iAddCollisionGroupToCombination"
iRemoveAllCollisionGroupsFromCombination(combined_collision_group%):"iRemoveAllCollisionGroupsFromCombination"
iRemoveCollisionGroupFromCombination(combined_collision_group%,collision_group%):"iRemoveCollisionGroupFromCombination"
iGetCollisionPoint%(start%,line_end%,collision_group%,collision_point%):"iGetCollisionPoint"
iGetRayFromScreenCoordinates(screen_x%,screen_y%,camera%,start%,line_end%):"iGetRayFromScreenCoordinates"
iGetCollisionNodeFromCamera%(camera%):"iGetCollisionNodeFromCamera"
iGetCollisionNodeFromRay%(x#,y#,z#,dx#,dy#,dz#):"iGetCollisionNodeFromRay"
iGetChildCollisionNodeFromRay%(node%,idMask%,recurse%,start%,line_end%):"iGetChildCollisionNodeFromRay"
iGetChildCollisionNodeFromPoint%(node%,idMask%,recurse%,point%):"iGetChildCollisionNodeFromPoint"
iGetCollisionNodeFromScreenCoordinates%(screen_x%,screen_y%):"iGetCollisionNodeFromScreenCoordinates"
iGetCollisionNodeAndPointFromRay%(sx#,sy#,sz#,ex#,ey#,ez#,id%,rootNode%):"iGetCollisionNodeAndPointFromRay"
iGet2DPositionFromScreenCoordinates(screenx%,screeny%,x#,y#,camera%):"iGet2DPositionFromScreenCoordinates"
iSetupIrrSceneCollision(camera%):"iSetupIrrSceneCollision"
iGetDistanceBetweenNodes#(nodeA%,nodeB%):"iGetDistanceBetweenNodes"
iAreNodesIntersecting%(nodeA%,nodeB%):"iAreNodesIntersecting"
iIsPointInsideNode%(nodeA%,X#,Y#,Z#):"iIsPointInsideNode"
iGetCollisionResultPosition(selector%,ellipsoidX#,ellipsoidY#,ellipsoidZ#,ellipsoidRadius#,velX#,velY#,velZ#,gravityX#,gravityY#,gravityZ#,slideSpeed#):"iGetCollisionResultPosition"
iCollFalling%():"iCollFalling"
iCollHitPositionX#():"iCollHitPositionX"
iCollHitPositionY#():"iCollHitPositionY"
iCollHitPositionZ#():"iCollHitPositionZ"
iCollNewPositionX#():"iCollNewPositionX"
iCollNewPositionY#():"iCollNewPositionY"
iCollNewPositionZ#():"iCollNewPositionZ"

;;  BSP AND FILE

iAddZipFile%(path$,ignore_case%,ignore_paths%,password$):"iAddZipFile"
iChangeWorkingDirectory(path$):"iChangeWorkingDirectory"
iGetWorkingDirectory$():"iGetWorkingDirectory"
iLoadOctreeMesh%(file$):"iLoadOctreeMesh"
iAddOctreeMeshNode%(mesh%):"iAddOctreeMeshNode"


;;  MODEL ANIMATION

iAnimateNode(node%,mode%,speed#,first_frame%,last_frame%,transition#):"iAnimateNode"
iPlayMD2Animation(node%,sequence%):"iPlayMD2Animation"
iLoopAnimation(node%,looped%):"iLoopAnimation"
iAnimationLooped(node%):"iAnimationLooped"
iAnimationSpeed(node%,speed#):"iAnimationSpeed"
iAnimationFrame%(node%):"iAnimationFrame"
iSetAnimationFrame(node%,frame#):"iSetAnimationFrame"
iTransitionTime(node%,speed#):"iTransitionTime"
iAnimateJoints(node%):"iAnimateJoints"
iSetJointMode(node%,mode%):"iSetJointMode"
iCollisionAnimator%(selector%,node%,radiusx#,radiusy#,radiusz#,gravityx#,gravityy#,gravityz#,offsetx#,offsety#,offsetz#):"iCollisionAnimator"
iDeleteAnimator%(node%,delete_after_n_milliseconds%):"iDeleteAnimator"
iFlyCircleAnimator%(node%,centre_x#,centre_y#,centre_z#,radius#,speed#):"iFlyCircleAnimator"
iFlyStraightAnimator%(node%,start_x#,start_y#,start_z#,end_x#,end_y#,end_z#,time_to_complete%,loop_path%):"iFlyStraightAnimator"
iRotationAnimator%(node%,x#,y#,z#):"iRotationAnimator"
iSplineAnimator%(node%,array_size%,x#,y#,z#,time_to_start%,speed#,tightness#):"iSplineAnimator"
iFadeAnimator%(node%,delete_after_n_milliseconds%,scale#):"iFadeAnimator"
iFreeAnimator(node%,animnode%):"iFreeAnimator"


;;  MESH

iCreateMesh%(mesh_name$,vertex_count%,vertices%,indices_count%,indices%):"iCreateMesh"
iWriteMesh%(mesh%,file_format%,path$):"iWriteMesh"
iClearUnusedMeshes():"iClearUnusedMeshes"
iFreeMesh(mesh%):"iFreeMesh"
iNameMesh(mesh%,newName$):"iNameMesh"
iLoadMesh%(file$):"iLoadMesh"
iLoadMeshNode%(file$,parent%):"iLoadMeshNode"
iLoadAnimMesh%(file$,parent%):"iLoadAnimMesh"
iCreateCube%(size#,parent%):"iCreateCube"
iCreateSphere%(polycount%,parent%):"iCreateSphere"
iCopyMesh%(mesh%):"iCopyMesh"
iScaleMesh(mesh%,scale#,frame%,meshBuffer%,mesh2%):"iScaleMesh"
iCreateHillPlaneMesh%(mesh_name$,tileSizeX#,tileSizeY#,tileCountX%,tileCountY%,material%,hillHeight#,countHillsX#,countHillsY#,textureRepeatCountX#,textureRepeatCountY#):"iCreateHillPlaneMesh"
iFlipMesh%(mesh%):"iFlipMesh"
iFlipNodeMesh%(node%):"iFlipNodeMesh"
iHWAcceleratedMesh(mesh%,frame%):"iHWAcceleratedMesh"
iHWAcceleratedMeshNode(node%,frame%):"iHWAcceleratedMeshNode"
iGetNodeMesh%(node%):"iGetNodeMesh"
iAddMeshToScene%(mesh%):"iAddMeshToScene"
iCreateBatchingMesh%():"iCreateBatchingMesh"
iAddToBatchingMesh(meshBatch%,mesh%,posX#,posY#,posZ#,rotX#,rotY#,rotZ#,scaleX#,scaleY#,scaleZ#):"iAddToBatchingMesh"
iFinalizeBatchingMesh%(meshBatch%):"iFinalizeBatchingMesh"
iMeshTexture(mesh%,texture%,material_index%,buffer%):"iMeshTexture"
iMeshFrameCount%(mesh%):"iMeshFrameCount"
iMeshBufferCount%(mesh%,frame%):"iMeshBufferCount"
iMeshIndexCount%(mesh%,frame%,meshBuffer%):"iMeshIndexCount"
iCopyMeshIndicesTo(mesh%,frame%,indicies%,meshBuffer%):"iCopyMeshIndicesTo"
iCopyMeshIndicesFrom(mesh%,frame%,indicies%,meshBuffer%):"iCopyMeshIndicesFrom"
iMeshVertexCount%(mesh%,frame%,meshBuffer%):"iMeshVertexCount"
iCopyMeshVerticesTo(mesh%,frame%,verticies%,meshBuffer%):"iCopyMeshVerticesTo"
iCopyMeshVerticesFrom(mesh%,frame%,verticies%,meshBuffer%):"iCopyMeshVerticesFrom"
iMeshVertexMemory%(mesh%,frame%,meshBuffer%):"iMeshVertexMemory"
iMeshVertexColors(mesh%,frame%,vertexColor%,groupAmount%,startPos%,endPos%,meshbuffer%):"iMeshVertexColors"
iMeshVertexCoords(mesh%,frame%,vertexCoord%,groupAmount%,startPos%,endPos%,meshbuffer%):"iMeshVertexCoords"
iMeshVertexSingleColor(mesh%,frame%,vertexColor%,groupAmount%,startPos%,endPos%,meshbuffer%):"iMeshVertexSingleColor"
iMeshBoundingBox(mesh%,minX#,minY#,minZ#,maxX#,maxY#,maxZ#):"iMeshBoundingBox"
iStaticMeshForNormalMapping%(mesh%):"iStaticMeshForNormalMapping"


;;  PLANE

iCreatePlane%(mesh_name$):"iCreatePlane"


;;  TEXTURE

iTextureCreateFlag(flag%,value%):"iTextureCreateFlag"
iCreateTexture%(name$,x%,y%,format%):"iCreateTexture"
iLoadTexture%(file$):"iLoadTexture"
iCreateRenderTexture%(x%,y%):"iCreateRenderTexture"
iDrawSceneToTexture(texture%):"iDrawSceneToTexture"
iRenderTargetTexture(texture%,sceneBackgroundColor%,clearBackBuffer%,clearZBuffer%):"iRenderTargetTexture"
iFreeTexture(texture%):"iFreeTexture"
iTextureBlend%(destination_texture%,source_texture%,x_offset%,y_offset%,operation%):"iTextureBlend"
iTextureWidth%(texture%):"iTextureWidth"
iTextureHeight%(texture%):"iTextureHeight"
iMaskTexture(texture%,red%,green%,blue%,alpha%):"iMaskTexture"
iLockTexture%(texture%):"iLockTexture"
iUnlockTexture(texture%):"iUnlockTexture"
iNormalMapTexture(texture%,amplitude#):"iNormalMapTexture"


;;	Material and GPU Programming Functions

iNodeAmbientColor(node%,uColor%):"iNodeAmbientColor"
iNodeDiffuseColor(node%,uColor%):"iNodeDiffuseColor"
iNodeSpecularColor(node%,uColor%):"iNodeSpecularColor"
iNodeEmissiveColor(node%,uColor%):"iNodeEmissiveColor"
iNodeColorByVertex(node%,colorMaterial%):"iNodeColorByVertex"
iMaterialVertexColorAffects(material%,colorMaterial%):"iMaterialVertexColorAffects"
iMaterialShininess(material%,shininess#):"iMaterialShininess"
iMaterialSpecularColor(material%,Alpha%,Red%,Green%,Blue%):"iMaterialSpecularColor"
iMaterialDiffuseColor(material%,Alpha%,Red%,Green%,Blue%):"iMaterialDiffuseColor"
iMaterialAmbientColor(material%,Alpha%,Red%,Green%,Blue%):"iMaterialAmbientColor"
iMaterialEmissiveColor(material%,Alpha%,Red%,Green%,Blue%):"iMaterialEmissiveColor"
iMaterialTypeParam(material%,value#):"iMaterialTypeParam"
iMaterialBlend(material%,blendSrc%,blendDest%):"iMaterialBlend"
iMaterialLineThickness(material%,value#):"iMaterialLineThickness"
iCreateNamedVertexShaderConstant%(shader%,const_name$,const_preset%,const_data#,data_count%):"iCreateNamedVertexShaderConstant"
iCreateNamedPixelShaderConstant%(shader%,const_name$,const_preset%,const_data#,data_count%):"iCreateNamedPixelShaderConstant"
iCreateAddressedVertexShaderConstant%(shader%,const_address%,const_preset%,const_data#,data_count%):"iCreateAddressedVertexShaderConstant"
iCreateAddressedPixelShaderConstant%(shader%,const_address%,const_preset%,const_data#,data_count%):"iCreateAddressedPixelShaderConstant"
iAddHighLevelShaderMaterial%(vertex_program$,vertex_start_function$,vertex_prog_type%,pixel_program$,pixel_start_function$,pixel_prog_type%,material_type%):"iAddHighLevelShaderMaterial"
iAddHighLevelShaderMaterialFromFiles%(vertex_program_filename$,vertex_start_function$,vertex_prog_type%,pixel_program_filename$,pixel_start_function$,pixel_prog_type%,material_type%):"iAddHighLevelShaderMaterialFromFiles"
iAddShaderMaterial%(vertex_program$,pixel_program$,material_type%):"iAddShaderMaterial"
iAddShaderMaterialFromFiles%(vertex_program_filename$,pixel_program_filename$,material_type%):"iAddShaderMaterialFromFiles"
itMaterialCount%(node%):"iMaterialCount"
iGetMaterial%(node%,index%):"iGetMaterial"


;;  IMAGE

iLoadImage%(path$):"iLoadImage"
iCreateImage%(x%,y%,format%):"iCreateImage"
iFreeImage(image%):"iFreeImage"
iLockImage%(image%):"iLockImage"
iUnlockImage(image%):"iUnlockImage"
iSaveScreenShot(text$):"iSaveScreenShot"
iGrabScreenShot%(x%,y%,w%,h%):"iGrabScreenShot"
iImageWidth%(image%):"iImageWidth"
iImageHeight%(image%):"iImageHeight"
iImagePitch%(image%):"iImagePitch"
iImageFormat%(image%):"iImageFormat"
iDrawImage(texture%,x%,y%):"iDrawImage"
iDrawImageElement(texture%,x%,y%,source_tx%,source_ty%,source_bx%,source_by%,usealpha%):"iDrawImageElement"
iDrawImageElementScale(texture%,dest_tx%,dest_ty%,dest_bx%,dest_by%,source_tx%,source_ty%,source_bx%,source_by%,usealpha%):"iDrawImageElementScale"


;;  CAMERA

iCreateFPSCamera%(parent%,rotateSpeed#,moveSpeed#,id%,keyMapArray%,keyMapSize%,noVericalMovement%,jumpSpeed#):"iCreateFPSCamera"
iCreateCamera%(parent%):"iCreateCamera"
iCreateMayaCamera%(parent%,rotateSpeed#,zoomSpeed#,moveSpeed#):"iCreateMayaCamera"
iCameraTarget(camera%,X#,Y#,Z#):"iCameraTarget"
iCameraTargetX#(camera%):"iCameraTargetX"
iCameraTargetY#(camera%):"iCameraTargetY"
iCameraTargetZ#(camera%):"iCameraTargetZ"
iCameraUpX#(camera%):"iCameraUpX"
iCameraUpY#(camera%):"iCameraUpY"
iCameraUpZ#(camera%):"iCameraUpZ"
iCameraUp(camera%,X#,Y#,Z#):"iCameraUp"
iCameraForwardX#(camera%):"iCameraForwardX"
iCameraForwardY#(camera%):"iCameraForwardY"
iCameraForwardZ#(camera%):"iCameraForwardZ"
iCameraRightX#(camera%):"iCameraRightX"
iCameraRightY#(camera%):"iCameraRightY"
iCameraRightZ#(camera%):"iCameraRight"
iCameraRange(camera%,farDistance#,nearDistance#):"iCameraRange"
iActiveCamera(camera%):"iActiveCamera"
iCameraFOV(camera%,fov#):"iCameraFOV"
iCameraAspectRatio(camera%,aspectRatio#):"iCameraAspectRatio"


;;  TERRAINS

iLoadTerrain%(path$,xPosition#,yPosition#,zPosition#,xRotation#,yRotation#,zRotation#,xScale#,yScale#,zScale#,vertexAlpha%,vertexRed%,vertexGreen%,vertexBlue%,smoothing%,maxLOD%,patchSize%):"iLoadTerrain"
iCreateTiledTerrain%(heightMapPath$,texturePath$,followNode%,terrainWidth%,terrainHeight%,tileSize#,meshSize%,heightmapScale#,smoothing%,materialType%):"iCreateTiledTerrain"
iTiledTerrainHeight#(terrain%,X#,Z#):"iTiledTerrainHeight"
iTerrainHeight#(terrain%,X#,Z#):"iTerrainHeight"
iScaleTerrainTexture(terrain%,X#,Y#):"iScaleTerrainTexture"
iScaleSphericalTexture(terrain%,X#,Y#):"iScaleSphericalTexture"
iScaleTileTexture(terrain%,X#,Y#):"iScaleTileTexture"
iAttachTile(terrain%,neighbour%,Edge%):"iAttachTile"
iLoadTileStructure(terrain%,image%,dataX%,dataY%):"iLoadTileStructure"
iLoadTileColor(terrain%,image%,dataX%,dataY%):"iLoadTileColor"
iCreateSphericalTerrain%(topPath$,frontPath$,backPath$,leftPath$,rightPath$,bottomPath$,xPosition#,yPosition#,zPosition#,xRotation#,yRotation#,zRotation#,xScale#,yScale#,zScale#,vertexAlpha%,vertexRed%,vertexGreen%,vertexBlue%,smoothing%,spherical%,maxLOD%,patchSize%):"iCreateSphericalTerrain"
iSphericalTerrainTexture(terrain%,topTexture%,frontTexture%,backTexture%,leftTexture%,rightTexture%,bottomTexture%,materialIndex%):"iSphericalTerrainTexture"
iSphericalTerrainVertexColor(terrain%,topImage%,frontImage%,backImage%,leftImage%,rightImage%,bottomImage%):"iSphericalTerrainVertexColor"
iSphericalTerrainSurfaceX#(terrain%,face%,logicalX#,logicalZ#):"iSphericalTerrainSurfaceX"
iSphericalTerrainSurfaceY#(terrain%,face%,logicalX#,logicalZ#):"iSphericalTerrainSurfaceY"
iSphericalTerrainSurfaceZ#(terrain%,face%,logicalX#,logicalZ#):"iSphericalTerrainSurfaceZ"
iSphericalTerrainAngleRX#(terrain%,face%,logicalX#,logicalZ#):"iSphericalTerrainAngleRX"
iSphericalTerrainAngleRY#(terrain%,face%,logicalX#,logicalZ#):"iSphericalTerrainAngleRY"
iSphericalTerrainAngleRZ#(terrain%,face%,logicalX#,logicalZ#):"iSphericalTerrainAngleRZ"
iSphericalSurfaceLogicalX#(terrain%,X#,Y#,Z#,face%):"iSphericalSurfaceLogicalX"
iSphericalSurfaceLogicalZ#(terrain%,X#,Y#,Z#,face%):"iSphericalSurfaceLogicalZ"


;;  LIGHTS

iCreateLight%(parent%,x#,y#,z#,red#,green#,blue#,size#):"iCreateLight"
iLightAmbientColor(light%,R#,G#,B#):"iLightAmbientColor"
iLightDiffuseColor(light%,R#,G#,B#):"iLightDiffuseColor"
iLightRange(light%,constant#,linear#,quadratic#):"iLightRange"
iLightCastShadows(light%,cast_shadows%):"iLightCastShadows"
iLightFalloff(light%,Falloff#):"iLightFalloff"
iLightConeAngle(light%,InnerCone#,OuterCone#):"iLightConeAngle"
iLightRadius(light%,Radius#):"iLightRadius"
iLightSpecularColor(light%,R#,G#,B#):"iLightSpecularColor"
iLightType(light%,light_type%):"iLightType"


;;  PARTICLES

iCreateParticleSystem%(add_emitter%,parent%,id%,posX#,posY#,posZ#,rotX#,rotY#,rotZ#,scaleX#,scaleY#,scaleZ#):"iCreateParticleSystem"
iParticleSize(particle_emitter%,X#,Y#):"iParticleSize"
iParticleMinSize(particle_emitter%,X#,Y#):"iParticleMinSize"
iParticleMaxSize(particle_emitter%,X#,Y#):"iParticleMaxSize"
iCreateParticleEmitter%(particle_system%,min_box_x#,min_box_y#,min_box_z#,max_box_x#,max_box_y#,max_box_z#,dir_x#,dir_y#,dir_z#,min_paritlcles_ps%,max_paritlcles_ps%,min_start_red%,min_start_green%,min_start_blue%,max_start_red%,max_start_green%,max_start_blue%,min_lifetime%,max_lifetime%,min_start_sizeX#,min_start_sizeY#,max_start_sizeX#,max_start_sizeY#,max_angle_degrees%):"iCreateParticleEmitter"
iCreateAnimatedMeshSceneNodeEmitter%(particle_system%,node%,use_normal_direction%,normal_direction_modifier#,emit_from_every_vertex%,settings%):"iCreateAnimatedMeshSceneNodeEmitter"
iFadeOutAffector%(particle_system%,fade_speed%,fade_to_red%,fade_to_green%,fade_to_blue%):"iFadeOutAffector"
iGravityAffector%(particle_system%,x#,y#,z#,timeForceLost%):"iGravityAffector"
iAttractionAffector%(particle_system%,x#,y#,z#,speed#,attract%,affectX%,affectY%,affectZ%):"iAttractionAffector"
iRotationAffector%(particle_system%,Speed_X#,Speed_Y#,Speed_Z#,pivot_X#,pivot_Y#,pivot_Z#):"iRotationAffector"
iStopAffector%(particle_system%,run_time%,target_emitter%):"iStopAffector"
iPushAffector%(particle_system%,x#,y#,z#,speedX#,speedY#,speedZ#,far#,near#,column#,radial%):"iPushAffector"
iColorAffector%(particle_system%,num%,colors*,times*,smooth%):"iColorAffector"
iSplineAffector%(particle_system%,VertexCount%,verticies*,speed#,tightness#,attraction#,deleteAtEnd%):"iSplineAffector"
iFreeAffectors(particle_system%):"iFreeAffectors"
iParticleEmitterDirection(particle_system%,x#,y#,z#):"iParticleEmitterDirection"
iEmitterMinParticlesPerSecond(particle_system%,minPPS%):"iEmitterMinParticlesPerSecond"
iEmitterMaxParticlesPerSecond(particle_system%,maxPPS%):"iEmitterMaxParticlesPerSecond"
iEmitterMinStartColor(particle_system%,Red%,Green%,Blue%):"iEmitterMinStartColor"
iEmitterMaxStartColor(particle_system%,Red%,Green%,Blue%):"iEmitterMaxStartColor"
iParticleAffectorEnable(affector%,enable%):"iParticleAffectorEnable"
iFadeOutParticleAffectorTime(affector%,fade_speed%):"iFadeOutParticleAffectorTime" 
iFadeOutParticleAffectorTargetColor(affector%,fade_to_red%,fade_to_green%,fade_to_blue%):"iFadeOutParticleAffectorTargetColor"
iGravityParticleAffectorDirection(affector%,x#,y#,z#):"iGravityParticleAffectorDirection"
iGravityParticleAffectorTimeForceLost(affector%,time_Force_Lost#):"iGravityParticleAffectorTimeForceLost"
iParticleAttractionAffectorAffectX(affector%,affect_x%):"iParticleAttractionAffectorAffectX"
iParticleAttractionAffectorAffectY(affector%,affect_y%):"iParticleAttractionAffectorAffectY"
iParticleAttractionAffectorAffectZ(affector%,affect_z%):"iParticleAttractionAffectorAffectZ"
iParticleAttractionAffectorAttract(affector%,attract%):"iParticleAttractionAffectorAttract"
iParticleAttractionAffectorPoint(affector%,x#,y#,z#):"iParticleAttractionAffectorPoint"
iRotationAffectorPivotPoint(affector%,x#,y#,z#):"iRotationAffectorPivotPoint"
iFurthestDistanceOfEffect(affector%,NewDistance#):"iFurthestDistanceOfEffect"
iNearestDistanceOfEffect(affector%,NewDistance#):"iNearestDistanceOfEffect"
iColumnDistanceOfEffect(affector%,NewDistance#):"iColumnDistanceOfEffect"
iCenterOfEffect(affector%,x#,y#,z#):"iCenterOfEffect"
iStrengthOfEffect(affector%,x#,y#,z#):"iStrengthOfEffect"


;;  BILLBOARDS

iCreateBillBoardGroup%():"iCreateBillBoardGroup"
iBillBoardToGroup%(group%,sizex#,sizey#,x#,y#,z#,roll#,A%,R%,G%,B%):"iBillBoardToGroup"
iBillBoardByAxisToGroup%(group%,sizex#,sizey#,x#,y#,z#,roll#,A%,R%,G%,B%,axis_x#,axis_y#,axis_z#):"iBillBoardByAxisToGroup"
iFreeBillBoardFromGroup(node%,billboard%):"iFreeBillBoardFromGroup"
iBillBoardGroupShadows(group%,x#,y#,z#,intensity#,ambient#):"iBillBoardGroupShadows"
iBillBoardGroupCount%(group%):"iBillBoardGroupCount"
iBillBoardForceUpdate(group%):"iBillBoardForceUpdate"
iCreateBillBoard%(sizex#,sizey#,x#,y#,z#):"iCreateBillBoard"
iBillBoardColor(node%,topColor%,bottomColor%):"iBillBoardColor"
iBillBoardSize(node%,BillWidth#,BillHeight#):"iBillBoardSize"
iCreateTextBillBoard%(font%,text$,sizex#,sizey#,x#,y#,z#,parent%,topRGBA%,bottomRGBA%):"iCreateTextBillBoard"


;;  ZONE MANAGER

iCreateZoneMgr%(nearDistance#,farDistance#):"iCreateZoneMgr"
iZoneMgrProperties(zoneNode%,nearDistance#,farDistance#,accumulateChildBoxes%):"iZoneMgrProperties"
iZoneMgrBndBox(zoneNode%,x#,y#,z#,boxWidth#,boxHeight#,boxDepth#):"iZoneMgrBndBox"
iZoneMgrAttachTerrain(zoneNode%,terrain%,structureMapFile$,colorMapFile$,detailMapFile$,ImageX%,ImageY%,sliceSize%):"iZoneMgrAttachTerrain"
iCreateLODMgr%(fadeScale%,useAlpha%,callback%):"iCreateLODMgr"
iLODMesh(node%,distance#,mesh%):"iLODMesh"
iLODMaterialMap(node%,source%,target%):"iLODMaterialMap"


;;  Bitplanes XEffect Extension

iXFXStart(vsm%,softShadows%,bitdepth32%):"iXFXStart"
iXFXEnableDepthPass(enable%):"iXFXEnableDepthPass"
iXFXAddPostProcessingFromFile(name$,effectType%):"iXFXAddPostProcessingFromFile"
iXFXSetPostProcessingUserTexture(texture%):"iXFXSetPostProcessingUserTexture"
iXFXAddShadowToNode(node%,filterType%,shadowType%):"iXFXAddShadowToNode"
iXFXRemoveShadowFromNode(node%):"iXFXRemoveShadowFromNode"
iXFXExcludeNodeFromLightingCalculations(node%):"iXFXExcludeNodeFromLightingCalculations"
iXFXAddNodeToDepthPass(node%):"iXFXAddNodeToDepthPass"
iXFXSetAmbientColor(R%,G%,B%,Alpha%):"iXFXSetAmbientColor"
iXFXSetClearColor(R%,G%,B%,Alpha%):"iXFXSetClearColor"
iXFXAddShadowLight(shadowDimen%,posX#,posY#,posZ#,targetX#,targetY#,targetZ#,R#,G#,B#,Alpha#,lightNearDist#,lightFarDist#,angleDegrees#):"iXFXAddShadowLight"
iXFXSetShadowLightPosition(index%,posX#,posY#,posZ#):"iXFXSetShadowLightPosition"
iXFXGetShadowLightPositionX#(index%):"iXFXGetShadowLightPositionX"
iXFXGetShadowLightPositionY#(index%):"iXFXGetShadowLightPositionY"
iXFXGetShadowLightPositionZ#(index%):"iXFXGetShadowLightPositionZ"
iXFXSetShadowLightTarget(index%,posX#,posY#,posZ#):"iXFXSetShadowLightTarget"
iXEffectsGetShadowLightTarget(index%,posX#,posY#,posZ#):"iXEffectsGetShadowLightTarget"
iXFXGetShadowLightTargetX#(index%):"iXFXGetShadowLightTargetX"
iXFXGetShadowLightTargetY#(index%):"iXFXGetShadowLightTargetY"
iXFXGetShadowLightTargetZ#(index%):"iXFXGetShadowLightTargetZ"
iXFXSetShadowLightColor(index%,R#,G#,B#,Alpha#):"iXFXSetShadowLightColor"
iXFXGetShadowLightColorRed#(index%):"iXFXGetShadowLightColorRed"
iXFXGetShadowLightColorGrn#(index%):"iXFXGetShadowLightColorGrn"
iXFXGetShadowLightColorBlu#(index%):"iXFXGetShadowLightColorBlu"
iXFXGetShadowLightColorAlpha#(index%):"iXFXGetShadowLightColorAlpha"


;; GUI

iGUISetFont(font%):"iGUISetFont"
iGUISetColor(color_element%,r%,g%,b%,alpha%):"iGUISetColor"
iGUIClear():"iGUIClear"
iGUIRemove(gui_element%):"iGUIRemove"
iGUIGetText$(gui_element%):"iGUIGetText"
iGUISetText(gui_element%,text$):"iGUISetText"
iCreateWindow%(title$,tx%,ty%,bx%,by%,model%,parent%):"iCreateWindow"
iStaticText%(text$,TopX%,TopY%,BotX%,BotY%,border%,wordwrap%,parent%):"iStaticText"
iCreateButton%(tx%,ty%,bx%,by%,id%,text$,tip$,parent%):"iCreateButton"
iCreateScrollBar%(horz%,tx%,ty%,bx%,by%,id%,cur_val%,max_val%,parent%):"iCreateScrollBar"
iCreateListBox%(tx%,ty%,bx%,by%,id%,background%,parent%):"iCreateListBox"
iAddGadgetItem(list_box%,text$):"iAddGadgetItem"
iInsertGadgetItem(list_box%,text$,index%):"iInsertGadgetItem"
iRemoveGadgetItem(list_box%,index%):"iRemoveGadgetItem"
iSelectGadgetItem(list_box%,index%):"iSelectGadgetItem"
iCreateEditBox%(text$,tx%,ty%,bx%,by%,id%,border%,password%,parent%):"iCreateEditBox"
iStaticImage%(texture%,x%,y%,useAlpha%,id%,parent%):"iStaticImage"
iCreateCheckBox%(text$,tx%,ty%,bx%,by%,id%,checked%,parent%):"iCreateCheckBox"
iCheckCheckBox(checkbox%,checked%):"iCheckCheckBox"
iAddFileOpen%(text$,id%,model%,parent%):"iAddFileOpen"


;;  3D MATH

iExtrapolatePoint#(time#,initpos#,vel#,accel#,maxvel#):"iExtrapolatePoint"


;;  IRRKLANG SOUND

iKlangInit%():"iKlangInit"
iKlangUpdate():"iKlangUpdate"
iMasterVolume(volume#):"iMasterVolume"
iPlaySound%(file$,looped%,paused%,track%,mode%,fx%):"iPlaySound"
iPlay3DSound%(file$,x#,y#,z#,looped%,paused%,track%,mode%,fx%):"iPlay3DSound"
iPauseAllSounds(bool%):"iPauseAllSounds"
iStopAllSounds():"iStopAllSounds"
iListenerPosition(x#,y#,z#,lookX#,lookY#,lookZ#,velX#,velY#,velZ#,upX#,upY#,upZ#):"iListenerPosition"
iFreeSound(sound%):"iFreeSound"
iFreeSoundFile(file$):"iFreeSoundFile"
iFreeAllSoundFiles():"iFreeAllSoundFiles"
iKlangEnd():"iKlangEnd"
iSoundLength%(sound%):"iSoundLength"
iGetPlayPosition%(sound%):"iGetPlayPosition"
iSoundPlaying%(sound%):"iSoundPlaying"
iPauseSound(sound%,bool%):"iPauseSound"
iPlaySpeed%(sound%,speed#):"iPlaySpeed"
iSetPlayPosition%(sound%,position%):"iSetPlayPosition"
iPositionSound(sound%,x#,y#,z#):"iPositionSound"
iSoundVolume(sound%,volume#):"iSoundVolume"
iSoundDistance(sound%,distance#):"iSoundDistance"
iStopSound(sound%):"iStopSound"
iParentNode(snode%,node%):"iParentNode"
iAddSoundNode%(file$,min_dist#,loop%,parent%):"iAddSoundNode"



