Delphi 与 DirectX 之 DelphiX(2): DelphiX 各单元概览


DXClass | DXDraws | DIB | DXSounds | DXWave | DXPlay | DXSprite | DXInput

DXClass 单元
TControlSubClass
TControlSubClassProc
TCustomDXTimer
TDirectX
TDirectXDriver
TDirectXDrivers
TDXForm
TDXPictureClip
TDXTimer
TDXTimerEvent
THashCollection
THashCollectionItem

TDblPoint

Min(Val1,Val2: Integer): Integer      
PointInRect(const Poin: TPoint; const Rect: TRect): Boolean
RectInRect(const Rect1,Rect2: TRect): Boolean
OverlapRect(const Rect1,Rect2: TRect): Boolean
WideRect(ALeft,ATop,AWidth,AHeight: Integer): TRect
InitCosinTable
Cos256(i: Integer): Double
Sin256(i: Integer): Double
ReleaseCom(out Com)
DXLoadLibrary(const FileName,FuncName: string): TFarProc
FreeLibList
MakeHashCode(const Str: string): Integer
Get2PointRange(a,b: TDblPoint): Double
GetARadFromB(A,B: TDblPoint): Double
Get256(dX,dY: Double): Double
GetPointFromRangeAndAngle(SP: TDblPoint; Range,Angle: Double): TDblPoint
In2DRowCol: T2DRowCol
Trans2DRowCol(x,y: double): T2DRowCol
Scale2DRowCol(x,y: double): T2DRowCol
Rotate2DRowCol(Theta: double): T2DRowCol
Multipl2DRowCol(A,B: T2DRowCol): T2DRowCol
RotateIntoX2DRowCol(x,y: double): T2DRowCol
ScaleAt2DRowCol(x,y,Sx,Sy: double): T2DRowCol
ReflectAcross2DRowCol(x,y,dx,dy: Double): T2DRowCol
RotateAround2DRowCol(x,y,Theta: Double): T2DRowCol
Apply2DVector(V: T2DVector; M: T2DRowCol): T2DVector
DblPoint(a,b: Double): TDblPoint
TruncDblPoint(DblPos: TDblPoint): TPoint
PointInCircl(PPos,CPos: TPoint; R: integer): Boolean
CircleInCirc(C1Pos,C2Pos: TPoint; R1,R2: Integer): Boolean
SegmentInCircle(SPos,EPos,CPos: TPoint; R: Integer): Boolean
Angle256(Angle: Single): Single
CheckNearAThanB(S,A,B: TDblPoint): Boolean
CircumCenter3Pt(const x1,y1,x2,y2,x3,y3: Single; outPx,Py: Singl): Boolean
Distance(const x1,y1,x2,y2: Double): Double
InCenter(const x1,y1,x2,y2,x3,y3: Double; outPx,Py: Double)
PointInTriangl(const Px,Py,x1,y1,x2,y2,x3,y3: Double): Boolean
Log(const Co,FName: string)

T2DRowCol
T2DVector
TCellRange
TControlSubClassProc
TDXTimerEvent

L_Curve = 0
R_Curve = 1
C_Add = 0
C_Dec = 1
PaletteMask = $02000000

CosinTable: array[0..255] of Double
LibList: TStringList
SetAppExStyleCount: Integer

DXDraws 单元
TBlit
TBlitMoveEvent
TCustomDXDraw
TCustomDXImageList
TD2D
TD2DTextureFilter
TD2DTextures
TDirect3DTexture
TDirect3DTexture2
TDirectDraw
TDirectDrawClipper
TDirectDrawOverlay
TDirectDrawPalette
TDirectDrawSurface
TDirectDrawSurfaceCanvas
TDXDraw
TDXDrawDisplay
TDXDrawDisplayMode
TDXDrawDriver
TDXDrawDriverBlt
TDXDrawDriverFlip
TDXDrawNotifyEvent
TDXDrawNotifyType
TDXDrawOption
TDXFont
TDXImageList
TDXPowerFont
TDXPowerFontAfterTextOutEvent
TDXPowerFontBeforeTextOutEvent
TDXPowerFontEffectsParameters
TDXPowerFontTextOutEffect
TDXPowerFontTextOutType
TDXTBase
TDXTextureImage
TDXTextureImageFileBlockHeaderWriter
TDXTextureImageFileCompressType
TDXTextureImageLoadFunc
TDXTextureImageProgressEvent
TDXTextureImageType
TDXTImageChannel
TInitializeDirect3DOption
TOnRender
TOnUpdateTextures
TPictureCollection
TPictureCollectionComponent
TPictureCollectionItem
TPictureCollectionItemPattern
TRenderMirrorFlip
TRenderType
TTextureRec
TTrace
TTracePointsType
TTraces
TWaveType

TBlitRec
TBlurImageProp
TDXTextureImageChannel
TDXTextureImageFileBlockHeader
TDXTextureImageFileBlockHeader_StartGroup
TDXTextureImageFileBlockHeaderWriter_BlockInfo
TDXTextureImageFileHeader
TDXTextureImageHeader_Image_Format
TDXTextureImageHeader_Image_Format_Index
TDXTextureImageHeader_Image_Format_RGB
TDXTextureImageHeader_Image_GroupInfo
TDXTextureImageHeader_Image_PixelData
TDXTextureImageHeader_Image_TransparentColor
TDXTImageChannelInfo
TDXTImageFormat
TPath
TRGB

dxtMakeChannel(Mask: DWORD; indexed: Boolean): TDXTextureImageChannel  
dxtEncodeChannel(const Channel: TDXTextureImageChannel; c: DWORD): DWORD
dxtDecodeChannel(const Channel: TDXTextureImageChannel; c: DWORD): DWORD
dib2dxt(DIBImage: TDIB; out DXTImage: TDXTextureImage)
DXDraw_Draw(...); 
DXDraw_Paint(...); 
DXDraw_Render(...); 
DXDirectDrawEnumerate(lpCallback: TDDEnumCallbackA;  lpContext: Pointer): HRESULT
EnumDirectDrawDrivers:TDirectXDrivers
ClipRect(var DestRect: TRect; const DestRect2: TRect): Boolean
ClipRect2(var DestRect, SrcRect: TRect; const DestRect2, SrcRect2: TRect): Boolean
Conv24to16(Color: Integer): Word
Conv16to24(Color: Word): Integer
GetRGB(Color: cardinal; var R, G, B: Byte)
RGBToBGR(Color: cardinal): cardinal
BPPToDDBD(BPP: DWORD): DWORD
FreeZBufferSurface(Surface: TDirectDrawSurface; var ZBuffer: TDirectDrawSurface)
Direct3DInitializing(...); 
Direct3DInitializing_DXDraw(Options: TInitializeDirect3DOptions;  DXDraw: TCustomDXDraw)
InitializeDirect3D(...); 
InitializeDirect3D7(...); 
TDXDrawRGBQuadsToPaletteEntries(const RGBQuads: TRGBQuads;  AllowPalette256: Boolean): TPaletteEntries
GetWidthBytes(Width, BitCount: Integer): Integer
DXTextureImage_LoadDXTextureImageFunc(Stream: TStream; Image: TDXTextureImage)
DXTextureImage_LoadBitmapFunc(Stream: TStream; Image: TDXTextureImage)
DXTextureImageLoadFuncList:TList
DXTextureImage_SaveDXTextureImageFunc(Stream: TStream; Image: TDXTextureImage)
DXTextureImage_LoadDXTextureImageFunc(Stream: TStream; Image: TDXTextureImage)
DXTextureImage_SaveDXTextureImageFunc(Stream: TStream; Image: TDXTextureImage)
DXTextureImage_LoadBitmapFunc(Stream: TStream; Image: TDXTextureImage)
GetBitCount(b: Integer): Integer
IsNotZero(Z: TRect): Boolean
Mod2f(i: Double; i2: Integer): Double

PByte3
PDXDrawNotifyEvent
PDXTextureImageFileBlockHeaderWriter_BlockInfo
PPathArr
PRGB
PTextureArr
PTextureRec
TBlitMoveEvent
TBlurImageArr
TByte3
TD2D4Vertex
TD2DTextureFilter
TDirectDrawDisplay
TDirectDrawDisplayMode
TDXDrawNotifyEvent
TDXDrawNotifyType
TDXDrawOption
TDXDrawOptions
TDXPowerFontAfterTextOutEvent
TDXPowerFontBeforeTextOutEvent
TDXPowerFontTextOutEffect
TDXPowerFontTextOutType
TDXTextureImageFileCompressType
TDXTextureImageLoadFunc
TDXTextureImageProgressEvent
TDXTextureImageType
TDXTextureImage_PaletteEntries
TDXTImageChannel
TDXTImageChannels
TInitializeDire3DOption
TInitializeDire3DOptions
TOnRender
TOnUpdateTextures
TPathArr
TRenderMirrorFlip
TRenderMirrorFlipSet
TRenderType
TTextureArr
TTracePointsType
TWaveType

maxTexBlock = 2048  
maxVideoBlockSize = 2048
DXTextureImageGroupType_Normal = 0
DXTextureImageGroupType_Mipmap = 1
Alphabet =  ???
PowerAlphabet = ???
ccDefaultSpecular = $FFFFFFFF
ZeroRect:TRect = (Left: 0; Top: 0; Right: 0; Bottom: 0)
DDPF_PALETTEINDEXED = ...; 
Mask1:array[0..7] of DWORD = (1, 2, 4, 8, 16, 32, 64, 128)
Mask2:array[0..3] of DWORD = (3, 12, 48, 192)
Mask4:array[0..1] of DWORD = ($0F, $F0)
Shift1:array[0..7] of DWORD = (0, 1, 2, 3, 4, 5, 6, 7)
Shift2:array[0..3] of DWORD = (0, 2, 4, 6)
Shift4:array[0..1] of DWORD = (0, 4)
DXTextureImageFile_Type = 'dxt:'
DXTextureImageFile_Version = $100
DXTextureImageCompress_None = 0
DXTextureImageCompress_ZLIB = 1
DXTextureImageFileCategoryType_Image = $100
DXTextureImageFileBlockID_EndFile = 0
DXTextureImageFileBlockID_EndGroup = 1
DXTextureImageFileBlockID_StartGroup = 2
DXTextureImageFileBlockID_Image_Format = DXTextureImageFileCategoryType_Image + 1
DXTextureImageFileBlockID_Image_PixelData = DXTextureImageFileCategoryType_Image + 2
DXTextureImageFileBlockID_Image_GroupInfo = DXTextureImageFileCategoryType_Image + 3
DXTextureImageFileBlockID_Image_Name = DXTextureImageFileCategoryType_Image + 4
DXTextureImageFileBlockID_Image_TransparentColor = DXTextureImageFileCategoryType_Image + 5
SurfaceDivWidth = maxVideoBlockSize
SurfaceDivHeight = maxVideoBlockSize

DirectDrawDrivers: TDirectXDrivers 
D2D: TD2D = nil  
RenderError: boolean = false
_DXTextureImageLoadFuncList: TList

DIB 单元
TColorLinePixelGeometry
TColorLineStyle
TCustomDXDIB
TCustomDXPaintBox
TDIB
TDIBitmap
TDIBSharedImage
TDistortType
TDXDIB
TDXPaintBox
TFilterMode
TFilterTypeResample
TGlobalMemoryStream
TPaletteItem
TPaletteManager

TBGR
TDIBPixelFormat
TLightSource
TLocalDIBPixelFormat

MakeDIBPixelFormat(RBitCount, GBitCount, BBitCount: Integer): TDIBPixelFormat
MakeDIBPixelFormatMask(RBitMask, GBitMask, BBitMask: Integer): TDIBPixelFormat
pfRGB(const PixelFormat: TDIBPixelFormat; R, G, B: Byte): DWORD
pfGetRGB(const PixelFormat: TDIBPixelFormat; Color: DWORD; var R, G, B: Byte)
pfGetRValue(const PixelFormat: TDIBPixelFormat; Color: DWORD): Byte
pfGetGValue(const PixelFormat: TDIBPixelFormat; Color: DWORD): Byte
pfGetBValue(const PixelFormat: TDIBPixelFormat; Color: DWORD): Byte
GreyscaleColorTable:TRGBQuads
RGBQuad(R, G, B: Byte): TRGBQuad
PaletteEntryToRGBQuad(const Entry: TPaletteEntry): TRGBQuad
PaletteEntriesToRGBQuads(const Entries: TPaletteEntries): TRGBQuads
RGBQuadToPaletteEntry(const RGBQuad: TRGBQuad): TPaletteEntry
RGBQuadsToPaletteEntries(const RGBQuads: TRGBQuads): TPaletteEntries
PosValue(Value: Integer): Integer
DSin(const C: TOC): Single
DCos(const C: TOC): Single
GetScale(SourceWidth, SourceHeight, TargetWidth, TargetHeight: Integer): Single
MakeDib(out DIB: TDIB; const iWidth, iHeight, iBitCount: Integer; iFillColor: TColor{$IFDEF VER4UP} = clBlack{$ENDIF})
MakeDIB2(out DIB: TDIB; iBitmap: TBitmap)
PaletteManager:TPaletteManager
EmptyDIBImage:TDIBSharedImage
IntToByte(i: Integer): Byte
TrimInt(i, Min, Max: Integer): Integer

PArrayBGR
PArrayByte
PArrayDWord
PArrayWord
PBGR
PBytes
PLines
PLocalDIBPixelFormat
PPBytes
PRGBA
PRGBQuads
TArrayBGR
TArrayByte
TArrayDWord
TArrayWord
TBytes
TColorLinePixelGeometry
TColorLineStyle
TDistortType
TFilter
TFilterMode
TFilterTypeResample
TLightArray
TLines
TMatrixSetting
TOC
TPaletteEntries
TPBytes
TRGBA
TRGBQuads

DefaultFilterRadius: array[TFilterTypeResample] of Single = (0.5, 1, 1, 1.5, 2, 3, 2)
EdgeFilter: TFilter = ((-1, -1, -1), (-1, 8, -1), (-1, -1, -1))
StrongOutlineFilter: TFilter = ((-100, 0, 0), (0, 0, 0), (0, 0, 100))
Enhance3DFilter: TFilter = ((-100, 5, 5), (5, 5, 5), (5, 5, 100))
LinearFilter: TFilter = ((-40, -40, -40), (-40, 255, -40), (-40, -40, -40))
GranularFilter: TFilter = ((-20, 5, 20), (5, -10, 5), (100, 5, -100))
SharpFilter: TFilter = ((-2, -2, -2), (-2, 20, -2), (-2, -2, -2))
msEmboss: TMatrixSetting = (-1, -1, 0, -1, 6, 1, 0, 1, 1, 6)
msHardEmboss: TMatrixSetting = (-4, -2, -1, -2, 10, 2, -1, 2, 4, 8)
msBlur: TMatrixSetting = (1, 2, 1, 2, 4, 2, 1, 2, 1, 16)
msSharpen: TMatrixSetting = (-1, -1, -1, -1, 15, -1, -1, -1, -1, 7)
msEdgeDetect: TMatrixSetting = (-1, -1, -1, -1, 8, -1, -1, -1, -1, 1)
Mask1: array[0..7] of DWORD = ($80, $40, $20, $10, $08, $04, $02, $01)
Mask  1 n: array  [ 0.. 7 ]  of DWORD = ...
Mask4: array[0..1] of DWORD = ($F0, $0F)
Mask4n: array[0..1] of DWORD = ($FFFFFF0F, $FFFFFFF0)
Shift1: array[0..7] of DWORD = (7, 6, 5, 4, 3, 2, 1, 0)
Shift4: array[0..1] of DWORD = (4, 0)
BitmapFileType = Ord('B') + Ord('M') * $100

FPaletteManager: TPaletteManager
FEmptyDIBImage: TDIBSharedImage

DXSounds 单元
TAudioFileStream
TAudioStream
TAudioStreamNotify
TCustomDXSound
TCustomDXWaveList
TDirectSound
TDirectSoundBuffer
TDXMusic
TDXSound
TDXSoundDirectSound
TDXSoundNotifyEvent
TDXSoundNotifyType
TDXSoundOption
TDXWaveList
TMidiCollectionComponent
TMusicDataProp
TMusicListCollection
TMusicListCollectionItem
TSoundCaptureFormat
TSoundCaptureFormats
TSoundCaptureStream
TSoundCaptureStreamNotify
TSoundEngine
TWaveCollection
TWaveCollectionComponent
TWaveCollectionItem

TMidiDataHeader

DXDirectSoundCreate(lpGUID: PGUID; out lpDS: IDirectSound; pUnkOuter: IUnknown): HRESULT
DXDirectSoundEnumerate(lpCallback: TDSEnumCallbackA;  lpContext: Pointer): HRESULT
DXDirectSoundCaptureCreate(lpGUID: PGUID; out lplpDSC: IDirectSoundCapture;  pUnkOuter: IUnknown): HRESULT
DXDirectSoundCaptureEnumerate(lpCallback: TDSEnumCallbackA;  lpContext: Pointer): HRESULT
EnumDirectSoundDrivers_DSENUMCALLBACK(...): BOOL
EnumDirectSoundDrivers: TDirectXDrivers
EnumDirectSoundCaptureDrivers: TDirectXDrivers

PDXSoundNotifyEvent
TDXSoundNotifyEvent
TDXSoundNotifyType
TDXSoundOption
TDXSoundOptions

dm_OK = 0
DSBCAPS_CTRLDEFAULT = DSBCAPS_CTRLFREQUENCY or DSBCAPS_CTRLPAN or DSBCAPS_CTRLVOLUME

DirectSoundDrivers: TDirectXDrivers
DirectSoundCaptureDrivers: TDirectXDrivers

DXWave 单元
TCustomDXWave
TCustomWaveStream
TCustomWaveStream2
TDXWave
TWave
TWaveFileStream
TWaveObjectStream
TWaveStream

TWaveChunkHeader
TWaveFileHeader

MakePCMWaveFormatEx(var Format: TWaveFormatEx; SamplesPerSec, BitsPerSample, Channels: Integer)

WavePoolSize = 8096
ID_RIFF = Ord('R') + Ord('I')*$100 + Ord('F')*$10000 + Ord('F')*$1000000
ID_WAVE = Ord('W') + Ord('A')*$100 + Ord('V')*$10000 + Ord('E')*$1000000
ID_FMT = Ord('f') + Ord('m')*$100 + Ord('t')*$10000 + Ord(' ')*$1000000
ID_FACT = Ord('f') + Ord('a')*$100 + Ord('c')*$10000 + Ord('t')*$1000000
ID_DATA = Ord('d') + Ord('a')*$100 + Ord('t')*$10000 + Ord('a')*$1000000

DXPlay 单元
TCustomDXPlay
TDXPlay
TDXPlayEvent
TDXPlayMessageEvent
TDXPlayModemSetting
TDXPlayPlayer
TDXPlayPlayers
TDXPlayRecvThread
TDXPlaySendCompleteEvent
TDXPlaySendCompleteResult
TDXPlayTCPIPSetting

DXPlayMessageType(P: Pointer): DWORD
DXPlayStringToGUID(const S: string): TGUID
DXDirectPlayCreate(...): HRESULT
GUIDToString(const ClassID: TGUID): string
DXDirectPlayEnumerate(lpEnumDPCallback: TDPEnumDPCallbackW; lpContext: Pointer): HRESULT
DXDirectPlayLobbyCreate(...): HRESULT

TDXPlayEvent
TDXPlayMessageEvent
TDXPlaySendCompleteEvent
TDXPlaySendCompleteResult

DXSprite 单元
TBackgroundSprite
TCollisionEvent
TCustomDXSpriteEngine
TDrawEvent
TDXSpriteEngine
TGetImage
TImageSprite
TImageSpriteEx
TMoveEvent
TSCFinalize
TSCInitialize
TSprite
TSpriteClass
TSpriteCollection
TSpriteCollectionItem
TSpriteEngine
TSpriteType

TMapDataHeader
TMapType

Mod2(i,i2: Integer): Integer
Mod2f(i: Double; i2: Integer): Double

SSpriteNotFound = 'Sprite not found'
SSpriteDuplicateName = 'Item duplicate name "%s" error'

DXInput 单元
TCustomDXInput
TCustomInput
TDXInput
TDXInputState
TForceFeedbackEffect
TForceFeedbackEffectComponent
TForceFeedbackEffectItem
TForceFeedbackEffectObject
TForceFeedbackEffects
TForceFeedbackEffectType
TJoystick
TKeyboard
TMouse

DefKeyAssign: TKeyAssignList
DefKeyAssign2_1: TKeyAssignList
DefKeyAssign2_2: TKeyAssignList
AssignKey(var KeyAssignList: TKeyAssignList; State: TDXInputState; const Keys: array of Integer)
ConvertTime(i: Integer): DWORD
SetDWORDProperty(pdev: IDirectInputDevice; guidProperty: PGUID; dwObject, dwHow, dwValue: DWORD): HResult
SetRangeProperty(pdev: IDirectInputDevice; guidProperty: PGUID; dwObject, dwHow, Value: DWORD): HResult
TJoystick_EnumJoysticksCallback(const lpddi: TDIDeviceInstanceA; pvRef: Pointer): HRESULT
InitDirectInput(out DI: IDirectInput)
FinDirectInput(var DI: IDirectInput)

PKeyAssign
TDXInputState
TDXInputStates
TForceFeedbackEffectType
TKeyAssign
TKeyAssignList

FDirectInput: IDirectInput
FDirectInputCount: Integer

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
DirectX 简介  DirectX 对于大多数游戏爱好者来说都不陌生(当然,那些只在DOS下艰苦作战的朋友例外),在安装一个游戏前,系统总是会提示你是否需要同时升级 DirectX。简单地说,DirectX 就是一系列的 DLL (动态连接库),通过这些 DLL,开发者可以在无视于设备差异的情况下访问底层的硬件。DirectX 封装了一些 COM(Component Object Model)对象,这些 COM 对象为访问系统硬件提供了一个主要的接口。DirectX 目前主要由以下七个主要部分组成:DirectDraw – 为程序直接访问显存提供接口,同时和其它的Windows应用程序保持兼容。 Direct3D – 为访问3D加速设备提供接口。 DirectInput – 为各种输入设备提供接口,比如鼠标,键盘,力反馈游戏手柄和操纵杆等。 DirectPlay – 为游戏提供网络功能接口,比如支持通过 TCP/I、IPX 等协议进行游戏中的数据传输。 DirectSound – 为访问声卡提供接口,支持WAV、MIDI 等文件的直接播放。 DirectSound3D –通过此接口,可以模拟出某一个声音在三维空间中任何一个位置的播放所产生的效果,从而达到逼真的环绕立体声。 DirectMusic – 此接口主要是生成一系列的原始声音采样反馈给相应的用户事件。 组件列表:TDXDraw DirectDraw 和 Direct3D 组件 TDXDIB 容纳DIB(设备无关位图,Device Independent Bitmap)的组件 TDXImageList 图片列表组件 TDX3D Direct3D 组件 (和TDXDraw一起使用) TDXSound DirectSound 组件 TDXWave 容纳 Wave(波形音频文件)的组件 TDXWaveList Wave文件列表组件 TDXInput 输入组件,包括键盘和手柄输入 TDXPlay 通讯组件,用于网络游戏开发 TDXSpriteEngine 精灵引擎,用于管理游戏中产生的精灵(Sprite)详见游戏开发过程 TDXTimer 高速定时器,比 TTimer 要更快,更准确 TDXPaintBox TpaintBox 的 DIB 版本 TDXForm 优化过的 TForm,专门用于游戏开发 目前的 DelphiX 包支持 Borland Delphi 3/4/5/6 和 DirectX 7.0 以上版本,D7下测试也可。安装了 DelphiX 之后,我们将不需要再安装微软的 DirectX SDK。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值