Seite 1 von 1

Leadwerks Engine Include - noch unvollständig leider

Verfasst: 23.08.2010 10:29
von smateja
Hallo zusammen,

ich hoffe ihr könnt evtl. ein wenig mithelfen da ich selbst nicht der Mensch bin, der mit Strukturen und gerade dann auch noch mit den Prototypes umgehen kann.

Das Problem ist, dass einige Structures nicht richtig bzw. nich vollständig definiert sind.
Den Code habe von dem Tool, welches auf der Leadwerksseite im Download bereich als Member zu haben ist.

Teil 1:

Code: Alles auswählen


;******************************************************************************
;****                  ****
;****       Leadwerks Engine 2.4      ****
;****         Headers ver.: 2.4       ****
;****     (c) 1999-2010 Leadwerks Corporation     ****
;****        http:;www.leadwerks.com      ****
;****                  ****
;******************************************************************************


  Structure TVec2
     X.f
     Y.f
  EndStructure

  Structure TVec3
     X.f
     Y.f
     Z.f
  EndStructure

  Structure TVec4
     X.f
     Y.f
     Z.f
     W.f
  EndStructure

  Structure TVec6
     X0.f
     Y0.f
     Z0.f
     X1.f
     Y1.f
     Z1.f
  EndStructure

  Structure TVec9
     A0.f
     A1.f
     A2.f
     B0.f
     B1.f
     B2.f
     C0.f
     C1.f
     C2.f
  EndStructure

  Structure TVec16
     A0.f
     A1.f
     A2.f
     A3.f
     B0.f
     B1.f
     B2.f
     B3.f
     C0.f
     C1.f
     C2.f
     C3.f
     D0.f
     D1.f
     D2.f
     D3.f
  EndStructure

  Structure TPick
     entity.i
     surface.i
     X.f
     Y.f
     Z.f
     NX.f
     NY.f
     NZ.f
  EndStructure

  #ENGINE_DLL = "engine.dll";

  #KEY_BACKSPACE=8
  #KEY_TAB=9
  #KEY_ENTER=13
  #KEY_ESCAPE=27
  #KEY_SPACE=32
  #KEY_PAGEUP=33
  #KEY_PAGEDOWN=34
  #KEY_END=35
  #KEY_HOME=36
  #KEY_INSERT=45
  #KEY_DELETE=46
  #KEY_LEFT=37
  #KEY_UP=38
  #KEY_RIGHT=39
  #KEY_DOWN=40
  #KEY_0=48
  #KEY_1=49
  #KEY_2=50
  #KEY_3=51
  #KEY_4=52
  #KEY_5=53
  #KEY_6=54
  #KEY_7=55
  #KEY_8=56
  #KEY_9=57
  #KEY_A=65
  #KEY_B=66
  #KEY_C=67
  #KEY_D=68
  #KEY_E=69
  #KEY_F=70
  #KEY_G=71
  #KEY_H=72
  #KEY_I=73
  #KEY_J=74
  #KEY_K=75
  #KEY_L=76
  #KEY_M=77
  #KEY_N=78
  #KEY_O=79
  #KEY_P=80
  #KEY_Q=81
  #KEY_R=82
  #KEY_S=83
  #KEY_T=84
  #KEY_U=85
  #KEY_V=86
  #KEY_W=87
  #KEY_X=88
  #KEY_Y=89
  #KEY_Z=90
  #KEY_LSYS=91
  #KEY_RSYS=92
  #KEY_NUM0=96
  #KEY_NUM1=97
  #KEY_NUM2=98
  #KEY_NUM3=99
  #KEY_NUM4=100
  #KEY_NUM5=101
  #KEY_NUM6=102
  #KEY_NUM7=103
  #KEY_NUM8=104
  #KEY_NUM9=105
  #KEY_NUMMULTIPLY=106
  #KEY_NUMADD=107
  #KEY_NUMSLASH=108
  #KEY_NUMSUBTRACT=109
  #KEY_NUMDECIMAL=110
  #KEY_NUMDIVIDE=111
  #KEY_F1=112
  #KEY_F2=113
  #KEY_F3=114
  #KEY_F4=115
  #KEY_F5=116
  #KEY_F6=117
  #KEY_F7=118
  #KEY_F8=119
  #KEY_F9=120
  #KEY_F10=121
  #KEY_F11=122
  #KEY_F12=123
  #KEY_LSHIFT=160
  #KEY_RSHIFT=161
  #KEY_LCONTROL=162
  #KEY_RCONTROL=163
  #KEY_LALT=164
  #KEY_RALT=165
  #KEY_TILDE=192
  #KEY_MINUS=189
  #KEY_EQUALS=187
  #KEY_OPENBRACKET=219
  #KEY_CLOSEBRACKET=221
  #KEY_BACKSLASH=226
  #KEY_SEMICOLON=186
  #KEY_QUOTES=222
  #KEY_COMMA=188
  #KEY_PERIOD=190
  #KEY_SLASH=191

  #MAX_DEC = 9999999999.9999999999
  #GRAPHICS_BACKBUFFER = $02
  #GRAPHICS_ALPHABUFFER = $04
  #GRAPHICS_DEPTHBUFFER = $08
  #GRAPHICS_STENCILBUFFER = $10
  #GRAPHICS_ACCUMBUFFER = $20
  #BLEND_NONE = 0
  #BLEND_ALPHA = 1
  #BLEND_LIGHT = 2
  #BLEND_SHADE = 3
  #BLEND_MOD2X = 4
  #TEXFILTER_MIPMAP = 1
  #TEXFILTER_SMOOTH = 2
  #TEXFILTER_PIXEL = 3
  #MAX_COLOR_BUFFERS = 3
  #BUFFER_DEPTH = 1
  #BUFFER_COLOR = 2
  #BUFFER_COLOR0 = 2
  #BUFFER_COLOR1 = 4
  #BUFFER_COLOR2 = 8
  #BUFFER_COLOR3 = 16
  #BUFFER_NORMAL = #BUFFER_COLOR1
  #TEXTURE_LUMINANCE8 = 1
  #TEXTURE_LUMINANCE = #TEXTURE_LUMINANCE8
  #TEXTURE_ALPHA8 = 2
  #TEXTURE_ALPHA = #TEXTURE_ALPHA8
  #TEXTURE_RGB8 = 3
  #TEXTURE_RGB = #TEXTURE_RGB8
  #TEXTURE_RGBA8 = 4
  #TEXTURE_RGBA = #TEXTURE_RGBA8
  #TEXTURE_DEPTH24 = 5
  #TEXTURE_DEPTH = #TEXTURE_DEPTH24
  #TEXTURE_RGBA16 = 6
  #TEXTURE_FLOAT = 7
  #TEXTURE_RGBA32 = 8
  #TEXTURE_RG11B10 = 9
  #ENTITY_MESH = 1
  #ENTITY_EMITTER = 2
  #ENTITY_MODEL = 4
  #ENTITY_BODY = 8
  #ENTITY_TERRAIN = 16
  #ENTITY_BONE = 64
  #ENTITY_CAMERA = 128
  #ENTITY_CORONA = 256
  #ENTITY_LISTENER = 1024
  #ENTITY_PIVOT = 2048
  #ENTITY_MESHLAYER = 4096
  #ENTITY_POINTLIGHT = 8192
  #ENTITY_SPOTLIGHT = 512
  #ENTITY_DIRECTIONALLIGHT = 16384
  #ENTITY_VEGETATION = 32768
  #ENTITY_CONTROLLER = 65536
  #ENTITY_ALL = #ENTITY_MESH|#ENTITY_EMITTER|#ENTITY_MODEL|#ENTITY_TERRAIN|#ENTITY_BODY|#ENTITY_BONE|#ENTITY_CAMERA|#ENTITY_CORONA|#ENTITY_POINTLIGHT|#ENTITY_SPOTLIGHT|#ENTITY_DIRECTIONALLIGHT|#ENTITY_LISTENER|#ENTITY_PIVOT|#ENTITY_MESHLAYER
  #ENTITY_RENDERABLE = #ENTITY_MESH|#ENTITY_TERRAIN|#ENTITY_CORONA|#ENTITY_EMITTER|#ENTITY_SPOTLIGHT|#ENTITY_POINTLIGHT|#ENTITY_MESHLAYER|#ENTITY_VEGETATION
  #RENDER_ALL = #ENTITY_RENDERABLE
  #FONT_BOLD = 1
  #FONT_ITALIC = 2
  #FONT_UNDERLINE = 4
  #SHADOW_DISABLED = 0
  #SHADOW_DYNAMIC = 1
  #SHADOW_STATIC = 2
  #SHADOW_BUFFERED = 4
  #SHADOW_COLOR = 8
  #SHADOW_QUALITY_DISABLED = 0
  #SHADOW_QUALITY_HIGH = 1
  #SHADOW_QUALITY_MEDIUM = 2
  #SHADOW_QUALITY_LOW = 3
  #VIEWRANGE_NEAR = 0
  #VIEWRANGE_MEDIUM = 1
  #VIEWRANGE_FAR = 2
  #VIEWRANGE_INFINITE = 3
  #APPLOG_NORMAL = 0
  #APPLOG_WARNING = 1
  #APPLOG_ERROR = 2
  #SOURCE_LOOP = 1
  #SOURCE_EAX = 2
  #SOURCE_STOPPED = 0
  #SOURCE_PLAYING = 1
  #SOURCE_PAUSED = 2
  #EAX_NORMAL = 0
  #EAX_GENERIC = 1
  #EAX_PADDEDCELL = 2
  #EAX_ROOM = 3
  #EAX_BATHROOM = 4
  #EAX_LIVINGROOM = 5
  #EAX_STONEROOM = 6
  #EAX_AUDITORIUM = 7
  #EAX_CONCERTHALL = 8
  #EAX_CAVE = 9
  #EAX_ARENA = 10
  #EAX_HANGAR = 11
  #EAX_CARPETTEDHALLWAY = 12
  #EAX_HALLWAY = 13
  #EAX_STONECORRIDOR = 14
  #EAX_ALLEY = 15
  #EAX_FOREST = 16
  #EAX_CITY = 17
  #EAX_MOUNTAINS = 18
  #EAX_QUARRY = 19
  #EAX_PLAIN = 20
  #EAX_PARKINGLOT = 21
  #EAX_SEWERPIPE = 22
  #EAX_UNDERWATER = 23
  #EAX_DRUGGED = 24
  #EAX_DIZZY = 25
  #EAX_PSYCHOTIC = 26
  #ENTITYCALLBACK_FREE = 1
  #ENTITYCALLBACK_UPDATEMATRIX = 2
  #ENTITYCALLBACK_COLLISION = 3
  #ENTITYCALLBACK_ACTIVATE = 4
  #ENTITYCALLBACK_DEACTIVATE = 5
  #ENTITYCALLBACK_ENABLE = 6
  #ENTITYCALLBACK_DISABLE = 7
  #ENTITYCALLBACK_UPDATE = 8
  #ENTITYCALLBACK_MESSAGERECEIVE = 9
  #ENTITYCALLBACK_UPDATEPHYSICS = 10
  #ENTITYCALLBACK_DRAW = 11
  #MATERIALCALLBACK_ENABLE = 1
  #MATERIALCALLBACK_DRAW = 2
  #MATERIALCALLBACK_DISABLE = 3
  #LIGHTCALLBACK_INTENSITY = 101
  #ENTITY_MAX_TARGETS = 16
  #VENDOR_NVIDIA = 1
  #VENDOR_ATI = 2
  #VENDOR_UNKNOWN = 3


;*****************************************************************************
;****                      LEADWERKS ENGINE DLL-API                       ****
;*****************************************************************************

;*****************************************************************************
; Graphics commands
;*****************************************************************************
Prototype.i LEGraphics ( width.i=640, height.i=480, depth.i=0, hertz.i=60, flags.i=#GRAPHICS_BACKBUFFER|#GRAPHICS_DEPTHBUFFER )
Prototype LEFlip ( sync.i=1 )
Prototype.i LEGraphicsWidth (  )
Prototype.i LEGraphicsHeight (  )
Prototype LEEndRender (  )
Prototype.i LEGraphicsModeExists ( width.i, height.i, depth.i, hertz.i )
;*****************************************************************************
; Buffer commands
;*****************************************************************************
Prototype.i LECreateBuffer ( width.i=640, height.i=480, flags.i=#BUFFER_COLOR|#BUFFER_DEPTH )
Prototype.i LEBackBuffer (  )
Prototype.i LEBufferWidth ( buffer.i )
Prototype.i LEBufferHeight ( buffer.i )
Prototype LESetBuffer ( buffer.i )
Prototype.i LEMaxColorBuffers (  )
Prototype.i LEGetColorBuffer ( buffer.i, n.i=0 )
Prototype.i LEGetDepthBuffer ( buffer.i )
Prototype.i LECreateCustomBuffer ( *GetSize.BYTE, *MakeCurrent.BYTE )
Prototype.i LESaveBuffer ( buffer.i, *name.const_str, quality.i=85 )
Prototype LEClearBuffer ( clsmode.i=#MAX_COLOR_BUFFERS )
Prototype LEFreeBuffer ( buffer.i )
Prototype.i LECurrentBuffer (  )
Prototype LECopyBuffer ( src.i, dst.i, components.i=#BUFFER_DEPTH|#BUFFER_COLOR0|#BUFFER_COLOR1|#BUFFER_COLOR2|#BUFFER_COLOR3 )
Prototype.i LESetColorBuffer ( buffer.i, texture.i, index.i=0, cubeface.i=0 )
Prototype.i LESetDepthBuffer ( buffer.i, texture.i )
;*****************************************************************************
; World commands
;*****************************************************************************
Prototype.i LECreateWorld (  )
Prototype LESetWorld ( world.i )
Prototype LESetWorldSize ( *size.TVec3 )
Prototype LEClearWorld (  )
Prototype LEFreeWorld ( world.i )
Prototype.i LECurrentWorld (  )
Prototype LEUpdateWorld ( stepsize.f=1 )
Prototype LERenderWorld ( elements.i=#ENTITY_RENDERABLE )
Prototype.i LELoadScene ( *name.const_str )
;*****************************************************************************
; Terrain commands
;*****************************************************************************
Prototype.i LECreateTerrain ( resolution.i )
Prototype.i LELoadTerrainHeightmap ( terrain.i, *name.const_str )
Prototype.i LELoadTerrainAlphamap ( terrain.i, *name.const_str )
Prototype.i LESaveTerrainHeightmap ( terrain.i, *name.const_str )
Prototype.i LESaveTerrainAlphamap ( terrain.i, *name.const_str )
Prototype LETerrainDetail ( detail.i )
Prototype LESetTerrainHeight ( terrain.i, x.i, y.i, height.f )
Prototype.f LETerrainHeight ( terrain.i, x.i, y.i )
Prototype LEUpdateTerrainNormals ( terrain.i, x.i=-1, y.i=-1, width.i=1, height.i=1 )
Prototype.f LETerrainElevation ( terrain.i, x.f, y.f )
Prototype LETerrainNormal ( terrain.i, x.f, y.f, *normal.TVec3 )
Prototype LESetTerrainTexture ( terrain.i, texture.i, index.i=0, layer.i=0 )
Prototype LESetTerrainTextureScale ( terrain.i, scale.f, layer.i=0 )
Prototype LESetTerrainTextureRotation ( terrain.i, rotation.f, layer.i=0 )
Prototype LESetTerrainTextureMappingMode ( terrain.i, mode.i, layer.i=0 )
Prototype LEBlendTerrainTexture ( terrain.i, x.i, y.i, a.f, layer.i )
Prototype LESetTerrainTextureConstraints ( terrain.i, minslope.f, maxslope.f, minheight.f, maxheight.f, layer.i )
Prototype LESetVegetationShadowMode ( mode.i=1 )
;*****************************************************************************
; ClipPlane commands
;*****************************************************************************
Prototype LESetCameraClipPlane ( camera.i, n.i, *plane.TVec4 )
;*****************************************************************************
; Camera commands
;*****************************************************************************
Prototype.i LECreateCamera ( parent.i=#Null )
Prototype LECameraClearMode ( camera.i, mode.i )
Prototype LECameraClearColor ( camera.i, *color.TVec4 )
Prototype LECameraRange ( camera.i, nearrange.f, farrange.f )
Prototype LECameraProjMode ( camera.i, projmode.i )
Prototype LECameraZoom ( camera.i, zoom.f )
Prototype LECameraProject ( camera.i, *position.TVec3 )
Prototype LECameraUnproject ( camera.i, *position.TVec3 )
Prototype LEGetCameraRange ( camera.i, *rangeArray.FLOAT )
;*****************************************************************************
; Light commands
;*****************************************************************************
Prototype.i LECreateDirectionalLight ( parent.i=#Null )
Prototype.i LECreatePointLight ( range.f=10, parent.i=#Null )
Prototype.i LECreateSpotLight ( range.f=10, parent.i=#Null )
Prototype LELightRange ( light.i, range.f )
Prototype.f LEGetLightRange ( light.i )
Prototype LESetShadowmapSize ( light.i, size.i )
Prototype LESetShadowOffset ( light.i, linearOffset.f, exponentialOffset.f, stage.i=0 )
Prototype LESetShadowSoftness ( light.i, softness.f )
Prototype LEAmbientLight ( *color.TVec3 )
Prototype LESetShadowQuality ( quality.i )
Prototype.i LEGetShadowQuality (  )
Prototype LEDebugLights ( mode.i=1 )
Prototype LELightConeAngles ( light.i, innerangle.f, outerangle.f )
Prototype LELightFalloff ( light.i, inversesquarefalloff.i )
Prototype LERenderLights ( buffer.i )
Prototype LESetShadowDistance ( light.i, range.f, stage.i=0 )
;*****************************************************************************
; Corona commands
;*****************************************************************************
Prototype.i LECreateCorona ( parent.i=#Null )
Prototype LESetCoronaRadius ( corona.i, radius1.f, radius2.f )
;*****************************************************************************
; Entity commands
;*****************************************************************************
Prototype LEScaleEntity ( entity.i, *scale.TVec3 )
Prototype LEPaintEntity ( entity.i, material.i, recursive.i=0 )
Prototype.i LEGetEntityMaterial ( entity.i )
Prototype LEMoveEntity ( entity.i, *direction.TVec3, Globaly.i=0 )
Prototype LETurnEntity ( entity.i, *angle.TVec3, Globaly.i=0 )
Prototype LEPositionEntity ( entity.i, *position.TVec3, Globaly.i=0 )
Prototype LERotateEntity ( entity.i, *angle.TVec3, Globaly.i=0 )
Prototype LEEntityRotation ( entity.i, *angle.TVec3, Globaly.i=0 )
Prototype LEEntityPosition ( entity.i, *position.TVec3, Globaly.i=0 )
Prototype.f LEEntityDistance ( entity1.i, entity2.i )
Prototype LEEntityScale ( entity.i, *scale.TVec3 )
Prototype LEEntityQuat ( entity.i, *quaternion.TVec4 )
Prototype LEForEachEntityDo ( *callback.BYTE, *extra.BYTE=#Null, classes.i=#ENTITY_ALL )
Prototype LEForEachEntityInAABBDo ( *aabb.TVec6, *callback.BYTE, *extra.BYTE=#Null, entityclass.i=#ENTITY_ALL )
Prototype.i LECountChildren ( entity.i )
Prototype.i LEGetChild ( entity.i, index.i=1 )
Prototype LEAnimate ( entity.i, frame.f=0, blend.f=1, sequence.i=0, recursive.i=1 )
Prototype LETranslateEntity ( entity.i, *position.TVec3, Globaly.i=0 )
Prototype LEAlignToVector ( entity.i, *vector.TVec3, axis.i=3, rate.f=1, roll.f=0 )
Prototype LEPointEntity ( entity1.i, entity2.i, axis.i=3, rate.f=1, roll.f=0 )
Prototype LEEntityParent ( entity.i, parent.i=#Null, Globaly.i=1 )
Prototype.i LEGetParent ( entity.i )
Prototype LESetEntityMatrix ( entity.i, *matrix.TVec16 )
Prototype LEGetEntityMatrix ( entity.i, *matrix.TVec16 )
Prototype LEEntityOrder ( entity.i, order.i=0, recursive.i=0 )
Prototype LEEntityColor ( entity.i, *color.TVec4, recursive.i=0 )
Prototype LEGetEntityColor ( entity.i, *color.TVec4 )
Prototype.i LECopyEntity ( entity.i, recursive.i=1 )
Prototype LECopyEntityKeys ( src.i, dst.i )
Prototype LESetEntityKey ( entity.i, *hkey.const_str, *hvalue.const_str="1" )
Prototype.s LEGetEntityKey ( entity.i, *hkey.const_str, *defaultvalue.const_str="" )
Prototype LEEntityType ( entity.i, collisionType.i=1, recursive.i=0 )
Prototype.i LEGetEntityType ( entity.i )
Prototype LEEntityOcclusionMode ( entity.i, mode.i, recursive.i=0 )
Prototype LEEntityViewRange ( entity.i, range.i=#VIEWRANGE_NEAR, recursive.i=0 )
Prototype.i LEEntityCulled ( entity.i, camera.i )
Prototype LEGetEntityAABB ( entity.i, *AABB.TVec6 )
Prototype LEHideEntity ( entity.i )
Prototype LEShowEntity ( entity.i )
Prototype.i LEEntityHidden ( entity.i )
Prototype.i LEEntityExists ( entity.i )
Prototype LEEmitSound ( entity.i, sound.i, range.f=50, volume.f=10, flags.i=0 )
Prototype LEFreeEntity ( entity.i )
Prototype LEOcclusionCulling ( mode.i=1 )
Prototype.i LEFindChild ( entity.i, *name.const_str )
Prototype LEEntityShadowMode ( entity.i, mode.i=1, recursive.i=0 )
Prototype LEEntityShadowRange ( entity.i, range.f=100, recursive.i=0 )
Prototype LEDebugEntities ( mode.i=1 )
Prototype LESetEntityUserData ( entity.i, *pdata.BYTE=#Null )
Prototype.i LEGetEntityUserData ( entity.i )
Prototype LESetEntityCallback ( entity.i, *callback.BYTE, id.i=#ENTITYCALLBACK_FREE )
Prototype LESetEntityTarget ( entity.i, target.i, index.i=0 )
Prototype.i LEGetEntityTarget ( entity.i, index.i=0 )
Prototype LESendEntityMessage ( entity.i, *name.const_str, *extra.BYTE=#Null, delay.i=0 )
Prototype.i LELoadAnimation ( entity.i, *name.const_str="idle" )
Prototype.i LECountAnimations ( entity.i )
Prototype.i LEAnimationLength ( entity.i, sequence.i=0 )
Prototype LEClearAnimation ( entity.i )
;*****************************************************************************
; Pivot commands
;*****************************************************************************
Prototype.i LECreatePivot ( parent.i=#Null )
;*****************************************************************************
; Mesh commands
;*****************************************************************************
Prototype.i LECreateMesh ( parent.i=#Null )
Prototype.i LELoadMesh ( *name.const_str, parent.i=#Null )
Prototype.s LEMeshName ( mesh.i )
Prototype LEScaleMesh ( mesh.i, *scale.TVec3 )
Prototype LERotateMesh ( mesh.i, *rotation.TVec3 )
Prototype LETranslateMesh ( mesh.i, *position.TVec3 )
Prototype LEUpdateMesh ( mesh.i )
Prototype.i LECreateCube ( parent.i=#Null )
Prototype.i LECreatePlane ( parent.i=#Null )
Prototype.i LECreateSphere ( segments.i=8, parent.i=#Null )
Prototype.i LECreateCylinder ( segments.i=8, solid.i=1, parent.i=#Null )
Prototype.i LECreateCone ( segments.i=8, solid.i=1, parent.i=#Null )
Prototype.i LECreateDecal ( surface.i, *position.TVec3, radius.f, maxtris.i=0 )
Prototype LEAddMesh ( src.i, dst.i )
;*****************************************************************************
; Surface commands
;*****************************************************************************
Prototype.i LECreateSurface ( mesh.i, material.i=#Null )
Prototype.l LECountSurfaces ( mesh.i )
Prototype.i LEGetSurface ( mesh.i, index.i=1 )
Prototype.i LEFindSurface ( mesh.i, material.i=#Null )
Prototype LEPaintSurface ( surface.i, material.i=#Null )
Prototype.l LECountVertices ( surface.i )
Prototype.l LECountTriangles ( surface.i )
Prototype.l LEAddVertex ( surface.i, *position.TVec3, *normal.TVec3, *textureUV.TVec2 )
Prototype.l LEAddTriangle ( surface.i, vertex0.i, vertex1.i, vertex2.i )
Prototype LESetVertexPosition ( surface.i, vertex.i, *position.TVec3 )
Prototype LESetVertexNormal ( surface.i, vertex.i, *normal.TVec3 )
Prototype LESetVertexTexCoords ( surface.i, vertex.i, *textureUV.TVec2, texcoordset.i=0 )
Prototype LEGetVertexPosition ( surface.i, vertex.i, *position.TVec3 )
Prototype LEGetVertexNormal ( surface.i, vertex.i, *normal.TVec3 )
Prototype LEGetVertexTexCoords ( surface.i, vertex.i, *textureUV.TVec2, texcoordset.i=0 )
Prototype.l LETriangleVertex ( surface.i, triangle.i=0, corner.i=0 )
Prototype.i LEGetSurfaceMaterial ( surface.i )
Prototype LEGetVertexColor ( surface.i, vertex.i, *color.TVec4 )
Prototype LESetVertexColor ( surface.i, vertex.i, *color.TVec4 )
;*****************************************************************************
; Model commands
;*****************************************************************************
Prototype.i LELoadModel ( *name.const_str, parent.i=#Null )
Prototype LESetModelLODDistance ( model.i, distance.f=50, index.i=0 )
Prototype.s LEModelName ( model.i )
Prototype LEModelDetail ( detail.i )
Prototype.i LEGetModelDetail (  )
;*****************************************************************************
; Body commands
;*****************************************************************************
Prototype LESweptCollision ( body.i, mode.i=1 )
Prototype LEDebugPhysics ( mode.i=1 )
Prototype LESetBodyVelocity ( body.i, *velocity.TVec3, Globaly.i=1 )
Prototype LESetBodyOmega ( body.i, *omega.TVec3, Globaly.i=1 )
Prototype LEGetBodyVelocity ( body.i, *velocity.TVec3, Globaly.i=1 )
Prototype LEGetBodyOmega ( body.i, *omega.TVec3, Globaly.i=1 )
Prototype LESetBodyForce ( body.i, *force.TVec3, Globaly.i=1 )
Prototype LESetBodyTorque ( body.i, *torque.TVec3, Globaly.i=1 )
Prototype LEAddBodyForce ( body.i, *force.TVec3, Globaly.i=1 )
Prototype LEAddBodyForceAtPoint ( body.i, *force.TVec3, *position.TVec3 )
Prototype LEAddBodyTorque ( body.i, *torque.TVec3, Globaly.i=1 )
Prototype LESetBodyMassCenter ( body.i, *center.TVec3 )
Prototype LESetBodyMass ( body.i, mass.f=1 )
Prototype.f LEGetBodyMass ( body.i )
Prototype.i LELoadBody ( *name.const_str, parent.i=#Null )
Prototype.i LECreateBodyBox ( width.f=1, height.f=1, depth.f=1, parent.i=#Null )
Prototype.i LECreateBodyCylinder ( radius.f=0.5, height.f=1, parent.i=#Null )
Prototype.i LECreateBodyCone ( radius.f=0.5, height.f=1, parent.i=#Null )
Prototype.i LECreateBodySphere ( radius.f=0.5, parent.i=#Null )
Prototype.i LECreateBodyPivot ( parent.i )
Prototype.i LECreateBodyTree ( surf.i, parent.i=#Null )
Prototype.i LECreateBodyHull ( surf.i, parent.i=#Null )
Prototype LESetBodyGravityMode ( body.i, mode.i=1 )
Prototype LESetBodyStepMode ( body.i, mode.i=1 )
Prototype LESetBodyDamping ( body.i, linearDamping.f=1, angularDamping.f=1 )
Prototype LESetBodyElasticity ( body.i, elasticity.f=1 )
Prototype LESetBodySoftness ( body.i, softness.f=1 )
Prototype LESetBodyFriction ( body.i, staticfriction.f=1, kineticfriction.f=1 )
Prototype LESetWorldGravity ( *gravity.TVec3 )
Prototype LESetBodyBuoyancyMode ( body.i, mode.i=1 )
Prototype LESetFluidPlane ( *plane.TVec4, waveamplitude.f=0 )
Prototype LESetFluidDensity ( density.f=1 )
Prototype LESetFluidViscosity ( linearViscosity.f, angularViscosity.f=-1 )
Prototype LESetPhysicsQuality ( mode.i )
Prototype LECalcBodyOmega ( body.i, *rotation.TVec3, smoothing.f, *force.TVec3 )
Prototype LECalcBodyVelocity ( body.i, *position.TVec3, smoothing.f, *force.TVec3 )
;*****************************************************************************
; Collision commands
;*****************************************************************************
Prototype LECollisions ( collisionType1.i=1, collisionType2.i=1, collisionResponse.i=1 )
Prototype LEClearCollisions (  )
Prototype.i LEPointVisible ( *point1.TVec3, *point2.TVec3, radius.f=0, collisionType.i=0, *pickfilter=#Null )
Prototype.i LEEntityVisible ( entity1.i, entity2.i, radius.f=0, collisionType.i=0, *pickfilter=#Null )
Prototype.i LELinePick ( *pick.TPick, *point1.TVec3, *point2.TVec3, radius.f=0, collisionType.i=0, *pickfilter=#Null )
Prototype.i LECameraPick ( *pick.TPick, camera.i, *position.TVec3, radius.f=0, collisionType.i=0, *pickfilter=#Null )
Prototype.i LEEntityPick ( *pick.TPick, entity.i, range.f=100, radius.f=0, collisionType.i=0, *pickfilter=#Null )
Prototype LEFlipMesh ( mesh.i )
;*****************************************************************************
; Vehicle commands
;*****************************************************************************
Prototype.i LECreateVehicle ( chassis.i )
Prototype.i LEAddVehicleTire ( vehicle.i, *position.TVec3, radius.f=0.5, suspensionLength.f=0, springConstant.f=70, springDamping.f=150 )
Prototype LESetSteerAngle ( vehicle.i, angle.f=0, tire.i=-1 )
Prototype LEAddTireTorque ( vehicle.i, torque.f=0, tire.i=-1 )
Prototype LEGetTireMatrix ( vehicle.i, tire.i, *matrix.TVec16 )
;*****************************************************************************
; Joint commands
;*****************************************************************************
Prototype.i LECreateJointBall ( parent.i, child.i, *position.TVec3, *pin.TVec3 )
Prototype.i LECreateJointHinge ( parent.i, child.i, *position.TVec3, *pin.TVec3 )
Prototype.i LECreateJointSlider ( parent.i, child.i, *position.TVec3, *pin.TVec3 )
Prototype.i LECreateJointFixed ( parent.i, child.i, *position.TVec3 )
Prototype LESetJointStiffness ( joint.i, stiffness.f=1 )
Prototype LEFreeJoint ( joint.i )
Prototype LESetBallJointLimits ( joint.i, maxConeAngle.f, minTwistAngle.f=-180, maxTwistAngle.f=180 )
Prototype LESetJointCollisionMode ( joint.i, mode.i=1 )
Prototype LESetHingeJointLimits ( joint.i, minAngle.f=0, maxAngle.f=90 )
Prototype LESetSliderJointLimits ( joint.i, mindistance.f=0, maxdistance.f=1 )
;*****************************************************************************
; Controller commands
;*****************************************************************************
Prototype.i LECreateController ( height.f=1.8, radius.f=0.4, stepheight.f=0.5, maxslope.f=45, crouchheight.f=0 )
Prototype LEUpdateController ( controller.i, angle.f=0, move.f=0, strafe.f=0, jump.f=0, maxacceleration.f=0.5, iterations.i=1, crouchmode.i=0 )
Prototype.i LEControllerAirborne ( controller.i )
Prototype.i LEControllerCrouched ( controller.i )
;*****************************************************************************
; Material commands
;*****************************************************************************
Prototype.i LECreateMaterial (  )
Prototype.i LELoadMaterial ( *name.const_str )
Prototype.s LEMaterialName ( material.i )
Prototype LESetMaterialTexture ( material.i, texture.i, stage.i=0 )
Prototype.i LEGetMaterialTexture ( material.i, stage.i=0 )
Prototype LESetMaterialShader ( material.i, shader.i, shadow.i=0 )
Prototype.i LEGetMaterialShader ( material.i, shadow.i=0 )
Prototype LESetMaterialKey ( material.i, *key.const_str, *value.const_str )
Prototype.s LEGetMaterialKey ( material.i, *key.const_str )
Prototype LESetMaterialColor ( material.i, *color.TVec4 )
Prototype LESetMaterialCallback ( material.i, *callback, callbackID.i=1 )
Prototype LEFreeMaterial ( material.i )
;*****************************************************************************
; Texture commands
;*****************************************************************************
Prototype.i LECreateTexture ( width.i=1024, height.i=1024, format.i=#TEXTURE_RGBA )
Prototype.i LELoadTexture ( *name.const_str )
Prototype LEClampTexture ( texture.i, x.i=1, y.i=1, z.i=1 )
Prototype LETFilter ( mode.i=1 )
Prototype LEAFilter ( mode.i=4 )
Prototype.i LEMaxAFilter (  )
Prototype.l LETextureWidth ( texture.i )
Prototype.l LETextureHeight ( texture.i )
Prototype LETextureFilter ( texture.i, filter.i )
Prototype.s LETextureName ( texture.i )
Prototype LEBindTexture ( texture.i, texunit.i=0 )
Prototype LEFreeTexture ( texture.i )
Prototype.i LEMaxTextureUnits (  )
Prototype LESetTextureQuality ( quality.i=1 )
;*****************************************************************************
; Shader commands
;*****************************************************************************
Prototype.i LELoadShader ( *vertpath.const_str, *fragpath.const_str="", *defines.const_str="" )
Prototype LESetShader ( shader.i )
Prototype LESetShaderInt ( shader.i, *name.const_str, value.i=1 )
Prototype LESetShaderFloat ( shader.i, *name.const_str, value.f=1 )
Prototype LESetShaderVec2 ( shader.i, *name.const_str, *value.TVec2, count.i=1 )
Prototype LESetShaderVec3 ( shader.i, *name.const_str, *value.TVec3, count.i=1 )
Prototype LESetShaderVec4 ( shader.i, *name.const_str, *value.TVec4, count.i=1 )
Prototype LEFreeShader ( shader.i )
Prototype LESetShaderMat3 ( shader.i, *name.const_str, *value.TVec9, count.i=1 )
Prototype LESetShaderMat4 ( shader.i, *name.const_str, *value.TVec16, count.i=1 )
Prototype LESetShaderIntArray ( shader.i, *name.const_str, *ar.INTEGER, count.i=1 )
Prototype LESetShaderFloatArray ( shader.i, *name.const_str, *ar.FLOAT, count.i=1 )
;*****************************************************************************
; Emitter commands
;*****************************************************************************
Prototype.i LECreateEmitter ( intensity.i, lifetime.i, *velocity.TVec3, cyclemode.i=0, parent.i=#Null )
Prototype LEPauseEmitter ( emitter.i )
Prototype.i LEEmitterPaused ( emitter.i )
Prototype LEResumeEmitter ( emitter.i )
Prototype LESetEmitterVelocity ( emitter.i, *velocity.TVec3, *random.TVec3 )
Prototype LESetEmitterAcceleration ( emitter.i, *acceleration.TVec3 )
Prototype LESetEmitterRadius ( emitter.i, radius1.f=1, radius2.f=2 )
Prototype LESetEmitterArea ( emitter.i, *area.TVec3 )
Prototype LESetEmitterRotationSpeed ( emitter.i, rotationspeed.f=1 )
Prototype LESetEmitterWaver ( emitter.i, waver.f=0.1 )
;*****************************************************************************
; Input commands
;*****************************************************************************
Prototype.i LEKeyHit ( key.i=#KEY_ESCAPE )
Prototype.i LEKeyDown ( key.i=#KEY_SPACE )
Prototype.i LEMouseHit ( button.i=1 )
Prototype.i LEMouseDown ( button.i=2 )
Prototype.i LEMouseX (  )
Prototype.i LEMouseY (  )
Prototype.i LEMouseZ (  )
Prototype LEMoveMouse ( x.i, y.i )
Prototype LEHideMouse (  )
Prototype LEShowMouse (  )
Prototype.i LEGetChar (  )
;*****************************************************************************
; Sound commands
;*****************************************************************************
Prototype.i LELoadSound ( *name.const_str )
Prototype LEPlaySound ( sound.i )
Prototype.i LEEAXSupported (  )
Prototype LEEAXEffect ( effect.i=1, gain.f=1 )
Prototype LEFreeSound ( sound.i )
Prototype LEPlaySource ( source.i )
Prototype.i LECreateSource ( sound.i, flags.i=0 )
Prototype.i LEActiveSources ( sound.i=#Null )
Prototype LEPauseSource ( source.i )
Prototype LEResumeSource ( source.i )
Prototype LEStopSource ( source.i )
Prototype.i LEGetSourceState ( source.i )
Prototype LESetSourceRange ( source.i, range.f=50 )
Prototype LESetSourcePitch ( source.i, pitch.f=1 )
Prototype LESetSourceVolume ( source.i, volume.f=10 )
Prototype LESetSourcePosition ( source.i, *position.TVec3 )
Prototype LEFreeSource ( source.i )
;*****************************************************************************
; Rendering commands
;*****************************************************************************
Prototype LESceneGraphMode ( mode.i=1 )
Prototype.i LETrisRendered ( mode.i=0 )
Prototype LEDebugSceneGraph ( mode.i=1 )
Prototype LEWireframe ( mode.i=1 )
;*****************************************************************************
; Group commands
;*****************************************************************************
Prototype.i LECreateGroup ( parent.i=#Null )
Prototype LESetEntityGroup ( entity.i, group.i=#Null )
Prototype.i LEGetEntityGroup ( entity.i )
Prototype LESetGroupParent ( group.i, parent.i=#Null )
Prototype.i LEGetGroupParent ( group.i )
Prototype LEHideGroup ( group.i )
Prototype LEShowGroup ( group.i )
Prototype.i LEGroupHidden ( group.i )
;*****************************************************************************
; Listener commands
;*****************************************************************************
Prototype.i LECreateListener ( parent.i=#Null )
;*****************************************************************************
; Timing commands
;*****************************************************************************
Prototype.f LEUPS (  )
Prototype.f LEAppSpeed (  )
Prototype.f LEAppTime (  )
Prototype LEUpdateAppTime (  )
Prototype LEPauseApp (  )
Prototype LEResumeApp (  )
Prototype.i LEAppSuspended (  )
;*****************************************************************************
; Drawing commands
;*****************************************************************************
Prototype LEPlot ( x.i=0, y.i=0 )
Prototype.i LELoadFont ( *name.const_str )
Prototype LESetFont ( font.i )
Prototype LEFreeFont ( font.i )
Prototype LEDrawLine ( x1.i=0, y1.i=0, x2.i=100, y2.i=100 )
Prototype LEDrawRect ( x.i=0, y.i=0, width.i=100, height.i=100 )
Prototype LESetBlend ( blendmode.i=#BLEND_NONE )
Prototype LEDrawText ( *text.const_str, x.i, y.i )
Prototype LESetColor ( *color.TVec4 )
Prototype LEDrawImage ( texture.i, x.i=0, y.i=0, width.i=-1, height.i=-1 )
Prototype.i LETextWidth ( *text.const_str )
Prototype.i LEFontHeight (  )
;*****************************************************************************
; Transform commands
;*****************************************************************************
Prototype LETFormPoint ( *point.TVec3, src.i, dst.i )
Prototype LETFormVector ( *vector.TVec3, src.i, dst.i )
Prototype LETFormNormal ( *normal.TVec3, src.i, dst.i )
Prototype LETFormQuat ( *quaternion.TVec4, src.i, dst.i )
Prototype LETFormPlane ( *plane.TVec4, src.i, dst.i )
;*****************************************************************************
; Framework commands
;*****************************************************************************
Prototype.TFramework LECreateFramework (  )
Prototype LEFreeFramework ( *fw.TFramework )
Prototype LERenderFramework (  )
Prototype LEUpdateFramework (  )
Prototype LESetStats ( mode.i )
Prototype LESetWireframe ( mode.i=1 )
Prototype LESetZoom ( zoom.f )
Prototype LEResetFramework (  )
Prototype LESetContrast ( contrast.f )
Prototype LESetBrightness ( brightness.f )
Prototype LESetSaturation ( saturation.f )
Prototype LESetHDR ( mode.i )
Prototype LESetBackgroundMode ( mode.i )
Prototype LESetSkybox ( material.i )
Prototype LESetDistanceFog ( mode.i )
Prototype LESetDistanceFogColor ( *color.TVec4 )
Prototype LESetDistanceFogAngle ( start.f, stop.f )
Prototype LESetDistanceFogRange ( nearrange.f, farrange.f )
Prototype LESetBloom ( mode.i )
Prototype LESetBackgroundColor ( *color.TVec4 )
Prototype LESetNearDOF ( mode.i )
Prototype LESetFarDOF ( mode.i )
Prototype LESetNearDOFStrength ( strength.f )
Prototype LESetFarDOFStrength ( strength.f )
Prototype LESetNearDOFRange ( start.f, stop.f )
Prototype LESetFarDOFRange ( start.f, stop.f )
Prototype LESetGodRays ( mode.i )
Prototype LESetSSAO ( mode.i )
Prototype LESetAntialias ( mode.i )
Prototype LESetWater ( mode.i )
Prototype LESetWaterWaveSpeed ( speed.f )
Prototype LESetWaterHeight ( height.f )
Prototype LESetWaterColor ( *color.TVec4, *submersioncolor.TVec4 )
Prototype LESetWaterSoftness ( softness.f )
Prototype LESetWaterVisibility ( nearrange.f, farrange.f )
Prototype LESetWaterAmplitude ( amplitude.f )
Prototype.i LEGetFrameworkLayer ( index.i )
Prototype.i LEGetLayerWorld ( layer.i )
Prototype.i LEGetLayerCamera ( layer.i )
Prototype.i LEGetFrameworkListener (  )
Prototype LESetReflectionElements ( elements.i )
;*****************************************************************************
; Lua commands
;*****************************************************************************
Prototype.i LElua_gettop ( *luastate )
Prototype LElua_pushobject ( *luastate, *object )
Prototype LElua_pop ( *luastate, amount.i )
Prototype LElua_setglobal ( *luastate, *name.const_str )
;*****************************************************************************
; Script commands
;*****************************************************************************
Prototype LESetGlobalString ( *name.const_str, *value.const_str )
Prototype.s LEGetGlobalString ( *name.const_str )
Prototype LESetGlobalNumber ( *name.const_str, value.f )
Prototype.f LEGetGlobalNumber ( *name.const_str )
Prototype LESetGlobalObject ( *name.const_str, *object )
Prototype.i LEGetGlobalObject ( *name.const_str )
Prototype.i LEGetLuaState (  )
;*****************************************************************************
; Miscellaneous commands
;*****************************************************************************
Prototype LERegisterAbstractPath ( *path.const_str )
Prototype.s LEAbstractPath ( *path.const_str )
Prototype LESetZipStreamPassword ( *url.const_str, *password.const_str )
Prototype.i LEAppTerminate (  )
Prototype LESetAppTitle ( *title.const_str )
Prototype LEAppLog ( *text.const_str, flags.i=#APPLOG_NORMAL )
Prototype LEAppLogMode ( mode.i=1 )
Prototype.i LEGetGraphicsVendor (  )
Prototype.i LEGetShaderModel (  )

Re: Leadwerks Engine Include - noch unvollständig leider

Verfasst: 23.08.2010 10:30
von smateja
Teil 2:

Code: Alles auswählen

;*****************************************************************************
; macros declarations
;*****************************************************************************



;*****************************************************************************
;****                                                                     ****
;****                           IMPLEMENTATION                            ****
;****                                                                     ****
;*****************************************************************************

; helper functions


Procedure.s AppDir (  )
  ProcedureReturn GetPathPart( ProgramFilename() )
EndProcedure

Procedure RuntimeError ( msg.s )
  MessageRequester( "Erreur d''execution", msg, #PB_MessageRequester_Ok )
  RaiseError( #PB_OnError_Breakpoint )
EndProcedure

; return min + ((float)rand()/RAND_MAX)*(max-min);
Procedure.f Rnd( vmin.f, vmax.f )
  ProcedureReturn ( vmin + (Random(100)/100.0)*(vmax-vmin) )
EndProcedure

; float fmodf(float x, float y);
Procedure.f Fmodf (aX.f, aY.f)
  If aY = 0
    ProcedureReturn 0
  Else
    Protected floor.i
    floor = Int(aX/aY)
    If ((aX/aY)-floor) < 0
      ProcedureReturn ( aX-aY*(Floor-1) )
    Else
      ProcedureReturn ( aX-aY*Floor )
    EndIf
  EndIf
EndProcedure

; flt Curve(flt newvalue, flt oldvalue, flt increments);
Procedure.f Curve ( newvalue.f, oldvalue.f, increments.f )
  If increments > 1
    oldvalue = oldvalue-(oldvalue-newvalue)/increments
  Else
    oldvalue = newvalue
  EndIf
  ProcedureReturn oldvalue
EndProcedure

; float Clamp(float value, float min=0.0f, float max=1.0f);
Procedure.f Clamp( value.f, min.f=0.0, max.f=1.0)
  If (value<min)
    value = min
  Else
    If value > max
      value = max
    EndIf
  EndIf
  ProcedureReturn value
EndProcedure

; float PlaneDistanceToPoint(TVec4& plane, TVec3& point);
Procedure.f PlaneDistanceToPoint ( *plane.TVec4, *point.TVec3)
   ProcedureReturn ( *plane\X * *point\X + *plane\Y * *point\Y + *plane\Z * *point\Z + *plane\W )
EndProcedure

; ----------------------------------------------------------------------------

; TVec2 Vec2(flt X=0, flt Y=MAX_DEC);
Procedure.i vec2( px.f=0, py.f=#MAX_DEC )
  Protected Result.TVec2
  With Result
    \X = px
    If py=#MAX_DEC
     \Y = px 
    Else
     \Y = py 
    EndIf
  EndWith
  ProcedureReturn Result
EndProcedure

; TVec3 Vec3(flt X=0, flt Y=MAX_DEC, flt Z=MAX_DEC);
Procedure Vec3 ( px.f=0, py.f=#MAX_DEC, pz.f=#MAX_DEC )
  Protected Result.TVec3
  With Result
    \X = px
    If py=#MAX_DEC 
     \Y = px 
    Else
     \Y = py 
    EndIf
    If pz=#MAX_DEC 
     \Z = px 
    Else 
     \Z = pz 
    EndIf
  EndWith
  ProcedureReturn Result
EndProcedure

; TVec4 Vec4(flt X=0, flt Y=MAX_DEC, flt Z=MAX_DEC, flt W=MAX_DEC);
Procedure Vec4 ( px.f=0, py.f=#MAX_DEC, pz.f=#MAX_DEC, pw.f=#MAX_DEC )
  Protected Result.TVec4
  With Result
    \X = px
    If py=#MAX_DEC
     \Y = px 
    Else
     \Y = py 
    EndIf
    If pz=#MAX_DEC
     \Z = px 
    Else
     \Z = pz 
    EndIf
    If pw=#MAX_DEC
     \W = px 
    Else
     \W = pw 
    EndIf
  EndWith
  ProcedureReturn Result
EndProcedure

; TVec6 Vec6( flt X0=0, flt Y0=MAX_DEC, flt Z0=MAX_DEC,
;             flt X1=MAX_DEC, flt Y1=MAX_DEC, flt Z1=MAX_DEC);
Procedure Vec6 ( px0.f=0, py0.f=#MAX_DEC, pz0.f=#MAX_DEC, px1.f=#MAX_DEC, py1.f=#MAX_DEC, pz1.f=#MAX_DEC )
  Protected Result.TVec6
  With Result
    \X0 = px0
    If py0=#MAX_DEC
     \Y0 = px0 
    Else
     \Y0 = py0 
    EndIf
    If pz0=#MAX_DEC
     \Z0 = px0 
    Else
     \Z0 = pz0 
    EndIf
    If px1=#MAX_DEC
     \X1 = px0 
    Else
     \X1 = px1 
    EndIf
    If py1=#MAX_DEC
     \Y1 = px0 
    Else
     \Y1 = py1 
    EndIf
    If pz1=#MAX_DEC
     \Z1 = px0 
    Else
     \Z1 = pz1 
    EndIf
  EndWith
  ProcedureReturn Result
EndProcedure

; TVec9 Vec9  (flt A0=0, flt A1=MAX_DEC, flt A2=MAX_DEC,
;              flt B0=MAX_DEC, flt B1=MAX_DEC, flt B2=MAX_DEC,
;              flt C0=MAX_DEC, flt C1=MAX_DEC, flt C2=MAX_DEC);
Procedure Vec9 ( pa0.f=0, pa1.f=#MAX_DEC, pa2.f=#MAX_DEC, pb0.f=#MAX_DEC, pb1.f=#MAX_DEC, pb2.f=#MAX_DEC, pc0.f=#MAX_DEC, pc1.f=#MAX_DEC, pc2.f=#MAX_DEC )
  Protected Result.TVec9
  With Result
    \A0 = pa0
    If pa1=#MAX_DEC
     \A1 = pa0 
    Else
     \A1 = pa1 
    EndIf
    If pa2=#MAX_DEC
     \A2 = pa0 
    Else
     \A2 = pa2 
    EndIf
    If pb0=#MAX_DEC
     \B0 = pa0 
    Else
     \B0 = pb0 
    EndIf
    If pb1=#MAX_DEC
     \B1 = pa0 
    Else
     \B1 = pb1 
    EndIf
    If pb2=#MAX_DEC
     \B2 = pa0 
    Else
     \B2 = pb2 
    EndIf
    If pc0=#MAX_DEC
     \C0 = pa0 
    Else
     \C0 = pc0 
    EndIf
    If pc1=#MAX_DEC
     \C1 = pa0 
    Else
     \C1 = pc1 
    EndIf
    If pc2=#MAX_DEC
     \C2 = pa0 
    Else
     \C2 = pc2 
    EndIf
  EndWith
  ProcedureReturn Result
EndProcedure

; TVec16 Vec16(flt A0=0, flt A1=MAX_DEC, flt A2=MAX_DEC, flt A3=MAX_DEC,
;             flt B0=MAX_DEC, flt B1=MAX_DEC, flt B2=MAX_DEC, flt B3=MAX_DEC,
;             flt C0=MAX_DEC, flt C1=MAX_DEC, flt C2=MAX_DEC, flt C3=MAX_DEC,
;             flt D0=MAX_DEC, flt D1=MAX_DEC, flt D2=MAX_DEC, flt D3=MAX_DEC);
Procedure Vec16 ( pa0.f=0, pa1.f=#MAX_DEC, pa2.f=#MAX_DEC, pa3.f=#MAX_DEC, pb0.f=#MAX_DEC, pb1.f=#MAX_DEC, pb2.f=#MAX_DEC, pb3.f=#MAX_DEC, pc0.f=#MAX_DEC, pc1.f=#MAX_DEC, pc2.f=#MAX_DEC, pc3.f=#MAX_DEC, pd0.f=#MAX_DEC, pd1.f=#MAX_DEC, pd2.f=#MAX_DEC, pd3.f=#MAX_DEC )
  Protected Result.TVec16
  With Result
    \A0 = pa0
    If pa1=#MAX_DEC
     \A1 = pa0 
    Else
     \A1 = pa1 
    EndIf
    If pa2=#MAX_DEC
     \A2 = pa0 
    Else
     \A2 = pa2 
    EndIf
    If pa3=#MAX_DEC
     \A3 = pa0 
    Else
     \A3 = pa3 
    EndIf
    If pb0=#MAX_DEC
     \B0 = pa0 
    Else
     \B0 = pb0 
    EndIf
    If pb1=#MAX_DEC
     \B1 = pa0 
    Else
     \B1 = pb1 
    EndIf
    If pb2=#MAX_DEC
     \B2 = pa0 
    Else
     \B2 = pb2 
    EndIf
    If pb3=#MAX_DEC
     \B3 = pa0 
    Else
     \B3 = pb3 
    EndIf
    If pc0=#MAX_DEC
     \C0 = pa0 
    Else
     \C0 = pc0 
    EndIf
    If pc1=#MAX_DEC
     \C1 = pa0
    Else
     \C1 = pc1 
    EndIf
    If pc2=#MAX_DEC
     \C2 = pa0 
    Else
     \C2 = pc2 
    EndIf
    If pc3=#MAX_DEC
     \C3 = pa0 
    Else
     \C3 = pc3 
    EndIf
    If pd0=#MAX_DEC
     \D0 = pa0 
    Else
     \D0 = pd0 
    EndIf
    If pd1=#MAX_DEC
     \D1 = pa0 
    Else
     \D1 = pd1 
    EndIf
    If pd2=#MAX_DEC
     \D2 = pa0 
    Else
     \D2 = pd2 
    EndIf
    If pd3=#MAX_DEC
     \D3 = pa0 
    Else
     \D3 = pd3
    EndIf
  EndWith
  ProcedureReturn Result
EndProcedure

Procedure lePrint(string.s)
	Static con=#False
	
	If con=#False
		con=OpenConsole()
	EndIf
	
	If con
		PrintN(string)
	EndIf
EndProcedure

Procedure ExitFunc(lib.i,f.s)
	lePrint("ERROR: unable to find DLL function: "+f)
	CloseLibrary(lib)
	lePrint("PRESS ENTER TO EXIT.")
	Input()
EndProcedure

; ----------------------------------------------------------------------------

Global le_lib.i=#Null

Macro DoubleQuote
	"
EndMacro

Macro _leInitFunc(a)
	Global Le#a#.LE#a=GetFunction(le_lib,DoubleQuote#a#DoubleQuote)
	If Le#a=#Null
		ExitFunc(le_lib,DoubleQuote#a#DoubleQuote)
		ProcedureReturn 0
	EndIf
EndMacro

Macro _leInitAllFuncs()
	_leInitFunc(RegisterAbstractPath);
	_leInitFunc(AbstractPath);
	_leInitFunc(Graphics);
... And so on...
EndMacro

Macro _leInitialize(le_dll)
	le_lib=OpenLibrary(#PB_Any,le_dll)
	If le_lib
		_leInitAllFuncs()
	Else
		lePrint(le_dll+" can't be loaded.")
	EndIf
EndMacro

Procedure.l LeInitialize(allowenginedebug.l=1)
	Protected dllfilename.s
	
	If allowenginedebug=1
		CompilerIf #PB_Compiler_Debugger=1 
			dllfilename="engine.debug.dll"
		CompilerElse
			dllfilename="engine.dll"
		CompilerEndIf
	Else
		If allowenginedebug=2
			dllfilename="engine.debug.dll"
		Else
			dllfilename="engine.dll"
		EndIf
	EndIf
	_leInitialize(dllfilename)
	
	ProcedureReturn (#Null<>le_lib)
EndProcedure

Procedure LeTerminate()
	LeEndRender()
	CloseLibrary(le_lib)
	le_lib=#Null
EndProcedure



;*****************************************************************************
; macros code implementation
;*****************************************************************************

macros Graphics : LEGraphics : EndMacro
macros Flip : LEFlip : EndMacro
macros GraphicsWidth : LEGraphicsWidth : EndMacro
macros GraphicsHeight : LEGraphicsHeight : EndMacro
macros EndRender : LEEndRender : EndMacro
macros GraphicsModeExists : LEGraphicsModeExists : EndMacro
macros CreateBuffer : LECreateBuffer : EndMacro
macros BackBuffer : LEBackBuffer : EndMacro
macros BufferWidth : LEBufferWidth : EndMacro
macros BufferHeight : LEBufferHeight : EndMacro
macros SetBuffer : LESetBuffer : EndMacro
macros MaxColorBuffers : LEMaxColorBuffers : EndMacro
macros GetColorBuffer : LEGetColorBuffer : EndMacro
macros GetDepthBuffer : LEGetDepthBuffer : EndMacro
macros CreateCustomBuffer : LECreateCustomBuffer : EndMacro
macros SaveBuffer : LESaveBuffer : EndMacro
macros ClearBuffer : LEClearBuffer : EndMacro
macros FreeBuffer : LEFreeBuffer : EndMacro
macros CurrentBuffer : LECurrentBuffer : EndMacro
macros CopyBuffer : LECopyBuffer : EndMacro
macros SetColorBuffer : LESetColorBuffer : EndMacro
macros SetDepthBuffer : LESetDepthBuffer : EndMacro
macros CreateWorld : LECreateWorld : EndMacro
macros SetWorld : LESetWorld : EndMacro
macros SetWorldSize : LESetWorldSize : EndMacro
macros ClearWorld : LEClearWorld : EndMacro
macros FreeWorld : LEFreeWorld : EndMacro
macros CurrentWorld : LECurrentWorld : EndMacro
macros UpdateWorld : LEUpdateWorld : EndMacro
macros RenderWorld : LERenderWorld : EndMacro
macros LoadScene : LELoadScene : EndMacro
macros CreateTerrain : LECreateTerrain : EndMacro
macros SetTerrainHeight : LESetTerrainHeight : EndMacro
macros TerrainHeight : LETerrainHeight : EndMacro
macros UpdateTerrainNormals : LEUpdateTerrainNormals : EndMacro
macros SetTerrainTexture : LESetTerrainTexture : EndMacro
macros SetTerrainTextureScale : LESetTerrainTextureScale : EndMacro
macros SetTerrainTextureRotation : LESetTerrainTextureRotation : EndMacro
macros SetTerrainTextureMappingMode : LESetTerrainTextureMappingMode : EndMacro
macros TerrainElevation : LETerrainElevation : EndMacro
macros TerrainNormal : LETerrainNormal : EndMacro
macros BlendTerrainTexture : LEBlendTerrainTexture : EndMacro
macros SetTerrainTextureConstraints : LESetTerrainTextureConstraints : EndMacro
macros SetVegetationShadowMode : LESetVegetationShadowMode : EndMacro
macros LoadTerrainHeightmap : LELoadTerrainHeightmap : EndMacro
macros SaveTerrainHeightmap : LESaveTerrainHeightmap : EndMacro
macros LoadTerrainAlphamap : LELoadTerrainAlphamap : EndMacro
macros SaveTerrainAlphamap : LESaveTerrainAlphamap : EndMacro
macros TerrainDetail : LETerrainDetail : EndMacro
macros SetCameraClipPlane : LESetCameraClipPlane : EndMacro
macros CreateCamera : LECreateCamera : EndMacro
macros CameraClearMode : LECameraClearMode : EndMacro
macros CameraClearColor : LECameraClearColor : EndMacro
macros CameraRange : LECameraRange : EndMacro
macros CameraProjMode : LECameraProjMode : EndMacro
macros CameraZoom : LECameraZoom : EndMacro
macros CameraProject : LECameraProject : EndMacro
macros CameraUnproject : LECameraUnproject : EndMacro
macros CreateDirectionalLight : LECreateDirectionalLight : EndMacro
macros CreatePointLight : LECreatePointLight : EndMacro
macros CreateSpotLight : LECreateSpotLight : EndMacro
macros LightRange : LELightRange : EndMacro
macros GetLightRange : LEGetLightRange : EndMacro
macros SetShadowmapSize : LESetShadowmapSize : EndMacro
macros SetShadowOffset : LESetShadowOffset : EndMacro
macros SetShadowSoftness : LESetShadowSoftness : EndMacro
macros AmbientLight : LEAmbientLight : EndMacro
macros SetShadowQuality : LESetShadowQuality : EndMacro
macros GetShadowQuality : LEGetShadowQuality : EndMacro
macros DebugLights : LEDebugLights : EndMacro
macros LightConeAngles : LELightConeAngles : EndMacro
macros LightFalloff : LELightFalloff : EndMacro
macros RenderLights : LERenderLights : EndMacro
macros SetShadowDistance : LESetShadowDistance : EndMacro
macros CreateCorona : LECreateCorona : EndMacro
macros SetCoronaRadius : LESetCoronaRadius : EndMacro
macros ScaleEntity : LEScaleEntity : EndMacro
macros PaintEntity : LEPaintEntity : EndMacro
macros GetEntityMaterial : LEGetEntityMaterial : EndMacro
macros MoveEntity : LEMoveEntity : EndMacro
macros TurnEntity : LETurnEntity : EndMacro
macros PositionEntity : LEPositionEntity : EndMacro
macros RotateEntity : LERotateEntity : EndMacro
macros EntityRotation : LEEntityRotation : EndMacro
macros EntityPosition : LEEntityPosition : EndMacro
macros EntityDistance : LEEntityDistance : EndMacro
macros EntityScale : LEEntityScale : EndMacro
macros EntityQuat : LEEntityQuat : EndMacro
macros ForEachEntityDo : LEForEachEntityDo : EndMacro
macros ForEachEntityInAABBDo : LEForEachEntityInAABBDo : EndMacro
macros CountChildren : LECountChildren : EndMacro
macros GetChild : LEGetChild : EndMacro
macros Animate : LEAnimate : EndMacro
macros TranslateEntity : LETranslateEntity : EndMacro
macros AlignToVector : LEAlignToVector : EndMacro
macros PointEntity : LEPointEntity : EndMacro
macros EntityParent : LEEntityParent : EndMacro
macros GetParent : LEGetParent : EndMacro
macros SetEntityMatrix : LESetEntityMatrix : EndMacro
macros GetEntityMatrix : LEGetEntityMatrix : EndMacro
macros EntityOrder : LEEntityOrder : EndMacro
macros EntityColor : LEEntityColor : EndMacro
macros GetEntityColor : LEGetEntityColor : EndMacro
macros CopyEntity : LECopyEntity : EndMacro
macros CopyEntityKeys : LECopyEntityKeys : EndMacro
macros SetEntityKey : LESetEntityKey : EndMacro
macros GetEntityKey : LEGetEntityKey : EndMacro
macros EntityType : LEEntityType : EndMacro
macros GetEntityType : LEGetEntityType : EndMacro
macros EntityOcclusionMode : LEEntityOcclusionMode : EndMacro
macros EntityViewRange : LEEntityViewRange : EndMacro
macros EntityCulled : LEEntityCulled : EndMacro
macros GetEntityAABB : LEGetEntityAABB : EndMacro
macros HideEntity : LEHideEntity : EndMacro
macros ShowEntity : LEShowEntity : EndMacro
macros EntityHidden : LEEntityHidden : EndMacro
macros EntityExists : LEEntityExists : EndMacro
macros EmitSound : LEEmitSound : EndMacro
macros FreeEntity : LEFreeEntity : EndMacro
macros OcclusionCulling : LEOcclusionCulling : EndMacro
macros FindChild : LEFindChild : EndMacro
macros EntityShadowMode : LEEntityShadowMode : EndMacro
macros EntityShadowRange : LEEntityShadowRange : EndMacro
macros DebugEntities : LEDebugEntities : EndMacro
macros SetEntityUserData : LESetEntityUserData : EndMacro
macros GetEntityUserData : LEGetEntityUserData : EndMacro
macros SetEntityCallback : LESetEntityCallback : EndMacro
macros SetEntityTarget : LESetEntityTarget : EndMacro
macros GetEntityTarget : LEGetEntityTarget : EndMacro
macros SendEntityMessage : LESendEntityMessage : EndMacro
macros LoadAnimation : LELoadAnimation : EndMacro
macros CountAnimations : LECountAnimations : EndMacro
macros AnimationLength : LEAnimationLength : EndMacro
macros ClearAnimation : LEClearAnimation : EndMacro
macros CreatePivot : LECreatePivot : EndMacro
macros CreateMesh : LECreateMesh : EndMacro
macros LoadMesh : LELoadMesh : EndMacro
macros MeshName : LEMeshName : EndMacro
macros ScaleMesh : LEScaleMesh : EndMacro
macros RotateMesh : LERotateMesh : EndMacro
macros TranslateMesh : LETranslateMesh : EndMacro
macros UpdateMesh : LEUpdateMesh : EndMacro
macros CreateCube : LECreateCube : EndMacro
macros CreatePlane : LECreatePlane : EndMacro
macros CreateSphere : LECreateSphere : EndMacro
macros CreateCylinder : LECreateCylinder : EndMacro
macros CreateCone : LECreateCone : EndMacro
macros CreateDecal : LECreateDecal : EndMacro
macros AddMesh : LEAddMesh : EndMacro
macros CreateSurface : LECreateSurface : EndMacro
macros CountSurfaces : LECountSurfaces : EndMacro
macros GetSurface : LEGetSurface : EndMacro
macros FindSurface : LEFindSurface : EndMacro
macros PaintSurface : LEPaintSurface : EndMacro
macros CountVertices : LECountVertices : EndMacro
macros CountTriangles : LECountTriangles : EndMacro
macros AddVertex : LEAddVertex : EndMacro
macros AddTriangle : LEAddTriangle : EndMacro
macros SetVertexPosition : LESetVertexPosition : EndMacro
macros SetVertexNormal : LESetVertexNormal : EndMacro
macros SetVertexTexCoords : LESetVertexTexCoords : EndMacro
macros GetVertexPosition : LEGetVertexPosition : EndMacro
macros GetVertexNormal : LEGetVertexNormal : EndMacro
macros GetVertexTexCoords : LEGetVertexTexCoords : EndMacro
macros TriangleVertex : LETriangleVertex : EndMacro
macros LoadModel : LELoadModel : EndMacro
macros SetModelLODDistance : LESetModelLODDistance : EndMacro
macros ModelName : LEModelName : EndMacro
macros ModelDetail : LEModelDetail : EndMacro
macros GetModelDetail : LEGetModelDetail : EndMacro
macros SweptCollision : LESweptCollision : EndMacro
macros DebugPhysics : LEDebugPhysics : EndMacro
macros SetBodyVelocity : LESetBodyVelocity : EndMacro
macros SetBodyOmega : LESetBodyOmega : EndMacro
macros GetBodyVelocity : LEGetBodyVelocity : EndMacro
macros GetBodyOmega : LEGetBodyOmega : EndMacro
macros SetBodyForce : LESetBodyForce : EndMacro
macros SetBodyTorque : LESetBodyTorque : EndMacro
macros AddBodyForce : LEAddBodyForce : EndMacro
macros AddBodyForceAtPoint : LEAddBodyForceAtPoint : EndMacro
macros AddBodyTorque : LEAddBodyTorque : EndMacro
macros SetBodyMassCenter : LESetBodyMassCenter : EndMacro
macros SetBodyMass : LESetBodyMass : EndMacro
macros GetBodyMass : LEGetBodyMass : EndMacro
macros LoadBody : LELoadBody : EndMacro
macros CreateBodyBox : LECreateBodyBox : EndMacro
macros CreateBodyCylinder : LECreateBodyCylinder : EndMacro
macros CreateBodyCone : LECreateBodyCone : EndMacro
macros CreateBodySphere : LECreateBodySphere : EndMacro
macros CreateBodyPivot : LECreateBodyPivot : EndMacro
macros CreateBodyTree : LECreateBodyTree : EndMacro
macros CreateBodyHull : LECreateBodyHull : EndMacro
macros SetBodyGravityMode : LESetBodyGravityMode : EndMacro
macros SetBodyStepMode : LESetBodyStepMode : EndMacro
macros SetBodyDamping : LESetBodyDamping : EndMacro
macros SetBodyElasticity : LESetBodyElasticity : EndMacro
macros SetBodySoftness : LESetBodySoftness : EndMacro
macros SetBodyFriction : LESetBodyFriction : EndMacro
macros SetWorldGravity : LESetWorldGravity : EndMacro
macros SetBodyBuoyancyMode : LESetBodyBuoyancyMode : EndMacro
macros SetFluidPlane : LESetFluidPlane : EndMacro
macros SetFluidDensity : LESetFluidDensity : EndMacro
macros SetFluidViscosity : LESetFluidViscosity : EndMacro
macros SetPhysicsQuality : LESetPhysicsQuality : EndMacro
macros CalcBodyOmega : LECalcBodyOmega : EndMacro
macros CalcBodyVelocity : LECalcBodyVelocity : EndMacro
macros Collisions : LECollisions : EndMacro
macros ClearCollisions : LEClearCollisions : EndMacro
macros PointVisible : LEPointVisible : EndMacro
macros EntityVisible : LEEntityVisible : EndMacro
macros LinePick : LELinePick : EndMacro
macros CameraPick : LECameraPick : EndMacro
macros EntityPick : LEEntityPick : EndMacro
macros FlipMesh : LEFlipMesh : EndMacro
macros CreateVehicle : LECreateVehicle : EndMacro
macros AddVehicleTire : LEAddVehicleTire : EndMacro
macros SetSteerAngle : LESetSteerAngle : EndMacro
macros AddTireTorque : LEAddTireTorque : EndMacro
macros GetTireMatrix : LEGetTireMatrix : EndMacro
macros CreateJointBall : LECreateJointBall : EndMacro
macros CreateJointHinge : LECreateJointHinge : EndMacro
macros CreateJointSlider : LECreateJointSlider : EndMacro
macros CreateJointFixed : LECreateJointFixed : EndMacro
macros SetJointStiffness : LESetJointStiffness : EndMacro
macros FreeJoint : LEFreeJoint : EndMacro
macros SetBallJointLimits : LESetBallJointLimits : EndMacro
macros SetJointCollisionMode : LESetJointCollisionMode : EndMacro
macros SetHingeJointLimits : LESetHingeJointLimits : EndMacro
macros SetSliderJointLimits : LESetSliderJointLimits : EndMacro
macros CreateController : LECreateController : EndMacro
macros UpdateController : LEUpdateController : EndMacro
macros ControllerAirborne : LEControllerAirborne : EndMacro
macros ControllerCrouched : LEControllerCrouched : EndMacro
macros LoadMaterial : LELoadMaterial : EndMacro
macros MaterialName : LEMaterialName : EndMacro
macros SetMaterialTexture : LESetMaterialTexture : EndMacro
macros GetMaterialTexture : LEGetMaterialTexture : EndMacro
macros SetMaterialShader : LESetMaterialShader : EndMacro
macros GetMaterialShader : LEGetMaterialShader : EndMacro
macros SetMaterialColor : LESetMaterialColor : EndMacro
macros SetMaterialCallback : LESetMaterialCallback : EndMacro
macros SetMaterialKey : LESetMaterialKey : EndMacro
macros GetMaterialKey : LEGetMaterialKey : EndMacro
macros CreateMaterial : LECreateMaterial : EndMacro
macros FreeMaterial : LEFreeMaterial : EndMacro
macros CreateTexture : LECreateTexture : EndMacro
macros LoadTexture : LELoadTexture : EndMacro
macros SetGlobalString : LESetGlobalString : EndMacro
macros GetGlobalString : LEGetGlobalString : EndMacro
macros SetGlobalNumber : LESetGlobalNumber : EndMacro
macros GetGlobalNumber : LEGetGlobalNumber : EndMacro
macros SetGlobalObject : LESetGlobalObject : EndMacro
macros GetGlobalObject : LEGetGlobalObject : EndMacro
macros GetLuaState : LEGetLuaState : EndMacro
macros ClampTexture : LEClampTexture : EndMacro
macros TFilter : LETFilter : EndMacro
macros AFilter : LEAFilter : EndMacro
macros MaxAFilter : LEMaxAFilter : EndMacro
macros TextureWidth : LETextureWidth : EndMacro
macros TextureHeight : LETextureHeight : EndMacro
macros TextureFilter : LETextureFilter : EndMacro
macros TextureName : LETextureName : EndMacro
macros BindTexture : LEBindTexture : EndMacro
macros FreeTexture : LEFreeTexture : EndMacro
macros MaxTextureUnits : LEMaxTextureUnits : EndMacro
macros SetTextureQuality : LESetTextureQuality : EndMacro
macros LoadShader : LELoadShader : EndMacro
macros SetShader : LESetShader : EndMacro
macros SetShaderInt : LESetShaderInt : EndMacro
macros SetShaderIntArray : LESetShaderIntArray : EndMacro
macros SetShaderFloat : LESetShaderFloat : EndMacro
macros SetShaderFloatArray : LESetShaderFloatArray : EndMacro
macros SetShaderVec2 : LESetShaderVec2 : EndMacro
macros SetShaderVec3 : LESetShaderVec3 : EndMacro
macros SetShaderVec4 : LESetShaderVec4 : EndMacro
macros FreeShader : LEFreeShader : EndMacro
macros SetShaderMat3 : LESetShaderMat3 : EndMacro
macros SetShaderMat4 : LESetShaderMat4 : EndMacro
macros CreateEmitter : LECreateEmitter : EndMacro
macros PauseEmitter : LEPauseEmitter : EndMacro
macros EmitterPaused : LEEmitterPaused : EndMacro
macros ResumeEmitter : LEResumeEmitter : EndMacro
macros SetEmitterVelocity : LESetEmitterVelocity : EndMacro
macros SetEmitterAcceleration : LESetEmitterAcceleration : EndMacro
macros SetEmitterRadius : LESetEmitterRadius : EndMacro
macros SetEmitterArea : LESetEmitterArea : EndMacro
macros SetEmitterRotationSpeed : LESetEmitterRotationSpeed : EndMacro
macros SetEmitterWaver : LESetEmitterWaver : EndMacro
macros KeyHit : LEKeyHit : EndMacro
macros KeyDown : LEKeyDown : EndMacro
macros MouseHit : LEMouseHit : EndMacro
macros MouseDown : LEMouseDown : EndMacro
macros MouseX : LEMouseX : EndMacro
macros MouseY : LEMouseY : EndMacro
macros MouseZ : LEMouseZ : EndMacro
macros MoveMouse : LEMoveMouse : EndMacro
macros HideMouse : LEHideMouse : EndMacro
macros ShowMouse : LEShowMouse : EndMacro
macros LoadSound : LELoadSound : EndMacro
macros PlaySound : LEPlaySound : EndMacro
macros EAXSupported : LEEAXSupported : EndMacro
macros EAXEffect : LEEAXEffect : EndMacro
macros FreeSound : LEFreeSound : EndMacro
macros CreateSource : LECreateSource : EndMacro
macros ActiveSources : LEActiveSources : EndMacro
macros PlaySource : LEPlaySource : EndMacro
macros PauseSource : LEPauseSource : EndMacro
macros ResumeSource : LEResumeSource : EndMacro
macros StopSource : LEStopSource : EndMacro
macros GetSourceState : LEGetSourceState : EndMacro
macros SetSourceRange : LESetSourceRange : EndMacro
macros SetSourcePitch : LESetSourcePitch : EndMacro
macros SetSourceVolume : LESetSourceVolume : EndMacro
macros SetSourcePosition : LESetSourcePosition : EndMacro
macros FreeSource : LEFreeSource : EndMacro
macros SceneGraphMode : LESceneGraphMode : EndMacro
macros TrisRendered : LETrisRendered : EndMacro
macros DebugSceneGraph : LEDebugSceneGraph : EndMacro
macros Wireframe : LEWireframe : EndMacro
macros CreateGroup : LECreateGroup : EndMacro
macros SetEntityGroup : LESetEntityGroup : EndMacro
macros GetEntityGroup : LEGetEntityGroup : EndMacro
macros SetGroupParent : LESetGroupParent : EndMacro
macros GetGroupParent : LEGetGroupParent : EndMacro
macros HideGroup : LEHideGroup : EndMacro
macros ShowGroup : LEShowGroup : EndMacro
macros GroupHidden : LEGroupHidden : EndMacro
macros CreateListener : LECreateListener : EndMacro
macros UPS : LEUPS : EndMacro
macros AppSpeed : LEAppSpeed : EndMacro
macros AppTime : LEAppTime : EndMacro
macros UpdateAppTime : LEUpdateAppTime : EndMacro
macros PauseApp : LEPauseApp : EndMacro
macros ResumeApp : LEResumeApp : EndMacro
macros AppSuspended : LEAppSuspended : EndMacro
macros Plot : LEPlot : EndMacro
macros LoadFont : LELoadFont : EndMacro
macros SetFont : LESetFont : EndMacro
macros FreeFont : LEFreeFont : EndMacro
macros DrawLine : LEDrawLine : EndMacro
macros DrawRect : LEDrawRect : EndMacro
macros SetBlend : LESetBlend : EndMacro
macros DrawText : LEDrawText : EndMacro
macros SetColor : LESetColor : EndMacro
macros DrawImage : LEDrawImage : EndMacro
macros TFormPoint : LETFormPoint : EndMacro
macros TFormVector : LETFormVector : EndMacro
macros TFormNormal : LETFormNormal : EndMacro
macros TFormQuat : LETFormQuat : EndMacro
macros TFormPlane : LETFormPlane : EndMacro
macros RegisterAbstractPath : LERegisterAbstractPath : EndMacro
macros AbstractPath : LEAbstractPath : EndMacro
macros SetZipStreamPassword : LESetZipStreamPassword : EndMacro
macros AppTerminate : LEAppTerminate : EndMacro
macros SetAppTitle : LESetAppTitle : EndMacro
macros AppLog : LEAppLog : EndMacro
macros AppLogMode : LEAppLogMode : EndMacro
macros GetGraphicsVendor : LEGetGraphicsVendor : EndMacro
macros GetShaderModel : LEGetShaderModel : EndMacro
macros GetSurfaceMaterial : LEGetSurfaceMaterial : EndMacro
macros GetVertexColor : LEGetVertexColor : EndMacro
macros SetVertexColor : LESetVertexColor : EndMacro
macros GetCameraRange : LEGetCameraRange : EndMacro
macros GetChar : LEGetChar : EndMacro
macros TextWidth : LETextWidth : EndMacro
macros FontHeight : LEFontHeight : EndMacro
macros CreateFramework : LECreateFramework : EndMacro
macros FreeFramework : LEFreeFramework : EndMacro
macros RenderFramework : LERenderFramework : EndMacro
macros UpdateFramework : LEUpdateFramework : EndMacro
macros SetStats : LESetStats : EndMacro
macros SetWireframe : LESetWireframe : EndMacro
macros SetZoom : LESetZoom : EndMacro
macros ResetFramework : LEResetFramework : EndMacro
macros SetContrast : LESetContrast : EndMacro
macros SetBrightness : LESetBrightness : EndMacro
macros SetSaturation : LESetSaturation : EndMacro
macros SetHDR : LESetHDR : EndMacro
macros SetBackgroundMode : LESetBackgroundMode : EndMacro
macros SetSkybox : LESetSkybox : EndMacro
macros SetDistanceFog : LESetDistanceFog : EndMacro
macros SetDistanceFogColor : LESetDistanceFogColor : EndMacro
macros SetDistanceFogAngle : LESetDistanceFogAngle : EndMacro
macros SetDistanceFogRange : LESetDistanceFogRange : EndMacro
macros SetBloom : LESetBloom : EndMacro
macros SetBackgroundColor : LESetBackgroundColor : EndMacro
macros SetNearDOF : LESetNearDOF : EndMacro
macros SetFarDOF : LESetFarDOF : EndMacro
macros SetNearDOFStrength : LESetNearDOFStrength : EndMacro
macros SetFarDOFStrength : LESetFarDOFStrength : EndMacro
macros SetNearDOFRange : LESetNearDOFRange : EndMacro
macros SetFarDOFRange : LESetFarDOFRange : EndMacro
macros SetGodRays : LESetGodRays : EndMacro
macros SetSSAO : LESetSSAO : EndMacro
macros SetAntialias : LESetAntialias : EndMacro
macros SetWater : LESetWater : EndMacro
macros SetWaterWaveSpeed : LESetWaterWaveSpeed : EndMacro
macros SetWaterHeight : LESetWaterHeight : EndMacro
macros SetWaterColor : LESetWaterColor : EndMacro
macros SetWaterSoftness : LESetWaterSoftness : EndMacro
macros SetWaterVisibility : LESetWaterVisibility : EndMacro
macros SetWaterAmplitude : LESetWaterAmplitude : EndMacro
macros GetFrameworkLayer : LEGetFrameworkLayer : EndMacro
macros GetLayerWorld : LEGetLayerWorld : EndMacro
macros GetLayerCamera : LEGetLayerCamera : EndMacro
macros GetFrameworkListener : LEGetFrameworkListener : EndMacro
macros SetReflectionElements : LESetReflectionElements : EndMacro
macros lua_gettop : LElua_gettop : EndMacro
macros lua_pushobject : LElua_pushobject : EndMacro
macros lua_pop : LElua_pop : EndMacro
macros lua_setglobal : LElua_setglobal : EndMacro


; ----------------------------------------------------------------------------




Ich hoffe ihr könnt mir hier weiterhelfen und/oder auch den Code für euch selbst weiterbenutzen.

LG