(D3D8/D3D9) Update headers to work with C89

This commit is contained in:
twinaphex 2018-02-03 16:50:26 +01:00
parent 27c47a89b9
commit 8e96700f0f
5 changed files with 2363 additions and 2379 deletions

View File

@ -1,11 +1,10 @@
///////////////////////////////////////////////////////////////////////////
//
// Copyright (C) Microsoft Corporation. All Rights Reserved.
//
// File: d3dx8core.h
// Content: D3DX core types and functions
//
///////////////////////////////////////////////////////////////////////////
/*
*
* Copyright (C) Microsoft Corporation. All Rights Reserved.
*
* File: d3dx8core.h
* Content: D3DX core types and functions
*/
#include "d3dx8.h"
@ -14,22 +13,22 @@
///////////////////////////////////////////////////////////////////////////
// ID3DXBuffer:
// ------------
// The buffer object is used by D3DX to return arbitrary size data.
//
// GetBufferPointer -
// Returns a pointer to the beginning of the buffer.
//
// GetBufferSize -
// Returns the size of the buffer, in bytes.
///////////////////////////////////////////////////////////////////////////
/*
* ID3DXBuffer:
* ------------
* The buffer object is used by D3DX to return arbitrary size data.
*
* GetBufferPointer -
* Returns a pointer to the beginning of the buffer.
*
* GetBufferSize -
* Returns the size of the buffer, in bytes.
*/
typedef interface ID3DXBuffer ID3DXBuffer;
typedef interface ID3DXBuffer *LPD3DXBUFFER;
// {932E6A7E-C68E-45dd-A7BF-53D19C86DB1F}
/* {932E6A7E-C68E-45dd-A7BF-53D19C86DB1F} */
DEFINE_GUID(IID_ID3DXBuffer,
0x932e6a7e, 0xc68e, 0x45dd, 0xa7, 0xbf, 0x53, 0xd1, 0x9c, 0x86, 0xdb, 0x1f);
@ -38,48 +37,45 @@ DEFINE_GUID(IID_ID3DXBuffer,
DECLARE_INTERFACE_(ID3DXBuffer, IUnknown)
{
// IUnknown
/* IUnknown */
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ID3DXBuffer
/* ID3DXBuffer */
STDMETHOD_(LPVOID, GetBufferPointer)(THIS) PURE;
STDMETHOD_(DWORD, GetBufferSize)(THIS) PURE;
};
///////////////////////////////////////////////////////////////////////////
// ID3DXFont:
// ----------
// Font objects contain the textures and resources needed to render
// a specific font on a specific device.
//
// Begin -
// Prepartes device for drawing text. This is optional.. if DrawText
// is called outside of Begin/End, it will call Begin and End for you.
//
// DrawText -
// Draws formatted text on a D3D device. Some parameters are
// surprisingly similar to those of GDI's DrawText function. See GDI
// documentation for a detailed description of these parameters.
//
// End -
// Restores device state to how it was when Begin was called.
//
// OnLostDevice, OnResetDevice -
// Call OnLostDevice() on this object before calling Reset() on the
// device, so that this object can release any stateblocks and video
// memory resources. After Reset(), the call OnResetDevice().
//
///////////////////////////////////////////////////////////////////////////
/*
* ID3DXFont:
* ----------
* Font objects contain the textures and resources needed to render
* a specific font on a specific device.
*
* Begin -
* Prepartes device for drawing text. This is optional.. if DrawText
* is called outside of Begin/End, it will call Begin and End for you.
*
* DrawText -
* Draws formatted text on a D3D device. Some parameters are
* surprisingly similar to those of GDI's DrawText function. See GDI
* documentation for a detailed description of these parameters.
*
* End -
* Restores device state to how it was when Begin was called.
*
* OnLostDevice, OnResetDevice -
* Call OnLostDevice() on this object before calling Reset() on the
* device, so that this object can release any stateblocks and video
* memory resources. After Reset(), the call OnResetDevice().
*
*/
typedef interface ID3DXFont ID3DXFont;
typedef interface ID3DXFont *LPD3DXFONT;
// {89FAD6A5-024D-49af-8FE7-F51123B85E25}
/* {89FAD6A5-024D-49af-8FE7-F51123B85E25} */
DEFINE_GUID( IID_ID3DXFont,
0x89fad6a5, 0x24d, 0x49af, 0x8f, 0xe7, 0xf5, 0x11, 0x23, 0xb8, 0x5e, 0x25);
@ -89,12 +85,12 @@ DEFINE_GUID( IID_ID3DXFont,
DECLARE_INTERFACE_(ID3DXFont, IUnknown)
{
// IUnknown
/* IUnknown */
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ID3DXFont
/* ID3DXFont */
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
STDMETHOD(GetLogFont)(THIS_ LOGFONT* pLogFont) PURE;
@ -118,7 +114,7 @@ DECLARE_INTERFACE_(ID3DXFont, IUnknown)
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
#endif /* __cplusplus */
HRESULT WINAPI
D3DXCreateFont(
@ -137,33 +133,33 @@ HRESULT WINAPI
}
#endif /* __cplusplus */
///////////////////////////////////////////////////////////////////////////
// ID3DXSprite:
// ------------
// This object intends to provide an easy way to drawing sprites using D3D.
//
// Begin -
// Prepares device for drawing sprites
//
// Draw, DrawAffine, DrawTransform -
// Draws a sprite in screen-space. Before transformation, the sprite is
// the size of SrcRect, with its top-left corner at the origin (0,0).
// The color and alpha channels are modulated by Color.
//
// End -
// Restores device state to how it was when Begin was called.
//
// OnLostDevice, OnResetDevice -
// Call OnLostDevice() on this object before calling Reset() on the
// device, so that this object can release any stateblocks and video
// memory resources. After Reset(), the call OnResetDevice().
///////////////////////////////////////////////////////////////////////////
/*
* ID3DXSprite:
* ------------
* This object intends to provide an easy way to drawing sprites using D3D.
*
* Begin -
* Prepares device for drawing sprites
*
* Draw, DrawAffine, DrawTransform -
* Draws a sprite in screen-space. Before transformation, the sprite is
* the size of SrcRect, with its top-left corner at the origin (0,0).
* The color and alpha channels are modulated by Color.
*
* End -
* Restores device state to how it was when Begin was called.
*
* OnLostDevice, OnResetDevice -
* Call OnLostDevice() on this object before calling Reset() on the
* device, so that this object can release any stateblocks and video
* memory resources. After Reset(), the call OnResetDevice().
*/
typedef interface ID3DXSprite ID3DXSprite;
typedef interface ID3DXSprite *LPD3DXSPRITE;
// {13D69D15-F9B0-4e0f-B39E-C91EB33F6CE7}
/* {13D69D15-F9B0-4e0f-B39E-C91EB33F6CE7} */
DEFINE_GUID( IID_ID3DXSprite,
0x13d69d15, 0xf9b0, 0x4e0f, 0xb3, 0x9e, 0xc9, 0x1e, 0xb3, 0x3f, 0x6c, 0xe7);
@ -173,12 +169,12 @@ DEFINE_GUID( IID_ID3DXSprite,
DECLARE_INTERFACE_(ID3DXSprite, IUnknown)
{
// IUnknown
/* IUnknown */
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ID3DXSprite
/* ID3DXSprite */
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
STDMETHOD(Begin)(THIS) PURE;
@ -201,7 +197,7 @@ DECLARE_INTERFACE_(ID3DXSprite, IUnknown)
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
#endif /* __cplusplus */
HRESULT WINAPI
@ -211,28 +207,28 @@ HRESULT WINAPI
#ifdef __cplusplus
}
#endif //__cplusplus
#endif /* __cplusplus */
///////////////////////////////////////////////////////////////////////////
// ID3DXRenderToSurface:
// ---------------------
// This object abstracts rendering to surfaces. These surfaces do not
// necessarily need to be render targets. If they are not, a compatible
// render target is used, and the result copied into surface at end scene.
//
// BeginScene, EndScene -
// Call BeginScene() and EndScene() at the beginning and ending of your
// scene. These calls will setup and restore render targets, viewports,
// etc..
//
// OnLostDevice, OnResetDevice -
// Call OnLostDevice() on this object before calling Reset() on the
// device, so that this object can release any stateblocks and video
// memory resources. After Reset(), the call OnResetDevice().
///////////////////////////////////////////////////////////////////////////
/*
* ID3DXRenderToSurface:
* ---------------------
* This object abstracts rendering to surfaces. These surfaces do not
* necessarily need to be render targets. If they are not, a compatible
* render target is used, and the result copied into surface at end scene.
*
* BeginScene, EndScene -
* Call BeginScene() and EndScene() at the beginning and ending of your
* scene. These calls will setup and restore render targets, viewports,
* etc..
*
* OnLostDevice, OnResetDevice -
* Call OnLostDevice() on this object before calling Reset() on the
* device, so that this object can release any stateblocks and video
* memory resources. After Reset(), the call OnResetDevice().
*/
typedef struct _D3DXRTS_DESC
{
@ -248,23 +244,21 @@ typedef struct _D3DXRTS_DESC
typedef interface ID3DXRenderToSurface ID3DXRenderToSurface;
typedef interface ID3DXRenderToSurface *LPD3DXRENDERTOSURFACE;
// {82DF5B90-E34E-496e-AC1C-62117A6A5913}
/* {82DF5B90-E34E-496e-AC1C-62117A6A5913} */
DEFINE_GUID( IID_ID3DXRenderToSurface,
0x82df5b90, 0xe34e, 0x496e, 0xac, 0x1c, 0x62, 0x11, 0x7a, 0x6a, 0x59, 0x13);
#undef INTERFACE
#define INTERFACE ID3DXRenderToSurface
DECLARE_INTERFACE_(ID3DXRenderToSurface, IUnknown)
{
// IUnknown
/* IUnknown */
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ID3DXRenderToSurface
/* ID3DXRenderToSurface */
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
STDMETHOD(GetDesc)(THIS_ D3DXRTS_DESC* pDesc) PURE;
@ -278,7 +272,7 @@ DECLARE_INTERFACE_(ID3DXRenderToSurface, IUnknown)
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
#endif /* __cplusplus */
HRESULT WINAPI
D3DXCreateRenderToSurface(
@ -292,37 +286,37 @@ HRESULT WINAPI
#ifdef __cplusplus
}
#endif //__cplusplus
#endif /* __cplusplus */
///////////////////////////////////////////////////////////////////////////
// ID3DXRenderToEnvMap:
// --------------------
// This object abstracts rendering to environment maps. These surfaces
// do not necessarily need to be render targets. If they are not, a
// compatible render target is used, and the result copied into the
// environment map at end scene.
//
// BeginCube, BeginSphere, BeginHemisphere, BeginParabolic -
// This function initiates the rendering of the environment map. As
// parameters, you pass the textures in which will get filled in with
// the resulting environment map.
//
// Face -
// Call this function to initiate the drawing of each face. For each
// environment map, you will call this six times.. once for each face
// in D3DCUBEMAP_FACES.
//
// End -
// This will restore all render targets, and if needed compose all the
// rendered faces into the environment map surfaces.
//
// OnLostDevice, OnResetDevice -
// Call OnLostDevice() on this object before calling Reset() on the
// device, so that this object can release any stateblocks and video
// memory resources. After Reset(), the call OnResetDevice().
///////////////////////////////////////////////////////////////////////////
/*
* ID3DXRenderToEnvMap:
* --------------------
* This object abstracts rendering to environment maps. These surfaces
* do not necessarily need to be render targets. If they are not, a
* compatible render target is used, and the result copied into the
* environment map at end scene.
*
* BeginCube, BeginSphere, BeginHemisphere, BeginParabolic -
* This function initiates the rendering of the environment map. As
* parameters, you pass the textures in which will get filled in with
* the resulting environment map.
*
* Face -
* Call this function to initiate the drawing of each face. For each
* environment map, you will call this six times.. once for each face
* in D3DCUBEMAP_FACES.
*
* End -
* This will restore all render targets, and if needed compose all the
* rendered faces into the environment map surfaces.
*
* OnLostDevice, OnResetDevice -
* Call OnLostDevice() on this object before calling Reset() on the
* device, so that this object can release any stateblocks and video
* memory resources. After Reset(), the call OnResetDevice().
*/
typedef struct _D3DXRTE_DESC
{
@ -336,7 +330,7 @@ typedef struct _D3DXRTE_DESC
typedef interface ID3DXRenderToEnvMap ID3DXRenderToEnvMap;
typedef interface ID3DXRenderToEnvMap *LPD3DXRenderToEnvMap;
// {4E42C623-9451-44b7-8C86-ABCCDE5D52C8}
/* {4E42C623-9451-44b7-8C86-ABCCDE5D52C8} */
DEFINE_GUID( IID_ID3DXRenderToEnvMap,
0x4e42c623, 0x9451, 0x44b7, 0x8c, 0x86, 0xab, 0xcc, 0xde, 0x5d, 0x52, 0xc8);
@ -346,12 +340,12 @@ DEFINE_GUID( IID_ID3DXRenderToEnvMap,
DECLARE_INTERFACE_(ID3DXRenderToEnvMap, IUnknown)
{
// IUnknown
/* IUnknown */
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ID3DXRenderToEnvMap
/* ID3DXRenderToEnvMap */
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
STDMETHOD(GetDesc)(THIS_ D3DXRTE_DESC* pDesc) PURE;
@ -379,7 +373,7 @@ DECLARE_INTERFACE_(ID3DXRenderToEnvMap, IUnknown)
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
#endif /* __cplusplus */
HRESULT WINAPI
D3DXCreateRenderToEnvMap(
@ -392,26 +386,26 @@ HRESULT WINAPI
#ifdef __cplusplus
}
#endif //__cplusplus
#endif /* __cplusplus */
///////////////////////////////////////////////////////////////////////////
// Shader assemblers:
///////////////////////////////////////////////////////////////////////////
/*
* Shader assemblers:
*/
//-------------------------------------------------------------------------
// D3DXASM flags:
// --------------
//
// D3DXASM_DEBUG
// Generate debug info.
//
// D3DXASM_SKIPVALIDATION
// Do not validate the generated code against known capabilities and
// constraints. This option is only recommended when assembling shaders
// you KNOW will work. (ie. have assembled before without this option.)
//-------------------------------------------------------------------------
/*
* D3DXASM flags:
* --------------
*
* D3DXASM_DEBUG
* Generate debug info.
*
* D3DXASM_SKIPVALIDATION
* Do not validate the generated code against known capabilities and
* constraints. This option is only recommended when assembling shaders
* you KNOW will work. (ie. have assembled before without this option.)
*/
#define D3DXASM_DEBUG (1 << 0)
#define D3DXASM_SKIPVALIDATION (1 << 1)
@ -419,34 +413,34 @@ HRESULT WINAPI
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
#endif /* __cplusplus */
//-------------------------------------------------------------------------
// D3DXAssembleShader:
// -------------------
// Assembles an ascii description of a vertex or pixel shader into
// binary form.
//
// Parameters:
// pSrcFile
// Source file name
// hSrcModule
// Module handle. if NULL, current module will be used.
// pSrcResource
// Resource name in module
// pSrcData
// Pointer to source code
// SrcDataLen
// Size of source code, in bytes
// Flags
// D3DXASM_xxx flags
// ppConstants
// Returns an ID3DXBuffer object containing constant declarations.
// ppCompiledShader
// Returns an ID3DXBuffer object containing the object code.
// ppCompilationErrors
// Returns an ID3DXBuffer object containing ascii error messages
//-------------------------------------------------------------------------
/*
* D3DXAssembleShader:
* -------------------
* Assembles an ascii description of a vertex or pixel shader into
* binary form.
*
* Parameters:
* pSrcFile
* Source file name
* hSrcModule
* Module handle. if NULL, current module will be used.
* pSrcResource
* Resource name in module
* pSrcData
* Pointer to source code
* SrcDataLen
* Size of source code, in bytes
* Flags
* D3DXASM_xxx flags
* ppConstants
* Returns an ID3DXBuffer object containing constant declarations.
* ppCompiledShader
* Returns an ID3DXBuffer object containing the object code.
* ppCompilationErrors
* Returns an ID3DXBuffer object containing ascii error messages
*/
HRESULT WINAPI
D3DXAssembleShaderFromFileA(
@ -506,33 +500,33 @@ HRESULT WINAPI
#ifdef __cplusplus
}
#endif //__cplusplus
#endif /* __cplusplus */
///////////////////////////////////////////////////////////////////////////
// Misc APIs:
///////////////////////////////////////////////////////////////////////////
/*
* Misc APIs:
*/
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
#endif /* __cplusplus */
//-------------------------------------------------------------------------
// D3DXGetErrorString:
// ------------------
// Returns the error string for given an hresult. Interprets all D3DX and
// D3D hresults.
//
// Parameters:
// hr
// The error code to be deciphered.
// pBuffer
// Pointer to the buffer to be filled in.
// BufferLen
// Count of characters in buffer. Any error message longer than this
// length will be truncated to fit.
//-------------------------------------------------------------------------
/*
* D3DXGetErrorString:
* ------------------
* Returns the error string for given an hresult. Interprets all D3DX and
* D3D hresults.
*
* Parameters:
* hr
* The error code to be deciphered.
* pBuffer
* Pointer to the buffer to be filled in.
* BufferLen
* Count of characters in buffer. Any error message longer than this
* length will be truncated to fit.
*/
HRESULT WINAPI
D3DXGetErrorStringA(
HRESULT hr,

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +1,26 @@
//////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 1998 Microsoft Corporation. All Rights Reserved.
//
// File: d3dx8math.inl
// Content: D3DX math inline functions
//
//////////////////////////////////////////////////////////////////////////////
/*
*
* Copyright (C) 1998 Microsoft Corporation. All Rights Reserved.
*
* File: d3dx8math.inl
* Content: D3DX math inline functions
*
*/
#ifndef __D3DX8MATH_INL__
#define __D3DX8MATH_INL__
//===========================================================================
//
// Inline Class Methods
//
//===========================================================================
/*
*
* Inline Class Methods
*
*/
#ifdef __cplusplus
//--------------------------
// 2D Vector
//--------------------------
/*
* 2D Vector
*/
D3DXINLINE
D3DXVECTOR2::D3DXVECTOR2( CONST FLOAT *pf )
@ -42,7 +41,7 @@ D3DXVECTOR2::D3DXVECTOR2( FLOAT fx, FLOAT fy )
y = fy;
}
// casting
/* casting */
D3DXINLINE
D3DXVECTOR2::operator FLOAT* ()
{
@ -55,7 +54,7 @@ D3DXVECTOR2::operator CONST FLOAT* () const
return (CONST FLOAT *) &x;
}
// assignment operators
/* assignment operators */
D3DXINLINE D3DXVECTOR2&
D3DXVECTOR2::operator += ( CONST D3DXVECTOR2& v )
{
@ -89,7 +88,7 @@ D3DXVECTOR2::operator /= ( FLOAT f )
return *this;
}
// unary operators
/* unary operators */
D3DXINLINE D3DXVECTOR2
D3DXVECTOR2::operator + () const
{
@ -102,7 +101,7 @@ D3DXVECTOR2::operator - () const
return D3DXVECTOR2(-x, -y);
}
// binary operators
/* binary operators */
D3DXINLINE D3DXVECTOR2
D3DXVECTOR2::operator + ( CONST D3DXVECTOR2& v ) const
{
@ -150,9 +149,9 @@ D3DXVECTOR2::operator != ( CONST D3DXVECTOR2& v ) const
//--------------------------
// 3D Vector
//--------------------------
/*
* 3D Vector
*/
D3DXINLINE
D3DXVECTOR3::D3DXVECTOR3( CONST FLOAT *pf )
{
@ -183,7 +182,7 @@ D3DXVECTOR3::D3DXVECTOR3( FLOAT fx, FLOAT fy, FLOAT fz )
}
// casting
/* casting */
D3DXINLINE
D3DXVECTOR3::operator FLOAT* ()
{
@ -197,7 +196,7 @@ D3DXVECTOR3::operator CONST FLOAT* () const
}
// assignment operators
/* assignment operators */
D3DXINLINE D3DXVECTOR3&
D3DXVECTOR3::operator += ( CONST D3DXVECTOR3& v )
{
@ -235,8 +234,7 @@ D3DXVECTOR3::operator /= ( FLOAT f )
return *this;
}
// unary operators
/* unary operators */
D3DXINLINE D3DXVECTOR3
D3DXVECTOR3::operator + () const
{
@ -249,8 +247,7 @@ D3DXVECTOR3::operator - () const
return D3DXVECTOR3(-x, -y, -z);
}
// binary operators
/* binary operators */
D3DXINLINE D3DXVECTOR3
D3DXVECTOR3::operator + ( CONST D3DXVECTOR3& v ) const
{
@ -296,11 +293,9 @@ D3DXVECTOR3::operator != ( CONST D3DXVECTOR3& v ) const
return x != v.x || y != v.y || z != v.z;
}
//--------------------------
// 4D Vector
//--------------------------
/*
* 4D Vector
*/
D3DXINLINE
D3DXVECTOR4::D3DXVECTOR4( CONST FLOAT *pf )
{
@ -324,8 +319,7 @@ D3DXVECTOR4::D3DXVECTOR4( FLOAT fx, FLOAT fy, FLOAT fz, FLOAT fw )
w = fw;
}
// casting
/* casting */
D3DXINLINE
D3DXVECTOR4::operator FLOAT* ()
{
@ -339,7 +333,7 @@ D3DXVECTOR4::operator CONST FLOAT* () const
}
// assignment operators
/* assignment operators */
D3DXINLINE D3DXVECTOR4&
D3DXVECTOR4::operator += ( CONST D3DXVECTOR4& v )
{
@ -381,8 +375,7 @@ D3DXVECTOR4::operator /= ( FLOAT f )
return *this;
}
// unary operators
/* unary operators */
D3DXINLINE D3DXVECTOR4
D3DXVECTOR4::operator + () const
{
@ -396,7 +389,7 @@ D3DXVECTOR4::operator - () const
}
// binary operators
/* binary operators */
D3DXINLINE D3DXVECTOR4
D3DXVECTOR4::operator + ( CONST D3DXVECTOR4& v ) const
{
@ -443,9 +436,9 @@ D3DXVECTOR4::operator != ( CONST D3DXVECTOR4& v ) const
}
//--------------------------
// Matrix
//--------------------------
/*
* Matrix
*/
D3DXINLINE
D3DXMATRIX::D3DXMATRIX( CONST FLOAT* pf )
{
@ -475,9 +468,7 @@ D3DXMATRIX::D3DXMATRIX( FLOAT f11, FLOAT f12, FLOAT f13, FLOAT f14,
_41 = f41; _42 = f42; _43 = f43; _44 = f44;
}
// access grants
/* access grants */
D3DXINLINE FLOAT&
D3DXMATRIX::operator () ( UINT iRow, UINT iCol )
{
@ -491,7 +482,7 @@ D3DXMATRIX::operator () ( UINT iRow, UINT iCol ) const
}
// casting operators
/* casting operators */
D3DXINLINE
D3DXMATRIX::operator FLOAT* ()
{
@ -505,7 +496,7 @@ D3DXMATRIX::operator CONST FLOAT* () const
}
// assignment operators
/* assignment operators */
D3DXINLINE D3DXMATRIX&
D3DXMATRIX::operator *= ( CONST D3DXMATRIX& mat )
{
@ -554,8 +545,7 @@ D3DXMATRIX::operator /= ( FLOAT f )
return *this;
}
// unary operators
/* unary operators */
D3DXINLINE D3DXMATRIX
D3DXMATRIX::operator + () const
{
@ -571,8 +561,7 @@ D3DXMATRIX::operator - () const
-_41, -_42, -_43, -_44);
}
// binary operators
/* binary operators */
D3DXINLINE D3DXMATRIX
D3DXMATRIX::operator * ( CONST D3DXMATRIX& mat ) const
{
@ -643,9 +632,9 @@ D3DXMATRIX::operator != ( CONST D3DXMATRIX& mat ) const
//--------------------------
// Quaternion
//--------------------------
/*
* Quaternion
*/
D3DXINLINE
D3DXQUATERNION::D3DXQUATERNION( CONST FLOAT* pf )
@ -671,7 +660,7 @@ D3DXQUATERNION::D3DXQUATERNION( FLOAT fx, FLOAT fy, FLOAT fz, FLOAT fw )
}
// casting
/* casting */
D3DXINLINE
D3DXQUATERNION::operator FLOAT* ()
{
@ -685,7 +674,7 @@ D3DXQUATERNION::operator CONST FLOAT* () const
}
// assignment operators
/* assignment operators */
D3DXINLINE D3DXQUATERNION&
D3DXQUATERNION::operator += ( CONST D3DXQUATERNION& q )
{
@ -735,7 +724,7 @@ D3DXQUATERNION::operator /= ( FLOAT f )
}
// unary operators
/* unary operators */
D3DXINLINE D3DXQUATERNION
D3DXQUATERNION::operator + () const
{
@ -749,7 +738,7 @@ D3DXQUATERNION::operator - () const
}
// binary operators
/* binary operators */
D3DXINLINE D3DXQUATERNION
D3DXQUATERNION::operator + ( CONST D3DXQUATERNION& q ) const
{
@ -805,9 +794,9 @@ D3DXQUATERNION::operator != ( CONST D3DXQUATERNION& q ) const
//--------------------------
// Plane
//--------------------------
/*
* Plane
*/
D3DXINLINE
D3DXPLANE::D3DXPLANE( CONST FLOAT* pf )
@ -832,8 +821,7 @@ D3DXPLANE::D3DXPLANE( FLOAT fa, FLOAT fb, FLOAT fc, FLOAT fd )
d = fd;
}
// casting
/* casting */
D3DXINLINE
D3DXPLANE::operator FLOAT* ()
{
@ -847,7 +835,7 @@ D3DXPLANE::operator CONST FLOAT* () const
}
// unary operators
/* unary operators */
D3DXINLINE D3DXPLANE
D3DXPLANE::operator + () const
{
@ -860,8 +848,7 @@ D3DXPLANE::operator - () const
return D3DXPLANE(-a, -b, -c, -d);
}
// binary operators
/* binary operators */
D3DXINLINE BOOL
D3DXPLANE::operator == ( CONST D3DXPLANE& p ) const
{
@ -874,12 +861,9 @@ D3DXPLANE::operator != ( CONST D3DXPLANE& p ) const
return a != p.a || b != p.b || c != p.c || d != p.d;
}
//--------------------------
// Color
//--------------------------
/*
* Color
*/
D3DXINLINE
D3DXCOLOR::D3DXCOLOR( DWORD dw )
@ -923,8 +907,7 @@ D3DXCOLOR::D3DXCOLOR( FLOAT fr, FLOAT fg, FLOAT fb, FLOAT fa )
a = fa;
}
// casting
/* casting */
D3DXINLINE
D3DXCOLOR::operator DWORD () const
{
@ -975,8 +958,7 @@ D3DXCOLOR::operator CONST D3DCOLORVALUE& () const
return *((CONST D3DCOLORVALUE *) &r);
}
// assignment operators
/* assignment operators */
D3DXINLINE D3DXCOLOR&
D3DXCOLOR::operator += ( CONST D3DXCOLOR& c )
{
@ -1018,8 +1000,7 @@ D3DXCOLOR::operator /= ( FLOAT f )
return *this;
}
// unary operators
/* unary operators */
D3DXINLINE D3DXCOLOR
D3DXCOLOR::operator + () const
{
@ -1033,7 +1014,7 @@ D3DXCOLOR::operator - () const
}
// binary operators
/* binary operators */
D3DXINLINE D3DXCOLOR
D3DXCOLOR::operator + ( CONST D3DXCOLOR& c ) const
{
@ -1080,20 +1061,18 @@ D3DXCOLOR::operator != ( CONST D3DXCOLOR& c ) const
}
#endif //__cplusplus
#endif /* __cplusplus */
/*
*
* Inline functions
*
*/
//===========================================================================
//
// Inline functions
//
//===========================================================================
//--------------------------
// 2D Vector
//--------------------------
/*
* 2D Vector
*/
D3DXINLINE FLOAT D3DXVec2Length
( CONST D3DXVECTOR2 *pV )
@ -1223,9 +1202,9 @@ D3DXINLINE D3DXVECTOR2* D3DXVec2Lerp
}
//--------------------------
// 3D Vector
//--------------------------
/*
* 3D Vector
*/
D3DXINLINE FLOAT D3DXVec3Length
( CONST D3DXVECTOR3 *pV )
@ -1368,9 +1347,9 @@ D3DXINLINE D3DXVECTOR3* D3DXVec3Lerp
}
//--------------------------
// 4D Vector
//--------------------------
/*
* 4D Vector
*/
D3DXINLINE FLOAT D3DXVec4Length
( CONST D3DXVECTOR4 *pV )
@ -1501,9 +1480,9 @@ D3DXINLINE D3DXVECTOR4* D3DXVec4Lerp
}
//--------------------------
// 4D Matrix
//--------------------------
/*
* 4D Matrix
*/
D3DXINLINE D3DXMATRIX* D3DXMatrixIdentity
( D3DXMATRIX *pOut )
@ -1538,9 +1517,9 @@ D3DXINLINE BOOL D3DXMatrixIsIdentity
}
//--------------------------
// Quaternion
//--------------------------
/*
* Quaternion
*/
D3DXINLINE FLOAT D3DXQuaternionLength
( CONST D3DXQUATERNION *pQ )
@ -1621,9 +1600,9 @@ D3DXINLINE D3DXQUATERNION* D3DXQuaternionConjugate
}
//--------------------------
// Plane
//--------------------------
/*
* Plane
*/
D3DXINLINE FLOAT D3DXPlaneDot
( CONST D3DXPLANE *pP, CONST D3DXVECTOR4 *pV)
@ -1659,9 +1638,9 @@ D3DXINLINE FLOAT D3DXPlaneDotNormal
}
//--------------------------
// Color
//--------------------------
/*
* Color
*/
D3DXINLINE D3DXCOLOR* D3DXColorNegative
(D3DXCOLOR *pOut, CONST D3DXCOLOR *pC)
@ -1754,4 +1733,4 @@ D3DXINLINE D3DXCOLOR* D3DXColorLerp
}
#endif // __D3DX8MATH_INL__
#endif /* __D3DX8MATH_INL__ */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff