"Another" 3d engine Xors3D (abandoned)

User projects written in or related to FreeBASIC.
jepalza
Posts: 70
Joined: Feb 24, 2010 10:08
Location: Spain (Bilbao)

"Another" 3d engine Xors3D (abandoned)

Postby jepalza » Apr 12, 2020 9:03

(note: using google translate from spanish)
This 3d engine has been abandoned for a long time. In the FB forum some thread has already been written about it, but everything has been abandoned and the links no longer work.
It is not a great library, but it does its job. I have rewritten calls to FB format from PB. I have not been able to try them all, it is something impossible to do, they are more than 1000 routines !!!!
But for a few examples it has enough to check its operation.

Because the engine has been abandoned since 2012 (?) the serial numbers required for 100% operation are easy to find.

If we do not put a serial number, the biggest drawback is the appearance of the initial logo.

The original code can be found in many places, including serial number, but since I do not know the legality of the information, it is something that everyone should look for.

The link to the required DLLs:
https://github.com/Guevara-chan/Xors3D-for-PB

(serials are very easy to look for)

Main "Xors3d.bi"

Code: Select all

#Inclib "Xors3d"

#Include "xors3d_cons.bas"
#Include "xors3d_subs.bas"

' put here you serial code !!!
xKey("xxxxx-yyyyy-zzzzz-aaaaa-bbbbb")
xSetEngineSetting("Splash::TilingTime", "0.0")
xSetEngineSetting("Splash::AfterTilingTime", "0.0")


Consts "xors3d_cons.bas"

Code: Select all

'*****************************************************************
'* jepalza conversion to FB (2020)                               *
'* Xors3d Engine header file for FB.NET, (c) 2012 XorsTeam       *
'* www:    http:// (ya no existe ) xors3d.com                    *
'* e-mail: support@ (ya no existe ) xors3d.com                   *
'*                                                               *
'*****************************************************************

   ' Log levels
   Const LOG_NO            As Integer = 5
   Const LOG_FATAL         As Integer = 4
   Const LOG_ERROR         As Integer = 3
   Const LOG_WARNING       As Integer = 2
   Const LOG_MESSAGE       As Integer = 1
   Const LOG_INFO          As Integer = 0

   ' Log targets
   Const LOG_HTML             As Integer = 1
   Const LOG_COUT             As Integer = 2
   Const LOG_STRING           As Integer = 4

   ' Skinning types
   Const SKIN_SOFTWARE As Integer = 2
   Const SKIN_HARDWARE As Integer = 1

   ' Light sources types
   Const LIGHT_DIRECTIONAL As Integer = 1
   Const LIGHT_POINT       As Integer = 2
   Const LIGHT_SPOT        As Integer = 3

   ' Texture filtering
   Const TF_NONE           As Integer = 0
   Const TF_POINT          As Integer = 1
   Const TF_LINEAR         As Integer = 2
   Const TF_ANISOTROPIC    As Integer = 3
   Const TF_ANISOTROPICX4  As Integer = 4
   Const TF_ANISOTROPICX8  As Integer = 5
   Const TF_ANISOTROPICX16 As Integer = 6

   ' PixelShader versions
   Const PS_1_1 As Integer = 0
   Const PS_1_2 As Integer = 1
   Const PS_1_3 As Integer = 2
   Const PS_1_4 As Integer = 3
   Const PS_2_0 As Integer = 4
   Const PS_3_0 As Integer = 5

   ' VertexShader versions
   Const VS_1_1 As Integer = 0
   Const VS_2_0 As Integer = 1
   Const VS_3_0 As Integer = 2

   ' Matrix semantics
   Const WORLD                         As Integer = 0
   Const WORLDVIEWPROJ                 As Integer = 1
   Const VIEWPROJ                      As Integer = 2
   Const VIEW_                         As Integer = 3 ' antes "VIEW" pero FB da error
   Const PROJ                          As Integer = 4
   Const WORLDVIEW                     As Integer = 5
   Const VIEWINVERSE                   As Integer = 6
   Const WORLDINVERSETRANSPOSE         As Integer = 15
   Const WORLDINVERSE                  As Integer = 16
   Const WORLDTRANSPOSE                As Integer = 17
   Const VIEWPROJINVERSE               As Integer = 18
   Const VIEWPROJINVERSETRANSPOSE      As Integer = 19
   Const VIEWTRANSPOSE                 As Integer = 20
   Const VIEWINVRSETRANSPOSE           As Integer = 21
   Const PROJINVERSE                   As Integer = 22
   Const PROJTRANSPOSE                 As Integer = 23
   Const PROJINVRSETRANSPOSE           As Integer = 24
   Const WORLDVIEWPROJTRANSPOSE        As Integer = 25
   Const WORLDVIEWPROJINVERSE          As Integer = 26
   Const WORLDVIEWPROJINVERSETRANSPOSE As Integer = 27
   Const WORLDVIEWTRANSPOSE            As Integer = 28
   Const WORLDVIEWINVERSE              As Integer = 29
   Const WORLDVIEWINVERSETRANSPOSE     As Integer = 30

   ' Antialiasing types
   Const AANONE      As Integer = 0
   Const AA2SAMPLES  As Integer = 1
   Const AA3SAMPLES  As Integer = 2
   Const AA4SAMPLES  As Integer = 3
   Const AA5SAMPLES  As Integer = 4
   Const AA6SAMPLES  As Integer = 5
   Const AA7SAMPLES  As Integer = 6
   Const AA8SAMPLES  As Integer = 7
   Const AA9SAMPLES  As Integer = 8
   Const AA10SAMPLES As Integer = 9
   Const AA11SAMPLES As Integer = 10
   Const AA12SAMPLES As Integer = 11
   Const AA13SAMPLES As Integer = 12
   Const AA14SAMPLES As Integer = 13
   Const AA15SAMPLES As Integer = 14
   Const AA16SAMPLES As Integer = 15

   ' Camera fog mode
   Const FOG_NONE     As Integer = 0
   Const FOG_LINEAR   As Integer = 1

   ' Camera projection mode
   Const PROJ_DISABLE      As Integer = 0
   Const PROJ_PERSPECTIVE   As Integer = 1
   Const PROJ_ORTHOGRAPHIC As Integer = 2

   ' Entity FX flags
   Const FX_NOTHING        As Integer = 0
   Const FX_FULLBRIGHT     As Integer = 1
   Const FX_VERTEXCOLOR    As Integer = 2
   Const FX_FLATSHADED     As Integer = 4
   Const FX_DISABLEFOG     As Integer = 8
   Const FX_DISABLECULLING As Integer = 16
   Const FX_NOALPHABLEND   As Integer = 32

   ' Entity blending modes
   Const BLEND_ALPHA       As Integer = 1
   Const BLEND_MULTIPLY    As Integer = 2
   Const BLEND_ADD         As Integer = 3
   Const BLEND_PUREADD     As Integer = 4

   ' Compare functions
   Const CMP_NEVER         As Integer = 1
   Const CMP_LESS          As Integer = 2
   Const CMP_EQUAL         As Integer = 3
   Const CMP_LESSEQUAL     As Integer = 4
   Const CMP_GREATER       As Integer = 5
   Const CMP_NOTEQUAL      As Integer = 6
   Const CMP_GREATEREQUAL  As Integer = 7
   Const CMP_ALWAYS        As Integer = 8

   ' Axis
   Const AXIS_X    As Integer = 1
   Const AXIS_Y    As Integer = 2
   Const AXIS_Z    As Integer = 3

   ' Texture loading flags
   Const FLAGS_COLOR             As Integer = 1
   Const FLAGS_ALPHA             As Integer = 2
   Const FLAGS_MASKED            As Integer = 4
   Const FLAGS_MIPMAPPED         As Integer = 8
   Const FLAGS_CLAMPU            As Integer = 16
   Const FLAGS_CLAMPV            As Integer = 32
   Const FLAGS_SPHERICALENVMAP   As Integer = 64
   Const FLAGS_CUBICENVMAP       As Integer = 128
   Const FLAGS_R32F              As Integer = 256
   Const FLAGS_SKIPCACHE         As Integer = 512
   Const FLAGS_VOLUMETEXTURE     As Integer = 1024
   Const FLAGS_ARBG16F           As Integer = 2048
   Const FLAGS_ARBG32F           As Integer = 4096

   ' Texture blending modes
   Const TEXBLEND_NONE          As Integer = 0
   Const TEXBLEND_ALPHA         As Integer = 1
   Const TEXBLEND_MULTIPLY      As Integer = 2
   Const TEXBLEND_ADD           As Integer = 3
   Const TEXBLEND_DOT3          As Integer = 4
   Const TEXBLEND_LIGHTMAP      As Integer = 5
   Const TEXBLEND_SEPARATEALPHA As Integer = 6

   ' Cube map faces
   Const FACE_LEFT     As Integer = 0
   Const FACE_FORWARD  As Integer = 1
   Const FACE_RIGHT    As Integer = 2
   Const FACE_BACKWARD As Integer = 3
   Const FACE_UP       As Integer = 4
   Const FACE_DOWN     As Integer = 5

   ' Entity animation types
   Const ANIMATION_STOP      As Integer = 0
   Const ANIMATION_LOOP      As Integer = 1
   Const ANIMATION_PINGPONG  As Integer = 2
   Const ANIMATION_ONE       As Integer = 3

   ' Collision types
   Const SPHERETOSPHERE  As Integer = 1
   Const SPHERETOBOX     As Integer = 3
   Const SPHERETOTRIMESH As Integer = 2

   ' Collision respones types
   Const RESPONSE_STOP             As Integer = 1
   Const RESPONSE_SLIDING          As Integer = 2
   Const RESPONSE_SLIDING_DOWNLOCK As Integer = 3

   ' Entity picking modes
   Const PICK_NONE     As Integer = 0
   Const PICK_SPHERE   As Integer = 1
   Const PICK_TRIMESH  As Integer = 2
   Const PICK_BOX      As Integer = 3

   ' Sprite view modes
   Const SPRITE_FIXED    As Integer = 1
   Const SPRITE_FREE     As Integer = 2
   Const SPRITE_FREEROLL As Integer = 3
   Const SPRITE_FIXEDYAW As Integer = 4

   ' Joystick types
   Const JOY_NONE    As Integer = 0
   Const JOY_DIGITAL As Integer = 1
   Const JOY_ANALOG  As Integer = 2

   ' Cubemap rendering modes
   Const CUBEMAP_SPECULAR   As Integer = 1
   Const CUBEMAP_DIFFUSE    As Integer = 2
   Const CUBEMAP_REFRACTION As Integer = 3

   ' Shadow's blur levels
   Const SHADOWS_BLUR_NONE As Integer = 0
   Const SHADOWS_BLUR_3    As Integer = 1
   Const SHADOWS_BLUR_5    As Integer = 2
   Const SHADOWS_BLUR_7    As Integer = 3
   Const SHADOWS_BLUR_11   As Integer = 4
   Const SHADOWS_BLUR_13   As Integer = 5

   ' primitives types
   Const PRIMITIVE_POINTLIST     As Integer = 1
   Const PRIMITIVE_LINELIST      As Integer = 2
   Const PRIMITIVE_LINESTRIP     As Integer = 3
   Const PRIMITIVE_TRIANGLELIST  As Integer = 4
   Const PRIMITIVE_TRIANGLESTRIP As Integer = 5
   Const PRIMITIVE_TRIANGLEFAN   As Integer = 6
   
   ' line separator types
   Const LS_NUL      As Integer = 0
   Const LS_CR      As Integer = 1
   Const LS_LF      As Integer = 2
   Const LS_CRLF   As Integer = 3
   
   ' physics: jotypes
   Const JOINT_POINT2POINT   As Integer = 0
   Const JOINT_6DOF         As Integer = 1
   Const JOINT_6DOFSPRING   As Integer = 2
   Const JOINT_HINGE      As Integer = 3
   
   ' physics: debug drawer modes
   Const PXDD_NO           As Integer = 0
   Const PXDD_WIREFRAME    As Integer = 1
   Const PXDD_AABB         As Integer = 2
   Const PXDD_CONTACTS     As Integer = 4
   Const PXDD_JOINTS       As Integer = 8
   Const PXDD_JOINT_LIMITS As Integer = 16
   Const PXDD_NO_AXIS      As Integer = 32

   ' physics: ray casting modes
   Const PXRC_SINGLE   As Integer = 0
   Const PXRC_MULTIPLE As Integer = 1

   ' Scancodes for keyboard and mouse
   Const MOUSE_LEFT        As Integer = 1
   Const MOUSE_RIGHT       As Integer = 2
   Const MOUSE_MIDDLE      As Integer = 3
   Const MOUSE4            As Integer = 4
   Const MOUSE5            As Integer = 5
   Const MOUSE6            As Integer = 6
   Const MOUSE7            As Integer = 7
   Const MOUSE8            As Integer = 8
   
   Const xMOUSE_LEFT       As Integer = 1
   Const xMOUSE_RIGHT      As Integer = 2
   Const xMOUSE_MIDDLE     As Integer = 3
   Const xMOUSE4           As Integer = 4
   Const xMOUSE5           As Integer = 5
   Const xMOUSE6           As Integer = 6
   Const xMOUSE7           As Integer = 7
   Const xMOUSE8           As Integer = 8
   
   Const KEY_ESCAPE        As Integer = 1
   Const KEY_1             As Integer = 2
   Const KEY_2             As Integer = 3
   Const KEY_3             As Integer = 4
   Const KEY_4             As Integer = 5
   Const KEY_5             As Integer = 6
   Const KEY_6             As Integer = 7
   Const KEY_7             As Integer = 8
   Const KEY_8             As Integer = 9
   Const KEY_9             As Integer = 10
   Const KEY_0             As Integer = 11
   Const KEY_MINUS         As Integer = 12
   Const KEY_EQUALS        As Integer = 13
   Const KEY_BACK          As Integer = 14
   Const KEY_TAB           As Integer = 15
   Const KEY_Q             As Integer = 16
   Const KEY_W             As Integer = 17
   Const KEY_E             As Integer = 18
   Const KEY_R             As Integer = 19
   Const KEY_T             As Integer = 20
   Const KEY_Y             As Integer = 21
   Const KEY_U             As Integer = 22
   Const KEY_I             As Integer = 23
   Const KEY_O             As Integer = 24
   Const KEY_P             As Integer = 25
   Const KEY_LBRACKET      As Integer = 26
   Const KEY_RBRACKET      As Integer = 27
   Const KEY_RETURN        As Integer = 28
   Const KEY_ENTER         As Integer = KEY_RETURN
   Const KEY_LCONTROL      As Integer = 29
   Const KEY_RCONTROL      As Integer = 157
   Const KEY_A             As Integer = 30
   Const KEY_S             As Integer = 31
   Const KEY_D             As Integer = 32
   Const KEY_F             As Integer = 33
   Const KEY_G             As Integer = 34
   Const KEY_H             As Integer = 35
   Const KEY_J             As Integer = 36
   Const KEY_K             As Integer = 37
   Const KEY_L             As Integer = 38
   Const KEY_SEMICOLON     As Integer = 39
   Const KEY_APOSTROPHE    As Integer = 40
   Const KEY_GRAVE         As Integer = 41
   Const KEY_LSHIFT        As Integer = 42
   Const KEY_BACKSLASH     As Integer = 43
   Const KEY_Z             As Integer = 44
   Const KEY_X             As Integer = 45
   Const KEY_C             As Integer = 46
   Const KEY_V             As Integer = 47
   Const KEY_B             As Integer = 48
   Const KEY_N             As Integer = 49
   Const KEY_M             As Integer = 50
   Const KEY_COMMA         As Integer = 51
   Const KEY_PERIOD        As Integer = 52
   Const KEY_SLASH         As Integer = 53
   Const KEY_RSHIFT        As Integer = 54
   Const KEY_MULTIPLY      As Integer = 55
   Const KEY_MENU          As Integer = 56
   Const KEY_SPACE         As Integer = 57
   Const KEY_F1            As Integer = 59
   Const KEY_F2            As Integer = 60
   Const KEY_F3            As Integer = 61
   Const KEY_F4            As Integer = 62
   Const KEY_F5            As Integer = 63
   Const KEY_F6            As Integer = 64
   Const KEY_F7            As Integer = 65
   Const KEY_F8            As Integer = 66
   Const KEY_F9            As Integer = 67
   Const KEY_F10           As Integer = 68
   Const KEY_NUMLOCK       As Integer = 69
   Const KEY_SCROLL        As Integer = 70
   Const KEY_NUMPAD7       As Integer = 71
   Const KEY_NUMPAD8       As Integer = 72
   Const KEY_NUMPAD9       As Integer = 73
   Const KEY_SUBTRACT      As Integer = 74
   Const KEY_NUMPAD4       As Integer = 75
   Const KEY_NUMPAD5       As Integer = 76
   Const KEY_NUMPAD6       As Integer = 77
   Const KEY_ADD           As Integer = 78
   Const KEY_NUMPAD1       As Integer = 79
   Const KEY_NUMPAD2       As Integer = 80
   Const KEY_NUMPAD3       As Integer = 81
   Const KEY_NUMPAD0       As Integer = 82
   Const KEY_DECIMAL       As Integer = 83
   Const KEY_TILD          As Integer = 86
   Const KEY_F11           As Integer = 87
   Const KEY_F12           As Integer = 88
   Const KEY_NUMPADENTER   As Integer = 156
   Const KEY_RMENU         As Integer = 221
   Const KEY_PAUSE         As Integer = 197
   Const KEY_HOME          As Integer = 199
   Const KEY_UP            As Integer = 200
   Const KEY_PRIOR         As Integer = 201
   Const KEY_LEFT          As Integer = 203
   Const KEY_RIGHT         As Integer = 205
   Const KEY_END           As Integer = 207
   Const KEY_DOWN          As Integer = 208
   Const KEY_NEXT          As Integer = 209
   Const KEY_INSERT        As Integer = 210
   Const KEY_DELETE        As Integer = 211
   Const KEY_LWIN          As Integer = 219
   Const KEY_RWIN          As Integer = 220
   Const KEY_BACKSPACE     As Integer = KEY_BACK
   Const KEY_NUMPADSTAR    As Integer = KEY_MULTIPLY
   Const KEY_LALT          As Integer = 184
   Const KEY_CAPSLOCK      As Integer = 58
   Const KEY_NUMPADMINUS   As Integer = KEY_SUBTRACT
   Const KEY_NUMPADPLUS    As Integer = KEY_ADD
   Const KEY_NUMPADPERIOD  As Integer = KEY_DECIMAL
   Const KEY_DIVIDE        As Integer = 181
   Const KEY_NUMPADSLASH   As Integer = KEY_DIVIDE
   Const KEY_RALT          As Integer = 56
   Const KEY_UPARROW       As Integer = KEY_UP
   Const KEY_PGUP          As Integer = KEY_PRIOR
   Const KEY_LEFTARROW     As Integer = KEY_LEFT
   Const KEY_RIGHTARROW    As Integer = KEY_RIGHT
   Const KEY_DOWNARROW     As Integer = KEY_DOWN
   Const KEY_PGDN          As Integer = KEY_NEXT
   
   Const xKEY_ESCAPE       As Integer = 1
   Const xKEY_1            As Integer = 2
   Const xKEY_2            As Integer = 3
   Const xKEY_3            As Integer = 4
   Const xKEY_4            As Integer = 5
   Const xKEY_5            As Integer = 6
   Const xKEY_6            As Integer = 7
   Const xKEY_7            As Integer = 8
   Const xKEY_8            As Integer = 9
   Const xKEY_9            As Integer = 10
   Const xKEY_0            As Integer = 11
   Const xKEY_MINUS        As Integer = 12
   Const xKEY_EQUALS       As Integer = 13
   Const xKEY_BACK         As Integer = 14
   Const xKEY_TAB          As Integer = 15
   Const xKEY_Q            As Integer = 16
   Const xKEY_W            As Integer = 17
   Const xKEY_E            As Integer = 18
   Const xKEY_R            As Integer = 19
   Const xKEY_T            As Integer = 20
   Const xKEY_Y            As Integer = 21
   Const xKEY_U            As Integer = 22
   Const xKEY_I            As Integer = 23
   Const xKEY_O            As Integer = 24
   Const xKEY_P            As Integer = 25
   Const xKEY_LBRACKET     As Integer = 26
   Const xKEY_RBRACKET     As Integer = 27
   Const xKEY_RETURN       As Integer = 28
   Const xKEY_ENTER        As Integer = KEY_RETURN
   Const xKEY_LCONTROL     As Integer = 29
   Const xKEY_RCONTROL     As Integer = 157
   Const xKEY_A            As Integer = 30
   Const xKEY_S            As Integer = 31
   Const xKEY_D            As Integer = 32
   Const xKEY_F            As Integer = 33
   Const xKEY_G            As Integer = 34
   Const xKEY_H            As Integer = 35
   Const xKEY_J            As Integer = 36
   Const xKEY_K            As Integer = 37
   Const xKEY_L            As Integer = 38
   Const xKEY_SEMICOLON    As Integer = 39
   Const xKEY_APOSTROPHE   As Integer = 40
   Const xKEY_GRAVE        As Integer = 41
   Const xKEY_LSHIFT       As Integer = 42
   Const xKEY_BACKSLASH    As Integer = 43
   Const xKEY_Z            As Integer = 44
   Const xKEY_X            As Integer = 45
   Const xKEY_C            As Integer = 46
   Const xKEY_V            As Integer = 47
   Const xKEY_B            As Integer = 48
   Const xKEY_N            As Integer = 49
   Const xKEY_M            As Integer = 50
   Const xKEY_COMMA        As Integer = 51
   Const xKEY_PERIOD       As Integer = 52
   Const xKEY_SLASH        As Integer = 53
   Const xKEY_RSHIFT       As Integer = 54
   Const xKEY_MULTIPLY     As Integer = 55
   Const xKEY_MENU         As Integer = 56
   Const xKEY_SPACE        As Integer = 57
   Const xKEY_F1           As Integer = 59
   Const xKEY_F2           As Integer = 60
   Const xKEY_F3           As Integer = 61
   Const xKEY_F4           As Integer = 62
   Const xKEY_F5           As Integer = 63
   Const xKEY_F6           As Integer = 64
   Const xKEY_F7           As Integer = 65
   Const xKEY_F8           As Integer = 66
   Const xKEY_F9           As Integer = 67
   Const xKEY_F10          As Integer = 68
   Const xKEY_NUMLOCK      As Integer = 69
   Const xKEY_SCROLL       As Integer = 70
   Const xKEY_NUMPAD7      As Integer = 71
   Const xKEY_NUMPAD8      As Integer = 72
   Const xKEY_NUMPAD9      As Integer = 73
   Const xKEY_SUBTRACT     As Integer = 74
   Const xKEY_NUMPAD4      As Integer = 75
   Const xKEY_NUMPAD5      As Integer = 76
   Const xKEY_NUMPAD6      As Integer = 77
   Const xKEY_ADD          As Integer = 78
   Const xKEY_NUMPAD1      As Integer = 79
   Const xKEY_NUMPAD2      As Integer = 80
   Const xKEY_NUMPAD3      As Integer = 81
   Const xKEY_NUMPAD0      As Integer = 82
   Const xKEY_DECIMAL      As Integer = 83
   Const xKEY_TILD         As Integer = 86
   Const xKEY_F11          As Integer = 87
   Const xKEY_F12          As Integer = 88
   Const xKEY_NUMPADENTER  As Integer = 156
   Const xKEY_RMENU        As Integer = 221
   Const xKEY_PAUSE        As Integer = 197
   Const xKEY_HOME         As Integer = 199
   Const xKEY_UP           As Integer = 200
   Const xKEY_PRIOR        As Integer = 201
   Const xKEY_LEFT         As Integer = 203
   Const xKEY_RIGHT        As Integer = 205
   Const xKEY_END          As Integer = 207
   Const xKEY_DOWN         As Integer = 208
   Const xKEY_NEXT         As Integer = 209
   Const xKEY_INSERT       As Integer = 210
   Const xKEY_DELETE       As Integer = 211
   Const xKEY_LWIN         As Integer = 219
   Const xKEY_RWIN         As Integer = 220
   Const xKEY_BACKSPACE    As Integer = KEY_BACK
   Const xKEY_NUMPADSTAR   As Integer = KEY_MULTIPLY
   Const xKEY_LALT         As Integer = 184
   Const xKEY_CAPSLOCK     As Integer = 58
   Const xKEY_NUMPADMINUS  As Integer = KEY_SUBTRACT
   Const xKEY_NUMPADPLUS   As Integer = KEY_ADD
   Const xKEY_NUMPADPERIOD As Integer = KEY_DECIMAL
   Const xKEY_DIVIDE       As Integer = 181
   Const xKEY_NUMPADSLASH  As Integer = KEY_DIVIDE
   Const xKEY_RALT         As Integer = 56
   Const xKEY_UPARROW      As Integer = KEY_UP
   Const xKEY_PGUP         As Integer = KEY_PRIOR
   Const xKEY_LEFTARROW    As Integer = KEY_LEFT
   Const xKEY_RIGHTARROW   As Integer = KEY_RIGHT
   Const xKEY_DOWNARROW    As Integer = KEY_DOWN
   Const xKEY_PGDN         As Integer = KEY_NEXT



Consts "sample.bas"

Code: Select all

#Include "Xors3d.bi"

   
   xGraphics3D(800, 600, 32, FALSE, TRUE)
   
   Dim As Integer camera = xCreateCamera()
   Dim As Integer light = xCreateLight()
   Dim As Integer cube = xCreateCube()
   
   xPositionEntity(cube, 0.0, 0.0, 10.0)
   
   While 1
           xTurnEntity(cube, 0.1, 0.1, 0.1)
           xRenderWorld()
           xText(10, 10, "Hello 3D World!")
           xText(10, 30, "FPS: " + Str( xGetFPS() ) )
           xFlip()
           If xWinMessage("WM_CLOSE") Then Exit While
   Wend
Last edited by jepalza on Apr 12, 2020 9:12, edited 1 time in total.
jepalza
Posts: 70
Joined: Feb 24, 2010 10:08
Location: Spain (Bilbao)

Re: "Another" 3d engine Xors3D (abandoned)

Postby jepalza » Apr 12, 2020 9:07

Main subs file is very BIG!!! about 1000 lines.
It's necessary to cut in three parts

Consts "xors3d_subs.bas" part 1

Code: Select all

  Declare Function xCreateLine3D StdCall Alias "_xCreateLine3D" (ByVal fromX As Single, ByVal fromY As Single, ByVal fromZ As Single, ByVal toX As Single, ByVal toY As Single, ByVal toZ As Single, ByVal red As Integer = 255, ByVal green As Integer = 255, ByVal blue As Integer = 255, ByVal alpha2 As Integer = 255, ByVal useZBuffer As Integer = 1) As Integer
  Declare Sub      xLine3DOrigin StdCall Alias "_xLine3DOrigin" (ByVal line3d As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal isGlobal As Integer = 0)
  Declare Sub      xLine3DAddNode StdCall Alias "_xLine3DAddNode" (ByVal line3d As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal isGlobal As Integer = 0)
  Declare Sub      xLine3DColor StdCall Alias "_xLine3DColor" (ByVal line3d As Integer, ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer, ByVal alpha2 As Integer)
  Declare Sub      xLine3DUseZBuffer StdCall Alias "_xLine3DUseZBuffer" (ByVal line3d As Integer, ByVal state As Integer)
  Declare Function xLine3DOriginX StdCall Alias "_xLine3DOriginX" (ByVal line3d As Integer, ByVal isGlobal As Integer = 0) As Single
  Declare Function xLine3DOriginY StdCall Alias "_xLine3DOriginY" (ByVal line3d As Integer, ByVal isGlobal As Integer = 0) As Single
  Declare Function xLine3DOriginZ StdCall Alias "_xLine3DOriginZ" (ByVal line3d As Integer, ByVal isGlobal As Integer = 0) As Single
  Declare Function xLine3DNodesCount StdCall Alias "_xLine3DNodesCount" (ByVal line3d As Integer) As Integer
  Declare Sub      xLine3DNodePosition StdCall Alias "_xLine3DNodePosition" (ByVal line3d As Integer, ByVal index As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal isGlobal As Integer = 0)
  Declare Function xLine3DNodeX StdCall Alias "_xLine3DNodeX" (ByVal line3d As Integer, ByVal index As Integer, ByVal isGlobal As Integer = 0) As Single
  Declare Function xLine3DNodeY StdCall Alias "_xLine3DNodeY" (ByVal line3d As Integer, ByVal index As Integer, ByVal isGlobal As Integer = 0) As Single
  Declare Function xLine3DNodeZ StdCall Alias "_xLine3DNodeZ" (ByVal line3d As Integer, ByVal index As Integer, ByVal isGlobal As Integer = 0) As Single
  Declare Function xLine3DRed StdCall Alias "_xLine3DRed" (ByVal line3d As Integer) As Integer
  Declare Function xLine3DGreen StdCall Alias "_xLine3DGreen" (ByVal line3d As Integer) As Integer
  Declare Function xLine3DBlue StdCall Alias "_xLine3DBlue" (ByVal line3d As Integer) As Integer
  Declare Function xLine3DAlpha StdCall Alias "_xLine3DAlpha" (ByVal line3d As Integer) As Integer
  Declare Function xGetLine3DUseZBuffer StdCall Alias "_xGetLine3DUseZBuffer" (ByVal line3d As Integer) As Integer
  Declare Sub      xDeleteLine3DNode StdCall Alias "_xDeleteLine3DNode" (ByVal line3d As Integer, ByVal index As Integer)
  Declare Sub      xClearLine3D StdCall Alias "_xClearLine3D" (ByVal line3d As Integer)
  Declare Function xLoadBrush StdCall Alias "_xLoadBrush" (ByVal path As Zstring ptr, ByVal flags As Integer = 9, ByVal xScale As Single = 1.0, ByVal yScale As Single = 1.0) As Integer
  Declare Function xCreateBrush StdCall Alias "_xCreateBrush" (ByVal red As Single = 255.0, ByVal green As Single = 255.0, ByVal blue As Single = 255.0) As Integer
  Declare Sub      xFreeBrush StdCall Alias "_xFreeBrush" (ByVal brush As Integer)
  Declare Function xGetBrushTexture StdCall Alias "_xGetBrushTexture" (ByVal brush As Integer, ByVal index As Integer = 0) As Integer
  Declare Sub      xBrushColor StdCall Alias "_xBrushColor" (ByVal brush As Integer, ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer)
  Declare Sub      xBrushAlpha StdCall Alias "_xBrushAlpha" (ByVal brush As Integer, ByVal alpha2 As Single)
  Declare Sub      xBrushShininess StdCall Alias "_xBrushShininess" (ByVal brush As Integer, ByVal shininess As Single)
  Declare Sub      xBrushBlend StdCall Alias "_xBrushBlend" (ByVal brush As Integer, ByVal blend As Integer)
  Declare Sub      xBrushFX StdCall Alias "_xBrushFX" (ByVal brush As Integer, ByVal FX As Integer)
  Declare Sub      xBrushTexture StdCall Alias "_xBrushTexture" (ByVal brush As Integer, ByVal texture As Integer, ByVal frame As Integer = 0, ByVal index As Integer = 0)
  Declare Function xGetBrushName StdCall Alias "_xGetBrushName" (ByVal brush As Integer) As Zstring ptr
  Declare Sub      xBrushName StdCall Alias "_xBrushName" (ByVal brush As Integer, ByVal nombre As Zstring ptr)
  Declare Function xGetBrushAlpha StdCall Alias "_xGetBrushAlpha" (ByVal brush As Integer) As Single
  Declare Function xGetBrushBlend StdCall Alias "_xGetBrushBlend" (ByVal brush As Integer) As Integer
  Declare Function xGetBrushRed StdCall Alias "_xGetBrushRed" (ByVal brush As Integer) As Integer
  Declare Function xGetBrushGreen StdCall Alias "_xGetBrushGreen" (ByVal brush As Integer) As Integer
  Declare Function xGetBrushBlue StdCall Alias "_xGetBrushBlue" (ByVal brush As Integer) As Integer
  Declare Function xGetBrushFX StdCall Alias "_xGetBrushFX" (ByVal brush As Integer) As Integer
  Declare Function xGetBrushShininess StdCall Alias "_xGetBrushShininess" (ByVal brush As Integer) As Single
  Declare Sub      xCameraFogMode StdCall Alias "_xCameraFogMode" (ByVal camera As Integer, ByVal mode As Integer)
  Declare Sub      xCameraFogColor StdCall Alias "_xCameraFogColor" (ByVal camera As Integer, ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer)
  Declare Sub      xCameraFogRange StdCall Alias "_xCameraFogRange" (ByVal camera As Integer, ByVal nearRange As Single, ByVal farRange As Single)
  Declare Sub      xCameraClsColor StdCall Alias "_xCameraClsColor" (ByVal camera As Integer, ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer, ByVal alpha2 As Integer = 255)
  Declare Sub      xCameraProjMode StdCall Alias "_xCameraProjMode" (ByVal camera As Integer, ByVal mode As Integer)
  Declare Sub      xCameraClsMode StdCall Alias "_xCameraClsMode" (ByVal camera As Integer, ByVal clearColor As Integer, ByVal clearZBuffer As Integer)
  Declare Function xSphereInFrustum StdCall Alias "_xSphereInFrustum" (ByVal camera As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal radii As Single) As Integer
  Declare Sub      xCameraClipPlane StdCall Alias "_xCameraClipPlane" (ByVal camera As Integer, ByVal index As Integer, ByVal enabled As Integer, ByVal a As Single, ByVal b As Single, ByVal c As Single, ByVal d As Single)
  Declare Sub      xCameraRange StdCall Alias "_xCameraRange" (ByVal camera As Integer, ByVal nearRange As Single, ByVal farRange As Single)
  Declare Sub      xCameraViewport StdCall Alias "_xCameraViewport" (ByVal camera As Integer, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer)
  Declare Sub      xCameraCropViewport StdCall Alias "_xCameraCropViewport" (ByVal camera As Integer, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer)
  Declare Function xCreateCamera StdCall Alias "_xCreateCamera" (ByVal parent As Integer = 0) As Integer
  Declare Sub      xCameraProject StdCall Alias "_xCameraProject" (ByVal camera As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Sub      xCameraProject2D StdCall Alias "_xCameraProject2D" (ByVal camera As Integer, ByVal x As Integer, ByVal y As Integer, ByVal zDistance As Single)
  Declare Function xProjectedX StdCall Alias "_xProjectedX" () As Single
  Declare Function xProjectedY StdCall Alias "_xProjectedY" () As Single
  Declare Function xProjectedZ StdCall Alias "_xProjectedZ" () As Single
  Declare Function xGetViewMatrix StdCall Alias "_xGetViewMatrix" (ByVal camera As Integer) As Integer
  Declare Function xGetProjectionMatrix StdCall Alias "_xGetProjectionMatrix" (ByVal camera As Integer) As Integer
  Declare Sub      xCameraZoom StdCall Alias "_xCameraZoom" (ByVal camera As Integer, ByVal zoom As Single)
  Declare Function xGetViewProjMatrix StdCall Alias "_xGetViewProjMatrix" (ByVal camera As Integer) As Integer
  Declare Sub      xCollisions StdCall Alias "_xCollisions" (ByVal srcType As Integer, ByVal destType As Integer, ByVal collideMethod As Integer, ByVal response As Integer)
  Declare Sub      xClearCollisions StdCall Alias "_xClearCollisions" ()
  Declare Sub      xResetEntity StdCall Alias "_xResetEntity" (ByVal entity As Integer)
  Declare Sub      xEntityRadius StdCall Alias "_xEntityRadius" (ByVal entity As Integer, ByVal xRadius As Single, ByVal yRadius As Single = 0.0)
  Declare Sub      xEntityBox StdCall Alias "_xEntityBox" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal width As Single, ByVal height As Single, ByVal depth As Single)
  Declare Sub      xEntityType StdCall Alias "_xEntityType" (ByVal entity As Integer, ByVal typeID As Integer, ByVal recurse As Integer = 0)
  Declare Function xEntityCollided StdCall Alias "_xEntityCollided" (ByVal entity As Integer, ByVal typeID As Integer) As Integer
  Declare Function xCountCollisions StdCall Alias "_xCountCollisions" (ByVal entity As Integer) As Integer
  Declare Function xCollisionX StdCall Alias "_xCollisionX" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xCollisionY StdCall Alias "_xCollisionY" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xCollisionZ StdCall Alias "_xCollisionZ" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xCollisionNX StdCall Alias "_xCollisionNX" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xCollisionNY StdCall Alias "_xCollisionNY" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xCollisionNZ StdCall Alias "_xCollisionNZ" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xCollisionTime StdCall Alias "_xCollisionTime" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xCollisionEntity StdCall Alias "_xCollisionEntity" (ByVal entity As Integer, ByVal index As Integer) As Integer
  Declare Function xCollisionSurface StdCall Alias "_xCollisionSurface" (ByVal entity As Integer, ByVal index As Integer) As Integer
  Declare Function xCollisionTriangle StdCall Alias "_xCollisionTriangle" (ByVal entity As Integer, ByVal index As Integer) As Integer
  Declare Function xGetEntityType StdCall Alias "_xGetEntityType" (ByVal entity As Integer) As Integer
  Declare Sub      xRenderPostEffect StdCall Alias "_xRenderPostEffect" (ByVal poly As Integer)
  Declare Function xCreatePostEffectPoly StdCall Alias "_xCreatePostEffectPoly" (ByVal camera As Integer, ByVal mode As Integer) As Integer
  Declare Function xGetFunctionAddress StdCall Alias "_xGetFunctionAddress" (ByVal nombre As Zstring ptr) As Integer
  Declare Function xLoadFXFile StdCall Alias "_xLoadFXFile" (ByVal path As Zstring ptr) As Integer
  Declare Sub      xFreeEffect StdCall Alias "_xFreeEffect" (ByVal effect As Integer)
  Declare Sub      xSetEntityEffect StdCall Alias "_xSetEntityEffect" (ByVal entity As Integer, ByVal effect As Integer, ByVal index As Integer = -1)
  Declare Sub      xSetSurfaceEffect StdCall Alias "_xSetSurfaceEffect" (ByVal surface As Integer, ByVal effect As Integer, ByVal index As Integer = -1)
  Declare Sub      xSetBonesArrayName StdCall Alias "_xSetBonesArrayName" (ByVal entity As Integer, ByVal arrayName As Zstring ptr, ByVal layer As Integer = -1)
  Declare Sub      xSurfaceBonesArrayName StdCall Alias "_xSurfaceBonesArrayName" (ByVal surface As Integer, ByVal arrayName As Zstring ptr, ByVal layer As Integer = -1)
  Declare Sub      xSetEffectInt StdCall Alias "_xSetEffectInt" (ByVal entity As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer, ByVal layer As Integer = -1)
  Declare Sub      xSurfaceEffectInt StdCall Alias "_xSurfaceEffectInt" (ByVal surface As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer, ByVal layer As Integer = -1)
  Declare Sub      xSetEffectFloat StdCall Alias "_xSetEffectFloat" (ByVal entity As Integer, ByVal nombre As Zstring ptr, ByVal value As Single, ByVal layer As Integer = -1)
  Declare Sub      xSurfaceEffectFloat StdCall Alias "_xSurfaceEffectFloat" (ByVal surface As Integer, ByVal nombre As Zstring ptr, ByVal value As Single, ByVal layer As Integer = -1)
  Declare Sub      xSetEffectBool StdCall Alias "_xSetEffectBool" (ByVal entity As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer, ByVal layer As Integer = -1)
  Declare Sub      xSurfaceEffectBool StdCall Alias "_xSurfaceEffectBool" (ByVal surface As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer, ByVal layer As Integer = -1)
  Declare Sub      xSetEffectVector StdCall Alias "_xSetEffectVector" (ByVal entity As Integer, ByVal nombre As Zstring ptr, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal w As Single = 0.0, ByVal layer As Integer = -1)
  Declare Sub      xSurfaceEffectVector StdCall Alias "_xSurfaceEffectVector" (ByVal surface As Integer, ByVal nombre As Zstring ptr, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal w As Single = 0.0, ByVal layer As Integer = -1)
  Declare Sub      xSetEffectVectorArray StdCall Alias "_xSetEffectVectorArray" (ByVal entity As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer, ByVal count As Integer, ByVal layer As Integer = -1)
  Declare Sub      xSurfaceEffectVectorArray StdCall Alias "_xSurfaceEffectVectorArray" (ByVal surface As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer, ByVal count As Integer, ByVal layer As Integer = -1)
  Declare Sub      xSurfaceEffectMatrixArray StdCall Alias "_xSurfaceEffectMatrixArray" (ByVal surface As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer, ByVal count As Integer, ByVal layer As Integer = -1)
  Declare Sub      xSurfaceEffectFloatArray StdCall Alias "_xSurfaceEffectFloatArray" (ByVal surface As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer, ByVal count As Integer, ByVal layer As Integer = -1)
  Declare Sub      xSurfaceEffectIntArray StdCall Alias "_xSurfaceEffectIntArray" (ByVal surface As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer, ByVal count As Integer, ByVal layer As Integer = -1)
  Declare Sub      xSetEffectMatrixArray StdCall Alias "_xSetEffectMatrixArray" (ByVal entity As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer, ByVal count As Integer, ByVal layer As Integer = -1)
  Declare Sub      xSetEffectFloatArray StdCall Alias "_xSetEffectFloatArray" (ByVal entity As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer, ByVal count As Integer, ByVal layer As Integer = -1)
  Declare Sub      xSetEffectIntArray StdCall Alias "_xSetEffectIntArray" (ByVal entity As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer, ByVal count As Integer, ByVal layer As Integer = -1)
  Declare Function xCreateBufferVectors StdCall Alias "_xCreateBufferVectors" (ByVal count As Integer) As Integer
  Declare Sub      xBufferVectorsSetElement StdCall Alias "_xBufferVectorsSetElement" (ByVal buffer As Integer, ByVal number As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal w As Single)
  Declare Function xCreateBufferMatrix StdCall Alias "_xCreateBufferMatrix" (ByVal count As Integer) As Integer
  Declare Sub      xBufferMatrixSetElement StdCall Alias "_xBufferMatrixSetElement" (ByVal buffer As Integer, ByVal number As Integer, ByVal matrix As Integer)
  Declare Function xBufferMatrixGetElement StdCall Alias "_xBufferMatrixGetElement" (ByVal buffer As Integer, ByVal number As Integer) As Integer
  Declare Function xCreateBufferFloats StdCall Alias "_xCreateBufferFloats" (ByVal count As Integer) As Integer
  Declare Sub      xBufferFloatsSetElement StdCall Alias "_xBufferFloatsSetElement" (ByVal buffer As Integer, ByVal number As Integer, ByVal value As Single)
  Declare Function xBufferFloatsGetElement StdCall Alias "_xBufferFloatsGetElement" (ByVal buffer As Integer, ByVal number As Integer) As Single
  Declare Sub      xBufferDelete StdCall Alias "_xBufferDelete" (ByVal buffer As Integer)
  Declare Sub      xSetEffectMatrixWithElements StdCall Alias "_xSetEffectMatrixWithElements" (ByVal entity As Integer, ByVal nombre As Zstring ptr, ByVal m11 As Single, ByVal m12 As Single, ByVal m13 As Single, ByVal m14 As Single, ByVal m21 As Single, ByVal m22 As Single, ByVal m23 As Single, ByVal m24 As Single, ByVal m31 As Single, ByVal m32 As Single, ByVal m33 As Single, ByVal m34 As Single, ByVal m41 As Single, ByVal m42 As Single, ByVal m43 As Single, ByVal m44 As Single, ByVal layer As Integer = -1)
  Declare Sub      xSetEffectMatrix StdCall Alias "_xSetEffectMatrix" (ByVal entity As Integer, ByVal nombre As Zstring ptr, ByVal matrix As Integer, ByVal layer As Integer = -1)
  Declare Sub      xSurfaceEffectMatrix StdCall Alias "_xSurfaceEffectMatrix" (ByVal surface As Integer, ByVal nombre As Zstring ptr, ByVal matrix As Integer, ByVal layer As Integer = -1)
  Declare Sub      xSurfaceEffectMatrixWithElements StdCall Alias "_xSurfaceEffectMatrixWithElements" (ByVal surface As Integer, ByVal nombre As Zstring ptr, ByVal m11 As Single, ByVal m12 As Single, ByVal m13 As Single, ByVal m14 As Single, ByVal m21 As Single, ByVal m22 As Single, ByVal m23 As Single, ByVal m24 As Single, ByVal m31 As Single, ByVal m32 As Single, ByVal m33 As Single, ByVal m34 As Single, ByVal m41 As Single, ByVal m42 As Single, ByVal m43 As Single, ByVal m44 As Single, ByVal layer As Integer = -1)
  Declare Sub      xSetEffectEntityTexture StdCall Alias "_xSetEffectEntityTexture" (ByVal entity As Integer, ByVal nombre As Zstring ptr, ByVal index As Integer = 0, ByVal layer As Integer = -1)
  Declare Sub      xSetEffectTexture StdCall Alias "_xSetEffectTexture" (ByVal entity As Integer, ByVal nombre As Zstring ptr, ByVal texture As Integer, ByVal frame As Integer = 0, ByVal layer As Integer = -1, ByVal isRecursive As Integer = 1)
  Declare Sub      xSurfaceEffectTexture StdCall Alias "_xSurfaceEffectTexture" (ByVal surface As Integer, ByVal nombre As Zstring ptr, ByVal texture As Integer, ByVal frame As Integer = 0, ByVal layer As Integer = -1)
  Declare Sub      xSurfaceEffectMatrixSemantic StdCall Alias "_xSurfaceEffectMatrixSemantic" (ByVal surface As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer, ByVal layer As Integer = -1)
  Declare Sub      xSetEffectMatrixSemantic StdCall Alias "_xSetEffectMatrixSemantic" (ByVal entity As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer, ByVal layer As Integer = -1)
  Declare Sub      xDeleteSurfaceConstant StdCall Alias "_xDeleteSurfaceConstant" (ByVal surface As Integer, ByVal nombre As Zstring ptr, ByVal layer As Integer = -1)
  Declare Sub      xDeleteEffectConstant StdCall Alias "_xDeleteEffectConstant" (ByVal entity As Integer, ByVal nombre As Zstring ptr, ByVal layer As Integer = -1)
  Declare Sub      xClearSurfaceConstants StdCall Alias "_xClearSurfaceConstants" (ByVal surface As Integer, ByVal layer As Integer = -1)
  Declare Sub      xClearEffectConstants StdCall Alias "_xClearEffectConstants" (ByVal entity As Integer, ByVal layer As Integer = -1)
  Declare Sub      xSetEffectTechnique StdCall Alias "_xSetEffectTechnique" (ByVal entity As Integer, ByVal nombre As Zstring ptr, ByVal layer As Integer = -1)
  Declare Sub      xSurfaceTechnique StdCall Alias "_xSurfaceTechnique" (ByVal surface As Integer, ByVal nombre As Zstring ptr, ByVal layer As Integer = -1)
  Declare Function xValidateEffectTechnique StdCall Alias "_xValidateEffectTechnique" (ByVal effect As Integer, ByVal nombre As Zstring ptr) As Integer
  Declare Sub      xSetEntityShaderLayer StdCall Alias "_xSetEntityShaderLayer" (ByVal entity As Integer, ByVal layer As Integer)
  Declare Function xGetEntityShaderLayer StdCall Alias "_xGetEntityShaderLayer" (ByVal entity As Integer) As Integer
  Declare Sub      xSetSurfaceShaderLayer StdCall Alias "_xSetSurfaceShaderLayer" (ByVal surface As Integer, ByVal layer As Integer)
  Declare Function xGetSurfaceShaderLayer StdCall Alias "_xGetSurfaceShaderLayer" (ByVal surface As Integer) As Integer
  Declare Sub      xSetFXInt StdCall Alias "_xSetFXInt" (ByVal effect As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer)
  Declare Sub      xSetFXFloat StdCall Alias "_xSetFXFloat" (ByVal effect As Integer, ByVal nombre As Zstring ptr, ByVal value As Single)
  Declare Sub      xSetFXBool StdCall Alias "_xSetFXBool" (ByVal effect As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer)
  Declare Sub      xSetFXVector StdCall Alias "_xSetFXVector" (ByVal effect As Integer, ByVal nombre As Zstring ptr, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal w As Single = 0.0)
  Declare Sub      xSetFXVectorArray StdCall Alias "_xSetFXVectorArray" (ByVal effect As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer, ByVal count As Integer)
  Declare Sub      xSetFXMatrixArray StdCall Alias "_xSetFXMatrixArray" (ByVal effect As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer, ByVal count As Integer)
  Declare Sub      xSetFXFloatArray StdCall Alias "_xSetFXFloatArray" (ByVal effect As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer, ByVal count As Integer)
  Declare Sub      xSetFXIntArray StdCall Alias "_xSetFXIntArray" (ByVal effect As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer, ByVal count As Integer)
  Declare Sub      xSetFXEntityMatrix StdCall Alias "_xSetFXEntityMatrix" (ByVal effect As Integer, ByVal nombre As Zstring ptr, ByVal matrix As Integer)
  Declare Sub      xSetFXTexture StdCall Alias "_xSetFXTexture" (ByVal effect As Integer, ByVal nombre As Zstring ptr, ByVal texture As Integer, ByVal frame As Integer = 0)
  Declare Sub      xSetFXMatrixSemantic StdCall Alias "_xSetFXMatrixSemantic" (ByVal effect As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer)
  Declare Sub      xDeleteFXConstant StdCall Alias "_xDeleteFXConstant" (ByVal effect As Integer, ByVal nombre As Zstring ptr)
  Declare Sub      xClearFXConstants StdCall Alias "_xClearFXConstants" (ByVal effect As Integer)
  Declare Sub      xSetFXTechnique StdCall Alias "_xSetFXTechnique" (ByVal effect As Integer, ByVal nombre As Zstring ptr)
  Declare Function xCreateEmitter StdCall Alias "_xCreateEmitter" (ByVal psystem As Integer, ByVal parent As Integer = 0) As Integer
  Declare Sub      xEmitterEnable StdCall Alias "_xEmitterEnable" (ByVal emitter As Integer, ByVal state As Integer)
  Declare Function xEmitterEnabled StdCall Alias "_xEmitterEnabled" (ByVal emitter As Integer) As Integer
  Declare Function xEmitterGetPSystem StdCall Alias "_xEmitterGetPSystem" (ByVal emitter As Integer) As Integer
  Declare Function xEmitterAddParticle StdCall Alias "_xEmitterAddParticle" (ByVal emitter As Integer) As Integer
  Declare Sub      xEmitterFreeParticle StdCall Alias "_xEmitterFreeParticle" (ByVal emitter As Integer, ByVal particle As Integer)
  Declare Function xEmitterValidateParticle StdCall Alias "_xEmitterValidateParticle" (ByVal emitter As Integer, ByVal particle As Integer) As Integer
  Declare Function xEmitterCountParticles StdCall Alias "_xEmitterCountParticles" (ByVal emitter As Integer) As Integer
  Declare Function xEmitterGetParticle StdCall Alias "_xEmitterGetParticle" (ByVal emitter As Integer, ByVal index As Integer) As Integer
  Declare Function xEmitterAlive StdCall Alias "_xEmitterAlive" (ByVal emitter As Integer) As Integer
  Declare Function xExtractAnimSeq StdCall Alias "_xExtractAnimSeq" (ByVal entity As Integer, ByVal firstFrame As Integer, ByVal lastFrame As Integer, ByVal sequence As Integer = 0) As Integer
  Declare Function xLoadAnimSeq StdCall Alias "_xLoadAnimSeq" (ByVal entity As Integer, ByVal path As Zstring ptr) As Integer
  Declare Sub      xSetAnimSpeed StdCall Alias "_xSetAnimSpeed" (ByVal entity As Integer, ByVal speed As Single, ByVal rootBone As String = "")
  Declare Function xAnimSpeed StdCall Alias "_xAnimSpeed" (ByVal entity As Integer, ByVal rootBone As String = "") As Single
  Declare Function xAnimating StdCall Alias "_xAnimating" (ByVal entity As Integer, ByVal rootBone As String = "") As Integer
  Declare Function xAnimTime StdCall Alias "_xAnimTime" (ByVal entity As Integer, ByVal rootBone As String = "") As Single
  Declare Sub      xAnimate StdCall Alias "_xAnimate" (ByVal entity As Integer, ByVal mode As Integer = 1, ByVal speed As Single = 1.0, ByVal sequence As Integer = 0, ByVal translate As Single = 0.0, ByVal rootBone As String = "")
  Declare Function xAnimSeq StdCall Alias "_xAnimSeq" (ByVal entity As Integer, ByVal rootBone As String = "") As Integer
  Declare Function xAnimLength StdCall Alias "_xAnimLength" (ByVal entity As Integer, ByVal rootBone As String = "") As Single
  Declare Sub      xSetAnimTime StdCall Alias "_xSetAnimTime" (ByVal entity As Integer, ByVal time As Single, ByVal sequence As Integer, ByVal rootBone As String = "")
  Declare Sub      xSetAnimFrame StdCall Alias "_xSetAnimFrame" (ByVal entity As Integer, ByVal frame As Single, ByVal sequence As Integer, ByVal rootBone As String = "")
  Declare Sub      xEntityAutoFade StdCall Alias "_xEntityAutoFade" (ByVal entity As Integer, ByVal nearRange As Single, ByVal farRange As Single)
  Declare Sub      xEntityOrder StdCall Alias "_xEntityOrder" (ByVal entity As Integer, ByVal order As Integer)
  Declare Sub      xFreeEntity StdCall Alias "_xFreeEntity" (ByVal entity As Integer)
  Declare Function xCopyEntity StdCall Alias "_xCopyEntity" (ByVal entity As Integer, ByVal parent As Integer = 0, ByVal cloneBuffers As Integer = 0) As Integer
  Declare Sub      xPaintEntity StdCall Alias "_xPaintEntity" (ByVal entity As Integer, ByVal brush As Integer)
  Declare Sub      xEntityShininess StdCall Alias "_xEntityShininess" (ByVal entity As Integer, ByVal shininess As Single)
  Declare Sub      xEntityPickMode StdCall Alias "_xEntityPickMode" (ByVal entity As Integer, ByVal mode As Integer, ByVal obscurer As Integer = 1, ByVal recursive As Integer = 1)
  Declare Sub      xEntityTexture StdCall Alias "_xEntityTexture" (ByVal entity As Integer, ByVal texture As Integer, ByVal frame As Integer = 0, ByVal index As Integer = 0, ByVal isRecursive As Integer = 1)
  Declare Sub      xEntityFX StdCall Alias "_xEntityFX" (ByVal entity As Integer, ByVal fx As Integer)
  Declare Function xGetParent StdCall Alias "_xGetParent" (ByVal entity As Integer) As Integer
  Declare Sub      xSetFrustumSphere StdCall Alias "_xSetFrustumSphere" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal radii As Single)
  Declare Sub      xCalculateFrustumVolume StdCall Alias "_xCalculateFrustumVolume" (ByVal entity As Integer)
  Declare Sub      xEntityParent StdCall Alias "_xEntityParent" (ByVal entity As Integer, ByVal parent As Integer = 0, ByVal isGlobal As Integer = 1)
  Declare Sub      xShowEntity StdCall Alias "_xShowEntity" (ByVal entity As Integer)
  Declare Sub      xHideEntity StdCall Alias "_xHideEntity" (ByVal entity As Integer)
  Declare Sub      xNameEntity StdCall Alias "_xNameEntity" (ByVal entity As Integer, ByVal nombre As Zstring ptr)
  Declare Sub      xSetEntityQuaternion StdCall Alias "_xSetEntityQuaternion" (ByVal entity As Integer, ByVal quaternion As Integer)
  Declare Sub      xSetEntityMatrix StdCall Alias "_xSetEntityMatrix" (ByVal entity As Integer, ByVal matrix As Integer)
  Declare Sub      xEntityAlpha StdCall Alias "_xEntityAlpha" (ByVal entity As Integer, ByVal alpha2 As Single)
  Declare Sub      xEntityColor StdCall Alias "_xEntityColor" (ByVal entity As Integer, ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer)
  Declare Sub      xEntitySpecularColor StdCall Alias "_xEntitySpecularColor" (ByVal entity As Integer, ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer)
  Declare Sub      xEntityAmbientColor StdCall Alias "_xEntityAmbientColor" (ByVal entity As Integer, ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer)
  Declare Sub      xEntityEmissiveColor StdCall Alias "_xEntityEmissiveColor" (ByVal entity As Integer, ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer)
  Declare Sub      xEntityBlend StdCall Alias "_xEntityBlend" (ByVal entity As Integer, ByVal mode As Integer)
  Declare Sub      xEntityAlphaRef StdCall Alias "_xEntityAlphaRef" (ByVal entity As Integer, ByVal value As Integer)
  Declare Sub      xEntityAlphaFunc StdCall Alias "_xEntityAlphaFunc" (ByVal entity As Integer, ByVal value As Integer)
  Declare Function xCreateInstance StdCall Alias "_xCreateInstance" (ByVal entity As Integer, ByVal parent As Integer = 0) As Integer
  Declare Sub      xFreezeInstances StdCall Alias "_xFreezeInstances" (ByVal entity As Integer, ByVal enable As Integer = 1)
  Declare Function xInstancingAvaliable StdCall Alias "_xInstancingAvaliable" () As Integer
  Declare Function xGetEntityWorld StdCall Alias "_xGetEntityWorld" (ByVal entity As Integer) As Integer
  Declare Sub      xSetEntityWorld StdCall Alias "_xSetEntityWorld" (ByVal entity As Integer, ByVal world As Integer)
  Declare Sub      xScaleEntity StdCall Alias "_xScaleEntity" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal isGlobal As Integer = 0)
  Declare Sub      xPositionEntity StdCall Alias "_xPositionEntity" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal isGlobal As Integer = 0)
  Declare Sub      xMoveEntity StdCall Alias "_xMoveEntity" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal isGlobal As Integer = 0)
  Declare Sub      xTranslateEntity StdCall Alias "_xTranslateEntity" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal isGlobal As Integer = 0)
  Declare Sub      xRotateEntity StdCall Alias "_xRotateEntity" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal isGlobal As Integer = 0)
  Declare Sub      xTurnEntity StdCall Alias "_xTurnEntity" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal isGlobal As Integer = 0)
  Declare Sub      xPointEntity StdCall Alias "_xPointEntity" (ByVal entity1 As Integer, ByVal entity2 As Integer, ByVal roll As Single = 0.0)
  Declare Sub      xAlignToVector StdCall Alias "_xAlignToVector" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal axis As Integer, ByVal factor As Single = 1.0)
  Declare Function xEntityDistance StdCall Alias "_xEntityDistance" (ByVal entity1 As Integer, ByVal entity2 As Integer) As Single
  Declare Function xGetMatElement StdCall Alias "_xGetMatElement" (ByVal entity As Integer, ByVal row As Integer, ByVal col As Integer) As Single
  Declare Function xEntityClass StdCall Alias "_xEntityClass" (ByVal entity As Integer) As Zstring ptr
  Declare Function xGetEntityBrush StdCall Alias "_xGetEntityBrush" (ByVal entity As Integer) As Integer
  Declare Function xEntityX StdCall Alias "_xEntityX" (ByVal entity As Integer, ByVal isGlobal As Integer = 0) As Single
  Declare Function xEntityY StdCall Alias "_xEntityY" (ByVal entity As Integer, ByVal isGlobal As Integer = 0) As Single
  Declare Function xEntityZ StdCall Alias "_xEntityZ" (ByVal entity As Integer, ByVal isGlobal As Integer = 0) As Single
  Declare Function xEntityVisible StdCall Alias "_xEntityVisible" (ByVal entity As Integer, ByVal destination As Integer) As Integer
  Declare Function xEntityScaleX StdCall Alias "_xEntityScaleX" (ByVal entity As Integer) As Single
  Declare Function xEntityScaleY StdCall Alias "_xEntityScaleY" (ByVal entity As Integer) As Single
  Declare Function xEntityScaleZ StdCall Alias "_xEntityScaleZ" (ByVal entity As Integer) As Single
  Declare Function xEntityRoll StdCall Alias "_xEntityRoll" (ByVal entity As Integer, ByVal isGlobal As Integer = 0) As Single
  Declare Function xEntityYaw StdCall Alias "_xEntityYaw" (ByVal entity As Integer, ByVal isGlobal As Integer = 0) As Single
  Declare Function xEntityPitch StdCall Alias "_xEntityPitch" (ByVal entity As Integer, ByVal isGlobal As Integer = 0) As Single
  Declare Function xEntityName StdCall Alias "_xEntityName" (ByVal entity As Integer) As Zstring ptr
  Declare Function xCountChildren StdCall Alias "_xCountChildren" (ByVal entity As Integer) As Integer
  Declare Function xGetChild StdCall Alias "_xGetChild" (ByVal entity As Integer, ByVal index As Integer) As Integer
  Declare Function xEntityInView StdCall Alias "_xEntityInView" (ByVal entity As Integer, ByVal camera As Integer) As Integer
  Declare Function xFindChild StdCall Alias "_xFindChild" (ByVal entity As Integer, ByVal nombre As Zstring ptr) As Integer
  Declare Function xGetEntityMatrix StdCall Alias "_xGetEntityMatrix" (ByVal entity As Integer) As Integer
  Declare Function xGetEntityAlpha StdCall Alias "_xGetEntityAlpha" (ByVal entity As Integer) As Single
  Declare Function xGetAlphaRef StdCall Alias "_xGetAlphaRef" (ByVal entity As Integer) As Integer
  Declare Function xGetAlphaFunc StdCall Alias "_xGetAlphaFunc" (ByVal entity As Integer) As Integer
  Declare Function xEntityRed StdCall Alias "_xEntityRed" (ByVal entity As Integer) As Integer
  Declare Function xEntityGreen StdCall Alias "_xEntityGreen" (ByVal entity As Integer) As Integer
  Declare Function xEntityBlue StdCall Alias "_xEntityBlue" (ByVal entity As Integer) As Integer
  Declare Function xGetEntityShininess StdCall Alias "_xGetEntityShininess" (ByVal entity As Integer) As Single
  Declare Function xGetEntityBlend StdCall Alias "_xGetEntityBlend" (ByVal entity As Integer) As Integer
  Declare Function xGetEntityFX StdCall Alias "_xGetEntityFX" (ByVal entity As Integer) As Integer
  Declare Function xEntityHidden StdCall Alias "_xEntityHidden" (ByVal entity As Integer) As Integer
  Declare Function xEntitiesBBIntersect StdCall Alias "_xEntitiesBBIntersect" (ByVal entity1 As Integer, ByVal entity2 As Integer) As Integer
  Declare Function xMountPackFile StdCall Alias "_xMountPackFile" (ByVal path As Zstring ptr, ByVal mountpoint As String = "", ByVal password As String = "") As Integer
  Declare Sub      xUnmountPackFile StdCall Alias "_xUnmountPackFile" (ByVal packfile As Integer)
  Declare Function xOpenFile StdCall Alias "_xOpenFile" (ByVal path As Zstring ptr) As Integer
  Declare Function xReadFile StdCall Alias "_xReadFile" (ByVal path As Zstring ptr) As Integer
  Declare Function xWriteFile StdCall Alias "_xWriteFile" (ByVal path As Zstring ptr) As Integer
  Declare Sub      xCloseFile StdCall Alias "_xCloseFile" (ByVal file As Integer)
  Declare Function xFilePos StdCall Alias "_xFilePos" (ByVal file As Integer) As Integer
  Declare Sub      xSeekFile StdCall Alias "_xSeekFile" (ByVal file As Integer, ByVal offset As Integer)
  Declare Function xFileType StdCall Alias "_xFileType" (ByVal path As Zstring ptr) As Integer
  Declare Function xFileSize StdCall Alias "_xFileSize" (ByVal path As Zstring ptr) As Integer
  Declare Function xFileCreationTime StdCall Alias "_xFileCreationTime" (ByVal path As Zstring ptr) As Integer
  Declare Function xFileCreationTimeStr StdCall Alias "_xFileCreationTimeStr" (ByVal path As Zstring ptr) As Zstring ptr
  Declare Function xFileModificationTime StdCall Alias "_xFileModificationTime" (ByVal path As Zstring ptr) As Integer
  Declare Function xFileModificationTimeStr StdCall Alias "_xFileModificationTimeStr" (ByVal path As Zstring ptr) As Zstring ptr
  Declare Function xReadDir StdCall Alias "_xReadDir" (ByVal path As Zstring ptr) As Integer
  Declare Sub      xCloseDir StdCall Alias "_xCloseDir" (ByVal handle As Integer)
  Declare Function xNextFile StdCall Alias "_xNextFile" (ByVal handle As Integer) As Zstring ptr
  Declare Function xCurrentDir StdCall Alias "_xCurrentDir" () As Zstring ptr
  Declare Sub      xChangeDir StdCall Alias "_xChangeDir" (ByVal path As Zstring ptr)
  Declare Function xCreateDir StdCall Alias "_xCreateDir" (ByVal path As Zstring ptr) As Integer
  Declare Function xDeleteDir StdCall Alias "_xDeleteDir" (ByVal path As Zstring ptr) As Integer
  Declare Function xCopyFile StdCall Alias "_xCopyFile" (ByVal pathSrc As Zstring ptr, ByVal pathDest As Zstring ptr) As Integer
  Declare Function xDeleteFile StdCall Alias "_xDeleteFile" (ByVal path As Zstring ptr) As Integer
  Declare Function xEof StdCall Alias "_xEof" (ByVal file As Integer) As Integer
  Declare Function xReadByte StdCall Alias "_xReadByte" (ByVal file As Integer) As Integer
  Declare Function xReadShort StdCall Alias "_xReadShort" (ByVal file As Integer) As Integer
  Declare Function xReadInt StdCall Alias "_xReadInt" (ByVal file As Integer) As Integer
  Declare Function xReadFloat StdCall Alias "_xReadFloat" (ByVal file As Integer) As Single
  Declare Function xReadString StdCall Alias "_xReadString" (ByVal file As Integer) As Zstring ptr
  Declare Function xReadLine StdCall Alias "_xReadLine" (ByVal file As Integer, ByVal ls_flag As Integer = 0) As Zstring ptr
  Declare Sub      xWriteByte StdCall Alias "_xWriteByte" (ByVal file As Integer, ByVal value As Integer)
  Declare Sub      xWriteShort StdCall Alias "_xWriteShort" (ByVal file As Integer, ByVal value As Integer)
  Declare Sub      xWriteInt StdCall Alias "_xWriteInt" (ByVal file As Integer, ByVal value As Integer)
  Declare Sub      xWriteFloat StdCall Alias "_xWriteFloat" (ByVal file As Integer, ByVal value As Single)
  Declare Sub      xWriteString StdCall Alias "_xWriteString" (ByVal file As Integer, ByVal value As Zstring ptr)
  Declare Sub      xWriteLine StdCall Alias "_xWriteLine" (ByVal file As Integer, ByVal value As Zstring ptr, ByVal ls_flag As Integer = 0)
  Declare Function xLoadFont StdCall Alias "_xLoadFont" (ByVal nombre As Zstring ptr, ByVal height As Integer, ByVal bold As Integer = 0, ByVal italic As Integer = 0, ByVal underline As Integer = 0, ByVal fontface As String = "") As Integer
  Declare Sub      xText StdCall Alias "_xText" (ByVal x As Single, ByVal y As Single, ByVal textString As Zstring ptr, ByVal centerx As Integer = 0, ByVal centery As Integer = 0)
  Declare Sub      xSetFont StdCall Alias "_xSetFont" (ByVal font As Integer)
  Declare Sub      xFreeFont StdCall Alias "_xFreeFont" (ByVal font As Integer)
  Declare Function xFontWidth StdCall Alias "_xFontWidth" () As Integer
  Declare Function xFontHeight StdCall Alias "_xFontHeight" () As Integer
  Declare Function xStringWidth StdCall Alias "_xStringWidth" (ByVal textString As Zstring ptr) As Integer
  Declare Function xStringHeight StdCall Alias "_xStringHeight" (ByVal textString As Zstring ptr) As Integer
  Declare Function xWinMessage StdCall Alias "_xWinMessage" (ByVal message As Zstring ptr) As Integer
  Declare Function xGetMaxPixelShaderVersion StdCall Alias "_xGetMaxPixelShaderVersion" () As Integer
  Declare Sub      xLine StdCall Alias "_xLine" (ByVal x1 As Integer, ByVal y1 As Integer, ByVal x2 As Integer, ByVal y2 As Integer)
  Declare Sub      xRect StdCall Alias "_xRect" (ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal solid As Integer = 0)
  Declare Function xRectsOverlap StdCall Alias "_xRectsOverlap" (ByVal x1 As Integer, ByVal y1 As Integer, ByVal width1 As Integer, ByVal height1 As Integer, ByVal x2 As Integer, ByVal y2 As Integer, ByVal width2 As Integer, ByVal height2 As Integer) As Integer
  Declare Sub      xViewport StdCall Alias "_xViewport" (ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer)
  Declare Sub      xOval StdCall Alias "_xOval" (ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal solid As Integer = 0)
  Declare Sub      xOrigin StdCall Alias "_xOrigin" (ByVal x As Integer, ByVal y As Integer)
  Declare Function xGetMaxVertexShaderVersion StdCall Alias "_xGetMaxVertexShaderVersion" () As Integer
  Declare Function xGetMaxAntiAlias StdCall Alias "_xGetMaxAntiAlias" () As Integer
  Declare Function xGetMaxTextureFiltering StdCall Alias "_xGetMaxTextureFiltering" () As Integer
  Declare Sub      xSetAntiAliasType StdCall Alias "_xSetAntiAliasType" (ByVal typeID As Integer)
  Declare Sub      xAppTitle StdCall Alias "_xAppTitle" (ByVal title As Zstring ptr)
  Declare Sub      xSetWND StdCall Alias "_xSetWND" (ByVal window As Integer)
  Declare Sub      xSetRenderWindow StdCall Alias "_xSetRenderWindow" (ByVal window As Integer)
  Declare Sub      xSetTopWindow StdCall Alias "_xSetTopWindow" (ByVal window As Integer)
  Declare Sub      xDestroyRenderWindow StdCall Alias "_xDestroyRenderWindow" ()
  Declare Sub      xFlip StdCall Alias "_xFlip" ()
 
Last edited by jepalza on Apr 12, 2020 9:14, edited 2 times in total.
jepalza
Posts: 70
Joined: Feb 24, 2010 10:08
Location: Spain (Bilbao)

Re: "Another" 3d engine Xors3D (abandoned)

Postby jepalza » Apr 12, 2020 9:08

Main subs file is very BIG!!! about 1000 lines.
It's necessary to cut in trhee parts

Consts "xors3d_subs.bas" part 2

Code: Select all

  Declare Function xBackBuffer StdCall Alias "_xBackBuffer" () As Integer
  Declare Sub      xLockBuffer StdCall Alias "_xLockBuffer" (ByVal buffer As Integer = 0)
  Declare Sub      xUnlockBuffer StdCall Alias "_xUnlockBuffer" (ByVal buffer As Integer = 0)
  Declare Sub      xWritePixelFast StdCall Alias "_xWritePixelFast" (ByVal x As Integer, ByVal y As Integer, ByVal argb As Integer, ByVal buffer As Integer = -1)
  Declare Function xReadPixelFast StdCall Alias "_xReadPixelFast" (ByVal x As Integer, ByVal y As Integer, ByVal buffer As Integer = -1) As Integer
  Declare Function xGetPixels StdCall Alias "_xGetPixels" (ByVal buffer As Integer = -1) As Integer
  Declare Sub      xSaveBuffer StdCall Alias "_xSaveBuffer" (ByVal buffer As Integer, ByVal path As Zstring ptr)
  Declare Function xGetCurrentBuffer StdCall Alias "_xGetCurrentBuffer" () As Integer
  Declare Function xBufferWidth StdCall Alias "_xBufferWidth" (ByVal buffer As Integer = 0) As Integer
  Declare Function xBufferHeight StdCall Alias "_xBufferHeight" (ByVal buffer As Integer = 0) As Integer
  Declare Function xCatchTimestamp StdCall Alias "_xCatchTimestamp" () As Integer
  Declare Function xGetElapsedTime StdCall Alias "_xGetElapsedTime" (ByVal timeStamp As Integer) As Single
  Declare Sub      xSetBuffer StdCall Alias "_xSetBuffer" (ByVal buffer As Integer = 0)
  Declare Sub      xSetMRT StdCall Alias "_xSetMRT" (ByVal buffer As Integer, ByVal frame As Integer, ByVal index As Integer)
  Declare Sub      xUnSetMRT StdCall Alias "_xUnSetMRT" ()
  Declare Function xGetNumberRT StdCall Alias "_xGetNumberRT" () As Integer
  Declare Function xTextureBuffer StdCall Alias "_xTextureBuffer" (ByVal texture As Integer, ByVal frame As Integer = 0) As Integer
  Declare Sub      xLoadBuffer StdCall Alias "_xLoadBuffer" (ByVal buffer As Integer, ByVal path As Zstring ptr)
  Declare Sub      xWritePixel StdCall Alias "_xWritePixel" (ByVal x As Integer, ByVal y As Integer, ByVal argb As Integer, ByVal buffer As Integer = 0)
  Declare Sub      xCopyPixel StdCall Alias "_xCopyPixel" (ByVal sx As Integer, ByVal sy As Integer, ByVal sourceBuffer As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal destinationBuffer As Integer)
  Declare Sub      xCopyPixelFast StdCall Alias "_xCopyPixelFast" (ByVal sx As Integer, ByVal sy As Integer, ByVal sourceBuffer As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal destinationBuffer As Integer)
  Declare Sub      xCopyRect StdCall Alias "_xCopyRect" (ByVal sx As Integer, ByVal sy As Integer, ByVal sw As Integer, ByVal sh As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal sourceBuffer As Integer, ByVal destinationBuffer As Integer)
  Declare Function xGraphicsBuffer StdCall Alias "_xGraphicsBuffer" () As Integer
  Declare Function xGetColor StdCall Alias "_xGetColor" (ByVal x As Integer, ByVal y As Integer) As Integer
  Declare Function xReadPixel StdCall Alias "_xReadPixel" (ByVal x As Integer, ByVal y As Integer, ByVal buffer As Integer = 0) As Integer
  Declare Function xGraphicsWidth StdCall Alias "_xGraphicsWidth" (ByVal isVirtual As Integer = 1) As Integer
  Declare Function xGraphicsHeight StdCall Alias "_xGraphicsHeight" (ByVal isVirtual As Integer = 1) As Integer
  Declare Function xGraphicsDepth StdCall Alias "_xGraphicsDepth" () As Integer
  Declare Function xColorAlpha StdCall Alias "_xColorAlpha" () As Integer
  Declare Function xColorRed StdCall Alias "_xColorRed" () As Integer
  Declare Function xColorGreen StdCall Alias "_xColorGreen" () As Integer
  Declare Function xColorBlue StdCall Alias "_xColorBlue" () As Integer
  Declare Sub      xClsColor StdCall Alias "_xClsColor" (ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer, ByVal alpha2 As Integer = 255)
  Declare Sub      xClearWorld StdCall Alias "_xClearWorld" (ByVal entities As Integer = 1, ByVal brushes As Integer = 1, ByVal textures As Integer = 1)
  Declare Sub      xColor StdCall Alias "_xColor" (ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer, ByVal alpha2 As Integer = 255)
  Declare Sub      xCls StdCall Alias "_xCls" ()
  Declare Sub      xUpdateWorld StdCall Alias "_xUpdateWorld" (ByVal speed As Single = 1.0)
  Declare Sub      xRenderEntity StdCall Alias "_xRenderEntity" (ByVal camera As Integer, ByVal entity As Integer, ByVal tween As Single = 1.0)
  Declare Sub      xRenderWorld StdCall Alias "_xRenderWorld" (ByVal tween As Single = 1.0, ByVal renderShadows As Integer = 0)
  Declare Sub      xSetAutoTB StdCall Alias "_xSetAutoTB" (ByVal flag As Integer)
  Declare Function xMaxClipPlanes StdCall Alias "_xMaxClipPlanes" () As Integer
  Declare Sub      xWireframe StdCall Alias "_xWireframe" (ByVal state As Integer)
  Declare Sub      xDither StdCall Alias "_xDither" (ByVal state As Integer)
  Declare Sub      xSetSkinningMethod StdCall Alias "_xSetSkinningMethod" (ByVal skinMethod As Integer)
  Declare Function xTrisRendered StdCall Alias "_xTrisRendered" () As Integer
  Declare Function xDIPCounter StdCall Alias "_xDIPCounter" () As Integer
  Declare Function xSurfRendered StdCall Alias "_xSurfRendered" () As Integer
  Declare Function xEntityRendered StdCall Alias "_xEntityRendered" () As Integer
  Declare Sub      xAmbientLight StdCall Alias "_xAmbientLight" (ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer, ByVal world As Integer = 0)
  Declare Function xGetFPS StdCall Alias "_xGetFPS" () As Integer
  Declare Sub      xAntiAlias StdCall Alias "_xAntiAlias" (ByVal state As Integer)
  Declare Sub      xSetTextureFiltering StdCall Alias "_xSetTextureFiltering" (ByVal filter As Integer)
  Declare Sub      xStretchRect StdCall Alias "_xStretchRect" (ByVal texture1 As Integer, ByVal x1 As Integer, ByVal y1 As Integer, ByVal width1 As Integer, ByVal height1 As Integer, ByVal texture2 As Integer, ByVal x2 As Integer, ByVal y2 As Integer, ByVal width2 As Integer, ByVal height2 As Integer, ByVal filter As Integer)
  Declare Sub      xStretchBackBuffer StdCall Alias "_xStretchBackBuffer" (ByVal texture As Integer, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal filter As Integer)
  Declare Function xGetDevice StdCall Alias "_xGetDevice" () As Integer
  Declare Sub      xReleaseGraphics StdCall Alias "_xReleaseGraphics" ()
  Declare Sub      xShowPointer StdCall Alias "_xShowPointer" ()
  Declare Sub      xHidePointer StdCall Alias "_xHidePointer" ()
  Declare Sub      xCreateDSS StdCall Alias "_xCreateDSS" (ByVal width As Integer, ByVal height As Integer)
  Declare Sub      xDeleteDSS StdCall Alias "_xDeleteDSS" ()
  Declare Sub      xGridColor StdCall Alias "_xGridColor" (ByVal centerRed As Integer, ByVal centerGreen As Integer, ByVal centerBlue As Integer, ByVal gridRed As Integer, ByVal gridGreen As Integer, ByVal gridBlue As Integer)
  Declare Sub      xDrawGrid StdCall Alias "_xDrawGrid" (ByVal x As Single, ByVal z As Single, ByVal gridSize As Integer, ByVal range As Integer)
  Declare Sub      xDrawBBox StdCall Alias "_xDrawBBox" (ByVal draw As Integer, ByVal zOn As Integer, ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer, ByVal alpha2 As Integer)
  Declare Sub      xGraphics3D StdCall Alias "_xGraphics3D" (ByVal width As Integer = 1024, ByVal height As Integer = 768, ByVal depth As Integer = 0, ByVal mode As Integer = 0, ByVal vsync As Integer = 1)
  Declare Sub      xGraphicsAspectRatio StdCall Alias "_xGraphicsAspectRatio" (ByVal aspectRatio As Single)
  Declare Sub      xGraphicsBorderColor StdCall Alias "_xGraphicsBorderColor" (ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer)
  Declare Function xGetRenderWindow StdCall Alias "_xGetRenderWindow" () As Integer
  Declare Sub      xKey StdCall Alias "_xKey" (ByVal key As Zstring ptr)
  Declare Sub      xSetEngineSetting StdCall Alias "_xSetEngineSetting" (ByVal parameter As Zstring ptr, ByVal value As Zstring ptr)
  Declare Function xGetEngineSetting StdCall Alias "_xGetEngineSetting" (ByVal parameter As Zstring ptr) As Zstring ptr
  Declare Function xHWInstancingAvailable StdCall Alias "_xHWInstancingAvailable" () As Integer
  Declare Function xShaderInstancingAvailable StdCall Alias "_xShaderInstancingAvailable" () As Integer
  Declare Sub      xSetShaderLayer StdCall Alias "_xSetShaderLayer" (ByVal layer As Integer)
  Declare Function xGetShaderLayer StdCall Alias "_xGetShaderLayer" () As Integer
  Declare Sub      xDrawMovementGizmo StdCall Alias "_xDrawMovementGizmo" (ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal selectMask As Integer = 0)
  Declare Sub      xDrawScaleGizmo StdCall Alias "_xDrawScaleGizmo" (ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal selectMask As Integer = 0, ByVal sx As Single = 1.0, ByVal sy As Single = 1.0, ByVal sz As Single = 1.0)
  Declare Sub      xDrawRotationGizmo StdCall Alias "_xDrawRotationGizmo" (ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal selectMask As Integer = 0, ByVal pitch As Single = 0.0, ByVal yaw As Single = 0.0, ByVal roll As Single = 0.0)
  Declare Function xCheckMovementGizmo StdCall Alias "_xCheckMovementGizmo" (ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal camera As Integer, ByVal mx As Integer, ByVal my As Integer) As Integer
  Declare Function xCheckScaleGizmo StdCall Alias "_xCheckScaleGizmo" (ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal camera As Integer, ByVal mx As Integer, ByVal my As Integer) As Integer
  Declare Function xCheckRotationGizmo StdCall Alias "_xCheckRotationGizmo" (ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal camera As Integer, ByVal mx As Integer, ByVal my As Integer) As Integer
  Declare Sub      xCaptureWorld StdCall Alias "_xCaptureWorld" ()
  Declare Function xCountGfxModes StdCall Alias "_xCountGfxModes" () As Integer
  Declare Function xGfxModeWidth StdCall Alias "_xGfxModeWidth" (ByVal mode As Integer) As Integer
  Declare Function xGfxModeHeight StdCall Alias "_xGfxModeHeight" (ByVal mode As Integer) As Integer
  Declare Function xGfxModeDepth StdCall Alias "_xGfxModeDepth" (ByVal mode As Integer) As Integer
  Declare Function xGfxModeExists StdCall Alias "_xGfxModeExists" (ByVal width As Integer, ByVal height As Integer, ByVal depth As Integer) As Integer
  Declare Sub      xAppWindowFrame StdCall Alias "_xAppWindowFrame" (ByVal state As Integer)
  Declare Function xMillisecs StdCall Alias "_xMillisecs" () As Integer
  Declare Function xDeltaTime StdCall Alias "_xDeltaTime" (ByVal fromInit As Integer = 0) As Integer
  Declare Function xDeltaValue StdCall Alias "_xDeltaValue" (ByVal value As Single, ByVal time As Integer = 0) As Single
  Declare Sub      xAddDeviceLostCallback StdCall Alias "_xAddDeviceLostCallback" (ByVal func As Integer)
  Declare Sub      xDeleteDeviceLostCallback StdCall Alias "_xDeleteDeviceLostCallback" (ByVal func As Integer)
  Declare Sub      xDeinit StdCall Alias "_xDeinit" ()
  Declare Sub      xImageColor StdCall Alias "_xImageColor" (ByVal image As Integer, ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer)
  Declare Sub      xImageAlpha StdCall Alias "_xImageAlpha" (ByVal image As Integer, ByVal alpha2 As Single)
  Declare Function xImageBuffer StdCall Alias "_xImageBuffer" (ByVal image As Integer, ByVal frame As Integer = 0) As Integer
  Declare Function xCreateImage StdCall Alias "_xCreateImage" (ByVal width As Integer, ByVal height As Integer, ByVal frame As Integer = 1) As Integer
  Declare Sub      xGrabImage StdCall Alias "_xGrabImage" (ByVal image As Integer, ByVal x As Integer, ByVal y As Integer, ByVal frame As Integer = 0)
  Declare Sub      xFreeImage StdCall Alias "_xFreeImage" (ByVal image As Integer)
  Declare Function xLoadImage StdCall Alias "_xLoadImage" (ByVal path As Zstring ptr) As Integer
  Declare Function xLoadAnimImage StdCall Alias "_xLoadAnimImage" (ByVal path As Zstring ptr, ByVal width As Integer, ByVal height As Integer, ByVal startFrame As Integer, ByVal frames As Integer) As Integer
  Declare Sub      xSaveImage StdCall Alias "_xSaveImage" (ByVal image As Integer, ByVal path As Zstring ptr, ByVal frame As Integer = 0)
  Declare Sub      xDrawImage StdCall Alias "_xDrawImage" (ByVal image As Integer, ByVal x As Single, ByVal y As Single, ByVal frame As Integer = 0)
  Declare Sub      xDrawImageRect StdCall Alias "_xDrawImageRect" (ByVal image As Integer, ByVal x As Single, ByVal y As Single, ByVal rectx As Single, ByVal recty As Single, ByVal rectWidth As Single, ByVal rectHeight As Single, ByVal frame As Integer = 0)
  Declare Sub      xScaleImage StdCall Alias "_xScaleImage" (ByVal image As Integer, ByVal x As Single, ByVal y As Single)
  Declare Sub      xResizeImage StdCall Alias "_xResizeImage" (ByVal image As Integer, ByVal width As Single, ByVal height As Single)
  Declare Sub      xRotateImage StdCall Alias "_xRotateImage" (ByVal image As Integer, ByVal angle As Single)
  Declare Function xImageAngle StdCall Alias "_xImageAngle" (ByVal image As Integer) As Single
  Declare Function xImageWidth StdCall Alias "_xImageWidth" (ByVal image As Integer) As Integer
  Declare Function xImageHeight StdCall Alias "_xImageHeight" (ByVal image As Integer) As Integer
  Declare Function xImagesCollide StdCall Alias "_xImagesCollide" (ByVal image1 As Integer, ByVal x1 As Integer, ByVal y1 As Integer, ByVal frame1 As Integer, ByVal image2 As Integer, ByVal x2 As Integer, ByVal y2 As Integer, ByVal frame2 As Integer) As Integer
  Declare Function xImageRectCollide StdCall Alias "_xImageRectCollide" (ByVal image As Integer, ByVal x As Integer, ByVal y As Integer, ByVal frame As Integer, ByVal rectx As Integer, ByVal recty As Integer, ByVal rectWidth As Integer, ByVal rectHeight As Integer) As Integer
  Declare Function xImageRectOverlap StdCall Alias "_xImageRectOverlap" (ByVal image As Integer, ByVal x As Single, ByVal y As Single, ByVal rectx As Single, ByVal recty As Single, ByVal rectWidth As Single, ByVal rectHeight As Single) As Integer
  Declare Function xImageXHandle StdCall Alias "_xImageXHandle" (ByVal image As Integer) As Integer
  Declare Function xImageYHandle StdCall Alias "_xImageYHandle" (ByVal image As Integer) As Integer
  Declare Sub      xHandleImage StdCall Alias "_xHandleImage" (ByVal image As Integer, ByVal x As Single, ByVal y As Single)
  Declare Sub      xMidHandle StdCall Alias "_xMidHandle" (ByVal image As Integer)
  Declare Sub      xAutoMidHandle StdCall Alias "_xAutoMidHandle" (ByVal state As Integer)
  Declare Sub      xTileImage StdCall Alias "_xTileImage" (ByVal image As Integer, ByVal x As Single, ByVal y As Single, ByVal frame As Integer = 0)
  Declare Function xImagesOverlap StdCall Alias "_xImagesOverlap" (ByVal image1 As Integer, ByVal x1 As Single, ByVal y1 As Single, ByVal image2 As Integer, ByVal x2 As Single, ByVal y2 As Single) As Integer
  Declare Sub      xMaskImage StdCall Alias "_xMaskImage" (ByVal image As Integer, ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer)
  Declare Function xCopyImage StdCall Alias "_xCopyImage" (ByVal image As Integer) As Integer
  Declare Sub      xDrawBlock StdCall Alias "_xDrawBlock" (ByVal image As Integer, ByVal x As Single, ByVal y As Single, ByVal frame As Integer = 0)
  Declare Sub      xDrawBlockRect StdCall Alias "_xDrawBlockRect" (ByVal image As Integer, ByVal x As Single, ByVal y As Single, ByVal rectx As Single, ByVal recty As Single, ByVal rectWidth As Single, ByVal rectHeight As Single, ByVal frame As Integer = 0)
  Declare Function xImageActualWidth StdCall Alias "_xImageActualWidth" (ByVal image As Integer) As Integer
  Declare Function xImageActualHeight StdCall Alias "_xImageActualHeight" (ByVal image As Integer) As Integer
  Declare Sub      xFlushKeys StdCall Alias "_xFlushKeys" ()
  Declare Sub      xFlushMouse StdCall Alias "_xFlushMouse" ()
  Declare Function xKeyHit StdCall Alias "_xKeyHit" (ByVal key As Integer) As Integer
  Declare Function xKeyUp StdCall Alias "_xKeyUp" (ByVal key As Integer) As Integer
  Declare Sub      xWaitKey StdCall Alias "_xWaitKey" ()
  Declare Function xMouseHit StdCall Alias "_xMouseHit" (ByVal key As Integer) As Integer
  Declare Function xKeyDown StdCall Alias "_xKeyDown" (ByVal key As Integer) As Integer
  Declare Function xGetKey StdCall Alias "_xGetKey" () As Integer
  Declare Function xMouseDown StdCall Alias "_xMouseDown" (ByVal key As Integer) As Integer
  Declare Function xMouseUp StdCall Alias "_xMouseUp" (ByVal key As Integer) As Integer
  Declare Function xGetMouse StdCall Alias "_xGetMouse" () As Integer
  Declare Function xMouseX StdCall Alias "_xMouseX" () As Integer
  Declare Function xMouseY StdCall Alias "_xMouseY" () As Integer
  Declare Function xMouseZ StdCall Alias "_xMouseZ" () As Integer
  Declare Function xMouseXSpeed StdCall Alias "_xMouseXSpeed" () As Integer
  Declare Function xMouseYSpeed StdCall Alias "_xMouseYSpeed" () As Integer
  Declare Function xMouseZSpeed StdCall Alias "_xMouseZSpeed" () As Integer
  Declare Function xMouseSpeed StdCall Alias "_xMouseSpeed" () As Integer
  Declare Sub      xMoveMouse StdCall Alias "_xMoveMouse" (ByVal x As Integer, ByVal y As Integer)
  Declare Function xJoyType StdCall Alias "_xJoyType" (ByVal portID As Integer = 0) As Integer
  Declare Function xJoyDown StdCall Alias "_xJoyDown" (ByVal key As Integer, ByVal portID As Integer = 0) As Integer
  Declare Function xJoyHit StdCall Alias "_xJoyHit" (ByVal key As Integer, ByVal portID As Integer = 0) As Integer
  Declare Function xGetJoy StdCall Alias "_xGetJoy" (ByVal portID As Integer = 0) As Integer
  Declare Sub      xFlushJoy StdCall Alias "_xFlushJoy" ()
  Declare Function xWaitJoy StdCall Alias "_xWaitJoy" (ByVal portID As Integer = 0) As Integer
  Declare Function xJoyX StdCall Alias "_xJoyX" (ByVal portID As Integer = 0) As Single
  Declare Function xJoyY StdCall Alias "_xJoyY" (ByVal portID As Integer = 0) As Single
  Declare Function xJoyZ StdCall Alias "_xJoyZ" (ByVal portID As Integer = 0) As Single
  Declare Function xJoyU StdCall Alias "_xJoyU" (ByVal portID As Integer = 0) As Single
  Declare Function xJoyV StdCall Alias "_xJoyV" (ByVal portID As Integer = 0) As Single
  Declare Function xJoyPitch StdCall Alias "_xJoyPitch" (ByVal portID As Integer = 0) As Single
  Declare Function xJoyYaw StdCall Alias "_xJoyYaw" (ByVal portID As Integer = 0) As Single
  Declare Function xJoyRoll StdCall Alias "_xJoyRoll" (ByVal portID As Integer = 0) As Single
  Declare Function xJoyHat StdCall Alias "_xJoyHat" (ByVal portID As Integer = 0) As Single
  Declare Function xJoyXDir StdCall Alias "_xJoyXDir" (ByVal portID As Integer = 0) As Integer
  Declare Function xJoyYDir StdCall Alias "_xJoyYDir" (ByVal portID As Integer = 0) As Integer
  Declare Function xJoyZDir StdCall Alias "_xJoyZDir" (ByVal portID As Integer = 0) As Integer
  Declare Function xJoyUDir StdCall Alias "_xJoyUDir" (ByVal portID As Integer = 0) As Integer
  Declare Function xJoyVDir StdCall Alias "_xJoyVDir" (ByVal portID As Integer = 0) As Integer
  Declare Function xCountJoys StdCall Alias "_xCountJoys" () As Integer
  Declare Function xCreateLight StdCall Alias "_xCreateLight" (ByVal typeID As Integer = 1) As Integer
  Declare Sub      xLightShadowEpsilons StdCall Alias "_xLightShadowEpsilons" (ByVal light As Integer, ByVal epsilon1 As Single, ByVal epsilon2 As Single)
  Declare Sub      xLightEnableShadows StdCall Alias "_xLightEnableShadows" (ByVal light As Integer, ByVal state As Integer)
  Declare Function xLightShadowsEnabled StdCall Alias "_xLightShadowsEnabled" (ByVal light As Integer) As Integer
  Declare Sub      xLightRange StdCall Alias "_xLightRange" (ByVal light As Integer, ByVal range As Single)
  Declare Sub      xLightColor StdCall Alias "_xLightColor" (ByVal light As Integer, ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer)
  Declare Sub      xLightConeAngles StdCall Alias "_xLightConeAngles" (ByVal light As Integer, ByVal inner As Single, ByVal outer As Single)
  Declare Function xCreateLog StdCall Alias "_xCreateLog" (ByVal target As Integer = 1, ByVal level As Integer = 0, ByVal filename As string = "xors_log.html", ByVal cssfilename As String = "") As Integer
  Declare Function xCloseLog StdCall Alias "_xCloseLog" () As Integer
  Declare Function xGetLogString StdCall Alias "_xGetLogString" () As Zstring ptr
  Declare Sub      xClearLogString StdCall Alias "_xClearLogString" ()
  Declare Sub      xSetLogLevel StdCall Alias "_xSetLogLevel" (ByVal level As Integer = 2)
  Declare Sub      xSetLogTarget StdCall Alias "_xSetLogTarget" (ByVal target As Integer = 1)
  Declare Function xGetLogLevel StdCall Alias "_xGetLogLevel" () As Integer
  Declare Function xGetLogTarget StdCall Alias "_xGetLogTarget" () As Integer
  Declare Sub      xLogInfo StdCall Alias "_xLogInfo" (ByVal message As Zstring ptr, ByVal func As String = "", ByVal file As String = "", ByVal line As Integer = -1)
  Declare Sub      xLogMessage StdCall Alias "_xLogMessage" (ByVal message As Zstring ptr, ByVal func As String = "", ByVal file As String = "", ByVal line As Integer = -1)
  Declare Sub      xLogWarning StdCall Alias "_xLogWarning" (ByVal message As Zstring ptr, ByVal func As String = "", ByVal file As String = "", ByVal line As Integer = -1)
  Declare Sub      xLogError StdCall Alias "_xLogError" (ByVal message As Zstring ptr, ByVal func As String = "", ByVal file As String = "", ByVal line As Integer = -1)
  Declare Sub      xLogFatal StdCall Alias "_xLogFatal" (ByVal message As Zstring ptr, ByVal func As String = "", ByVal file As String = "", ByVal line As Integer = -1)
  Declare Function xCreateMesh StdCall Alias "_xCreateMesh" (ByVal parent As Integer = 0) As Integer
  Declare Function xLoadMesh StdCall Alias "_xLoadMesh" (ByVal path As Zstring ptr, ByVal parent As Integer = 0) As Integer
  Declare Function xLoadMeshWithChild StdCall Alias "_xLoadMeshWithChild" (ByVal path As Zstring ptr, ByVal parent As Integer = 0) As Integer
  Declare Function xLoadAnimMesh StdCall Alias "_xLoadAnimMesh" (ByVal path As Zstring ptr, ByVal parent As Integer = 0) As Integer
  Declare Function xCreateCube StdCall Alias "_xCreateCube" (ByVal parent As Integer = 0) As Integer
  Declare Function xCreateSphere StdCall Alias "_xCreateSphere" (ByVal segments As Integer = 16, ByVal parent As Integer = 0) As Integer
  Declare Function xCreateCylinder StdCall Alias "_xCreateCylinder" (ByVal segments As Integer = 16, ByVal solid As Integer = 1, ByVal parent As Integer = 0) As Integer
  Declare Function xCreateTorus StdCall Alias "_xCreateTorus" (ByVal segments As Integer = 16, ByVal R As Single = 1.0, ByVal r_tube As Single = 0.025, ByVal parent As Integer = 0) As Integer
  Declare Function xCreateCone StdCall Alias "_xCreateCone" (ByVal segments As Integer = 16, ByVal solid As Integer = 1, ByVal parent As Integer = 0) As Integer
  Declare Function xCopyMesh StdCall Alias "_xCopyMesh" (ByVal entity As Integer, ByVal parent As Integer = 0) As Integer
  Declare Sub      xAddMesh StdCall Alias "_xAddMesh" (ByVal source As Integer, ByVal destination As Integer)
  Declare Sub      xFlipMesh StdCall Alias "_xFlipMesh" (ByVal entity As Integer)
  Declare Sub      xPaintMesh StdCall Alias "_xPaintMesh" (ByVal entity As Integer, ByVal brush As Integer)
  Declare Sub      xFitMesh StdCall Alias "_xFitMesh" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal width As Single, ByVal height As Single, ByVal depth As Single, ByVal uniform As Integer = 0)
  Declare Function xMeshWidth StdCall Alias "_xMeshWidth" (ByVal entity As Integer, ByVal recursive As Integer = 0) As Single
  Declare Function xMeshHeight StdCall Alias "_xMeshHeight" (ByVal entity As Integer, ByVal recursive As Integer = 0) As Single
  Declare Function xMeshDepth StdCall Alias "_xMeshDepth" (ByVal entity As Integer, ByVal recursive As Integer = 0) As Single
  Declare Sub      xScaleMesh StdCall Alias "_xScaleMesh" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Sub      xRotateMesh StdCall Alias "_xRotateMesh" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Sub      xPositionMesh StdCall Alias "_xPositionMesh" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Sub      xUpdateNormals StdCall Alias "_xUpdateNormals" (ByVal entity As Integer)
  Declare Sub      xUpdateN StdCall Alias "_xUpdateN" (ByVal entity As Integer)
  Declare Sub      xUpdateTB StdCall Alias "_xUpdateTB" (ByVal entity As Integer)
  Declare Function xMeshesBBIntersect StdCall Alias "_xMeshesBBIntersect" (ByVal entity1 As Integer, ByVal entity2 As Integer) As Integer
  Declare Function xMeshesIntersect StdCall Alias "_xMeshesIntersect" (ByVal entity1 As Integer, ByVal entity2 As Integer) As Integer
  Declare Function xGetMeshVB StdCall Alias "_xGetMeshVB" (ByVal entity As Integer) As Integer
  Declare Function xGetMeshIB StdCall Alias "_xGetMeshIB" (ByVal entity As Integer) As Integer
  Declare Function xGetMeshVBSize StdCall Alias "_xGetMeshVBSize" (ByVal entity As Integer) As Integer
  Declare Function xGetMeshIBSize StdCall Alias "_xGetMeshIBSize" (ByVal entity As Integer) As Integer
  Declare Sub      xDeleteMeshVB StdCall Alias "_xDeleteMeshVB" (ByVal entity As Integer)
  Declare Sub      xDeleteMeshIB StdCall Alias "_xDeleteMeshIB" (ByVal entity As Integer)
  Declare Function xCountSurfaces StdCall Alias "_xCountSurfaces" (ByVal entity As Integer) As Integer
  Declare Function xGetSurface StdCall Alias "_xGetSurface" (ByVal entity As Integer, ByVal index As Integer) As Integer
  Declare Function xCreatePivot StdCall Alias "_xCreatePivot" (ByVal parent As Integer = 0) As Integer
  Declare Function xFindSurface StdCall Alias "_xFindSurface" (ByVal entity As Integer, ByVal brush As Integer) As Integer
  Declare Function xCreatePoly StdCall Alias "_xCreatePoly" (ByVal sides As Integer = 0, ByVal parent As Integer = 0) As Integer
  Declare Sub      xMeshSingleSurface StdCall Alias "_xMeshSingleSurface" (ByVal entity As Integer)
  Declare Function xSaveMesh StdCall Alias "_xSaveMesh" (ByVal entity As Integer, ByVal path As Zstring ptr) As Integer
  Declare Sub      xLightMesh StdCall Alias "_xLightMesh" (ByVal entity As Integer, ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer, ByVal range As Single = 0.0, ByVal lightX As Single = 0.0, ByVal lightY As Single = 0.0, ByVal lightZ As Single = 0.0)
  Declare Sub      xMeshPrimitiveType StdCall Alias "_xMeshPrimitiveType" (ByVal entity As Integer, ByVal ptype As Integer)
  Declare Sub      xParticlePosition StdCall Alias "_xParticlePosition" (ByVal particle As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Function xParticleX StdCall Alias "_xParticleX" (ByVal particle As Integer) As Single
  Declare Function xParticleY StdCall Alias "_xParticleY" (ByVal particle As Integer) As Single
  Declare Function xParticleZ StdCall Alias "_xParticleZ" (ByVal particle As Integer) As Single
  Declare Sub      xParticleVeclocity StdCall Alias "_xParticleVeclocity" (ByVal particle As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Function xParticleVX StdCall Alias "_xParticleVX" (ByVal particle As Integer) As Single
  Declare Function xParticleVY StdCall Alias "_xParticleVY" (ByVal particle As Integer) As Single
  Declare Function xParticleVZ StdCall Alias "_xParticleVZ" (ByVal particle As Integer) As Single
  Declare Sub      xParticleRotation StdCall Alias "_xParticleRotation" (ByVal particle As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Function xParticlePitch StdCall Alias "_xParticlePitch" (ByVal particle As Integer) As Single
  Declare Function xParticleYaw StdCall Alias "_xParticleYaw" (ByVal particle As Integer) As Single
  Declare Function xParticleRoll StdCall Alias "_xParticleRoll" (ByVal particle As Integer) As Single
  Declare Sub      xParticleTorque StdCall Alias "_xParticleTorque" (ByVal particle As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Function xParticleTPitch StdCall Alias "_xParticleTPitch" (ByVal particle As Integer) As Single
  Declare Function xParticleTYaw StdCall Alias "_xParticleTYaw" (ByVal particle As Integer) As Single
  Declare Function xParticleTRoll StdCall Alias "_xParticleTRoll" (ByVal particle As Integer) As Single
  Declare Sub      xParticleSetAlpha StdCall Alias "_xParticleSetAlpha" (ByVal particle As Integer, ByVal alpha2 As Single)
  Declare Function xParticleGetAlpha StdCall Alias "_xParticleGetAlpha" (ByVal particle As Integer) As Single
  Declare Sub      xParticleColor StdCall Alias "_xParticleColor" (ByVal particle As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Function xParticleRed StdCall Alias "_xParticleRed" (ByVal particle As Integer) As Single
  Declare Function xParticleGreen StdCall Alias "_xParticleGreen" (ByVal particle As Integer) As Single
  Declare Function xParticleBlue StdCall Alias "_xParticleBlue" (ByVal particle As Integer) As Single
  Declare Sub      xParticleScale StdCall Alias "_xParticleScale" (ByVal particle As Integer, ByVal x As Single, ByVal y As Single)
  Declare Function xParticleSX StdCall Alias "_xParticleSX" (ByVal particle As Integer) As Single
  Declare Function xParticleSY StdCall Alias "_xParticleSY" (ByVal particle As Integer) As Single
  Declare Sub      xParticleScaleSpeed StdCall Alias "_xParticleScaleSpeed" (ByVal particle As Integer, ByVal x As Single, ByVal y As Single)
  Declare Function xParticleScaleSpeedX StdCall Alias "_xParticleScaleSpeedX" (ByVal particle As Integer) As Single
  Declare Function xParticleScaleSpeedY StdCall Alias "_xParticleScaleSpeedY" (ByVal particle As Integer) As Single
  Declare Sub      xEntityAddDummyShape StdCall Alias "_xEntityAddDummyShape" (ByVal entity As Integer)
  Declare Sub      xEntityAddBoxShape StdCall Alias "_xEntityAddBoxShape" (ByVal entity As Integer, ByVal mass As Single, ByVal width As Single = 0.0, ByVal height As Single = 0.0, ByVal depth As Single = 0.0)
  Declare Sub      xEntityAddSphereShape StdCall Alias "_xEntityAddSphereShape" (ByVal entity As Integer, ByVal mass As Single, ByVal radius As Single = 0.0)
  Declare Sub      xEntityAddCapsuleShape StdCall Alias "_xEntityAddCapsuleShape" (ByVal entity As Integer, ByVal mass As Single, ByVal radius As Single = 0.0, ByVal height As Single = 0.0)
  Declare Sub      xEntityAddConeShape StdCall Alias "_xEntityAddConeShape" (ByVal entity As Integer, ByVal mass As Single, ByVal radius As Single = 0.0, ByVal height As Single = 0.0)
  Declare Sub      xEntityAddCylinderShape StdCall Alias "_xEntityAddCylinderShape" (ByVal entity As Integer, ByVal mass As Single, ByVal width As Single = 0.0, ByVal height As Single = 0.0, ByVal depth As Single = 0.0)
  Declare Sub      xEntityAddTriMeshShape StdCall Alias "_xEntityAddTriMeshShape" (ByVal entity As Integer)
  Declare Sub      xEntityAddTriMeshShapeProxy StdCall Alias "_xEntityAddTriMeshShapeProxy" (ByVal entity As Integer, ByVal proxy As Integer)
  Declare Sub      xEntityAddConvexShape StdCall Alias "_xEntityAddConvexShape" (ByVal entity As Integer, ByVal mass As Single)
  Declare Sub      xEntityAddConvexShapeProxy StdCall Alias "_xEntityAddConvexShapeProxy" (ByVal entity As Integer, ByVal proxy As Integer, ByVal mass As Single)
  Declare Sub      xEntityAddConcaveShape StdCall Alias "_xEntityAddConcaveShape" (ByVal entity As Integer, ByVal mass As Single)
  Declare Sub      xEntityAddConcaveShapeProxy StdCall Alias "_xEntityAddConcaveShapeProxy" (ByVal entity As Integer, ByVal proxy As Integer, ByVal mass As Single)
  Declare Sub      xEntityAddTerrainShape StdCall Alias "_xEntityAddTerrainShape" (ByVal entity As Integer)
  Declare Sub      xEntityAttachBody StdCall Alias "_xEntityAttachBody" (ByVal entity As Integer, ByVal body As Integer)
  Declare Function xEntityDetachBody StdCall Alias "_xEntityDetachBody" (ByVal entity As Integer) As Integer
  Declare Sub      xFreeEntityBody StdCall Alias "_xFreeEntityBody" (ByVal entity As Integer)
  Declare Sub      xEntityAddCompoundShape StdCall Alias "_xEntityAddCompoundShape" (ByVal entity As Integer, ByVal mass As Single)
  Declare Function xEntityCompoundAddBox StdCall Alias "_xEntityCompoundAddBox" (ByVal entity As Integer, ByVal width As Single, ByVal height As Single, ByVal depth As Single) As Integer
  Declare Function xEntityCompoundAddSphere StdCall Alias "_xEntityCompoundAddSphere" (ByVal entity As Integer, ByVal radius As Single) As Integer
  Declare Function xEntityCompoundAddCapsule StdCall Alias "_xEntityCompoundAddCapsule" (ByVal entity As Integer, ByVal radius As Single, ByVal height As Single) As Integer
  Declare Function xEntityCompoundAddCone StdCall Alias "_xEntityCompoundAddCone" (ByVal entity As Integer, ByVal radius As Single, ByVal height As Single) As Integer
  Declare Function xEntityCompoundAddCylinder StdCall Alias "_xEntityCompoundAddCylinder" (ByVal entity As Integer, ByVal radius As Single, ByVal height As Single) As Integer
  Declare Function xEntityCompoundCountChildren StdCall Alias "_xEntityCompoundCountChildren" (ByVal entity As Integer) As Integer
  Declare Sub      xEntityCompoundRemoveChild StdCall Alias "_xEntityCompoundRemoveChild" (ByVal entity As Integer, ByVal index As Integer)
  Declare Sub      xEntityCompoundChildSetPosition StdCall Alias "_xEntityCompoundChildSetPosition" (ByVal entity As Integer, ByVal index As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Function xEntityCompoundChildGetX StdCall Alias "_xEntityCompoundChildGetX" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xEntityCompoundChildGetY StdCall Alias "_xEntityCompoundChildGetY" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xEntityCompoundChildGetZ StdCall Alias "_xEntityCompoundChildGetZ" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Sub      xEntityCompoundChildSetRotation StdCall Alias "_xEntityCompoundChildSetRotation" (ByVal entity As Integer, ByVal index As Integer, ByVal pitch As Single, ByVal yaw As Single, ByVal roll As Single)
  Declare Function xEntityCompoundChildGetPitch StdCall Alias "_xEntityCompoundChildGetPitch" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xEntityCompoundChildGetYaw StdCall Alias "_xEntityCompoundChildGetYaw" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xEntityCompoundChildGetRoll StdCall Alias "_xEntityCompoundChildGetRoll" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xCreateHingeJoint StdCall Alias "_xCreateHingeJoint" (ByVal firstBody As Integer, ByVal secondBody As Integer, ByVal pivotX As Single, ByVal pivotY As Single, ByVal pivotZ As Single, ByVal axisX As Single, ByVal axisY As Single, ByVal axisZ As Single, ByVal isGlobal As Integer = 0) As Integer
  Declare Function xCreateBallJoint StdCall Alias "_xCreateBallJoint" (ByVal firstBody As Integer, ByVal secondBody As Integer, ByVal pivotX As Single, ByVal pivotY As Single, ByVal pivotZ As Single, ByVal isGlobal As Integer = 0) As Integer
  Declare Function xCreateD6Joint StdCall Alias "_xCreateD6Joint" (ByVal firstBody As Integer, ByVal secondBody As Integer, ByVal pivot1X As Single, ByVal pivot1Y As Single, ByVal pivot1Z As Single, ByVal pivot2X As Single, ByVal pivot2Y As Single, ByVal pivot2Z As Single, ByVal isGlobal1 As Integer = 0, ByVal isGlobal2 As Integer = 0) As Integer
  Declare Function xCreateD6SpringJoint StdCall Alias "_xCreateD6SpringJoint" (ByVal firstBody As Integer, ByVal secondBody As Integer, ByVal pivot1X As Single, ByVal pivot1Y As Single, ByVal pivot1Z As Single, ByVal pivot2X As Single, ByVal pivot2Y As Single, ByVal pivot2Z As Single, ByVal isGlobal1 As Integer = 0, ByVal isGlobal2 As Integer = 0) As Integer
  Declare Function xJointHingeGetAngle StdCall Alias "_xJointHingeGetAngle" (ByVal joint As Integer) As Single
  Declare Function xJointD6GetPitchAngle StdCall Alias "_xJointD6GetPitchAngle" (ByVal joint As Integer) As Single
  Declare Function xJointD6GetYawAngle StdCall Alias "_xJointD6GetYawAngle" (ByVal joint As Integer) As Single
  Declare Function xJointD6GetRollAngle StdCall Alias "_xJointD6GetRollAngle" (ByVal joint As Integer) As Single
  Declare Function xJointD6GetAngle StdCall Alias "_xJointD6GetAngle" (ByVal joint As Integer, ByVal axis As Integer = 0) As Single
  Declare Sub      xJointDisableCollisions StdCall Alias "_xJointDisableCollisions" (ByVal joint As Integer, ByVal state As Integer)
  Declare Sub      xJointEnable StdCall Alias "_xJointEnable" (ByVal joint As Integer, ByVal state As Integer)
  Declare Function xJointIsEnabled StdCall Alias "_xJointIsEnabled" (ByVal joint As Integer) As Integer
  Declare Function xJointGetImpulse StdCall Alias "_xJointGetImpulse" (ByVal joint As Integer) As Single
  Declare Sub      xFreeJoint StdCall Alias "_xFreeJoint" (ByVal joint As Integer)
     Declare Sub      xJointBallSetPivot StdCall Alias "_xJointBallSetPivot" (ByVal joint As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal isGlobal As Integer = 0)
  Declare Function xJointBallGetPivotX StdCall Alias "_xJointBallGetPivotX" (ByVal joint As Integer, ByVal isGlobal As Integer = 0) As Single
  Declare Function xJointBallGetPivotY StdCall Alias "_xJointBallGetPivotY" (ByVal joint As Integer, ByVal isGlobal As Integer = 0) As Single
  Declare Function xJointBallGetPivotZ StdCall Alias "_xJointBallGetPivotZ" (ByVal joint As Integer, ByVal isGlobal As Integer = 0) As Single
  Declare Sub      xJointD6SetLimits StdCall Alias "_xJointD6SetLimits" (ByVal joint As Integer, ByVal axis As Integer, ByVal lower As Single, ByVal upper As Single)
  Declare Sub      xJointD6SetLowerLinearLimits StdCall Alias "_xJointD6SetLowerLinearLimits" (ByVal joint As Integer, ByVal lowerX As Single, ByVal lowerY As Single, ByVal lowerZ As Single)
  Declare Sub      xJointD6SetUpperLinearLimits StdCall Alias "_xJointD6SetUpperLinearLimits" (ByVal joint As Integer, ByVal upperX As Single, ByVal upperY As Single, ByVal upperZ As Single)
  Declare Sub      xJointD6SetLowerAngularLimits StdCall Alias "_xJointD6SetLowerAngularLimits" (ByVal joint As Integer, ByVal lowerX As Single, ByVal lowerY As Single, ByVal lowerZ As Single)
  Declare Sub      xJointD6SetUpperAngularLimits StdCall Alias "_xJointD6SetUpperAngularLimits" (ByVal joint As Integer, ByVal upperX As Single, ByVal upperY As Single, ByVal upperZ As Single)
  Declare Sub      xJointD6SetLinearLimits StdCall Alias "_xJointD6SetLinearLimits" (ByVal joint As Integer, ByVal lowerX As Single, ByVal lowerY As Single, ByVal lowerZ As Single, ByVal upperX As Single, ByVal upperY As Single, ByVal upperZ As Single)
  Declare Sub      xJointD6SetAngularLimits StdCall Alias "_xJointD6SetAngularLimits" (ByVal joint As Integer, ByVal lowerX As Single, ByVal lowerY As Single, ByVal lowerZ As Single, ByVal upperX As Single, ByVal upperY As Single, ByVal upperZ As Single)

Last edited by jepalza on Apr 12, 2020 9:11, edited 2 times in total.
jepalza
Posts: 70
Joined: Feb 24, 2010 10:08
Location: Spain (Bilbao)

Re: "Another" 3d engine Xors3D (abandoned)

Postby jepalza » Apr 12, 2020 9:09

Main subs file is very BIG!!! about 1000 lines.
It's necessary to cut in trhee parts

Consts "xors3d_subs.bas" part 3

Code: Select all

  Declare Function xJointD6GetLinearLowerX StdCall Alias "_xJointD6GetLinearLowerX" (ByVal joint As Integer) As Single
  Declare Function xJointD6GetLinearLowerY StdCall Alias "_xJointD6GetLinearLowerY" (ByVal joint As Integer) As Single
  Declare Function xJointD6GetLinearLowerZ StdCall Alias "_xJointD6GetLinearLowerZ" (ByVal joint As Integer) As Single
  Declare Function xJointD6GetLinearUpperX StdCall Alias "_xJointD6GetLinearUpperX" (ByVal joint As Integer) As Single
  Declare Function xJointD6GetLinearUpperY StdCall Alias "_xJointD6GetLinearUpperY" (ByVal joint As Integer) As Single
  Declare Function xJointD6GetLinearUpperZ StdCall Alias "_xJointD6GetLinearUpperZ" (ByVal joint As Integer) As Single
  Declare Function xJointD6GetAngularLowerX StdCall Alias "_xJointD6GetAngularLowerX" (ByVal joint As Integer) As Single
  Declare Function xJointD6GetAngularLowerY StdCall Alias "_xJointD6GetAngularLowerY" (ByVal joint As Integer) As Single
  Declare Function xJointD6GetAngularLowerZ StdCall Alias "_xJointD6GetAngularLowerZ" (ByVal joint As Integer) As Single
  Declare Function xJointD6GetAngularUpperX StdCall Alias "_xJointD6GetAngularUpperX" (ByVal joint As Integer) As Single
  Declare Function xJointD6GetAngularUpperY StdCall Alias "_xJointD6GetAngularUpperY" (ByVal joint As Integer) As Single
  Declare Function xJointD6GetAngularUpperZ StdCall Alias "_xJointD6GetAngularUpperZ" (ByVal joint As Integer) As Single
  Declare Sub      xJointD6SpringSetParam StdCall Alias "_xJointD6SpringSetParam" (ByVal joint As Integer, ByVal index As Integer, ByVal enabled As Integer, ByVal damping As Single = 1.0, ByVal stiffness As Single = 1.0)
  Declare Sub      xJointHingeSetAxis StdCall Alias "_xJointHingeSetAxis" (ByVal joint As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Sub      xJointHingeSetLimits StdCall Alias "_xJointHingeSetLimits" (ByVal joint As Integer, ByVal lowerLimit As Single, ByVal upperLimit As Single, ByVal softness As Single = 0.9, ByVal biasFactor As Single = 0.3, ByVal relaxationFactor As Single = 1.0)
  Declare Function xJointHingeGetLowerLimit StdCall Alias "_xJointHingeGetLowerLimit" (ByVal joint As Integer) As Single
  Declare Function xJointHingeGetUpperLimit StdCall Alias "_xJointHingeGetUpperLimit" (ByVal joint As Integer) As Single
  Declare Sub      xJointEnableMotor StdCall Alias "_xJointEnableMotor" (ByVal joint As Integer, ByVal enabled As Integer, ByVal targetVelocity As Single, ByVal maxForce As Single, ByVal index As Integer = 0)
  Declare Sub      xJointHingeSetMotorTarget StdCall Alias "_xJointHingeSetMotorTarget" (ByVal joint As Integer, ByVal targetAngle As Single, ByVal deltaTime As Single)
  Declare Function xJointGetEntityA StdCall Alias "_xJointGetEntityA" (ByVal joint As Integer) As Integer
  Declare Function xJointGetEntityB StdCall Alias "_xJointGetEntityB" (ByVal joint As Integer) As Integer
  Declare Sub      xEntityApplyCentralForce StdCall Alias "_xEntityApplyCentralForce" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal isGlobal As Integer = 1)
  Declare Sub      xEntityApplyCentralImpulse StdCall Alias "_xEntityApplyCentralImpulse" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal isGlobal As Integer = 1)
  Declare Sub      xEntityApplyTorque StdCall Alias "_xEntityApplyTorque" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal isGlobal As Integer = 1)
  Declare Sub      xEntityApplyTorqueImpulse StdCall Alias "_xEntityApplyTorqueImpulse" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal isGlobal As Integer = 1)
  Declare Sub      xEntityApplyForce StdCall Alias "_xEntityApplyForce" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal pointx As Single, ByVal pointy As Single, ByVal pointz As Single, ByVal isGlobal As Integer = 1, ByVal globalPoint As Integer = 1)
  Declare Sub      xEntityApplyImpulse StdCall Alias "_xEntityApplyImpulse" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal pointx As Single, ByVal pointy As Single, ByVal pointz As Single, ByVal isGlobal As Integer = 1, ByVal globalPoint As Integer = 1)
  Declare Sub      xEntityReleaseForces StdCall Alias "_xEntityReleaseForces" (ByVal entity As Integer)
  Declare Sub      xWorldSetGravity StdCall Alias "_xWorldSetGravity" (ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal world As Integer = 0)
  Declare Function xWorldGetGravityX StdCall Alias "_xWorldGetGravityX" (ByVal world As Integer = 0) As Single
  Declare Function xWorldGetGravityY StdCall Alias "_xWorldGetGravityY" (ByVal world As Integer = 0) As Single
  Declare Function xWorldGetGravityZ StdCall Alias "_xWorldGetGravityZ" (ByVal world As Integer = 0) As Single
  Declare Sub      xEntitySetGravity StdCall Alias "_xEntitySetGravity" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Function xEntityGetGravityX StdCall Alias "_xEntityGetGravityX" (ByVal entity As Integer) As Single
  Declare Function xEntityGetGravityY StdCall Alias "_xEntityGetGravityY" (ByVal entity As Integer) As Single
  Declare Function xEntityGetGravityZ StdCall Alias "_xEntityGetGravityZ" (ByVal entity As Integer) As Single
  Declare Sub      xEntitySetLinearVelocity StdCall Alias "_xEntitySetLinearVelocity" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal isGlobal As Integer = 1)
  Declare Function xEntityGetLinearVelocityX StdCall Alias "_xEntityGetLinearVelocityX" (ByVal entity As Integer, ByVal isGlobal As Integer = 1) As Single
  Declare Function xEntityGetLinearVelocityY StdCall Alias "_xEntityGetLinearVelocityY" (ByVal entity As Integer, ByVal isGlobal As Integer = 1) As Single
  Declare Function xEntityGetLinearVelocityZ StdCall Alias "_xEntityGetLinearVelocityZ" (ByVal entity As Integer, ByVal isGlobal As Integer = 1) As Single
  Declare Sub      xEntitySetAngularVelocity StdCall Alias "_xEntitySetAngularVelocity" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal isGlobal As Integer = 1)
  Declare Function xEntityGetAngularVelocityX StdCall Alias "_xEntityGetAngularVelocityX" (ByVal entity As Integer, ByVal isGlobal As Integer = 1) As Single
  Declare Function xEntityGetAngularVelocityY StdCall Alias "_xEntityGetAngularVelocityY" (ByVal entity As Integer, ByVal isGlobal As Integer = 1) As Single
  Declare Function xEntityGetAngularVelocityZ StdCall Alias "_xEntityGetAngularVelocityZ" (ByVal entity As Integer, ByVal isGlobal As Integer = 1) As Single
  Declare Sub      xEntitySetDamping StdCall Alias "_xEntitySetDamping" (ByVal entity As Integer, ByVal linear As Single, ByVal angular As Single)
  Declare Function xEntityGetLinearDamping StdCall Alias "_xEntityGetLinearDamping" (ByVal entity As Integer) As Single
  Declare Function xEntityGetAngularDamping StdCall Alias "_xEntityGetAngularDamping" (ByVal entity As Integer) As Single
  Declare Sub      xEntitySetFriction StdCall Alias "_xEntitySetFriction" (ByVal entity As Integer, ByVal friction As Single)
  Declare Function xEntityGetFriction StdCall Alias "_xEntityGetFriction" (ByVal entity As Integer) As Single
  Declare Sub      xEntitySetAnisotropicFriction StdCall Alias "_xEntitySetAnisotropicFriction" (ByVal entity As Integer, ByVal fx As Single, ByVal fy As Single, ByVal fz As Single)
  Declare Function xEntityGetAnisotropicFrictionX StdCall Alias "_xEntityGetAnisotropicFrictionX" (ByVal entity As Integer) As Single
  Declare Function xEntityGetAnisotropicFrictionY StdCall Alias "_xEntityGetAnisotropicFrictionY" (ByVal entity As Integer) As Single
  Declare Function xEntityGetAnisotropicFrictionZ StdCall Alias "_xEntityGetAnisotropicFrictionZ" (ByVal entity As Integer) As Single
  Declare Sub      xEntitySetLinearFactor StdCall Alias "_xEntitySetLinearFactor" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Function xEntityGetLinearFactorX StdCall Alias "_xEntityGetLinearFactorX" (ByVal entity As Integer) As Single
  Declare Function xEntityGetLinearFactorY StdCall Alias "_xEntityGetLinearFactorY" (ByVal entity As Integer) As Single
  Declare Function xEntityGetLinearFactorZ StdCall Alias "_xEntityGetLinearFactorZ" (ByVal entity As Integer) As Single
  Declare Sub      xEntitySetAngularFactor StdCall Alias "_xEntitySetAngularFactor" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Function xEntityGetAngularFactorX StdCall Alias "_xEntityGetAngularFactorX" (ByVal entity As Integer) As Single
  Declare Function xEntityGetAngularFactorY StdCall Alias "_xEntityGetAngularFactorY" (ByVal entity As Integer) As Single
  Declare Function xEntityGetAngularFactorZ StdCall Alias "_xEntityGetAngularFactorZ" (ByVal entity As Integer) As Single
  Declare Sub      xEntitySetRestitution StdCall Alias "_xEntitySetRestitution" (ByVal entity As Integer, ByVal restitution As Single)
  Declare Function xEntityGetRestitution StdCall Alias "_xEntityGetRestitution" (ByVal entity As Integer) As Single
  Declare Sub      xEntitySetMass StdCall Alias "_xEntitySetMass" (ByVal entity As Integer, ByVal mass As Single)
  Declare Function xEntityGetMass StdCall Alias "_xEntityGetMass" (ByVal entity As Integer) As Single
  Declare Function xEntityCountContacts StdCall Alias "_xEntityCountContacts" (ByVal entity As Integer) As Integer
  Declare Function xEntityGetContactX StdCall Alias "_xEntityGetContactX" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xEntityGetContactY StdCall Alias "_xEntityGetContactY" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xEntityGetContactZ StdCall Alias "_xEntityGetContactZ" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xEntityGetContactNX StdCall Alias "_xEntityGetContactNX" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xEntityGetContactNY StdCall Alias "_xEntityGetContactNY" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xEntityGetContactNZ StdCall Alias "_xEntityGetContactNZ" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xEntityGetContactDistance StdCall Alias "_xEntityGetContactDistance" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Function xEntityGetContact StdCall Alias "_xEntityGetContact" (ByVal entity As Integer, ByVal index As Integer) As Integer
  Declare Function xEntityGetContactImpulse StdCall Alias "_xEntityGetContactImpulse" (ByVal entity As Integer, ByVal index As Integer) As Single
  Declare Sub      xEntitySetCollisionGroup StdCall Alias "_xEntitySetCollisionGroup" (ByVal entity As Integer, ByVal group As Integer)
  Declare Function xEntityGetCollisionGroup StdCall Alias "_xEntityGetCollisionGroup" (ByVal entity As Integer) As Integer
  Declare Sub      xEntitySetContactGroup StdCall Alias "_xEntitySetContactGroup" (ByVal entity As Integer, ByVal group As Integer)
  Declare Function xEntityGetContactGroup StdCall Alias "_xEntityGetContactGroup" (ByVal entity As Integer) As Integer
  Declare Sub      xEntitySetRaycastGroup StdCall Alias "_xEntitySetRaycastGroup" (ByVal entity As Integer, ByVal group As Integer)
  Declare Function xEntityGetRaycastGroup StdCall Alias "_xEntityGetRaycastGroup" (ByVal entity As Integer) As Integer
  Declare Sub      xPhysicsSetCollisionFilter StdCall Alias "_xPhysicsSetCollisionFilter" (ByVal group0 As Integer, ByVal group1 As Integer, ByVal state As Integer)
  Declare Function xPhysicsGetCollisionFilter StdCall Alias "_xPhysicsGetCollisionFilter" (ByVal group0 As Integer, ByVal group1 As Integer) As Integer
  Declare Sub      xPhysicsSetContactFilter StdCall Alias "_xPhysicsSetContactFilter" (ByVal group0 As Integer, ByVal group1 As Integer, ByVal state As Integer)
  Declare Function xPhysicsGetContactFilter StdCall Alias "_xPhysicsGetContactFilter" (ByVal group0 As Integer, ByVal group1 As Integer) As Integer
  Declare Sub      xPhysicsSetRaycastFilter StdCall Alias "_xPhysicsSetRaycastFilter" (ByVal rayGroup As Integer, ByVal bodyGroup As Integer, ByVal state As Integer)
  Declare Function xPhysicsGetRaycastFilter StdCall Alias "_xPhysicsGetRaycastFilter" (ByVal rayGroup As Integer, ByVal bodyGroup As Integer) As Integer
  Declare Function xEntityIsSleeping StdCall Alias "_xEntityIsSleeping" (ByVal entity As Integer) As Integer
  Declare Sub      xEntityDisableSleeping StdCall Alias "_xEntityDisableSleeping" (ByVal entity As Integer, ByVal state As Integer = 1)
  Declare Sub      xEntityWakeUp StdCall Alias "_xEntityWakeUp" (ByVal entity As Integer)
  Declare Sub      xEntitySleep StdCall Alias "_xEntitySleep" (ByVal entity As Integer)
  Declare Sub      xEntitySetSleepingThresholds StdCall Alias "_xEntitySetSleepingThresholds" (ByVal entity As Integer, ByVal linearThreshold As Single, ByVal angularThreshold As Single)
  Declare Function xEntityGetLinearSleepingThreshold StdCall Alias "_xEntityGetLinearSleepingThreshold" (ByVal entity As Integer) As Single
  Declare Function xEntityGetAngularSleepingThreshold StdCall Alias "_xEntityGetAngularSleepingThreshold" (ByVal entity As Integer) As Single
  Declare Sub      xPhysicsRayCast StdCall Alias "_xPhysicsRayCast" (ByVal fromX As Single, ByVal fromY As Single, ByVal fromZ As Single, ByVal toX As Single, ByVal toY As Single, ByVal toZ As Single, ByVal rcType As Integer = 0, ByVal rayGroup As Integer = 0)
  Declare Function xPhysicsGetHitEntity StdCall Alias "_xPhysicsGetHitEntity" (ByVal index As Integer = 0) As Integer
  Declare Function xPhysicsGetHitPointX StdCall Alias "_xPhysicsGetHitPointX" (ByVal index As Integer = 0) As Single
  Declare Function xPhysicsGetHitPointY StdCall Alias "_xPhysicsGetHitPointY" (ByVal index As Integer = 0) As Single
  Declare Function xPhysicsGetHitPointZ StdCall Alias "_xPhysicsGetHitPointZ" (ByVal index As Integer = 0) As Single
  Declare Function xPhysicsGetHitNormalX StdCall Alias "_xPhysicsGetHitNormalX" (ByVal index As Integer = 0) As Single
  Declare Function xPhysicsGetHitNormalY StdCall Alias "_xPhysicsGetHitNormalY" (ByVal index As Integer = 0) As Single
  Declare Function xPhysicsGetHitNormalZ StdCall Alias "_xPhysicsGetHitNormalZ" (ByVal index As Integer = 0) As Single
  Declare Function xPhysicsGetHitDistance StdCall Alias "_xPhysicsGetHitDistance" (ByVal index As Integer = 0) As Single
  Declare Function xPhysicsCountHits StdCall Alias "_xPhysicsCountHits" () As Integer
  Declare Sub      xEntityBodyLocalPosition StdCall Alias "_xEntityBodyLocalPosition" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Sub      xEntityBodyLocalRotation StdCall Alias "_xEntityBodyLocalRotation" (ByVal entity As Integer, ByVal pitch As Single, ByVal yaw As Single, ByVal roll As Single)
  Declare Sub      xEntityBodyLocalScale StdCall Alias "_xEntityBodyLocalScale" (ByVal entity As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Sub      xWorldSetFrequency StdCall Alias "_xWorldSetFrequency" (ByVal frequency As Single, ByVal world As Integer = 0)
  Declare Sub      xEntityMakeKinematic StdCall Alias "_xEntityMakeKinematic" (ByVal entity As Integer, ByVal state As Integer)
  Declare Function xEntityIsKinematic StdCall Alias "_xEntityIsKinematic" (ByVal entity As Integer) As Integer
  Declare Sub      xPhysicsDebugRender StdCall Alias "_xPhysicsDebugRender" (ByVal state As Integer)
  Declare Sub      xEntityDisableSimulation StdCall Alias "_xEntityDisableSimulation" (ByVal entity As Integer, ByVal state As Integer)
  Declare Function xEntityHasBody StdCall Alias "_xEntityHasBody" (ByVal entity As Integer) As Integer
  Declare Sub      xEntityCreateVehicle StdCall Alias "_xEntityCreateVehicle" (ByVal chassisEntity As Integer)
  Declare Sub      xEntityFreeVehicle StdCall Alias "_xEntityFreeVehicle" (ByVal chassisEntity As Integer)
  Declare Function xEntityCountWheels StdCall Alias "_xEntityCountWheels" (ByVal chassisEntity As Integer) As Integer
  Declare Function xEntityAddWheel StdCall Alias "_xEntityAddWheel" (ByVal chassisEntity As Integer, ByVal wheelEntity As Integer) As Integer
  Declare Sub      xEntityWheelSetRadius StdCall Alias "_xEntityWheelSetRadius" (ByVal chassisEntity As Integer, ByVal index As Integer, ByVal radius As Single)
  Declare Sub      xEntityWheelSetAxle StdCall Alias "_xEntityWheelSetAxle" (ByVal chassisEntity As Integer, ByVal index As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Sub      xEntityWheelSetRay StdCall Alias "_xEntityWheelSetRay" (ByVal chassisEntity As Integer, ByVal index As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Sub      xEntityWheelSetSuspensionLength StdCall Alias "_xEntityWheelSetSuspensionLength" (ByVal chassisEntity As Integer, ByVal index As Integer, ByVal length As Single)
  Declare Sub      xEntityWheelSetBrake StdCall Alias "_xEntityWheelSetBrake" (ByVal chassisEntity As Integer, ByVal index As Integer, ByVal brake As Single)
  Declare Sub      xEntityWheelSetMaxSuspensionForce StdCall Alias "_xEntityWheelSetMaxSuspensionForce" (ByVal chassisEntity As Integer, ByVal index As Integer, ByVal force As Single)
  Declare Sub      xEntityWheelSetMaxSuspensionTravel StdCall Alias "_xEntityWheelSetMaxSuspensionTravel" (ByVal chassisEntity As Integer, ByVal index As Integer, ByVal travel As Single)
  Declare Sub      xEntityWheelSetSuspensionStiffness StdCall Alias "_xEntityWheelSetSuspensionStiffness" (ByVal chassisEntity As Integer, ByVal index As Integer, ByVal stiffness As Single)
  Declare Sub      xEntityWheelSetSuspensionDamping StdCall Alias "_xEntityWheelSetSuspensionDamping" (ByVal chassisEntity As Integer, ByVal index As Integer, ByVal damping As Single)
  Declare Sub      xEntityWheelSetSuspensionCompression StdCall Alias "_xEntityWheelSetSuspensionCompression" (ByVal chassisEntity As Integer, ByVal index As Integer, ByVal compression As Single)
  Declare Sub      xEntityWheelSetFriction StdCall Alias "_xEntityWheelSetFriction" (ByVal chassisEntity As Integer, ByVal index As Integer, ByVal friction As Single)
  Declare Sub      xEntityWheelSetEngineForce StdCall Alias "_xEntityWheelSetEngineForce" (ByVal chassisEntity As Integer, ByVal index As Integer, ByVal force As Single)
  Declare Sub      xEntityWheelSetRollInfluence StdCall Alias "_xEntityWheelSetRollInfluence" (ByVal chassisEntity As Integer, ByVal index As Integer, ByVal roll As Single)
  Declare Sub      xEntityWheelSetRotation StdCall Alias "_xEntityWheelSetRotation" (ByVal chassisEntity As Integer, ByVal index As Integer, ByVal rotation As Single)
  Declare Sub      xEntityWheelSetSteering StdCall Alias "_xEntityWheelSetSteering" (ByVal chassisEntity As Integer, ByVal index As Integer, ByVal steering As Single)
  Declare Sub      xEntityWheelSetConnectionPoint StdCall Alias "_xEntityWheelSetConnectionPoint" (ByVal chassisEntity As Integer, ByVal index As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal isGlobal As Integer = 0)
  Declare Function xEntityWheelGetSuspensionLength StdCall Alias "_xEntityWheelGetSuspensionLength" (ByVal chassisEntity As Integer, ByVal index As Integer) As Single
  Declare Function xEntityWheelGetPitch StdCall Alias "_xEntityWheelGetPitch" (ByVal chassisEntity As Integer, ByVal index As Integer) As Single
  Declare Function xEntityWheelGetYaw StdCall Alias "_xEntityWheelGetYaw" (ByVal chassisEntity As Integer, ByVal index As Integer) As Single
  Declare Function xEntityWheelGetRoll StdCall Alias "_xEntityWheelGetRoll" (ByVal chassisEntity As Integer, ByVal index As Integer) As Single
  Declare Function xEntityWheelGetContactEntity StdCall Alias "_xEntityWheelGetContactEntity" (ByVal chassisEntity As Integer, ByVal index As Integer) As Integer
  Declare Function xLoadPostEffect StdCall Alias "_xLoadPostEffect" (ByVal path As Zstring ptr) As Integer
  Declare Sub      xFreePostEffect StdCall Alias "_xFreePostEffect" (ByVal postEffect As Integer)
  Declare Sub      xSetPostEffect StdCall Alias "_xSetPostEffect" (ByVal index As Integer, ByVal postEffect As Integer, ByVal technique As string = "MainTechnique")
  Declare Sub      xRenderPostEffects StdCall Alias "_xRenderPostEffects" ()
  Declare Sub      xSetPostEffectInt StdCall Alias "_xSetPostEffectInt" (ByVal postEffect As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer)
  Declare Sub      xSetPostEffectFloat StdCall Alias "_xSetPostEffectFloat" (ByVal postEffect As Integer, ByVal nombre As Zstring ptr, ByVal value As Single)
  Declare Sub      xSetPostEffectBool StdCall Alias "_xSetPostEffectBool" (ByVal postEffect As Integer, ByVal nombre As Zstring ptr, ByVal value As Integer)
  Declare Sub      xSetPostEffectVector StdCall Alias "_xSetPostEffectVector" (ByVal postEffect As Integer, ByVal nombre As Zstring ptr, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal w As Single = 1.0)
  Declare Sub      xSetPostEffectTexture StdCall Alias "_xSetPostEffectTexture" (ByVal postEffect As Integer, ByVal nombre As Zstring ptr, ByVal texture As Integer, ByVal frame As Integer = 0)
  Declare Sub      xDeletePostEffectConstant StdCall Alias "_xDeletePostEffectConstant" (ByVal postEffect As Integer, ByVal nombre As Zstring ptr)
  Declare Sub      xClearPostEffectConstants StdCall Alias "_xClearPostEffectConstants" (ByVal postEffect As Integer)
  Declare Function xCreatePSystem StdCall Alias "_xCreatePSystem" (ByVal pointSprites As Integer = 0) As Integer
  Declare Function xPSystemType StdCall Alias "_xPSystemType" (ByVal psystem As Integer) As Integer
  Declare Sub      xPSystemSetBlend StdCall Alias "_xPSystemSetBlend" (ByVal psystem As Integer, ByVal mode As Integer)
  Declare Function xPSystemGetBlend StdCall Alias "_xPSystemGetBlend" (ByVal psystem As Integer) As Integer
  Declare Sub      xPSystemSetMaxParticles StdCall Alias "_xPSystemSetMaxParticles" (ByVal psystem As Integer, ByVal maxNumber As Integer)
  Declare Function xPSystemGetMaxParticles StdCall Alias "_xPSystemGetMaxParticles" (ByVal psystem As Integer) As Integer
  Declare Sub      xPSystemSetEmitterLifetime StdCall Alias "_xPSystemSetEmitterLifetime" (ByVal psystem As Integer, ByVal lifetime As Integer)
  Declare Function xPSystemGetEmitterLifetime StdCall Alias "_xPSystemGetEmitterLifetime" (ByVal psystem As Integer) As Integer
  Declare Sub      xPSystemSetParticleLifetime StdCall Alias "_xPSystemSetParticleLifetime" (ByVal psystem As Integer, ByVal lifetime As Integer)
  Declare Function xPSystemGetParticleLifetime StdCall Alias "_xPSystemGetParticleLifetime" (ByVal psystem As Integer) As Integer
  Declare Sub      xPSystemSetCreationInterval StdCall Alias "_xPSystemSetCreationInterval" (ByVal psystem As Integer, ByVal interval As Integer)
  Declare Function xPSystemGetCreationInterval StdCall Alias "_xPSystemGetCreationInterval" (ByVal psystem As Integer) As Integer
  Declare Sub      xPSystemSetCreationFrequency StdCall Alias "_xPSystemSetCreationFrequency" (ByVal psystem As Integer, ByVal frequency As Integer)
  Declare Function xPSystemGetCreationFrequency StdCall Alias "_xPSystemGetCreationFrequency" (ByVal psystem As Integer) As Integer
  Declare Sub      xPSystemSetTexture StdCall Alias "_xPSystemSetTexture" (ByVal psystem As Integer, ByVal texture As Integer, ByVal frames As Integer, ByVal speed As Single)
  Declare Function xPSystemGetTexture StdCall Alias "_xPSystemGetTexture" (ByVal psystem As Integer) As Integer
  Declare Function xPSystemGetTextureFrames StdCall Alias "_xPSystemGetTextureFrames" (ByVal psystem As Integer) As Integer
  Declare Function xPSystemGetTextureAnimationSpeed StdCall Alias "_xPSystemGetTextureAnimationSpeed" (ByVal psystem As Integer) As Integer
  Declare Sub      xPSystemSetOffset StdCall Alias "_xPSystemSetOffset" (ByVal psystem As Integer, ByVal minx As Single, ByVal miny As Single, ByVal minz As Single, ByVal maxx As Single, ByVal maxy As Single, ByVal maxz As Single)
  Declare Function xPSystemGetOffsetMinX StdCall Alias "_xPSystemGetOffsetMinX" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetOffsetMinY StdCall Alias "_xPSystemGetOffsetMinY" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetOffsetMinZ StdCall Alias "_xPSystemGetOffsetMinZ" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetOffsetMaxX StdCall Alias "_xPSystemGetOffsetMaxX" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetOffsetMaxY StdCall Alias "_xPSystemGetOffsetMaxY" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetOffsetMaxZ StdCall Alias "_xPSystemGetOffsetMaxZ" (ByVal psystem As Integer) As Single
  Declare Sub      xPSystemSetVelocity StdCall Alias "_xPSystemSetVelocity" (ByVal psystem As Integer, ByVal minx As Single, ByVal miny As Single, ByVal minz As Single, ByVal maxx As Single, ByVal maxy As Single, ByVal maxz As Single)
  Declare Function xPSystemGetVelocityMinX StdCall Alias "_xPSystemGetVelocityMinX" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetVelocityMinY StdCall Alias "_xPSystemGetVelocityMinY" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetVelocityMinZ StdCall Alias "_xPSystemGetVelocityMinZ" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetVelocityMaxX StdCall Alias "_xPSystemGetVelocityMaxX" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetVelocityMaxY StdCall Alias "_xPSystemGetVelocityMaxY" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetVelocityMaxZ StdCall Alias "_xPSystemGetVelocityMaxZ" (ByVal psystem As Integer) As Single
  Declare Sub      xPSystemEnableFixedQuads StdCall Alias "_xPSystemEnableFixedQuads" (ByVal psystem As Integer, ByVal state As Integer)
  Declare Function xPSystemFixedQuadsUsed StdCall Alias "_xPSystemFixedQuadsUsed" (ByVal psystem As Integer) As Integer
  Declare Sub      xPSystemSetTorque StdCall Alias "_xPSystemSetTorque" (ByVal psystem As Integer, ByVal minx As Single, ByVal miny As Single, ByVal minz As Single, ByVal maxx As Single, ByVal maxy As Single, ByVal maxz As Single)
  Declare Function xPSystemGetTorqueMinX StdCall Alias "_xPSystemGetTorqueMinX" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetTorqueMinY StdCall Alias "_xPSystemGetTorqueMinY" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetTorqueMinZ StdCall Alias "_xPSystemGetTorqueMinZ" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetTorqueMaxX StdCall Alias "_xPSystemGetTorqueMaxX" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetTorqueMaxY StdCall Alias "_xPSystemGetTorqueMaxY" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetTorqueMaxZ StdCall Alias "_xPSystemGetTorqueMaxZ" (ByVal psystem As Integer) As Single
  Declare Sub      xPSystemSetGravity StdCall Alias "_xPSystemSetGravity" (ByVal psystem As Integer, ByVal gravity As Single)
  Declare Function xPSystemGetGravity StdCall Alias "_xPSystemGetGravity" (ByVal psystem As Integer) As Single
  Declare Sub      xPSystemSetAlpha StdCall Alias "_xPSystemSetAlpha" (ByVal psystem As Integer, ByVal alpha2 As Single)
  Declare Function xPSystemGetAlpha StdCall Alias "_xPSystemGetAlpha" (ByVal psystem As Integer) As Single
  Declare Sub      xPSystemSetFadeSpeed StdCall Alias "_xPSystemSetFadeSpeed" (ByVal psystem As Integer, ByVal speed As Single)
  Declare Function xPSystemGetFadeSpeed StdCall Alias "_xPSystemGetFadeSpeed" (ByVal psystem As Integer) As Single
  Declare Sub      xPSystemSetParticleSize StdCall Alias "_xPSystemSetParticleSize" (ByVal psystem As Integer, ByVal minx As Single, ByVal miny As Single, ByVal maxx As Single, ByVal maxy As Single)
  Declare Function xPSystemGetSizeMinX StdCall Alias "_xPSystemGetSizeMinX" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetSizeMinY StdCall Alias "_xPSystemGetSizeMinY" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetSizeMaxX StdCall Alias "_xPSystemGetSizeMaxX" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetSizeMaxY StdCall Alias "_xPSystemGetSizeMaxY" (ByVal psystem As Integer) As Single
  Declare Sub      xPSystemSetScaleSpeed StdCall Alias "_xPSystemSetScaleSpeed" (ByVal psystem As Integer, ByVal minx As Single, ByVal miny As Single, ByVal maxx As Single, ByVal maxy As Single)
  Declare Function xPSystemGetScaleSpeedMinX StdCall Alias "_xPSystemGetScaleSpeedMinX" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetScaleSpeedMinY StdCall Alias "_xPSystemGetScaleSpeedMinY" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetScaleSpeedMaxX StdCall Alias "_xPSystemGetScaleSpeedMaxX" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetScaleSpeedMaxY StdCall Alias "_xPSystemGetScaleSpeedMaxY" (ByVal psystem As Integer) As Single
  Declare Sub      xPSystemSetAngles StdCall Alias "_xPSystemSetAngles" (ByVal psystem As Integer, ByVal minx As Single, ByVal miny As Single, ByVal minz As Single, ByVal maxx As Single, ByVal maxy As Single, ByVal maxz As Single)
  Declare Function xPSystemGetAnglesMinX StdCall Alias "_xPSystemGetAnglesMinX" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetAnglesMinY StdCall Alias "_xPSystemGetAnglesMinY" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetAnglesMinZ StdCall Alias "_xPSystemGetAnglesMinZ" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetAnglesMaxX StdCall Alias "_xPSystemGetAnglesMaxX" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetAnglesMaxY StdCall Alias "_xPSystemGetAnglesMaxY" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetAnglesMaxZ StdCall Alias "_xPSystemGetAnglesMaxZ" (ByVal psystem As Integer) As Single
  Declare Sub      xPSystemSetColorMode StdCall Alias "_xPSystemSetColorMode" (ByVal psystem As Integer, ByVal mode As Integer)
  Declare Function xPSystemGetColorMode StdCall Alias "_xPSystemGetColorMode" (ByVal psystem As Integer) As Integer
  Declare Sub      xPSystemSetColors StdCall Alias "_xPSystemSetColors" (ByVal psystem As Integer, ByVal sred As Single, ByVal sgreen As Single, ByVal sblue As Single, ByVal ered As Single, ByVal egreen As Single, ByVal eblue As Single)
  Declare Function xPSystemGetBeginColorRed StdCall Alias "_xPSystemGetBeginColorRed" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetBeginColorGreen StdCall Alias "_xPSystemGetBeginColorGreen" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetBeginColorBlue StdCall Alias "_xPSystemGetBeginColorBlue" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetEndColorRed StdCall Alias "_xPSystemGetEndColorRed" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetEndColorGreen StdCall Alias "_xPSystemGetEndColorGreen" (ByVal psystem As Integer) As Single
  Declare Function xPSystemGetEndColorBlue StdCall Alias "_xPSystemGetEndColorBlue" (ByVal psystem As Integer) As Single
  Declare Sub      xFreePSystem StdCall Alias "_xFreePSystem" (ByVal psystem As Integer)
  Declare Sub      xPSystemSetParticleParenting StdCall Alias "_xPSystemSetParticleParenting" (ByVal psystem As Integer, ByVal mode As Integer)
  Declare Function xPSystemGetParticleParenting StdCall Alias "_xPSystemGetParticleParenting" (ByVal psystem As Integer) As Integer
  Declare Function xLinePick StdCall Alias "_xLinePick" (ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal dx As Single, ByVal dy As Single, ByVal dz As Single, ByVal distance As Single = 0.0) As Integer
  Declare Function xEntityPick StdCall Alias "_xEntityPick" (ByVal entity As Integer, ByVal range As Single = 0.0) As Integer
  Declare Function xCameraPick StdCall Alias "_xCameraPick" (ByVal camera As Integer, ByVal x As Integer, ByVal y As Integer) As Integer
  Declare Function xPickedNX StdCall Alias "_xPickedNX" () As Single
  Declare Function xPickedNY StdCall Alias "_xPickedNY" () As Single
  Declare Function xPickedNZ StdCall Alias "_xPickedNZ" () As Single
  Declare Function xPickedX StdCall Alias "_xPickedX" () As Single
  Declare Function xPickedY StdCall Alias "_xPickedY" () As Single
  Declare Function xPickedZ StdCall Alias "_xPickedZ" () As Single
  Declare Function xPickedEntity StdCall Alias "_xPickedEntity" () As Integer
  Declare Function xPickedSurface StdCall Alias "_xPickedSurface" () As Integer
  Declare Function xPickedTriangle StdCall Alias "_xPickedTriangle" () As Integer
  Declare Function xPickedTime StdCall Alias "_xPickedTime" () As Integer
  Declare Sub      xSetShadowsBlur StdCall Alias "_xSetShadowsBlur" (ByVal blurLevel As Integer)
  Declare Sub      xSetShadowShader StdCall Alias "_xSetShadowShader" (ByVal path As Zstring ptr)
  Declare Function xInitShadows StdCall Alias "_xInitShadows" (ByVal dirSize As Integer, ByVal spotSize As Integer, ByVal pointSize As Integer) As Integer
  Declare Sub      xSetShadowParams StdCall Alias "_xSetShadowParams" (ByVal splitPlanes As Integer = 4, ByVal splitLambda As Single = 0.95, ByVal useOrtho As Integer = 1, ByVal lightDist As Single = 300.0)
  Declare Sub      xRenderShadows StdCall Alias "_xRenderShadows" (ByVal mainCamera As Integer, ByVal texture As Integer)
  Declare Sub      xShadowPriority StdCall Alias "_xShadowPriority" (ByVal priority As Integer)
  Declare Sub      xCameraDisableShadows StdCall Alias "_xCameraDisableShadows" (ByVal camera As Integer)
  Declare Sub      xCameraEnableShadows StdCall Alias "_xCameraEnableShadows" (ByVal camera As Integer)
  Declare Sub      xEntityCastShadows StdCall Alias "_xEntityCastShadows" (ByVal entity As Integer, ByVal light As Integer, ByVal state As Integer)
  Declare Sub      xEntityReceiveShadows StdCall Alias "_xEntityReceiveShadows" (ByVal entity As Integer, ByVal light As Integer, ByVal state As Integer)
  Declare Function xEntityIsCaster StdCall Alias "_xEntityIsCaster" (ByVal entity As Integer, ByVal light As Integer) As Integer
  Declare Function xEntityIsReceiver StdCall Alias "_xEntityIsReceiver" (ByVal entity As Integer, ByVal light As Integer) As Integer
  Declare Function xLoadSound StdCall Alias "_xLoadSound" (ByVal path As Zstring ptr) As Integer
  Declare Function xLoad3DSound StdCall Alias "_xLoad3DSound" (ByVal path As Zstring ptr) As Integer
  Declare Sub      xFreeSound StdCall Alias "_xFreeSound" (ByVal sound As Integer)
  Declare Sub      xLoopSound StdCall Alias "_xLoopSound" (ByVal sound As Integer)
  Declare Sub      xSoundPitch StdCall Alias "_xSoundPitch" (ByVal sound As Integer, ByVal pitch As Integer)
  Declare Sub      xSoundVolume StdCall Alias "_xSoundVolume" (ByVal sound As Integer, ByVal volume As Single)
  Declare Sub      xSoundPan StdCall Alias "_xSoundPan" (ByVal sound As Integer, ByVal pan As Single)
  Declare Function xPlaySound StdCall Alias "_xPlaySound" (ByVal sound As Integer) As Integer
  Declare Sub      xStopChannel StdCall Alias "_xStopChannel" (ByVal channel As Integer)
  Declare Sub      xPauseChannel StdCall Alias "_xPauseChannel" (ByVal channel As Integer)
  Declare Sub      xResumeChannel StdCall Alias "_xResumeChannel" (ByVal channel As Integer)
  Declare Function xPlayMusic StdCall Alias "_xPlayMusic" (ByVal path As Zstring ptr) As Integer
  Declare Sub      xChannelPitch StdCall Alias "_xChannelPitch" (ByVal channel As Integer, ByVal pitch As Integer)
  Declare Sub      xChannelVolume StdCall Alias "_xChannelVolume" (ByVal channel As Integer, ByVal volume As Single)
  Declare Sub      xChannelPan StdCall Alias "_xChannelPan" (ByVal channel As Integer, ByVal pan As Single)
  Declare Function xChannelPlaying StdCall Alias "_xChannelPlaying" (ByVal channel As Integer) As Integer
  Declare Function xEmitSound StdCall Alias "_xEmitSound" (ByVal sound As Integer, ByVal entity As Integer) As Integer
  Declare Function xCreateListener StdCall Alias "_xCreateListener" (ByVal parent As Integer = 0, ByVal roFactor As Single = 1.0, ByVal doplerFactor As Single = 1.0, ByVal distFactor As Single = 1.0) As Integer
  Declare Function xGetListener StdCall Alias "_xGetListener" () As Integer
  Declare Function xInitalizeSound StdCall Alias "_xInitalizeSound" () As Integer
  Declare Function xCreateSprite StdCall Alias "_xCreateSprite" (ByVal parent As Integer = 0) As Integer
  Declare Sub      xSpriteViewMode StdCall Alias "_xSpriteViewMode" (ByVal sprite As Integer, ByVal mode As Integer)
  Declare Sub      xHandleSprite StdCall Alias "_xHandleSprite" (ByVal sprite As Integer, ByVal x As Single, ByVal y As Single)
  Declare Function xLoadSprite StdCall Alias "_xLoadSprite" (ByVal path As Zstring ptr, ByVal flags As Integer = 9, ByVal parent As Integer = 0) As Integer
  Declare Sub      xRotateSprite StdCall Alias "_xRotateSprite" (ByVal sprite As Integer, ByVal angle As Single)
  Declare Sub      xScaleSprite StdCall Alias "_xScaleSprite" (ByVal sprite As Integer, ByVal xScale As Single, ByVal yScale As Single)
  Declare Function xCreateSurface StdCall Alias "_xCreateSurface" (ByVal entity As Integer, ByVal brush As Integer = 0, ByVal dynamic As Integer = 0) As Integer
  Declare Function xGetSurfaceBrush StdCall Alias "_xGetSurfaceBrush" (ByVal surface As Integer) As Integer
  Declare Function xAddVertex StdCall Alias "_xAddVertex" (ByVal surface As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal u As Single = 0.0, ByVal v As Single = 0.0, ByVal w As Single = 0.0) As Integer
  Declare Function xAddTriangle StdCall Alias "_xAddTriangle" (ByVal surface As Integer, ByVal v0 As Integer, ByVal v1 As Integer, ByVal v2 As Integer) As Integer
  Declare Sub      xSetSurfaceFrustumSphere StdCall Alias "_xSetSurfaceFrustumSphere" (ByVal surface As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal radii As Single)
  Declare Sub      xVertexCoords StdCall Alias "_xVertexCoords" (ByVal surface As Integer, ByVal vertex As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Sub      xVertexNormal StdCall Alias "_xVertexNormal" (ByVal surface As Integer, ByVal vertex As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Sub      xVertexTangent StdCall Alias "_xVertexTangent" (ByVal surface As Integer, ByVal vertex As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Sub      xVertexBinormal StdCall Alias "_xVertexBinormal" (ByVal surface As Integer, ByVal vertex As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single)
  Declare Sub      xVertexColor StdCall Alias "_xVertexColor" (ByVal surface As Integer, ByVal vertex As Integer, ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer, ByVal alpha2 As Single = 1.0)
  Declare Sub      xVertexTexCoords StdCall Alias "_xVertexTexCoords" (ByVal surface As Integer, ByVal vertex As Integer, ByVal u As Single, ByVal v As Single, ByVal w As Single = 1.0, ByVal textureSet As Integer = 0)
  Declare Function xCountVertices StdCall Alias "_xCountVertices" (ByVal surface As Integer) As Integer
  Declare Function xVertexX StdCall Alias "_xVertexX" (ByVal surface As Integer, ByVal vertex As Integer) As Single
  Declare Function xVertexY StdCall Alias "_xVertexY" (ByVal surface As Integer, ByVal vertex As Integer) As Single
  Declare Function xVertexZ StdCall Alias "_xVertexZ" (ByVal surface As Integer, ByVal vertex As Integer) As Single
  Declare Function xVertexNX StdCall Alias "_xVertexNX" (ByVal surface As Integer, ByVal vertex As Integer) As Single
  Declare Function xVertexNY StdCall Alias "_xVertexNY" (ByVal surface As Integer, ByVal vertex As Integer) As Single
  Declare Function xVertexNZ StdCall Alias "_xVertexNZ" (ByVal surface As Integer, ByVal vertex As Integer) As Single
  Declare Function xVertexTX StdCall Alias "_xVertexTX" (ByVal surface As Integer, ByVal vertex As Integer) As Single
  Declare Function xVertexTY StdCall Alias "_xVertexTY" (ByVal surface As Integer, ByVal vertex As Integer) As Single
  Declare Function xVertexTZ StdCall Alias "_xVertexTZ" (ByVal surface As Integer, ByVal vertex As Integer) As Single
  Declare Function xVertexBX StdCall Alias "_xVertexBX" (ByVal surface As Integer, ByVal vertex As Integer) As Single
  Declare Function xVertexBY StdCall Alias "_xVertexBY" (ByVal surface As Integer, ByVal vertex As Integer) As Single
  Declare Function xVertexBZ StdCall Alias "_xVertexBZ" (ByVal surface As Integer, ByVal vertex As Integer) As Single
  Declare Function xVertexU StdCall Alias "_xVertexU" (ByVal surface As Integer, ByVal vertex As Integer, ByVal textureSet As Integer = 0) As Single
  Declare Function xVertexV StdCall Alias "_xVertexV" (ByVal surface As Integer, ByVal vertex As Integer, ByVal textureSet As Integer = 0) As Single
  Declare Function xVertexW StdCall Alias "_xVertexW" (ByVal surface As Integer, ByVal vertex As Integer, ByVal textureSet As Integer = 0) As Single
  Declare Function xVertexRed StdCall Alias "_xVertexRed" (ByVal surface As Integer, ByVal vertex As Integer) As Single
  Declare Function xVertexGreen StdCall Alias "_xVertexGreen" (ByVal surface As Integer, ByVal vertex As Integer) As Single
  Declare Function xVertexBlue StdCall Alias "_xVertexBlue" (ByVal surface As Integer, ByVal vertex As Integer) As Single
  Declare Function xVertexAlpha StdCall Alias "_xVertexAlpha" (ByVal surface As Integer, ByVal vertex As Integer) As Single
  Declare Function xTriangleVertex StdCall Alias "_xTriangleVertex" (ByVal surface As Integer, ByVal triangle As Integer, ByVal corner As Integer) As Integer
  Declare Function xCountTriangles StdCall Alias "_xCountTriangles" (ByVal surface As Integer) As Integer
  Declare Sub      xPaintSurface StdCall Alias "_xPaintSurface" (ByVal surface As Integer, ByVal brush As Integer)
  Declare Sub      xClearSurface StdCall Alias "_xClearSurface" (ByVal surface As Integer, ByVal vertices As Integer = 1, ByVal triangles As Integer = 1)
  Declare Function xGetSurfaceTexture StdCall Alias "_xGetSurfaceTexture" (ByVal surface As Integer, ByVal index As Integer = 0) As Integer
  Declare Sub      xFreeSurface StdCall Alias "_xFreeSurface" (ByVal surface As Integer)
  Declare Sub      xSurfacePrimitiveType StdCall Alias "_xSurfacePrimitiveType" (ByVal surface As Integer, ByVal ptype As Integer)
  Declare Sub      xSurfaceTexture StdCall Alias "_xSurfaceTexture" (ByVal surface As Integer, ByVal texture As Integer, ByVal frame As Integer, ByVal index As Integer)
  Declare Sub      xSurfaceColor StdCall Alias "_xSurfaceColor" (ByVal surface As Integer, ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer)
  Declare Sub      xSurfaceAlpha StdCall Alias "_xSurfaceAlpha" (ByVal surface As Integer, ByVal alpha2 As Single)
  Declare Sub      xSurfaceShininess StdCall Alias "_xSurfaceShininess" (ByVal surface As Integer, ByVal shininess As Single)
  Declare Sub      xSurfaceBlend StdCall Alias "_xSurfaceBlend" (ByVal surface As Integer, ByVal blendMode As Integer)
  Declare Sub      xSurfaceFX StdCall Alias "_xSurfaceFX" (ByVal surface As Integer, ByVal fxFlags As Integer)
  Declare Sub      xSurfaceAlphaRef StdCall Alias "_xSurfaceAlphaRef" (ByVal surface As Integer, ByVal alphaRef As Integer)
  Declare Sub      xSurfaceAlphaFunc StdCall Alias "_xSurfaceAlphaFunc" (ByVal surface As Integer, ByVal alphaFunc As Integer)
  Declare Function xCPUName StdCall Alias "_xCPUName" () As Zstring ptr
  Declare Function xCPUVendor StdCall Alias "_xCPUVendor" () As Zstring ptr
  Declare Function xCPUFamily StdCall Alias "_xCPUFamily" () As Integer
  Declare Function xCPUModel StdCall Alias "_xCPUModel" () As Integer
  Declare Function xCPUStepping StdCall Alias "_xCPUStepping" () As Integer
  Declare Function xCPUSpeed StdCall Alias "_xCPUSpeed" () As Integer
  Declare Function xVideoInfo StdCall Alias "_xVideoInfo" () As Zstring ptr
  Declare Function xVideoAspectRatio StdCall Alias "_xVideoAspectRatio" () As Single
  Declare Function xVideoAspectRatioStr StdCall Alias "_xVideoAspectRatioStr" () As Zstring ptr
  Declare Function xGetTotalPhysMem StdCall Alias "_xGetTotalPhysMem" () As Single
  Declare Function xGetAvailPhysMem StdCall Alias "_xGetAvailPhysMem" () As Single
  Declare Function xGetTotalPageMem StdCall Alias "_xGetTotalPageMem" () As Single
  Declare Function xGetAvailPageMem StdCall Alias "_xGetAvailPageMem" () As Single
  Declare Function xGetTotalVidMem StdCall Alias "_xGetTotalVidMem" () As Single
  Declare Function xGetAvailVidMem StdCall Alias "_xGetAvailVidMem" () As Single
  Declare Function xGetTotalVidLocalMem StdCall Alias "_xGetTotalVidLocalMem" () As Single
  Declare Function xGetAvailVidLocalMem StdCall Alias "_xGetAvailVidLocalMem" () As Single
  Declare Function xGetTotalVidNonlocalMem StdCall Alias "_xGetTotalVidNonlocalMem" () As Single
  Declare Function xGetAvailVidNonlocalMem StdCall Alias "_xGetAvailVidNonlocalMem" () As Single
  Declare Function xGetXors3dVersion StdCall Alias "_xGetXors3dVersion" () As Zstring ptr
  Declare Function xGetXors3dMajorVersion StdCall Alias "_xGetXors3dMajorVersion" () As Integer
  Declare Function xGetXors3dMinorVersion StdCall Alias "_xGetXors3dMinorVersion" () As Integer
  Declare Function xGetXors3dRevision StdCall Alias "_xGetXors3dRevision" () As Integer
  Declare Function xLoadTerrain StdCall Alias "_xLoadTerrain" (ByVal path As Zstring ptr, ByVal parent As Integer = 0) As Integer
  Declare Function xCreateTerrain StdCall Alias "_xCreateTerrain" (ByVal size As Integer, ByVal parent As Integer = 0) As Integer
  Declare Sub      xTerrainShading StdCall Alias "_xTerrainShading" (ByVal terrain As Integer, ByVal state As Integer = 0)
  Declare Function xTerrainHeight StdCall Alias "_xTerrainHeight" (ByVal terrain As Integer, ByVal x As Integer, ByVal y As Integer) As Single
  Declare Function xTerrainSize StdCall Alias "_xTerrainSize" (ByVal terrain As Integer) As Integer
  Declare Function xTerrainX StdCall Alias "_xTerrainX" (ByVal terrain As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single) As Single
  Declare Function xTerrainY StdCall Alias "_xTerrainY" (ByVal terrain As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single) As Single
  Declare Function xTerrainZ StdCall Alias "_xTerrainZ" (ByVal terrain As Integer, ByVal x As Single, ByVal y As Single, ByVal z As Single) As Single
  Declare Sub      xModifyTerrain StdCall Alias "_xModifyTerrain" (ByVal terrain As Integer, ByVal x As Integer, ByVal y As Integer, ByVal height As Single, ByVal realtime As Integer = 0)
  Declare Sub      xTerrainDetail StdCall Alias "_xTerrainDetail" (ByVal terrain As Integer, ByVal detail As Integer)
  Declare Sub      xTerrainSplatting StdCall Alias "_xTerrainSplatting" (ByVal terrain As Integer, ByVal state As Integer)
  Declare Function xLoadTerrainTexture StdCall Alias "_xLoadTerrainTexture" (ByVal path As Zstring ptr) As Integer
  Declare Sub      xFreeTerrainTexture StdCall Alias "_xFreeTerrainTexture" (ByVal texture As Integer)
  Declare Sub      xTerrainTextureLightmap StdCall Alias "_xTerrainTextureLightmap" (ByVal texture As Integer, ByVal state As Integer)
  Declare Sub      xTerrainTexture StdCall Alias "_xTerrainTexture" (ByVal terrain As Integer, ByVal texture As Integer)
  Declare Sub      xTerrainViewZone StdCall Alias "_xTerrainViewZone" (ByVal terrain As Integer, ByVal viewZone As Integer, ByVal texturingZone As Integer = -1)
  Declare Sub      xTerrainLODs StdCall Alias "_xTerrainLODs" (ByVal lodsCount As Integer)
  Declare Function xTextureWidth StdCall Alias "_xTextureWidth" (ByVal texture As Integer) As Integer
  Declare Function xTextureHeight StdCall Alias "_xTextureHeight" (ByVal texture As Integer) As Integer
  Declare Function xCreateTexture StdCall Alias "_xCreateTexture" (ByVal width As Integer, ByVal height As Integer, ByVal flags As Integer = 9, ByVal frames As Integer = 1) As Integer
  Declare Sub      xFreeTexture StdCall Alias "_xFreeTexture" (ByVal texture As Integer)
  Declare Sub      xSetTextureFilter StdCall Alias "_xSetTextureFilter" (ByVal texture As Integer, ByVal mode As Integer)
  Declare Sub      xTextureBlend StdCall Alias "_xTextureBlend" (ByVal texture As Integer, ByVal blend As Integer)
  Declare Sub      xTextureCoords StdCall Alias "_xTextureCoords" (ByVal texture As Integer, ByVal coords As Integer)
  Declare Sub      xTextureFilter StdCall Alias "_xTextureFilter" (ByVal matchText As Zstring ptr, ByVal flags As Integer)
  Declare Sub      xClearTextureFilters StdCall Alias "_xClearTextureFilters" ()
  Declare Function xLoadTexture StdCall Alias "_xLoadTexture" (ByVal path As Zstring ptr, ByVal flags As Integer = 9) As Integer
  Declare Function xTextureName StdCall Alias "_xTextureName" (ByVal texture As Integer) As Zstring ptr
  Declare Sub      xPositionTexture StdCall Alias "_xPositionTexture" (ByVal texture As Integer, ByVal x As Single, ByVal y As Single)
  Declare Sub      xScaleTexture StdCall Alias "_xScaleTexture" (ByVal texture As Integer, ByVal x As Single, ByVal y As Single)
  Declare Sub      xRotateTexture StdCall Alias "_xRotateTexture" (ByVal texture As Integer, ByVal angle As Single)
  Declare Function xLoadAnimTexture StdCall Alias "_xLoadAnimTexture" (ByVal path As Zstring ptr, ByVal flags As Integer, ByVal width As Integer, ByVal height As Integer, ByVal startFrame As Integer, ByVal frames As Integer) As Integer
  Declare Function xCreateTextureFromData StdCall Alias "_xCreateTextureFromData" (ByVal pixelsData As Integer, ByVal width As Integer, ByVal height As Integer, ByVal flags As Integer = 9, ByVal frames As Integer = 1) As Integer
  Declare Function xGetTextureData StdCall Alias "_xGetTextureData" (ByVal texture As Integer, ByVal frame As Integer = 0) As Integer
  Declare Function xGetTextureDataPitch StdCall Alias "_xGetTextureDataPitch" (ByVal texture As Integer, ByVal frame As Integer = 0) As Integer
  Declare Function xGetTextureSurface StdCall Alias "_xGetTextureSurface" (ByVal texture As Integer, ByVal frame As Integer = 0) As Integer
  Declare Function xGetTextureFrames StdCall Alias "_xGetTextureFrames" (ByVal texture As Integer) As Integer
  Declare Sub      xSetCubeFace StdCall Alias "_xSetCubeFace" (ByVal texture As Integer, ByVal face As Integer)
  Declare Sub      xSetCubeMode StdCall Alias "_xSetCubeMode" (ByVal texture As Integer, ByVal mode As Integer)
  Declare Function xGetTextureBlend StdCall Alias "_xGetTextureBlend" (ByVal texture As Integer) As Integer
  Declare Function xGetTextureX StdCall Alias "_xGetTextureX" (ByVal texture As Integer) As Single
  Declare Function xGetTextureY StdCall Alias "_xGetTextureY" (ByVal texture As Integer) As Single
  Declare Function xGetTextureScaleX StdCall Alias "_xGetTextureScaleX" (ByVal texture As Integer) As Single
  Declare Function xGetTextureScaleY StdCall Alias "_xGetTextureScaleY" (ByVal texture As Integer) As Single
  Declare Function xGetTextureAngle StdCall Alias "_xGetTextureAngle" (ByVal texture As Integer) As Single
  Declare Function xGetTextureCoords StdCall Alias "_xGetTextureCoords" (ByVal texture As Integer) As Integer
  Declare Function xGetCubeFace StdCall Alias "_xGetCubeFace" (ByVal texture As Integer) As Integer
  Declare Function xGetCubeMode StdCall Alias "_xGetCubeMode" (ByVal texture As Integer) As Integer
  Declare Function xGetTextureFlags StdCall Alias "_xGetTextureFlags" (ByVal texture As Integer) As Integer
  Declare Sub      xSetTextureFlags StdCall Alias "_xSetTextureFlags" (ByVal texture As Integer, ByVal flags As Integer)
  Declare Function xTextureCounter StdCall Alias "_xTextureCounter" (ByVal texture As Integer) As Integer
  Declare Function xVectorPitch StdCall Alias "_xVectorPitch" (ByVal x As Single, ByVal y As Single, ByVal z As Single) As Single
  Declare Function xVectorYaw StdCall Alias "_xVectorYaw" (ByVal x As Single, ByVal y As Single, ByVal z As Single) As Single
  Declare Function xDeltaPitch StdCall Alias "_xDeltaPitch" (ByVal entity1 As Integer, ByVal entity2 As Integer) As Single
  Declare Function xDeltaYaw StdCall Alias "_xDeltaYaw" (ByVal entity1 As Integer, ByVal entity2 As Integer) As Single
  Declare Function xTFormedX StdCall Alias "_xTFormedX" () As Single
  Declare Function xTFormedY StdCall Alias "_xTFormedY" () As Single
  Declare Function xTFormedZ StdCall Alias "_xTFormedZ" () As Single
  Declare Sub      xTFormPoint StdCall Alias "_xTFormPoint" (ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal source As Integer, ByVal destination As Integer)
  Declare Sub      xTFormVector StdCall Alias "_xTFormVector" (ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal source As Integer, ByVal destination As Integer)
  Declare Sub      xTFormNormal StdCall Alias "_xTFormNormal" (ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal source As Integer, ByVal destination As Integer)
  Declare Function xOpenMovie StdCall Alias "_xOpenMovie" (ByVal path As Zstring ptr) As Integer
  Declare Sub      xCloseMovie StdCall Alias "_xCloseMovie" (ByVal video As Integer)
  Declare Sub      xDrawMovie StdCall Alias "_xDrawMovie" (ByVal video As Integer, ByVal x As Integer = 0, ByVal y As Integer = 0, ByVal width As Integer = -1, ByVal height As Integer = -1)
  Declare Function xMovieWidth StdCall Alias "_xMovieWidth" (ByVal video As Integer) As Integer
  Declare Function xMovieHeight StdCall Alias "_xMovieHeight" (ByVal video As Integer) As Integer
  Declare Function xMoviePlaying StdCall Alias "_xMoviePlaying" (ByVal video As Integer) As Integer
  Declare Sub      xMovieSeek StdCall Alias "_xMovieSeek" (ByVal video As Integer, ByVal time As Single, ByVal relative As Integer = 0)
  Declare Function xMovieLength StdCall Alias "_xMovieLength" (ByVal video As Integer) As Single
  Declare Function xMovieCurrentTime StdCall Alias "_xMovieCurrentTime" (ByVal video As Integer) As Single
  Declare Sub      xMoviePause StdCall Alias "_xMoviePause" (ByVal video As Integer)
  Declare Sub      xMovieResume StdCall Alias "_xMovieResume" (ByVal video As Integer)
  Declare Function xMovieTexture StdCall Alias "_xMovieTexture" (ByVal video As Integer) As Integer
  Declare Function xCreateWorld StdCall Alias "_xCreateWorld" () As Integer
  Declare Sub      xSetActiveWorld StdCall Alias "_xSetActiveWorld" (ByVal world As Integer)
  Declare Function xGetActiveWorld StdCall Alias "_xGetActiveWorld" () As Integer
  Declare Function xGetDefaultWorld StdCall Alias "_xGetDefaultWorld" () As Integer
  Declare Sub      xDeleteWorld StdCall Alias "_xDeleteWorld" (ByVal world As Integer)

Dr_D
Posts: 2398
Joined: May 27, 2005 4:59
Contact:

Re: "Another" 3d engine Xors3D (abandoned)

Postby Dr_D » Jun 06, 2020 20:41

Hi. I'm always interested in 3D engines. Do you happen to have a version of this in zip format?
ShawnLG
Posts: 137
Joined: Dec 25, 2008 20:21

Re: "Another" 3d engine Xors3D (abandoned)

Postby ShawnLG » Jun 08, 2020 2:36

Dr_D wrote:Hi. I'm always interested in 3D engines.


You might like Genesis3D SDK. It is also abandonware. I remember playing the demo in the late 90s. It has that nastalgec Quake feel to it. The source is in C for version 1.2, so it can be translated to FB.

https://www.genesis3d.com/

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 3 guests