"""d3d8.h"""
-from windows import *
+from winapi import *
from d3d8types import *
from d3d8caps import *
PDIRECT3DVOLUME8 = WrapPointer(IDirect3DVolume8)
IDirect3D8.methods += [
- Method(HRESULT, "RegisterSoftwareDevice", [(Pointer(Void), "pInitializeFunction")]),
+ Method(HRESULT, "RegisterSoftwareDevice", [(OpaquePointer(Void), "pInitializeFunction")]),
Method(UINT, "GetAdapterCount", []),
Method(HRESULT, "GetAdapterIdentifier", [(UINT, "Adapter"), (DWORD, "Flags"), Out(Pointer(D3DADAPTER_IDENTIFIER8), "pIdentifier")]),
Method(UINT, "GetAdapterModeCount", [(UINT, "Adapter")]),
Method(HRESULT, "GetTextureStageState", [(DWORD, "Stage"), (D3DTEXTURESTAGESTATETYPE, "Type"), Out(Pointer(DWORD), "pValue")]),
Method(HRESULT, "SetTextureStageState", [(DWORD, "Stage"), (D3DTEXTURESTAGESTATETYPE, "Type"), (DWORD, "Value")]),
Method(HRESULT, "ValidateDevice", [Out(Pointer(DWORD), "pNumPasses")]),
- Method(HRESULT, "GetInfo", [(DWORD, "DevInfoID"), Out(Pointer(Void), "pDevInfoStruct"), (DWORD, "DevInfoStructSize")]),
+ Method(HRESULT, "GetInfo", [(DWORD, "DevInfoID"), Out(OpaquePointer(Void), "pDevInfoStruct"), (DWORD, "DevInfoStructSize")]),
Method(HRESULT, "SetPaletteEntries", [(UINT, "PaletteNumber"), (ConstPointer(PALETTEENTRY), "pEntries")]),
Method(HRESULT, "GetPaletteEntries", [(UINT, "PaletteNumber"), Out(Pointer(PALETTEENTRY), "pEntries")]),
Method(HRESULT, "SetCurrentTexturePalette", [(UINT, "PaletteNumber")]),
Method(HRESULT, "GetCurrentTexturePalette", [Out(Pointer(UINT), "PaletteNumber")]),
Method(HRESULT, "DrawPrimitive", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "StartVertex"), (UINT, "PrimitiveCount")]),
Method(HRESULT, "DrawIndexedPrimitive", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "minIndex"), (UINT, "NumVertices"), (UINT, "startIndex"), (UINT, "primCount")]),
- Method(HRESULT, "DrawPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "PrimitiveCount"), (ConstPointer(Void), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]),
- Method(HRESULT, "DrawIndexedPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "MinVertexIndex"), (UINT, "NumVertexIndices"), (UINT, "PrimitiveCount"), (ConstPointer(Void), "pIndexData"), (D3DFORMAT, "IndexDataFormat"), (ConstPointer(Void), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]),
+ Method(HRESULT, "DrawPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "PrimitiveCount"), (OpaquePointer(Const(Void)), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]),
+ Method(HRESULT, "DrawIndexedPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "MinVertexIndex"), (UINT, "NumVertexIndices"), (UINT, "PrimitiveCount"), (OpaquePointer(Const(Void)), "pIndexData"), (D3DFORMAT, "IndexDataFormat"), (OpaquePointer(Const(Void)), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]),
Method(HRESULT, "ProcessVertices", [(UINT, "SrcStartIndex"), (UINT, "DestIndex"), (UINT, "VertexCount"), (PDIRECT3DVERTEXBUFFER8, "pDestBuffer"), (DWORD, "Flags")]),
Method(HRESULT, "CreateVertexShader", [(ConstPointer(DWORD), "pDeclaration"), (ConstPointer(DWORD), "pFunction"), Out(Pointer(DWORD), "pHandle"), (DWORD, "Usage")]),
Method(HRESULT, "SetVertexShader", [(DWORD, "Handle")]),
Method(HRESULT, "GetVertexShader", [Out(Pointer(DWORD), "pHandle")]),
Method(HRESULT, "DeleteVertexShader", [(DWORD, "Handle")]),
- Method(HRESULT, "SetVertexShaderConstant", [(DWORD, "Register"), (ConstPointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
- Method(HRESULT, "GetVertexShaderConstant", [(DWORD, "Register"), Out(Pointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
- Method(HRESULT, "GetVertexShaderDeclaration", [(DWORD, "Handle"), Out(Pointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
- Method(HRESULT, "GetVertexShaderFunction", [(DWORD, "Handle"), Out(Pointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
+ Method(HRESULT, "SetVertexShaderConstant", [(DWORD, "Register"), (OpaquePointer(Const(Void)), "pConstantData"), (DWORD, "ConstantCount")]),
+ Method(HRESULT, "GetVertexShaderConstant", [(DWORD, "Register"), Out(OpaquePointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
+ Method(HRESULT, "GetVertexShaderDeclaration", [(DWORD, "Handle"), Out(OpaquePointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
+ Method(HRESULT, "GetVertexShaderFunction", [(DWORD, "Handle"), Out(OpaquePointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
Method(HRESULT, "SetStreamSource", [(UINT, "StreamNumber"), (PDIRECT3DVERTEXBUFFER8, "pStreamData"), (UINT, "Stride")]),
Method(HRESULT, "GetStreamSource", [(UINT, "StreamNumber"), Out(Pointer(PDIRECT3DVERTEXBUFFER8), "ppStreamData"), Out(Pointer(UINT), "pStride")]),
Method(HRESULT, "SetIndices", [(PDIRECT3DINDEXBUFFER8, "pIndexData"), (UINT, "BaseVertexIndex")]),
Method(HRESULT, "SetPixelShader", [(DWORD, "Handle")]),
Method(HRESULT, "GetPixelShader", [Out(Pointer(DWORD), "pHandle")]),
Method(HRESULT, "DeletePixelShader", [(DWORD, "Handle")]),
- Method(HRESULT, "SetPixelShaderConstant", [(DWORD, "Register"), (ConstPointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
- Method(HRESULT, "GetPixelShaderConstant", [(DWORD, "Register"), Out(Pointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
- Method(HRESULT, "GetPixelShaderFunction", [(DWORD, "Handle"), Out(Pointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
+ Method(HRESULT, "SetPixelShaderConstant", [(DWORD, "Register"), (OpaquePointer(Const(Void)), "pConstantData"), (DWORD, "ConstantCount")]),
+ Method(HRESULT, "GetPixelShaderConstant", [(DWORD, "Register"), Out(OpaquePointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
+ Method(HRESULT, "GetPixelShaderFunction", [(DWORD, "Handle"), Out(OpaquePointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
Method(HRESULT, "DrawRectPatch", [(UINT, "Handle"), (ConstPointer(Float), "pNumSegs"), (ConstPointer(D3DRECTPATCH_INFO), "pRectPatchInfo")]),
Method(HRESULT, "DrawTriPatch", [(UINT, "Handle"), (ConstPointer(Float), "pNumSegs"), (ConstPointer(D3DTRIPATCH_INFO), "pTriPatchInfo")]),
Method(HRESULT, "DeletePatch", [(UINT, "Handle")]),
IDirect3DResource8.methods += [
Method(HRESULT, "GetDevice", [Out(Pointer(PDIRECT3DDEVICE8), "ppDevice")]),
- Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (ConstPointer(Void), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
- Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), Out(Pointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
+ Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (OpaquePointer(Const(Void)), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
+ Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), Out(OpaquePointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
Method(HRESULT, "FreePrivateData", [(REFGUID, "refguid")]),
Method(DWORD, "SetPriority", [(DWORD, "PriorityNew")]),
Method(DWORD, "GetPriority", []),
IDirect3DSurface8.methods += [
Method(HRESULT, "GetDevice", [Out(Pointer(PDIRECT3DDEVICE8), "ppDevice")]),
- Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (ConstPointer(Void), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
- Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), Out(Pointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
+ Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (OpaquePointer(Const(Void)), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
+ Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), Out(OpaquePointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
Method(HRESULT, "FreePrivateData", [(REFGUID, "refguid")]),
- Method(HRESULT, "GetContainer", [(REFIID, "riid"), Out(Pointer(Pointer(Void)), "ppContainer")]),
+ Method(HRESULT, "GetContainer", [(REFIID, "riid"), Out(Pointer(OpaquePointer(Void)), "ppContainer")]),
Method(HRESULT, "GetDesc", [Out(Pointer(D3DSURFACE_DESC), "pDesc")]),
Method(HRESULT, "LockRect", [Out(Pointer(D3DLOCKED_RECT), "pLockedRect"), (ConstPointer(RECT), "pRect"), (DWORD, "Flags")]),
Method(HRESULT, "UnlockRect", []),
IDirect3DVolume8.methods += [
Method(HRESULT, "GetDevice", [Out(Pointer(PDIRECT3DDEVICE8), "ppDevice")]),
- Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (ConstPointer(Void), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
- Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), Out(Pointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
+ Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (OpaquePointer(Const(Void)), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
+ Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), Out(OpaquePointer(Void), "pData"), Out(Pointer(DWORD), "pSizeOfData")]),
Method(HRESULT, "FreePrivateData", [(REFGUID, "refguid")]),
- Method(HRESULT, "GetContainer", [(REFIID, "riid"), Out(Pointer(Pointer(Void)), "ppContainer")]),
+ Method(HRESULT, "GetContainer", [(REFIID, "riid"), Out(Pointer(OpaquePointer(Void)), "ppContainer")]),
Method(HRESULT, "GetDesc", [Out(Pointer(D3DVOLUME_DESC), "pDesc")]),
Method(HRESULT, "LockBox", [Out(Pointer(D3DLOCKED_BOX), "pLockedVolume"), (ConstPointer(D3DBOX), "pBox"), (DWORD, "Flags")]),
Method(HRESULT, "UnlockBox", []),
d3d8 = Dll("d3d8")
d3d8.functions += [
- DllFunction(PDIRECT3D8, "Direct3DCreate8", [(UINT, "SDKVersion")]),
+ StdFunction(PDIRECT3D8, "Direct3DCreate8", [(UINT, "SDKVersion")]),
]
if __name__ == '__main__':
print '#include <tchar.h>'
print '#include <d3d8.h>'
print
- print '#include "log.hpp"'
+ print '#include "trace_write.hpp"'
print
wrap()