home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 May / VPR9705A.ISO / VPR_DATA / PROGRAM / CBTRIAL / SETUP / DATA.Z / D3DRM.H < prev    next >
C/C++ Source or Header  |  1997-02-14  |  6KB  |  139 lines

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