Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

135 lines
5.3 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1995-1996 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: d3drm.h
  6. * Content: Direct3DRM include file
  7. *
  8. ***************************************************************************/
  9. #ifndef __D3DRM_H__
  10. #define __D3DRM_H__
  11. #include "ddraw.h"
  12. #include "d3drmobj.h"
  13. #ifdef __cplusplus
  14. extern "C" {
  15. struct IDirect3DRM;
  16. #endif
  17. typedef void (CDECL *D3DRMDEVICEPALETTECALLBACK)
  18. (LPDIRECT3DRMDEVICE lpDirect3DRMDev, LPVOID lpArg, DWORD dwIndex, LONG red, LONG green, LONG blue);
  19. DEFINE_GUID(IID_IDirect3DRM, 0x2bc49361, 0x8327, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  20. WIN_TYPES(IDirect3DRM, DIRECT3DRM);
  21. /* Create a Direct3DRM API */
  22. STDAPI Direct3DRMCreate(LPDIRECT3DRM FAR *lplpDirect3DRM);
  23. #undef INTERFACE
  24. #define INTERFACE IDirect3DRM
  25. DECLARE_INTERFACE_(IDirect3DRM, IUnknown)
  26. {
  27. IUNKNOWN_METHODS(PURE);
  28. STDMETHOD(CreateObject)
  29. (THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppv) PURE;
  30. STDMETHOD(CreateFrame) (THIS_ LPDIRECT3DRMFRAME, LPDIRECT3DRMFRAME *) PURE;
  31. STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *) PURE;
  32. STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER *) PURE;
  33. STDMETHOD(CreateFace) (THIS_ LPDIRECT3DRMFACE *) PURE;
  34. STDMETHOD(CreateAnimation) (THIS_ LPDIRECT3DRMANIMATION *) PURE;
  35. STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE;
  36. STDMETHOD(CreateTexture) (THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE *) PURE;
  37. STDMETHOD(CreateLight) (THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
  38. STDMETHOD(CreateLightRGB)
  39. (THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
  40. STDMETHOD(CreateMaterial) (THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL *) PURE;
  41. STDMETHOD(CreateDevice) (THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE *) PURE;
  42. /* Create a Windows Device using DirectDraw surfaces */
  43. STDMETHOD(CreateDeviceFromSurface)
  44. ( THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD,
  45. LPDIRECTDRAWSURFACE lpDDSBack, LPDIRECT3DRMDEVICE *
  46. ) PURE;
  47. /* Create a Windows Device using D3D objects */
  48. STDMETHOD(CreateDeviceFromD3D)
  49. ( THIS_ LPDIRECT3D lpD3D, LPDIRECT3DDEVICE lpD3DDev,
  50. LPDIRECT3DRMDEVICE *
  51. ) PURE;
  52. STDMETHOD(CreateDeviceFromClipper)
  53. ( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID,
  54. int width, int height, LPDIRECT3DRMDEVICE *) PURE;
  55. STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DRMTEXTURE *) PURE;
  56. STDMETHOD(CreateShadow)
  57. ( THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMLIGHT,
  58. D3DVALUE px, D3DVALUE py, D3DVALUE pz,
  59. D3DVALUE nx, D3DVALUE ny, D3DVALUE nz,
  60. LPDIRECT3DRMVISUAL *
  61. ) PURE;
  62. STDMETHOD(CreateViewport)
  63. ( THIS_ LPDIRECT3DRMDEVICE, LPDIRECT3DRMFRAME, DWORD, DWORD,
  64. DWORD, DWORD, LPDIRECT3DRMVIEWPORT *
  65. ) PURE;
  66. STDMETHOD(CreateWrap)
  67. ( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME,
  68. D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
  69. D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
  70. D3DVALUE ux, D3DVALUE uy, D3DVALUE uz,
  71. D3DVALUE ou, D3DVALUE ov,
  72. D3DVALUE su, D3DVALUE sv,
  73. LPDIRECT3DRMWRAP *
  74. ) PURE;
  75. STDMETHOD(CreateUserVisual) (THIS_ D3DRMUSERVISUALCALLBACK, LPVOID lPArg, LPDIRECT3DRMUSERVISUAL *) PURE;
  76. STDMETHOD(LoadTexture) (THIS_ const char *, LPDIRECT3DRMTEXTURE *) PURE;
  77. STDMETHOD(LoadTextureFromResource) (THIS_ HRSRC rs, LPDIRECT3DRMTEXTURE *) PURE;
  78. STDMETHOD(SetSearchPath) (THIS_ LPCSTR) PURE;
  79. STDMETHOD(AddSearchPath) (THIS_ LPCSTR) PURE;
  80. STDMETHOD(GetSearchPath) (THIS_ DWORD *size_return, LPSTR path_return);
  81. //STDMETHOD(GetSearchPath) (THIS_ int *return_count, char ***return_path) PURE;
  82. STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE;
  83. STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE;
  84. STDMETHOD(GetDevices) (THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE;
  85. STDMETHOD(GetNamedObject) (THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE;
  86. STDMETHOD(EnumerateObjects) (THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE;
  87. STDMETHOD(Load)
  88. ( THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS,
  89. D3DRMLOADCALLBACK, LPVOID, D3DRMLOADTEXTURECALLBACK, LPVOID,
  90. LPDIRECT3DRMFRAME
  91. ) PURE;
  92. STDMETHOD(Tick) (THIS_ D3DVALUE) PURE;
  93. };
  94. #define D3DRM_OK DD_OK
  95. #define D3DRMERR_BADOBJECT MAKE_DDHRESULT(781)
  96. #define D3DRMERR_BADTYPE MAKE_DDHRESULT(782)
  97. #define D3DRMERR_BADALLOC MAKE_DDHRESULT(783)
  98. #define D3DRMERR_FACEUSED MAKE_DDHRESULT(784)
  99. #define D3DRMERR_NOTFOUND MAKE_DDHRESULT(785)
  100. #define D3DRMERR_NOTDONEYET MAKE_DDHRESULT(786)
  101. #define D3DRMERR_FILENOTFOUND MAKE_DDHRESULT(787)
  102. #define D3DRMERR_BADFILE MAKE_DDHRESULT(788)
  103. #define D3DRMERR_BADDEVICE MAKE_DDHRESULT(789)
  104. #define D3DRMERR_BADVALUE MAKE_DDHRESULT(790)
  105. #define D3DRMERR_BADMAJORVERSION MAKE_DDHRESULT(791)
  106. #define D3DRMERR_BADMINORVERSION MAKE_DDHRESULT(792)
  107. #define D3DRMERR_UNABLETOEXECUTE MAKE_DDHRESULT(793)
  108. #ifdef __cplusplus
  109. };
  110. #endif
  111. #endif /* _D3DRMAPI_H_ */