---------------------------------------------------
DirectX 6.0 for Delphi:
---------------------------------------------------

Changes from 2.0 to 2.0xk:
~~~~~~~~~~~~~~~~~~~~~~~~~
a1. DDraw.pas:
    fixed IDirectDraw4
    fixed TDDPixelFormat
    renamed IDirectDrawSurface[n].Restore 
      to _Restore if D2COM is not defined.

b1. Fixed IDirect3DRM3.CreateDeviceFromSurface
b2. Fixed IDirect3DRMDevice3
b3. Fixed IDirectDrawSurface4
b4. Fixed IDirect3D3
b5. Fixed IDirect3DRMViewport2

c1. Fixed IDirect3D3
c2. Fixed IDirect3DDevice2.DrawIndexedPrimitive
c3. Added MAKEFOURCC in DDraw.pas
c4. Added FOURCC_DXT1-5 in DDraw.pas
c5. Added TDDDeviceIdentifier in DDraw.pas
c6. Added IDirectDraw4.GetDeviceIdentifier in DDraw.pas
c7. Added TClipperCallback in DDraw.pas
c8. Added TSurfacesStreamingCallback in DDraw.pas
c9. Added some missing constants in DDraw.pas

d1. D3DCaps.pas:
    added some missing constants
d2. D3DRMObj.pas:
    fixed IDirect3DRM3,
    added IDirect3DRMFace2,
    fixed some callback-types,
    fixed IDirect3DRMDevice3
    fixed IDirect3DRMViewport2
    fixed IDirect3DRMMeshBuilder3
d3. D3DRMDef.pas:
    fixed TD3DRMWrapType
    added some missing constants
d4. D3D.pas:
    fixed IDirect3DViewport3
    added some missing constants
d5. DXFile.pas:
    added CLSID_CDirectXFile
    added TID_DXFILEHeader
d6. RMXFGUID.pas:
    added TID_D3DRMRightHanded
d7. RMXFTmpl.pas:
    updated definition of D3DRM_XTEMPLATES

e1. D3DRM.pas:
    fixed IID_IDirect3DRM3
    fixed IDirect3DRM.CreateObject
e2. D3DRMObj.pas:
    fixed IDirect3DRMMeshBuilder3.GenerateNormals

f1. DDraw.pas:
    fixed IDirectDrawSurface4.Unlock

g1. DDraw.pas:
    fixed IDirectDrawSurface{1-4}.SetColorkey

h1. DInput.pas:
    fixed DirectInputCreate (ANSI)
h2. DDraw.pas:
    added some DiretX 5 structures {$IFDEF DIRECTX5}

i1. D3DRM.pas:
    fixed GUID of IDirect3DRM3

j1. DInput.pas:
    fixed IDirectInputDevice.GetDeviceData

k1. DDraw.pas
    fixed IDirectDrawSurface.UpdateOverlay

l1. DDraw.pas
    fixed parameter-list of DirectDrawEnumerateEx

m1. DInput.pas
    modified c_dfDIMouse to report all mouse-actions

n1. DSound.pas
    fixed IDirectSoundBuffer.Unlock
n2. DInput.pas
    _c_dfDIMouse_Objects modified to use only X and Y axis 
    plus Button 0 and 1 to make it MS-Mouse compatibel

o1. D3D.pas
    fixed parameter lpwIndices of DrawIndexedPrimitive
o2. D3DTypes.pas
    changed TD3DColorModel = set of (D3DCOLOR_MONO, D3DCOLOR_RGB);

p1. DSound.pas
    The parameters of IDirectSoundBuffer and IDirectSoundCaptureBuffer.GetCurrentPosition
    are now pointer-types to enable passing the value nil.
    
q1. All DLL-procedures/functions are now linked dynamically
q2. D3DTypes.pas
    changed TD3DColorModel to DWORD, D3DCOLOR_xxx are now constants

r1. Changed some out parameters to var, if D2COM is defined
r2. DXFile.pas
    DirectXFileCreate dynamically linked from D3DXOF.DLL
r3. DInput.pas
    _c_dfDIKeyboard_Objects supports 103 key-codes now

s1. D3D.pas
    fixed IDirect3DDevice3.EnumTextureFormats
s2. D3DRMObj.pas
    fixed IDirect3DRMMeshBuilder3.GetVertices

t1. D3DRMObj.pas
    fixed result of IDirect3DRMTexture.GetImage

u1. D3DRMObj.pas
    fixed TD3DRMFrameMoveCallback and TD3DRMFrame3MoveCallback
    fixed IDirect3DRMFrame3.AddMoveCallback
u2. D3DRMDef.pas
    fixed dynamic-linking code at initialization

v1. D3DRM.pas
    fixed IDirect3DRM.CreateObject

w1. DSound.pas; DInput.pas; DXFile.pas; D3DRM.pas; DDraw.pas
    changed many parameters from 
    refguid: PGUID
    to 
    const refguid: TGUID
w2. D3DRMObj.pas
    fixed IDirect3DRMAnimationSet2.GetAnimations

x1. DInput.pas
    IDirectInputDevice & IDirectInputDevice2 should cause no more
    internal errors in Delphi 2 now (don't know why, but it seems to work)

y1. D3DRMDef.pas
    fixed dynamic DLL linking
y2. DXTools.pas
    fixed ReleaseCOMe
y3. DDraw.pas
    changed many var-parameters to const
    fixed IDirectDraw.GetFourCCCodes

x1. DDraw.pas
    fixed all TDDSCaps parameters (GetAttachedSurface...)
x2. D3DRMDef.pas
    fixed dynamic DLL linking (now it really should work :)

xa1. DPlay.pas
     fixed DPERR_PENDING
xa2. DPlay.pas
     changed the names from some record-fields from TDPID to DPID
xa3. DPlay.pas
     renamed Create- and DestroyPlayergroup to Create- and DestroyPlayerOrGroup

xb1. DDraw.pas
     changed the BltFX parameter from Surface.Blt to a pointer-type, so that nil can be passed
     fixed the GUID of IDirectDrawSurface4
xb2. D3D.pas
     fixed the GUID of IDirect3D2

xc1. D3DTypes.pas
     added D3DLIGHT_RANGE_MAX constant
xc2. DPlay.pas
     changed parameters of IDirectPlay2.CreateGroup
     changed parameters of IDirectPlay3.InitializeConnection
     fixed TDPMsg_SendComplete
xc3. DPLobby.pas
     changed parameters of IDirectPlayLobby3.ConnectEx
xc4. DSetup.pas
     new automatic dynamic-linking mechanism for DSetup.dll
xc5. DDraw.pas
     under NT DDraw.dll is not loaded while Delphi is running

xd1. DPlay.pas
     changed GUID paramters of:
     IDirectPlay3.EnumConnections
     IDirectPlay3.EnumGroupsInGroup
     IDirectPlay2.EnumGroupPlayers
xd2. DInput.pas
     changed the GUID parameters of  IDirectInputDevice.SetProperty and GetProperty

xe1. DInput.pas
     added an entry for DIK_NUMPADCOMMA ($B3) in _c_dfDiKeyboard_Objects
xe2. all DX-DLL are prevented from loading while Delphi is running under NT

xf1. DXCommon.pas
     used by all units instead of Forms.pas, SysUtils.pas and Registry.pas to reduce EXE-filesize

xg1. DInput.pas
     all c_... values fixed and some other changes by Arne Schpers
     (see header-comments in DInput.pas for more information)

xh1. D3DCaps.pas
     the GUID-parameter of TD3DEnumDevicesCallback is now a pointer type because nil
     is passed for the default device
xh2. D3DRMDef.pas
     fixed D3DRMMatrixFromQuaternion and  D3DRMQuaternionFromMatrix
xh3. D3DRMObj.pas
     fixed   TD3DRMLoadTextureCallback and  TD3DRMLoadTexture3Callback

xi1. DDraw.pas
     Changed the parameter of IDirectDraw.Initialize to PGUID because nil is a valid argument

xj1. DVP.pas
     Changed the third parameter of IDirectDrawVideoPortContainer.GetVideoPortConnectInfo

xk1. DVP.pas
     Changed the second parameter of  IDDVideoPortContainer.EnumVideoPorts

Changes from 1.8 to 2.0:
~~~~~~~~~~~~~~~~~~~~~~~~

Changes from DirectX 5 to 6:
(only types, no constants)

+...new
#...changed

DDraw:
~~~~~~
+ IDirectDraw4,
+ IDirectDrawSurface4
+ IDirectDrawGammaControl
+ TDDRGBA
+ TDDOSCaps
+ TDDSCapsEx
+ TDDSCaps2
# TDDCaps
(+ TDDCaps_DX3
 + TDDCaps_DX5
 + TDDCaps_DX6)
# TDDPixelFormat
(+ TDDPixelFormat_DX5
 + TDDPixelFormat_DX6)
+ TDDGammaRamp
+ TDDEnumModesCallback2
+ TDDEnumSurfacesCallback2
+ TDDEnumCallbackEx
+ DirectDrawEnumerateEx
+ TDDSurfaceDesc2
+ TDDOptSurfaceDesc

D3DTypes:
~~~~~~~~~
+ TD3DEnumPixelFormatsCallback
+ TD3DStecncilOp
+ TD3DZBufferType
# TD3DLightStateType
# TD3DRenderStateType
+ TD3DTextureStageStateType
+ TD3DTextureOp
+ TD3DTextureMagFilter
+ TD3DTextureMinFilter
+ TD3DTextureMipFilter
+ TD3DVertexBufferDesc
+ TD3DDP_PtrStride
+ TD3DDrawPrimitiveStrideData

D3DCaps:
~~~~~~~~
# TD3DDeviceDesc

D3D:
~~~~
+ IDirect3D3
+ IDirect3DDevice3
+ IDirect3DRefDevice
+ IDirect3DNullDevice
+ IDirect3DMaterial3
+ IDirect3DViewport3
+ IDirect3DVertexBuffer

D3DRMDef:
~~~~~~~~~
+ TD3DRMMaterialOverride
+ TD3DRMAnimationKey
+ D3DRMAnimationGetRotateKey
+ D3DRMAnimationGetScaleKey
+ D3DRMAnimationGetPositionKey
+ D3DRMAnimatioSetRotateKey
+ D3DRMAnimationSetScaleKey
+ D3DRMAnimationSetPositionKey

D3DRMObj:
~~~~~~~~~
+ IDirect3DRMObject2 (moved to D3DRM, to avoid circular unit reference)
+ IDirect3DRMDevice3
+ IDirect3DRMViewport2
+ IDirect3DRMFrame3
+ IDirect3DRMMeshBuilder3
+ IDirect3DRMTexture3
+ IDirect3DRMMaterial2
+ IDirect3DRMAnimation2
+ IDirect3DRMAnimationSet2
+ IDirect3DRMAnimationArray
+ IDirect3DRMShadow2
+ IDirect3DRMClippedVisual
+ TD3DRMFrame3MoveCallback
+ TD3DRMDevice3UpdateCallback
+ TD3DRMLoadTexture3Callback
+ TD3DRMDownSampleCallback
+ TD3DRMValidationCallback

D3DRMWin:
~~~~~~~~~
no changes

D3DRM:
~~~~~~
+ IDirect3DRM3

DSound:
~~~~~~~
no changes

DPlay:
~~~~~~
+ IDirectPlay4

DPLobby:
~~~~~~~~
+ IDirectPlayLobby3
+ TDPApplicationDesc

DInput:
~~~~~~~
no changes

DSetup:
~~~~~~~
no changes

DVP:
~~~~
# TDDVideoPortCaps

+ DXFile:
~~~~~~~~~
everything new

+ RMXFGUID:
~~~~~~~~~~~
everything new

+ RMXFTmpl:
~~~~~~~~~~~
everything new

MultiMon:
~~~~~~~~~
Comes with Delphi 4




---------------------------------------------------
DirectX 5.0 for Delphi:
---------------------------------------------------

Changes from 1.7d to 1.8
~~~~~~~~~~~~~~~~~~~~~~~~

1. Adapted for Delphi 4 (HResult)
2. DXTools uses the new ErrorString function placed in the header-units
3. DVP uses Delphi-style typenames now
4. Some fixes in DXTools, D3DTypes and DSound
5. Added unit Multimon from Delphi 4

Changes from 1.7c to 1.7d
~~~~~~~~~~~~~~~~~~~~~~~~~

1. New functions in DXTools:

// Delivers an interface for the default DirectDraw2 Object:
function GetDefaultDirectDraw2 : IDirectDraw2;
// Delivers an interface for the primary DirectDraw2 Object:
function GetFirstDirectDraw2 : IDirectDraw2;
// Delivers an interface for the secondary DirectDraw2 Object:
function GetSecondDirectDraw2 : IDirectDraw2;

2. Modyfied ReleaseCOM for Delphi3-syntax

3. Changes in DPlay and DPLobby from David Sission

Changes from 1.7 to 1.7c
~~~~~~~~~~~~~~~~~~~~~~~~

1. Fixed DLL-name in DPLobby.pas
2. Changed parameter of:

DirectPlayLobbyCreate
IDirectPlayLobby.GetConnectionSettings
IDirectPlay3.CreatePlayer

3. Added error-managment functions in DXTools:

function D3DErrorstring(Value: HResult) : string;
function DDrawErrorstring(Value: HResult) : string;
function DInputErrorstring(Value: HResult) : string;
function DPlayErrorstring(Value: HResult) : string;
function DSetupErrorstring(Value: HResult) : string;
function DSoundErrorstring(Value: HResult) : string;

procedure D3DCheck(Value: HResult);
procedure DDCheck(Value: HResult);
procedure DICheck(Value: HResult);
procedure DPCheck(Value: HResult);
procedure DSCheck(Value: HResult);
procedure DSetupCheck(Value: HResult);

4. Fixed TDSEnumCallback

Changes from 1.6 to 1.7
~~~~~~~~~~~~~~~~~~~~~~~

1. Added units:

DPlay.pas
DPLobby.pas
DVP.pas
DSetup.pas
 
3. The global c_dfDIxxxx variables in DInput are initialised with default values
2. Better UNICODE-ANSI managment

Changes from 1.5d to 1.6
~~~~~~~~~~~~~~~~~~~~~~~~

1. Added DirectInput unit

The unit is nearly complete, but there are some questions open:

Knows anybody how the global variables
  c_dfDIMouse : TDIDataFormat;
  c_dfDIKeyboard : TDIDataFormat;
  c_dfDIJoystick : TDIDataFormat;
  c_dfDIJoystick2 : TDIDataFormat;
are initialised?
In the C++header they are defined as extern constants:
  extern const DIDATAFORMAT c_dfDIMouse;
  extern const DIDATAFORMAT c_dfDIKeyboard;
  extern const DIDATAFORMAT c_dfDIJoystick;
  extern const DIDATAFORMAT c_dfDIJoystick2;
Are they imported from dinput.lib or dinput.dll? How?

The method SendDeviceData of the interface IDirectInputDevice2
is defined in the C++header, but it's not described in the DirectX-Helpfile.

    function SendDeviceData(Arg1: DWORD; var Arg2: TDIDeviceObjectData;
        var Arg3: DWORD; Arg4: DWORD) : HResult; //?

3. New includefile STRINGSWITCH.INC:

If you want to use Unicode as default stringtype,
define the compiler-symbol UNICODE in it: {$DEFINE UNICODE}

4. Added dwRGBZBitMask & dwYUVZBitMask in TDDPixelFormat 
5. Added dwLinearSize in TDDSurfaceDesc

6.The new version of DDRAW.PAS allows the possibility to load the DDRAW.DLL file indirectly,
so an application can be used also when no DDRAW.DLL is available. To enable this option,
define the INDIRECT at the beginning of the DDRAW.PAS file. 
When defined, a global variable DDrawLoaded is defined which is set to true if the
DDRAW.DLL has been loaded. If false the functions are not available.
When INDIRECT is defined, all functions are declared as function variables but you don't
need to change anything you source files only rebuild everything.
A last note, the DDRAW.DLL is not loaded when the application is DELPHI32.EXE and the OS 
is NT (this caused an DDRAW.DLL initialization error). See the end of DDRAW.PAS.
Thanks to Josha :-)

7. The Retained-Mode example D3DBrowser uses the latest DirectX 5 units now.

Changes from 1.5 to 1.5d
~~~~~~~~~~~~~~~~~~~~~~~~
1. TRect params redefined as PRect to allow nil as parameter
2. Matrices.pas is integrated in DXTools.pas
3. Added class Stack in DXTools
4. Added CI_ and RGB_/RGBA_ functions in D3DTypes
5. Added MAKE_DSHResult function in DSound
6. Renamed TColor in DXTools to TTrueColor
7. Fixed VectorCrossProduct bug in D3DTypes
8. TDDEnumCallback uses PGUID for lpGUID parameter
9. Added D3DDEVCAPS_CANRENDERAFTERFLIP in D3DCaps
10. Fixed IDirectSoundNotify interface definition

Changes from 1.4 to 1.5
~~~~~~~~~~~~~~~~~~~~~~~

1. Added DirectSound Unit
2. Delphi3 native COM should work now

Changes from 1.3d to 1.4
~~~~~~~~~~~~~~~~~~~~~~~~

New versions of DD and D3D headers:
1. Delphi 3 native COM-syntax support
2. More Pascal-like syntax
3. Many bugs fixed

Changes from 1.3c to 1.3d:
~~~~~~~~~~~~~~~~~~~~~~~~~~

1. Added constant DDLOCK_NOSYSLOCK
2. Fixed params of Blt, BltFast and Flip (Surface2 & 3)

Changes from 1.3a to 1.3c:
~~~~~~~~~~~~~~~~~~~~~~~~~~

1. DXTools.DXErrorString reports D3D 5 errors
2. New procedure InitDXRecord in DXTools
3. New TDisplaymode & TDisplaymodes classes in DXTools
4. TD3DTexture should work now
5. Fixed IDirectDrawSurface2 & 3 interfaces

6. New Versions of DPlay.pas and DPLobby.pas from David Sisson

Changes from 1.3 to 1.3a:
~~~~~~~~~~~~~~~~~~~~~~~~~

1. Fixed result.z of the vectorfunctions
2. Fixed IDirect3DMaterial2.GetHandle
3. New perl-generated versions of DSound, DPLobby and DPlay

Changes from 1.2c to 1.3:
~~~~~~~~~~~~~~~~~~~~~~~~~
1. Added David Sissions automatic
   generated units:

DSetup.pas
DSound.pas
DPlay.pas
DPLobby.pas
DInput.pas
DVP.pas
FastFile.pas


Changes from 1.1c to 1.2c:
~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Added DXTools unit (alpha).
2. GetTransform and other Bugs fixed

Changes from 1.0 to 1.1c:
~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Added 'matrices' unit !

2. Fixed D3DRMMATRIX4D bug

3. Added functions for vector-manipulation (in d3dtypes)
that are defined with the D3D_OVERLOADS symbol in C++

The names are different from the C++ versions,
because Delphi doesn't support operator-overloading:

    // Addition and subtraction
  function VectorAdd(v1, v2: D3DVECTOR) : D3DVECTOR;
  function VectorSub(v1, v2: D3DVECTOR) : D3DVECTOR;
    // Scalar multiplication and division
  function VectorMulS(v: D3DVECTOR; s: D3DVALUE) : D3DVECTOR;
  function VectorDivS(v: D3DVECTOR; s: D3DVALUE) : D3DVECTOR;
    // Memberwise multiplication and division
  function VectorMul(v1, v2: D3DVECTOR) : D3DVECTOR;
  function VectorDiv(v1, v2: D3DVECTOR) : D3DVECTOR;
    // Vector dominance
  function VectorSmaller(v1, v2: D3DVECTOR) : boolean;
  function VectorSmallerEquel(v1, v2: D3DVECTOR) : boolean;
    // Bitwise equality
  function VectorEquel(v1, v2: D3DVECTOR) : boolean;
    // Length-related functions
  function VectorSquareMagnitude(v: D3DVECTOR) : D3DVALUE;
  function VectorMagnitude(v: D3DVECTOR) : D3DVALUE;
    // Returns vector with same direction and unit length
  function VectorNormalize(v: D3DVECTOR) : D3DVECTOR;
    // Return min/max component of the input vector
  function VectorMin(v: D3DVECTOR) : D3DVALUE;
  function VectorMax(v: D3DVECTOR) : D3DVALUE;
    // Return memberwise min/max of input vectors
  function VectorMinimize(v1, v2: D3DVECTOR) : D3DVECTOR;
  function VectorMaximize(v1, v2: D3DVECTOR) : D3DVECTOR;
    // Dot and cross product
  function VectorDotProduct(v1, v2: D3DVECTOR) : D3DVALUE;
  function VectorCrossProduct(v1, v2: D3DVECTOR) : D3DVECTOR;
