X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=d3d8.py;h=0713696ecd9a65dd8eab9a007d3302f1fca067e9;hb=0f0a598677d6d1c97be830c5fa20d6187480aa52;hp=a4f1f348bfb7366b0ca62aecebdd271d822c3fc4;hpb=90dd97e5eda2b8f74ac26c0cee9548b13bcf7a69;p=apitrace diff --git a/d3d8.py b/d3d8.py index a4f1f34..0713696 100644 --- a/d3d8.py +++ b/d3d8.py @@ -25,7 +25,7 @@ """d3d8.h""" -from windows import * +from winapi import * from d3d8types import * from d3d8caps import * @@ -105,6 +105,9 @@ IDirect3DDevice8.methods += [ Method(HRESULT, "GetDisplayMode", [Out(Pointer(D3DDISPLAYMODE), "pMode")]), Method(HRESULT, "GetCreationParameters", [Out(Pointer(D3DDEVICE_CREATION_PARAMETERS), "pParameters")]), Method(HRESULT, "SetCursorProperties", [(UINT, "XHotSpot"), (UINT, "YHotSpot"), (PDIRECT3DSURFACE8, "pCursorBitmap")]), + # XXX: There are different signatures of + # IDirect3DDevice8::SetCursorPosition depending on the DXSDK version + Method(Void, "SetCursorPosition", [(UINT, "XScreenSpace"), (UINT, "YScreenSpace"), (DWORD, "Flags")]), Method(Void, "SetCursorPosition", [(Int, "X"), (Int, "Y"), (DWORD, "Flags")]), Method(BOOL, "ShowCursor", [(BOOL, "bShow")]), Method(HRESULT, "CreateAdditionalSwapChain", [Out(Pointer(D3DPRESENT_PARAMETERS), "pPresentationParameters"), Out(Pointer(PDIRECT3DSWAPCHAIN8), "pSwapChain")]), @@ -130,7 +133,7 @@ IDirect3DDevice8.methods += [ Method(HRESULT, "GetDepthStencilSurface", [Out(Pointer(PDIRECT3DSURFACE8), "ppZStencilSurface")]), Method(HRESULT, "BeginScene", []), Method(HRESULT, "EndScene", []), - Method(HRESULT, "Clear", [(DWORD, "Count"), (ConstPointer(D3DRECT), "pRects"), (DWORD, "Flags"), (D3DCOLOR, "Color"), (Float, "Z"), (DWORD, "Stencil")]), + Method(HRESULT, "Clear", [(DWORD, "Count"), (ConstPointer(D3DRECT), "pRects"), (D3DCLEAR, "Flags"), (D3DCOLOR, "Color"), (Float, "Z"), (DWORD, "Stencil")]), Method(HRESULT, "SetTransform", [(D3DTRANSFORMSTATETYPE, "State"), (ConstPointer(D3DMATRIX), "pMatrix")]), Method(HRESULT, "GetTransform", [(D3DTRANSFORMSTATETYPE, "State"), Out(Pointer(D3DMATRIX), "pMatrix")]), Method(HRESULT, "MultiplyTransform", [(D3DTRANSFORMSTATETYPE, "State"), (ConstPointer(D3DMATRIX), "pMatrix")]), @@ -273,17 +276,7 @@ IDirect3DVolume8.methods += [ Method(HRESULT, "UnlockBox", []), ] -d3d8 = Dll("d3d8") -d3d8.functions += [ +d3d8 = API("d3d8") +d3d8.add_functions([ StdFunction(PDIRECT3D8, "Direct3DCreate8", [(UINT, "SDKVersion")]), -] - -if __name__ == '__main__': - print '#include ' - print '#include ' - print '#include ' - print - print '#include "log.hpp"' - print - wrap() - +])