May 19, 2024, 02:50:20 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Xors3d

Started by matty47, April 05, 2023, 01:23:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

matty47

Many years ago I purchased Xors3d SDK - therefore I have my own key for the engine. Numerous sites claim that this SDK is abandonware and one site I know has keys for the SDK. I have been working on creating the inc file for Xors3d - there are over 1000 commands available and I'm not sure how many I have left to do. Here is the inc file up to date for any interested I called it xors.inc

#use "xors3d.lib"


// Log levels
#define LOG_NO             5
#define LOG_FATAL          4
#define LOG_ERROR          3
#define LOG_WARNING        2
#define LOG_MESSAGE        1
#define LOG_INFO           0

// Log targets
#define LOG_HTML              1
#define LOG_COUT              2
#define LOG_STRING            4

// Skinning types
#define SKIN_SOFTWARE  2
#define SKIN_HARDWARE  1

// Light sources types
#define xLIGHT_DIRECTIONAL  1
#define xLIGHT_POINT        2
#define xLIGHT_SPOT         3

// Texture filtering
#define TF_NONE            0
#define TF_POINT           1
#define TF_LINEAR          2
#define TF_ANISOTROPIC     3
#define TF_ANISOTROPICX4   4
#define TF_ANISOTROPICX8   5
#define TF_ANISOTROPICX16  6

// PixelShader versions
#define PS_1_1  0
#define PS_1_2  1
#define PS_1_3  2
#define PS_1_4  3
#define PS_2_0  4
#define PS_3_0  5

// VertexShader versions
#define VS_1_1  0
#define VS_2_0  1
#define VS_3_0  2

// Matrix semantics
#define WORLD                          0
#define WORLDVIEWPROJ                  1
#define VIEWPROJ                       2
#define VIEW                           3
#define PROJ                           4
#define WORLDVIEW                      5
#define VIEWINVERSE                    6
#define WORLDINVERSETRANSPOSE          15
#define WORLDINVERSE                   16
#define WORLDTRANSPOSE                 17
#define VIEWPROJINVERSE                18
#define VIEWPROJINVERSETRANSPOSE       19
#define VIEWTRANSPOSE                  20
#define VIEWINVRSETRANSPOSE            21
#define PROJINVERSE                    22
#define PROJTRANSPOSE                  23
#define PROJINVRSETRANSPOSE            24
#define WORLDVIEWPROJTRANSPOSE         25
#define WORLDVIEWPROJINVERSE           26
#define WORLDVIEWPROJINVERSETRANSPOSE  27
#define WORLDVIEWTRANSPOSE             28
#define WORLDVIEWINVERSE               29
#define WORLDVIEWINVERSETRANSPOSE      30

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

// Camera fog mode
#define FOG_NONE      0
#define FOG_LINEAR    1

// Camera projection mode
#define PROJ_DISABLE       0
#define PROJ_PERSPECTIVE 1
#define PROJ_ORTHOGRAPHIC  2

// Entity FX flags
#define FX_NOTHING         0
#define FX_FULLBRIGHT      1
#define FX_VERTEXCOLOR     2
#define FX_FLATSHADED      4
#define FX_DISABLEFOG      8
#define FX_DISABLECULLING  16
#define FX_NOALPHABLEND    32

// Entity blending modes
#define BLEND_ALPHA        1
#define BLEND_MULTIPLY     2
#define BLEND_ADD          3
#define BLEND_PUREADD      4

// Compare functions
#define CMP_NEVER          1
#define CMP_LESS           2
#define CMP_EQUAL          3
#define CMP_LESSEQUAL      4
#define CMP_GREATER        5
#define CMP_NOTEQUAL       6
#define CMP_GREATEREQUAL   7
#define CMP_ALWAYS         8

// Axis
#define AXIS_X     1
#define AXIS_Y     2
#define AXIS_Z     3

// Texture loading flags
#define FLAGS_COLOR              1
#define FLAGS_ALPHA              2
#define FLAGS_MASKED             4
#define FLAGS_MIPMAPPED          8
#define FLAGS_CLAMPU             16
#define FLAGS_CLAMPV             32
#define FLAGS_SPHERICALENVMAP    64
#define FLAGS_CUBICENVMAP        128
#define FLAGS_R32F               256
#define FLAGS_SKIPCACHE          512
#define FLAGS_VOLUMETEXTURE      1024
#define FLAGS_ARBG16F            2048
#define FLAGS_ARBG32F            4096

// Texture blending modes
#define TEXBLEND_NONE           0
#define TEXBLEND_ALPHA          1
#define TEXBLEND_MULTIPLY       2
#define TEXBLEND_ADD            3
#define TEXBLEND_DOT3           4
#define TEXBLEND_LIGHTMAP       5
#define TEXBLEND_SEPARATEALPHA  6

// Cube map faces
#define FACE_LEFT      0
#define FACE_FORWARD   1
#define FACE_RIGHT     2
#define FACE_BACKWARD  3
#define FACE_UP        4
#define FACE_DOWN      5

// Entity animation types
#define ANIMATION_STOP       0
#define ANIMATION_LOOP       1
#define ANIMATION_PINGPONG   2
#define ANIMATION_ONE        3

// Collision types
#define SPHERETOSPHERE   1
#define SPHERETOBOX      3
#define SPHERETOTRIMESH  2

// Collision respones types
#define RESPONSE_STOP              1
#define RESPONSE_SLIDING           2
#define RESPONSE_SLIDING_DOWNLOCK  3

// Entity picking modes
#define PICK_NONE      0
#define PICK_SPHERE    1
#define PICK_TRIMESH   2
#define PICK_BOX       3

// Sprite view modes
#define SPRITE_FIXED     1
#define SPRITE_FREE      2
#define SPRITE_FREEROLL  3
#define SPRITE_FIXEDYAW  4

// Joystick types
#define JOY_NONE     0
#define JOY_DIGITAL  1
#define JOY_ANALOG   2

// Cubemap rendering modes
#define CUBEMAP_SPECULAR    1
#define CUBEMAP_DIFFUSE     2
#define CUBEMAP_REFRACTION  3

// Shadow//s blur levels
#define SHADOWS_BLUR_NONE   0
#define SHADOWS_BLUR_3      1
#define SHADOWS_BLUR_5      2
#define SHADOWS_BLUR_7      3
#define SHADOWS_BLUR_11     4
#define SHADOWS_BLUR_13     5

// primitives types
#define PRIMITIVE_POINTLIST      1
#define PRIMITIVE_LINELIST       2
#define PRIMITIVE_LINESTRIP      3
#define PRIMITIVE_TRIANGLELIST   4
#define PRIMITIVE_TRIANGLESTRIP  5
#define PRIMITIVE_TRIANGLEFAN    6

// line separator types
#define LS_NUL 0
#define LS_CR 1
#define LS_LF 2
#define LS_CRLF 3

// physics: joint types
#define JOINT_POINT2POINT 0
#define JOINT_6DOF 1
#define JOINT_6DOFSPRING 2
#define JOINT_HINGE 3

// physics: debug drawer modes
#define PXDD_NO            0
#define PXDD_WIREFRAME     1
#define PXDD_AABB          2
#define PXDD_CONTACTS      4
#define PXDD_JOINTS        8
#define PXDD_JOINT_LIMITS  16
#define PXDD_NO_AXIS       32

// physics: ray casting modes
#define PXRC_SINGLE    0
#define PXRC_MULTIPLE  1

// Scancodes for keyboard and mouse
#define MOUSE_LEFT          1
#define MOUSE_RIGHT         2
#define MOUSE_MIDDLE        3
#define MOUSE4              4
#define MOUSE5              5
#define MOUSE6              6
#define MOUSE7              7
#define MOUSE8              8

#define xMOUSE_LEFT         1
#define xMOUSE_RIGHT        2
#define xMOUSE_MIDDLE       3
#define xMOUSE4             4
#define xMOUSE5             5
#define xMOUSE6             6
#define xMOUSE7             7
#define xMOUSE8             8

#define KEY_ESCAPE          1
#define KEY_1               2
#define KEY_2               3
#define KEY_3               4
#define KEY_4               5
#define KEY_5               6
#define KEY_6               7
#define KEY_7               8
#define KEY_8               9
#define KEY_9               10
#define KEY_0               11
#define KEY_MINUS           12
#define KEY_EQUALS          13
#define KEY_BACK            14
#define KEY_TAB             15
#define KEY_Q               16
#define KEY_W               17
#define KEY_E               18
#define KEY_R               19
#define KEY_T               20
#define KEY_Y               21
#define KEY_U               22
#define KEY_I               23
#define KEY_O               24
#define KEY_P               25
#define KEY_LBRACKET        26
#define KEY_RBRACKET        27
#define KEY_RETURN          28
#define KEY_ENTER           KEY_RETURN
#define KEY_LCONTROL        29
#define KEY_RCONTROL        157
#define KEY_A               30
#define KEY_S               31
#define KEY_D               32
#define KEY_F               33
#define KEY_G               34
#define KEY_H               35
#define KEY_J               36
#define KEY_K               37
#define KEY_L               38
#define KEY_SEMICOLON       39
#define KEY_APOSTROPHE      40
#define KEY_GRAVE           41
#define KEY_LSHIFT          42
#define KEY_BACKSLASH       43
#define KEY_Z               44
#define KEY_X               45
#define KEY_C               46
#define KEY_V               47
#define KEY_B               48
#define KEY_N               49
#define KEY_M               50
#define KEY_COMMA           51
#define KEY_PERIOD          52
#define KEY_SLASH           53
#define KEY_RSHIFT          54
#define KEY_MULTIPLY        55
#define KEY_MENU            56
#define KEY_SPACE           57
#define KEY_F1              59
#define KEY_F2              60
#define KEY_F3              61
#define KEY_F4              62
#define KEY_F5              63
#define KEY_F6              64
#define KEY_F7              65
#define KEY_F8              66
#define KEY_F9              67
#define KEY_F10             68
#define KEY_NUMLOCK         69
#define KEY_SCROLL          70
#define KEY_NUMPAD7         71
#define KEY_NUMPAD8         72
#define KEY_NUMPAD9         73
#define KEY_SUBTRACT        74
#define KEY_NUMPAD4         75
#define KEY_NUMPAD5         76
#define KEY_NUMPAD6         77
#define KEY_ADD             78
#define KEY_NUMPAD1         79
#define KEY_NUMPAD2         80
#define KEY_NUMPAD3         81
#define KEY_NUMPAD0         82
#define KEY_DECIMAL         83
#define KEY_TILD            86
#define KEY_F11             87
#define KEY_F12             88
#define KEY_NUMPADENTER     156
#define KEY_RMENU           221
#define KEY_PAUSE           197
#define KEY_HOME            199
#define KEY_UP              200
#define KEY_PRIOR           201
#define KEY_LEFT            203
#define KEY_RIGHT           205
#define KEY_END             207
#define KEY_DOWN            208
#define KEY_NEXT            209
#define KEY_INSERT          210
#define KEY_DELETE          211
#define KEY_LWIN            219
#define KEY_RWIN            220
#define KEY_BACKSPACE       KEY_BACK
#define KEY_NUMPADSTAR      KEY_MULTIPLY
#define KEY_CAPSLOCK        58
#define KEY_NUMPADMINUS     KEY_SUBTRACT
#define KEY_NUMPADPLUS      KEY_ADD
#define KEY_NUMPADPERIOD    KEY_DECIMAL
#define KEY_DIVIDE          181
#define KEY_NUMPADSLASH     KEY_DIVIDE
#define KEY_LALT            56
#define KEY_RALT            184
#define KEY_UPARROW         KEY_UP
#define KEY_PGUP            KEY_PRIOR
#define KEY_LEFTARROW       KEY_LEFT
#define KEY_RIGHTARROW      KEY_RIGHT
#define KEY_DOWNARROW       KEY_DOWN
#define KEY_PGDN            KEY_NEXT

#define xKEY_ESCAPE         1
#define xKEY_1              2
#define xKEY_2              3
#define xKEY_3              4
#define xKEY_4              5
#define xKEY_5              6
#define xKEY_6              7
#define xKEY_7              8
#define xKEY_8              9
#define xKEY_9              10
#define xKEY_0              11
#define xKEY_MINUS          12
#define xKEY_EQUALS         13
#define xKEY_BACK           14
#define xKEY_TAB            15
#define xKEY_Q              16
#define xKEY_W              17
#define xKEY_E              18
#define xKEY_R              19
#define xKEY_T              20
#define xKEY_Y              21
#define xKEY_U              22
#define xKEY_I              23
#define xKEY_O              24
#define xKEY_P              25
#define xKEY_LBRACKET       26
#define xKEY_RBRACKET       27
#define xKEY_RETURN         28
#define xKEY_ENTER          KEY_RETURN
#define xKEY_LCONTROL       29
#define xKEY_RCONTROL       157
#define xKEY_A              30
#define xKEY_S              31
#define xKEY_D              32
#define xKEY_F              33
#define xKEY_G              34
#define xKEY_H              35
#define xKEY_J              36
#define xKEY_K              37
#define xKEY_L              38
#define xKEY_SEMICOLON      39
#define xKEY_APOSTROPHE     40
#define xKEY_GRAVE          41
#define xKEY_LSHIFT         42
#define xKEY_BACKSLASH      43
#define xKEY_Z              44
#define xKEY_X              45
#define xKEY_C              46
#define xKEY_V              47
#define xKEY_B              48
#define xKEY_N              49
#define xKEY_M              50
#define xKEY_COMMA          51
#define xKEY_PERIOD         52
#define xKEY_SLASH          53
#define xKEY_RSHIFT         54
#define xKEY_MULTIPLY       55
#define xKEY_MENU           56
#define xKEY_SPACE          57
#define xKEY_F1             59
#define xKEY_F2             60
#define xKEY_F3             61
#define xKEY_F4             62
#define xKEY_F5             63
#define xKEY_F6             64
#define xKEY_F7             65
#define xKEY_F8             66
#define xKEY_F9             67
#define xKEY_F10            68
#define xKEY_NUMLOCK        69
#define xKEY_SCROLL         70
#define xKEY_NUMPAD7        71
#define xKEY_NUMPAD8        72
#define xKEY_NUMPAD9        73
#define xKEY_SUBTRACT       74
#define xKEY_NUMPAD4        75
#define xKEY_NUMPAD5        76
#define xKEY_NUMPAD6        77
#define xKEY_ADD            78
#define xKEY_NUMPAD1        79
#define xKEY_NUMPAD2        80
#define xKEY_NUMPAD3        81
#define xKEY_NUMPAD0        82
#define xKEY_DECIMAL        83
#define xKEY_TILD           86
#define xKEY_F11            87
#define xKEY_F12            88
#define xKEY_NUMPADENTER    156
#define xKEY_RMENU          221
#define xKEY_PAUSE          197
#define xKEY_HOME           199
#define xKEY_UP             200
#define xKEY_PRIOR          201
#define xKEY_LEFT           203
#define xKEY_RIGHT          205
#define xKEY_END            207
#define xKEY_DOWN           208
#define xKEY_NEXT           209
#define xKEY_INSERT         210
#define xKEY_DELETE         211
#define xKEY_LWIN           219
#define xKEY_RWIN           220
#define xKEY_BACKSPACE      KEY_BACK
#define xKEY_NUMPADSTAR     KEY_MULTIPLY
#define xKEY_CAPSLOCK       58
#define xKEY_NUMPADMINUS    KEY_SUBTRACT
#define xKEY_NUMPADPLUS     KEY_ADD
#define xKEY_NUMPADPERIOD   KEY_DECIMAL
#define xKEY_DIVIDE         181
#define xKEY_NUMPADSLASH    KEY_DIVIDE
#define xKEY_LALT           56
#define xKEY_RALT           184
#define xKEY_UPARROW        KEY_UP
#define xKEY_PGUP           KEY_PRIOR
#define xKEY_LEFTARROW      KEY_LEFT
#define xKEY_RIGHTARROW     KEY_RIGHT
#define xKEY_DOWNARROW      KEY_DOWN
#define xKEY_PGDN           KEY_NEXT


//3d lines

//brushes

//cameras

declare extern xCameraFogMode alias _xCameraFogMode@8(int camera,int mode);
declare extern xCameraFogColor alias _xCameraFogColor@16(int camera,int red,int green,int blue);
declare extern xCameraFogRange alias _xCameraFogRange@12(int camera,float near,float far);
declare extern xCameraClsColor alias _xCameraClsColor@20(int camera,int red,int green,int blue,int alpha);
declare extern xCameraProjMode alias _xCameraProjMode@8(int camera,int mode);
declare extern xCameraClsMode alias _xCameraClsMode@12(int camera,int clearColor,int clearZbuffer);
declare extern xSphereInFrustum alias _xSphereInFrustum@20(int camera,float x,float y,float z,float radii),int;
declare extern xCameraClipPlane alias _xCameraClipPlane@28(int camera,int index,int enabled,float a,float b,float c,float d);
declare extern xCameraRange alias _xCameraRange@12(int camera,float near,float far);
declare extern xCameraViewport alias _xCameraViewport@20(int camera,int x,int y,int width,int height);
declare extern xCameraCropViewport alias _xCameraCropViewport@20(int camera,int x,int y,int width,int height);
declare extern xCreateCamera alias _xCreateCamera@4(int parent),int;
declare extern xCameraProject alias _xCameraProject@16(int camera,float x,float y,float z);
declare extern xCameraProject2D alias _xCameraProject2D@16(int camera,int x,int y,float zDistance);
declare extern xProjectedX alias _xProjectedX@0(),float;
declare extern xProjectedY alias _xProjectedY@0(),float;
declare extern xProjectedZ alias _xProjectedZ@0(),float;
declare extern xGetViewMatrix alias _xGetViewMatrix@4(int camera),int;
declare extern xGetProjectionMatrix alias _xGetProjectionMatrix@4(int camera),int;
declare extern xCameraZoom alias _xCameraZoom@8(int camera,float zoom);
declare extern xGetViewProjMatrix alias _xGetViewProjMatrix@4(int camera),int;

//collisions

//constants

//effects

//emitters

//entity animation

//entity control

declare extern xEntityAutoFade alias _xEntityAutoFade@12(int entity,float near,float far);
declare extern xEntityOrder alias _xEntityOrder@8(int entity,int order);
declare extern xFreeEntity alias _xFreeEntity@4(int entity);
declare extern xCopyEntity alias _xCopyEntity@12(int entity, int parent,int cloneBuffers),int;
declare extern xPaintEntity alias _xPaintEntity@8(int entity,int brush);
declare extern xEntityShininess alias _xEntityShininess@8(int entity,float shininess);
declare extern xEntityPickMode alias _xEntityPickMode@16(int entity,int mode,int obscurer,int recursive);
declare extern xEntityTexture alias _xEntityTexture@20(int entity, int texture,int frame,int index,int isRecursive);
declare extern xEntityFX alias _xEntityFX@8(int entity, int fx);
declare extern xGetParent alias _xGetParent@4(int entity),int;
declare extern xSetFrustumSphere alias _xSetFrustumSphere@20(int entity,float x,float y,float z,float radii);
declare extern xCalculateFrustumVolume alias _xCalculateFrustumVolume@4(int entity);
declare extern xEntityParent alias _xEntityParent@12(int entity,int parent,int isGlobal);
declare extern xShowentity alias _xShowEntity@4(int entity);
declare extern xHideEntity alias _xHideEntity@4(int entity);
declare extern xNameEntity alias _xNameEntity@8(int entity, string name);
declare extern xSetEntityQuaternion alias _xSetEntityQuaternion@8(int entity,int quaternion);
declare extern xSetEntityMatrix alias _xSetEntityMatrix@8(int entity, int matrix);
declare extern xEntityAlpha alias _xEntityAlpha@8(int entity,float alpha);
declare extern xEntityColor alias _xEntityColor@16(int entity,int red,int green,int blue);
declare extern xEntitySpecularColor alias _xEntitySpecularColor@16(int entity,int red,int green,int blue);
declare extern xAmbientColor alias _xEntityAmbientColor@16(int entity,int red,int green,int blue);
declare extern xEmissiveColor alias _xEntityEmissiveColor@16(int entity,int red,int green,int blue);
declare extern xEntityBlend alias _xEntityBlend@8(int entity,int mode);
declare extern xEntityAlphaRef alias _xEntityAlphaRef@8(int entity,int value);
declare extern xEntityAlphaFunc alias _xEntityAlphaFunc@8(int entity,int value);
declare extern xCreateInstance alias _xCreateInstance@8(int entity,int parent),int;
declare extern xFreezeInstances alias _xFreezeInstances@8(int entity,int enable);
declare extern xInstancingAvailable alias _xInstancingAvaliable@0(),int;
declare extern xGetEntityWorld alias _xGetEntityWorld@4(int entity),int;
declare extern xSetEntityWorld alias _xSetEntityWorld@8(int entity,int world);


//entity movement

declare extern xScaleEntity alias _xScaleEntity@20(int entity,float x,float y,float z,int isGlobal);
declare extern xPositionEntity alias _xPositionEntity@20(int entity, float x, float y,float z,int isGlobal);
declare extern xMoveEntity alias _xMoveEntity@20(int entity, float x, float y,float z,int isGlobal);
declare extern xTranslateEntity alias _xTranslateEntity@20(int entity, float x, float y,float z,int isGlobal);
declare extern xRotateEntity alias _xRotateEntity@20(int entity, float x, float y,float z,int isGlobal);
declare extern xTurnEntity alias _xTurnEntity@20(int entity,float x,float y,float z,int isGlobal);
declare extern xPointEntity alias _xPointEntity@12(int entity1,int entity2,float roll);
declare extern xAlignToVector alias _xAlignToVector@24(int entoty,float x,float y,float z,int axis,float factor);

//entity state

//filesystem

//fonts

declare extern xText alias _xText@20(float x,float y, string txt,int centerx,int centery);
//graphics

declare extern xWinMessage alias _xWinMessage@4(string msg),int;
declare extern xGetMaxPixelShaderVersion alias _xGetMaxPixelShaderVersion@0(),int;
declare extern xLine alias _xLine@16(int x1,int y1,int x2,int y2);
declare extern xRect alias _xRect@20(int x,int y,int width,int height,int solid);
declare extern xRectsOverlap alias _xRectsOverlap@32(int x1,int y1,int width1,int height1,int x2,int y2,int width2,int height2),int;
declare extern xViewport alias _xViewport@16(int x,int y,int width,int height);
declare extern xOval alias _xOval@20(int x,int y,int width,int height,int solid);
declare extern xOrigin alias _xOrigin@8(int x,int y);
declare extern xGetMaxVertexShaderVersion alias _xGetMaxVertexShaderVersion@0(),int;
declare extern xGetMaxAntiAlias alias _xGetMaxAntiAlias@0(),int;
declare extern xGetMaxTextureFiltering alias _xGetMaxTextureFiltering@0(),int;
declare extern xSetAntiAliasType alias _xSetAntiAliasType@4(int typID);
declare extern xAppTitle alias _xAppTitle@4(string title);
declare extern xSetWND alias _xSetWND@4(int win);
declare extern xSetRenderWindow alias _xSetRenderWindow@4(int win);
declare extern xSetTopWindow alias _xSetTopWindow@4(int win);
declare extern xDestroyRenderWindow alias _xDestroyRenderWindow@0();
declare extern xFlip alias _xFlip@0();
declare extern xBackBuffer alias _xBackBuffer@0(),int;
declare extern xLockBuffer alias _xLockBuffer@4(int buffer);
declare extern xUnlockBuffer alias _xUnlockBuffer@4(int buffer);
declare extern WritePixelFast alias _xWritePixelFast@16(int x,int y,int argb,int buffer);
declare extern xReadPixelFast alias _xReadPixelFast@12(int x,int y,int buffer),int;
declare extern xGetPixels alias _xGetPixels@4(int buffer),int;
declare extern xSaveBuffer alias _xSaveBuffer@8(int buffer,string path);
declare extern xGetCurrentBuffer alias _xGetCurrentBuffer@0(),int;
declare extern xBufferWidth alias _xBufferWidth@4(int buffer),int;
declare extern xBufferHeight alias _xBufferHeight@4(int buffer),int;
declare extern xCatchTimestamp alias _xCatchTimestamp@0(),int;
declare extern xGetElapsedTIme alias _xGetElapsedTime@4(int timestamp),float;
declare extern xSetBuffer alias _xSetBuffer@4(int buffer);
declare extern xSetMRT alias _xSetMRT@12(int buffer,int frame,int index);
declare extern xUnsetMRT alias _xUnSetMRT@0();
declare extern xGetNumberRT alias _xGetNumberRT@0(),int;
declare extern xTextureBuffer alias _xTextureBuffer@8(int texture,int frame),int;
declare extern xLoadBuffer alias _xLoadBuffer@8(int buffer, string path);
declare extern xWritePixel alias _xWritePixel@16(int x,int y,int argb,int buffer);
declare extern xCopyPixel alias _xCopyPixel@24(int sx,int sy,int srcBuffer,int dx,int dy,int destBuffer);
declare extern xCopyPixelFast alias _xCopyPixelFast@24(int sx,int sy,int srcBuffer,int dx,int dy,int destBuffer);
declare extern xCopyRect alias _xCopyRect@32(int sx,int sy,int sw,int sh,int dx,int dy,int srcBuffer,int destBuffer);
declare extern xGraphicsBuffer alias _xGraphicsBuffer@0(),int;
declare extern xGetColor alias _xGetColor@8(int x,int y),int;
declare extern xReadPixel alias _xReadPixel@12(int x,int y,int buffer),int;
declare extern xGraphicsWidth alias _xGraphicsWidth@4(int isVirtual),int;
declare extern xGraphicsHeight alias _xGraphicsHeight@4(int isVirtual),int;
declare extern xGraphicsDepth alias _xGraphicsDepth@0(),int;
declare extern xColorAlpha alias _xColorAlpha@0(),int;
declare extern xColorRed alias _xColorRed@0(),int;
declare extern xColorGreen alias _xColorGreen@0(),int;
declare extern xColorBlue alias _xColorBlue@0(),int;
declare extern xClsColor alias _xClsColor@16(int red,int green,int blue,int alpha);
declare extern xClearWorld alias _xClearWorld@12(int entities,int brushes,int textures);
declare extern xColor alias _xColor@16(int red,int green,int blue,int alpha);
declare extern xCls alias _xCls@0();
declare extern xUpdateWorld alias _xUpdateWorld@4(float speed);
declare extern xRenderEntity alias _xRenderEntity@12(int camera,int entity,float tween);
declare extern xRenderWorld alias _xRenderWorld@8(float tween,int renderShadows);
declare extern xSetAutoTB alias _xSetAutoTB@4(int flag);
declare extern xMaxClipPlanes alias _xMaxClipPlanes@0(),int;
declare extern xWireframe alias _xWireframe@4(int state);
declare extern xDither alias _xDither@4(int state);
declare extern xSetSkinningMethod alias _xSetSkinningMethod@4(int skinMethod);
declare extern xTrisRendered alias _xTrisRendered@0(),int;
declare extern xDPICounter alias _xDIPCounter@0(),int;
declare extern xSurfRendered alias _xSurfRendered@0(),int;
declare extern xEntityRendered alias _xEntityRendered@0(),int;
declare extern xAmbientLight alias _xAmbientLight@16(int red,int green,int blue,int world);
declare extern xGetFPS alias _xGetFPS@0(),int;
declare extern xAntiAlias alias _xAntiAlias@4(int state);
declare extern xSetTextureFiltering alias _xSetTextureFiltering@4(int filter);
declare extern xStretchRect alias _xStretchRect@44(int tex1,int x1,int y1,int w1,int h1,int tex2,int x2,int y2,int w2,int h2,int filter);
declare extern xStretchBackBuffer alias _xStretchBackBuffer@24(int tex,int x,int y,int w,int h,int filter);
declare extern xGetDevice alias _xGetDevice@0(),int;
declare extern xReleaseGraphics alias _xReleaseGraphics@0();
declare extern xShowPointer alias _xShowPointer@0();
declare extern xHidePointer alias _xHidePointer@0();
declare extern xCreateDSS alias _xCreateDSS@8(int width,int height);
declare extern xDeleteDSS alias _xDeleteDSS@0();
declare extern xGridColor alias _xGridColor@24(int centerR,int centerG,int centerB,int gridR,int gridG,int gridB);
declare extern xDrawGrid alias _xDrawGrid@16(float x,float z,int gridSize,int range);
declare extern xDrawBBox alias _xDrawBBox@24(int draw,int zOn,int red,int green, int blue,int alpha);
declare extern xGraphics3d alias _xGraphics3D@20(int width_,int height_,int depth_,int mode_,int vsync_);
declare extern xGraphicsAspectRatio alias _xGraphicsAspectRatio@4(float aspectRatio);
declare extern xGraphicsBorderColor alias _xGraphicsBorderColor@12(int red,int green,int blue);
declare extern xGetRenderWindow alias _xGetRenderWindow@0(),int;
declare extern xKey alias _xKey@4(string key);
declare extern xSetEngineSetting alias _xSetEngineSetting@8(string param,string val);
declare extern xHWInstancingAvailable alias _xHWInstancingAvailable@0(),int;
declare extern xShaderInstancingAvailable alias _xShaderInstancingAvailable@0(),int;
declare extern xSetShaderLayer alias _xSetShaderLayer@4(int layer);
declare extern xGetShaderLayer alias _xGetShaderLayer@0(),int;
declare extern xDrawMovementGizmo alias _xDrawMovementGizmo@16(float x,float y,float z,int selectMask);
declare extern xDrawSclaeGizmo alias _xDrawScaleGizmo@28(float x,float y,float z,int selectMask,float sx,float sy,float sz);
declare extern xDrawRotationGizmo alias _xDrawRotationGizmo@28(float x,float y,float z,int selectMask,float pitch,float yaw,float roll);
declare extern xCheckMovementGizmo alias _xCheckMovementGizmo@24(float x,float y,float z,int camera,int mx,int my),int;
declare extern xCheckScaleGizmo alias _xCheckScaleGizmo@24(float x,float y,float z,int camera,int mx,int my),int;
declare extern xCheckRotationGizmo alias _xCheckRotationGizmo@24(float x,float y,float z,int camera,int mx,int my),int;
declare extern xCaptureWorld alias _xCaptureWorld@0();
declare extern xCOuntGfxModes alias _xCountGfxModes@0(),int;
declare extern xGfxModeWidth alias _xGfxModeWidth@4(int mode),int;
declare extern xGfxModeHeight alias _xGfxModeHeight@4(int mode),int;
declare extern xGfxModeDepth alias _xGfxModeDepth@4(int mode),int;
declare extern xGfxModeExists alias _xGfxModeExists@12(int width,int height,int depth),int;
declare extern xAppWindowFrame alias _xAppWindowFrame@4(int state);
declare extern xMillisecs alias _xMillisecs@0(),int;
declare extern xDeltaTime alias _xDeltaTime@4(int fromInit),int;
declare extern xDeltaValue alias _xDeltaValue@8(float value,int time),float;
declare extern xAddDeviceLostCallback alias _xAddDeviceLostCallback@4(int func);
declare extern xDeleteDeviceLostCallback alias _xDeleteDeviceLostCallback@4(int func);
declare extern xDeinit alias _xDeinit@0();




//images

//inputs

declare extern xKeyHit alias _xKeyHit@4(int key_),int;

declare extern xKeyDown alias _xKeyDown@4(int key_),int;

//joystick

//lights

declare extern xCreateLight alias _xCreateLight@4(int typeID),int;
declare extern xLightShadowEpsilons alias _xLightShadowEpsilons@12(int lgt,float epsilon1,float epsilon2);
declare extern xLightEnableShadows alias _xLightEnableShadows@8(int lgt,int state);
declare extern xLightShadowsEnabled alias _xLightShadowsEnabled@4(int lgt),int;
declare extern xLightRange alias _xLightRange@8(int lgt,float range);
declare extern xLightColor alias _xLightColor@16(int lgt,int red,int green,int blue);

//logging

declare extern xCreateLog alias _xCreateLog@16(int target,int level,string filename,string cssfilename),int;
declare extern xCloseLog alias _xCloseLog@0(),int;
declare extern xGetLogString alias _xGetLogString@0(),string;
declare extern xClearLogString alias _xClearLogString@0();
declare extern xSetLogLevel alias _xSetLogLevel@4(int level);
declare extern xSetLogTarget alias _xSetLogTarget@4(int target);
declare extern xGetLogLevel alias _xGetLogLevel@0(),int;
declare extern xLogInfo alias _xLogInfo@16(string msg,string func,string file,int line);
declare extern xLogMessage alias _xLogMessage@16(string msg,string func,string file,int line);
declare extern xLogWarning alias _xLogWarning@16(string msg,string func,string file,int line);
declare extern xLogError alias _xLogError@16(string msg,string func,string file,int line);
declare extern xLogFatal alias _xLogFatal@16(string msg,string func,string file,int line);

//meshes

declare extern xCreateCube alias _xCreateCube@4(int parent),int;

//particles

//physics

//post effects

//psystems

//raypicks

//shadows

//sounds

//sprites

//surfaces

//sysinfo

declare extern xCPUName alias _xCPUName@0(),string;
declare extern xCPUVendor alias _xCPUVendor@0(),string;
declare extern xCPUFamily alias _xCPUFamily@0(),int;
declare extern xCPUModel alias _xCPUModel@0(),int;
declare extern xCPUStepping alias _xCPUStepping@0(),int;
declare extern xCPUSpeed alias _xCPUSpeed@0(),int;
declare extern xVideoInfo alias _xVideoInfo@0(),string;
declare extern xVideoAspectRatio alias _xVideoAspectRatio@0(),float;
declare extern xVideoAspectRatioStr alias _xVideoAspectRatioStr@0(),string;
declare extern xGetTotalPhysMem alias _xGetTotalPhysMem@0(),float;
declare extern xGetAvailPhysMem alias _xGetAvailPhysMem@0(),float;
declare extern xGetTotalPageMem alias _xGetTotalPageMem@0(),float;
declare extern xGetAvailPageMem alias _xGetAvailPageMem@0(),float;
declare extern xGetTotalVidMem alias _xGetTotalVidMem@0(),float;
declare extern xGetAvailVidMem alias _xGetAvailVidMem@0(),float;
declare extern xGetTotalVidLocalMem alias _xGetTotalVidLocalMem@0(),float;
declare extern xGetAvailVidLocalMem alias _xGetAvailVidLocalMem@0(),float;
declare extern xGetTotalVidNonLocalMem alias _xGetTotalVidNonlocalMem@0(),float;
declare extern xGetAvailVidNonLocalMem alias _xGetAvailVidNonlocalMem@0(),float;
declare extern xGetXors3dVersion alias _xGetXors3dVersion@0(),string;
declare extern xGetXors3dMajorVersion alias _xGetXors3dMajorVersion@0(),int;
declare extern xGetXors3dMinorVersion alias _xGetXors3dMinorVersion@0(),int;
declare extern xGetXors3dRevision alias _xGetXors3dRevision@0(),int;

//terrains

//textures

declare extern xTextureWidth alias _xTextureWidth@4(int tex),int;
declare extern xTextureHeight alias _xTextureHeight@4(int tex),int;
declare extern xCreateTexture alias _xCreateTexture@16(int width,int height,int flags,int frames),int;
declare extern xFreeTexture alias _xFreeTexture@4(int tex);
declare extern xSetTextureFilter alias _xSetTextureFilter@8(int tex,int mode);
declare extern xTextureBlend alias _xTextureBlend@8(int tex,int blend);
declare extern xTextureCoords alias _xTextureCoords@8(int tex,int coords);
declare extern xTextureFilter alias _xTextureFilter@8(string matchText,int flags);
declare extern xClearTextureFilters alias _xClearTextureFilters@0();
declare extern xLoadTexture alias _xLoadTexture@8(string path,int flags),int;
declare extern xTextureName alias _xTextureName@4(int tex),string;
declare extern xPositionTexture alias _xPositionTexture@12(int tex,float x,float y);
declare extern xScaleTexture alias _xScaleTexture@12(int tex,float x,float y);
declare extern xRotateTexture alias _xRotateTexture@8(int tex,float angle);
declare extern xLoadAnimTexture alias _xLoadAnimTexture@24(string path,int flags,int width,int height,int startFrame,int frames),int;
declare extern xCreateTextureFromData alias _xCreateTextureFromData@20(int pixelsData,int width,int height,int flags,int frames),int;
declare extern xGetTextureData alias _xGetTextureData@8(int tex,int frame),int;
declare extern xGetTextureDataPitch alias _xGetTextureDataPitch@8(int tex,int frame),int;
declare extern xGetTextureSurface alias _xGetTextureSurface@8(int tex,int frame),int;
declare extern xGetTextureFrames alias _xGetTextureFrames@4(int tex),int;
declare extern xSetCubeFace alias _xSetCubeFace@8(int tex,int face);
declare extern xSetCubeMode alias _xSetCubeMode@8(int tex,int mode);
declare extern xGetTextureBlend alias _xGetTextureBlend@4(int tex),int;
declare extern xGetTextureX alias _xGetTextureX@4(int tex),float;
declare extern xGetTextureY alias _xGetTextureY@4(int tex),float;
declare extern xGetTextureScaleX alias _xGetTextureScaleX@4(int tex),float;
declare extern xGetTextureScaleY alias _xGetTextureScaleY@4(int tex),float;
declare extern xGetTextureAngle alias _xGetTextureAngle@4(int tex),float;
declare extern xGetTextureCoords alias _xGetTextureCoords@4(int tex),int;
declare extern xGetCubeFace alias _xGetCubeFace@4(int tex),int;
declare extern xGetCubeMode alias _xGetCubeMode@4(int text),int;
declare extern xGetTextureFlags alias _xGetTextureFlags@4(int tex),int;
declare extern xSetTextureFlags alias _xSetTextureFlags@8(int text,int flags);
declare extern xTextureCounter alias _xTextureCounter@4(int tex),int;


//transforms

declare extern xVectorPitch alias _xVectorPitch@12(float x,float y,float z),float;
declare extern xVectorYaw alias _xVectorYaw@12(float x,float y,float z),float;
declare extern xDeltaPitch alias _xDeltaPitch@8(int entity1,int entity2),float;
declare extern xDeltaYaw alias _xDeltaYaw@8(int entity1,int entity2),float;
declare extern xTFormedX alias _xTFormedX@0(),float;
declare extern xTFormedY alias _xTFormedY@0(),float;
declare extern xTFormedZ alias _xTFormedZ@0(),float;
declare extern xTformPoint alias _xTFormPoint@20(float x,float y,float z,int src, int dest);
declare extern xTFormVector alias _xTFormVector@20(float x,float y,float z,int src,int dest);
declare extern xTFormNormal alias _xTFormNormal@20(float x,float y,float z,int src,int dest);

//videos

//worlds
declare extern xCreateWorld alias _xCreateWorld@0(),int;
declare extern xSetActiveWorld alias _xSetActiveWorld@4(int world);
declare extern xGetActiveWorld alias _xGetActiveWorld@0(),int;
declare extern xGetDefaultWorld alias _xGetDefaultWorld@0(),int;
declare extern xDeleteWorld alias _xDeleteWorld@4(int world);


and here is my latest test code xorsAspectRatio.src

//this is the main file
#include "xors.inc"



global sub main()
{
//xKey("");
//xSetEngineSetting("Splash::TilingTime","0");
//xSetEngineSetting("Splash::AfterTilingTime","0");

xCreateLog(1,0,"xors_log.html","");

int cam1,cam2,lgt,tex,cube1,cube2;

xGraphicsAspectRatio(16.0/9.0);
xGraphics3d(1024,768,32,0,1);
xGraphicsBorderColor(48,64,32);
xGraphicsBorderColor(255,0,0);
xSetBuffer(xBackBuffer());

cam1 = xCreateCamera(0);
xCameraClsColor(cam1,32,48,64,255);
xCameraViewport(cam1,0,0,xGraphicsWidth(1),(xGraphicsHeight(1)/2));

cam2 = xCreateCamera(0);
xCameraClsColor(cam2,64,48,32,255);
xCameraViewport(cam2,0,xGraphicsHeight(1)/2,xGraphicsWidth(1),xGraphicsHeight(1)/2);
xRotateEntity(cam2,180,0,0,1);

lgt = xCreateLight(1);
xRotateEntity(lgt,90,0,0,1);

tex = CreateCheckerPattern(256);
cube1 = xCreateCube(0);
xRotateEntity(cube1,45,45,0,1);
xEntityColor(cube1,255,127,64);
xPositionEntity(cube1,0,0,4,1);
xEntityTexture(cube1,tex,0,0,1);

cube2 = xCreateCube(0);
xRotateEntity(cube2,45,45,0,1);
xEntityColor(cube2,64,127,255);
xPositionEntity(cube2,0,0,-4,1);
xEntityTexture(cube2,tex,0,0,1);

xViewport(0,0,xGraphicsWidth(1)/2,xGraphicsHeight(1)/2);
while(xKeyHit(XKEY_ESCAPE) <> 1)
{
xTurnEntity(cube1,0.05,0.05,0.05,1);
xTurnEntity(cube2,-0.05,-0.05,-0.05,1);

if(xKeyDown(205) = 1)
{
xTurnEntity(cam1,0,-1,0,1);
xTurnEntity(cam2,0,-1,0,1);
}
if(xKeyDown(203) = 1)
{
xTurnEntity(cam1,0,1,0,1);
xTurnEntity(cam2,0,1,0,1);
}
if(xKeyDown(208) =1)
{
xMoveEntity(cam1,0,0,-0.05,1);
xMoveEntity(cam2,0,0,0.05,1);
}
if(xKeyDown(200) =1)
{
xMoveEntity(cam1,0,0,0.05,1);
xMoveEntity(cam2,0,0,-0.05,1);
}
if(xKeyHit(XKEY_F1) = 1)
{
xGraphicsAspectRatio(5.0/4.0);
}
if(xKeyHit(XKEY_F2) = 1)
{
xGraphicsAspectRatio(4.0/3.0);
}
if(xKeyHit(XKEY_F3) = 1)
{
xGraphicsAspectRatio(16.0/10.0);
}
if(xKeyHit(XKEY_F4) = 1)
{
xGraphicsAspectRatio(16.0/9.0);
}
if(xKeyHit(XKEY_F5) = 1)
{
xGraphicsAspectRatio(13.0/7.0);
}

xRenderWorld(0.0,0);

xText(10,50,"Real Aspect Ratio of Monitor: " + xVideoAspectRatioStr(),0,0);
xText(10,100,"F1 for 5:4",0,0);
xText(10,120,"F2 for 4:3",0,0);
xText(10,140,"F3 for 16:10",0,0);
xText(10,160,"F4 for 16:9",0,0);
xText(10,180,"F5 for 13:7 - something insane",0,0);
xText(10,200,"Arrow keys to move/ rotate cameras. Escape tp quit",0,0);


xFlip();
}
}

sub CreateCheckerPattern(int size),int
{
int lTex = xCreateTexture(size,size,9,1);
xSetBuffer(xTextureBuffer(lTex,0));
xColor(222,222,222,255);
xRect(0,0,size,size,1);
xColor(255,255,255,255);
xRect(0,0,size/2,size/2,1);
xRect(size/2,size/2,size/2,size/2,1);
xSetBuffer(xBackBuffer());
return lTex;

}

You'll need to download the Xors3d SDK which is available on Google
Xors3d Trial

I have found the Aurora compiler great to work with for this. Extremely fast for recompiling and ultra small exe. There are 4 dlls in the trial package which are needed to run the program. Happy to uplaod a zip with the exe and dlls if anyone would like them.