mirror of
https://github.com/isledecomp/isle.git
synced 2026-02-02 21:21:16 +00:00
Merge branch 'master' into reccmp-template-compare
This commit is contained in:
commit
d3e09b9cdf
32
.github/workflows/build.yml
vendored
32
.github/workflows/build.yml
vendored
@ -14,39 +14,11 @@ jobs:
|
||||
repository: 'itsmattkc/msvc420'
|
||||
path: msvc420
|
||||
|
||||
- name: Restore cached DX5 SDK
|
||||
id: cache-dx5
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: dx5sdk
|
||||
key: dx5sdk
|
||||
|
||||
- name: Download DX5 SDK
|
||||
if: ${{ !steps.cache-dx5.outputs.cache-hit }}
|
||||
run: |
|
||||
cd dx5sdk
|
||||
curl -fLOSs https://archive.org/download/idx5sdk/idx5sdk.exe
|
||||
7z x .\idx5sdk.exe
|
||||
7z x .\DX5SDK.EXE
|
||||
|
||||
- name: Cache DX5 SDK
|
||||
if: ${{ !steps.cache-dx5.outputs.cache-hit }}
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: dx5sdk
|
||||
key: dx5sdk
|
||||
|
||||
- name: Setup DX5 SDK
|
||||
run: |
|
||||
cd dx5sdk
|
||||
cd cdrom
|
||||
.\SETUP.EXE /s
|
||||
|
||||
- name: Setup cmake
|
||||
uses: jwlawson/actions-setup-cmake@v1.13
|
||||
with:
|
||||
# Use minimum supported version
|
||||
cmake-version: '3.0.x'
|
||||
cmake-version: '3.13.x'
|
||||
|
||||
- name: Build
|
||||
shell: cmd
|
||||
@ -131,7 +103,7 @@ jobs:
|
||||
upload:
|
||||
needs: [build, compare]
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'isledecomp/isle' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,6 +1,8 @@
|
||||
Debug/
|
||||
Release/
|
||||
*.ncb
|
||||
/.vs
|
||||
ISLE.EXE
|
||||
LEGO1.DLL
|
||||
build/
|
||||
*.swp
|
||||
|
||||
896
3rdparty/dx5/inc/d3d.h
vendored
Normal file
896
3rdparty/dx5/inc/d3d.h
vendored
Normal file
@ -0,0 +1,896 @@
|
||||
/*==========================================================================;
|
||||
*
|
||||
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: d3d.h
|
||||
* Content: Direct3D include file
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _D3D_H_
|
||||
#define _D3D_H_
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define COM_NO_WINDOWS_H
|
||||
#include <objbase.h>
|
||||
#else
|
||||
#include "d3dcom.h"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define D3DAPI WINAPI
|
||||
#else
|
||||
#define D3DAPI
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Interface IID's
|
||||
*/
|
||||
#if defined( _WIN32 ) && !defined( _NO_COM)
|
||||
DEFINE_GUID( IID_IDirect3D, 0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
|
||||
DEFINE_GUID( IID_IDirect3D2, 0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a);
|
||||
|
||||
DEFINE_GUID( IID_IDirect3DRampDevice, 0xF2086B20,0x259F,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
|
||||
DEFINE_GUID( IID_IDirect3DRGBDevice, 0xA4665C60,0x2673,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
|
||||
DEFINE_GUID( IID_IDirect3DHALDevice, 0x84E63dE0,0x46AA,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
|
||||
DEFINE_GUID( IID_IDirect3DMMXDevice, 0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29 );
|
||||
|
||||
DEFINE_GUID( IID_IDirect3DDevice, 0x64108800,0x957d,0X11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29 );
|
||||
DEFINE_GUID( IID_IDirect3DDevice2, 0x93281501, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
|
||||
DEFINE_GUID( IID_IDirect3DTexture, 0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 );
|
||||
DEFINE_GUID( IID_IDirect3DTexture2, 0x93281502, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
|
||||
DEFINE_GUID( IID_IDirect3DLight, 0x4417C142,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
|
||||
DEFINE_GUID( IID_IDirect3DMaterial, 0x4417C144,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
|
||||
DEFINE_GUID( IID_IDirect3DMaterial2, 0x93281503, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
|
||||
DEFINE_GUID( IID_IDirect3DExecuteBuffer,0x4417C145,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
|
||||
DEFINE_GUID( IID_IDirect3DViewport, 0x4417C146,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E );
|
||||
DEFINE_GUID( IID_IDirect3DViewport2, 0x93281500, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Data structures
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
|
||||
/* 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined */
|
||||
struct IDirect3D;
|
||||
struct IDirect3D2;
|
||||
struct IDirect3DDevice;
|
||||
struct IDirect3DDevice2;
|
||||
struct IDirect3DExecuteBuffer;
|
||||
struct IDirect3DLight;
|
||||
struct IDirect3DMaterial;
|
||||
struct IDirect3DMaterial2;
|
||||
struct IDirect3DTexture;
|
||||
struct IDirect3DTexture2;
|
||||
struct IDirect3DViewport;
|
||||
struct IDirect3DViewport2;
|
||||
typedef struct IDirect3D *LPDIRECT3D;
|
||||
typedef struct IDirect3D2 *LPDIRECT3D2;
|
||||
typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
|
||||
typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2;
|
||||
typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER;
|
||||
typedef struct IDirect3DLight *LPDIRECT3DLIGHT;
|
||||
typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
|
||||
typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
|
||||
typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE;
|
||||
typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2;
|
||||
typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
|
||||
typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
|
||||
|
||||
#else
|
||||
|
||||
typedef struct IDirect3D *LPDIRECT3D;
|
||||
typedef struct IDirect3D2 *LPDIRECT3D2;
|
||||
typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
|
||||
typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2;
|
||||
typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER;
|
||||
typedef struct IDirect3DLight *LPDIRECT3DLIGHT;
|
||||
typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
|
||||
typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
|
||||
typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE;
|
||||
typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2;
|
||||
typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
|
||||
typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
|
||||
|
||||
#endif
|
||||
|
||||
#include "d3dtypes.h"
|
||||
#include "d3dcaps.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* IDirect3D
|
||||
*/
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3D
|
||||
DECLARE_INTERFACE_(IDirect3D, IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release) (THIS) PURE;
|
||||
/*** IDirect3D methods ***/
|
||||
STDMETHOD(Initialize) (THIS_ REFIID) PURE;
|
||||
STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK, LPVOID) PURE;
|
||||
STDMETHOD(CreateLight) (THIS_ LPDIRECT3DLIGHT*, IUnknown*) PURE;
|
||||
STDMETHOD(CreateMaterial) (THIS_ LPDIRECT3DMATERIAL*, IUnknown*) PURE;
|
||||
STDMETHOD(CreateViewport) (THIS_ LPDIRECT3DVIEWPORT*, IUnknown*) PURE;
|
||||
STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirect3D_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
|
||||
#define IDirect3D_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirect3D_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirect3D_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
|
||||
#define IDirect3D_EnumDevices(p, a, b) (p)->lpVtbl->EnumDevices(p, a, b)
|
||||
#define IDirect3D_CreateLight(p, a, b) (p)->lpVtbl->CreateLight(p, a, b)
|
||||
#define IDirect3D_CreateMaterial(p, a, b) (p)->lpVtbl->CreateMaterial(p, a, b)
|
||||
#define IDirect3D_CreateViewport(p, a, b) (p)->lpVtbl->CreateViewport(p, a, b)
|
||||
#define IDirect3D_FindDevice(p, a, b) (p)->lpVtbl->FindDevice(p, a, b)
|
||||
#else
|
||||
#define IDirect3D_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
|
||||
#define IDirect3D_AddRef(p) (p)->AddRef()
|
||||
#define IDirect3D_Release(p) (p)->Release()
|
||||
#define IDirect3D_Initialize(p, a) (p)->Initialize(a)
|
||||
#define IDirect3D_EnumDevices(p, a, b) (p)->EnumDevices(a, b)
|
||||
#define IDirect3D_CreateLight(p, a, b) (p)->CreateLight(a, b)
|
||||
#define IDirect3D_CreateMaterial(p, a, b) (p)->CreateMaterial(a, b)
|
||||
#define IDirect3D_CreateViewport(p, a, b) (p)->CreateViewport(a, b)
|
||||
#define IDirect3D_FindDevice(p, a, b) (p)->FindDevice(a, b)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* IDirect3D2
|
||||
*/
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3D2
|
||||
DECLARE_INTERFACE_(IDirect3D2, IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release) (THIS) PURE;
|
||||
/*** IDirect3D methods ***/
|
||||
STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK, LPVOID) PURE;
|
||||
STDMETHOD(CreateLight) (THIS_ LPDIRECT3DLIGHT*, IUnknown*) PURE;
|
||||
STDMETHOD(CreateMaterial) (THIS_ LPDIRECT3DMATERIAL2*, IUnknown*) PURE;
|
||||
STDMETHOD(CreateViewport) (THIS_ LPDIRECT3DVIEWPORT2*, IUnknown*) PURE;
|
||||
STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH, LPD3DFINDDEVICERESULT) PURE;
|
||||
|
||||
STDMETHOD(CreateDevice)(THIS_ REFCLSID, LPDIRECTDRAWSURFACE, LPDIRECT3DDEVICE2 *) PURE;
|
||||
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirect3D2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
|
||||
#define IDirect3D2_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirect3D2_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirect3D2_EnumDevices(p, a, b) (p)->lpVtbl->EnumDevices(p, a, b)
|
||||
#define IDirect3D2_CreateLight(p, a, b) (p)->lpVtbl->CreateLight(p, a, b)
|
||||
#define IDirect3D2_CreateMaterial(p, a, b) (p)->lpVtbl->CreateMaterial(p, a, b)
|
||||
#define IDirect3D2_CreateViewport(p, a, b) (p)->lpVtbl->CreateViewport(p, a, b)
|
||||
#define IDirect3D2_FindDevice(p, a, b) (p)->lpVtbl->FindDevice(p, a, b)
|
||||
#define IDirect3D2_CreateDevice(p, a, b, c) (p)->lpVtbl->CreateDevice(p, a, b, c)
|
||||
#else
|
||||
#define IDirect3D2_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
|
||||
#define IDirect3D2_AddRef(p) (p)->AddRef()
|
||||
#define IDirect3D2_Release(p) (p)->Release()
|
||||
#define IDirect3D2_EnumDevices(p, a, b) (p)->EnumDevices(a, b)
|
||||
#define IDirect3D2_CreateLight(p, a, b) (p)->CreateLight(a, b)
|
||||
#define IDirect3D2_CreateMaterial(p, a, b) (p)->CreateMaterial(a, b)
|
||||
#define IDirect3D2_CreateViewport(p, a, b) (p)->CreateViewport(a, b)
|
||||
#define IDirect3D2_FindDevice(p, a, b) (p)->FindDevice(a, b)
|
||||
#define IDirect3D2_CreateDevice(p, a, b, c) (p)->CreateDevice(a, b, c)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* IDirect3DDevice
|
||||
*/
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3DDevice
|
||||
DECLARE_INTERFACE_(IDirect3DDevice, IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release) (THIS) PURE;
|
||||
/*** IDirect3DDevice methods ***/
|
||||
STDMETHOD(Initialize) (THIS_ LPDIRECT3D, LPGUID, LPD3DDEVICEDESC) PURE;
|
||||
STDMETHOD(GetCaps) (THIS_ LPD3DDEVICEDESC, LPD3DDEVICEDESC) PURE;
|
||||
STDMETHOD(SwapTextureHandles) (THIS_ LPDIRECT3DTEXTURE, LPDIRECT3DTEXTURE) PURE;
|
||||
STDMETHOD(CreateExecuteBuffer) (THIS_ LPD3DEXECUTEBUFFERDESC, LPDIRECT3DEXECUTEBUFFER*, IUnknown*) PURE;
|
||||
STDMETHOD(GetStats) (THIS_ LPD3DSTATS) PURE;
|
||||
STDMETHOD(Execute) (THIS_ LPDIRECT3DEXECUTEBUFFER, LPDIRECT3DVIEWPORT, DWORD) PURE;
|
||||
STDMETHOD(AddViewport) (THIS_ LPDIRECT3DVIEWPORT) PURE;
|
||||
STDMETHOD(DeleteViewport) (THIS_ LPDIRECT3DVIEWPORT) PURE;
|
||||
STDMETHOD(NextViewport) (THIS_ LPDIRECT3DVIEWPORT, LPDIRECT3DVIEWPORT*, DWORD) PURE;
|
||||
STDMETHOD(Pick) (THIS_ LPDIRECT3DEXECUTEBUFFER, LPDIRECT3DVIEWPORT, DWORD, LPD3DRECT) PURE;
|
||||
STDMETHOD(GetPickRecords)(THIS_ LPDWORD, LPD3DPICKRECORD) PURE;
|
||||
STDMETHOD(EnumTextureFormats) (THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK, LPVOID) PURE;
|
||||
STDMETHOD(CreateMatrix) (THIS_ LPD3DMATRIXHANDLE) PURE;
|
||||
STDMETHOD(SetMatrix) (THIS_ D3DMATRIXHANDLE, const LPD3DMATRIX) PURE;
|
||||
STDMETHOD(GetMatrix) (THIS_ D3DMATRIXHANDLE, LPD3DMATRIX) PURE;
|
||||
STDMETHOD(DeleteMatrix) (THIS_ D3DMATRIXHANDLE) PURE;
|
||||
STDMETHOD_(HRESULT, BeginScene) (THIS) PURE;
|
||||
STDMETHOD_(HRESULT, EndScene) (THIS) PURE;
|
||||
STDMETHOD(GetDirect3D) (THIS_ LPDIRECT3D*) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirect3DDevice_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
|
||||
#define IDirect3DDevice_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirect3DDevice_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirect3DDevice_Initialize(p, a, b, c) (p)->lpVtbl->Initialize(p, a, b, c)
|
||||
#define IDirect3DDevice_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
|
||||
#define IDirect3DDevice_SwapTextureHandles(p, a, b) (p)->lpVtbl->SwapTextureHandles(p, a, b)
|
||||
#define IDirect3DDevice_CreateExecuteBuffer(p, a, b, c) (p)->lpVtbl->CreateExecuteBuffer(p, a, b, c)
|
||||
#define IDirect3DDevice_GetStats(p, a) (p)->lpVtbl->GetStats(p, a)
|
||||
#define IDirect3DDevice_Execute(p, a, b, c) (p)->lpVtbl->Execute(p, a, b, c)
|
||||
#define IDirect3DDevice_AddViewport(p, a) (p)->lpVtbl->AddViewport(p, a)
|
||||
#define IDirect3DDevice_DeleteViewport(p, a) (p)->lpVtbl->DeleteViewport(p, a)
|
||||
#define IDirect3DDevice_NextViewport(p, a, b) (p)->lpVtbl->NextViewport(p, a, b)
|
||||
#define IDirect3DDevice_Pick(p, a, b, c, d) (p)->lpVtbl->Pick(p, a, b, c, d)
|
||||
#define IDirect3DDevice_GetPickRecords(p, a, b) (p)->lpVtbl->GetPickRecords(p, a, b)
|
||||
#define IDirect3DDevice_EnumTextureFormats(p, a, b) (p)->lpVtbl->EnumTextureFormats(p, a, b)
|
||||
#define IDirect3DDevice_CreateMatrix(p, a) (p)->lpVtbl->CreateMatrix(p, a)
|
||||
#define IDirect3DDevice_SetMatrix(p, a, b) (p)->lpVtbl->SetMatrix(p, a, b)
|
||||
#define IDirect3DDevice_GetMatrix(p, a, b) (p)->lpVtbl->GetMatrix(p, a, b)
|
||||
#define IDirect3DDevice_DeleteMatrix(p, a) (p)->lpVtbl->DeleteMatrix(p, a)
|
||||
#define IDirect3DDevice_BeginScene(p) (p)->lpVtbl->BeginScene(p)
|
||||
#define IDirect3DDevice_EndScene(p) (p)->lpVtbl->EndScene(p)
|
||||
#define IDirect3DDevice_GetDirect3D(p, a) (p)->lpVtbl->GetDirect3D(p, a)
|
||||
#else
|
||||
#define IDirect3DDevice_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
|
||||
#define IDirect3DDevice_AddRef(p) (p)->AddRef()
|
||||
#define IDirect3DDevice_Release(p) (p)->Release()
|
||||
#define IDirect3DDevice_Initialize(p, a, b, c) (p)->Initialize(a, b, c)
|
||||
#define IDirect3DDevice_GetCaps(p, a, b) (p)->GetCaps(a, b)
|
||||
#define IDirect3DDevice_SwapTextureHandles(p, a, b) (p)->SwapTextureHandles(a, b)
|
||||
#define IDirect3DDevice_CreateExecuteBuffer(p, a, b, c) (p)->CreateExecuteBuffer(a, b, c)
|
||||
#define IDirect3DDevice_GetStats(p, a) (p)->GetStats(a)
|
||||
#define IDirect3DDevice_Execute(p, a, b, c) (p)->Execute(a, b, c)
|
||||
#define IDirect3DDevice_AddViewport(p, a) (p)->AddViewport(a)
|
||||
#define IDirect3DDevice_DeleteViewport(p, a) (p)->DeleteViewport(a)
|
||||
#define IDirect3DDevice_NextViewport(p, a, b) (p)->NextViewport(a, b)
|
||||
#define IDirect3DDevice_Pick(p, a, b, c, d) (p)->Pick(a, b, c, d)
|
||||
#define IDirect3DDevice_GetPickRecords(p, a, b) (p)->GetPickRecords(a, b)
|
||||
#define IDirect3DDevice_EnumTextureFormats(p, a, b) (p)->EnumTextureFormats(a, b)
|
||||
#define IDirect3DDevice_CreateMatrix(p, a) (p)->CreateMatrix(a)
|
||||
#define IDirect3DDevice_SetMatrix(p, a, b) (p)->SetMatrix(a, b)
|
||||
#define IDirect3DDevice_GetMatrix(p, a, b) (p)->GetMatrix(a, b)
|
||||
#define IDirect3DDevice_DeleteMatrix(p, a) (p)->DeleteMatrix(a)
|
||||
#define IDirect3DDevice_BeginScene(p) (p)->BeginScene()
|
||||
#define IDirect3DDevice_EndScene(p) (p)->EndScene()
|
||||
#define IDirect3DDevice_GetDirect3D(p, a) (p)->GetDirect3D(a)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* IDirect3DDevice2
|
||||
*/
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3DDevice2
|
||||
DECLARE_INTERFACE_(IDirect3DDevice2, IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release) (THIS) PURE;
|
||||
/*** IDirect3DDevice2 methods ***/
|
||||
STDMETHOD(GetCaps) (THIS_ LPD3DDEVICEDESC, LPD3DDEVICEDESC) PURE;
|
||||
STDMETHOD(SwapTextureHandles) (THIS_ LPDIRECT3DTEXTURE2, LPDIRECT3DTEXTURE2) PURE;
|
||||
STDMETHOD(GetStats) (THIS_ LPD3DSTATS) PURE;
|
||||
STDMETHOD(AddViewport) (THIS_ LPDIRECT3DVIEWPORT2) PURE;
|
||||
STDMETHOD(DeleteViewport) (THIS_ LPDIRECT3DVIEWPORT2) PURE;
|
||||
STDMETHOD(NextViewport) (THIS_ LPDIRECT3DVIEWPORT2, LPDIRECT3DVIEWPORT2*, DWORD) PURE;
|
||||
STDMETHOD(EnumTextureFormats) (THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK, LPVOID) PURE;
|
||||
STDMETHOD_(HRESULT, BeginScene) (THIS) PURE;
|
||||
STDMETHOD_(HRESULT, EndScene) (THIS) PURE;
|
||||
STDMETHOD(GetDirect3D) (THIS_ LPDIRECT3D2*) PURE;
|
||||
|
||||
/*** DrawPrimitive API ***/
|
||||
STDMETHOD(SetCurrentViewport) (THIS_ LPDIRECT3DVIEWPORT2) PURE;
|
||||
STDMETHOD(GetCurrentViewport) (THIS_ LPDIRECT3DVIEWPORT2 *) PURE;
|
||||
|
||||
STDMETHOD(SetRenderTarget) (THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
|
||||
STDMETHOD(GetRenderTarget) (THIS_ LPDIRECTDRAWSURFACE *) PURE;
|
||||
|
||||
STDMETHOD(Begin) (THIS_ D3DPRIMITIVETYPE, D3DVERTEXTYPE, DWORD) PURE;
|
||||
STDMETHOD(BeginIndexed) (THIS_ D3DPRIMITIVETYPE, D3DVERTEXTYPE, LPVOID, DWORD, DWORD) PURE;
|
||||
STDMETHOD(Vertex) (THIS_ LPVOID) PURE;
|
||||
STDMETHOD(Index) (THIS_ WORD) PURE;
|
||||
STDMETHOD(End) (THIS_ DWORD) PURE;
|
||||
|
||||
STDMETHOD(GetRenderState) (THIS_ D3DRENDERSTATETYPE, LPDWORD) PURE;
|
||||
STDMETHOD(SetRenderState) (THIS_ D3DRENDERSTATETYPE, DWORD) PURE;
|
||||
STDMETHOD(GetLightState) (THIS_ D3DLIGHTSTATETYPE, LPDWORD) PURE;
|
||||
STDMETHOD(SetLightState) (THIS_ D3DLIGHTSTATETYPE, DWORD) PURE;
|
||||
STDMETHOD(SetTransform) (THIS_ D3DTRANSFORMSTATETYPE, LPD3DMATRIX) PURE;
|
||||
STDMETHOD(GetTransform) (THIS_ D3DTRANSFORMSTATETYPE, LPD3DMATRIX) PURE;
|
||||
STDMETHOD(MultiplyTransform) (THIS_ D3DTRANSFORMSTATETYPE, LPD3DMATRIX) PURE;
|
||||
|
||||
STDMETHOD(DrawPrimitive) (THIS_ D3DPRIMITIVETYPE, D3DVERTEXTYPE, LPVOID, DWORD, DWORD) PURE;
|
||||
STDMETHOD(DrawIndexedPrimitive) (THIS_ D3DPRIMITIVETYPE, D3DVERTEXTYPE, LPVOID, DWORD, LPWORD, DWORD, DWORD) PURE;
|
||||
|
||||
STDMETHOD(SetClipStatus) (THIS_ LPD3DCLIPSTATUS) PURE;
|
||||
STDMETHOD(GetClipStatus) (THIS_ LPD3DCLIPSTATUS) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirect3DDevice2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
|
||||
#define IDirect3DDevice2_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirect3DDevice2_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirect3DDevice2_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
|
||||
#define IDirect3DDevice2_SwapTextureHandles(p, a, b) (p)->lpVtbl->SwapTextureHandles(p, a, b)
|
||||
#define IDirect3DDevice2_GetStats(p, a) (p)->lpVtbl->CreateViewport(p, a)
|
||||
#define IDirect3DDevice2_AddViewport(p, a) (p)->lpVtbl->AddViewport(p, a)
|
||||
#define IDirect3DDevice2_DeleteViewport(p, a) (p)->lpVtbl->DeleteViewport(p, a)
|
||||
#define IDirect3DDevice2_NextViewport(p, a, b) (p)->lpVtbl->NextViewport(p, a, b)
|
||||
#define IDirect3DDevice2_EnumTextureFormats(p, a, b) (p)->lpVtbl->EnumTextureFormats(p, a, b)
|
||||
#define IDirect3DDevice2_BeginScene(p) (p)->lpVtbl->BeginScene(p)
|
||||
#define IDirect3DDevice2_EndScene(p) (p)->lpVtbl->EndScene(p)
|
||||
#define IDirect3DDevice2_GetDirect3D(p, a) (p)->lpVtbl->GetDirect3D(p, a)
|
||||
|
||||
#define IDirect3DDevice2_SetCurrentViewport(p, a) (p)->lpVtbl->SetCurrentViewport(p, a)
|
||||
#define IDirect3DDevice2_GetCurrentViewport(p, a) (p)->lpVtbl->GetCurrentViewport(p, a)
|
||||
|
||||
#define IDirect3DDevice2_SetRenderTarget(p, a, b) (p)->lpVtbl->SetRenderTarget(p, a, b)
|
||||
#define IDirect3DDevice2_GetRenderTarget(p, a) (p)->lpVtbl->GetRenderTarget(p, a)
|
||||
|
||||
#define IDirect3DDevice2_Begin(p, a, b, c) (p)->lpVtbl->Begin(p, a, b, c)
|
||||
#define IDirect3DDevice2_BeginIndexed(p, a, b, c, d, e) (p)->lpVtbl->Begin(p, a, b, c, d, e)
|
||||
#define IDirect3DDevice2_Vertex(p, a) (p)->lpVtbl->Vertex(p, a)
|
||||
#define IDirect3DDevice2_Index(p, a) (p)->lpVtbl->Index(p, a)
|
||||
#define IDirect3DDevice2_End(p, a) (p)->lpVtbl->End(p, a)
|
||||
|
||||
#define IDirect3DDevice2_GetRenderState(p, a, b) (p)->lpVtbl->GetRenderState(p, a, b)
|
||||
#define IDirect3DDevice2_SetRenderState(p, a, b) (p)->lpVtbl->SetRenderState(p, a, b)
|
||||
#define IDirect3DDevice2_GetLightState(p, a, b) (p)->lpVtbl->GetLightState(p, a, b)
|
||||
#define IDirect3DDevice2_SetLightState(p, a, b) (p)->lpVtbl->SetLightState(p, a, b)
|
||||
#define IDirect3DDevice2_SetTransform(p, a, b) (p)->lpVtbl->SetTransform(p, a, b)
|
||||
#define IDirect3DDevice2_GetTransform(p, a, b) (p)->lpVtbl->GetTransform(p, a, b)
|
||||
#define IDirect3DDevice2_MultiplyTransform(p, a, b) (p)->lpVtbl->MultiplyTransform(p, a, b)
|
||||
|
||||
#define IDirect3DDevice2_DrawPrimitive(p, a, b, c, d, e) (p)->lpVtbl->DrawPrimitive(p, a, b, c, d, e)
|
||||
#define IDirect3DDevice2_DrawIndexedPrimitive(p, a, b, c, d, e, f, g) \
|
||||
(p)->lpVtbl->DrawIndexedPrimitive(p, a, b, c, d, e, f, g)
|
||||
#define IDirect3DDevice2_SetClipStatus(p, a) (p)->lpVtbl->SetClipStatus(p, a)
|
||||
#define IDirect3DDevice2_GetClipStatus(p, a) (p)->lpVtbl->GetClipStatus(p, a)
|
||||
#else
|
||||
#define IDirect3DDevice2_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
|
||||
#define IDirect3DDevice2_AddRef(p) (p)->AddRef()
|
||||
#define IDirect3DDevice2_Release(p) (p)->Release()
|
||||
#define IDirect3DDevice2_GetCaps(p, a, b) (p)->GetCaps(a, b)
|
||||
#define IDirect3DDevice2_SwapTextureHandles(p, a, b) (p)->SwapTextureHandles(a, b)
|
||||
#define IDirect3DDevice2_GetStats(p, a) (p)->CreateViewport(a)
|
||||
#define IDirect3DDevice2_AddViewport(p, a) (p)->AddViewport(a)
|
||||
#define IDirect3DDevice2_DeleteViewport(p, a) (p)->DeleteViewport(a)
|
||||
#define IDirect3DDevice2_NextViewport(p, a, b) (p)->NextViewport(a, b)
|
||||
#define IDirect3DDevice2_EnumTextureFormats(p, a, b) (p)->EnumTextureFormats(a, b)
|
||||
#define IDirect3DDevice2_BeginScene(p) (p)->BeginScene()
|
||||
#define IDirect3DDevice2_EndScene(p) (p)->EndScene()
|
||||
#define IDirect3DDevice2_GetDirect3D(p, a) (p)->GetDirect3D(a)
|
||||
|
||||
#define IDirect3DDevice2_SetCurrentViewport(p, a) (p)->SetCurrentViewport(a)
|
||||
#define IDirect3DDevice2_GetCurrentViewport(p, a) (p)->GetCurrentViewport(a)
|
||||
|
||||
#define IDirect3DDevice2_SetRenderTarget(p, a, b) (p)->SetRenderTarget(a, b)
|
||||
#define IDirect3DDevice2_GetRenderTarget(p, a) (p)->GetRenderTarget(a)
|
||||
|
||||
#define IDirect3DDevice2_Begin(p, a, b, c) (p)->Begin(a, b, c)
|
||||
#define IDirect3DDevice2_BeginIndexed(p, a, b, c, d, e) (p)->Begin(a, b, c, d, e)
|
||||
#define IDirect3DDevice2_Vertex(p, a) (p)->Vertex(a)
|
||||
#define IDirect3DDevice2_Index(p, a) (p)->Index(a)
|
||||
#define IDirect3DDevice2_End(p, a) (p)->End(a)
|
||||
|
||||
#define IDirect3DDevice2_GetRenderState(p, a, b) (p)->GetRenderState(a, b)
|
||||
#define IDirect3DDevice2_SetRenderState(p, a, b) (p)->SetRenderState(a, b)
|
||||
#define IDirect3DDevice2_GetLightState(p, a, b) (p)->GetLightState(a, b)
|
||||
#define IDirect3DDevice2_SetLightState(p, a, b) (p)->SetLightState(a, b)
|
||||
#define IDirect3DDevice2_SetTransform(p, a, b) (p)->SetTransform(a, b)
|
||||
#define IDirect3DDevice2_GetTransform(p, a, b) (p)->GetTransform(a, b)
|
||||
#define IDirect3DDevice2_MultiplyTransform(p, a, b) (p)->MultiplyTransform(a, b)
|
||||
|
||||
#define IDirect3DDevice2_DrawPrimitive(p, a, b, c, d, e) (p)->DrawPrimitive(a, b, c, d, e)
|
||||
#define IDirect3DDevice2_DrawIndexedPrimitive(p, a, b, c, d, e, f, g) \
|
||||
(p)->DrawIndexedPrimitive(a, b, c, d, e, f, g)
|
||||
#define IDirect3DDevice2_SetClipStatus(p, a) (p)->SetClipStatus(a)
|
||||
#define IDirect3DDevice2_GetClipStatus(p, a) (p)->GetClipStatus(a)
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* IDirect3DExecuteBuffer
|
||||
*/
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3DExecuteBuffer
|
||||
DECLARE_INTERFACE_(IDirect3DExecuteBuffer, IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release) (THIS) PURE;
|
||||
/*** IDirect3DExecuteBuffer methods ***/
|
||||
STDMETHOD(Initialize) (THIS_ LPDIRECT3DDEVICE, LPD3DEXECUTEBUFFERDESC) PURE;
|
||||
STDMETHOD(Lock) (THIS_ LPD3DEXECUTEBUFFERDESC) PURE;
|
||||
STDMETHOD_(HRESULT, Unlock) (THIS) PURE;
|
||||
STDMETHOD(SetExecuteData) (THIS_ LPD3DEXECUTEDATA) PURE;
|
||||
STDMETHOD(GetExecuteData) (THIS_ LPD3DEXECUTEDATA) PURE;
|
||||
STDMETHOD(Validate) (THIS_ LPDWORD, LPD3DVALIDATECALLBACK, LPVOID, DWORD) PURE;
|
||||
STDMETHOD(Optimize) (THIS_ DWORD) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirect3DExecuteBuffer_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
|
||||
#define IDirect3DExecuteBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirect3DExecuteBuffer_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirect3DExecuteBuffer_Initialize(p, a, b) (p)->lpVtbl->Initialize(p, a, b)
|
||||
#define IDirect3DExecuteBuffer_Lock(p, a) (p)->lpVtbl->Lock(p, a)
|
||||
#define IDirect3DExecuteBuffer_Unlock(p) (p)->lpVtbl->Unlock(p)
|
||||
#define IDirect3DExecuteBuffer_SetExecuteData(p, a) (p)->lpVtbl->SetExecuteData(p, a)
|
||||
#define IDirect3DExecuteBuffer_GetExecuteData(p, a) (p)->lpVtbl->GetExecuteData(p, a)
|
||||
#define IDirect3DExecuteBuffer_Validate(p, a, b, c, d) (p)->lpVtbl->Validate(p, a, b, c, d)
|
||||
#define IDirect3DExecuteBuffer_Optimize(p, a) (p)->lpVtbl->Optimize(p, a)
|
||||
#else
|
||||
#define IDirect3DExecuteBuffer_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
|
||||
#define IDirect3DExecuteBuffer_AddRef(p) (p)->AddRef()
|
||||
#define IDirect3DExecuteBuffer_Release(p) (p)->Release()
|
||||
#define IDirect3DExecuteBuffer_Initialize(p, a, b) (p)->Initialize(a, b)
|
||||
#define IDirect3DExecuteBuffer_Lock(p, a) (p)->Lock(a)
|
||||
#define IDirect3DExecuteBuffer_Unlock(p) (p)->Unlock()
|
||||
#define IDirect3DExecuteBuffer_SetExecuteData(p, a) (p)->SetExecuteData(a)
|
||||
#define IDirect3DExecuteBuffer_GetExecuteData(p, a) (p)->GetExecuteData(a)
|
||||
#define IDirect3DExecuteBuffer_Validate(p, a, b, c, d) (p)->Validate(a, b, c, d)
|
||||
#define IDirect3DExecuteBuffer_Optimize(p, a) (p)->Optimize(a)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* IDirect3DLight
|
||||
*/
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3DLight
|
||||
DECLARE_INTERFACE_(IDirect3DLight, IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release) (THIS) PURE;
|
||||
/*** IDirect3DLight methods ***/
|
||||
STDMETHOD(Initialize) (THIS_ LPDIRECT3D) PURE;
|
||||
STDMETHOD(SetLight) (THIS_ LPD3DLIGHT) PURE;
|
||||
STDMETHOD(GetLight) (THIS_ LPD3DLIGHT) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirect3DLight_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
|
||||
#define IDirect3DLight_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirect3DLight_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirect3DLight_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
|
||||
#define IDirect3DLight_SetLight(p, a) (p)->lpVtbl->SetLight(p, a)
|
||||
#define IDirect3DLight_GetLight(p, a) (p)->lpVtbl->GetLight(p, a)
|
||||
#else
|
||||
#define IDirect3DLight_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
|
||||
#define IDirect3DLight_AddRef(p) (p)->AddRef()
|
||||
#define IDirect3DLight_Release(p) (p)->Release()
|
||||
#define IDirect3DLight_Initialize(p, a) (p)->Initialize(a)
|
||||
#define IDirect3DLight_SetLight(p, a) (p)->SetLight(a)
|
||||
#define IDirect3DLight_GetLight(p, a) (p)->GetLight(a)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* IDirect3DMaterial
|
||||
*/
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3DMaterial
|
||||
DECLARE_INTERFACE_(IDirect3DMaterial, IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release) (THIS) PURE;
|
||||
/*** IDirect3DMaterial methods ***/
|
||||
STDMETHOD(Initialize) (THIS_ LPDIRECT3D) PURE;
|
||||
STDMETHOD(SetMaterial) (THIS_ LPD3DMATERIAL) PURE;
|
||||
STDMETHOD(GetMaterial) (THIS_ LPD3DMATERIAL) PURE;
|
||||
STDMETHOD(GetHandle) (THIS_ LPDIRECT3DDEVICE, LPD3DMATERIALHANDLE) PURE;
|
||||
STDMETHOD_(HRESULT, Reserve) (THIS) PURE;
|
||||
STDMETHOD_(HRESULT, Unreserve) (THIS) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirect3DMaterial_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
|
||||
#define IDirect3DMaterial_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirect3DMaterial_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirect3DMaterial_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
|
||||
#define IDirect3DMaterial_SetMaterial(p, a) (p)->lpVtbl->SetMaterial(p, a)
|
||||
#define IDirect3DMaterial_GetMaterial(p, a) (p)->lpVtbl->GetMaterial(p, a)
|
||||
#define IDirect3DMaterial_GetHandle(p, a, b) (p)->lpVtbl->GetHandle(p, a, b)
|
||||
#define IDirect3DMaterial_Reserve(p) (p)->lpVtbl->Reserve(p)
|
||||
#define IDirect3DMaterial_Unreserve(p) (p)->lpVtbl->Unreserve(p)
|
||||
#else
|
||||
#define IDirect3DMaterial_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
|
||||
#define IDirect3DMaterial_AddRef(p) (p)->AddRef()
|
||||
#define IDirect3DMaterial_Release(p) (p)->Release()
|
||||
#define IDirect3DMaterial_Initialize(p, a) (p)->Initialize(a)
|
||||
#define IDirect3DMaterial_SetMaterial(p, a) (p)->SetMaterial(a)
|
||||
#define IDirect3DMaterial_GetMaterial(p, a) (p)->GetMaterial(a)
|
||||
#define IDirect3DMaterial_GetHandle(p, a, b) (p)->GetHandle(a, b)
|
||||
#define IDirect3DMaterial_Reserve(p) (p)->Reserve()
|
||||
#define IDirect3DMaterial_Unreserve(p) (p)->Unreserve()
|
||||
#endif
|
||||
|
||||
/*
|
||||
* IDirect3DMaterial2
|
||||
*/
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3DMaterial2
|
||||
DECLARE_INTERFACE_(IDirect3DMaterial2, IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release) (THIS) PURE;
|
||||
/*** IDirect3DMaterial2 methods ***/
|
||||
STDMETHOD(SetMaterial) (THIS_ LPD3DMATERIAL) PURE;
|
||||
STDMETHOD(GetMaterial) (THIS_ LPD3DMATERIAL) PURE;
|
||||
STDMETHOD(GetHandle) (THIS_ LPDIRECT3DDEVICE2, LPD3DMATERIALHANDLE) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirect3DMaterial2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
|
||||
#define IDirect3DMaterial2_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirect3DMaterial2_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirect3DMaterial2_SetMaterial(p, a) (p)->lpVtbl->SetMaterial(p, a)
|
||||
#define IDirect3DMaterial2_GetMaterial(p, a) (p)->lpVtbl->GetMaterial(p, a)
|
||||
#define IDirect3DMaterial2_GetHandle(p, a, b) (p)->lpVtbl->GetHandle(p, a, b)
|
||||
#else
|
||||
#define IDirect3DMaterial2_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
|
||||
#define IDirect3DMaterial2_AddRef(p) (p)->AddRef()
|
||||
#define IDirect3DMaterial2_Release(p) (p)->Release()
|
||||
#define IDirect3DMaterial2_SetMaterial(p, a) (p)->SetMaterial(a)
|
||||
#define IDirect3DMaterial2_GetMaterial(p, a) (p)->GetMaterial(a)
|
||||
#define IDirect3DMaterial2_GetHandle(p, a, b) (p)->GetHandle(a, b)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* IDirect3DTexture
|
||||
*/
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3DTexture
|
||||
DECLARE_INTERFACE_(IDirect3DTexture, IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release) (THIS) PURE;
|
||||
/*** IDirect3DTexture methods ***/
|
||||
STDMETHOD(Initialize) (THIS_ LPDIRECT3DDEVICE, LPDIRECTDRAWSURFACE) PURE;
|
||||
STDMETHOD(GetHandle) (THIS_ LPDIRECT3DDEVICE, LPD3DTEXTUREHANDLE) PURE;
|
||||
STDMETHOD(PaletteChanged) (THIS_ DWORD, DWORD) PURE;
|
||||
STDMETHOD(Load) (THIS_ LPDIRECT3DTEXTURE) PURE;
|
||||
STDMETHOD_(HRESULT, Unload) (THIS) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirect3DTexture_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
|
||||
#define IDirect3DTexture_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirect3DTexture_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirect3DTexture_Initialize(p, a, b) (p)->lpVtbl->Initialize(p, a, b)
|
||||
#define IDirect3DTexture_GetHandle(p, a, b) (p)->lpVtbl->GetHandle(p, a, b)
|
||||
#define IDirect3DTexture_PaletteChanged(p, a, b) (p)->lpVtbl->PaletteChanged(p, a, b)
|
||||
#define IDirect3DTexture_Load(p, a) (p)->lpVtbl->Load(p, a)
|
||||
#define IDirect3DTexture_Unload(p) (p)->lpVtbl->Unload(p)
|
||||
#else
|
||||
#define IDirect3DTexture_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
|
||||
#define IDirect3DTexture_AddRef(p) (p)->AddRef()
|
||||
#define IDirect3DTexture_Release(p) (p)->Release()
|
||||
#define IDirect3DTexture_Initialize(p, a, b) (p)->Initialize(a, b)
|
||||
#define IDirect3DTexture_GetHandle(p, a, b) (p)->GetHandle(a, b)
|
||||
#define IDirect3DTexture_PaletteChanged(p, a, b) (p)->PaletteChanged(a, b)
|
||||
#define IDirect3DTexture_Load(p, a) (p)->Load(a)
|
||||
#define IDirect3DTexture_Unload(p) (p)->Unload()
|
||||
#endif
|
||||
|
||||
/*
|
||||
* IDirect3DTexture2
|
||||
*/
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3DTexture2
|
||||
DECLARE_INTERFACE_(IDirect3DTexture2, IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release) (THIS) PURE;
|
||||
/*** IDirect3DTexture2 methods ***/
|
||||
STDMETHOD(GetHandle) (THIS_ LPDIRECT3DDEVICE2, LPD3DTEXTUREHANDLE) PURE;
|
||||
STDMETHOD(PaletteChanged) (THIS_ DWORD, DWORD) PURE;
|
||||
STDMETHOD(Load) (THIS_ LPDIRECT3DTEXTURE2) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirect3DTexture2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
|
||||
#define IDirect3DTexture2_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirect3DTexture2_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirect3DTexture2_GetHandle(p, a, b) (p)->lpVtbl->GetHandle(p, a, b)
|
||||
#define IDirect3DTexture2_PaletteChanged(p, a, b) (p)->lpVtbl->PaletteChanged(p, a, b)
|
||||
#define IDirect3DTexture2_Load(p, a) (p)->lpVtbl->Load(p, a)
|
||||
#else
|
||||
#define IDirect3DTexture2_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
|
||||
#define IDirect3DTexture2_AddRef(p) (p)->AddRef()
|
||||
#define IDirect3DTexture2_Release(p) (p)->Release()
|
||||
#define IDirect3DTexture2_GetHandle(p, a, b) (p)->GetHandle(a, b)
|
||||
#define IDirect3DTexture2_PaletteChanged(p, a, b) (p)->PaletteChanged(a, b)
|
||||
#define IDirect3DTexture2_Load(p, a) (p)->Load(a)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* IDirect3DViewport
|
||||
*/
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3DViewport
|
||||
DECLARE_INTERFACE_(IDirect3DViewport, IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release) (THIS) PURE;
|
||||
/*** IDirect3DViewport methods ***/
|
||||
STDMETHOD(Initialize) (THIS_ LPDIRECT3D) PURE;
|
||||
STDMETHOD(GetViewport) (THIS_ LPD3DVIEWPORT) PURE;
|
||||
STDMETHOD(SetViewport) (THIS_ LPD3DVIEWPORT) PURE;
|
||||
STDMETHOD(TransformVertices) (THIS_ DWORD, LPD3DTRANSFORMDATA, DWORD, LPDWORD) PURE;
|
||||
STDMETHOD(LightElements) (THIS_ DWORD, LPD3DLIGHTDATA) PURE;
|
||||
STDMETHOD(SetBackground) (THIS_ D3DMATERIALHANDLE) PURE;
|
||||
STDMETHOD(GetBackground) (THIS_ LPD3DMATERIALHANDLE, LPBOOL) PURE;
|
||||
STDMETHOD(SetBackgroundDepth) (THIS_ LPDIRECTDRAWSURFACE) PURE;
|
||||
STDMETHOD(GetBackgroundDepth) (THIS_ LPDIRECTDRAWSURFACE*, LPBOOL) PURE;
|
||||
STDMETHOD(Clear) (THIS_ DWORD, LPD3DRECT, DWORD) PURE;
|
||||
STDMETHOD(AddLight) (THIS_ LPDIRECT3DLIGHT) PURE;
|
||||
STDMETHOD(DeleteLight) (THIS_ LPDIRECT3DLIGHT) PURE;
|
||||
STDMETHOD(NextLight) (THIS_ LPDIRECT3DLIGHT, LPDIRECT3DLIGHT*, DWORD) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirect3DViewport_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
|
||||
#define IDirect3DViewport_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirect3DViewport_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirect3DViewport_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
|
||||
#define IDirect3DViewport_GetViewport(p, a) (p)->lpVtbl->GetViewport(p, a)
|
||||
#define IDirect3DViewport_SetViewport(p, a) (p)->lpVtbl->SetViewport(p, a)
|
||||
#define IDirect3DViewport_TransformVertices(p, a, b, c, d) (p)->lpVtbl->TransformVertices(p, a, b, c, d)
|
||||
#define IDirect3DViewport_LightElements(p, a, b) (p)->lpVtbl->LightElements(p, a, b)
|
||||
#define IDirect3DViewport_SetBackground(p, a) (p)->lpVtbl->SetBackground(p, a)
|
||||
#define IDirect3DViewport_GetBackground(p, a, b) (p)->lpVtbl->GetBackground(p, a, b)
|
||||
#define IDirect3DViewport_SetBackgroundDepth(p, a) (p)->lpVtbl->SetBackgroundDepth(p, a)
|
||||
#define IDirect3DViewport_GetBackgroundDepth(p, a, b) (p)->lpVtbl->GetBackgroundDepth(p, a, b)
|
||||
#define IDirect3DViewport_Clear(p, a, b, c) (p)->lpVtbl->Clear(p, a, b, c)
|
||||
#define IDirect3DViewport_AddLight(p, a) (p)->lpVtbl->AddLight(p, a)
|
||||
#define IDirect3DViewport_DeleteLight(p, a) (p)->lpVtbl->DeleteLight(p, a)
|
||||
#define IDirect3DViewport_NextLight(p, a, b, c) (p)->lpVtbl->NextLight(p, a, b, c)
|
||||
#else
|
||||
#define IDirect3DViewport_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
|
||||
#define IDirect3DViewport_AddRef(p) (p)->AddRef()
|
||||
#define IDirect3DViewport_Release(p) (p)->Release()
|
||||
#define IDirect3DViewport_Initialize(p, a) (p)->Initialize(a)
|
||||
#define IDirect3DViewport_GetViewport(p, a) (p)->GetViewport(a)
|
||||
#define IDirect3DViewport_SetViewport(p, a) (p)->SetViewport(a)
|
||||
#define IDirect3DViewport_TransformVertices(p, a, b, c, d) (p)->TransformVertices(a, b, c, d)
|
||||
#define IDirect3DViewport_LightElements(p, a, b) (p)->LightElements(a, b)
|
||||
#define IDirect3DViewport_SetBackground(p, a) (p)->SetBackground(a)
|
||||
#define IDirect3DViewport_GetBackground(p, a, b) (p)->GetBackground(a, b)
|
||||
#define IDirect3DViewport_SetBackgroundDepth(p, a) (p)->SetBackgroundDepth(a)
|
||||
#define IDirect3DViewport_GetBackgroundDepth(p, a, b) (p)->GetBackgroundDepth(a, b)
|
||||
#define IDirect3DViewport_Clear(p, a, b, c) (p)->Clear(a, b, c)
|
||||
#define IDirect3DViewport_AddLight(p, a) (p)->AddLight(a)
|
||||
#define IDirect3DViewport_DeleteLight(p, a) (p)->DeleteLight(a)
|
||||
#define IDirect3DViewport_NextLight(p, a, b, c) (p)->NextLight(a, b, c)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* IDirect3DViewport2
|
||||
*/
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3DViewport2
|
||||
DECLARE_INTERFACE_(IDirect3DViewport2, IDirect3DViewport)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release) (THIS) PURE;
|
||||
/*** IDirect3DViewport methods ***/
|
||||
STDMETHOD(Initialize) (THIS_ LPDIRECT3D) PURE;
|
||||
STDMETHOD(GetViewport) (THIS_ LPD3DVIEWPORT) PURE;
|
||||
STDMETHOD(SetViewport) (THIS_ LPD3DVIEWPORT) PURE;
|
||||
STDMETHOD(TransformVertices) (THIS_ DWORD, LPD3DTRANSFORMDATA, DWORD, LPDWORD) PURE;
|
||||
STDMETHOD(LightElements) (THIS_ DWORD, LPD3DLIGHTDATA) PURE;
|
||||
STDMETHOD(SetBackground) (THIS_ D3DMATERIALHANDLE) PURE;
|
||||
STDMETHOD(GetBackground) (THIS_ LPD3DMATERIALHANDLE, LPBOOL) PURE;
|
||||
STDMETHOD(SetBackgroundDepth) (THIS_ LPDIRECTDRAWSURFACE) PURE;
|
||||
STDMETHOD(GetBackgroundDepth) (THIS_ LPDIRECTDRAWSURFACE*, LPBOOL) PURE;
|
||||
STDMETHOD(Clear) (THIS_ DWORD, LPD3DRECT, DWORD) PURE;
|
||||
STDMETHOD(AddLight) (THIS_ LPDIRECT3DLIGHT) PURE;
|
||||
STDMETHOD(DeleteLight) (THIS_ LPDIRECT3DLIGHT) PURE;
|
||||
STDMETHOD(NextLight) (THIS_ LPDIRECT3DLIGHT, LPDIRECT3DLIGHT*, DWORD) PURE;
|
||||
/*** IDirect3DViewport2 methods ***/
|
||||
STDMETHOD(GetViewport2) (THIS_ LPD3DVIEWPORT2) PURE;
|
||||
STDMETHOD(SetViewport2) (THIS_ LPD3DVIEWPORT2) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirect3DViewport2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
|
||||
#define IDirect3DViewport2_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirect3DViewport2_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirect3DViewport2_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
|
||||
#define IDirect3DViewport2_GetViewport(p, a) (p)->lpVtbl->GetViewport(p, a)
|
||||
#define IDirect3DViewport2_SetViewport(p, a) (p)->lpVtbl->SetViewport(p, a)
|
||||
#define IDirect3DViewport2_TransformVertices(p, a, b, c, d) (p)->lpVtbl->TransformVertices(p, a, b, c, d)
|
||||
#define IDirect3DViewport2_LightElements(p, a, b) (p)->lpVtbl->LightElements(p, a, b)
|
||||
#define IDirect3DViewport2_SetBackground(p, a) (p)->lpVtbl->SetBackground(p, a)
|
||||
#define IDirect3DViewport2_GetBackground(p, a, b) (p)->lpVtbl->GetBackground(p, a, b)
|
||||
#define IDirect3DViewport2_SetBackgroundDepth(p, a) (p)->lpVtbl->SetBackgroundDepth(p, a)
|
||||
#define IDirect3DViewport2_GetBackgroundDepth(p, a, b) (p)->lpVtbl->GetBackgroundDepth(p, a, b)
|
||||
#define IDirect3DViewport2_Clear(p, a, b, c) (p)->lpVtbl->Clear(p, a, b, c)
|
||||
#define IDirect3DViewport2_AddLight(p, a) (p)->lpVtbl->AddLight(p, a)
|
||||
#define IDirect3DViewport2_DeleteLight(p, a) (p)->lpVtbl->DeleteLight(p, a)
|
||||
#define IDirect3DViewport2_NextLight(p, a, b, c) (p)->lpVtbl->NextLight(p, a, b, c)
|
||||
#define IDirect3DViewport2_GetViewport2(p, a) (p)->lpVtbl->GetViewport2(p, a)
|
||||
#define IDirect3DViewport2_SetViewport2(p, a) (p)->lpVtbl->SetViewport2(p, a)
|
||||
#else
|
||||
#define IDirect3DViewport2_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
|
||||
#define IDirect3DViewport2_AddRef(p) (p)->AddRef()
|
||||
#define IDirect3DViewport2_Release(p) (p)->Release()
|
||||
#define IDirect3DViewport2_Initialize(p, a) (p)->Initialize(a)
|
||||
#define IDirect3DViewport2_GetViewport(p, a) (p)->GetViewport(a)
|
||||
#define IDirect3DViewport2_SetViewport(p, a) (p)->SetViewport(a)
|
||||
#define IDirect3DViewport2_TransformVertices(p, a, b, c, d) (p)->TransformVertices(a, b, c, d)
|
||||
#define IDirect3DViewport2_LightElements(p, a, b) (p)->LightElements(a, b)
|
||||
#define IDirect3DViewport2_SetBackground(p, a) (p)->SetBackground(a)
|
||||
#define IDirect3DViewport2_GetBackground(p, a, b) (p)->GetBackground(a, b)
|
||||
#define IDirect3DViewport2_SetBackgroundDepth(p, a) (p)->SetBackgroundDepth(a)
|
||||
#define IDirect3DViewport2_GetBackgroundDepth(p, a, b) (p)->GetBackgroundDepth(a, b)
|
||||
#define IDirect3DViewport2_Clear(p, a, b, c) (p)->Clear(a, b, c)
|
||||
#define IDirect3DViewport2_AddLight(p, a) (p)->AddLight(a)
|
||||
#define IDirect3DViewport2_DeleteLight(p, a) (p)->DeleteLight(a)
|
||||
#define IDirect3DViewport2_NextLight(p, a, b, c) (p)->NextLight(a, b, c)
|
||||
#define IDirect3DViewport2_GetViewport2(p, a) (p)->GetViewport2(a)
|
||||
#define IDirect3DViewport2_SetViewport2(p, a) (p)->SetViewport2(a)
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Flags for IDirect3DDevice::NextViewport
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* Return the next viewport
|
||||
*/
|
||||
#define D3DNEXT_NEXT 0x00000001l
|
||||
|
||||
/*
|
||||
* Return the first viewport
|
||||
*/
|
||||
#define D3DNEXT_HEAD 0x00000002l
|
||||
|
||||
/*
|
||||
* Return the last viewport
|
||||
*/
|
||||
#define D3DNEXT_TAIL 0x00000004l
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Flags for DrawPrimitive/DrawIndexedPrimitive
|
||||
* Also valid for Begin/BeginIndexed
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* Wait until the device is ready to draw the primitive
|
||||
* This will cause DP to not return DDERR_WASSTILLDRAWING
|
||||
*/
|
||||
#define D3DDP_WAIT 0x00000001l
|
||||
|
||||
|
||||
/*
|
||||
* Hint that the primitives have been clipped by the application.
|
||||
*/
|
||||
#define D3DDP_DONOTCLIP 0x00000004l
|
||||
|
||||
/*
|
||||
* Hint that the extents need not be updated.
|
||||
*/
|
||||
#define D3DDP_DONOTUPDATEEXTENTS 0x00000008l
|
||||
|
||||
/*
|
||||
* Direct3D Errors
|
||||
* DirectDraw error codes are used when errors not specified here.
|
||||
*/
|
||||
#define D3D_OK DD_OK
|
||||
#define D3DERR_BADMAJORVERSION MAKE_DDHRESULT(700)
|
||||
#define D3DERR_BADMINORVERSION MAKE_DDHRESULT(701)
|
||||
|
||||
/*
|
||||
* An invalid device was requested by the application.
|
||||
*/
|
||||
#define D3DERR_INVALID_DEVICE MAKE_DDHRESULT(705)
|
||||
#define D3DERR_INITFAILED MAKE_DDHRESULT(706)
|
||||
|
||||
/*
|
||||
* SetRenderTarget attempted on a device that was
|
||||
* QI'd off the render target.
|
||||
*/
|
||||
#define D3DERR_DEVICEAGGREGATED MAKE_DDHRESULT(707)
|
||||
|
||||
#define D3DERR_EXECUTE_CREATE_FAILED MAKE_DDHRESULT(710)
|
||||
#define D3DERR_EXECUTE_DESTROY_FAILED MAKE_DDHRESULT(711)
|
||||
#define D3DERR_EXECUTE_LOCK_FAILED MAKE_DDHRESULT(712)
|
||||
#define D3DERR_EXECUTE_UNLOCK_FAILED MAKE_DDHRESULT(713)
|
||||
#define D3DERR_EXECUTE_LOCKED MAKE_DDHRESULT(714)
|
||||
#define D3DERR_EXECUTE_NOT_LOCKED MAKE_DDHRESULT(715)
|
||||
|
||||
#define D3DERR_EXECUTE_FAILED MAKE_DDHRESULT(716)
|
||||
#define D3DERR_EXECUTE_CLIPPED_FAILED MAKE_DDHRESULT(717)
|
||||
|
||||
#define D3DERR_TEXTURE_NO_SUPPORT MAKE_DDHRESULT(720)
|
||||
#define D3DERR_TEXTURE_CREATE_FAILED MAKE_DDHRESULT(721)
|
||||
#define D3DERR_TEXTURE_DESTROY_FAILED MAKE_DDHRESULT(722)
|
||||
#define D3DERR_TEXTURE_LOCK_FAILED MAKE_DDHRESULT(723)
|
||||
#define D3DERR_TEXTURE_UNLOCK_FAILED MAKE_DDHRESULT(724)
|
||||
#define D3DERR_TEXTURE_LOAD_FAILED MAKE_DDHRESULT(725)
|
||||
#define D3DERR_TEXTURE_SWAP_FAILED MAKE_DDHRESULT(726)
|
||||
#define D3DERR_TEXTURE_LOCKED MAKE_DDHRESULT(727)
|
||||
#define D3DERR_TEXTURE_NOT_LOCKED MAKE_DDHRESULT(728)
|
||||
#define D3DERR_TEXTURE_GETSURF_FAILED MAKE_DDHRESULT(729)
|
||||
|
||||
#define D3DERR_MATRIX_CREATE_FAILED MAKE_DDHRESULT(730)
|
||||
#define D3DERR_MATRIX_DESTROY_FAILED MAKE_DDHRESULT(731)
|
||||
#define D3DERR_MATRIX_SETDATA_FAILED MAKE_DDHRESULT(732)
|
||||
#define D3DERR_MATRIX_GETDATA_FAILED MAKE_DDHRESULT(733)
|
||||
#define D3DERR_SETVIEWPORTDATA_FAILED MAKE_DDHRESULT(734)
|
||||
|
||||
#define D3DERR_INVALIDCURRENTVIEWPORT MAKE_DDHRESULT(735)
|
||||
#define D3DERR_INVALIDPRIMITIVETYPE MAKE_DDHRESULT(736)
|
||||
#define D3DERR_INVALIDVERTEXTYPE MAKE_DDHRESULT(737)
|
||||
#define D3DERR_TEXTURE_BADSIZE MAKE_DDHRESULT(738)
|
||||
#define D3DERR_INVALIDRAMPTEXTURE MAKE_DDHRESULT(739)
|
||||
|
||||
#define D3DERR_MATERIAL_CREATE_FAILED MAKE_DDHRESULT(740)
|
||||
#define D3DERR_MATERIAL_DESTROY_FAILED MAKE_DDHRESULT(741)
|
||||
#define D3DERR_MATERIAL_SETDATA_FAILED MAKE_DDHRESULT(742)
|
||||
#define D3DERR_MATERIAL_GETDATA_FAILED MAKE_DDHRESULT(743)
|
||||
#define D3DERR_INVALIDPALETTE MAKE_DDHRESULT(744)
|
||||
|
||||
#define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745)
|
||||
#define D3DERR_ZBUFF_NEEDS_VIDEOMEMORY MAKE_DDHRESULT(746)
|
||||
#define D3DERR_SURFACENOTINVIDMEM MAKE_DDHRESULT(747)
|
||||
|
||||
#define D3DERR_LIGHT_SET_FAILED MAKE_DDHRESULT(750)
|
||||
#define D3DERR_LIGHTHASVIEWPORT MAKE_DDHRESULT(751)
|
||||
#define D3DERR_LIGHTNOTINTHISVIEWPORT MAKE_DDHRESULT(752)
|
||||
|
||||
#define D3DERR_SCENE_IN_SCENE MAKE_DDHRESULT(760)
|
||||
#define D3DERR_SCENE_NOT_IN_SCENE MAKE_DDHRESULT(761)
|
||||
#define D3DERR_SCENE_BEGIN_FAILED MAKE_DDHRESULT(762)
|
||||
#define D3DERR_SCENE_END_FAILED MAKE_DDHRESULT(763)
|
||||
|
||||
#define D3DERR_INBEGIN MAKE_DDHRESULT(770)
|
||||
#define D3DERR_NOTINBEGIN MAKE_DDHRESULT(771)
|
||||
#define D3DERR_NOVIEWPORTS MAKE_DDHRESULT(772)
|
||||
#define D3DERR_VIEWPORTDATANOTSET MAKE_DDHRESULT(773)
|
||||
#define D3DERR_VIEWPORTHASNODEVICE MAKE_DDHRESULT(774)
|
||||
#define D3DERR_NOCURRENTVIEWPORT MAKE_DDHRESULT(775)
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* _D3D_H_ */
|
||||
313
3rdparty/dx5/inc/d3dcaps.h
vendored
Normal file
313
3rdparty/dx5/inc/d3dcaps.h
vendored
Normal file
@ -0,0 +1,313 @@
|
||||
/*==========================================================================;
|
||||
*
|
||||
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: d3dcaps.h
|
||||
* Content: Direct3D capabilities include file
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _D3DCAPS_H
|
||||
#define _D3DCAPS_H
|
||||
|
||||
/*
|
||||
* Pull in DirectDraw include file automatically:
|
||||
*/
|
||||
#include <ddraw.h>
|
||||
|
||||
#pragma pack(4)
|
||||
|
||||
/* Description of capabilities of transform */
|
||||
|
||||
typedef struct _D3DTRANSFORMCAPS {
|
||||
DWORD dwSize;
|
||||
DWORD dwCaps;
|
||||
} D3DTRANSFORMCAPS, *LPD3DTRANSFORMCAPS;
|
||||
|
||||
#define D3DTRANSFORMCAPS_CLIP 0x00000001L /* Will clip whilst transforming */
|
||||
|
||||
/* Description of capabilities of lighting */
|
||||
|
||||
typedef struct _D3DLIGHTINGCAPS {
|
||||
DWORD dwSize;
|
||||
DWORD dwCaps; /* Lighting caps */
|
||||
DWORD dwLightingModel; /* Lighting model - RGB or mono */
|
||||
DWORD dwNumLights; /* Number of lights that can be handled */
|
||||
} D3DLIGHTINGCAPS, *LPD3DLIGHTINGCAPS;
|
||||
|
||||
#define D3DLIGHTINGMODEL_RGB 0x00000001L
|
||||
#define D3DLIGHTINGMODEL_MONO 0x00000002L
|
||||
|
||||
#define D3DLIGHTCAPS_POINT 0x00000001L /* Point lights supported */
|
||||
#define D3DLIGHTCAPS_SPOT 0x00000002L /* Spot lights supported */
|
||||
#define D3DLIGHTCAPS_DIRECTIONAL 0x00000004L /* Directional lights supported */
|
||||
#define D3DLIGHTCAPS_PARALLELPOINT 0x00000008L /* Parallel point lights supported */
|
||||
|
||||
/* Description of capabilities for each primitive type */
|
||||
|
||||
typedef struct _D3DPrimCaps {
|
||||
DWORD dwSize;
|
||||
DWORD dwMiscCaps; /* Capability flags */
|
||||
DWORD dwRasterCaps;
|
||||
DWORD dwZCmpCaps;
|
||||
DWORD dwSrcBlendCaps;
|
||||
DWORD dwDestBlendCaps;
|
||||
DWORD dwAlphaCmpCaps;
|
||||
DWORD dwShadeCaps;
|
||||
DWORD dwTextureCaps;
|
||||
DWORD dwTextureFilterCaps;
|
||||
DWORD dwTextureBlendCaps;
|
||||
DWORD dwTextureAddressCaps;
|
||||
DWORD dwStippleWidth; /* maximum width and height of */
|
||||
DWORD dwStippleHeight; /* of supported stipple (up to 32x32) */
|
||||
} D3DPRIMCAPS, *LPD3DPRIMCAPS;
|
||||
|
||||
/* D3DPRIMCAPS dwMiscCaps */
|
||||
|
||||
#define D3DPMISCCAPS_MASKPLANES 0x00000001L
|
||||
#define D3DPMISCCAPS_MASKZ 0x00000002L
|
||||
#define D3DPMISCCAPS_LINEPATTERNREP 0x00000004L
|
||||
#define D3DPMISCCAPS_CONFORMANT 0x00000008L
|
||||
#define D3DPMISCCAPS_CULLNONE 0x00000010L
|
||||
#define D3DPMISCCAPS_CULLCW 0x00000020L
|
||||
#define D3DPMISCCAPS_CULLCCW 0x00000040L
|
||||
|
||||
/* D3DPRIMCAPS dwRasterCaps */
|
||||
|
||||
#define D3DPRASTERCAPS_DITHER 0x00000001L
|
||||
#define D3DPRASTERCAPS_ROP2 0x00000002L
|
||||
#define D3DPRASTERCAPS_XOR 0x00000004L
|
||||
#define D3DPRASTERCAPS_PAT 0x00000008L
|
||||
#define D3DPRASTERCAPS_ZTEST 0x00000010L
|
||||
#define D3DPRASTERCAPS_SUBPIXEL 0x00000020L
|
||||
#define D3DPRASTERCAPS_SUBPIXELX 0x00000040L
|
||||
#define D3DPRASTERCAPS_FOGVERTEX 0x00000080L
|
||||
#define D3DPRASTERCAPS_FOGTABLE 0x00000100L
|
||||
#define D3DPRASTERCAPS_STIPPLE 0x00000200L
|
||||
#define D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT 0x00000400L
|
||||
#define D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT 0x00000800L
|
||||
#define D3DPRASTERCAPS_ANTIALIASEDGES 0x00001000L
|
||||
#define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000L
|
||||
#define D3DPRASTERCAPS_ZBIAS 0x00004000L
|
||||
#define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000L
|
||||
#define D3DPRASTERCAPS_FOGRANGE 0x00010000L
|
||||
#define D3DPRASTERCAPS_ANISOTROPY 0x00020000L
|
||||
|
||||
/* D3DPRIMCAPS dwZCmpCaps, dwAlphaCmpCaps */
|
||||
|
||||
#define D3DPCMPCAPS_NEVER 0x00000001L
|
||||
#define D3DPCMPCAPS_LESS 0x00000002L
|
||||
#define D3DPCMPCAPS_EQUAL 0x00000004L
|
||||
#define D3DPCMPCAPS_LESSEQUAL 0x00000008L
|
||||
#define D3DPCMPCAPS_GREATER 0x00000010L
|
||||
#define D3DPCMPCAPS_NOTEQUAL 0x00000020L
|
||||
#define D3DPCMPCAPS_GREATEREQUAL 0x00000040L
|
||||
#define D3DPCMPCAPS_ALWAYS 0x00000080L
|
||||
|
||||
/* D3DPRIMCAPS dwSourceBlendCaps, dwDestBlendCaps */
|
||||
|
||||
#define D3DPBLENDCAPS_ZERO 0x00000001L
|
||||
#define D3DPBLENDCAPS_ONE 0x00000002L
|
||||
#define D3DPBLENDCAPS_SRCCOLOR 0x00000004L
|
||||
#define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008L
|
||||
#define D3DPBLENDCAPS_SRCALPHA 0x00000010L
|
||||
#define D3DPBLENDCAPS_INVSRCALPHA 0x00000020L
|
||||
#define D3DPBLENDCAPS_DESTALPHA 0x00000040L
|
||||
#define D3DPBLENDCAPS_INVDESTALPHA 0x00000080L
|
||||
#define D3DPBLENDCAPS_DESTCOLOR 0x00000100L
|
||||
#define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200L
|
||||
#define D3DPBLENDCAPS_SRCALPHASAT 0x00000400L
|
||||
#define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800L
|
||||
#define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000L
|
||||
|
||||
/* D3DPRIMCAPS dwShadeCaps */
|
||||
|
||||
#define D3DPSHADECAPS_COLORFLATMONO 0x00000001L
|
||||
#define D3DPSHADECAPS_COLORFLATRGB 0x00000002L
|
||||
#define D3DPSHADECAPS_COLORGOURAUDMONO 0x00000004L
|
||||
#define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008L
|
||||
#define D3DPSHADECAPS_COLORPHONGMONO 0x00000010L
|
||||
#define D3DPSHADECAPS_COLORPHONGRGB 0x00000020L
|
||||
|
||||
#define D3DPSHADECAPS_SPECULARFLATMONO 0x00000040L
|
||||
#define D3DPSHADECAPS_SPECULARFLATRGB 0x00000080L
|
||||
#define D3DPSHADECAPS_SPECULARGOURAUDMONO 0x00000100L
|
||||
#define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200L
|
||||
#define D3DPSHADECAPS_SPECULARPHONGMONO 0x00000400L
|
||||
#define D3DPSHADECAPS_SPECULARPHONGRGB 0x00000800L
|
||||
|
||||
#define D3DPSHADECAPS_ALPHAFLATBLEND 0x00001000L
|
||||
#define D3DPSHADECAPS_ALPHAFLATSTIPPLED 0x00002000L
|
||||
#define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000L
|
||||
#define D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED 0x00008000L
|
||||
#define D3DPSHADECAPS_ALPHAPHONGBLEND 0x00010000L
|
||||
#define D3DPSHADECAPS_ALPHAPHONGSTIPPLED 0x00020000L
|
||||
|
||||
#define D3DPSHADECAPS_FOGFLAT 0x00040000L
|
||||
#define D3DPSHADECAPS_FOGGOURAUD 0x00080000L
|
||||
#define D3DPSHADECAPS_FOGPHONG 0x00100000L
|
||||
|
||||
/* D3DPRIMCAPS dwTextureCaps */
|
||||
|
||||
#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001L
|
||||
#define D3DPTEXTURECAPS_POW2 0x00000002L
|
||||
#define D3DPTEXTURECAPS_ALPHA 0x00000004L
|
||||
#define D3DPTEXTURECAPS_TRANSPARENCY 0x00000008L
|
||||
#define D3DPTEXTURECAPS_BORDER 0x00000010L
|
||||
#define D3DPTEXTURECAPS_SQUAREONLY 0x00000020L
|
||||
|
||||
/* D3DPRIMCAPS dwTextureFilterCaps */
|
||||
|
||||
#define D3DPTFILTERCAPS_NEAREST 0x00000001L
|
||||
#define D3DPTFILTERCAPS_LINEAR 0x00000002L
|
||||
#define D3DPTFILTERCAPS_MIPNEAREST 0x00000004L
|
||||
#define D3DPTFILTERCAPS_MIPLINEAR 0x00000008L
|
||||
#define D3DPTFILTERCAPS_LINEARMIPNEAREST 0x00000010L
|
||||
#define D3DPTFILTERCAPS_LINEARMIPLINEAR 0x00000020L
|
||||
|
||||
/* D3DPRIMCAPS dwTextureBlendCaps */
|
||||
|
||||
#define D3DPTBLENDCAPS_DECAL 0x00000001L
|
||||
#define D3DPTBLENDCAPS_MODULATE 0x00000002L
|
||||
#define D3DPTBLENDCAPS_DECALALPHA 0x00000004L
|
||||
#define D3DPTBLENDCAPS_MODULATEALPHA 0x00000008L
|
||||
#define D3DPTBLENDCAPS_DECALMASK 0x00000010L
|
||||
#define D3DPTBLENDCAPS_MODULATEMASK 0x00000020L
|
||||
#define D3DPTBLENDCAPS_COPY 0x00000040L
|
||||
#define D3DPTBLENDCAPS_ADD 0x00000080L
|
||||
|
||||
/* D3DPRIMCAPS dwTextureAddressCaps */
|
||||
#define D3DPTADDRESSCAPS_WRAP 0x00000001L
|
||||
#define D3DPTADDRESSCAPS_MIRROR 0x00000002L
|
||||
#define D3DPTADDRESSCAPS_CLAMP 0x00000004L
|
||||
#define D3DPTADDRESSCAPS_BORDER 0x00000008L
|
||||
#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010L
|
||||
|
||||
/*
|
||||
* Description for a device.
|
||||
* This is used to describe a device that is to be created or to query
|
||||
* the current device.
|
||||
*/
|
||||
typedef struct _D3DDeviceDesc {
|
||||
DWORD dwSize; /* Size of D3DDEVICEDESC structure */
|
||||
DWORD dwFlags; /* Indicates which fields have valid data */
|
||||
D3DCOLORMODEL dcmColorModel; /* Color model of device */
|
||||
DWORD dwDevCaps; /* Capabilities of device */
|
||||
D3DTRANSFORMCAPS dtcTransformCaps; /* Capabilities of transform */
|
||||
BOOL bClipping; /* Device can do 3D clipping */
|
||||
D3DLIGHTINGCAPS dlcLightingCaps; /* Capabilities of lighting */
|
||||
D3DPRIMCAPS dpcLineCaps;
|
||||
D3DPRIMCAPS dpcTriCaps;
|
||||
DWORD dwDeviceRenderBitDepth; /* One of DDBB_8, 16, etc.. */
|
||||
DWORD dwDeviceZBufferBitDepth;/* One of DDBD_16, 32, etc.. */
|
||||
DWORD dwMaxBufferSize; /* Maximum execute buffer size */
|
||||
DWORD dwMaxVertexCount; /* Maximum vertex count */
|
||||
// *** New fields for DX5 *** //
|
||||
|
||||
// Width and height caps are 0 for legacy HALs.
|
||||
DWORD dwMinTextureWidth, dwMinTextureHeight;
|
||||
DWORD dwMaxTextureWidth, dwMaxTextureHeight;
|
||||
DWORD dwMinStippleWidth, dwMaxStippleWidth;
|
||||
DWORD dwMinStippleHeight, dwMaxStippleHeight;
|
||||
} D3DDEVICEDESC, *LPD3DDEVICEDESC;
|
||||
|
||||
#define D3DDEVICEDESCSIZE (sizeof(D3DDEVICEDESC))
|
||||
|
||||
typedef HRESULT (FAR PASCAL * LPD3DENUMDEVICESCALLBACK)(LPGUID lpGuid, LPSTR lpDeviceDescription, LPSTR lpDeviceName, LPD3DDEVICEDESC, LPD3DDEVICEDESC, LPVOID);
|
||||
|
||||
/* D3DDEVICEDESC dwFlags indicating valid fields */
|
||||
|
||||
#define D3DDD_COLORMODEL 0x00000001L /* dcmColorModel is valid */
|
||||
#define D3DDD_DEVCAPS 0x00000002L /* dwDevCaps is valid */
|
||||
#define D3DDD_TRANSFORMCAPS 0x00000004L /* dtcTransformCaps is valid */
|
||||
#define D3DDD_LIGHTINGCAPS 0x00000008L /* dlcLightingCaps is valid */
|
||||
#define D3DDD_BCLIPPING 0x00000010L /* bClipping is valid */
|
||||
#define D3DDD_LINECAPS 0x00000020L /* dpcLineCaps is valid */
|
||||
#define D3DDD_TRICAPS 0x00000040L /* dpcTriCaps is valid */
|
||||
#define D3DDD_DEVICERENDERBITDEPTH 0x00000080L /* dwDeviceRenderBitDepth is valid */
|
||||
#define D3DDD_DEVICEZBUFFERBITDEPTH 0x00000100L /* dwDeviceZBufferBitDepth is valid */
|
||||
#define D3DDD_MAXBUFFERSIZE 0x00000200L /* dwMaxBufferSize is valid */
|
||||
#define D3DDD_MAXVERTEXCOUNT 0x00000400L /* dwMaxVertexCount is valid */
|
||||
|
||||
/* D3DDEVICEDESC dwDevCaps flags */
|
||||
|
||||
#define D3DDEVCAPS_FLOATTLVERTEX 0x00000001L /* Device accepts floating point */
|
||||
/* for post-transform vertex data */
|
||||
#define D3DDEVCAPS_SORTINCREASINGZ 0x00000002L /* Device needs data sorted for increasing Z*/
|
||||
#define D3DDEVCAPS_SORTDECREASINGZ 0X00000004L /* Device needs data sorted for decreasing Z*/
|
||||
#define D3DDEVCAPS_SORTEXACT 0x00000008L /* Device needs data sorted exactly */
|
||||
|
||||
#define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010L /* Device can use execute buffers from system memory */
|
||||
#define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020L /* Device can use execute buffers from video memory */
|
||||
#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040L /* Device can use TL buffers from system memory */
|
||||
#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080L /* Device can use TL buffers from video memory */
|
||||
#define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100L /* Device can texture from system memory */
|
||||
#define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200L /* Device can texture from device memory */
|
||||
#define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400L /* Device can draw TLVERTEX primitives */
|
||||
#define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800L /* Device can render without waiting for flip to complete */
|
||||
#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000L /* Device can texture from nonlocal video memory */
|
||||
|
||||
#define D3DFDS_COLORMODEL 0x00000001L /* Match color model */
|
||||
#define D3DFDS_GUID 0x00000002L /* Match guid */
|
||||
#define D3DFDS_HARDWARE 0x00000004L /* Match hardware/software */
|
||||
#define D3DFDS_TRIANGLES 0x00000008L /* Match in triCaps */
|
||||
#define D3DFDS_LINES 0x00000010L /* Match in lineCaps */
|
||||
#define D3DFDS_MISCCAPS 0x00000020L /* Match primCaps.dwMiscCaps */
|
||||
#define D3DFDS_RASTERCAPS 0x00000040L /* Match primCaps.dwRasterCaps */
|
||||
#define D3DFDS_ZCMPCAPS 0x00000080L /* Match primCaps.dwZCmpCaps */
|
||||
#define D3DFDS_ALPHACMPCAPS 0x00000100L /* Match primCaps.dwAlphaCmpCaps */
|
||||
#define D3DFDS_SRCBLENDCAPS 0x00000200L /* Match primCaps.dwSourceBlendCaps */
|
||||
#define D3DFDS_DSTBLENDCAPS 0x00000400L /* Match primCaps.dwDestBlendCaps */
|
||||
#define D3DFDS_SHADECAPS 0x00000800L /* Match primCaps.dwShadeCaps */
|
||||
#define D3DFDS_TEXTURECAPS 0x00001000L /* Match primCaps.dwTextureCaps */
|
||||
#define D3DFDS_TEXTUREFILTERCAPS 0x00002000L /* Match primCaps.dwTextureFilterCaps */
|
||||
#define D3DFDS_TEXTUREBLENDCAPS 0x00004000L /* Match primCaps.dwTextureBlendCaps */
|
||||
#define D3DFDS_TEXTUREADDRESSCAPS 0x00008000L /* Match primCaps.dwTextureBlendCaps */
|
||||
|
||||
/*
|
||||
* FindDevice arguments
|
||||
*/
|
||||
typedef struct _D3DFINDDEVICESEARCH {
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
BOOL bHardware;
|
||||
D3DCOLORMODEL dcmColorModel;
|
||||
GUID guid;
|
||||
DWORD dwCaps;
|
||||
D3DPRIMCAPS dpcPrimCaps;
|
||||
} D3DFINDDEVICESEARCH, *LPD3DFINDDEVICESEARCH;
|
||||
|
||||
typedef struct _D3DFINDDEVICERESULT {
|
||||
DWORD dwSize;
|
||||
GUID guid; /* guid which matched */
|
||||
D3DDEVICEDESC ddHwDesc; /* hardware D3DDEVICEDESC */
|
||||
D3DDEVICEDESC ddSwDesc; /* software D3DDEVICEDESC */
|
||||
} D3DFINDDEVICERESULT, *LPD3DFINDDEVICERESULT;
|
||||
|
||||
|
||||
/*
|
||||
* Description of execute buffer.
|
||||
*/
|
||||
typedef struct _D3DExecuteBufferDesc {
|
||||
DWORD dwSize; /* size of this structure */
|
||||
DWORD dwFlags; /* flags indicating which fields are valid */
|
||||
DWORD dwCaps; /* capabilities of execute buffer */
|
||||
DWORD dwBufferSize; /* size of execute buffer data */
|
||||
LPVOID lpData; /* pointer to actual data */
|
||||
} D3DEXECUTEBUFFERDESC, *LPD3DEXECUTEBUFFERDESC;
|
||||
|
||||
/* D3DEXECUTEBUFFER dwFlags indicating valid fields */
|
||||
|
||||
#define D3DDEB_BUFSIZE 0x00000001l /* buffer size valid */
|
||||
#define D3DDEB_CAPS 0x00000002l /* caps valid */
|
||||
#define D3DDEB_LPDATA 0x00000004l /* lpData valid */
|
||||
|
||||
/* D3DEXECUTEBUFFER dwCaps */
|
||||
|
||||
#define D3DDEBCAPS_SYSTEMMEMORY 0x00000001l /* buffer in system memory */
|
||||
#define D3DDEBCAPS_VIDEOMEMORY 0x00000002l /* buffer in device memory */
|
||||
#define D3DDEBCAPS_MEM (D3DDEBCAPS_SYSTEMMEMORY|D3DDEBCAPS_VIDEOMEMORY)
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif /* _D3DCAPS_H_ */
|
||||
229
3rdparty/dx5/inc/d3drm.h
vendored
Normal file
229
3rdparty/dx5/inc/d3drm.h
vendored
Normal file
@ -0,0 +1,229 @@
|
||||
/*==========================================================================;
|
||||
*
|
||||
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: d3drm.h
|
||||
* Content: Direct3DRM include file
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __D3DRM_H__
|
||||
#define __D3DRM_H__
|
||||
|
||||
#include "ddraw.h"
|
||||
#include "d3drmobj.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
struct IDirect3DRM;
|
||||
#endif
|
||||
|
||||
|
||||
DEFINE_GUID(IID_IDirect3DRM, 0x2bc49361, 0x8327, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
|
||||
DEFINE_GUID(IID_IDirect3DRM2, 0x4516ecc8, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
|
||||
WIN_TYPES(IDirect3DRM, DIRECT3DRM);
|
||||
WIN_TYPES(IDirect3DRM2, DIRECT3DRM2);
|
||||
|
||||
|
||||
/* Create a Direct3DRM API */
|
||||
STDAPI Direct3DRMCreate(LPDIRECT3DRM FAR *lplpDirect3DRM);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3DRM
|
||||
|
||||
DECLARE_INTERFACE_(IDirect3DRM, IUnknown)
|
||||
{
|
||||
IUNKNOWN_METHODS(PURE);
|
||||
|
||||
STDMETHOD(CreateObject)
|
||||
(THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppv) PURE;
|
||||
STDMETHOD(CreateFrame) (THIS_ LPDIRECT3DRMFRAME, LPDIRECT3DRMFRAME *) PURE;
|
||||
STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *) PURE;
|
||||
STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER *) PURE;
|
||||
STDMETHOD(CreateFace) (THIS_ LPDIRECT3DRMFACE *) PURE;
|
||||
STDMETHOD(CreateAnimation) (THIS_ LPDIRECT3DRMANIMATION *) PURE;
|
||||
STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE;
|
||||
STDMETHOD(CreateTexture) (THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE *) PURE;
|
||||
STDMETHOD(CreateLight) (THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
|
||||
STDMETHOD(CreateLightRGB)
|
||||
(THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
|
||||
STDMETHOD(CreateMaterial) (THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL *) PURE;
|
||||
STDMETHOD(CreateDevice) (THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE *) PURE;
|
||||
|
||||
/* Create a Windows Device using DirectDraw surfaces */
|
||||
STDMETHOD(CreateDeviceFromSurface)
|
||||
( THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD,
|
||||
LPDIRECTDRAWSURFACE lpDDSBack, LPDIRECT3DRMDEVICE *
|
||||
) PURE;
|
||||
|
||||
/* Create a Windows Device using D3D objects */
|
||||
STDMETHOD(CreateDeviceFromD3D)
|
||||
( THIS_ LPDIRECT3D lpD3D, LPDIRECT3DDEVICE lpD3DDev,
|
||||
LPDIRECT3DRMDEVICE *
|
||||
) PURE;
|
||||
|
||||
STDMETHOD(CreateDeviceFromClipper)
|
||||
( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID,
|
||||
int width, int height, LPDIRECT3DRMDEVICE *) PURE;
|
||||
|
||||
STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DRMTEXTURE *) PURE;
|
||||
|
||||
STDMETHOD(CreateShadow)
|
||||
( THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMLIGHT,
|
||||
D3DVALUE px, D3DVALUE py, D3DVALUE pz,
|
||||
D3DVALUE nx, D3DVALUE ny, D3DVALUE nz,
|
||||
LPDIRECT3DRMVISUAL *
|
||||
) PURE;
|
||||
STDMETHOD(CreateViewport)
|
||||
( THIS_ LPDIRECT3DRMDEVICE, LPDIRECT3DRMFRAME, DWORD, DWORD,
|
||||
DWORD, DWORD, LPDIRECT3DRMVIEWPORT *
|
||||
) PURE;
|
||||
STDMETHOD(CreateWrap)
|
||||
( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME,
|
||||
D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
|
||||
D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
|
||||
D3DVALUE ux, D3DVALUE uy, D3DVALUE uz,
|
||||
D3DVALUE ou, D3DVALUE ov,
|
||||
D3DVALUE su, D3DVALUE sv,
|
||||
LPDIRECT3DRMWRAP *
|
||||
) PURE;
|
||||
STDMETHOD(CreateUserVisual) (THIS_ D3DRMUSERVISUALCALLBACK, LPVOID lPArg, LPDIRECT3DRMUSERVISUAL *) PURE;
|
||||
STDMETHOD(LoadTexture) (THIS_ const char *, LPDIRECT3DRMTEXTURE *) PURE;
|
||||
STDMETHOD(LoadTextureFromResource) (THIS_ HRSRC rs, LPDIRECT3DRMTEXTURE *) PURE;
|
||||
|
||||
STDMETHOD(SetSearchPath) (THIS_ LPCSTR) PURE;
|
||||
STDMETHOD(AddSearchPath) (THIS_ LPCSTR) PURE;
|
||||
STDMETHOD(GetSearchPath) (THIS_ DWORD *size_return, LPSTR path_return) PURE;
|
||||
STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE;
|
||||
STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE;
|
||||
|
||||
STDMETHOD(GetDevices) (THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE;
|
||||
STDMETHOD(GetNamedObject) (THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE;
|
||||
|
||||
STDMETHOD(EnumerateObjects) (THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE;
|
||||
|
||||
STDMETHOD(Load)
|
||||
( THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS,
|
||||
D3DRMLOADCALLBACK, LPVOID, D3DRMLOADTEXTURECALLBACK, LPVOID,
|
||||
LPDIRECT3DRMFRAME
|
||||
) PURE;
|
||||
STDMETHOD(Tick) (THIS_ D3DVALUE) PURE;
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3DRM2
|
||||
|
||||
DECLARE_INTERFACE_(IDirect3DRM2, IUnknown)
|
||||
{
|
||||
IUNKNOWN_METHODS(PURE);
|
||||
|
||||
STDMETHOD(CreateObject)
|
||||
(THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppv) PURE;
|
||||
STDMETHOD(CreateFrame) (THIS_ LPDIRECT3DRMFRAME, LPDIRECT3DRMFRAME2 *) PURE;
|
||||
STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *) PURE;
|
||||
STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER2 *) PURE;
|
||||
STDMETHOD(CreateFace) (THIS_ LPDIRECT3DRMFACE *) PURE;
|
||||
STDMETHOD(CreateAnimation) (THIS_ LPDIRECT3DRMANIMATION *) PURE;
|
||||
STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE;
|
||||
STDMETHOD(CreateTexture) (THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE2 *) PURE;
|
||||
STDMETHOD(CreateLight) (THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
|
||||
STDMETHOD(CreateLightRGB)
|
||||
(THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
|
||||
STDMETHOD(CreateMaterial) (THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL *) PURE;
|
||||
STDMETHOD(CreateDevice) (THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE2 *) PURE;
|
||||
|
||||
/* Create a Windows Device using DirectDraw surfaces */
|
||||
STDMETHOD(CreateDeviceFromSurface)
|
||||
( THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD,
|
||||
LPDIRECTDRAWSURFACE lpDDSBack, LPDIRECT3DRMDEVICE2 *
|
||||
) PURE;
|
||||
|
||||
/* Create a Windows Device using D3D objects */
|
||||
STDMETHOD(CreateDeviceFromD3D)
|
||||
( THIS_ LPDIRECT3D2 lpD3D, LPDIRECT3DDEVICE2 lpD3DDev,
|
||||
LPDIRECT3DRMDEVICE2 *
|
||||
) PURE;
|
||||
|
||||
STDMETHOD(CreateDeviceFromClipper)
|
||||
( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID,
|
||||
int width, int height, LPDIRECT3DRMDEVICE2 *) PURE;
|
||||
|
||||
STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DRMTEXTURE2 *) PURE;
|
||||
|
||||
STDMETHOD(CreateShadow)
|
||||
( THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMLIGHT,
|
||||
D3DVALUE px, D3DVALUE py, D3DVALUE pz,
|
||||
D3DVALUE nx, D3DVALUE ny, D3DVALUE nz,
|
||||
LPDIRECT3DRMVISUAL *
|
||||
) PURE;
|
||||
STDMETHOD(CreateViewport)
|
||||
( THIS_ LPDIRECT3DRMDEVICE, LPDIRECT3DRMFRAME, DWORD, DWORD,
|
||||
DWORD, DWORD, LPDIRECT3DRMVIEWPORT *
|
||||
) PURE;
|
||||
STDMETHOD(CreateWrap)
|
||||
( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME,
|
||||
D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
|
||||
D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
|
||||
D3DVALUE ux, D3DVALUE uy, D3DVALUE uz,
|
||||
D3DVALUE ou, D3DVALUE ov,
|
||||
D3DVALUE su, D3DVALUE sv,
|
||||
LPDIRECT3DRMWRAP *
|
||||
) PURE;
|
||||
STDMETHOD(CreateUserVisual) (THIS_ D3DRMUSERVISUALCALLBACK, LPVOID lPArg, LPDIRECT3DRMUSERVISUAL *) PURE;
|
||||
STDMETHOD(LoadTexture) (THIS_ const char *, LPDIRECT3DRMTEXTURE2 *) PURE;
|
||||
STDMETHOD(LoadTextureFromResource) (THIS_ HMODULE hModule, LPCTSTR strName, LPCTSTR strType, LPDIRECT3DRMTEXTURE2 *) PURE;
|
||||
|
||||
STDMETHOD(SetSearchPath) (THIS_ LPCSTR) PURE;
|
||||
STDMETHOD(AddSearchPath) (THIS_ LPCSTR) PURE;
|
||||
STDMETHOD(GetSearchPath) (THIS_ DWORD *size_return, LPSTR path_return) PURE;
|
||||
STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE;
|
||||
STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE;
|
||||
|
||||
STDMETHOD(GetDevices) (THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE;
|
||||
STDMETHOD(GetNamedObject) (THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE;
|
||||
|
||||
STDMETHOD(EnumerateObjects) (THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE;
|
||||
|
||||
STDMETHOD(Load)
|
||||
( THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS,
|
||||
D3DRMLOADCALLBACK, LPVOID, D3DRMLOADTEXTURECALLBACK, LPVOID,
|
||||
LPDIRECT3DRMFRAME
|
||||
) PURE;
|
||||
STDMETHOD(Tick) (THIS_ D3DVALUE) PURE;
|
||||
|
||||
STDMETHOD(CreateProgressiveMesh)(THIS_ LPDIRECT3DRMPROGRESSIVEMESH *) PURE;
|
||||
};
|
||||
|
||||
#define D3DRM_OK DD_OK
|
||||
#define D3DRMERR_BADOBJECT MAKE_DDHRESULT(781)
|
||||
#define D3DRMERR_BADTYPE MAKE_DDHRESULT(782)
|
||||
#define D3DRMERR_BADALLOC MAKE_DDHRESULT(783)
|
||||
#define D3DRMERR_FACEUSED MAKE_DDHRESULT(784)
|
||||
#define D3DRMERR_NOTFOUND MAKE_DDHRESULT(785)
|
||||
#define D3DRMERR_NOTDONEYET MAKE_DDHRESULT(786)
|
||||
#define D3DRMERR_FILENOTFOUND MAKE_DDHRESULT(787)
|
||||
#define D3DRMERR_BADFILE MAKE_DDHRESULT(788)
|
||||
#define D3DRMERR_BADDEVICE MAKE_DDHRESULT(789)
|
||||
#define D3DRMERR_BADVALUE MAKE_DDHRESULT(790)
|
||||
#define D3DRMERR_BADMAJORVERSION MAKE_DDHRESULT(791)
|
||||
#define D3DRMERR_BADMINORVERSION MAKE_DDHRESULT(792)
|
||||
#define D3DRMERR_UNABLETOEXECUTE MAKE_DDHRESULT(793)
|
||||
#define D3DRMERR_LIBRARYNOTFOUND MAKE_DDHRESULT(794)
|
||||
#define D3DRMERR_INVALIDLIBRARY MAKE_DDHRESULT(795)
|
||||
#define D3DRMERR_PENDING MAKE_DDHRESULT(796)
|
||||
#define D3DRMERR_NOTENOUGHDATA MAKE_DDHRESULT(797)
|
||||
#define D3DRMERR_REQUESTTOOLARGE MAKE_DDHRESULT(798)
|
||||
#define D3DRMERR_REQUESTTOOSMALL MAKE_DDHRESULT(799)
|
||||
#define D3DRMERR_CONNECTIONLOST MAKE_DDHRESULT(800)
|
||||
#define D3DRMERR_LOADABORTED MAKE_DDHRESULT(801)
|
||||
#define D3DRMERR_NOINTERNET MAKE_DDHRESULT(802)
|
||||
#define D3DRMERR_BADCACHEFILE MAKE_DDHRESULT(803)
|
||||
#define D3DRMERR_BOXNOTSET MAKE_DDHRESULT(804)
|
||||
#define D3DRMERR_BADPMDATA MAKE_DDHRESULT(805)
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* _D3DRMAPI_H_ */
|
||||
|
||||
472
3rdparty/dx5/inc/d3drmdef.h
vendored
Normal file
472
3rdparty/dx5/inc/d3drmdef.h
vendored
Normal file
@ -0,0 +1,472 @@
|
||||
/*==========================================================================;
|
||||
*
|
||||
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: d3drm.h
|
||||
* Content: Direct3DRM include file
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __D3DRMDEFS_H__
|
||||
#define __D3DRMDEFS_H__
|
||||
|
||||
#include <stddef.h>
|
||||
#include "d3dtypes.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#define D3DRMAPI __stdcall
|
||||
#else
|
||||
#define D3DRMAPI
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define FALSE 0
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
typedef struct _D3DRMVECTOR4D
|
||||
{ D3DVALUE x, y, z, w;
|
||||
} D3DRMVECTOR4D, *LPD3DRMVECTOR4D;
|
||||
|
||||
typedef D3DVALUE D3DRMMATRIX4D[4][4];
|
||||
|
||||
typedef struct _D3DRMQUATERNION
|
||||
{ D3DVALUE s;
|
||||
D3DVECTOR v;
|
||||
} D3DRMQUATERNION, *LPD3DRMQUATERNION;
|
||||
|
||||
typedef struct _D3DRMRAY
|
||||
{ D3DVECTOR dvDir;
|
||||
D3DVECTOR dvPos;
|
||||
} D3DRMRAY, *LPD3DRMRAY;
|
||||
|
||||
typedef struct _D3DRMBOX
|
||||
{ D3DVECTOR min, max;
|
||||
} D3DRMBOX, *LPD3DRMBOX;
|
||||
|
||||
typedef void (*D3DRMWRAPCALLBACK)
|
||||
(LPD3DVECTOR, int* u, int* v, LPD3DVECTOR a, LPD3DVECTOR b, LPVOID);
|
||||
|
||||
typedef enum _D3DRMLIGHTTYPE
|
||||
{ D3DRMLIGHT_AMBIENT,
|
||||
D3DRMLIGHT_POINT,
|
||||
D3DRMLIGHT_SPOT,
|
||||
D3DRMLIGHT_DIRECTIONAL,
|
||||
D3DRMLIGHT_PARALLELPOINT
|
||||
} D3DRMLIGHTTYPE, *LPD3DRMLIGHTTYPE;
|
||||
|
||||
typedef enum _D3DRMSHADEMODE {
|
||||
D3DRMSHADE_FLAT = 0,
|
||||
D3DRMSHADE_GOURAUD = 1,
|
||||
D3DRMSHADE_PHONG = 2,
|
||||
|
||||
D3DRMSHADE_MASK = 7,
|
||||
D3DRMSHADE_MAX = 8
|
||||
} D3DRMSHADEMODE, *LPD3DRMSHADEMODE;
|
||||
|
||||
typedef enum _D3DRMLIGHTMODE {
|
||||
D3DRMLIGHT_OFF = 0 * D3DRMSHADE_MAX,
|
||||
D3DRMLIGHT_ON = 1 * D3DRMSHADE_MAX,
|
||||
|
||||
D3DRMLIGHT_MASK = 7 * D3DRMSHADE_MAX,
|
||||
D3DRMLIGHT_MAX = 8 * D3DRMSHADE_MAX
|
||||
} D3DRMLIGHTMODE, *LPD3DRMLIGHTMODE;
|
||||
|
||||
typedef enum _D3DRMFILLMODE {
|
||||
D3DRMFILL_POINTS = 0 * D3DRMLIGHT_MAX,
|
||||
D3DRMFILL_WIREFRAME = 1 * D3DRMLIGHT_MAX,
|
||||
D3DRMFILL_SOLID = 2 * D3DRMLIGHT_MAX,
|
||||
|
||||
D3DRMFILL_MASK = 7 * D3DRMLIGHT_MAX,
|
||||
D3DRMFILL_MAX = 8 * D3DRMLIGHT_MAX
|
||||
} D3DRMFILLMODE, *LPD3DRMFILLMODE;
|
||||
|
||||
typedef DWORD D3DRMRENDERQUALITY, *LPD3DRMRENDERQUALITY;
|
||||
|
||||
#define D3DRMRENDER_WIREFRAME (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_WIREFRAME)
|
||||
#define D3DRMRENDER_UNLITFLAT (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_SOLID)
|
||||
#define D3DRMRENDER_FLAT (D3DRMSHADE_FLAT+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
|
||||
#define D3DRMRENDER_GOURAUD (D3DRMSHADE_GOURAUD+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
|
||||
#define D3DRMRENDER_PHONG (D3DRMSHADE_PHONG+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
|
||||
|
||||
#define D3DRMRENDERMODE_BLENDEDTRANSPARENCY 1
|
||||
#define D3DRMRENDERMODE_SORTEDTRANSPARENCY 2
|
||||
|
||||
typedef enum _D3DRMTEXTUREQUALITY
|
||||
{ D3DRMTEXTURE_NEAREST, /* choose nearest texel */
|
||||
D3DRMTEXTURE_LINEAR, /* interpolate 4 texels */
|
||||
D3DRMTEXTURE_MIPNEAREST, /* nearest texel in nearest mipmap */
|
||||
D3DRMTEXTURE_MIPLINEAR, /* interpolate 2 texels from 2 mipmaps */
|
||||
D3DRMTEXTURE_LINEARMIPNEAREST, /* interpolate 4 texels in nearest mipmap */
|
||||
D3DRMTEXTURE_LINEARMIPLINEAR /* interpolate 8 texels from 2 mipmaps */
|
||||
} D3DRMTEXTUREQUALITY, *LPD3DRMTEXTUREQUALITY;
|
||||
|
||||
typedef enum _D3DRMCOMBINETYPE
|
||||
{ D3DRMCOMBINE_REPLACE,
|
||||
D3DRMCOMBINE_BEFORE,
|
||||
D3DRMCOMBINE_AFTER
|
||||
} D3DRMCOMBINETYPE, *LPD3DRMCOMBINETYPE;
|
||||
|
||||
typedef D3DCOLORMODEL D3DRMCOLORMODEL, *LPD3DRMCOLORMODEL;
|
||||
|
||||
typedef enum _D3DRMPALETTEFLAGS
|
||||
{ D3DRMPALETTE_FREE, /* renderer may use this entry freely */
|
||||
D3DRMPALETTE_READONLY, /* fixed but may be used by renderer */
|
||||
D3DRMPALETTE_RESERVED /* may not be used by renderer */
|
||||
} D3DRMPALETTEFLAGS, *LPD3DRMPALETTEFLAGS;
|
||||
|
||||
typedef struct _D3DRMPALETTEENTRY
|
||||
{ unsigned char red; /* 0 .. 255 */
|
||||
unsigned char green; /* 0 .. 255 */
|
||||
unsigned char blue; /* 0 .. 255 */
|
||||
unsigned char flags; /* one of D3DRMPALETTEFLAGS */
|
||||
} D3DRMPALETTEENTRY, *LPD3DRMPALETTEENTRY;
|
||||
|
||||
typedef struct _D3DRMIMAGE
|
||||
{ int width, height; /* width and height in pixels */
|
||||
int aspectx, aspecty; /* aspect ratio for non-square pixels */
|
||||
int depth; /* bits per pixel */
|
||||
int rgb; /* if false, pixels are indices into a
|
||||
palette otherwise, pixels encode
|
||||
RGB values. */
|
||||
int bytes_per_line; /* number of bytes of memory for a
|
||||
scanline. This must be a multiple
|
||||
of 4. */
|
||||
void* buffer1; /* memory to render into (first buffer). */
|
||||
void* buffer2; /* second rendering buffer for double
|
||||
buffering, set to NULL for single
|
||||
buffering. */
|
||||
unsigned long red_mask;
|
||||
unsigned long green_mask;
|
||||
unsigned long blue_mask;
|
||||
unsigned long alpha_mask; /* if rgb is true, these are masks for
|
||||
the red, green and blue parts of a
|
||||
pixel. Otherwise, these are masks
|
||||
for the significant bits of the
|
||||
red, green and blue elements in the
|
||||
palette. For instance, most SVGA
|
||||
displays use 64 intensities of red,
|
||||
green and blue, so the masks should
|
||||
all be set to 0xfc. */
|
||||
int palette_size; /* number of entries in palette */
|
||||
D3DRMPALETTEENTRY* palette; /* description of the palette (only if
|
||||
rgb is false). Must be (1<<depth)
|
||||
elements. */
|
||||
} D3DRMIMAGE, *LPD3DRMIMAGE;
|
||||
|
||||
typedef enum _D3DRMWRAPTYPE
|
||||
{ D3DRMWRAP_FLAT,
|
||||
D3DRMWRAP_CYLINDER,
|
||||
D3DRMWRAP_SPHERE,
|
||||
D3DRMWRAP_CHROME
|
||||
} D3DRMWRAPTYPE, *LPD3DRMWRAPTYPE;
|
||||
|
||||
#define D3DRMWIREFRAME_CULL 1 /* cull backfaces */
|
||||
#define D3DRMWIREFRAME_HIDDENLINE 2 /* lines are obscured by closer objects */
|
||||
|
||||
typedef enum _D3DRMPROJECTIONTYPE
|
||||
{ D3DRMPROJECT_PERSPECTIVE,
|
||||
D3DRMPROJECT_ORTHOGRAPHIC,
|
||||
D3DRMPROJECT_RIGHTHANDPERSPECTIVE,
|
||||
D3DRMPROJECT_RIGHTHANDORTHOGRAPHIC
|
||||
} D3DRMPROJECTIONTYPE, *LPD3DRMPROJECTIONTYPE;
|
||||
|
||||
typedef enum _D3DRMXOFFORMAT
|
||||
{ D3DRMXOF_BINARY,
|
||||
D3DRMXOF_COMPRESSED,
|
||||
D3DRMXOF_TEXT
|
||||
} D3DRMXOFFORMAT, *LPD3DRMXOFFORMAT;
|
||||
|
||||
typedef DWORD D3DRMSAVEOPTIONS;
|
||||
#define D3DRMXOFSAVE_NORMALS 1
|
||||
#define D3DRMXOFSAVE_TEXTURECOORDINATES 2
|
||||
#define D3DRMXOFSAVE_MATERIALS 4
|
||||
#define D3DRMXOFSAVE_TEXTURENAMES 8
|
||||
#define D3DRMXOFSAVE_ALL 15
|
||||
#define D3DRMXOFSAVE_TEMPLATES 16
|
||||
#define D3DRMXOFSAVE_TEXTURETOPOLOGY 32
|
||||
|
||||
typedef enum _D3DRMCOLORSOURCE
|
||||
{ D3DRMCOLOR_FROMFACE,
|
||||
D3DRMCOLOR_FROMVERTEX
|
||||
} D3DRMCOLORSOURCE, *LPD3DRMCOLORSOURCE;
|
||||
|
||||
typedef enum _D3DRMFRAMECONSTRAINT
|
||||
{ D3DRMCONSTRAIN_Z, /* use only X and Y rotations */
|
||||
D3DRMCONSTRAIN_Y, /* use only X and Z rotations */
|
||||
D3DRMCONSTRAIN_X /* use only Y and Z rotations */
|
||||
} D3DRMFRAMECONSTRAINT, *LPD3DRMFRAMECONSTRAINT;
|
||||
|
||||
typedef enum _D3DRMMATERIALMODE
|
||||
{ D3DRMMATERIAL_FROMMESH,
|
||||
D3DRMMATERIAL_FROMPARENT,
|
||||
D3DRMMATERIAL_FROMFRAME
|
||||
} D3DRMMATERIALMODE, *LPD3DRMMATERIALMODE;
|
||||
|
||||
typedef enum _D3DRMFOGMODE
|
||||
{ D3DRMFOG_LINEAR, /* linear between start and end */
|
||||
D3DRMFOG_EXPONENTIAL, /* density * exp(-distance) */
|
||||
D3DRMFOG_EXPONENTIALSQUARED /* density * exp(-distance*distance) */
|
||||
} D3DRMFOGMODE, *LPD3DRMFOGMODE;
|
||||
|
||||
typedef enum _D3DRMZBUFFERMODE {
|
||||
D3DRMZBUFFER_FROMPARENT, /* default */
|
||||
D3DRMZBUFFER_ENABLE, /* enable zbuffering */
|
||||
D3DRMZBUFFER_DISABLE /* disable zbuffering */
|
||||
} D3DRMZBUFFERMODE, *LPD3DRMZBUFFERMODE;
|
||||
|
||||
typedef enum _D3DRMSORTMODE {
|
||||
D3DRMSORT_FROMPARENT, /* default */
|
||||
D3DRMSORT_NONE, /* don't sort child frames */
|
||||
D3DRMSORT_FRONTTOBACK, /* sort child frames front-to-back */
|
||||
D3DRMSORT_BACKTOFRONT /* sort child frames back-to-front */
|
||||
} D3DRMSORTMODE, *LPD3DRMSORTMODE;
|
||||
|
||||
/*
|
||||
* Values for flags in Frame2::AddMoveCallback.
|
||||
*/
|
||||
#define D3DRMCALLBACK_PREORDER 0
|
||||
#define D3DRMCALLBACK_POSTORDER 1
|
||||
|
||||
/*
|
||||
* Values for flags in MeshBuilder2::RayPick.
|
||||
*/
|
||||
#define D3DRMRAYPICK_ONLYBOUNDINGBOXES 1
|
||||
#define D3DRMRAYPICK_IGNOREFURTHERPRIMITIVES 2
|
||||
#define D3DRMRAYPICK_INTERPOLATEUV 4
|
||||
#define D3DRMRAYPICK_INTERPOLATECOLOR 8
|
||||
#define D3DRMRAYPICK_INTERPOLATENORMAL 0x10
|
||||
|
||||
/*
|
||||
* Values for flags in MeshBuilder2::GenerateNormals.
|
||||
*/
|
||||
#define D3DRMGENERATENORMALS_PRECOMPACT 1
|
||||
#define D3DRMGENERATENORMALS_USECREASEANGLE 2
|
||||
|
||||
typedef DWORD D3DRMANIMATIONOPTIONS;
|
||||
#define D3DRMANIMATION_OPEN 0x01L
|
||||
#define D3DRMANIMATION_CLOSED 0x02L
|
||||
#define D3DRMANIMATION_LINEARPOSITION 0x04L
|
||||
#define D3DRMANIMATION_SPLINEPOSITION 0x08L
|
||||
#define D3DRMANIMATION_SCALEANDROTATION 0x00000010L
|
||||
#define D3DRMANIMATION_POSITION 0x00000020L
|
||||
|
||||
typedef DWORD D3DRMINTERPOLATIONOPTIONS;
|
||||
#define D3DRMINTERPOLATION_OPEN 0x01L
|
||||
#define D3DRMINTERPOLATION_CLOSED 0x02L
|
||||
#define D3DRMINTERPOLATION_NEAREST 0x0100L
|
||||
#define D3DRMINTERPOLATION_LINEAR 0x04L
|
||||
#define D3DRMINTERPOLATION_SPLINE 0x08L
|
||||
#define D3DRMINTERPOLATION_VERTEXCOLOR 0x40L
|
||||
#define D3DRMINTERPOLATION_SLERPNORMALS 0x80L
|
||||
|
||||
typedef DWORD D3DRMLOADOPTIONS;
|
||||
|
||||
#define D3DRMLOAD_FROMFILE 0x00L
|
||||
#define D3DRMLOAD_FROMRESOURCE 0x01L
|
||||
#define D3DRMLOAD_FROMMEMORY 0x02L
|
||||
#define D3DRMLOAD_FROMSTREAM 0x04L
|
||||
#define D3DRMLOAD_FROMURL 0x08L
|
||||
|
||||
#define D3DRMLOAD_BYNAME 0x10L
|
||||
#define D3DRMLOAD_BYPOSITION 0x20L
|
||||
#define D3DRMLOAD_BYGUID 0x40L
|
||||
#define D3DRMLOAD_FIRST 0x80L
|
||||
|
||||
#define D3DRMLOAD_INSTANCEBYREFERENCE 0x100L
|
||||
#define D3DRMLOAD_INSTANCEBYCOPYING 0x200L
|
||||
|
||||
#define D3DRMLOAD_ASYNCHRONOUS 0x400L
|
||||
|
||||
typedef struct _D3DRMLOADRESOURCE {
|
||||
HMODULE hModule;
|
||||
LPCTSTR lpName;
|
||||
LPCTSTR lpType;
|
||||
} D3DRMLOADRESOURCE, *LPD3DRMLOADRESOURCE;
|
||||
|
||||
typedef struct _D3DRMLOADMEMORY {
|
||||
LPVOID lpMemory;
|
||||
DWORD dSize;
|
||||
} D3DRMLOADMEMORY, *LPD3DRMLOADMEMORY;
|
||||
|
||||
#define D3DRMPMESHSTATUS_VALID 0x01L
|
||||
#define D3DRMPMESHSTATUS_INTERRUPTED 0x02L
|
||||
#define D3DRMPMESHSTATUS_BASEMESHCOMPLETE 0x04L
|
||||
#define D3DRMPMESHSTATUS_COMPLETE 0x08L
|
||||
#define D3DRMPMESHSTATUS_RENDERABLE 0x10L
|
||||
|
||||
#define D3DRMPMESHEVENT_BASEMESH 0x01L
|
||||
#define D3DRMPMESHEVENT_COMPLETE 0x02L
|
||||
|
||||
typedef struct _D3DRMPMESHLOADSTATUS {
|
||||
DWORD dwSize; // Size of this structure
|
||||
DWORD dwPMeshSize; // Total Size (bytes)
|
||||
DWORD dwBaseMeshSize; // Total Size of the Base Mesh
|
||||
DWORD dwBytesLoaded; // Total bytes loaded
|
||||
DWORD dwVerticesLoaded; // Number of vertices loaded
|
||||
DWORD dwFacesLoaded; // Number of faces loaded
|
||||
HRESULT dwLoadResult; // Result of the load operation
|
||||
DWORD dwFlags;
|
||||
} D3DRMPMESHLOADSTATUS, *LPD3DRMPMESHLOADSTATUS;
|
||||
|
||||
typedef enum _D3DRMUSERVISUALREASON {
|
||||
D3DRMUSERVISUAL_CANSEE,
|
||||
D3DRMUSERVISUAL_RENDER
|
||||
} D3DRMUSERVISUALREASON, *LPD3DRMUSERVISUALREASON;
|
||||
|
||||
|
||||
typedef DWORD D3DRMMAPPING, D3DRMMAPPINGFLAG, *LPD3DRMMAPPING;
|
||||
static const D3DRMMAPPINGFLAG D3DRMMAP_WRAPU = 1;
|
||||
static const D3DRMMAPPINGFLAG D3DRMMAP_WRAPV = 2;
|
||||
static const D3DRMMAPPINGFLAG D3DRMMAP_PERSPCORRECT = 4;
|
||||
|
||||
typedef struct _D3DRMVERTEX
|
||||
{ D3DVECTOR position;
|
||||
D3DVECTOR normal;
|
||||
D3DVALUE tu, tv;
|
||||
D3DCOLOR color;
|
||||
} D3DRMVERTEX, *LPD3DRMVERTEX;
|
||||
|
||||
typedef LONG D3DRMGROUPINDEX; /* group indexes begin a 0 */
|
||||
static const D3DRMGROUPINDEX D3DRMGROUP_ALLGROUPS = -1;
|
||||
|
||||
/*
|
||||
* Create a color from three components in the range 0-1 inclusive.
|
||||
*/
|
||||
extern D3DCOLOR D3DRMAPI D3DRMCreateColorRGB(D3DVALUE red,
|
||||
D3DVALUE green,
|
||||
D3DVALUE blue);
|
||||
|
||||
/*
|
||||
* Create a color from four components in the range 0-1 inclusive.
|
||||
*/
|
||||
extern D3DCOLOR D3DRMAPI D3DRMCreateColorRGBA(D3DVALUE red,
|
||||
D3DVALUE green,
|
||||
D3DVALUE blue,
|
||||
D3DVALUE alpha);
|
||||
|
||||
/*
|
||||
* Get the red component of a color.
|
||||
*/
|
||||
extern D3DVALUE D3DRMAPI D3DRMColorGetRed(D3DCOLOR);
|
||||
|
||||
/*
|
||||
* Get the green component of a color.
|
||||
*/
|
||||
extern D3DVALUE D3DRMAPI D3DRMColorGetGreen(D3DCOLOR);
|
||||
|
||||
/*
|
||||
* Get the blue component of a color.
|
||||
*/
|
||||
extern D3DVALUE D3DRMAPI D3DRMColorGetBlue(D3DCOLOR);
|
||||
|
||||
/*
|
||||
* Get the alpha component of a color.
|
||||
*/
|
||||
extern D3DVALUE D3DRMAPI D3DRMColorGetAlpha(D3DCOLOR);
|
||||
|
||||
/*
|
||||
* Add two vectors. Returns its first argument.
|
||||
*/
|
||||
extern LPD3DVECTOR D3DRMAPI D3DRMVectorAdd(LPD3DVECTOR d,
|
||||
LPD3DVECTOR s1,
|
||||
LPD3DVECTOR s2);
|
||||
|
||||
/*
|
||||
* Subtract two vectors. Returns its first argument.
|
||||
*/
|
||||
extern LPD3DVECTOR D3DRMAPI D3DRMVectorSubtract(LPD3DVECTOR d,
|
||||
LPD3DVECTOR s1,
|
||||
LPD3DVECTOR s2);
|
||||
/*
|
||||
* Reflect a ray about a given normal. Returns its first argument.
|
||||
*/
|
||||
extern LPD3DVECTOR D3DRMAPI D3DRMVectorReflect(LPD3DVECTOR d,
|
||||
LPD3DVECTOR ray,
|
||||
LPD3DVECTOR norm);
|
||||
|
||||
/*
|
||||
* Calculate the vector cross product. Returns its first argument.
|
||||
*/
|
||||
extern LPD3DVECTOR D3DRMAPI D3DRMVectorCrossProduct(LPD3DVECTOR d,
|
||||
LPD3DVECTOR s1,
|
||||
LPD3DVECTOR s2);
|
||||
/*
|
||||
* Return the vector dot product.
|
||||
*/
|
||||
extern D3DVALUE D3DRMAPI D3DRMVectorDotProduct(LPD3DVECTOR s1,
|
||||
LPD3DVECTOR s2);
|
||||
|
||||
/*
|
||||
* Scale a vector so that its modulus is 1. Returns its argument or
|
||||
* NULL if there was an error (e.g. a zero vector was passed).
|
||||
*/
|
||||
extern LPD3DVECTOR D3DRMAPI D3DRMVectorNormalize(LPD3DVECTOR);
|
||||
#define D3DRMVectorNormalise D3DRMVectorNormalize
|
||||
|
||||
/*
|
||||
* Return the length of a vector (e.g. sqrt(x*x + y*y + z*z)).
|
||||
*/
|
||||
extern D3DVALUE D3DRMAPI D3DRMVectorModulus(LPD3DVECTOR v);
|
||||
|
||||
/*
|
||||
* Set the rotation part of a matrix to be a rotation of theta radians
|
||||
* around the given axis.
|
||||
*/
|
||||
|
||||
extern LPD3DVECTOR D3DRMAPI D3DRMVectorRotate(LPD3DVECTOR r, LPD3DVECTOR v, LPD3DVECTOR axis, D3DVALUE theta);
|
||||
|
||||
/*
|
||||
* Scale a vector uniformly in all three axes
|
||||
*/
|
||||
extern LPD3DVECTOR D3DRMAPI D3DRMVectorScale(LPD3DVECTOR d, LPD3DVECTOR s, D3DVALUE factor);
|
||||
|
||||
/*
|
||||
* Return a random unit vector
|
||||
*/
|
||||
extern LPD3DVECTOR D3DRMAPI D3DRMVectorRandom(LPD3DVECTOR d);
|
||||
|
||||
/*
|
||||
* Returns a unit quaternion that represents a rotation of theta radians
|
||||
* around the given axis.
|
||||
*/
|
||||
|
||||
extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionFromRotation(LPD3DRMQUATERNION quat,
|
||||
LPD3DVECTOR v,
|
||||
D3DVALUE theta);
|
||||
|
||||
/*
|
||||
* Calculate the product of two quaternions
|
||||
*/
|
||||
extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionMultiply(LPD3DRMQUATERNION q,
|
||||
LPD3DRMQUATERNION a,
|
||||
LPD3DRMQUATERNION b);
|
||||
|
||||
/*
|
||||
* Interpolate between two quaternions
|
||||
*/
|
||||
extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionSlerp(LPD3DRMQUATERNION q,
|
||||
LPD3DRMQUATERNION a,
|
||||
LPD3DRMQUATERNION b,
|
||||
D3DVALUE alpha);
|
||||
|
||||
/*
|
||||
* Calculate the matrix for the rotation that a unit quaternion represents
|
||||
*/
|
||||
extern void D3DRMAPI D3DRMMatrixFromQuaternion(D3DRMMATRIX4D dmMat, LPD3DRMQUATERNION lpDqQuat);
|
||||
|
||||
/*
|
||||
* Calculate the quaternion that corresponds to a rotation matrix
|
||||
*/
|
||||
extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionFromMatrix(LPD3DRMQUATERNION, D3DRMMATRIX4D);
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
1100
3rdparty/dx5/inc/d3drmobj.h
vendored
Normal file
1100
3rdparty/dx5/inc/d3drmobj.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
48
3rdparty/dx5/inc/d3drmwin.h
vendored
Normal file
48
3rdparty/dx5/inc/d3drmwin.h
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
/*==========================================================================;
|
||||
*
|
||||
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: d3drm.h
|
||||
* Content: Direct3DRM include file
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __D3DRMWIN_H__
|
||||
#define __D3DRMWIN_H__
|
||||
|
||||
#ifndef WIN32
|
||||
#define WIN32
|
||||
#endif
|
||||
|
||||
#include "d3drm.h"
|
||||
#include "ddraw.h"
|
||||
#include "d3d.h"
|
||||
|
||||
/*
|
||||
* GUIDS used by Direct3DRM Windows interface
|
||||
*/
|
||||
DEFINE_GUID(IID_IDirect3DRMWinDevice, 0xc5016cc0, 0xd273, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
|
||||
|
||||
WIN_TYPES(IDirect3DRMWinDevice, DIRECT3DRMWINDEVICE);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3DRMWinDevice
|
||||
|
||||
DECLARE_INTERFACE_(IDirect3DRMWinDevice, IDirect3DRMObject)
|
||||
{
|
||||
IUNKNOWN_METHODS(PURE);
|
||||
IDIRECT3DRMOBJECT_METHODS(PURE);
|
||||
|
||||
/*
|
||||
* IDirect3DRMWinDevice methods
|
||||
*/
|
||||
|
||||
/* Repaint the window with the last frame which was rendered. */
|
||||
STDMETHOD(HandlePaint)(THIS_ HDC hdc) PURE;
|
||||
|
||||
/* Respond to a WM_ACTIVATE message. */
|
||||
STDMETHOD(HandleActivate)(THIS_ WORD wparam) PURE;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
1201
3rdparty/dx5/inc/d3dtypes.h
vendored
Normal file
1201
3rdparty/dx5/inc/d3dtypes.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
240
3rdparty/dx5/inc/d3dvec.inl
vendored
Normal file
240
3rdparty/dx5/inc/d3dvec.inl
vendored
Normal file
@ -0,0 +1,240 @@
|
||||
|
||||
/******************************************************************
|
||||
* *
|
||||
* D3DVec.inl *
|
||||
* *
|
||||
* Float-valued 3D vector class for Direct3D. *
|
||||
* *
|
||||
* Copyright (c) 1996-1997 Microsoft Corp. All rights reserved. *
|
||||
* *
|
||||
******************************************************************/
|
||||
|
||||
#include <math.h>
|
||||
|
||||
// =====================================
|
||||
// Constructors
|
||||
// =====================================
|
||||
|
||||
inline
|
||||
_D3DVECTOR::_D3DVECTOR(D3DVALUE f)
|
||||
{
|
||||
x = y = z = f;
|
||||
}
|
||||
|
||||
inline
|
||||
_D3DVECTOR::_D3DVECTOR(D3DVALUE _x, D3DVALUE _y, D3DVALUE _z)
|
||||
{
|
||||
x = _x; y = _y; z = _z;
|
||||
}
|
||||
|
||||
inline
|
||||
_D3DVECTOR::_D3DVECTOR(const D3DVALUE f[3])
|
||||
{
|
||||
x = f[0]; y = f[1]; z = f[2];
|
||||
}
|
||||
|
||||
// =====================================
|
||||
// Access grants
|
||||
// =====================================
|
||||
|
||||
inline const D3DVALUE&
|
||||
_D3DVECTOR::operator[](int i) const
|
||||
{
|
||||
return (&x)[i];
|
||||
}
|
||||
|
||||
inline D3DVALUE&
|
||||
_D3DVECTOR::operator[](int i)
|
||||
{
|
||||
return (&x)[i];
|
||||
}
|
||||
|
||||
|
||||
// =====================================
|
||||
// Assignment operators
|
||||
// =====================================
|
||||
|
||||
inline _D3DVECTOR&
|
||||
_D3DVECTOR::operator += (const _D3DVECTOR& v)
|
||||
{
|
||||
x += v.x; y += v.y; z += v.z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR&
|
||||
_D3DVECTOR::operator -= (const _D3DVECTOR& v)
|
||||
{
|
||||
x -= v.x; y -= v.y; z -= v.z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR&
|
||||
_D3DVECTOR::operator *= (const _D3DVECTOR& v)
|
||||
{
|
||||
x *= v.x; y *= v.y; z *= v.z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR&
|
||||
_D3DVECTOR::operator /= (const _D3DVECTOR& v)
|
||||
{
|
||||
x /= v.x; y /= v.y; z /= v.z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR&
|
||||
_D3DVECTOR::operator *= (D3DVALUE s)
|
||||
{
|
||||
x *= s; y *= s; z *= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR&
|
||||
_D3DVECTOR::operator /= (D3DVALUE s)
|
||||
{
|
||||
x /= s; y /= s; z /= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
operator + (const _D3DVECTOR& v)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
operator - (const _D3DVECTOR& v)
|
||||
{
|
||||
return _D3DVECTOR(-v.x, -v.y, -v.z);
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
operator + (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return _D3DVECTOR(v1.x+v2.x, v1.y+v2.y, v1.z+v2.z);
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
operator - (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return _D3DVECTOR(v1.x-v2.x, v1.y-v2.y, v1.z-v2.z);
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
operator * (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return _D3DVECTOR(v1.x*v2.x, v1.y*v2.y, v1.z*v2.z);
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
operator / (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return _D3DVECTOR(v1.x/v2.x, v1.y/v2.y, v1.z/v2.z);
|
||||
}
|
||||
|
||||
inline int
|
||||
operator < (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return v1[0] < v2[0] && v1[1] < v2[1] && v1[2] < v2[2];
|
||||
}
|
||||
|
||||
inline int
|
||||
operator <= (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return v1[0] <= v2[0] && v1[1] <= v2[1] && v1[2] <= v2[2];
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
operator * (const _D3DVECTOR& v, D3DVALUE s)
|
||||
{
|
||||
return _D3DVECTOR(s*v.x, s*v.y, s*v.z);
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
operator * (D3DVALUE s, const _D3DVECTOR& v)
|
||||
{
|
||||
return _D3DVECTOR(s*v.x, s*v.y, s*v.z);
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
operator / (const _D3DVECTOR& v, D3DVALUE s)
|
||||
{
|
||||
return _D3DVECTOR(v.x/s, v.y/s, v.z/s);
|
||||
}
|
||||
|
||||
inline int
|
||||
operator == (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return v1.x==v2.x && v1.y==v2.y && v1.z == v2.z;
|
||||
}
|
||||
|
||||
inline D3DVALUE
|
||||
Magnitude (const _D3DVECTOR& v)
|
||||
{
|
||||
return (D3DVALUE) sqrt(SquareMagnitude(v));
|
||||
}
|
||||
|
||||
inline D3DVALUE
|
||||
SquareMagnitude (const _D3DVECTOR& v)
|
||||
{
|
||||
return v.x*v.x + v.y*v.y + v.z*v.z;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
Normalize (const _D3DVECTOR& v)
|
||||
{
|
||||
return v / Magnitude(v);
|
||||
}
|
||||
|
||||
inline D3DVALUE
|
||||
Min (const _D3DVECTOR& v)
|
||||
{
|
||||
D3DVALUE ret = v.x;
|
||||
if (v.y < ret) ret = v.y;
|
||||
if (v.z < ret) ret = v.z;
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline D3DVALUE
|
||||
Max (const _D3DVECTOR& v)
|
||||
{
|
||||
D3DVALUE ret = v.x;
|
||||
if (ret < v.y) ret = v.y;
|
||||
if (ret < v.z) ret = v.z;
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
Minimize (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return _D3DVECTOR( v1[0] < v2[0] ? v1[0] : v2[0],
|
||||
v1[1] < v2[1] ? v1[1] : v2[1],
|
||||
v1[2] < v2[2] ? v1[2] : v2[2]);
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
Maximize (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return _D3DVECTOR( v1[0] > v2[0] ? v1[0] : v2[0],
|
||||
v1[1] > v2[1] ? v1[1] : v2[1],
|
||||
v1[2] > v2[2] ? v1[2] : v2[2]);
|
||||
}
|
||||
|
||||
inline D3DVALUE
|
||||
DotProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return v1.x*v2.x + v1.y * v2.y + v1.z*v2.z;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
CrossProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
_D3DVECTOR result;
|
||||
|
||||
result[0] = v1[1] * v2[2] - v1[2] * v2[1];
|
||||
result[1] = v1[2] * v2[0] - v1[0] * v2[2];
|
||||
result[2] = v1[0] * v2[1] - v1[1] * v2[0];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
3791
3rdparty/dx5/inc/ddraw.h
vendored
Normal file
3791
3rdparty/dx5/inc/ddraw.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1849
3rdparty/dx5/inc/dinput.h
vendored
Normal file
1849
3rdparty/dx5/inc/dinput.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1710
3rdparty/dx5/inc/dplay.h
vendored
Normal file
1710
3rdparty/dx5/inc/dplay.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
627
3rdparty/dx5/inc/dplobby.h
vendored
Normal file
627
3rdparty/dx5/inc/dplobby.h
vendored
Normal file
@ -0,0 +1,627 @@
|
||||
/*==========================================================================;
|
||||
*
|
||||
* Copyright (C) 1996-1997 Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: dplobby.h
|
||||
* Content: DirectPlayLobby include file
|
||||
***************************************************************************/
|
||||
#ifndef __DPLOBBY_INCLUDED__
|
||||
#define __DPLOBBY_INCLUDED__
|
||||
|
||||
#include "dplay.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
* GUIDS used by DirectPlay objects
|
||||
*/
|
||||
|
||||
/* {AF465C71-9588-11cf-A020-00AA006157AC} */
|
||||
DEFINE_GUID(IID_IDirectPlayLobby, 0xaf465c71, 0x9588, 0x11cf, 0xa0, 0x20, 0x0, 0xaa, 0x0, 0x61, 0x57, 0xac);
|
||||
/* {26C66A70-B367-11cf-A024-00AA006157AC} */
|
||||
DEFINE_GUID(IID_IDirectPlayLobbyA, 0x26c66a70, 0xb367, 0x11cf, 0xa0, 0x24, 0x0, 0xaa, 0x0, 0x61, 0x57, 0xac);
|
||||
/* {0194C220-A303-11d0-9C4F-00A0C905425E} */
|
||||
DEFINE_GUID(IID_IDirectPlayLobby2, 0x194c220, 0xa303, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
|
||||
/* {1BB4AF80-A303-11d0-9C4F-00A0C905425E} */
|
||||
DEFINE_GUID(IID_IDirectPlayLobby2A, 0x1bb4af80, 0xa303, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
|
||||
/* {2FE8F810-B2A5-11d0-A787-0000F803ABFC} */
|
||||
DEFINE_GUID(CLSID_DirectPlayLobby, 0x2fe8f810, 0xb2a5, 0x11d0, 0xa7, 0x87, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* IDirectPlayLobby Structures
|
||||
*
|
||||
* Various structures used to invoke DirectPlayLobby.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct IDirectPlayLobby FAR *LPDIRECTPLAYLOBBY;
|
||||
typedef struct IDirectPlayLobby FAR *LPDIRECTPLAYLOBBYA;
|
||||
typedef struct IDirectPlayLobby IDirectPlayLobbyA;
|
||||
|
||||
typedef struct IDirectPlayLobby2 FAR *LPDIRECTPLAYLOBBY2;
|
||||
typedef struct IDirectPlayLobby2 FAR *LPDIRECTPLAYLOBBY2A;
|
||||
typedef struct IDirectPlayLobby2 IDirectPlayLobby2A;
|
||||
|
||||
|
||||
/*
|
||||
* DPLAPPINFO
|
||||
* Used to hold information about a registered DirectPlay
|
||||
* application
|
||||
*/
|
||||
typedef struct DPLAPPINFO
|
||||
{
|
||||
DWORD dwSize; // Size of this structure
|
||||
GUID guidApplication; // GUID of the Application
|
||||
union
|
||||
{
|
||||
LPSTR lpszAppNameA; // Pointer to the Application Name
|
||||
LPWSTR lpszAppName;
|
||||
};
|
||||
|
||||
} DPLAPPINFO, FAR *LPDPLAPPINFO;
|
||||
|
||||
/*
|
||||
* LPCDPLAPPINFO
|
||||
* A constant pointer to DPLAPPINFO
|
||||
*/
|
||||
typedef const DPLAPPINFO FAR *LPCDPLAPPINFO;
|
||||
|
||||
/*
|
||||
* DPCOMPOUNDADDRESSELEMENT
|
||||
*
|
||||
* An array of these is passed to CreateCompoundAddresses()
|
||||
*/
|
||||
typedef struct DPCOMPOUNDADDRESSELEMENT
|
||||
{
|
||||
GUID guidDataType;
|
||||
DWORD dwDataSize;
|
||||
LPVOID lpData;
|
||||
} DPCOMPOUNDADDRESSELEMENT, FAR *LPDPCOMPOUNDADDRESSELEMENT;
|
||||
|
||||
/*
|
||||
* LPCDPCOMPOUNDADDRESSELEMENT
|
||||
* A constant pointer to DPCOMPOUNDADDRESSELEMENT
|
||||
*/
|
||||
typedef const DPCOMPOUNDADDRESSELEMENT FAR *LPCDPCOMPOUNDADDRESSELEMENT;
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Enumeration Method Callback Prototypes
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* Callback for EnumAddress()
|
||||
*/
|
||||
typedef BOOL (FAR PASCAL *LPDPENUMADDRESSCALLBACK)(
|
||||
REFGUID guidDataType,
|
||||
DWORD dwDataSize,
|
||||
LPCVOID lpData,
|
||||
LPVOID lpContext);
|
||||
|
||||
/*
|
||||
* Callback for EnumAddressTypes()
|
||||
*/
|
||||
typedef BOOL (FAR PASCAL *LPDPLENUMADDRESSTYPESCALLBACK)(
|
||||
REFGUID guidDataType,
|
||||
LPVOID lpContext,
|
||||
DWORD dwFlags);
|
||||
|
||||
/*
|
||||
* Callback for EnumLocalApplications()
|
||||
*/
|
||||
typedef BOOL (FAR PASCAL * LPDPLENUMLOCALAPPLICATIONSCALLBACK)(
|
||||
LPCDPLAPPINFO lpAppInfo,
|
||||
LPVOID lpContext,
|
||||
DWORD dwFlags);
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DirectPlayLobby API Prototypes
|
||||
*
|
||||
****************************************************************************/
|
||||
#ifdef UNICODE
|
||||
#define DirectPlayLobbyCreate DirectPlayLobbyCreateW
|
||||
#else
|
||||
#define DirectPlayLobbyCreate DirectPlayLobbyCreateA
|
||||
#endif /* UNICODE */
|
||||
|
||||
extern HRESULT WINAPI DirectPlayLobbyCreateW(LPGUID, LPDIRECTPLAYLOBBY *, IUnknown *, LPVOID, DWORD );
|
||||
extern HRESULT WINAPI DirectPlayLobbyCreateA(LPGUID, LPDIRECTPLAYLOBBYA *, IUnknown *, LPVOID, DWORD );
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* IDirectPlayLobby (and IDirectPlayLobbyA) Interface
|
||||
*
|
||||
****************************************************************************/
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectPlayLobby
|
||||
DECLARE_INTERFACE_( IDirectPlayLobby, IUnknown )
|
||||
{
|
||||
/* IUnknown Methods */
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
/* IDirectPlayLobby Methods */
|
||||
STDMETHOD(Connect) (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown FAR *) PURE;
|
||||
STDMETHOD(CreateAddress) (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE;
|
||||
STDMETHOD(EnumAddress) (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE;
|
||||
STDMETHOD(EnumAddressTypes) (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE;
|
||||
STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE;
|
||||
STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE;
|
||||
STDMETHOD(ReceiveLobbyMessage) (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE;
|
||||
STDMETHOD(RunApplication) (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE) PURE;
|
||||
STDMETHOD(SendLobbyMessage) (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE;
|
||||
STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE;
|
||||
STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE) PURE;
|
||||
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* IDirectPlayLobby2 (and IDirectPlayLobby2A) Interface
|
||||
*
|
||||
****************************************************************************/
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectPlayLobby2
|
||||
DECLARE_INTERFACE_( IDirectPlayLobby2, IDirectPlayLobby )
|
||||
{
|
||||
/* IUnknown Methods */
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
/* IDirectPlayLobby Methods */
|
||||
STDMETHOD(Connect) (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown FAR *) PURE;
|
||||
STDMETHOD(CreateAddress) (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE;
|
||||
STDMETHOD(EnumAddress) (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE;
|
||||
STDMETHOD(EnumAddressTypes) (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE;
|
||||
STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE;
|
||||
STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE;
|
||||
STDMETHOD(ReceiveLobbyMessage) (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE;
|
||||
STDMETHOD(RunApplication) (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE) PURE;
|
||||
STDMETHOD(SendLobbyMessage) (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE;
|
||||
STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE;
|
||||
STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE) PURE;
|
||||
|
||||
/* IDirectPlayLobby2 Methods */
|
||||
STDMETHOD(CreateCompoundAddress)(THIS_ LPCDPCOMPOUNDADDRESSELEMENT,DWORD,LPVOID,LPDWORD) PURE;
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* IDirectPlayLobby interface macros
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
|
||||
#define IDirectPlayLobby_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectPlayLobby_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectPlayLobby_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirectPlayLobby_Connect(p,a,b,c) (p)->lpVtbl->Connect(p,a,b,c)
|
||||
#define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f) (p)->lpVtbl->CreateAddress(p,a,b,c,d,e,f)
|
||||
#define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d) (p)->lpVtbl->CreateCompoundAddress(p,a,b,c,d)
|
||||
#define IDirectPlayLobby_EnumAddress(p,a,b,c,d) (p)->lpVtbl->EnumAddress(p,a,b,c,d)
|
||||
#define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d) (p)->lpVtbl->EnumAddressTypes(p,a,b,c,d)
|
||||
#define IDirectPlayLobby_EnumLocalApplications(p,a,b,c) (p)->lpVtbl->EnumLocalApplications(p,a,b,c)
|
||||
#define IDirectPlayLobby_GetConnectionSettings(p,a,b,c) (p)->lpVtbl->GetConnectionSettings(p,a,b,c)
|
||||
#define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e) (p)->lpVtbl->ReceiveLobbyMessage(p,a,b,c,d,e)
|
||||
#define IDirectPlayLobby_RunApplication(p,a,b,c,d) (p)->lpVtbl->RunApplication(p,a,b,c,d)
|
||||
#define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d) (p)->lpVtbl->SendLobbyMessage(p,a,b,c,d)
|
||||
#define IDirectPlayLobby_SetConnectionSettings(p,a,b,c) (p)->lpVtbl->SetConnectionSettings(p,a,b,c)
|
||||
#define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c) (p)->lpVtbl->SetLobbyMessageEvent(p,a,b,c)
|
||||
|
||||
#else /* C++ */
|
||||
|
||||
#define IDirectPlayLobby_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
||||
#define IDirectPlayLobby_AddRef(p) (p)->AddRef()
|
||||
#define IDirectPlayLobby_Release(p) (p)->Release()
|
||||
#define IDirectPlayLobby_Connect(p,a,b,c) (p)->Connect(a,b,c)
|
||||
#define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f) (p)->CreateAddress(a,b,c,d,e,f)
|
||||
#define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d) (p)->lpVtbl->CreateCompoundAddress(a,b,c,d)
|
||||
#define IDirectPlayLobby_EnumAddress(p,a,b,c,d) (p)->EnumAddress(a,b,c,d)
|
||||
#define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d) (p)->EnumAddressTypes(a,b,c,d)
|
||||
#define IDirectPlayLobby_EnumLocalApplications(p,a,b,c) (p)->EnumLocalApplications(a,b,c)
|
||||
#define IDirectPlayLobby_GetConnectionSettings(p,a,b,c) (p)->GetConnectionSettings(a,b,c)
|
||||
#define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e) (p)->ReceiveLobbyMessage(a,b,c,d,e)
|
||||
#define IDirectPlayLobby_RunApplication(p,a,b,c,d) (p)->RunApplication(a,b,c,d)
|
||||
#define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d) (p)->SendLobbyMessage(a,b,c,d)
|
||||
#define IDirectPlayLobby_SetConnectionSettings(p,a,b,c) (p)->SetConnectionSettings(a,b,c)
|
||||
#define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c) (p)->SetLobbyMessageEvent(a,b,c)
|
||||
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DirectPlayLobby Flags
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* This is a message flag used by ReceiveLobbyMessage. It can be
|
||||
* returned in the dwMessageFlags parameter to indicate a message from
|
||||
* the system.
|
||||
*/
|
||||
#define DPLMSG_SYSTEM 0x00000001
|
||||
|
||||
/*
|
||||
* This is a message flag used by ReceiveLobbyMessage and SendLobbyMessage.
|
||||
* It is used to indicate that the message is a standard lobby message.
|
||||
* DPLMSG_SETPROPERTY, DPLMSG_SETPROPERTYRESPONSE, DPLMSG_GETPROPERTY,
|
||||
* DPLMSG_GETPROPERTYRESPONSE
|
||||
*/
|
||||
#define DPLMSG_STANDARD 0x00000002
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DirectPlayLobby messages and message data structures
|
||||
*
|
||||
* All system messages have a dwMessageFlags value of DPLMSG_SYSTEM returned
|
||||
* from a call to ReceiveLobbyMessage.
|
||||
*
|
||||
* All standard messages have a dwMessageFlags value of DPLMSG_STANDARD returned
|
||||
* from a call to ReceiveLobbyMessage.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* DPLMSG_GENERIC
|
||||
* Generic message structure used to identify the message type.
|
||||
*/
|
||||
typedef struct _DPLMSG_GENERIC
|
||||
{
|
||||
DWORD dwType; // Message type
|
||||
} DPLMSG_GENERIC, FAR *LPDPLMSG_GENERIC;
|
||||
|
||||
/*
|
||||
* DPLMSG_SETPROPERTY
|
||||
* Standard message sent by an application to a lobby to set a
|
||||
* property
|
||||
*/
|
||||
typedef struct _DPLMSG_SETPROPERTY
|
||||
{
|
||||
DWORD dwType; // Message type
|
||||
DWORD dwRequestID; // Request ID (DPL_NOCONFIRMATION if no confirmation desired)
|
||||
GUID guidPlayer; // Player GUID
|
||||
GUID guidPropertyTag; // Property GUID
|
||||
DWORD dwDataSize; // Size of data
|
||||
DWORD dwPropertyData[1]; // Buffer containing data
|
||||
} DPLMSG_SETPROPERTY, FAR *LPDPLMSG_SETPROPERTY;
|
||||
|
||||
#define DPL_NOCONFIRMATION 0
|
||||
|
||||
/*
|
||||
* DPLMSG_SETPROPERTYRESPONSE
|
||||
* Standard message returned by a lobby to confirm a
|
||||
* DPLMSG_SETPROPERTY message.
|
||||
*/
|
||||
typedef struct _DPLMSG_SETPROPERTYRESPONSE
|
||||
{
|
||||
DWORD dwType; // Message type
|
||||
DWORD dwRequestID; // Request ID
|
||||
GUID guidPlayer; // Player GUID
|
||||
GUID guidPropertyTag; // Property GUID
|
||||
HRESULT hr; // Return Code
|
||||
} DPLMSG_SETPROPERTYRESPONSE, FAR *LPDPLMSG_SETPROPERTYRESPONSE;
|
||||
|
||||
/*
|
||||
* DPLMSG_GETPROPERTY
|
||||
* Standard message sent by an application to a lobby to request
|
||||
* the current value of a property
|
||||
*/
|
||||
typedef struct _DPLMSG_GETPROPERTY
|
||||
{
|
||||
DWORD dwType; // Message type
|
||||
DWORD dwRequestID; // Request ID
|
||||
GUID guidPlayer; // Player GUID
|
||||
GUID guidPropertyTag; // Property GUID
|
||||
} DPLMSG_GETPROPERTY, FAR *LPDPLMSG_GETPROPERTY;
|
||||
|
||||
/*
|
||||
* DPLMSG_GETPROPERTYRESPONSE
|
||||
* Standard message returned by a lobby in response to a
|
||||
* DPLMSG_GETPROPERTY message.
|
||||
*/
|
||||
typedef struct _DPLMSG_GETPROPERTYRESPONSE
|
||||
{
|
||||
DWORD dwType; // Message type
|
||||
DWORD dwRequestID; // Request ID
|
||||
GUID guidPlayer; // Player GUID
|
||||
GUID guidPropertyTag; // Property GUID
|
||||
HRESULT hr; // Return Code
|
||||
DWORD dwDataSize; // Size of data
|
||||
DWORD dwPropertyData[1]; // Buffer containing data
|
||||
} DPLMSG_GETPROPERTYRESPONSE, FAR *LPDPLMSG_GETPROPERTYRESPONSE;
|
||||
|
||||
|
||||
/******************************************
|
||||
*
|
||||
* DirectPlay Lobby message dwType values
|
||||
*
|
||||
*****************************************/
|
||||
|
||||
/*
|
||||
* The application has read the connection settings.
|
||||
* It is now O.K. for the lobby client to release
|
||||
* its IDirectPlayLobby interface.
|
||||
*/
|
||||
#define DPLSYS_CONNECTIONSETTINGSREAD 0x00000001
|
||||
|
||||
/*
|
||||
* The application's call to DirectPlayConnect failed
|
||||
*/
|
||||
#define DPLSYS_DPLAYCONNECTFAILED 0x00000002
|
||||
|
||||
/*
|
||||
* The application has created a DirectPlay session.
|
||||
*/
|
||||
#define DPLSYS_DPLAYCONNECTSUCCEEDED 0x00000003
|
||||
|
||||
/*
|
||||
* The application has terminated.
|
||||
*/
|
||||
#define DPLSYS_APPTERMINATED 0x00000004
|
||||
|
||||
/*
|
||||
* The message is a DPLMSG_SETPROPERTY message.
|
||||
*/
|
||||
#define DPLSYS_SETPROPERTY 0x00000005
|
||||
|
||||
/*
|
||||
* The message is a DPLMSG_SETPROPERTYRESPONSE message.
|
||||
*/
|
||||
#define DPLSYS_SETPROPERTYRESPONSE 0x00000006
|
||||
|
||||
/*
|
||||
* The message is a DPLMSG_GETPROPERTY message.
|
||||
*/
|
||||
#define DPLSYS_GETPROPERTY 0x00000007
|
||||
|
||||
/*
|
||||
* The message is a DPLMSG_GETPROPERTYRESPONSE message.
|
||||
*/
|
||||
#define DPLSYS_GETPROPERTYRESPONSE 0x00000008
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DirectPlay defined property GUIDs and associated data structures
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* DPLPROPERTY_MessagesSupported
|
||||
*
|
||||
* Request whether the lobby supports standard. Lobby with respond with either
|
||||
* TRUE or FALSE or may not respond at all.
|
||||
*
|
||||
* Property data is a single BOOL with TRUE or FALSE
|
||||
*/
|
||||
// {762CCDA1-D916-11d0-BA39-00C04FD7ED67}
|
||||
DEFINE_GUID(DPLPROPERTY_MessagesSupported,
|
||||
0x762ccda1, 0xd916, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
|
||||
|
||||
/*
|
||||
* DPLPROPERTY_LobbyGuid
|
||||
*
|
||||
* Request the GUID that identifies the lobby software that the application
|
||||
* is communicating with.
|
||||
*
|
||||
* Property data is a single GUID.
|
||||
*/
|
||||
// {F56920A0-D218-11d0-BA39-00C04FD7ED67}
|
||||
DEFINE_GUID(DPLPROPERTY_LobbyGuid,
|
||||
0xf56920a0, 0xd218, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
|
||||
|
||||
/*
|
||||
* DPLPROPERTY_PlayerGuid
|
||||
*
|
||||
* Request the GUID that identifies the player on this machine for sending
|
||||
* property data back to the lobby.
|
||||
*
|
||||
* Property data is the DPLDATA_PLAYERDATA structure
|
||||
*/
|
||||
// {B4319322-D20D-11d0-BA39-00C04FD7ED67}
|
||||
DEFINE_GUID(DPLPROPERTY_PlayerGuid,
|
||||
0xb4319322, 0xd20d, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
|
||||
|
||||
/*
|
||||
* DPLDATA_PLAYERGUID
|
||||
*
|
||||
* Data structure to hold the GUID of the player and player creation flags
|
||||
* from the lobby.
|
||||
*/
|
||||
typedef struct _DPLDATA_PLAYERGUID
|
||||
{
|
||||
GUID guidPlayer;
|
||||
DWORD dwPlayerFlags;
|
||||
} DPLDATA_PLAYERGUID, FAR *LPDPLDATA_PLAYERGUID;
|
||||
|
||||
/*
|
||||
* DPLPROPERTY_PlayerScore
|
||||
*
|
||||
* Used to send an array of long integers to the lobby indicating the
|
||||
* score of a player.
|
||||
*
|
||||
* Property data is the DPLDATA_PLAYERSCORE structure.
|
||||
*/
|
||||
// {48784000-D219-11d0-BA39-00C04FD7ED67}
|
||||
DEFINE_GUID(DPLPROPERTY_PlayerScore,
|
||||
0x48784000, 0xd219, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
|
||||
|
||||
/*
|
||||
* DPLDATA_PLAYERSCORE
|
||||
*
|
||||
* Data structure to hold an array of long integers representing a player score.
|
||||
* Application must allocate enough memory to hold all the scores.
|
||||
*/
|
||||
typedef struct _DPLDATA_PLAYERSCORE
|
||||
{
|
||||
DWORD dwScoreCount;
|
||||
LONG Score[1];
|
||||
} DPLDATA_PLAYERSCORE, FAR *LPDPLDATA_PLAYERSCORE;
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DirectPlay Address ID's
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* DirectPlay Address
|
||||
*
|
||||
* A DirectPlay address consists of multiple chunks of data, each tagged
|
||||
* with a GUID signifying the type of data in the chunk. The chunk also
|
||||
* has a length so that unknown chunk types can be skipped.
|
||||
*
|
||||
* The EnumAddress() function is used to parse these address data chunks.
|
||||
*/
|
||||
|
||||
/*
|
||||
* DPADDRESS
|
||||
*
|
||||
* Header for block of address data elements
|
||||
*/
|
||||
typedef struct _DPADDRESS
|
||||
{
|
||||
GUID guidDataType;
|
||||
DWORD dwDataSize;
|
||||
} DPADDRESS;
|
||||
|
||||
typedef DPADDRESS FAR *LPDPADDRESS;
|
||||
|
||||
/*
|
||||
* DPAID_TotalSize
|
||||
*
|
||||
* Chunk is a DWORD containing size of entire DPADDRESS structure
|
||||
*/
|
||||
|
||||
// {1318F560-912C-11d0-9DAA-00A0C90A43CB}
|
||||
DEFINE_GUID(DPAID_TotalSize,
|
||||
0x1318f560, 0x912c, 0x11d0, 0x9d, 0xaa, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
|
||||
|
||||
/*
|
||||
* DPAID_ServiceProvider
|
||||
*
|
||||
* Chunk is a GUID describing the service provider that created the chunk.
|
||||
* All addresses must contain this chunk.
|
||||
*/
|
||||
|
||||
// {07D916C0-E0AF-11cf-9C4E-00A0C905425E}
|
||||
DEFINE_GUID(DPAID_ServiceProvider,
|
||||
0x7d916c0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
|
||||
|
||||
/*
|
||||
* DPAID_LobbyProvider
|
||||
*
|
||||
* Chunk is a GUID describing the lobby provider that created the chunk.
|
||||
* All addresses must contain this chunk.
|
||||
*/
|
||||
|
||||
// {59B95640-9667-11d0-A77D-0000F803ABFC}
|
||||
DEFINE_GUID(DPAID_LobbyProvider,
|
||||
0x59b95640, 0x9667, 0x11d0, 0xa7, 0x7d, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
|
||||
|
||||
/*
|
||||
* DPAID_Phone and DPAID_PhoneW
|
||||
*
|
||||
* Chunk is a string containing a phone number (i.e. "1-800-555-1212")
|
||||
* in ANSI or UNICODE format
|
||||
*/
|
||||
|
||||
// {78EC89A0-E0AF-11cf-9C4E-00A0C905425E}
|
||||
DEFINE_GUID(DPAID_Phone,
|
||||
0x78ec89a0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
|
||||
|
||||
// {BA5A7A70-9DBF-11d0-9CC1-00A0C905425E}
|
||||
DEFINE_GUID(DPAID_PhoneW,
|
||||
0xba5a7a70, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
|
||||
|
||||
/*
|
||||
* DPAID_Modem and DPAID_ModemW
|
||||
*
|
||||
* Chunk is a string containing a modem name registered with TAPI
|
||||
* in ANSI or UNICODE format
|
||||
*/
|
||||
|
||||
// {F6DCC200-A2FE-11d0-9C4F-00A0C905425E}
|
||||
DEFINE_GUID(DPAID_Modem,
|
||||
0xf6dcc200, 0xa2fe, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
|
||||
|
||||
// {01FD92E0-A2FF-11d0-9C4F-00A0C905425E}
|
||||
DEFINE_GUID(DPAID_ModemW,
|
||||
0x1fd92e0, 0xa2ff, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
|
||||
|
||||
/*
|
||||
* DPAID_Inet and DPAID_InetW
|
||||
*
|
||||
* Chunk is a string containing a TCP/IP host name or an IP address
|
||||
* (i.e. "dplay.microsoft.com" or "137.55.100.173") in ANSI or UNICODE format
|
||||
*/
|
||||
|
||||
// {C4A54DA0-E0AF-11cf-9C4E-00A0C905425E}
|
||||
DEFINE_GUID(DPAID_INet,
|
||||
0xc4a54da0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
|
||||
|
||||
// {E63232A0-9DBF-11d0-9CC1-00A0C905425E}
|
||||
DEFINE_GUID(DPAID_INetW,
|
||||
0xe63232a0, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
|
||||
|
||||
/*
|
||||
* DPCOMPORTADDRESS
|
||||
*
|
||||
* Used to specify com port settings. The constants that define baud rate,
|
||||
* stop bits and parity are defined in WINBASE.H. The constants for flow
|
||||
* control are given below.
|
||||
*/
|
||||
|
||||
#define DPCPA_NOFLOW 0 // no flow control
|
||||
#define DPCPA_XONXOFFFLOW 1 // software flow control
|
||||
#define DPCPA_RTSFLOW 2 // hardware flow control with RTS
|
||||
#define DPCPA_DTRFLOW 3 // hardware flow control with DTR
|
||||
#define DPCPA_RTSDTRFLOW 4 // hardware flow control with RTS and DTR
|
||||
|
||||
typedef struct _DPCOMPORTADDRESS
|
||||
{
|
||||
DWORD dwComPort; // COM port to use (1-4)
|
||||
DWORD dwBaudRate; // baud rate (100-256k)
|
||||
DWORD dwStopBits; // no. stop bits (1-2)
|
||||
DWORD dwParity; // parity (none, odd, even, mark)
|
||||
DWORD dwFlowControl; // flow control (none, xon/xoff, rts, dtr)
|
||||
} DPCOMPORTADDRESS;
|
||||
|
||||
typedef DPCOMPORTADDRESS FAR *LPDPCOMPORTADDRESS;
|
||||
|
||||
/*
|
||||
* DPAID_ComPort
|
||||
*
|
||||
* Chunk contains a DPCOMPORTADDRESS structure defining the serial port.
|
||||
*/
|
||||
|
||||
// {F2F0CE00-E0AF-11cf-9C4E-00A0C905425E}
|
||||
DEFINE_GUID(DPAID_ComPort,
|
||||
0xf2f0ce00, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* dplobby 1.0 obsolete definitions
|
||||
* Included for compatibility only.
|
||||
*
|
||||
****************************************************************************/
|
||||
#define DPLAD_SYSTEM DPLMSG_SYSTEM
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __DPLOBBY_INCLUDED__ */
|
||||
267
3rdparty/dx5/inc/dsetup.h
vendored
Normal file
267
3rdparty/dx5/inc/dsetup.h
vendored
Normal file
@ -0,0 +1,267 @@
|
||||
/*==========================================================================
|
||||
*
|
||||
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: dsetup.h
|
||||
* Content: DirectXSetup, error codes and flags
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __DSETUP_H__
|
||||
#define __DSETUP_H__
|
||||
|
||||
#include <windows.h> // windows stuff
|
||||
|
||||
#ifdef _WIN32
|
||||
#define COM_NO_WINDOWS_H
|
||||
#include <objbase.h>
|
||||
#else
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// DSETUP Error Codes, must remain compatible with previous setup.
|
||||
#define DSETUPERR_SUCCESS_RESTART 1
|
||||
#define DSETUPERR_SUCCESS 0
|
||||
#define DSETUPERR_BADWINDOWSVERSION -1
|
||||
#define DSETUPERR_SOURCEFILENOTFOUND -2
|
||||
#define DSETUPERR_BADSOURCESIZE -3
|
||||
#define DSETUPERR_BADSOURCETIME -4
|
||||
#define DSETUPERR_NOCOPY -5
|
||||
#define DSETUPERR_OUTOFDISKSPACE -6
|
||||
#define DSETUPERR_CANTFINDINF -7
|
||||
#define DSETUPERR_CANTFINDDIR -8
|
||||
#define DSETUPERR_INTERNAL -9
|
||||
#define DSETUPERR_NTWITHNO3D -10 /* REM: obsolete, you'll never see this */
|
||||
#define DSETUPERR_UNKNOWNOS -11
|
||||
#define DSETUPERR_USERHITCANCEL -12
|
||||
#define DSETUPERR_NOTPREINSTALLEDONNT -13
|
||||
|
||||
// DSETUP flags. DirectX 5.0 apps should use these flags only.
|
||||
#define DSETUP_DDRAWDRV 0x00000008 /* install DirectDraw Drivers */
|
||||
#define DSETUP_DSOUNDDRV 0x00000010 /* install DirectSound Drivers */
|
||||
#define DSETUP_DXCORE 0x00010000 /* install DirectX runtime */
|
||||
#define DSETUP_DIRECTX (DSETUP_DXCORE|DSETUP_DDRAWDRV|DSETUP_DSOUNDDRV)
|
||||
#define DSETUP_TESTINSTALL 0x00020000 /* just test install, don't do anything */
|
||||
|
||||
// These OBSOLETE flags are here for compatibility with pre-DX5 apps only.
|
||||
// They are present to allow DX3 apps to be recompiled with DX5 and still work.
|
||||
// DO NOT USE THEM for DX5. They will go away in future DX releases.
|
||||
#define DSETUP_DDRAW 0x00000001 /* OBSOLETE. install DirectDraw */
|
||||
#define DSETUP_DSOUND 0x00000002 /* OBSOLETE. install DirectSound */
|
||||
#define DSETUP_DPLAY 0x00000004 /* OBSOLETE. install DirectPlay */
|
||||
#define DSETUP_DPLAYSP 0x00000020 /* OBSOLETE. install DirectPlay Providers */
|
||||
#define DSETUP_DVIDEO 0x00000040 /* OBSOLETE. install DirectVideo */
|
||||
#define DSETUP_D3D 0x00000200 /* OBSOLETE. install Direct3D */
|
||||
#define DSETUP_DINPUT 0x00000800 /* OBSOLETE. install DirectInput */
|
||||
#define DSETUP_DIRECTXSETUP 0x00001000 /* OBSOLETE. install DirectXSetup DLL's */
|
||||
#define DSETUP_NOUI 0x00002000 /* OBSOLETE. install DirectX with NO UI */
|
||||
#define DSETUP_PROMPTFORDRIVERS 0x10000000 /* OBSOLETE. prompt when replacing display/audio drivers */
|
||||
#define DSETUP_RESTOREDRIVERS 0x20000000 /* OBSOLETE. restore display/audio drivers */
|
||||
|
||||
|
||||
|
||||
//******************************************************************
|
||||
// DirectX Setup Callback mechanism
|
||||
//******************************************************************
|
||||
|
||||
// DSETUP Message Info Codes, passed to callback as Reason parameter.
|
||||
#define DSETUP_CB_MSG_NOMESSAGE 0
|
||||
#define DSETUP_CB_MSG_CANTINSTALL_UNKNOWNOS 1
|
||||
#define DSETUP_CB_MSG_CANTINSTALL_NT 2
|
||||
#define DSETUP_CB_MSG_CANTINSTALL_BETA 3
|
||||
#define DSETUP_CB_MSG_CANTINSTALL_NOTWIN32 4
|
||||
#define DSETUP_CB_MSG_CANTINSTALL_WRONGLANGUAGE 5
|
||||
#define DSETUP_CB_MSG_CANTINSTALL_WRONGPLATFORM 6
|
||||
#define DSETUP_CB_MSG_PREINSTALL_NT 7
|
||||
#define DSETUP_CB_MSG_NOTPREINSTALLEDONNT 8
|
||||
#define DSETUP_CB_MSG_SETUP_INIT_FAILED 9
|
||||
#define DSETUP_CB_MSG_INTERNAL_ERROR 10
|
||||
#define DSETUP_CB_MSG_CHECK_DRIVER_UPGRADE 11
|
||||
#define DSETUP_CB_MSG_OUTOFDISKSPACE 12
|
||||
#define DSETUP_CB_MSG_BEGIN_INSTALL 13
|
||||
#define DSETUP_CB_MSG_BEGIN_INSTALL_RUNTIME 14
|
||||
#define DSETUP_CB_MSG_BEGIN_INSTALL_DRIVERS 15
|
||||
#define DSETUP_CB_MSG_BEGIN_RESTORE_DRIVERS 16
|
||||
#define DSETUP_CB_MSG_FILECOPYERROR 17
|
||||
|
||||
|
||||
#define DSETUP_CB_UPGRADE_TYPE_MASK 0x000F
|
||||
#define DSETUP_CB_UPGRADE_KEEP 0x0001
|
||||
#define DSETUP_CB_UPGRADE_SAFE 0x0002
|
||||
#define DSETUP_CB_UPGRADE_FORCE 0x0004
|
||||
#define DSETUP_CB_UPGRADE_UNKNOWN 0x0008
|
||||
|
||||
#define DSETUP_CB_UPGRADE_HASWARNINGS 0x0100
|
||||
#define DSETUP_CB_UPGRADE_CANTBACKUP 0x0200
|
||||
|
||||
#define DSETUP_CB_UPGRADE_DEVICE_ACTIVE 0x0800
|
||||
|
||||
#define DSETUP_CB_UPGRADE_DEVICE_DISPLAY 0x1000
|
||||
#define DSETUP_CB_UPGRADE_DEVICE_MEDIA 0x2000
|
||||
|
||||
|
||||
typedef struct _DSETUP_CB_UPGRADEINFO
|
||||
{
|
||||
DWORD UpgradeFlags;
|
||||
} DSETUP_CB_UPGRADEINFO;
|
||||
|
||||
typedef struct _DSETUP_CB_FILECOPYERROR
|
||||
{
|
||||
DWORD dwError;
|
||||
} DSETUP_CB_FILECOPYERROR;
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
//
|
||||
// Data Structures
|
||||
//
|
||||
#ifndef UNICODE_ONLY
|
||||
typedef struct _DIRECTXREGISTERAPPA {
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
LPSTR lpszApplicationName;
|
||||
LPGUID lpGUID;
|
||||
LPSTR lpszFilename;
|
||||
LPSTR lpszCommandLine;
|
||||
LPSTR lpszPath;
|
||||
LPSTR lpszCurrentDirectory;
|
||||
} DIRECTXREGISTERAPPA, *PDIRECTXREGISTERAPPA, *LPDIRECTXREGISTERAPPA;
|
||||
#endif //!UNICODE_ONLY
|
||||
#ifndef ANSI_ONLY
|
||||
typedef struct _DIRECTXREGISTERAPPW {
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
LPWSTR lpszApplicationName;
|
||||
LPGUID lpGUID;
|
||||
LPWSTR lpszFilename;
|
||||
LPWSTR lpszCommandLine;
|
||||
LPWSTR lpszPath;
|
||||
LPWSTR lpszCurrentDirectory;
|
||||
} DIRECTXREGISTERAPPW, *PDIRECTXREGISTERAPPW, *LPDIRECTXREGISTERAPPW;
|
||||
#endif //!ANSI_ONLY
|
||||
#ifdef UNICODE
|
||||
typedef DIRECTXREGISTERAPPW DIRECTXREGISTERAPP;
|
||||
typedef PDIRECTXREGISTERAPPW PDIRECTXREGISTERAPP;
|
||||
typedef LPDIRECTXREGISTERAPPW LPDIRECTXREGISTERAPP;
|
||||
#else
|
||||
typedef DIRECTXREGISTERAPPA DIRECTXREGISTERAPP;
|
||||
typedef PDIRECTXREGISTERAPPA PDIRECTXREGISTERAPP;
|
||||
typedef LPDIRECTXREGISTERAPPA LPDIRECTXREGISTERAPP;
|
||||
#endif // UNICODE
|
||||
|
||||
|
||||
//
|
||||
// API
|
||||
//
|
||||
#ifndef UNICODE_ONLY
|
||||
INT
|
||||
WINAPI
|
||||
DirectXSetupA(
|
||||
HWND hWnd,
|
||||
LPSTR lpszRootPath,
|
||||
DWORD dwFlags
|
||||
);
|
||||
#endif //!UNICODE_ONLY
|
||||
#ifndef ANSI_ONLY
|
||||
INT
|
||||
WINAPI
|
||||
DirectXSetupW(
|
||||
HWND hWnd,
|
||||
LPWSTR lpszRootPath,
|
||||
DWORD dwFlags
|
||||
);
|
||||
#endif //!ANSI_ONLY
|
||||
#ifdef UNICODE
|
||||
#define DirectXSetup DirectXSetupW
|
||||
#else
|
||||
#define DirectXSetup DirectXSetupA
|
||||
#endif // !UNICODE
|
||||
|
||||
#ifndef UNICODE_ONLY
|
||||
INT
|
||||
WINAPI
|
||||
DirectXDeviceDriverSetupA(
|
||||
HWND hWnd,
|
||||
LPSTR lpszDriverClass,
|
||||
LPSTR lpszDriverPath,
|
||||
DWORD dwFlags
|
||||
);
|
||||
#endif //!UNICODE_ONLY
|
||||
#ifndef ANSI_ONLY
|
||||
INT
|
||||
WINAPI
|
||||
DirectXDeviceDriverSetupW(
|
||||
HWND hWnd,
|
||||
LPWSTR lpszDriverClass,
|
||||
LPWSTR lpszDriverPath,
|
||||
DWORD dwFlags
|
||||
);
|
||||
#endif //!ANSI_ONLY
|
||||
#ifdef UNICODE
|
||||
#define DirectXDeviceDriverSetup DirectXDeviceDriverSetupW
|
||||
#else
|
||||
#define DirectXDeviceDriverSetup DirectXDeviceDriverSetupA
|
||||
#endif // !UNICODE
|
||||
|
||||
#ifndef UNICODE_ONLY
|
||||
INT
|
||||
WINAPI
|
||||
DirectXRegisterApplicationA(
|
||||
HWND hWnd,
|
||||
LPDIRECTXREGISTERAPPA lpDXRegApp
|
||||
);
|
||||
#endif //!UNICODE_ONLY
|
||||
#ifndef ANSI_ONLY
|
||||
INT
|
||||
WINAPI
|
||||
DirectXRegisterApplicationW(
|
||||
HWND hWnd,
|
||||
LPDIRECTXREGISTERAPPW lpDXRegApp
|
||||
);
|
||||
#endif //!ANSI_ONLY
|
||||
#ifdef UNICODE
|
||||
#define DirectXRegisterApplication DirectXRegisterApplicationW
|
||||
#else
|
||||
#define DirectXRegisterApplication DirectXRegisterApplicationA
|
||||
#endif // !UNICODE
|
||||
|
||||
INT
|
||||
WINAPI
|
||||
DirectXUnRegisterApplication(
|
||||
HWND hWnd,
|
||||
LPGUID lpGUID
|
||||
);
|
||||
|
||||
//
|
||||
// Function Pointers
|
||||
//
|
||||
#ifdef UNICODE
|
||||
typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPWSTR, DWORD);
|
||||
typedef INT (WINAPI * LPDIRECTXDEVICEDRIVERSETUP)(HWND, LPWSTR, LPSTR, DWORD);
|
||||
typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPDIRECTXREGISTERAPPW);
|
||||
#else
|
||||
typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPSTR, DWORD);
|
||||
typedef INT (WINAPI * LPDIRECTXDEVICEDRIVERSETUP)(HWND, LPSTR, LPSTR, DWORD);
|
||||
typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPDIRECTXREGISTERAPPA);
|
||||
#endif // UNICODE
|
||||
|
||||
typedef DWORD (FAR PASCAL * DSETUP_CALLBACK)(DWORD Reason,
|
||||
DWORD MsgType, /* Same as flags to MessageBox */
|
||||
LPSTR szMessage,
|
||||
LPSTR szName,
|
||||
void *pInfo);
|
||||
|
||||
INT WINAPI DirectXSetupSetCallback(DSETUP_CALLBACK Callback);
|
||||
INT WINAPI DirectXSetupGetVersion(DWORD *lpdwVersion, DWORD *lpdwMinorVersion);
|
||||
|
||||
#endif // WIN32
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
863
3rdparty/dx5/inc/dsound.h
vendored
Normal file
863
3rdparty/dx5/inc/dsound.h
vendored
Normal file
@ -0,0 +1,863 @@
|
||||
/*==========================================================================;
|
||||
*
|
||||
* Copyright (C) 1995,1996 Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: dsound.h
|
||||
* Content: DirectSound include file
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef __DSOUND_INCLUDED__
|
||||
#define __DSOUND_INCLUDED__
|
||||
|
||||
#include <d3dtypes.h>
|
||||
|
||||
#define COM_NO_WINDOWS_H
|
||||
#include <objbase.h>
|
||||
|
||||
#define _FACDS 0x878
|
||||
#define MAKE_DSHRESULT(code) MAKE_HRESULT(1, _FACDS, code)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
// Direct Sound Component GUID {47D4D946-62E8-11cf-93BC-444553540000}
|
||||
DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
|
||||
|
||||
// DirectSound Capture Component GUID {B0210780-89CD-11d0-AF08-00A0C925CD16}
|
||||
DEFINE_GUID(CLSID_DirectSoundCapture, 0xb0210780, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
|
||||
|
||||
//
|
||||
// Structures
|
||||
//
|
||||
|
||||
#ifdef __cplusplus
|
||||
// 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined
|
||||
struct IDirectSound;
|
||||
struct IDirectSoundBuffer;
|
||||
struct IDirectSound3DListener;
|
||||
struct IDirectSound3DBuffer;
|
||||
struct IDirectSoundCapture;
|
||||
struct IDirectSoundCaptureBuffer;
|
||||
struct IDirectSoundNotify;
|
||||
#endif // __cplusplus
|
||||
|
||||
typedef struct IDirectSound *LPDIRECTSOUND;
|
||||
typedef struct IDirectSoundBuffer *LPDIRECTSOUNDBUFFER;
|
||||
typedef struct IDirectSound3DListener *LPDIRECTSOUND3DLISTENER;
|
||||
typedef struct IDirectSound3DBuffer *LPDIRECTSOUND3DBUFFER;
|
||||
typedef struct IDirectSoundCapture *LPDIRECTSOUNDCAPTURE;
|
||||
typedef struct IDirectSoundCaptureBuffer *LPDIRECTSOUNDCAPTUREBUFFER;
|
||||
typedef struct IDirectSoundNotify *LPDIRECTSOUNDNOTIFY;
|
||||
|
||||
typedef struct _DSCAPS
|
||||
{
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
DWORD dwMinSecondarySampleRate;
|
||||
DWORD dwMaxSecondarySampleRate;
|
||||
DWORD dwPrimaryBuffers;
|
||||
DWORD dwMaxHwMixingAllBuffers;
|
||||
DWORD dwMaxHwMixingStaticBuffers;
|
||||
DWORD dwMaxHwMixingStreamingBuffers;
|
||||
DWORD dwFreeHwMixingAllBuffers;
|
||||
DWORD dwFreeHwMixingStaticBuffers;
|
||||
DWORD dwFreeHwMixingStreamingBuffers;
|
||||
DWORD dwMaxHw3DAllBuffers;
|
||||
DWORD dwMaxHw3DStaticBuffers;
|
||||
DWORD dwMaxHw3DStreamingBuffers;
|
||||
DWORD dwFreeHw3DAllBuffers;
|
||||
DWORD dwFreeHw3DStaticBuffers;
|
||||
DWORD dwFreeHw3DStreamingBuffers;
|
||||
DWORD dwTotalHwMemBytes;
|
||||
DWORD dwFreeHwMemBytes;
|
||||
DWORD dwMaxContigFreeHwMemBytes;
|
||||
DWORD dwUnlockTransferRateHwBuffers;
|
||||
DWORD dwPlayCpuOverheadSwBuffers;
|
||||
DWORD dwReserved1;
|
||||
DWORD dwReserved2;
|
||||
} DSCAPS, *LPDSCAPS;
|
||||
|
||||
typedef const DSCAPS *LPCDSCAPS;
|
||||
|
||||
typedef struct _DSBCAPS
|
||||
{
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
DWORD dwBufferBytes;
|
||||
DWORD dwUnlockTransferRate;
|
||||
DWORD dwPlayCpuOverhead;
|
||||
} DSBCAPS, *LPDSBCAPS;
|
||||
|
||||
typedef const DSBCAPS *LPCDSBCAPS;
|
||||
|
||||
typedef struct _DSBUFFERDESC
|
||||
{
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
DWORD dwBufferBytes;
|
||||
DWORD dwReserved;
|
||||
LPWAVEFORMATEX lpwfxFormat;
|
||||
} DSBUFFERDESC, *LPDSBUFFERDESC;
|
||||
|
||||
typedef const DSBUFFERDESC *LPCDSBUFFERDESC;
|
||||
|
||||
typedef struct _DS3DBUFFER
|
||||
{
|
||||
DWORD dwSize;
|
||||
D3DVECTOR vPosition;
|
||||
D3DVECTOR vVelocity;
|
||||
DWORD dwInsideConeAngle;
|
||||
DWORD dwOutsideConeAngle;
|
||||
D3DVECTOR vConeOrientation;
|
||||
LONG lConeOutsideVolume;
|
||||
D3DVALUE flMinDistance;
|
||||
D3DVALUE flMaxDistance;
|
||||
DWORD dwMode;
|
||||
} DS3DBUFFER, *LPDS3DBUFFER;
|
||||
|
||||
typedef const DS3DBUFFER *LPCDS3DBUFFER;
|
||||
|
||||
typedef struct _DS3DLISTENER
|
||||
{
|
||||
DWORD dwSize;
|
||||
D3DVECTOR vPosition;
|
||||
D3DVECTOR vVelocity;
|
||||
D3DVECTOR vOrientFront;
|
||||
D3DVECTOR vOrientTop;
|
||||
D3DVALUE flDistanceFactor;
|
||||
D3DVALUE flRolloffFactor;
|
||||
D3DVALUE flDopplerFactor;
|
||||
} DS3DLISTENER, *LPDS3DLISTENER;
|
||||
|
||||
typedef const DS3DLISTENER *LPCDS3DLISTENER;
|
||||
|
||||
typedef struct _DSCCAPS
|
||||
{
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
DWORD dwFormats;
|
||||
DWORD dwChannels;
|
||||
} DSCCAPS, *LPDSCCAPS;
|
||||
|
||||
typedef const DSCCAPS *LPCDSCCAPS;
|
||||
|
||||
typedef struct _DSCBUFFERDESC
|
||||
{
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
DWORD dwBufferBytes;
|
||||
DWORD dwReserved;
|
||||
LPWAVEFORMATEX lpwfxFormat;
|
||||
} DSCBUFFERDESC, *LPDSCBUFFERDESC;
|
||||
|
||||
typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC;
|
||||
|
||||
typedef struct _DSCBCAPS
|
||||
{
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
DWORD dwBufferBytes;
|
||||
DWORD dwReserved;
|
||||
} DSCBCAPS, *LPDSCBCAPS;
|
||||
|
||||
typedef const DSCBCAPS *LPCDSCBCAPS;
|
||||
|
||||
typedef struct _DSBPOSITIONNOTIFY
|
||||
{
|
||||
DWORD dwOffset;
|
||||
HANDLE hEventNotify;
|
||||
} DSBPOSITIONNOTIFY, *LPDSBPOSITIONNOTIFY;
|
||||
|
||||
typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY;
|
||||
|
||||
//
|
||||
// Compatibility typedefs
|
||||
//
|
||||
|
||||
typedef LPDIRECTSOUND *LPLPDIRECTSOUND;
|
||||
typedef LPDIRECTSOUNDBUFFER *LPLPDIRECTSOUNDBUFFER;
|
||||
typedef LPDIRECTSOUND3DLISTENER *LPLPDIRECTSOUND3DLISTENER;
|
||||
typedef LPDIRECTSOUND3DBUFFER *LPLPDIRECTSOUND3DBUFFER;
|
||||
typedef LPDIRECTSOUNDCAPTURE *LPLPDIRECTSOUNDCAPTURE;
|
||||
typedef LPDIRECTSOUNDCAPTUREBUFFER *LPLPDIRECTSOUNDCAPTUREBUFFER;
|
||||
typedef LPDIRECTSOUNDNOTIFY *LPLPDIRECTSOUNDNOTIFY;
|
||||
typedef LPVOID *LPLPVOID;
|
||||
typedef const WAVEFORMATEX *LPCWAVEFORMATEX;
|
||||
|
||||
//
|
||||
// DirectSound API
|
||||
//
|
||||
|
||||
typedef BOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID, LPCWSTR, LPCWSTR, LPVOID);
|
||||
typedef BOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID, LPCSTR, LPCSTR, LPVOID);
|
||||
|
||||
extern HRESULT WINAPI DirectSoundCreate(LPGUID, LPDIRECTSOUND *, LPUNKNOWN);
|
||||
extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW, LPVOID);
|
||||
extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA, LPVOID);
|
||||
|
||||
extern HRESULT WINAPI DirectSoundCaptureCreate(LPGUID, LPDIRECTSOUNDCAPTURE *, LPUNKNOWN);
|
||||
extern HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW, LPVOID);
|
||||
extern HRESULT WINAPI DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA, LPVOID);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define LPDSENUMCALLBACK LPDSENUMCALLBACKW
|
||||
#define DirectSoundEnumerate DirectSoundEnumerateW
|
||||
#define DirectSoundCaptureEnumerate DirectSoundCaptureEnumerateW
|
||||
#else // UNICODE
|
||||
#define LPDSENUMCALLBACK LPDSENUMCALLBACKA
|
||||
#define DirectSoundEnumerate DirectSoundEnumerateA
|
||||
#define DirectSoundCaptureEnumerate DirectSoundCaptureEnumerateA
|
||||
#endif // UNICODE
|
||||
|
||||
//
|
||||
// IDirectSound
|
||||
//
|
||||
|
||||
DEFINE_GUID(IID_IDirectSound, 0x279AFA83, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectSound
|
||||
|
||||
DECLARE_INTERFACE_(IDirectSound, IUnknown)
|
||||
{
|
||||
// IUnknown methods
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
// IDirectSound methods
|
||||
STDMETHOD(CreateSoundBuffer) (THIS_ LPCDSBUFFERDESC, LPDIRECTSOUNDBUFFER *, LPUNKNOWN) PURE;
|
||||
STDMETHOD(GetCaps) (THIS_ LPDSCAPS) PURE;
|
||||
STDMETHOD(DuplicateSoundBuffer) (THIS_ LPDIRECTSOUNDBUFFER, LPDIRECTSOUNDBUFFER *) PURE;
|
||||
STDMETHOD(SetCooperativeLevel) (THIS_ HWND, DWORD) PURE;
|
||||
STDMETHOD(Compact) (THIS) PURE;
|
||||
STDMETHOD(GetSpeakerConfig) (THIS_ LPDWORD) PURE;
|
||||
STDMETHOD(SetSpeakerConfig) (THIS_ DWORD) PURE;
|
||||
STDMETHOD(Initialize) (THIS_ LPGUID) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirectSound_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectSound_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectSound_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->lpVtbl->CreateSoundBuffer(p,a,b,c)
|
||||
#define IDirectSound_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
|
||||
#define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b)
|
||||
#define IDirectSound_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
|
||||
#define IDirectSound_Compact(p) (p)->lpVtbl->Compact(p)
|
||||
#define IDirectSound_GetSpeakerConfig(p,a) (p)->lpVtbl->GetSpeakerConfig(p,a)
|
||||
#define IDirectSound_SetSpeakerConfig(p,b) (p)->lpVtbl->SetSpeakerConfig(p,b)
|
||||
#define IDirectSound_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
|
||||
#else // !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirectSound_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
||||
#define IDirectSound_AddRef(p) (p)->AddRef()
|
||||
#define IDirectSound_Release(p) (p)->Release()
|
||||
#define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->CreateSoundBuffer(a,b,c)
|
||||
#define IDirectSound_GetCaps(p,a) (p)->GetCaps(a)
|
||||
#define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b)
|
||||
#define IDirectSound_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
|
||||
#define IDirectSound_Compact(p) (p)->Compact()
|
||||
#define IDirectSound_GetSpeakerConfig(p,a) (p)->GetSpeakerConfig(a)
|
||||
#define IDirectSound_SetSpeakerConfig(p,b) (p)->SetSpeakerConfig(b)
|
||||
#define IDirectSound_Initialize(p,a) (p)->Initialize(a)
|
||||
#endif // !defined(__cplusplus) || defined(CINTERFACE)
|
||||
|
||||
//
|
||||
// IDirectSoundBuffer
|
||||
//
|
||||
|
||||
DEFINE_GUID(IID_IDirectSoundBuffer, 0x279AFA85, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectSoundBuffer
|
||||
|
||||
DECLARE_INTERFACE_(IDirectSoundBuffer, IUnknown)
|
||||
{
|
||||
// IUnknown methods
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
// IDirectSoundBuffer methods
|
||||
STDMETHOD(GetCaps) (THIS_ LPDSBCAPS) PURE;
|
||||
STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD, LPDWORD) PURE;
|
||||
STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX, DWORD, LPDWORD) PURE;
|
||||
STDMETHOD(GetVolume) (THIS_ LPLONG) PURE;
|
||||
STDMETHOD(GetPan) (THIS_ LPLONG) PURE;
|
||||
STDMETHOD(GetFrequency) (THIS_ LPDWORD) PURE;
|
||||
STDMETHOD(GetStatus) (THIS_ LPDWORD) PURE;
|
||||
STDMETHOD(Initialize) (THIS_ LPDIRECTSOUND, LPCDSBUFFERDESC) PURE;
|
||||
STDMETHOD(Lock) (THIS_ DWORD, DWORD, LPVOID *, LPDWORD, LPVOID *, LPDWORD, DWORD) PURE;
|
||||
STDMETHOD(Play) (THIS_ DWORD, DWORD, DWORD) PURE;
|
||||
STDMETHOD(SetCurrentPosition) (THIS_ DWORD) PURE;
|
||||
STDMETHOD(SetFormat) (THIS_ LPCWAVEFORMATEX) PURE;
|
||||
STDMETHOD(SetVolume) (THIS_ LONG) PURE;
|
||||
STDMETHOD(SetPan) (THIS_ LONG) PURE;
|
||||
STDMETHOD(SetFrequency) (THIS_ DWORD) PURE;
|
||||
STDMETHOD(Stop) (THIS) PURE;
|
||||
STDMETHOD(Unlock) (THIS_ LPVOID, DWORD, LPVOID, DWORD) PURE;
|
||||
STDMETHOD(Restore) (THIS) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectSoundBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectSoundBuffer_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirectSoundBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
|
||||
#define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
|
||||
#define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
|
||||
#define IDirectSoundBuffer_GetVolume(p,a) (p)->lpVtbl->GetVolume(p,a)
|
||||
#define IDirectSoundBuffer_GetPan(p,a) (p)->lpVtbl->GetPan(p,a)
|
||||
#define IDirectSoundBuffer_GetFrequency(p,a) (p)->lpVtbl->GetFrequency(p,a)
|
||||
#define IDirectSoundBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
|
||||
#define IDirectSoundBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
|
||||
#define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
|
||||
#define IDirectSoundBuffer_Play(p,a,b,c) (p)->lpVtbl->Play(p,a,b,c)
|
||||
#define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->lpVtbl->SetCurrentPosition(p,a)
|
||||
#define IDirectSoundBuffer_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a)
|
||||
#define IDirectSoundBuffer_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a)
|
||||
#define IDirectSoundBuffer_SetPan(p,a) (p)->lpVtbl->SetPan(p,a)
|
||||
#define IDirectSoundBuffer_SetFrequency(p,a) (p)->lpVtbl->SetFrequency(p,a)
|
||||
#define IDirectSoundBuffer_Stop(p) (p)->lpVtbl->Stop(p)
|
||||
#define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
|
||||
#define IDirectSoundBuffer_Restore(p) (p)->lpVtbl->Restore(p)
|
||||
#else // !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirectSoundBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
||||
#define IDirectSoundBuffer_AddRef(p) (p)->AddRef()
|
||||
#define IDirectSoundBuffer_Release(p) (p)->Release()
|
||||
#define IDirectSoundBuffer_GetCaps(p,a) (p)->GetCaps(a)
|
||||
#define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
|
||||
#define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
|
||||
#define IDirectSoundBuffer_GetVolume(p,a) (p)->GetVolume(a)
|
||||
#define IDirectSoundBuffer_GetPan(p,a) (p)->GetPan(a)
|
||||
#define IDirectSoundBuffer_GetFrequency(p,a) (p)->GetFrequency(a)
|
||||
#define IDirectSoundBuffer_GetStatus(p,a) (p)->GetStatus(a)
|
||||
#define IDirectSoundBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
|
||||
#define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
|
||||
#define IDirectSoundBuffer_Play(p,a,b,c) (p)->Play(a,b,c)
|
||||
#define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->SetCurrentPosition(a)
|
||||
#define IDirectSoundBuffer_SetFormat(p,a) (p)->SetFormat(a)
|
||||
#define IDirectSoundBuffer_SetVolume(p,a) (p)->SetVolume(a)
|
||||
#define IDirectSoundBuffer_SetPan(p,a) (p)->SetPan(a)
|
||||
#define IDirectSoundBuffer_SetFrequency(p,a) (p)->SetFrequency(a)
|
||||
#define IDirectSoundBuffer_Stop(p) (p)->Stop()
|
||||
#define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
|
||||
#define IDirectSoundBuffer_Restore(p) (p)->Restore()
|
||||
#endif // !defined(__cplusplus) || defined(CINTERFACE)
|
||||
|
||||
//
|
||||
// IDirectSound3DListener
|
||||
//
|
||||
|
||||
DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectSound3DListener
|
||||
|
||||
DECLARE_INTERFACE_(IDirectSound3DListener, IUnknown)
|
||||
{
|
||||
// IUnknown methods
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
// IDirectSound3D methods
|
||||
STDMETHOD(GetAllParameters) (THIS_ LPDS3DLISTENER) PURE;
|
||||
STDMETHOD(GetDistanceFactor) (THIS_ LPD3DVALUE) PURE;
|
||||
STDMETHOD(GetDopplerFactor) (THIS_ LPD3DVALUE) PURE;
|
||||
STDMETHOD(GetOrientation) (THIS_ LPD3DVECTOR, LPD3DVECTOR) PURE;
|
||||
STDMETHOD(GetPosition) (THIS_ LPD3DVECTOR) PURE;
|
||||
STDMETHOD(GetRolloffFactor) (THIS_ LPD3DVALUE) PURE;
|
||||
STDMETHOD(GetVelocity) (THIS_ LPD3DVECTOR) PURE;
|
||||
STDMETHOD(SetAllParameters) (THIS_ LPCDS3DLISTENER, DWORD) PURE;
|
||||
STDMETHOD(SetDistanceFactor) (THIS_ D3DVALUE, DWORD) PURE;
|
||||
STDMETHOD(SetDopplerFactor) (THIS_ D3DVALUE, DWORD) PURE;
|
||||
STDMETHOD(SetOrientation) (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
|
||||
STDMETHOD(SetPosition) (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
|
||||
STDMETHOD(SetRolloffFactor) (THIS_ D3DVALUE, DWORD) PURE;
|
||||
STDMETHOD(SetVelocity) (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
|
||||
STDMETHOD(CommitDeferredSettings) (THIS) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirectSound3DListener_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectSound3DListener_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectSound3DListener_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirectSound3DListener_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
|
||||
#define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->lpVtbl->GetDistanceFactor(p,a)
|
||||
#define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->lpVtbl->GetDopplerFactor(p,a)
|
||||
#define IDirectSound3DListener_GetOrientation(p,a,b) (p)->lpVtbl->GetOrientation(p,a,b)
|
||||
#define IDirectSound3DListener_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a)
|
||||
#define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->lpVtbl->GetRolloffFactor(p,a)
|
||||
#define IDirectSound3DListener_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a)
|
||||
#define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b)
|
||||
#define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->lpVtbl->SetDistanceFactor(p,a,b)
|
||||
#define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->lpVtbl->SetDopplerFactor(p,a,b)
|
||||
#define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->lpVtbl->SetOrientation(p,a,b,c,d,e,f,g)
|
||||
#define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d)
|
||||
#define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->lpVtbl->SetRolloffFactor(p,a,b)
|
||||
#define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d)
|
||||
#define IDirectSound3DListener_CommitDeferredSettings(p) (p)->lpVtbl->CommitDeferredSettings(p)
|
||||
#else // !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirectSound3DListener_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
||||
#define IDirectSound3DListener_AddRef(p) (p)->AddRef()
|
||||
#define IDirectSound3DListener_Release(p) (p)->Release()
|
||||
#define IDirectSound3DListener_GetAllParameters(p,a) (p)->GetAllParameters(a)
|
||||
#define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->GetDistanceFactor(a)
|
||||
#define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->GetDopplerFactor(a)
|
||||
#define IDirectSound3DListener_GetOrientation(p,a,b) (p)->GetOrientation(a,b)
|
||||
#define IDirectSound3DListener_GetPosition(p,a) (p)->GetPosition(a)
|
||||
#define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->GetRolloffFactor(a)
|
||||
#define IDirectSound3DListener_GetVelocity(p,a) (p)->GetVelocity(a)
|
||||
#define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b)
|
||||
#define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->SetDistanceFactor(a,b)
|
||||
#define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->SetDopplerFactor(a,b)
|
||||
#define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->SetOrientation(a,b,c,d,e,f,g)
|
||||
#define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d)
|
||||
#define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->SetRolloffFactor(a,b)
|
||||
#define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d)
|
||||
#define IDirectSound3DListener_CommitDeferredSettings(p) (p)->CommitDeferredSettings()
|
||||
#endif // !defined(__cplusplus) || defined(CINTERFACE)
|
||||
|
||||
//
|
||||
// IDirectSound3DBuffer
|
||||
//
|
||||
|
||||
DEFINE_GUID(IID_IDirectSound3DBuffer, 0x279AFA86, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectSound3DBuffer
|
||||
|
||||
DECLARE_INTERFACE_(IDirectSound3DBuffer, IUnknown)
|
||||
{
|
||||
// IUnknown methods
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
// IDirectSoundBuffer3D methods
|
||||
STDMETHOD(GetAllParameters) (THIS_ LPDS3DBUFFER) PURE;
|
||||
STDMETHOD(GetConeAngles) (THIS_ LPDWORD, LPDWORD) PURE;
|
||||
STDMETHOD(GetConeOrientation) (THIS_ LPD3DVECTOR) PURE;
|
||||
STDMETHOD(GetConeOutsideVolume) (THIS_ LPLONG) PURE;
|
||||
STDMETHOD(GetMaxDistance) (THIS_ LPD3DVALUE) PURE;
|
||||
STDMETHOD(GetMinDistance) (THIS_ LPD3DVALUE) PURE;
|
||||
STDMETHOD(GetMode) (THIS_ LPDWORD) PURE;
|
||||
STDMETHOD(GetPosition) (THIS_ LPD3DVECTOR) PURE;
|
||||
STDMETHOD(GetVelocity) (THIS_ LPD3DVECTOR) PURE;
|
||||
STDMETHOD(SetAllParameters) (THIS_ LPCDS3DBUFFER, DWORD) PURE;
|
||||
STDMETHOD(SetConeAngles) (THIS_ DWORD, DWORD, DWORD) PURE;
|
||||
STDMETHOD(SetConeOrientation) (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
|
||||
STDMETHOD(SetConeOutsideVolume) (THIS_ LONG, DWORD) PURE;
|
||||
STDMETHOD(SetMaxDistance) (THIS_ D3DVALUE, DWORD) PURE;
|
||||
STDMETHOD(SetMinDistance) (THIS_ D3DVALUE, DWORD) PURE;
|
||||
STDMETHOD(SetMode) (THIS_ DWORD, DWORD) PURE;
|
||||
STDMETHOD(SetPosition) (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
|
||||
STDMETHOD(SetVelocity) (THIS_ D3DVALUE, D3DVALUE, D3DVALUE, DWORD) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectSound3DBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectSound3DBuffer_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a)
|
||||
#define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->lpVtbl->GetConeAngles(p,a,b)
|
||||
#define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->lpVtbl->GetConeOrientation(p,a)
|
||||
#define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->lpVtbl->GetConeOutsideVolume(p,a)
|
||||
#define IDirectSound3DBuffer_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a)
|
||||
#define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->lpVtbl->GetMinDistance(p,a)
|
||||
#define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->lpVtbl->GetMaxDistance(p,a)
|
||||
#define IDirectSound3DBuffer_GetMode(p,a) (p)->lpVtbl->GetMode(p,a)
|
||||
#define IDirectSound3DBuffer_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a)
|
||||
#define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b)
|
||||
#define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->lpVtbl->SetConeAngles(p,a,b,c)
|
||||
#define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->lpVtbl->SetConeOrientation(p,a,b,c,d)
|
||||
#define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b)(p)->lpVtbl->SetConeOutsideVolume(p,a,b)
|
||||
#define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d)
|
||||
#define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->lpVtbl->SetMinDistance(p,a,b)
|
||||
#define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->lpVtbl->SetMaxDistance(p,a,b)
|
||||
#define IDirectSound3DBuffer_SetMode(p,a,b) (p)->lpVtbl->SetMode(p,a,b)
|
||||
#define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d)
|
||||
#else // !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirectSound3DBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
||||
#define IDirectSound3DBuffer_AddRef(p) (p)->AddRef()
|
||||
#define IDirectSound3DBuffer_Release(p) (p)->Release()
|
||||
#define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->GetAllParameters(a)
|
||||
#define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->GetConeAngles(a,b)
|
||||
#define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->GetConeOrientation(a)
|
||||
#define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->GetConeOutsideVolume(a)
|
||||
#define IDirectSound3DBuffer_GetPosition(p,a) (p)->GetPosition(a)
|
||||
#define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->GetMinDistance(a)
|
||||
#define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->GetMaxDistance(a)
|
||||
#define IDirectSound3DBuffer_GetMode(p,a) (p)->GetMode(a)
|
||||
#define IDirectSound3DBuffer_GetVelocity(p,a) (p)->GetVelocity(a)
|
||||
#define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b)
|
||||
#define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->SetConeAngles(a,b,c)
|
||||
#define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->SetConeOrientation(a,b,c,d)
|
||||
#define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b)(p)->SetConeOutsideVolume(a,b)
|
||||
#define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d)
|
||||
#define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->SetMinDistance(a,b)
|
||||
#define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->SetMaxDistance(a,b)
|
||||
#define IDirectSound3DBuffer_SetMode(p,a,b) (p)->SetMode(a,b)
|
||||
#define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d)
|
||||
#endif // !defined(__cplusplus) || defined(CINTERFACE)
|
||||
|
||||
//
|
||||
// IDirectSoundCapture
|
||||
//
|
||||
|
||||
DEFINE_GUID(IID_IDirectSoundCapture, 0xb0210781, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectSoundCapture
|
||||
|
||||
DECLARE_INTERFACE_(IDirectSoundCapture, IUnknown)
|
||||
{
|
||||
// IUnknown methods
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
// IDirectSoundCapture methods
|
||||
STDMETHOD(CreateCaptureBuffer) (THIS_ LPCDSCBUFFERDESC, LPDIRECTSOUNDCAPTUREBUFFER *, LPUNKNOWN) PURE;
|
||||
STDMETHOD(GetCaps) (THIS_ LPDSCCAPS ) PURE;
|
||||
STDMETHOD(Initialize) (THIS_ LPGUID) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirectSoundCapture_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectSoundCapture_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectSoundCapture_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->lpVtbl->CreateCaptureBuffer(p,a,b,c)
|
||||
#define IDirectSoundCapture_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
|
||||
#define IDirectSoundCapture_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
|
||||
#else // !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirectSoundCapture_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
||||
#define IDirectSoundCapture_AddRef(p) (p)->AddRef()
|
||||
#define IDirectSoundCapture_Release(p) (p)->Release()
|
||||
#define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->CreateCaptureBuffer(a,b,c)
|
||||
#define IDirectSoundCapture_GetCaps(p,a) (p)->GetCaps(a)
|
||||
#define IDirectSoundCapture_Initialize(p,a) (p)->Initialize(a)
|
||||
#endif // !defined(__cplusplus) || defined(CINTERFACE)
|
||||
|
||||
//
|
||||
// IDirectSoundCaptureBuffer
|
||||
//
|
||||
|
||||
DEFINE_GUID(IID_IDirectSoundCaptureBuffer, 0xb0210782, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectSoundCaptureBuffer
|
||||
|
||||
DECLARE_INTERFACE_(IDirectSoundCaptureBuffer, IUnknown)
|
||||
{
|
||||
// IUnknown methods
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
// IDirectSoundCaptureBuffer methods
|
||||
STDMETHOD(GetCaps) (THIS_ LPDSCBCAPS ) PURE;
|
||||
STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD, LPDWORD ) PURE;
|
||||
STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX, DWORD, LPDWORD ) PURE;
|
||||
STDMETHOD(GetStatus) (THIS_ LPDWORD ) PURE;
|
||||
STDMETHOD(Initialize) (THIS_ LPDIRECTSOUNDCAPTURE, LPCDSCBUFFERDESC) PURE;
|
||||
STDMETHOD(Lock) (THIS_ DWORD, DWORD, LPVOID *, LPDWORD, LPVOID *, LPDWORD, DWORD) PURE;
|
||||
STDMETHOD(Start) (THIS_ DWORD) PURE;
|
||||
STDMETHOD(Stop) (THIS) PURE;
|
||||
STDMETHOD(Unlock) (THIS_ LPVOID, DWORD, LPVOID, DWORD) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectSoundCaptureBuffer_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectSoundCaptureBuffer_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a)
|
||||
#define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b)
|
||||
#define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c)
|
||||
#define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a)
|
||||
#define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
|
||||
#define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g)
|
||||
#define IDirectSoundCaptureBuffer_Start(p,a) (p)->lpVtbl->Start(p,a)
|
||||
#define IDirectSoundCaptureBuffer_Stop(p) (p)->lpVtbl->Stop(p)
|
||||
#define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d)
|
||||
#else // !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
||||
#define IDirectSoundCaptureBuffer_AddRef(p) (p)->AddRef()
|
||||
#define IDirectSoundCaptureBuffer_Release(p) (p)->Release()
|
||||
#define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->GetCaps(a)
|
||||
#define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b)
|
||||
#define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c)
|
||||
#define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->GetStatus(a)
|
||||
#define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->Initialize(a,b)
|
||||
#define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g)
|
||||
#define IDirectSoundCaptureBuffer_Start(p,a) (p)->Start(a)
|
||||
#define IDirectSoundCaptureBuffer_Stop(p) (p)->Stop()
|
||||
#define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d)
|
||||
#endif // !defined(__cplusplus) || defined(CINTERFACE)
|
||||
|
||||
//
|
||||
// IDirectSoundNotify
|
||||
//
|
||||
|
||||
DEFINE_GUID(IID_IDirectSoundNotify, 0xb0210783, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectSoundNotify
|
||||
|
||||
DECLARE_INTERFACE_(IDirectSoundNotify, IUnknown)
|
||||
{
|
||||
// IUnknown methods
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
// IDirectSoundNotify methods
|
||||
STDMETHOD(SetNotificationPositions) (THIS_ DWORD, LPCDSBPOSITIONNOTIFY) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirectSoundNotify_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectSoundNotify_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectSoundNotify_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->lpVtbl->SetNotificationPositions(p,a,b)
|
||||
#else // !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirectSoundNotify_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
||||
#define IDirectSoundNotify_AddRef(p) (p)->AddRef()
|
||||
#define IDirectSoundNotify_Release(p) (p)->Release()
|
||||
#define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->SetNotificationPositions(a,b)
|
||||
#endif // !defined(__cplusplus) || defined(CINTERFACE)
|
||||
|
||||
//
|
||||
// IKsPropertySet
|
||||
//
|
||||
|
||||
#ifndef _IKsPropertySet_
|
||||
#define _IKsPropertySet_
|
||||
|
||||
#ifdef __cplusplus
|
||||
// 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined
|
||||
struct IKsPropertySet;
|
||||
#endif // __cplusplus
|
||||
|
||||
typedef struct IKsPropertySet *LPKSPROPERTYSET;
|
||||
|
||||
#define KSPROPERTY_SUPPORT_GET 0x00000001
|
||||
#define KSPROPERTY_SUPPORT_SET 0x00000002
|
||||
|
||||
DEFINE_GUID(IID_IKsPropertySet, 0x31efac30, 0x515c, 0x11d0, 0xa9, 0xaa, 0x00, 0xaa, 0x00, 0x61, 0xbe, 0x93);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IKsPropertySet
|
||||
|
||||
DECLARE_INTERFACE_(IKsPropertySet, IUnknown)
|
||||
{
|
||||
// IUnknown methods
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
|
||||
// IKsPropertySet methods
|
||||
STDMETHOD(Get) (THIS_ REFGUID, ULONG, LPVOID, ULONG, LPVOID, ULONG, PULONG) PURE;
|
||||
STDMETHOD(Set) (THIS_ REFGUID, ULONG, LPVOID, ULONG, LPVOID, ULONG) PURE;
|
||||
STDMETHOD(QuerySupport) (THIS_ REFGUID, ULONG, PULONG) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IKsPropertySet_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IKsPropertySet_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IKsPropertySet_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->lpVtbl->Get(p,a,b,c,d,e,f,g)
|
||||
#define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->lpVtbl->Set(p,a,b,c,d,e,f)
|
||||
#define IKsPropertySet_QuerySupport(p,a,b,c) (p)->lpVtbl->QuerySupport(p,a,b,c)
|
||||
#else // !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IKsPropertySet_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
||||
#define IKsPropertySet_AddRef(p) (p)->AddRef()
|
||||
#define IKsPropertySet_Release(p) (p)->Release()
|
||||
#define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->Get(a,b,c,d,e,f,g)
|
||||
#define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->Set(a,b,c,d,e,f)
|
||||
#define IKsPropertySet_QuerySupport(p,a,b,c) (p)->QuerySupport(a,b,c)
|
||||
#endif // !defined(__cplusplus) || defined(CINTERFACE)
|
||||
|
||||
#endif // _IKsPropertySet_
|
||||
|
||||
//
|
||||
// Return Codes
|
||||
//
|
||||
|
||||
#define DS_OK 0
|
||||
|
||||
// The call failed because resources (such as a priority level)
|
||||
// were already being used by another caller.
|
||||
#define DSERR_ALLOCATED MAKE_DSHRESULT(10)
|
||||
|
||||
// The control (vol,pan,etc.) requested by the caller is not available.
|
||||
#define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30)
|
||||
|
||||
// An invalid parameter was passed to the returning function
|
||||
#define DSERR_INVALIDPARAM E_INVALIDARG
|
||||
|
||||
// This call is not valid for the current state of this object
|
||||
#define DSERR_INVALIDCALL MAKE_DSHRESULT(50)
|
||||
|
||||
// An undetermined error occured inside the DirectSound subsystem
|
||||
#define DSERR_GENERIC E_FAIL
|
||||
|
||||
// The caller does not have the priority level required for the function to
|
||||
// succeed.
|
||||
#define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70)
|
||||
|
||||
// Not enough free memory is available to complete the operation
|
||||
#define DSERR_OUTOFMEMORY E_OUTOFMEMORY
|
||||
|
||||
// The specified WAVE format is not supported
|
||||
#define DSERR_BADFORMAT MAKE_DSHRESULT(100)
|
||||
|
||||
// The function called is not supported at this time
|
||||
#define DSERR_UNSUPPORTED E_NOTIMPL
|
||||
|
||||
// No sound driver is available for use
|
||||
#define DSERR_NODRIVER MAKE_DSHRESULT(120)
|
||||
|
||||
// This object is already initialized
|
||||
#define DSERR_ALREADYINITIALIZED MAKE_DSHRESULT(130)
|
||||
|
||||
// This object does not support aggregation
|
||||
#define DSERR_NOAGGREGATION CLASS_E_NOAGGREGATION
|
||||
|
||||
// The buffer memory has been lost, and must be restored.
|
||||
#define DSERR_BUFFERLOST MAKE_DSHRESULT(150)
|
||||
|
||||
// Another app has a higher priority level, preventing this call from
|
||||
// succeeding.
|
||||
#define DSERR_OTHERAPPHASPRIO MAKE_DSHRESULT(160)
|
||||
|
||||
// This object has not been initialized
|
||||
#define DSERR_UNINITIALIZED MAKE_DSHRESULT(170)
|
||||
|
||||
// The requested COM interface is not available
|
||||
#define DSERR_NOINTERFACE E_NOINTERFACE
|
||||
|
||||
//
|
||||
// Flags
|
||||
//
|
||||
|
||||
#define DSCAPS_PRIMARYMONO 0x00000001
|
||||
#define DSCAPS_PRIMARYSTEREO 0x00000002
|
||||
#define DSCAPS_PRIMARY8BIT 0x00000004
|
||||
#define DSCAPS_PRIMARY16BIT 0x00000008
|
||||
#define DSCAPS_CONTINUOUSRATE 0x00000010
|
||||
#define DSCAPS_EMULDRIVER 0x00000020
|
||||
#define DSCAPS_CERTIFIED 0x00000040
|
||||
#define DSCAPS_SECONDARYMONO 0x00000100
|
||||
#define DSCAPS_SECONDARYSTEREO 0x00000200
|
||||
#define DSCAPS_SECONDARY8BIT 0x00000400
|
||||
#define DSCAPS_SECONDARY16BIT 0x00000800
|
||||
|
||||
#define DSBPLAY_LOOPING 0x00000001
|
||||
|
||||
#define DSBSTATUS_PLAYING 0x00000001
|
||||
#define DSBSTATUS_BUFFERLOST 0x00000002
|
||||
#define DSBSTATUS_LOOPING 0x00000004
|
||||
|
||||
#define DSBLOCK_FROMWRITECURSOR 0x00000001
|
||||
#define DSBLOCK_ENTIREBUFFER 0x00000002
|
||||
|
||||
#define DSSCL_NORMAL 0x00000001
|
||||
#define DSSCL_PRIORITY 0x00000002
|
||||
#define DSSCL_EXCLUSIVE 0x00000003
|
||||
#define DSSCL_WRITEPRIMARY 0x00000004
|
||||
|
||||
#define DS3DMODE_NORMAL 0x00000000
|
||||
#define DS3DMODE_HEADRELATIVE 0x00000001
|
||||
#define DS3DMODE_DISABLE 0x00000002
|
||||
|
||||
#define DS3D_IMMEDIATE 0x00000000
|
||||
#define DS3D_DEFERRED 0x00000001
|
||||
|
||||
#define DS3D_MINDISTANCEFACTOR 0.0f
|
||||
#define DS3D_MAXDISTANCEFACTOR 10.0f
|
||||
#define DS3D_DEFAULTDISTANCEFACTOR 1.0f
|
||||
|
||||
#define DS3D_MINROLLOFFFACTOR 0.0f
|
||||
#define DS3D_MAXROLLOFFFACTOR 10.0f
|
||||
#define DS3D_DEFAULTROLLOFFFACTOR 1.0f
|
||||
|
||||
#define DS3D_MINDOPPLERFACTOR 0.0f
|
||||
#define DS3D_MAXDOPPLERFACTOR 10.0f
|
||||
#define DS3D_DEFAULTDOPPLERFACTOR 1.0f
|
||||
|
||||
#define DS3D_DEFAULTMINDISTANCE 1.0f
|
||||
#define DS3D_DEFAULTMAXDISTANCE 1000000000.0f
|
||||
|
||||
#define DS3D_MINCONEANGLE 0
|
||||
#define DS3D_MAXCONEANGLE 360
|
||||
#define DS3D_DEFAULTCONEANGLE 360
|
||||
|
||||
#define DS3D_DEFAULTCONEOUTSIDEVOLUME 0
|
||||
|
||||
#define DSBCAPS_PRIMARYBUFFER 0x00000001
|
||||
#define DSBCAPS_STATIC 0x00000002
|
||||
#define DSBCAPS_LOCHARDWARE 0x00000004
|
||||
#define DSBCAPS_LOCSOFTWARE 0x00000008
|
||||
#define DSBCAPS_CTRL3D 0x00000010
|
||||
#define DSBCAPS_CTRLFREQUENCY 0x00000020
|
||||
#define DSBCAPS_CTRLPAN 0x00000040
|
||||
#define DSBCAPS_CTRLVOLUME 0x00000080
|
||||
#define DSBCAPS_CTRLPOSITIONNOTIFY 0x00000100
|
||||
#define DSBCAPS_CTRLDEFAULT 0x000000E0
|
||||
#define DSBCAPS_CTRLALL 0x000001F0
|
||||
#define DSBCAPS_STICKYFOCUS 0x00004000
|
||||
#define DSBCAPS_GLOBALFOCUS 0x00008000
|
||||
#define DSBCAPS_GETCURRENTPOSITION2 0x00010000
|
||||
#define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000
|
||||
|
||||
#define DSCBCAPS_WAVEMAPPED 0x80000000
|
||||
|
||||
#define DSSPEAKER_HEADPHONE 0x00000001
|
||||
#define DSSPEAKER_MONO 0x00000002
|
||||
#define DSSPEAKER_QUAD 0x00000003
|
||||
#define DSSPEAKER_STEREO 0x00000004
|
||||
#define DSSPEAKER_SURROUND 0x00000005
|
||||
|
||||
#define DSSPEAKER_GEOMETRY_MIN 0x00000005 // 5 degrees
|
||||
#define DSSPEAKER_GEOMETRY_NARROW 0x0000000A // 10 degrees
|
||||
#define DSSPEAKER_GEOMETRY_WIDE 0x00000014 // 20 degrees
|
||||
#define DSSPEAKER_GEOMETRY_MAX 0x000000B4 // 180 degrees
|
||||
|
||||
#define DSSPEAKER_COMBINED(c, g) ((DWORD)(((BYTE)(c)) | ((DWORD)((BYTE)(g))) << 16))
|
||||
#define DSSPEAKER_CONFIG(a) ((BYTE)(a))
|
||||
#define DSSPEAKER_GEOMETRY(a) ((BYTE)(((DWORD)(a) >> 16) & 0x00FF))
|
||||
|
||||
#define DSCCAPS_EMULDRIVER 0x00000020
|
||||
|
||||
#define DSCBLOCK_ENTIREBUFFER 0x00000001
|
||||
|
||||
#define DSCBSTATUS_CAPTURING 0x00000001
|
||||
#define DSCBSTATUS_LOOPING 0x00000002
|
||||
|
||||
#define DSCBSTART_LOOPING 0x00000001
|
||||
|
||||
#define DSBFREQUENCY_MIN 100
|
||||
#define DSBFREQUENCY_MAX 100000
|
||||
#define DSBFREQUENCY_ORIGINAL 0
|
||||
|
||||
#define DSBPAN_LEFT -10000
|
||||
#define DSBPAN_CENTER 0
|
||||
#define DSBPAN_RIGHT 10000
|
||||
|
||||
#define DSBVOLUME_MIN -10000
|
||||
#define DSBVOLUME_MAX 0
|
||||
|
||||
#define DSBSIZE_MIN 4
|
||||
#define DSBSIZE_MAX 0x0FFFFFFF
|
||||
|
||||
#define DSBPN_OFFSETSTOP 0xFFFFFFFF
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // __DSOUND_INCLUDED__
|
||||
831
3rdparty/dx5/inc/dvp.h
vendored
Normal file
831
3rdparty/dx5/inc/dvp.h
vendored
Normal file
@ -0,0 +1,831 @@
|
||||
/*==========================================================================;
|
||||
*
|
||||
* Copyright (C) 1996-1997 Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: dvp.h
|
||||
* Content: DirectDrawVideoPort include file
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __DVP_INCLUDED__
|
||||
#define __DVP_INCLUDED__
|
||||
#if defined( _WIN32 ) && !defined( _NO_COM )
|
||||
#define COM_NO_WINDOWS_H
|
||||
#include <objbase.h>
|
||||
#else
|
||||
#define IUnknown void
|
||||
#undef CO_E_NOTINITIALIZED
|
||||
#define CO_E_NOTINITIALIZED 0x800401F0L
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* GUIDS used by DirectDrawVideoPort objects
|
||||
*/
|
||||
#if defined( _WIN32 ) && !defined( _NO_COM )
|
||||
DEFINE_GUID( IID_IDDVideoPortContainer, 0x6C142760,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
|
||||
DEFINE_GUID( IID_IDirectDrawVideoPort, 0xB36D93E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
|
||||
|
||||
DEFINE_GUID( DDVPTYPE_E_HREFH_VREFH, 0x54F39980L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
|
||||
DEFINE_GUID( DDVPTYPE_E_HREFH_VREFL, 0x92783220L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
|
||||
DEFINE_GUID( DDVPTYPE_E_HREFL_VREFH, 0xA07A02E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
|
||||
DEFINE_GUID( DDVPTYPE_E_HREFL_VREFL, 0xE09C77E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
|
||||
DEFINE_GUID( DDVPTYPE_CCIR656, 0xFCA326A0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
|
||||
DEFINE_GUID( DDVPTYPE_BROOKTREE, 0x1352A560L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
|
||||
DEFINE_GUID( DDVPTYPE_PHILIPS, 0x332CF160L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
|
||||
|
||||
/*
|
||||
* GUIDS used to describe connections
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
/*============================================================================
|
||||
*
|
||||
* DirectDraw Structures
|
||||
*
|
||||
* Various structures used to invoke DirectDraw.
|
||||
*
|
||||
*==========================================================================*/
|
||||
|
||||
struct IDirectDraw;
|
||||
struct IDirectDrawSurface;
|
||||
struct IDirectDrawPalette;
|
||||
struct IDirectDrawClipper;
|
||||
|
||||
typedef struct IDDVideoPortContainer FAR *LPDDVIDEOPORTCONTAINER;
|
||||
typedef struct IDirectDrawVideoPort FAR *LPDIRECTDRAWVIDEOPORT;
|
||||
|
||||
typedef struct _DDVIDEOPORTCONNECT FAR *LPDDVIDEOPORTCONNECT;
|
||||
typedef struct _DDVIDEOPORTCAPS FAR *LPDDVIDEOPORTCAPS;
|
||||
typedef struct _DDVIDEOPORTDESC FAR *LPDDVIDEOPORTDESC;
|
||||
typedef struct _DDVIDEOPORTINFO FAR *LPDDVIDEOPORTINFO;
|
||||
typedef struct _DDVIDEOPORTBANDWIDTH FAR *LPDDVIDEOPORTBANDWIDTH;
|
||||
typedef struct _DDVIDEOPORTSTATUS FAR *LPDDVIDEOPORTSTATUS;
|
||||
|
||||
typedef struct IDDVideoPortContainerVtbl DDVIDEOPORTCONTAINERCALLBACKS;
|
||||
typedef struct IDirectDrawVideoPortVtbl DIRECTDRAWVIDEOPORTCALLBACKS;
|
||||
|
||||
|
||||
/*
|
||||
* API's
|
||||
*/
|
||||
typedef HRESULT (FAR PASCAL * LPDDENUMVIDEOCALLBACK)(LPDDVIDEOPORTCAPS, LPVOID);
|
||||
|
||||
|
||||
/*
|
||||
* INTERACES FOLLOW:
|
||||
* IDirectDrawVideoPort
|
||||
* IVideoPort
|
||||
*/
|
||||
|
||||
/*
|
||||
* IDirectDrawVideoPortContainer
|
||||
*/
|
||||
#if defined( _WIN32 ) && !defined( _NO_COM )
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDDVideoPortContainer
|
||||
DECLARE_INTERFACE_( IDDVideoPortContainer, IUnknown )
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
/*** IDirectDrawVideoPort methods ***/
|
||||
STDMETHOD(CreateVideoPort)(THIS_ DWORD, LPDDVIDEOPORTDESC, LPDIRECTDRAWVIDEOPORT FAR *, IUnknown FAR *) PURE;
|
||||
STDMETHOD(EnumVideoPorts)(THIS_ DWORD, LPDDVIDEOPORTCAPS, LPVOID,LPDDENUMVIDEOCALLBACK ) PURE;
|
||||
STDMETHOD(GetVideoPortConnectInfo)(THIS_ DWORD, LPDWORD, LPDDVIDEOPORTCONNECT ) PURE;
|
||||
STDMETHOD(QueryVideoPortStatus)(THIS_ DWORD, LPDDVIDEOPORTSTATUS ) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IVideoPortContainer_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
|
||||
#define IVideoPortContainer_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IVideoPortContainer_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IVideoPortContainer_CreateVideoPort(p, a, b, c, d) (p)->lpVtbl->CreateVideoPort(p, a, b, c, d)
|
||||
#define IVideoPortContainer_EnumVideoPorts(p, a, b, c, d) (p)->lpVtbl->EnumVideoPorts(p, a, b, c, d)
|
||||
#define IVideoPortContainer_GetVideoPortConnectInfo(p, a, b, c) (p)->lpVtbl->GetVideoPortConnectInfo(p, a, b, c)
|
||||
#define IVideoPortContainer_QueryVideoPortStatus(p, a, b) (p)->lpVtbl->QueryVideoPortStatus(p, a, b)
|
||||
#else
|
||||
#define IVideoPortContainer_QueryInterface(p, a, b) (p)->QueryInterface(a, b)
|
||||
#define IVideoPortContainer_AddRef(p) (p)->AddRef()
|
||||
#define IVideoPortContainer_Release(p) (p)->Release()
|
||||
#define IVideoPortContainer_CreateVideoPort(p, a, b, c, d) (p)->CreateVideoPort(a, b, c, d)
|
||||
#define IVideoPortContainer_EnumVideoPorts(p, a, b, c, d) (p)->EnumVideoPorts(a, b, c, d)
|
||||
#define IVideoPortContainer_GetVideoPortConnectInfo(p, a, b, c) (p)->GetVideoPortConnectInfo(a, b, c)
|
||||
#define IVideoPortContainer_QueryVideoPortStatus(p, a, b) (p)->QueryVideoPortStatus(a, b)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* IDirectDrawVideoPort
|
||||
*/
|
||||
#if defined( _WIN32 ) && !defined( _NO_COM )
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectDrawVideoPort
|
||||
DECLARE_INTERFACE_( IDirectDrawVideoPort, IUnknown )
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
/*** IVideoPort methods ***/
|
||||
STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
|
||||
STDMETHOD(GetBandwidthInfo)(THIS_ LPDDPIXELFORMAT, DWORD, DWORD, DWORD, LPDDVIDEOPORTBANDWIDTH) PURE;
|
||||
STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
|
||||
STDMETHOD(GetInputFormats)(THIS_ LPDWORD, LPDDPIXELFORMAT, DWORD) PURE;
|
||||
STDMETHOD(GetOutputFormats)(THIS_ LPDDPIXELFORMAT, LPDWORD, LPDDPIXELFORMAT, DWORD) PURE;
|
||||
STDMETHOD(GetFieldPolarity)(THIS_ LPBOOL) PURE;
|
||||
STDMETHOD(GetVideoLine)(THIS_ LPDWORD) PURE;
|
||||
STDMETHOD(GetVideoSignalStatus)(THIS_ LPDWORD) PURE;
|
||||
STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
|
||||
STDMETHOD(SetTargetSurface)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
|
||||
STDMETHOD(StartVideo)(THIS_ LPDDVIDEOPORTINFO) PURE;
|
||||
STDMETHOD(StopVideo)(THIS) PURE;
|
||||
STDMETHOD(UpdateVideo)(THIS_ LPDDVIDEOPORTINFO) PURE;
|
||||
STDMETHOD(WaitForSync)(THIS_ DWORD, DWORD, DWORD) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IVideoPort_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IVideoPort_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IVideoPort_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IVideoPort_SetTargetSurface(p,a,b) (p)->lpVtbl->SetTargetSurface(p,a,b)
|
||||
#define IVideoPort_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b)
|
||||
#define IVideoPort_GetBandwidthInfo(p,a,b,c,d,e) (p)->lpVtbl->GetBandwidthInfo(p,a,b,c,d,e)
|
||||
#define IVideoPort_GetColorControls(p,a) (p)->lpVtbl->GetColorControls(p,a)
|
||||
#define IVideoPort_GetInputFormats(p,a,b,c) (p)->lpVtbl->GetInputFormats(p,a,b,c)
|
||||
#define IVideoPort_GetOutputFormats(p,a,b,c,d) (p)->lpVtbl->GetOutputFormats(p,a,b,c,d)
|
||||
#define IVideoPort_GetFieldPolarity(p,a) (p)->lpVtbl->GetFieldPolarity(p,a)
|
||||
#define IVideoPort_GetVideoLine(p,a) (p)->lpVtbl->GetVideoLine(p,a)
|
||||
#define IVideoPort_GetVideoSignalStatus(p,a) (p)->lpVtbl->GetVideoSignalStatus(p,a)
|
||||
#define IVideoPort_SetColorControls(p,a) (p)->lpVtbl->SetColorControls(p,a)
|
||||
#define IVideoPort_StartVideo(p,a) (p)->lpVtbl->StartVideo(p,a)
|
||||
#define IVideoPort_StopVideo(p) (p)->lpVtbl->StopVideo(p)
|
||||
#define IVideoPort_UpdateVideo(p,a) (p)->lpVtbl->UpdateVideo(p,a)
|
||||
#define IVideoPort_WaitForSync(p,a,b,c) (p)->lpVtbl->WaitForSync(p,a,b,c)
|
||||
#else
|
||||
#define IVideoPort_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
||||
#define IVideoPort_AddRef(p) (p)->AddRef()
|
||||
#define IVideoPort_Release(p) (p)->Release()
|
||||
#define IVideoPort_SetTargetSurface(p,a,b) (p)->SetTargetSurface(a,b)
|
||||
#define IVideoPort_Flip(p,a,b) (p)->Flip(a,b)
|
||||
#define IVideoPort_GetBandwidthInfo(p,a,b,c,d,e) (p)->GetBandwidthInfo(a,b,c,d,e)
|
||||
#define IVideoPort_GetColorControls(p,a) (p)->GetColorControls(a)
|
||||
#define IVideoPort_GetInputFormats(p,a,b,c) (p)->GetInputFormats(a,b,c)
|
||||
#define IVideoPort_GetOutputFormats(p,a,b,c,d) (p)->GetOutputFormats(a,b,c,d)
|
||||
#define IVideoPort_GetFieldPolarity(p,a) (p)->GetFieldPolarity(a)
|
||||
#define IVideoPort_GetVideoLine(p,a) (p)->GetVideoLine(a)
|
||||
#define IVideoPort_GetVideoSignalStatus(p,a) (p)->GetVideoSignalStatus(a)
|
||||
#define IVideoPort_SetColorControls(p,a) (p)->SetColorControls(a)
|
||||
#define IVideoPort_StartVideo(p,a) (p)->StartVideo(a)
|
||||
#define IVideoPort_StopVideo(p) (p)->StopVideo()
|
||||
#define IVideoPort_UpdateVideo(p,a) (p)->UpdateVideo(a)
|
||||
#define IVideoPort_WaitForSync(p,a,b,c) (p)->WaitForSync(a,b,c)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* DDVIDEOPORTCONNECT
|
||||
*/
|
||||
typedef struct _DDVIDEOPORTCONNECT
|
||||
{
|
||||
DWORD dwSize; // size of the DDVIDEOPORTCONNECT structure
|
||||
DWORD dwPortWidth; // Width of the video port
|
||||
GUID guidTypeID; // Description of video port connection
|
||||
DWORD dwFlags; // Connection flags
|
||||
DWORD dwReserved1; // Reserved, set to zero.
|
||||
} DDVIDEOPORTCONNECT;
|
||||
|
||||
|
||||
/*
|
||||
* DDVIDEOPORTCAPS
|
||||
*/
|
||||
typedef struct _DDVIDEOPORTCAPS
|
||||
{
|
||||
DWORD dwSize; // size of the DDVIDEOPORTCAPS structure
|
||||
DWORD dwFlags; // indicates which fields contain data
|
||||
DWORD dwMaxWidth; // max width of the video port field
|
||||
DWORD dwMaxVBIWidth; // max width of the VBI data
|
||||
DWORD dwMaxHeight; // max height of the video port field
|
||||
DWORD dwVideoPortID; // Video port ID (0 - (dwMaxVideoPorts -1))
|
||||
DWORD dwCaps; // Video port capabilities
|
||||
DWORD dwFX; // More video port capabilities
|
||||
DWORD dwNumAutoFlipSurfaces; // Number of autoflippable surfaces
|
||||
DWORD dwAlignVideoPortBoundary; // Byte restriction of placement within the surface
|
||||
DWORD dwAlignVideoPortPrescaleWidth;// Byte restriction of width after prescaling
|
||||
DWORD dwAlignVideoPortCropBoundary; // Byte restriction of left cropping
|
||||
DWORD dwAlignVideoPortCropWidth; // Byte restriction of cropping width
|
||||
DWORD dwPreshrinkXStep; // Width can be shrunk in steps of 1/x
|
||||
DWORD dwPreshrinkYStep; // Height can be shrunk in steps of 1/x
|
||||
DWORD dwNumVBIAutoFlipSurfaces; // Number of VBI autoflippable surfaces
|
||||
DWORD dwReserved1; // Reserved for future use
|
||||
DWORD dwReserved2; // Reserved for future use
|
||||
} DDVIDEOPORTCAPS;
|
||||
|
||||
/*
|
||||
* The dwMaxWidth and dwMaxVBIWidth members are valid
|
||||
*/
|
||||
#define DDVPD_WIDTH 0x00000001l
|
||||
|
||||
/*
|
||||
* The dwMaxHeight member is valid
|
||||
*/
|
||||
#define DDVPD_HEIGHT 0x00000002l
|
||||
|
||||
/*
|
||||
* The dwVideoPortID member is valid
|
||||
*/
|
||||
#define DDVPD_ID 0x00000004l
|
||||
|
||||
/*
|
||||
* The dwCaps member is valid
|
||||
*/
|
||||
#define DDVPD_CAPS 0x00000008l
|
||||
|
||||
/*
|
||||
* The dwFX member is valid
|
||||
*/
|
||||
#define DDVPD_FX 0x00000010l
|
||||
|
||||
/*
|
||||
* The dwNumAutoFlipSurfaces member is valid
|
||||
*/
|
||||
#define DDVPD_AUTOFLIP 0x00000020l
|
||||
|
||||
/*
|
||||
* All of the alignment members are valid
|
||||
*/
|
||||
#define DDVPD_ALIGN 0x00000040l
|
||||
|
||||
|
||||
/*
|
||||
* DDVIDEOPORTDESC
|
||||
*/
|
||||
typedef struct _DDVIDEOPORTDESC
|
||||
{
|
||||
DWORD dwSize; // size of the DDVIDEOPORTDESC structure
|
||||
DWORD dwFieldWidth; // width of the video port field
|
||||
DWORD dwVBIWidth; // width of the VBI data
|
||||
DWORD dwFieldHeight; // height of the video port field
|
||||
DWORD dwMicrosecondsPerField; // Microseconds per video field
|
||||
DWORD dwMaxPixelsPerSecond; // Maximum pixel rate per second
|
||||
DWORD dwVideoPortID; // Video port ID (0 - (dwMaxVideoPorts -1))
|
||||
DWORD dwReserved1; // Reserved for future use - set to zero
|
||||
DDVIDEOPORTCONNECT VideoPortType; // Description of video port connection
|
||||
DWORD dwReserved2; // Reserved for future use - set to zero
|
||||
DWORD dwReserved3; // Reserved for future use - set to zero
|
||||
} DDVIDEOPORTDESC;
|
||||
|
||||
|
||||
/*
|
||||
* DDVIDEOPORTINFO
|
||||
*/
|
||||
typedef struct _DDVIDEOPORTINFO
|
||||
{
|
||||
DWORD dwSize; // Size of the structure
|
||||
DWORD dwOriginX; // Placement of the video data within the surface.
|
||||
DWORD dwOriginY; // Placement of the video data within the surface.
|
||||
DWORD dwVPFlags; // Video port options
|
||||
RECT rCrop; // Cropping rectangle (optional).
|
||||
DWORD dwPrescaleWidth; // Determines pre-scaling/zooming in the X direction (optional).
|
||||
DWORD dwPrescaleHeight; // Determines pre-scaling/zooming in the Y direction (optional).
|
||||
LPDDPIXELFORMAT lpddpfInputFormat; // Video format written to the video port
|
||||
LPDDPIXELFORMAT lpddpfVBIInputFormat; // Input format of the VBI data
|
||||
LPDDPIXELFORMAT lpddpfVBIOutputFormat;// Output format of the data
|
||||
DWORD dwVBIHeight; // Specifies the number of lines of data within the vertical blanking interval.
|
||||
DWORD dwReserved1; // Reserved for future use - set to zero
|
||||
DWORD dwReserved2; // Reserved for future use - set to zero
|
||||
} DDVIDEOPORTINFO;
|
||||
|
||||
|
||||
/*
|
||||
* DDVIDEOPORTBANDWIDTH
|
||||
*/
|
||||
typedef struct _DDVIDEOPORTBANDWIDTH
|
||||
{
|
||||
DWORD dwSize; // Size of the structure
|
||||
DWORD dwCaps;
|
||||
DWORD dwOverlay; // Zoom factor at which overlay is supported
|
||||
DWORD dwColorkey; // Zoom factor at which overlay w/ colorkey is supported
|
||||
DWORD dwYInterpolate; // Zoom factor at which overlay w/ Y interpolation is supported
|
||||
DWORD dwYInterpAndColorkey; // Zoom factor at which ovelray w/ Y interpolation and colorkeying is supported
|
||||
DWORD dwReserved1; // Reserved for future use - set to zero
|
||||
DWORD dwReserved2; // Reserved for future use - set to zero
|
||||
} DDVIDEOPORTBANDWIDTH;
|
||||
|
||||
|
||||
/*
|
||||
* DDVIDEOPORTSTATUS
|
||||
*/
|
||||
typedef struct _DDVIDEOPORTSTATUS
|
||||
{
|
||||
DWORD dwSize; // Size of the structure
|
||||
BOOL bInUse; // TRUE if video port is currently being used
|
||||
DWORD dwFlags; // Currently not used
|
||||
DWORD dwReserved1; // Reserved for future use
|
||||
DDVIDEOPORTCONNECT VideoPortType; // Information about the connection
|
||||
DWORD dwReserved2; // Reserved for future use
|
||||
DWORD dwReserved3; // Reserved for future use
|
||||
} DDVIDEOPORTSTATUS;
|
||||
|
||||
/*============================================================================
|
||||
*
|
||||
* Video Port Flags
|
||||
*
|
||||
* All flags are bit flags.
|
||||
*
|
||||
*==========================================================================*/
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* VIDEOPORT DDVIDEOPORTCONNECT FLAGS
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* When this is set by the driver and passed to the client, this
|
||||
* indicates that the video port is capable of double clocking the data.
|
||||
* When this is set by the client, this indicates that the video port
|
||||
* should enable double clocking. This flag is only valid with external
|
||||
* syncs.
|
||||
*/
|
||||
#define DDVPCONNECT_DOUBLECLOCK 0x00000001l
|
||||
|
||||
/*
|
||||
* When this is set by the driver and passed to the client, this
|
||||
* indicates that the video port is capable of using an external VACT
|
||||
* signal. When this is set by the client, this indicates that the
|
||||
* video port should use the external VACT signal.
|
||||
*/
|
||||
#define DDVPCONNECT_VACT 0x00000002l
|
||||
|
||||
/*
|
||||
* When this is set by the driver and passed to the client, this
|
||||
* indicates that the video port is capable of treating even fields
|
||||
* like odd fields and visa versa. When this is set by the client,
|
||||
* this indicates that the video port should treat even fields like odd
|
||||
* fields.
|
||||
*/
|
||||
#define DDVPCONNECT_INVERTPOLARITY 0x00000004l
|
||||
|
||||
/*
|
||||
* Indicates that any data written to the video port during the VREF
|
||||
* period will not be written into the frame buffer. This flag is read only.
|
||||
*/
|
||||
#define DDVPCONNECT_DISCARDSVREFDATA 0x00000008l
|
||||
|
||||
/*
|
||||
* Device will write half lines into the frame buffer, sometimes causing
|
||||
* the data to not be displayed correctly.
|
||||
*/
|
||||
#define DDVPCONNECT_HALFLINE 0x00000010l
|
||||
|
||||
/*
|
||||
* Indicates that the signal is interlaced. This flag is only
|
||||
* set by the client.
|
||||
*/
|
||||
#define DDVPCONNECT_INTERLACED 0x00000020l
|
||||
|
||||
/*
|
||||
* Indicates that video port is shareable and that this video port
|
||||
* will use the even fields. This flag is only set by the client.
|
||||
*/
|
||||
#define DDVPCONNECT_SHAREEVEN 0x00000040l
|
||||
|
||||
/*
|
||||
* Indicates that video port is shareable and that this video port
|
||||
* will use the odd fields. This flag is only set by the client.
|
||||
*/
|
||||
#define DDVPCONNECT_SHAREODD 0x00000080l
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* VIDEOPORT DDVIDEOPORTDESC CAPS
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* Flip can be performed automatically to avoid tearing.
|
||||
*/
|
||||
#define DDVPCAPS_AUTOFLIP 0x00000001l
|
||||
|
||||
/*
|
||||
* Supports interlaced video
|
||||
*/
|
||||
#define DDVPCAPS_INTERLACED 0x00000002l
|
||||
|
||||
/*
|
||||
* Supports non-interlaced video
|
||||
*/
|
||||
#define DDVPCAPS_NONINTERLACED 0x00000004l
|
||||
|
||||
/*
|
||||
* Indicates that the device can return whether the current field
|
||||
* of an interlaced signal is even or odd.
|
||||
*/
|
||||
#define DDVPCAPS_READBACKFIELD 0x00000008l
|
||||
|
||||
/*
|
||||
* Indicates that the device can return the current line of video
|
||||
* being written into the frame buffer.
|
||||
*/
|
||||
#define DDVPCAPS_READBACKLINE 0x00000010l
|
||||
|
||||
/*
|
||||
* Allows two gen-locked video streams to share a single video port,
|
||||
* where one stream uses the even fields and the other uses the odd
|
||||
* fields. Separate parameters (including address, scaling,
|
||||
* cropping, etc.) are maintained for both fields.)
|
||||
*/
|
||||
#define DDVPCAPS_SHAREABLE 0x00000020l
|
||||
|
||||
/*
|
||||
* Even fields of video can be automatically discarded.
|
||||
*/
|
||||
#define DDVPCAPS_SKIPEVENFIELDS 0x00000040l
|
||||
|
||||
/*
|
||||
* Odd fields of video can be automatically discarded.
|
||||
*/
|
||||
#define DDVPCAPS_SKIPODDFIELDS 0x00000080l
|
||||
|
||||
/*
|
||||
* Indicates that the device is capable of driving the graphics
|
||||
* VSYNC with the video port VSYNC.
|
||||
*/
|
||||
#define DDVPCAPS_SYNCMASTER 0x00000100l
|
||||
|
||||
/*
|
||||
* Indicates that data within the vertical blanking interval can
|
||||
* be written to a different surface.
|
||||
*/
|
||||
#define DDVPCAPS_VBISURFACE 0x00000200l
|
||||
|
||||
/*
|
||||
* Indicates that the video port can perform color operations
|
||||
* on the incoming data before it is written to the frame buffer.
|
||||
*/
|
||||
#define DDVPCAPS_COLORCONTROL 0x00000400l
|
||||
|
||||
/*
|
||||
* Indicates that the video port can accept VBI data in a different
|
||||
* width or format than the regular video data.
|
||||
*/
|
||||
#define DDVPCAPS_OVERSAMPLEDVBI 0x00000800l
|
||||
|
||||
/*
|
||||
* Indicates that the video port can write data directly to system memory
|
||||
*/
|
||||
#define DDVPCAPS_SYSTEMMEMORY 0x00001000l
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* VIDEOPORT DDVIDEOPORTDESC FX
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* Limited cropping is available to crop out the vertical interval data.
|
||||
*/
|
||||
#define DDVPFX_CROPTOPDATA 0x00000001l
|
||||
|
||||
/*
|
||||
* Incoming data can be cropped in the X direction before it is written
|
||||
* to the surface.
|
||||
*/
|
||||
#define DDVPFX_CROPX 0x00000002l
|
||||
|
||||
/*
|
||||
* Incoming data can be cropped in the Y direction before it is written
|
||||
* to the surface.
|
||||
*/
|
||||
#define DDVPFX_CROPY 0x00000004l
|
||||
|
||||
/*
|
||||
* Supports interleaving interlaced fields in memory.
|
||||
*/
|
||||
#define DDVPFX_INTERLEAVE 0x00000008l
|
||||
|
||||
/*
|
||||
* Supports mirroring left to right as the video data is written
|
||||
* into the frame buffer.
|
||||
*/
|
||||
#define DDVPFX_MIRRORLEFTRIGHT 0x00000010l
|
||||
|
||||
/*
|
||||
* Supports mirroring top to bottom as the video data is written
|
||||
* into the frame buffer.
|
||||
*/
|
||||
#define DDVPFX_MIRRORUPDOWN 0x00000020l
|
||||
|
||||
/*
|
||||
* Data can be arbitrarily shrunk in the X direction before it
|
||||
* is written to the surface.
|
||||
*/
|
||||
#define DDVPFX_PRESHRINKX 0x00000040l
|
||||
|
||||
/*
|
||||
* Data can be arbitrarily shrunk in the Y direction before it
|
||||
* is written to the surface.
|
||||
*/
|
||||
#define DDVPFX_PRESHRINKY 0x00000080l
|
||||
|
||||
/*
|
||||
* Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the X
|
||||
* direction before it is written to the surface.
|
||||
*/
|
||||
#define DDVPFX_PRESHRINKXB 0x00000100l
|
||||
|
||||
/*
|
||||
* Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the Y
|
||||
* direction before it is written to the surface.
|
||||
*/
|
||||
#define DDVPFX_PRESHRINKYB 0x00000200l
|
||||
|
||||
/*
|
||||
* Data can be shrunk in increments of 1/x in the X direction
|
||||
* (where X is specified in the DDVIDEOPORTCAPS.dwPreshrinkXStep)
|
||||
* before it is written to the surface.
|
||||
*/
|
||||
#define DDVPFX_PRESHRINKXS 0x00000400l
|
||||
|
||||
/*
|
||||
* Data can be shrunk in increments of 1/x in the Y direction
|
||||
* (where X is specified in the DDVIDEOPORTCAPS.dwPreshrinkYStep)
|
||||
* before it is written to the surface.
|
||||
*/
|
||||
#define DDVPFX_PRESHRINKYS 0x00000800l
|
||||
|
||||
/*
|
||||
* Data can be arbitrarily stretched in the X direction before
|
||||
* it is written to the surface.
|
||||
*/
|
||||
#define DDVPFX_PRESTRETCHX 0x00001000l
|
||||
|
||||
/*
|
||||
* Data can be arbitrarily stretched in the Y direction before
|
||||
* it is written to the surface.
|
||||
*/
|
||||
#define DDVPFX_PRESTRETCHY 0x00002000l
|
||||
|
||||
/*
|
||||
* Data can be integer stretched in the X direction before it is
|
||||
* written to the surface.
|
||||
*/
|
||||
#define DDVPFX_PRESTRETCHXN 0x00004000l
|
||||
|
||||
/*
|
||||
* Data can be integer stretched in the Y direction before it is
|
||||
* written to the surface.
|
||||
*/
|
||||
#define DDVPFX_PRESTRETCHYN 0x00008000l
|
||||
|
||||
/*
|
||||
* Indicates that data within the vertical blanking interval can
|
||||
* be converted independently of the remaining video data.
|
||||
*/
|
||||
#define DDVPFX_VBICONVERT 0x00010000l
|
||||
|
||||
/*
|
||||
* Indicates that scaling can be disabled for data within the
|
||||
* vertical blanking interval.
|
||||
*/
|
||||
#define DDVPFX_VBINOSCALE 0x00020000l
|
||||
|
||||
/*
|
||||
* Indicates that the video data can ignore the left and right
|
||||
* cropping coordinates when cropping oversampled VBI data.
|
||||
*/
|
||||
#define DDVPFX_IGNOREVBIXCROP 0x00040000l
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* VIDEOPORT DDVIDEOPORTINFO FLAGS
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* Perform automatic flipping. Auto-flipping is performed between
|
||||
* the overlay surface that was attached to the video port using
|
||||
* IDirectDrawVideoPort::AttachSurface and the overlay surfaces that
|
||||
* are attached to the surface via the IDirectDrawSurface::AttachSurface
|
||||
* method. The flip order is the order in which the overlay surfaces
|
||||
* were. attached.
|
||||
*/
|
||||
#define DDVP_AUTOFLIP 0x00000001l
|
||||
|
||||
/*
|
||||
* Perform conversion using the ddpfOutputFormat information.
|
||||
*/
|
||||
#define DDVP_CONVERT 0x00000002l
|
||||
|
||||
/*
|
||||
* Perform cropping using the specified rectangle.
|
||||
*/
|
||||
#define DDVP_CROP 0x00000004l
|
||||
|
||||
/*
|
||||
* Indicates that interlaced fields should be interleaved in memory.
|
||||
*/
|
||||
#define DDVP_INTERLEAVE 0x00000008l
|
||||
|
||||
/*
|
||||
* Indicates that the data should be mirrored left to right as it's
|
||||
* written into the frame buffer.
|
||||
*/
|
||||
#define DDVP_MIRRORLEFTRIGHT 0x00000010l
|
||||
|
||||
/*
|
||||
* Indicates that the data should be mirrored top to bottom as it's
|
||||
* written into the frame buffer.
|
||||
*/
|
||||
#define DDVP_MIRRORUPDOWN 0x00000020l
|
||||
|
||||
/*
|
||||
* Perform pre-scaling/zooming based on the pre-scale parameters.
|
||||
*/
|
||||
#define DDVP_PRESCALE 0x00000040l
|
||||
|
||||
/*
|
||||
* Ignore input of even fields.
|
||||
*/
|
||||
#define DDVP_SKIPEVENFIELDS 0x00000080l
|
||||
|
||||
/*
|
||||
* Ignore input of odd fields.
|
||||
*/
|
||||
#define DDVP_SKIPODDFIELDS 0x00000100l
|
||||
|
||||
/*
|
||||
* Drive the graphics VSYNCs using the video port VYSNCs.
|
||||
*/
|
||||
#define DDVP_SYNCMASTER 0x00000200l
|
||||
|
||||
/*
|
||||
* The ddpfVBIOutputFormatFormat member contains data that should be used
|
||||
* to convert the data within the vertical blanking interval.
|
||||
*/
|
||||
#define DDVP_VBICONVERT 0x00000400l
|
||||
|
||||
/*
|
||||
* Indicates that data within the vertical blanking interval
|
||||
* should not be scaled.
|
||||
*/
|
||||
#define DDVP_VBINOSCALE 0x00000800l
|
||||
|
||||
/*
|
||||
* Indicates that these bob/weave decisions should not be
|
||||
* overriden by other interfaces.
|
||||
*/
|
||||
#define DDVP_OVERRIDEBOBWEAVE 0x00001000l
|
||||
|
||||
/*
|
||||
* Indicates that the video data should ignore the left and right
|
||||
* cropping coordinates when cropping the VBI data.
|
||||
*/
|
||||
#define DDVP_IGNOREVBIXCROP 0x00002000l
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DIRIRECTDRAWVIDEOPORT GETINPUTFORMAT/GETOUTPUTFORMAT FLAGS
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* Return formats for the video data
|
||||
*/
|
||||
#define DDVPFORMAT_VIDEO 0x00000001l
|
||||
|
||||
/*
|
||||
* Return formats for the VBI data
|
||||
*/
|
||||
#define DDVPFORMAT_VBI 0x00000002l
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DIRIRECTDRAWVIDEOPORT SETTARGETSURFACE FLAGS
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* Surface should receive video data (and VBI data if a surface
|
||||
* is not explicitly attached for that purpose)
|
||||
*/
|
||||
#define DDVPTARGET_VIDEO 0x00000001l
|
||||
|
||||
/*
|
||||
* Surface should receive VBI data
|
||||
*/
|
||||
#define DDVPTARGET_VBI 0x00000002l
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DIRIRECTDRAWVIDEOPORT WAITFORSYNC FLAGS
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* Waits until the beginning of the next VSYNC
|
||||
*/
|
||||
#define DDVPWAIT_BEGIN 0x00000001l
|
||||
|
||||
/*
|
||||
* Waits until the end of the next/current VSYNC
|
||||
*/
|
||||
#define DDVPWAIT_END 0x00000002l
|
||||
|
||||
/*
|
||||
* Waits until the beginning of the specified line
|
||||
*/
|
||||
#define DDVPWAIT_LINE 0x00000003l
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DIRECTDRAWVIDEOPORT FLIP FLAGS
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* Flips the normal video surface
|
||||
*/
|
||||
#define DDVPFLIP_VIDEO 0x00000001l
|
||||
|
||||
/*
|
||||
* Flips the VBI surface
|
||||
*/
|
||||
#define DDVPFLIP_VBI 0x00000002l
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* DIRIRECTDRAWVIDEOPORT GETVIDEOSIGNALSTATUS VALUES
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* No video signal is present at the video port
|
||||
*/
|
||||
#define DDVPSQ_NOSIGNAL 0x00000001l
|
||||
|
||||
/*
|
||||
* A valid video signal is present at the video port
|
||||
*/
|
||||
#define DDVPSQ_SIGNALOK 0x00000002l
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* VIDEOPORTBANDWIDTH Flags
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* The specified height/width refer to the size of the video port data
|
||||
* written into memory, after prescaling has occured.
|
||||
*/
|
||||
#define DDVPB_VIDEOPORT 0x00000001l
|
||||
|
||||
/*
|
||||
* The specified height/width refer to the source size of the overlay.
|
||||
*/
|
||||
#define DDVPB_OVERLAY 0x00000002l
|
||||
|
||||
/*
|
||||
* This is a query for the device to return which caps this device requires.
|
||||
*/
|
||||
#define DDVPB_TYPE 0x00000004l
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* VIDEOPORTBANDWIDTH Caps
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* The bandwidth for this device is dependant on the overlay source size.
|
||||
*/
|
||||
#define DDVPBCAPS_SOURCE 0x00000001l
|
||||
|
||||
/*
|
||||
* The bandwidth for this device is dependant on the overlay destination
|
||||
* size.
|
||||
*/
|
||||
#define DDVPBCAPS_DESTINATION 0x00000002l
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
24
3rdparty/dx5/inc/fastfile.h
vendored
Normal file
24
3rdparty/dx5/inc/fastfile.h
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
/*==========================================================================
|
||||
*
|
||||
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: fastfile.h
|
||||
* Content: Definitions for fastfile access.
|
||||
*
|
||||
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
|
||||
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTBILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
typedef LPVOID HFASTFILE;
|
||||
|
||||
extern BOOL FastFileInit( LPSTR fname, int max_handles );
|
||||
extern void FastFileFini( void );
|
||||
extern HFASTFILE FastFileOpen( LPSTR name );
|
||||
extern BOOL FastFileClose( HFASTFILE pfe );
|
||||
extern BOOL FastFileRead( HFASTFILE pfh, LPVOID ptr, int size );
|
||||
extern BOOL FastFileSeek( HFASTFILE pfe, int off, int how );
|
||||
extern long FastFileTell( HFASTFILE pfe );
|
||||
extern LPVOID FastFileLock( HFASTFILE pfe, int off, int len );
|
||||
extern BOOL FastFileUnlock( HFASTFILE pfe, int off, int len );
|
||||
BIN
3rdparty/dx5/lib/d3drm.lib
vendored
Normal file
BIN
3rdparty/dx5/lib/d3drm.lib
vendored
Normal file
Binary file not shown.
BIN
3rdparty/dx5/lib/ddraw.lbw
vendored
Normal file
BIN
3rdparty/dx5/lib/ddraw.lbw
vendored
Normal file
Binary file not shown.
BIN
3rdparty/dx5/lib/ddraw.lib
vendored
Normal file
BIN
3rdparty/dx5/lib/ddraw.lib
vendored
Normal file
Binary file not shown.
BIN
3rdparty/dx5/lib/dinput.lib
vendored
Normal file
BIN
3rdparty/dx5/lib/dinput.lib
vendored
Normal file
Binary file not shown.
BIN
3rdparty/dx5/lib/dplayx.lib
vendored
Normal file
BIN
3rdparty/dx5/lib/dplayx.lib
vendored
Normal file
Binary file not shown.
BIN
3rdparty/dx5/lib/dsetup.lib
vendored
Normal file
BIN
3rdparty/dx5/lib/dsetup.lib
vendored
Normal file
Binary file not shown.
BIN
3rdparty/dx5/lib/dsound.lbw
vendored
Normal file
BIN
3rdparty/dx5/lib/dsound.lbw
vendored
Normal file
Binary file not shown.
BIN
3rdparty/dx5/lib/dsound.lib
vendored
Normal file
BIN
3rdparty/dx5/lib/dsound.lib
vendored
Normal file
Binary file not shown.
BIN
3rdparty/dx5/lib/dxguid.lib
vendored
Normal file
BIN
3rdparty/dx5/lib/dxguid.lib
vendored
Normal file
Binary file not shown.
BIN
3rdparty/dx5/lib/fastfile.lbw
vendored
Normal file
BIN
3rdparty/dx5/lib/fastfile.lbw
vendored
Normal file
Binary file not shown.
BIN
3rdparty/dx5/lib/fastfile.lib
vendored
Normal file
BIN
3rdparty/dx5/lib/fastfile.lib
vendored
Normal file
Binary file not shown.
BIN
3rdparty/smartheap/SHLW32MT.LIB
vendored
Normal file
BIN
3rdparty/smartheap/SHLW32MT.LIB
vendored
Normal file
Binary file not shown.
63
3rdparty/smartheap/SHMALLOC.H
vendored
Normal file
63
3rdparty/smartheap/SHMALLOC.H
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
/* shmalloc.h -- SmartHeap ANSI Standard C memory API
|
||||
* Professional Memory Management Library
|
||||
*
|
||||
* Copyright (C) 1991-1996 by Arthur D. Applegate. All Rights Reserved.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* No part of this source code may be copied, modified or reproduced
|
||||
* in any form without retaining the above copyright notice.
|
||||
* This source code, or source code derived from it, may not be redistributed
|
||||
* without express written permission of the author.
|
||||
*/
|
||||
|
||||
#if !(defined(_SHMALLOC_H))
|
||||
#define _SHMALLOC_H
|
||||
|
||||
#include "smrtheap.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* ANSI Standard Memory Management API */
|
||||
|
||||
#if (!defined(MEM_DEBUG) && !defined(NO_MALLOC_MACRO)) || defined(MALLOC_MACRO)
|
||||
#ifdef malloc
|
||||
#undef malloc
|
||||
#endif
|
||||
#define malloc(s) MEM_malloc(s)
|
||||
#ifdef calloc
|
||||
#undef calloc
|
||||
#endif
|
||||
#define calloc(s,c) MEM_calloc(s,c)
|
||||
#ifdef realloc
|
||||
#undef realloc
|
||||
#endif
|
||||
#define realloc(p,s) MEM_realloc(p,s)
|
||||
#ifdef free
|
||||
#undef free
|
||||
#endif
|
||||
#define free(p) MEM_free(p)
|
||||
|
||||
#endif /* NO_MALLOC_MACRO */
|
||||
|
||||
#ifndef MEM_malloc
|
||||
void MEM_FAR * MEM_ENTRY_ANSI MEM_malloc(size_t size);
|
||||
void MEM_FAR * MEM_ENTRY_ANSI MEM_calloc(size_t nobj, size_t size);
|
||||
void MEM_FAR * MEM_ENTRY_ANSI MEM_realloc(void MEM_FAR *p, size_t size);
|
||||
void MEM_ENTRY_ANSI MEM_free(void MEM_FAR *p);
|
||||
#endif /* MEM_malloc */
|
||||
|
||||
#if defined(__WATCOMC__) && defined(__SW_3S)
|
||||
/* Watcom stack calling convention */
|
||||
#pragma aux (syscall) MEM_malloc
|
||||
#pragma aux (syscall) MEM_realloc
|
||||
#pragma aux (syscall) MEM_calloc
|
||||
#pragma aux (syscall) MEM_free
|
||||
#endif /* __WATCOMC__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !defined(_SHMALLOC_H) */
|
||||
BIN
3rdparty/smartheap/SHMFC4M.LIB
vendored
Normal file
BIN
3rdparty/smartheap/SHMFC4M.LIB
vendored
Normal file
Binary file not shown.
656
3rdparty/smartheap/SMRTHEAP.H
vendored
Normal file
656
3rdparty/smartheap/SMRTHEAP.H
vendored
Normal file
@ -0,0 +1,656 @@
|
||||
/* smrtheap.h -- SmartHeap (tm) public C header file
|
||||
* Professional Memory Management Library
|
||||
*
|
||||
* Copyright (C) 1991-1997 by Arthur D. Applegate. All Rights Reserved.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* No part of this source code may be copied, modified or reproduced
|
||||
* in any form without retaining the above copyright notice.
|
||||
* This source code, or source code derived from it, may not be redistributed
|
||||
* without express written permission of the author.
|
||||
*
|
||||
*/
|
||||
|
||||
#if !defined(_SMARTHEAP_H)
|
||||
#define _SMARTHEAP_H
|
||||
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#if !defined(macintosh) && !defined(THINK_C) && !defined(__MWERKS__) \
|
||||
&& !defined(SHANSI) && UINT_MAX == 0xFFFFu \
|
||||
&& (defined(_Windows) || defined(_WINDOWS) || defined(__WINDOWS__))
|
||||
#define MEM_WIN16
|
||||
#endif
|
||||
|
||||
#if (UINT_MAX == 0xFFFFu) && (defined(MEM_WIN16) \
|
||||
|| defined(MSDOS) || defined(__MSDOS__) || defined(__DOS__))
|
||||
/* 16-bit X86 */
|
||||
#if defined(SYS_DLL)
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 600
|
||||
#define MEM_ENTRY _export _loadds far pascal
|
||||
#else
|
||||
#define MEM_ENTRY _export far pascal
|
||||
#endif
|
||||
#else
|
||||
#define MEM_ENTRY far pascal
|
||||
#endif
|
||||
#ifdef __WATCOMC__
|
||||
#define MEM_ENTRY_ANSI __far
|
||||
#else
|
||||
#define MEM_ENTRY_ANSI far cdecl
|
||||
#endif
|
||||
#define MEM_FAR far
|
||||
#if defined(MEM_WIN16)
|
||||
#define MEM_ENTRY2 _export far pascal
|
||||
#elif defined(DOS16M) || defined(DOSX286)
|
||||
#define MEM_ENTRY2 _export _loadds far pascal
|
||||
#endif
|
||||
|
||||
#else /* not 16-bit X86 */
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) \
|
||||
|| defined(__WIN32__) || defined(__NT__)
|
||||
#define MEM_WIN32
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(_SHI_Pool) && defined(SYS_DLL)
|
||||
#define MEM_ENTRY1 __declspec(dllexport)
|
||||
#define MEM_ENTRY4 __declspec(dllexport) extern
|
||||
#elif !defined(_SHI_Pool) && (defined(MEM_DEBUG) || defined(MEM_DLL))
|
||||
#define MEM_ENTRY1 __declspec(dllimport)
|
||||
#if defined(_M_IX86) || defined(_X86_)
|
||||
#define MemDefaultPool shi_MemDefaultPool
|
||||
#define MEM_ENTRY4 __declspec(dllimport)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(_MSC_VER) || defined(_M_IX86) || defined(_X86_)
|
||||
#define MEM_ENTRY __stdcall
|
||||
#else
|
||||
#define MEM_ENTRY __cdecl /* for NT/RISC */
|
||||
#endif
|
||||
#ifndef __WATCOMC__
|
||||
#define MEM_ENTRY_ANSI __cdecl
|
||||
#endif
|
||||
|
||||
#elif defined(__OS2__)
|
||||
#if defined(__BORLANDC__) || defined(__WATCOMC__)
|
||||
#if defined(SYS_DLL)
|
||||
#define MEM_ENTRY __export __syscall
|
||||
#else
|
||||
#define MEM_ENTRY __syscall
|
||||
#endif /* SYS_DLL */
|
||||
#ifdef __BORLANDC__
|
||||
#define MEM_ENTRY_ANSI __stdcall
|
||||
#endif
|
||||
#elif defined(__IBMC__) || defined(__IBMCPP__)
|
||||
#if defined(SYS_DLL) && 0
|
||||
#define MEM_ENTRY _Export _System
|
||||
#else
|
||||
#define MEM_ENTRY _System
|
||||
#endif
|
||||
#define MEM_ENTRY_ANSI _Optlink
|
||||
#define MEM_ENTRY3 MEM_ENTRY
|
||||
#define MEM_CALLBACK MEM_ENTRY3
|
||||
#define MEM_ENTRY2
|
||||
#endif
|
||||
#endif /* __OS2__ */
|
||||
|
||||
#if defined(__WATCOMC__) && defined(__SW_3S)
|
||||
/* Watcom stack calling convention */
|
||||
#ifndef __OS2__
|
||||
#ifdef __WINDOWS_386__
|
||||
#pragma aux syscall "*_" parm routine [eax ebx ecx edx fs gs] modify [eax];
|
||||
#else
|
||||
#pragma aux syscall "*_" parm routine [eax ebx ecx edx] modify [eax];
|
||||
#endif
|
||||
#ifndef MEM_ENTRY
|
||||
#define MEM_ENTRY __syscall
|
||||
#endif /* MEM_ENTRY */
|
||||
#endif
|
||||
#endif /* Watcom stack calling convention */
|
||||
|
||||
#endif /* end of system-specific declarations */
|
||||
|
||||
#ifndef MEM_ENTRY
|
||||
#define MEM_ENTRY
|
||||
#endif
|
||||
#ifndef MEM_ENTRY1
|
||||
#define MEM_ENTRY1
|
||||
#endif
|
||||
#ifndef MEM_ENTRY2
|
||||
#define MEM_ENTRY2 MEM_ENTRY
|
||||
#endif
|
||||
#ifndef MEM_ENTRY3
|
||||
#define MEM_ENTRY3
|
||||
#endif
|
||||
#ifndef MEM_ENTRY4
|
||||
#define MEM_ENTRY4 extern
|
||||
#endif
|
||||
#ifndef MEM_CALLBACK
|
||||
#define MEM_CALLBACK MEM_ENTRY2
|
||||
#endif
|
||||
#ifndef MEM_ENTRY_ANSI
|
||||
#define MEM_ENTRY_ANSI
|
||||
#endif
|
||||
#ifndef MEM_FAR
|
||||
#define MEM_FAR
|
||||
#endif
|
||||
|
||||
#ifdef applec
|
||||
/* Macintosh: Apple MPW C/C++ passes char/short parms as longs (4 bytes),
|
||||
* whereas Symantec C/C++ for MPW passes these as words (2 bytes);
|
||||
* therefore, canonicalize all integer parms as 'int' for this platform.
|
||||
*/
|
||||
#define MEM_USHORT unsigned
|
||||
#define MEM_UCHAR unsigned
|
||||
#else
|
||||
#define MEM_USHORT unsigned short
|
||||
#define MEM_UCHAR unsigned char
|
||||
#endif /* applec */
|
||||
|
||||
#ifdef MEM_DEBUG
|
||||
#include "heapagnt.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*** Types ***/
|
||||
|
||||
#ifndef MEM_BOOL_DEFINED
|
||||
#define MEM_BOOL_DEFINED
|
||||
typedef int MEM_BOOL;
|
||||
#endif
|
||||
|
||||
/* Version Masks */
|
||||
typedef unsigned MEM_VERSION;
|
||||
#define MEM_MAJOR_VERSION(v) (((v) & 0xF000u) >> 12)
|
||||
#define MEM_MINOR_VERSION(v) (((v) & 0x0F00u) >> 8)
|
||||
#define MEM_UPDATE_VERSION(v) ((v) & 0x00FFu)
|
||||
|
||||
/* Note: these types are struct's rather than integral types to facilitate
|
||||
* compile-time type-checking. MEM_POOL and MEM_HANDLE should be regarded
|
||||
* as black boxes, and treated just like handles.
|
||||
* You should not have any type casts to or from MEM_POOL or MEM_HANDLE;
|
||||
* nor should you dereference variables of type MEM_POOL or MEM_HANDLE
|
||||
* (unless you are using SmartHeap to replace NewHandle on the Mac, and
|
||||
* you have existing code that dereferences handles).
|
||||
*/
|
||||
#ifndef MEM_POOL_DEFINED
|
||||
#define MEM_POOL_DEFINED
|
||||
#ifdef _SHI_Pool
|
||||
typedef struct _SHI_Pool MEM_FAR *MEM_POOL;
|
||||
typedef struct _SHI_MovHandle MEM_FAR *MEM_HANDLE;
|
||||
#else
|
||||
#ifdef THINK_C
|
||||
typedef void *MEM_POOL;
|
||||
typedef void **MEM_HANDLE;
|
||||
#else
|
||||
typedef struct _SHI_Pool { int reserved; } MEM_FAR *MEM_POOL;
|
||||
typedef struct _SHI_MovHandle { int reserved; } MEM_FAR *MEM_HANDLE;
|
||||
#endif
|
||||
#endif
|
||||
#endif /* MEM_POOL_DEFINED */
|
||||
|
||||
|
||||
#if !defined(MEM_DEBUG) || !(defined(MEM_WIN16) || defined(MEM_WIN32))
|
||||
#define SHI_MAJOR_VERSION 3
|
||||
#define SHI_MINOR_VERSION 3
|
||||
#define SHI_UPDATE_LEVEL 0
|
||||
#endif /* !WINDOWS */
|
||||
|
||||
#ifndef MEM_DEBUG
|
||||
|
||||
/* Error codes: errorCode field of MEM_ERROR_INFO */
|
||||
#ifndef MEM_ERROR_CODE_DEFINED
|
||||
#define MEM_ERROR_CODE_DEFINED
|
||||
typedef enum
|
||||
{
|
||||
MEM_NO_ERROR=0,
|
||||
MEM_INTERNAL_ERROR,
|
||||
MEM_OUT_OF_MEMORY,
|
||||
MEM_BLOCK_TOO_BIG,
|
||||
MEM_ALLOC_ZERO,
|
||||
MEM_RESIZE_FAILED,
|
||||
MEM_LOCK_ERROR,
|
||||
MEM_EXCEEDED_CEILING,
|
||||
MEM_TOO_MANY_PAGES,
|
||||
MEM_TOO_MANY_TASKS,
|
||||
MEM_BAD_MEM_POOL,
|
||||
MEM_BAD_BLOCK,
|
||||
MEM_BAD_FREE_BLOCK,
|
||||
MEM_BAD_HANDLE,
|
||||
MEM_BAD_POINTER,
|
||||
MEM_WRONG_TASK,
|
||||
MEM_NOT_FIXED_SIZE,
|
||||
MEM_BAD_FLAGS,
|
||||
MEM_ERROR_CODE_INT_MAX = INT_MAX /* to ensure enum is full int in size */
|
||||
} MEM_ERROR_CODE;
|
||||
#endif /* MEM_ERROR_CODE_DEFINED */
|
||||
|
||||
|
||||
/* ### we should have packing pragma around these structure decls in case
|
||||
* ### user is compiling with non-default packing directive (only needed
|
||||
* ### if user is packing more strictly than native int size *and* if
|
||||
* ### native int size is != native long and ptr sizes)
|
||||
*/
|
||||
|
||||
/* Error info, passed to error-handling callback routine */
|
||||
#ifndef MEM_ERROR_INFO_DEFINED
|
||||
#define MEM_ERROR_INFO_DEFINED
|
||||
typedef struct _MEM_ERROR_INFO
|
||||
{
|
||||
MEM_ERROR_CODE errorCode; /* error code identifying type of error */
|
||||
MEM_POOL pool; /* pool in which error occurred, if known */
|
||||
} MEM_ERROR_INFO;
|
||||
|
||||
/* Error handling callback function */
|
||||
typedef MEM_BOOL (MEM_ENTRY2 * MEM_ENTRY3 MEM_ERROR_FN)
|
||||
(MEM_ERROR_INFO MEM_FAR *);
|
||||
|
||||
#endif /* MEM_ERROR_INFO_DEFINED */
|
||||
|
||||
#endif /* MEM_DEBUG */
|
||||
|
||||
|
||||
#ifndef MEM_BLOCK_TYPE_DEFINED
|
||||
#define MEM_BLOCK_TYPE_DEFINED
|
||||
/* Block Type: field of MEM_POOL_ENTRY, field of MEM_POOL_INFO,
|
||||
* parameter to MemPoolPreAllocate
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
MEM_FS_BLOCK = 0x0001u,
|
||||
MEM_VAR_MOVEABLE_BLOCK = 0x0002u,
|
||||
MEM_VAR_FIXED_BLOCK = 0x0004u,
|
||||
MEM_EXTERNAL_BLOCK = 0x0008u,
|
||||
MEM_BLOCK_TYPE_INT_MAX = INT_MAX /* to ensure enum is full int in size */
|
||||
} MEM_BLOCK_TYPE;
|
||||
#endif /* MEM_BLOCK_TYPE_DEFINED */
|
||||
|
||||
#ifndef MEM_POOL_ENTRY_DEFINED
|
||||
#define MEM_POOL_ENTRY_DEFINED
|
||||
/* Pool Entry: parameter to MemPoolWalk */
|
||||
typedef struct
|
||||
{
|
||||
void MEM_FAR *entry;
|
||||
MEM_POOL pool;
|
||||
MEM_BLOCK_TYPE type;
|
||||
MEM_BOOL isInUse;
|
||||
unsigned long size;
|
||||
MEM_HANDLE handle;
|
||||
unsigned lockCount;
|
||||
void MEM_FAR *reserved_ptr;
|
||||
} MEM_POOL_ENTRY;
|
||||
#endif /* MEM_POOL_ENTRY_DEFINED */
|
||||
|
||||
#ifndef MEM_POOL_STATUS_DEFINED
|
||||
#define MEM_POOL_STATUS_DEFINED
|
||||
/* Pool Status: returned by MemPoolWalk, MemPoolFirst, MemPoolNext */
|
||||
typedef enum
|
||||
{
|
||||
MEM_POOL_OK = 1,
|
||||
MEM_POOL_CORRUPT = -1,
|
||||
MEM_POOL_CORRUPT_FATAL = -2,
|
||||
MEM_POOL_END = 0,
|
||||
MEM_POOL_STATUS_INT_MAX = INT_MAX /* to ensure enum is full int in size */
|
||||
} MEM_POOL_STATUS;
|
||||
#endif /* MEM_POOL_STATUS_DEFINED */
|
||||
|
||||
#ifndef MEM_POINTER_STATUS_DEFINED
|
||||
#define MEM_POINTER_STATUS_DEFINED
|
||||
/* Pointer Status: returned by MemCheckPtr */
|
||||
typedef enum
|
||||
{
|
||||
MEM_POINTER_OK = 1,
|
||||
MEM_POINTER_WILD = 0,
|
||||
MEM_POINTER_FREE = -1,
|
||||
MEM_POINTER_STATUS_INT_MAX = INT_MAX /* to ensure enum is full int in size */
|
||||
} MEM_POINTER_STATUS;
|
||||
#endif /* MEM_POINTER_STATUS_DEFINED */
|
||||
|
||||
/* Pool Info: parameter to MemPoolInfo, MemPoolFirst, MemPoolNext */
|
||||
typedef struct
|
||||
{
|
||||
MEM_POOL pool;
|
||||
MEM_BLOCK_TYPE type; /* disjunctive combination of block type flags */
|
||||
unsigned short blockSizeFS;
|
||||
unsigned short smallBlockSize;
|
||||
unsigned pageSize;
|
||||
unsigned long floor;
|
||||
unsigned long ceiling;
|
||||
unsigned flags;
|
||||
MEM_ERROR_FN errorFn;
|
||||
} MEM_POOL_INFO;
|
||||
|
||||
/* Flags passed to MemAlloc, MemAllocPtr, MemReAlloc, MemReAllocPtr */
|
||||
#define MEM_FIXED 0x0000u /* fixed handle-based block */
|
||||
#define MEM_ZEROINIT 0x0001u /* == TRUE for SH 1.5 compatibility */
|
||||
#define MEM_MOVEABLE 0x0002u /* moveable handle-based block */
|
||||
#define MEM_RESIZEABLE 0x0004u /* reserve space above block */
|
||||
#define MEM_RESIZE_IN_PLACE 0x0008u /* do not move block (realloc) */
|
||||
#define MEM_NOGROW 0x0010u /* do not grow heap to satisfy request */
|
||||
#define MEM_NOEXTERNAL 0x0020u /* reserved for internal use */
|
||||
#define MEM_NOCOMPACT 0x0040u /* do not compact to satisfy request */
|
||||
#define MEM_NO_SERIALIZE 0x0080u /* do not serialize this request */
|
||||
#define MEM_HANDLEBASED 0x4000u /* for internal use */
|
||||
#define MEM_RESERVED 0x8000u /* for internal use */
|
||||
|
||||
#define MEM_UNLOCK_FAILED USHRT_MAX
|
||||
|
||||
/* Flags passed to MemPoolInit, MemPoolInitFS */
|
||||
#ifndef MEM_POOL_SHARED
|
||||
#define MEM_POOL_SHARED 0x0001u /* == TRUE for SH 1.5 compatibility */
|
||||
#define MEM_POOL_SERIALIZE 0x0002u /* pool used in more than one thread */
|
||||
#define MEM_POOL_VIRTUAL_LOCK 0x0004u /* pool is locked in physical memory */
|
||||
#define MEM_POOL_ZEROINIT 0x0008u /* malloc/new from pool zero-inits */
|
||||
#define MEM_POOL_REGION 0x0010u /* store pool in user-supplied region*/
|
||||
#define MEM_POOL_DEFAULT 0x8000u /* pool with default characteristics */
|
||||
#endif /* MEM_POOL_SHARED */
|
||||
|
||||
MEM_ENTRY4 MEM_POOL MemDefaultPool;
|
||||
|
||||
/* Default memory pool for C malloc, C++ new (for backwards compatibility) */
|
||||
#define MEM_DEFAULT_POOL MemDefaultPool
|
||||
|
||||
/* define and initialize these variables at file scope to change defaults */
|
||||
extern unsigned short MemDefaultPoolBlockSizeFS;
|
||||
extern unsigned MemDefaultPoolPageSize;
|
||||
extern unsigned MemDefaultPoolFlags;
|
||||
|
||||
/* define SmartHeap_malloc at file scope if you
|
||||
* are intentionally _NOT_ linking in the SmartHeap malloc definition
|
||||
* ditto for SmartHeap operator new, and fmalloc et al.
|
||||
*/
|
||||
extern int SmartHeap_malloc;
|
||||
extern int SmartHeap_far_malloc;
|
||||
extern int SmartHeap_new;
|
||||
|
||||
#define MEM_ERROR_RET ULONG_MAX
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* !defined(_SMARTHEAP_H) */
|
||||
|
||||
|
||||
/*** Function Prototypes ***/
|
||||
|
||||
#ifndef _SMARTHEAP_PROT
|
||||
#define _SMARTHEAP_PROT
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _shAPI
|
||||
#if defined(MEM_DEBUG) && !defined(SHI_NO_MEM_DEBUG)
|
||||
#define _shAPI(ret, name) MEM_ENTRY1 ret MEM_ENTRY _dbg ## name
|
||||
#else
|
||||
#define _shAPI(ret, name) MEM_ENTRY1 ret MEM_ENTRY name
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _dbgARGS
|
||||
#if defined(MEM_DEBUG) && !defined(SHI_NO_MEM_DEBUG)
|
||||
#define _dbgARGS1 const char MEM_FAR *, int
|
||||
#define _dbgARGS , _dbgARGS1
|
||||
#else
|
||||
#define _dbgARGS1 void
|
||||
#define _dbgARGS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/**** HOW TO READ SmartHeap PROTOTYPES ****
|
||||
* prototypes below have the follow syntax in order to support both debug
|
||||
* and non-debug APIs with single-source:
|
||||
*
|
||||
* _shiAPI(<return-type>, <API name>)([<parms>] _dbgARGS);
|
||||
*
|
||||
* the above translates to a C prototype as follows:
|
||||
*
|
||||
* <return-type> <API name>([<parms>]);
|
||||
*/
|
||||
|
||||
/* Library Version */
|
||||
MEM_ENTRY1 MEM_VERSION MEM_ENTRY MemVersion(void);
|
||||
|
||||
/* Library Registration */
|
||||
_shAPI(MEM_BOOL, MemRegisterTask)(_dbgARGS1);
|
||||
_shAPI(MEM_BOOL, MemUnregisterTask)(_dbgARGS1);
|
||||
|
||||
/* Memory Pool Functions */
|
||||
_shAPI(MEM_POOL, MemPoolInit)(unsigned _dbgARGS);
|
||||
_shAPI(MEM_POOL, MemPoolInitFS)(MEM_USHORT, unsigned long,
|
||||
unsigned _dbgARGS);
|
||||
_shAPI(MEM_POOL, MemPoolInitRegion)(void MEM_FAR *,
|
||||
unsigned long size, unsigned _dbgARGS);
|
||||
_shAPI(MEM_POOL, MemPoolInitNamedShared)(const char MEM_FAR *,
|
||||
unsigned long size,unsigned _dbgARGS);
|
||||
_shAPI(MEM_POOL, MemPoolInitNamedSharedEx)(void MEM_FAR *addr,
|
||||
unsigned pidCount, unsigned long MEM_FAR *pids, void MEM_FAR *security,
|
||||
const char MEM_FAR *name, unsigned long size, unsigned flags _dbgARGS);
|
||||
_shAPI(MEM_POOL, MemPoolAttachShared)(MEM_POOL, const char MEM_FAR * _dbgARGS);
|
||||
_shAPI(MEM_BOOL, MemPoolFree)(MEM_POOL _dbgARGS);
|
||||
MEM_POOL MEM_ENTRY MemInitDefaultPool(void);
|
||||
MEM_BOOL MEM_ENTRY MemFreeDefaultPool(void);
|
||||
_shAPI(unsigned, MemPoolSetPageSize)(MEM_POOL, unsigned _dbgARGS);
|
||||
_shAPI(MEM_BOOL, MemPoolSetBlockSizeFS)(MEM_POOL, MEM_USHORT _dbgARGS);
|
||||
_shAPI(MEM_BOOL, MemPoolSetSmallBlockSize)(MEM_POOL, MEM_USHORT _dbgARGS);
|
||||
_shAPI(unsigned long, MemPoolSetFloor)(MEM_POOL, unsigned long _dbgARGS);
|
||||
_shAPI(unsigned long, MemPoolSetCeiling)(MEM_POOL, unsigned long _dbgARGS);
|
||||
_shAPI(unsigned long, MemPoolPreAllocate)(MEM_POOL, unsigned long,
|
||||
MEM_BLOCK_TYPE _dbgARGS);
|
||||
_shAPI(unsigned long, MemPoolPreAllocateHandles)(MEM_POOL,
|
||||
unsigned long _dbgARGS);
|
||||
_shAPI(unsigned long, MemPoolShrink)(MEM_POOL _dbgARGS);
|
||||
_shAPI(unsigned long, MemPoolSize)(MEM_POOL _dbgARGS);
|
||||
_shAPI(unsigned long, MemPoolCount)(MEM_POOL _dbgARGS);
|
||||
_shAPI(MEM_BOOL, MemPoolInfo)(MEM_POOL, void MEM_FAR *,
|
||||
MEM_POOL_INFO MEM_FAR* _dbgARGS);
|
||||
_shAPI(MEM_POOL_STATUS, MemPoolFirst)(MEM_POOL_INFO MEM_FAR *,
|
||||
MEM_BOOL _dbgARGS);
|
||||
_shAPI(MEM_POOL_STATUS,MemPoolNext)(MEM_POOL_INFO MEM_FAR*,MEM_BOOL _dbgARGS);
|
||||
_shAPI(MEM_POOL_STATUS,MemPoolWalk)(MEM_POOL,MEM_POOL_ENTRY MEM_FAR*_dbgARGS);
|
||||
_shAPI(MEM_BOOL, MemPoolCheck)(MEM_POOL _dbgARGS);
|
||||
_shAPI(MEM_BOOL, MemPoolLock)(MEM_POOL _dbgARGS);
|
||||
_shAPI(MEM_BOOL, MemPoolUnlock)(MEM_POOL _dbgARGS);
|
||||
|
||||
/* Handle-based API for moveable memory within heap. */
|
||||
_shAPI(MEM_HANDLE, MemAlloc)(MEM_POOL, unsigned, unsigned long _dbgARGS);
|
||||
_shAPI(MEM_HANDLE, MemReAlloc)(MEM_HANDLE,unsigned long,unsigned _dbgARGS);
|
||||
_shAPI(MEM_BOOL, MemFree)(MEM_HANDLE _dbgARGS);
|
||||
_shAPI(void MEM_FAR *, MemLock)(MEM_HANDLE _dbgARGS);
|
||||
_shAPI(unsigned, MemUnlock)(MEM_HANDLE _dbgARGS);
|
||||
_shAPI(void MEM_FAR *, MemFix)(MEM_HANDLE _dbgARGS);
|
||||
_shAPI(unsigned, MemUnfix)(MEM_HANDLE _dbgARGS);
|
||||
_shAPI(unsigned, MemLockCount)(MEM_HANDLE _dbgARGS);
|
||||
#ifndef MemFlags
|
||||
#define MemFlags(mem) MemLockCount(mem)
|
||||
#endif
|
||||
_shAPI(MEM_BOOL, MemIsMoveable)(MEM_HANDLE _dbgARGS);
|
||||
_shAPI(unsigned long, MemSize)(MEM_HANDLE _dbgARGS);
|
||||
_shAPI(unsigned long, MemSizeRequested)(MEM_HANDLE _dbgARGS);
|
||||
_shAPI(MEM_HANDLE, MemHandle)(void MEM_FAR * _dbgARGS);
|
||||
#ifndef MEM_REFERENCE
|
||||
#ifdef MEM_DEBUG
|
||||
MEM_ENTRY1 void MEM_FAR * MEM_ENTRY _dbgMemReference(MEM_HANDLE,
|
||||
const char MEM_FAR *, int);
|
||||
#define MEM_REFERENCE(handle) \
|
||||
_dbgMemReference(handle, __FILE__, __LINE__)
|
||||
#else
|
||||
#define MEM_REFERENCE(handle) (*(void MEM_FAR * MEM_FAR *)handle)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* General Heap Allocator (returns direct pointer to memory) */
|
||||
_shAPI(void MEM_FAR*,MemAllocPtr)(MEM_POOL,unsigned long,unsigned _dbgARGS);
|
||||
_shAPI(void MEM_FAR *, MemReAllocPtr)(void MEM_FAR *, unsigned long,
|
||||
unsigned _dbgARGS);
|
||||
_shAPI(MEM_BOOL, MemFreePtr)(void MEM_FAR * _dbgARGS);
|
||||
_shAPI(unsigned long, MemSizePtr)(void MEM_FAR * _dbgARGS);
|
||||
_shAPI(MEM_POINTER_STATUS, MemCheckPtr)(MEM_POOL, void MEM_FAR * _dbgARGS);
|
||||
|
||||
/* Fixed-Size Allocator */
|
||||
_shAPI(void MEM_FAR *, MemAllocFS)(MEM_POOL _dbgARGS);
|
||||
_shAPI(MEM_BOOL, MemFreeFS)(void MEM_FAR * _dbgARGS);
|
||||
|
||||
/* Error Handling Functions */
|
||||
MEM_ENTRY1 MEM_ERROR_FN MEM_ENTRY MemSetErrorHandler(MEM_ERROR_FN);
|
||||
MEM_ENTRY1 MEM_BOOL MEM_ENTRY MemDefaultErrorHandler(MEM_ERROR_INFO MEM_FAR*);
|
||||
MEM_ENTRY1 void MEM_ENTRY MemErrorUnwind(void);
|
||||
|
||||
#ifdef MEM_WIN32
|
||||
/* patching control */
|
||||
|
||||
#ifndef MEM_PATCHING_DEFINED
|
||||
#define MEM_PATCHING_DEFINED
|
||||
typedef enum
|
||||
{
|
||||
MEM_PATCH_ALL = 0,
|
||||
MEM_SKIP_PATCHING_THIS_DLL = 1,
|
||||
MEM_DISABLE_SYSTEM_HEAP_PATCHING = 2,
|
||||
MEM_DISABLE_ALL_PATCHING = 4|2|1,
|
||||
MEM_PATCHING_INT_MAX = INT_MAX /* to ensure enum is full int in size */
|
||||
} MEM_PATCHING;
|
||||
#endif /* MEM_PATCHING_DEFINED */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
MEM_PATCHING MEM_ENTRY MemSetPatching(const char ***skipDLLs);
|
||||
|
||||
#endif /* MEM_WIN32 */
|
||||
|
||||
/* internal routines */
|
||||
MEM_ENTRY1 MEM_BOOL MEM_ENTRY _shi_enterCriticalSection(void);
|
||||
MEM_ENTRY1 void MEM_ENTRY _shi_leaveCriticalSection(void);
|
||||
MEM_BOOL shi_call_new_handler_msc(size_t, MEM_BOOL);
|
||||
|
||||
|
||||
/* Wrapper macros for debugging API */
|
||||
#ifndef _SHI_dbgMacros
|
||||
#ifdef MEM_DEBUG
|
||||
#define MemRegisterTask() _dbgMemRegisterTask(__FILE__, __LINE__)
|
||||
#define MemUnregisterTask() _dbgMemUnregisterTask(__FILE__, __LINE__)
|
||||
#define MemPoolInit(flags) _dbgMemPoolInit(flags, __FILE__, __LINE__)
|
||||
#define MemPoolInitFS(bs, bc, f) _dbgMemPoolInitFS(bs,bc,f,__FILE__,__LINE__)
|
||||
#define MemPoolInitRegion(addr, sz, f) \
|
||||
_dbgMemPoolInitRegion(addr, sz, f, __FILE__, __LINE__)
|
||||
#define MemPoolInitNamedShared(nm, sz, f) \
|
||||
_dbgMemPoolInitNamedShared(nm, sz, f, __FILE__, __LINE__)
|
||||
#define MemPoolInitNamedSharedEx(a, c, p, sec, nm, sz, f) \
|
||||
_dbgMemPoolInitNamedSharedEx(a, c, p, sec, nm, sz, f, __FILE__, __LINE__)
|
||||
#define MemPoolAttachShared(p, n) \
|
||||
_dbgMemPoolAttachShared(p, n, __FILE__, __LINE__)
|
||||
#define MemPoolFree(pool) _dbgMemPoolFree(pool, __FILE__, __LINE__)
|
||||
#define MemPoolSetPageSize(p, s) _dbgMemPoolSetPageSize(p,s,__FILE__,__LINE__)
|
||||
#define MemPoolSetBlockSizeFS(p, s) \
|
||||
_dbgMemPoolSetBlockSizeFS(p, s, __FILE__, __LINE__)
|
||||
#define MemPoolSetSmallBlockSize(p, s) \
|
||||
_dbgMemPoolSetSmallBlockSize(p, s, __FILE__, __LINE__)
|
||||
#define MemPoolSetFloor(p, f) _dbgMemPoolSetFloor(p, f, __FILE__, __LINE__)
|
||||
#define MemPoolSetCeiling(p, c) _dbgMemPoolSetCeiling(p,c,__FILE__, __LINE__)
|
||||
#define MemPoolPreAllocate(p,s,t) \
|
||||
_dbgMemPoolPreAllocate(p,s,t,__FILE__, __LINE__)
|
||||
#define MemPoolPreAllocateHandles(p,h) \
|
||||
_dbgMemPoolPreAllocateHandles(p,h,__FILE__, __LINE__)
|
||||
#define MemPoolShrink(p) _dbgMemPoolShrink(p, __FILE__, __LINE__)
|
||||
#define MemPoolCheck(p) _dbgMemPoolCheck(p, __FILE__, __LINE__)
|
||||
#define MemPoolWalk(p, e) _dbgMemPoolWalk(p, e, __FILE__, __LINE__)
|
||||
#define MemPoolSize(p) _dbgMemPoolSize(p, __FILE__, __LINE__)
|
||||
#define MemPoolCount(p) _dbgMemPoolCount(p, __FILE__, __LINE__)
|
||||
#define MemPoolInfo(p,x,i) _dbgMemPoolInfo(p,x,i, __FILE__, __LINE__)
|
||||
#define MemPoolFirst(i, b) _dbgMemPoolFirst(i, b, __FILE__, __LINE__)
|
||||
#define MemPoolNext(i, b) _dbgMemPoolNext(i, b, __FILE__, __LINE__)
|
||||
#define MemPoolLock(p) _dbgMemPoolLock(p, __FILE__, __LINE__)
|
||||
#define MemPoolUnlock(p) _dbgMemPoolUnlock(p, __FILE__, __LINE__)
|
||||
#define MemAlloc(p, f, s) _dbgMemAlloc(p, f, s, __FILE__, __LINE__)
|
||||
#define MemReAlloc(h, s, f) _dbgMemReAlloc(h, s, f, __FILE__, __LINE__)
|
||||
#define MemFree(h) _dbgMemFree(h, __FILE__, __LINE__)
|
||||
#define MemLock(h) _dbgMemLock(h, __FILE__, __LINE__)
|
||||
#define MemUnlock(h) _dbgMemUnlock(h, __FILE__, __LINE__)
|
||||
#define MemFix(h) _dbgMemFix(h, __FILE__, __LINE__)
|
||||
#define MemUnfix(h) _dbgMemUnfix(h, __FILE__, __LINE__)
|
||||
#define MemSize(h) _dbgMemSize(h, __FILE__, __LINE__)
|
||||
#define MemSizeRequested(h) _dbgMemSizeRequested(h, __FILE__, __LINE__)
|
||||
#define MemLockCount(h) _dbgMemLockCount(h, __FILE__, __LINE__)
|
||||
#define MemIsMoveable(h) _dbgMemIsMoveable(h, __FILE__, __LINE__)
|
||||
#define MemHandle(p) _dbgMemHandle(p, __FILE__, __LINE__)
|
||||
#define MemAllocPtr(p, s, f) _dbgMemAllocPtr(p, s, f, __FILE__, __LINE__)
|
||||
#define MemReAllocPtr(p, s, f) _dbgMemReAllocPtr(p, s, f, __FILE__,__LINE__)
|
||||
#define MemFreePtr(p) _dbgMemFreePtr(p, __FILE__, __LINE__)
|
||||
#define MemSizePtr(p) _dbgMemSizePtr(p, __FILE__, __LINE__)
|
||||
#define MemCheckPtr(p, x) _dbgMemCheckPtr(p, x, __FILE__, __LINE__)
|
||||
#define MemAllocFS(p) _dbgMemAllocFS(p, __FILE__, __LINE__)
|
||||
#define MemFreeFS(p) _dbgMemFreeFS(p, __FILE__, __LINE__)
|
||||
|
||||
#else /* MEM_DEBUG */
|
||||
|
||||
/* MEM_DEBUG not defined: define dbgMemXXX as no-op macros
|
||||
* each macro returns "success" value when MEM_DEBUG not defined
|
||||
*/
|
||||
#ifndef dbgMemBreakpoint
|
||||
#define dbgMemBreakpoint() ((void)0)
|
||||
#define dbgMemCheckAll() 1
|
||||
#define dbgMemCheckPtr(p, f, s) 1
|
||||
#define dbgMemDeferFreeing(b) 1
|
||||
#define dbgMemFormatCall(i, b, s) 0
|
||||
#define dbgMemFormatErrorInfo(i, b, s) 0
|
||||
#define dbgMemPoolDeferFreeing(p, b) 1
|
||||
#define dbgMemFreeDeferred() 1
|
||||
#define dbgMemPoolFreeDeferred(p) 1
|
||||
#define dbgMemPoolInfo(p, b) 1
|
||||
#define dbgMemPoolSetCheckFrequency(p, f) 1
|
||||
#define dbgMemPoolSetDeferQueueLen(p, b) 1
|
||||
#define dbgMemPoolSetName(p, n) 1
|
||||
#define dbgMemProtectPtr(p, f) 1
|
||||
#define dbgMemPtrInfo(p, b) 1
|
||||
#define dbgMemReallocMoves(b) 1
|
||||
#define dbgMemReportLeakage(p, c1, c2) 1
|
||||
#define dbgMemReportWrongTaskRef(b) 1
|
||||
#define dbgMemScheduleChecking(b, p, i) 1
|
||||
#define dbgMemSetCheckFrequency(f) 1
|
||||
#define dbgMemSetCheckpoint(c) 1
|
||||
#define dbgMemSetDefaultErrorOutput(x, f) 1
|
||||
#define dbgMemSetDeferQueueLen(l) 1
|
||||
#define dbgMemSetDeferSizeThreshold(s) 1
|
||||
#define dbgMemSetEntryHandler(f) 0
|
||||
#define dbgMemSetExitHandler(f) 0
|
||||
#define dbgMemSetFreeFill(c) 1
|
||||
#define dbgMemSetGuardFill(c) 1
|
||||
#define dbgMemSetGuardSize(s) 1
|
||||
#define dbgMemSetInUseFill(c) 1
|
||||
#define dbgMemSetCallstackChains(s) 1
|
||||
#define dbgMemSetStackChecking(s) 1
|
||||
#define dbgMemSetSafetyLevel(s) 1
|
||||
#define dbgMemSettingsInfo(b) 1
|
||||
#define dbgMemSuppressFreeFill(b) 1
|
||||
#define dbgMemTotalCount() 1
|
||||
#define dbgMemTotalSize() 1
|
||||
#define dbgMemWalkHeap(b) MEM_POOL_OK
|
||||
#endif /* dbgMemBreakpoint */
|
||||
|
||||
#endif /* MEM_DEBUG */
|
||||
#endif /* _SHI_dbgMacros */
|
||||
|
||||
#if defined(__WATCOMC__) && defined(__SW_3S)
|
||||
/* Watcom stack calling convention */
|
||||
#pragma aux MemDefaultPool "_*";
|
||||
#pragma aux MemDefaultPoolBlockSizeFS "_*";
|
||||
#pragma aux MemDefaultPoolPageSize "_*";
|
||||
#pragma aux MemDefaultPoolFlags "_*";
|
||||
#pragma aux SmartHeap_malloc "_*";
|
||||
#pragma aux SmartHeap_far_malloc "_*";
|
||||
#pragma aux SmartHeap_new "_*";
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* !defined(_SMARTHEAP_PROT) */
|
||||
159
3rdparty/smartheap/SMRTHEAP.HPP
vendored
Normal file
159
3rdparty/smartheap/SMRTHEAP.HPP
vendored
Normal file
@ -0,0 +1,159 @@
|
||||
// smrtheap.hpp -- SmartHeap public C++ header file
|
||||
// Professional Memory Management Library
|
||||
//
|
||||
// Copyright (C) 1991-1996 by Arthur D. Applegate
|
||||
// All Rights Reserved.
|
||||
//
|
||||
// No part of this source code may be copied, modified or reproduced
|
||||
// in any form without retaining the above copyright notice.
|
||||
// This source code, or source code derived from it, may not be redistributed
|
||||
// without express written permission of the author.
|
||||
//
|
||||
// COMMENTS:
|
||||
// - Include this header file to call the SmartHeap-specific versions of
|
||||
// operators new (i.e. with placement syntax), to:
|
||||
// o allocate from a specific memory pool;
|
||||
// o specify allocation flags, such as zero-initialization;
|
||||
// o resize an allocation.
|
||||
//
|
||||
// - If you include this header file, you must compile and link shnew.cpp, or
|
||||
// link with one of the SmartHeap static operator new libraries:
|
||||
// sh[l|d]XXXX.lib
|
||||
//
|
||||
// - Can be used in both EXEs and DLLs.
|
||||
//
|
||||
// - For 16-bit x86 platforms, use only in large or compact memory model.
|
||||
//
|
||||
// - If you do not want to use SmartHeap's global operator new but you do
|
||||
// want to use SmartHeap's other facilities in a C++ application, then
|
||||
// include the smrtheap.h header file but do not include this header file,
|
||||
// and do not link with shnew.cpp. The two ".Xpp" files are present
|
||||
// ONLY for the purpose of defining operator new and operator delete.
|
||||
//
|
||||
// - Use the MemDefaultPool global variable to refer to a memory pool to pass
|
||||
// to SmartHeap functions that accept a pool as a parameter,
|
||||
// e.g. MemPoolCount, MemPoolSize, MemPoolWalk, etc.
|
||||
//
|
||||
|
||||
#if !defined(_SMARTHEAP_HPP)
|
||||
#define _SMARTHEAP_HPP
|
||||
|
||||
#if defined(_MSC_VER) \
|
||||
&& (defined(M_I86LM) || defined(M_I86CM) || defined(M_I86HM)) \
|
||||
&& !defined(MEM_HUGE)
|
||||
#define MEM_HUGE 0x8000u
|
||||
#endif
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
/* Borland C++ does not treat extern "C++" correctly */
|
||||
extern "C++"
|
||||
{
|
||||
#endif /* __BORLANDC__ */
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 900
|
||||
#pragma warning(disable : 4507)
|
||||
#endif
|
||||
|
||||
#if defined(new)
|
||||
#if defined(MEM_DEBUG)
|
||||
#undef new
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <new.h>
|
||||
|
||||
#include "smrtheap.h"
|
||||
|
||||
#if defined(new)
|
||||
#if defined(MEM_DEBUG)
|
||||
#undef new
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ((defined(__BORLANDC__) && (__BORLANDC__ >= 0x450)) \
|
||||
|| (defined(__WATCOMC__) && __WATCOMC__ >= 1000) \
|
||||
|| (defined(__IBMCPP__) && __IBMCPP__ >= 250))
|
||||
#define SHI_ARRAY_NEW 1
|
||||
#endif
|
||||
|
||||
void MEM_FAR * MEM_ENTRY_ANSI shi_New(unsigned long sz, unsigned flags=0, MEM_POOL pool=0);
|
||||
|
||||
// operator new variants:
|
||||
|
||||
|
||||
// version of new that passes memory allocation flags
|
||||
// (e.g. MEM_ZEROINIT to zero-initialize memory)
|
||||
// call with syntax 'ptr = new (flags) <type>'
|
||||
inline void MEM_FAR *operator new(size_t sz, unsigned flags)
|
||||
{ return shi_New(sz, flags); }
|
||||
|
||||
// version of new that allocates from a specified memory pool with alloc flags
|
||||
// call with the syntax 'ptr = new (pool, [flags=0]) <type>'
|
||||
inline void MEM_FAR *operator new(size_t sz, MEM_POOL pool, unsigned flags=0)
|
||||
{ return shi_New(sz, flags, pool); }
|
||||
#ifdef SHI_ARRAY_NEW
|
||||
inline void MEM_FAR *operator new[](size_t sz, MEM_POOL pool, unsigned flags=0)
|
||||
{ return shi_New(sz, flags, pool); }
|
||||
#endif
|
||||
|
||||
// version of new that changes the size of a memory block previously allocated
|
||||
// from an SmartHeap memory pool
|
||||
// call with the syntax 'ptr = new (ptr, flags) <type>'
|
||||
#if !defined(MEM_DEBUG) || !defined(__HIGHC__)
|
||||
/* bug in MetaWare High C++ parser confuses this with new(file,line) */
|
||||
inline void MEM_FAR *operator new(size_t new_sz, void MEM_FAR *lpMem,
|
||||
unsigned flags)
|
||||
{ return MemReAllocPtr(lpMem, new_sz, flags); }
|
||||
#ifdef SHI_ARRAY_NEW
|
||||
inline void MEM_FAR *operator new[](size_t new_sz, void MEM_FAR *lpMem,
|
||||
unsigned flags)
|
||||
{ return MemReAllocPtr(lpMem, new_sz, flags); }
|
||||
#endif // SHI_ARRAY_NEW
|
||||
#endif
|
||||
|
||||
|
||||
// new_handler prototypes: note that MSC/C++ prototype differs from the
|
||||
// protosed ANSI standard prototype for set_new_handler
|
||||
#ifdef __MWERKS__
|
||||
#define MEM_CPP_THROW throw()
|
||||
#else
|
||||
#define MEM_CPP_THROW
|
||||
#endif // __MWERKS__
|
||||
#ifndef _CRTIMP
|
||||
#define _CRTIMP
|
||||
#endif // _CRTIMP
|
||||
#ifdef _MSC_VER
|
||||
_CRTIMP _PNH MEM_ENTRY_ANSI _set_new_handler(_PNH);
|
||||
#if UINT_MAX == 0xFFFFu
|
||||
_PNH MEM_ENTRY_ANSI _set_fnew_handler(_PNH);
|
||||
_PNHH MEM_ENTRY_ANSI _set_hnew_handler(_PNHH);
|
||||
#endif // UINT_MAX
|
||||
#endif // _MSC_VER
|
||||
typedef void (MEM_ENTRY_ANSI * pnh)();
|
||||
_CRTIMP pnh MEM_ENTRY_ANSI set_new_handler(pnh) MEM_CPP_THROW;
|
||||
|
||||
#ifndef DBG_FORMAL
|
||||
#define DBG_FORMAL
|
||||
#define DBG_ACTUAL
|
||||
#ifndef DEBUG_NEW
|
||||
#define DEBUG_NEW new
|
||||
#endif // DEBUG_NEW
|
||||
#define DEBUG_NEW1(x_) new(x_)
|
||||
#define DEBUG_NEW2(x_, y_) new(x_, y_)
|
||||
#define DEBUG_NEW3(x_, y_, z_) new(x_, y_, z_)
|
||||
#define DEBUG_DELETE delete
|
||||
#endif
|
||||
|
||||
#ifdef DEFINE_NEW_MACRO
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 900
|
||||
#pragma warning(default : 4507)
|
||||
#endif
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
}
|
||||
#endif /* __BORLANDC__ */
|
||||
|
||||
#endif /* !defined(_SMARTHEAP_HPP) */
|
||||
@ -1,8 +1,10 @@
|
||||
cmake_minimum_required(VERSION 3.0...3.5 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
|
||||
|
||||
project(isle CXX)
|
||||
|
||||
option(ISLE_BUILD_APP "Build ISLE.EXE application" ON)
|
||||
option(ISLE_USE_SMARTHEAP "Build with SmartHeap" ${MSVC})
|
||||
option(ISLE_USE_DX5 "Build with internal DirectX 5 SDK" ON)
|
||||
|
||||
add_library(lego1 SHARED
|
||||
LEGO1/act1state.cpp
|
||||
@ -45,6 +47,8 @@ add_library(lego1 SHARED
|
||||
LEGO1/jukeboxstate.cpp
|
||||
LEGO1/legoact2state.cpp
|
||||
LEGO1/legoactioncontrolpresenter.cpp
|
||||
LEGO1/legoactor.cpp
|
||||
LEGO1/legoactor.cpp
|
||||
LEGO1/legoanimactor.cpp
|
||||
LEGO1/legoanimationmanager.cpp
|
||||
LEGO1/legoanimmmpresenter.cpp
|
||||
@ -88,6 +92,8 @@ add_library(lego1 SHARED
|
||||
LEGO1/legoworldpresenter.cpp
|
||||
LEGO1/motorcycle.cpp
|
||||
LEGO1/mxatomid.cpp
|
||||
LEGO1/mxatomidcounter.cpp
|
||||
LEGO1/mxaudiomanager.cpp
|
||||
LEGO1/mxaudiopresenter.cpp
|
||||
LEGO1/mxautolocker.cpp
|
||||
LEGO1/mxbackgroundaudiomanager.cpp
|
||||
@ -97,11 +103,15 @@ add_library(lego1 SHARED
|
||||
LEGO1/mxcontrolpresenter.cpp
|
||||
LEGO1/mxcore.cpp
|
||||
LEGO1/mxcriticalsection.cpp
|
||||
LEGO1/mxdirect3d.cpp
|
||||
LEGO1/mxdirectdraw.cpp
|
||||
LEGO1/mxdiskstreamcontroller.cpp
|
||||
LEGO1/mxdiskstreamprovider.cpp
|
||||
LEGO1/mxdisplaysurface.cpp
|
||||
LEGO1/mxdsaction.cpp
|
||||
LEGO1/mxdsactionlist.cpp
|
||||
LEGO1/mxdsanim.cpp
|
||||
LEGO1/mxdsbuffer.cpp
|
||||
LEGO1/mxdschunk.cpp
|
||||
LEGO1/mxdsevent.cpp
|
||||
LEGO1/mxdsfile.cpp
|
||||
@ -115,6 +125,7 @@ add_library(lego1 SHARED
|
||||
LEGO1/mxdssound.cpp
|
||||
LEGO1/mxdssource.cpp
|
||||
LEGO1/mxdsstill.cpp
|
||||
LEGO1/mxdsstreamingaction.cpp
|
||||
LEGO1/mxdssubscriber.cpp
|
||||
LEGO1/mxentity.cpp
|
||||
LEGO1/mxeventmanager.cpp
|
||||
@ -124,6 +135,8 @@ add_library(lego1 SHARED
|
||||
LEGO1/mxloopingflcpresenter.cpp
|
||||
LEGO1/mxloopingmidipresenter.cpp
|
||||
LEGO1/mxloopingsmkpresenter.cpp
|
||||
LEGO1/mxmatrix.cpp
|
||||
LEGO1/mxmediamanager.cpp
|
||||
LEGO1/mxmediapresenter.cpp
|
||||
LEGO1/mxmidipresenter.cpp
|
||||
LEGO1/mxmusicpresenter.cpp
|
||||
@ -134,22 +147,26 @@ add_library(lego1 SHARED
|
||||
LEGO1/mxomnicreateparam.cpp
|
||||
LEGO1/mxomnicreateparambase.cpp
|
||||
LEGO1/mxpalette.cpp
|
||||
LEGO1/mxparam.cpp
|
||||
LEGO1/mxpresenter.cpp
|
||||
LEGO1/mxpresenterlist.cpp
|
||||
LEGO1/mxramstreamcontroller.cpp
|
||||
LEGO1/mxscheduler.cpp
|
||||
LEGO1/mxsemaphore.cpp
|
||||
LEGO1/mxsmkpresenter.cpp
|
||||
LEGO1/mxsoundmanager.cpp
|
||||
LEGO1/mxsoundpresenter.cpp
|
||||
LEGO1/mxstillpresenter.cpp
|
||||
LEGO1/mxstreamcontroller.cpp
|
||||
LEGO1/mxstreamer.cpp
|
||||
LEGO1/mxstring.cpp
|
||||
LEGO1/mxstringvariable.cpp
|
||||
LEGO1/mxthread.cpp
|
||||
LEGO1/mxticklemanager.cpp
|
||||
LEGO1/mxtimer.cpp
|
||||
LEGO1/mxtransitionmanager.cpp
|
||||
LEGO1/mxunknown100dc6b0.cpp
|
||||
LEGO1/mxunknown100dc6e0.cpp
|
||||
LEGO1/mxvariable.cpp
|
||||
LEGO1/mxvariabletable.cpp
|
||||
LEGO1/mxvector.cpp
|
||||
LEGO1/mxvideomanager.cpp
|
||||
LEGO1/mxvideoparam.cpp
|
||||
LEGO1/mxvideoparamflags.cpp
|
||||
@ -177,8 +194,24 @@ add_library(lego1 SHARED
|
||||
LEGO1/viewmanager.cpp
|
||||
)
|
||||
|
||||
if (ISLE_USE_SMARTHEAP)
|
||||
add_library(SmartHeap::SmartHeap STATIC IMPORTED)
|
||||
set_target_properties(SmartHeap::SmartHeap PROPERTIES
|
||||
IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/3rdparty/smartheap/SHLW32MT.LIB"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/3rdparty/smartheap"
|
||||
INTERFACE_COMPILE_OPTIONS "/FI${CMAKE_SOURCE_DIR}/3rdparty/smartheap/SMRTHEAP.HPP")
|
||||
|
||||
target_link_libraries(lego1 PRIVATE SmartHeap::SmartHeap)
|
||||
endif()
|
||||
|
||||
# Use internal DirectX 5 if required
|
||||
if (ISLE_USE_DX5)
|
||||
target_include_directories(lego1 PRIVATE "${CMAKE_SOURCE_DIR}/3rdparty/dx5/inc")
|
||||
target_link_directories(lego1 PRIVATE "${CMAKE_SOURCE_DIR}/3rdparty/dx5/lib")
|
||||
endif()
|
||||
|
||||
# Link libraries
|
||||
target_link_libraries(lego1 PRIVATE ddraw dsound winmm)
|
||||
target_link_libraries(lego1 PRIVATE ddraw dsound dxguid winmm)
|
||||
|
||||
# Make sure filenames are ALL CAPS
|
||||
set_property(TARGET lego1 PROPERTY OUTPUT_NAME LEGO1)
|
||||
@ -194,6 +227,16 @@ if (ISLE_BUILD_APP)
|
||||
# Include LEGO1 headers in ISLE
|
||||
target_include_directories(isle PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1")
|
||||
|
||||
# Use internal DirectX 5 if required
|
||||
if (ISLE_USE_DX5)
|
||||
target_include_directories(isle PRIVATE "${CMAKE_SOURCE_DIR}/3rdparty/dx5/inc")
|
||||
target_link_directories(isle PRIVATE "${CMAKE_SOURCE_DIR}/3rdparty/dx5/lib")
|
||||
endif()
|
||||
|
||||
if (ISLE_USE_SMARTHEAP)
|
||||
target_link_libraries(isle PRIVATE SmartHeap::SmartHeap)
|
||||
endif()
|
||||
|
||||
# Link DSOUND, WINMM, and LEGO1
|
||||
target_link_libraries(isle PRIVATE dsound winmm lego1)
|
||||
|
||||
|
||||
@ -90,10 +90,10 @@ void IsleApp::Close()
|
||||
|
||||
VideoManager()->Get3DManager()->GetLego3DView()->GetViewManager()->RemoveAll(NULL);
|
||||
|
||||
Lego()->RemoveWorld(ds.GetAtomId(), ds.GetUnknown1c());
|
||||
Lego()->vtable24(ds);
|
||||
Lego()->RemoveWorld(ds.GetAtomId(), ds.GetObjectId());
|
||||
Lego()->DeleteObject(ds);
|
||||
TransitionManager()->SetWaitIndicator(NULL);
|
||||
Lego()->vtable3c();
|
||||
Lego()->vtable0x3c();
|
||||
|
||||
MxLong lVar8;
|
||||
do {
|
||||
@ -101,7 +101,7 @@ void IsleApp::Close()
|
||||
} while (lVar8 == 0);
|
||||
|
||||
while (Lego()) {
|
||||
if (Lego()->vtable28(ds) != FALSE) {
|
||||
if (Lego()->DoesEntityExist(ds)) {
|
||||
break;
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ BOOL IsleApp::SetupLegoOmni()
|
||||
BOOL failure = Lego()->Create(MxOmniCreateParam(mediaPath, (struct HWND__ *) m_windowHandle, m_videoParam, MxOmniCreateFlags())) == FAILURE;
|
||||
if (!failure) {
|
||||
VariableTable()->SetVariable("ACTOR_01", "");
|
||||
TickleManager()->vtable1c(VideoManager(), 10);
|
||||
TickleManager()->SetClientTickleInterval(VideoManager(), 10);
|
||||
result = TRUE;
|
||||
}
|
||||
|
||||
@ -232,7 +232,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||
g_reqEnableRMDevice = 0;
|
||||
VideoManager()->EnableRMDevice();
|
||||
g_rmDisabled = 0;
|
||||
Lego()->vtable3c();
|
||||
Lego()->vtable0x3c();
|
||||
}
|
||||
|
||||
if (g_closed) {
|
||||
@ -357,7 +357,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
return DefWindowProcA(hWnd, uMsg, wParam, lParam);
|
||||
case WM_DISPLAYCHANGE:
|
||||
if (g_isle && VideoManager() && g_isle->m_fullScreen && VideoManager()->m_unk74 && VideoManager()->m_unk74[0x220]) {
|
||||
if (g_isle && VideoManager() && g_isle->m_fullScreen && VideoManager()->GetDirect3D() && VideoManager()->GetDirect3D()->GetDeviceModeFinder()) {
|
||||
int targetWidth = LOWORD(lParam);
|
||||
int targetHeight = HIWORD(lParam);
|
||||
int targetDepth = wParam;
|
||||
@ -379,7 +379,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
else if (!valid) {
|
||||
g_rmDisabled = 1;
|
||||
Lego()->vtable38();
|
||||
Lego()->StartTimer();
|
||||
VideoManager()->DisableRMDevice();
|
||||
}
|
||||
}
|
||||
@ -729,7 +729,7 @@ inline void IsleApp::Tick(BOOL sleepIfNotNextFrame)
|
||||
|
||||
ds.SetAtomId(stream->atom);
|
||||
ds.SetUnknown24(-1);
|
||||
ds.SetUnknown1c(0);
|
||||
ds.SetObjectId(0);
|
||||
VideoManager()->EnableFullScreenMovie(TRUE, TRUE);
|
||||
|
||||
if (Start(&ds) != SUCCESS) {
|
||||
@ -738,7 +738,7 @@ inline void IsleApp::Tick(BOOL sleepIfNotNextFrame)
|
||||
} else {
|
||||
ds.SetAtomId(stream->atom);
|
||||
ds.SetUnknown24(-1);
|
||||
ds.SetUnknown1c(0);
|
||||
ds.SetObjectId(0);
|
||||
if (Start(&ds) != SUCCESS) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ MxLong Act2Brick::Notify(MxParam &p)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1007a7f0 STUB
|
||||
MxLong Act2Brick::Tickle()
|
||||
MxResult Act2Brick::Tickle()
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ class Act2Brick : public LegoPathActor
|
||||
virtual ~Act2Brick() override; // vtable+0x0
|
||||
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual MxLong Tickle() override; // vtable+0x08
|
||||
virtual MxResult Tickle() override; // vtable+0x08
|
||||
|
||||
// OFFSET: LEGO1 0x1007a360
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
|
||||
@ -1,7 +1,21 @@
|
||||
#include "ambulance.h"
|
||||
|
||||
// OFFSET: LEGO1 0x10035ee0 STUB
|
||||
#include "decomp.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Ambulance, 0x184);
|
||||
|
||||
// OFFSET: LEGO1 0x10035ee0
|
||||
Ambulance::Ambulance()
|
||||
{
|
||||
// TODO
|
||||
this->m_unk168 = 0;
|
||||
this->m_unk16a = -1;
|
||||
this->m_unk164 = 0;
|
||||
this->m_unk16c = 0;
|
||||
this->m_unk174 = -1;
|
||||
this->m_unk16e = 0;
|
||||
this->m_unk178 = -1;
|
||||
this->m_unk170 = 0;
|
||||
this->m_unk172 = 0;
|
||||
this->m_unk13c = 40.0;
|
||||
this->m_unk17c = 1.0;
|
||||
}
|
||||
@ -22,7 +22,20 @@ class Ambulance : public IslePathActor
|
||||
{
|
||||
return !strcmp(name, Ambulance::ClassName()) || IslePathActor::IsA(name);
|
||||
}
|
||||
|
||||
private:
|
||||
// TODO: Ambulance fields
|
||||
undefined m_unk160[4];
|
||||
MxS32 m_unk164;
|
||||
MxS16 m_unk168;
|
||||
MxS16 m_unk16a;
|
||||
MxS16 m_unk16c;
|
||||
MxS16 m_unk16e;
|
||||
MxS16 m_unk170;
|
||||
MxS16 m_unk172;
|
||||
MxS32 m_unk174;
|
||||
MxS32 m_unk178;
|
||||
MxFloat m_unk17c;
|
||||
undefined m_unk180[4];
|
||||
};
|
||||
|
||||
#endif // AMBULANCE_H
|
||||
|
||||
@ -1,8 +1,12 @@
|
||||
#include "bike.h"
|
||||
|
||||
// OFFSET: LEGO1 0x10076670 STUB
|
||||
DECOMP_SIZE_ASSERT(Bike, 0x164);
|
||||
|
||||
// OFFSET: LEGO1 0x10076670
|
||||
Bike::Bike()
|
||||
{
|
||||
// TODO
|
||||
this->m_unk13c = 20.0;
|
||||
this->m_unk150 = 3.0;
|
||||
this->m_unk148 = 1;
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef BIKE_H
|
||||
#define BIKE_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "islepathactor.h"
|
||||
|
||||
// VTABLE 0x100d9808
|
||||
@ -22,7 +23,9 @@ class Bike : public IslePathActor
|
||||
{
|
||||
return !strcmp(name, Bike::ClassName()) || IslePathActor::IsA(name);
|
||||
}
|
||||
|
||||
private:
|
||||
// TODO: Bike fields
|
||||
undefined m_unk160[4];
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -11,4 +11,31 @@
|
||||
#define COMPAT_CONST
|
||||
#endif
|
||||
|
||||
#endif // ISLECOMPAT_H
|
||||
// DIsable "nonstandard extension used : 'bool'" warning spam
|
||||
#pragma warning( disable : 4237 )
|
||||
|
||||
// Disable "identifier was truncated to '255' characters" warning.
|
||||
// Impossible to avoid this if using STL map or set.
|
||||
// This removes most (but not all) occurrences of the warning.
|
||||
#pragma warning( disable : 4786 )
|
||||
|
||||
#define MSVC420_VERSION 1020
|
||||
|
||||
// STL compatibility.
|
||||
#if defined(_MSC_VER) && _MSC_VER <= MSVC420_VERSION
|
||||
#include "mxstl.h"
|
||||
#else
|
||||
#include <algorithm>
|
||||
#include <list>
|
||||
#include <set>
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
// We use `override` so newer compilers can tell us our vtables are valid,
|
||||
// however this keyword was added in C++11, so we define it as empty for
|
||||
// compatibility with older compilers.
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 1200 // 1200 corresponds to VC6.0 but "override" was probably added even later
|
||||
#define override
|
||||
#endif
|
||||
|
||||
#endif // ISLECOMPAT_H
|
||||
|
||||
@ -4,6 +4,10 @@
|
||||
#define DECOMP_STATIC_ASSERT(V) namespace { typedef int foo[(V)?1:-1]; }
|
||||
#define DECOMP_SIZE_ASSERT(T, S) DECOMP_STATIC_ASSERT(sizeof(T) == S)
|
||||
|
||||
#ifndef _countof
|
||||
#define _countof(arr) sizeof(arr) / sizeof(arr[0])
|
||||
#endif
|
||||
|
||||
typedef unsigned char undefined;
|
||||
typedef unsigned short undefined2;
|
||||
typedef unsigned int undefined4;
|
||||
|
||||
@ -1,7 +1,12 @@
|
||||
#include "dunebuggy.h"
|
||||
|
||||
// OFFSET: LEGO1 0x10067bb0 STUB
|
||||
#include "decomp.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(DuneBuggy, 0x16c);
|
||||
|
||||
// OFFSET: LEGO1 0x10067bb0
|
||||
DuneBuggy::DuneBuggy()
|
||||
{
|
||||
// TODO
|
||||
this->m_unk13c = 25.0;
|
||||
this->m_unk164 = 1.0;
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef DUNEBUGGY_H
|
||||
#define DUNEBUGGY_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "islepathactor.h"
|
||||
|
||||
// VTABLE 0x100d8f98
|
||||
@ -22,7 +23,11 @@ class DuneBuggy : public IslePathActor
|
||||
{
|
||||
return !strcmp(name, DuneBuggy::ClassName()) || IslePathActor::IsA(name);
|
||||
}
|
||||
|
||||
private:
|
||||
// TODO: Double check DuneBuggy field types
|
||||
undefined4 m_unk160;
|
||||
MxFloat m_unk164;
|
||||
undefined4 m_unk168;
|
||||
};
|
||||
|
||||
#endif // DUNEBUGGY_H
|
||||
|
||||
@ -21,7 +21,7 @@ MxLong GasStation::Notify(MxParam &p)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10005c90 STUB
|
||||
MxLong GasStation::Tickle()
|
||||
MxResult GasStation::Tickle()
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ class GasStation : public LegoWorld
|
||||
virtual ~GasStation() override; // vtable+0x0
|
||||
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual MxLong Tickle() override; // vtable+0x8
|
||||
virtual MxResult Tickle() override; // vtable+0x8
|
||||
|
||||
// OFFSET: LEGO1 0x10004780
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
|
||||
@ -21,7 +21,7 @@ MxLong Infocenter::Notify(MxParam &p)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10070af0 STUB
|
||||
MxLong Infocenter::Tickle()
|
||||
MxResult Infocenter::Tickle()
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ class Infocenter : public LegoWorld
|
||||
virtual ~Infocenter() override;
|
||||
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual MxLong Tickle() override; // vtable+0x8
|
||||
virtual MxResult Tickle() override; // vtable+0x8
|
||||
|
||||
// OFFSET: LEGO1 0x1006eb40
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
|
||||
@ -1 +1,4 @@
|
||||
#include "isleactor.h"
|
||||
|
||||
// NOTE: This is copied from base class LegoActor. IsleActor may in fact be larger but we don't know yet.
|
||||
DECOMP_SIZE_ASSERT(IsleActor, 0x78)
|
||||
|
||||
@ -1 +1,17 @@
|
||||
#include "islepathactor.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(IslePathActor, 0x160)
|
||||
|
||||
// OFFSET: LEGO1 0x1001a200
|
||||
IslePathActor::IslePathActor()
|
||||
{
|
||||
this->m_pLegoWorld = NULL;
|
||||
this->m_unk13c = 6.0;
|
||||
this->m_unk15c = 1.0;
|
||||
this->m_unk158 = 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10002e10
|
||||
IslePathActor::~IslePathActor()
|
||||
{
|
||||
}
|
||||
|
||||
@ -2,12 +2,17 @@
|
||||
#define ISLEPATHACTOR_H
|
||||
|
||||
#include "legopathactor.h"
|
||||
#include "legoworld.h"
|
||||
#include "mxtypes.h"
|
||||
|
||||
// VTABLE 0x100d4398
|
||||
// SIZE >= 0x230
|
||||
// SIZE 0x160
|
||||
class IslePathActor : public LegoPathActor
|
||||
{
|
||||
public:
|
||||
public:
|
||||
IslePathActor();
|
||||
~IslePathActor();
|
||||
|
||||
// OFFSET: LEGO1 0x10002ea0
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
{
|
||||
@ -20,6 +25,11 @@ class IslePathActor : public LegoPathActor
|
||||
{
|
||||
return !strcmp(name, IslePathActor::ClassName()) || LegoPathActor::IsA(name);
|
||||
}
|
||||
|
||||
private:
|
||||
LegoWorld* m_pLegoWorld; // 0x154
|
||||
MxFloat m_unk158;
|
||||
MxFloat m_unk15c;
|
||||
};
|
||||
|
||||
#endif // ISLEPATHACTOR_H
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
#include "jetski.h"
|
||||
|
||||
// OFFSET: LEGO1 0x1007e3b0 STUB
|
||||
DECOMP_SIZE_ASSERT(Jetski, 0x164);
|
||||
|
||||
// OFFSET: LEGO1 0x1007e3b0
|
||||
Jetski::Jetski()
|
||||
{
|
||||
// TODO
|
||||
this->m_unk13c = 25.0;
|
||||
this->m_unk150 = 2.0;
|
||||
this->m_unk148 = 1;
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef JETSKI_H
|
||||
#define JETSKI_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "islepathactor.h"
|
||||
|
||||
// VTABLE 0x100d9ec8
|
||||
@ -22,7 +23,9 @@ class Jetski : public IslePathActor
|
||||
{
|
||||
return !strcmp(name, Jetski::ClassName()) || IslePathActor::IsA(name);
|
||||
}
|
||||
|
||||
private:
|
||||
// TODO: Jetski fields
|
||||
undefined m_unk160[4];
|
||||
};
|
||||
|
||||
|
||||
|
||||
3
LEGO1/legoactor.cpp
Normal file
3
LEGO1/legoactor.cpp
Normal file
@ -0,0 +1,3 @@
|
||||
#include "legoactor.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoActor, 0x78)
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef LEGOACTOR_H
|
||||
#define LEGOACTOR_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "legoentity.h"
|
||||
|
||||
// VTABLE 0x100d6d68
|
||||
@ -20,6 +21,10 @@ class LegoActor : public LegoEntity
|
||||
{
|
||||
return !strcmp(name, LegoActor::ClassName()) || LegoEntity::IsA(name);
|
||||
}
|
||||
|
||||
private:
|
||||
undefined unk68[0x10];
|
||||
|
||||
};
|
||||
|
||||
#endif // LEGOACTOR_H
|
||||
|
||||
@ -23,7 +23,7 @@ MxLong LegoAnimationManager::Notify(MxParam &p)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10061cc0 STUB
|
||||
MxLong LegoAnimationManager::Tickle()
|
||||
MxResult LegoAnimationManager::Tickle()
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ class LegoAnimationManager : public MxCore
|
||||
virtual ~LegoAnimationManager() override; // vtable+0x0
|
||||
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual MxLong Tickle() override; // vtable+0x8
|
||||
virtual MxResult Tickle() override; // vtable+0x8
|
||||
|
||||
// OFFSET: LEGO1 0x1005ec80
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
|
||||
@ -9,18 +9,18 @@ const char *g_set = "set";
|
||||
const char *g_reset = "reset";
|
||||
|
||||
// OFFSET: LEGO1 0x1003bfb0
|
||||
LegoBackgroundColor::LegoBackgroundColor(const char *p_name, const char *p_colorString)
|
||||
LegoBackgroundColor::LegoBackgroundColor(const char *p_key, const char *p_value)
|
||||
{
|
||||
m_name = p_name;
|
||||
m_name.ToUpperCase();
|
||||
SetColorString(p_colorString);
|
||||
m_key = p_key;
|
||||
m_key.ToUpperCase();
|
||||
SetValue(p_value);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1003c070
|
||||
void LegoBackgroundColor::SetColorString(const char *p_colorString)
|
||||
void LegoBackgroundColor::SetValue(const char *p_colorString)
|
||||
{
|
||||
m_string = p_colorString;
|
||||
m_string.ToLowerCase();
|
||||
m_value = p_colorString;
|
||||
m_value.ToLowerCase();
|
||||
|
||||
LegoVideoManager *videomanager = VideoManager();
|
||||
if (!videomanager || !p_colorString)
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
#ifndef LEGOBACKGROUNDCOLOR_H
|
||||
#define LEGOBACKGROUNDCOLOR_H
|
||||
|
||||
#include "mxstringvariable.h"
|
||||
#include "mxvariable.h"
|
||||
|
||||
class LegoBackgroundColor : public MxStringVariable
|
||||
class LegoBackgroundColor : public MxVariable
|
||||
{
|
||||
public:
|
||||
__declspec(dllexport) LegoBackgroundColor(const char *p_name, const char *p_colorString);
|
||||
void SetColorString(const char *p_colorString);
|
||||
__declspec(dllexport) LegoBackgroundColor(const char *p_key, const char *p_value);
|
||||
void SetValue(const char *p_colorString);
|
||||
|
||||
private:
|
||||
float h;
|
||||
|
||||
@ -21,7 +21,7 @@ MxLong LegoCarBuild::Notify(MxParam &p)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100238b0 STUB
|
||||
MxLong LegoCarBuild::Tickle()
|
||||
MxResult LegoCarBuild::Tickle()
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ class LegoCarBuild : public LegoWorld
|
||||
virtual ~LegoCarBuild() override;
|
||||
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual MxLong Tickle() override; // vtable+0x8
|
||||
virtual MxResult Tickle() override; // vtable+0x8
|
||||
|
||||
// OFFSET: LEGO1 0x10022940
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
|
||||
@ -13,7 +13,7 @@ LegoControlManager::~LegoControlManager()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10029600 STUB
|
||||
MxLong LegoControlManager::Tickle()
|
||||
MxResult LegoControlManager::Tickle()
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ class LegoControlManager : public MxCore
|
||||
LegoControlManager();
|
||||
virtual ~LegoControlManager() override; // vtable+0x0
|
||||
|
||||
virtual MxLong Tickle() override; // vtable+0x8
|
||||
virtual MxResult Tickle() override; // vtable+0x8
|
||||
|
||||
// OFFSET: LEGO1 0x10028cb0
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
#include "legoentity.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoEntity, 0x68)
|
||||
|
||||
// OFFSET: LEGO1 0x1000c290
|
||||
LegoEntity::~LegoEntity()
|
||||
{
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
#include "mxentity.h"
|
||||
|
||||
// VTABLE 0x100d4858
|
||||
// SIZE 0x68 (probably)
|
||||
class LegoEntity : public MxEntity
|
||||
{
|
||||
public:
|
||||
|
||||
@ -35,7 +35,7 @@ void LegoInputManager::UnRegister(MxCore *)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005b8b0 STUB
|
||||
MxLong LegoInputManager::Tickle()
|
||||
MxResult LegoInputManager::Tickle()
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ class LegoInputManager : public MxPresenter
|
||||
__declspec(dllexport) void Register(MxCore *);
|
||||
__declspec(dllexport) void UnRegister(MxCore *);
|
||||
|
||||
virtual MxLong Tickle() override; // vtable+0x8
|
||||
virtual MxResult Tickle() override; // vtable+0x8
|
||||
|
||||
undefined m_pad40[0x15c];
|
||||
int m_joystickIndex;
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
#include "legoomni.h"
|
||||
|
||||
#include "mxdsobject.h"
|
||||
|
||||
// 0x100f4588
|
||||
char *g_nocdSourceName = NULL;
|
||||
|
||||
@ -37,10 +39,58 @@ int LegoOmni::GetCurrPathInfo(LegoPathBoundary **,int &)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b6ff0 STUB
|
||||
void MakeSourceName(char *, const char *)
|
||||
// OFFSET: LEGO1 0x100b6ff0
|
||||
void MakeSourceName(char *p_output, const char *p_input)
|
||||
{
|
||||
// TODO
|
||||
const char *cln = strchr(p_input, ':');
|
||||
if (cln) {
|
||||
p_input = cln + 1;
|
||||
}
|
||||
|
||||
strcpy(p_output, p_input);
|
||||
|
||||
strlwr(p_output);
|
||||
|
||||
char *extLoc = strstr(p_output, ".si");
|
||||
if (extLoc) {
|
||||
*extLoc = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b7050
|
||||
MxBool KeyValueStringParse(char *p_outputValue, char *p_key, char *p_source)
|
||||
{
|
||||
MxBool didMatch = FALSE;
|
||||
|
||||
MxS16 len = strlen(p_source);
|
||||
char *temp = new char[len + 1];
|
||||
strcpy(temp, p_source);
|
||||
|
||||
char *token = strtok(temp, ", \t\r\n:");
|
||||
while (token) {
|
||||
len -= (strlen(token) + 1);
|
||||
|
||||
if (strcmpi(token, p_key) == 0) {
|
||||
if (p_outputValue && len > 0) {
|
||||
char *cur = &token[strlen(p_key)];
|
||||
cur++;
|
||||
while (*cur != ',') {
|
||||
if (*cur == ' ' || *cur == '\0' || *cur == '\t' || *cur == '\n' || *cur == '\r')
|
||||
break;
|
||||
*p_outputValue++ = *cur++;
|
||||
}
|
||||
*p_outputValue = '\0';
|
||||
}
|
||||
|
||||
didMatch = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
token = strtok(NULL, ", \t\r\n:");
|
||||
}
|
||||
|
||||
delete[] temp;
|
||||
return didMatch;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b7210
|
||||
@ -111,10 +161,38 @@ MxBackgroundAudioManager *BackgroundAudioManager()
|
||||
return LegoOmni::GetInstance()->GetBackgroundAudioManager();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c0280 STUB
|
||||
MxDSObject *CreateStreamObject(MxDSFile *,MxS16)
|
||||
// OFFSET: LEGO1 0x100c0280
|
||||
MxDSObject *CreateStreamObject(MxDSFile *p_file, MxS16 p_ofs)
|
||||
{
|
||||
// TODO
|
||||
char *buf;
|
||||
_MMCKINFO tmp_chunk;
|
||||
|
||||
if (p_file->Seek(((MxLong*)p_file->GetBuffer())[p_ofs], 0)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (p_file->Read((MxU8*)&tmp_chunk.ckid, 8) == 0 && tmp_chunk.ckid == FOURCC('M', 'x', 'S', 't')) {
|
||||
if (p_file->Read((MxU8*)&tmp_chunk.ckid, 8) == 0 && tmp_chunk.ckid == FOURCC('M', 'x', 'O', 'b')) {
|
||||
|
||||
buf = new char[tmp_chunk.cksize];
|
||||
if (!buf) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (p_file->Read((MxU8*)buf, tmp_chunk.cksize) != 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Save a copy so we can clean up properly, because
|
||||
// this function will alter the pointer value.
|
||||
char *copy = buf;
|
||||
MxDSObject *obj = DeserializeDSObjectDispatch(&buf, -1);
|
||||
delete[] copy;
|
||||
return obj;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -187,48 +265,49 @@ void LegoOmni::Destroy()
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
void LegoOmni::vtable20()
|
||||
void LegoOmni::vtable0x20()
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
void LegoOmni::vtable24(MxDSAction &ds)
|
||||
void LegoOmni::DeleteObject(MxDSAction &ds)
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
MxBool LegoOmni::vtable28(MxDSAction &ds)
|
||||
MxBool LegoOmni::DoesEntityExist(MxDSAction &ds)
|
||||
{
|
||||
// FIXME: Stub
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LegoOmni::vtable2c()
|
||||
void LegoOmni::vtable0x2c()
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
void LegoOmni::vtable30()
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
void LegoOmni::vtable34()
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
void LegoOmni::vtable38()
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
void LegoOmni::vtable3c()
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
unsigned char LegoOmni::vtable40()
|
||||
int LegoOmni::vtable0x30(char*, int, MxCore*)
|
||||
{
|
||||
// FIXME: Stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
void LegoOmni::NotifyCurrentEntity()
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
void LegoOmni::StartTimer()
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
void LegoOmni::vtable0x3c()
|
||||
{
|
||||
// FIXME: Stub
|
||||
}
|
||||
|
||||
MxBool LegoOmni::vtable40()
|
||||
{
|
||||
// FIXME: Stub
|
||||
return 0;
|
||||
|
||||
@ -36,33 +36,33 @@ class LegoOmni : public MxOmni
|
||||
LegoOmni();
|
||||
virtual ~LegoOmni(); // vtable+00
|
||||
|
||||
virtual MxLong Notify(MxParam &p); // vtable+04
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+04
|
||||
|
||||
// OFFSET: LEGO1 0x10058aa0
|
||||
inline virtual const char *ClassName() const // vtable+0c
|
||||
inline virtual const char *ClassName() const override // vtable+0c
|
||||
{
|
||||
// 0x100f671c
|
||||
return "LegoOmni";
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10058ab0
|
||||
inline virtual MxBool IsA(const char *name) const // vtable+10
|
||||
inline virtual MxBool IsA(const char *name) const override // vtable+10
|
||||
{
|
||||
return !strcmp(name, LegoOmni::ClassName()) || MxOmni::IsA(name);
|
||||
}
|
||||
|
||||
virtual void Init(); // vtable+14
|
||||
virtual MxResult Create(COMPAT_CONST MxOmniCreateParam &p); // vtable+18
|
||||
virtual void Destroy(); // vtable+1c
|
||||
virtual void vtable20();
|
||||
virtual void vtable24(MxDSAction &ds);
|
||||
virtual MxBool vtable28(MxDSAction &ds);
|
||||
virtual void vtable2c();
|
||||
virtual void vtable30();
|
||||
virtual void vtable34();
|
||||
virtual void vtable38();
|
||||
virtual void vtable3c();
|
||||
virtual unsigned char vtable40();
|
||||
virtual void Init() override; // vtable+14
|
||||
virtual MxResult Create(COMPAT_CONST MxOmniCreateParam &p) override; // vtable+18
|
||||
virtual void Destroy() override; // vtable+1c
|
||||
virtual void vtable0x20() override;
|
||||
virtual void DeleteObject(MxDSAction &ds) override;
|
||||
virtual MxBool DoesEntityExist(MxDSAction &ds) override;
|
||||
virtual void vtable0x2c() override;
|
||||
virtual int vtable0x30(char*, int, MxCore*) override;
|
||||
virtual void NotifyCurrentEntity() override;
|
||||
virtual void StartTimer() override;
|
||||
virtual void vtable0x3c() override;
|
||||
virtual MxBool vtable40();
|
||||
|
||||
LegoVideoManager *GetVideoManager() { return (LegoVideoManager *) m_videoManager; }
|
||||
LegoSoundManager *GetSoundManager() { return (LegoSoundManager *)m_soundManager;}
|
||||
@ -113,5 +113,6 @@ __declspec(dllexport) MxLong Start(MxDSAction *a);
|
||||
LegoBuildingManager* BuildingManager();
|
||||
Isle* GetIsle();
|
||||
LegoPlantManager* PlantManager();
|
||||
MxBool KeyValueStringParse(char *, char *, char *);
|
||||
|
||||
#endif // LEGOOMNI_H
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
#include "legopalettepresenter.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoPalettePresenter, 0x68)
|
||||
|
||||
// OFFSET: LEGO1 0x10079e50
|
||||
LegoPalettePresenter::LegoPalettePresenter()
|
||||
{
|
||||
@ -12,8 +14,8 @@ LegoPalettePresenter::~LegoPalettePresenter()
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1007a0d0 STUB
|
||||
// OFFSET: LEGO1 0x1007a0d0
|
||||
void LegoPalettePresenter::Init()
|
||||
{
|
||||
// TODO
|
||||
this->m_unk64 = 0;
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef LEGOPALETTEPRESENTER_H
|
||||
#define LEGOPALETTEPRESENTER_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "mxvideopresenter.h"
|
||||
|
||||
// VTABLE 0x100d9aa0
|
||||
@ -27,6 +28,7 @@ class LegoPalettePresenter : public MxVideoPresenter
|
||||
private:
|
||||
void Init();
|
||||
|
||||
undefined4 m_unk64;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
#include "legopathactor.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoPathActor, 0x154)
|
||||
|
||||
// OFFSET: LEGO1 0x1002d700 STUB
|
||||
LegoPathActor::LegoPathActor()
|
||||
{
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define LEGOPATHACTOR_H
|
||||
|
||||
#include "legoactor.h"
|
||||
#include "mxtypes.h"
|
||||
|
||||
// VTABLE 0x100d6e28
|
||||
// SIZE 0x154 (from inlined construction at 0x1000a346)
|
||||
@ -24,7 +25,15 @@ class LegoPathActor : public LegoActor
|
||||
{
|
||||
return !strcmp(name, LegoPathActor::ClassName()) || LegoActor::IsA(name);
|
||||
}
|
||||
|
||||
protected:
|
||||
// TODO: the types
|
||||
undefined unk78[0xc4];
|
||||
MxFloat m_unk13c;
|
||||
MxS32 m_unk140;
|
||||
MxS32 m_unk144;
|
||||
undefined m_unk148;
|
||||
MxS32 m_unk14c;
|
||||
MxFloat m_unk150;
|
||||
};
|
||||
|
||||
#endif // LEGOPATHACTOR_H
|
||||
|
||||
@ -13,7 +13,7 @@ LegoPathController::~LegoPathController()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10045c10 STUB
|
||||
MxLong LegoPathController::Tickle()
|
||||
MxResult LegoPathController::Tickle()
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
|
||||
@ -11,7 +11,7 @@ class LegoPathController : public MxCore
|
||||
LegoPathController();
|
||||
virtual ~LegoPathController() override;
|
||||
|
||||
virtual MxLong Tickle() override; // vtable+08
|
||||
virtual MxResult Tickle() override; // vtable+08
|
||||
|
||||
// OFFSET: LEGO1 0x10045110
|
||||
inline const char *ClassName() const override // vtable+0xc
|
||||
|
||||
@ -1,19 +1,23 @@
|
||||
#include "legophonemepresenter.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoPhonemePresenter, 0x88);
|
||||
|
||||
// OFFSET: LEGO1 0x1004e180
|
||||
LegoPhonemePresenter::LegoPhonemePresenter()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1004e3b0 STUB
|
||||
// OFFSET: LEGO1 0x1004e3b0
|
||||
void LegoPhonemePresenter::Init()
|
||||
{
|
||||
// TODO
|
||||
m_unk68 = 0;
|
||||
m_unk6c = 0;
|
||||
m_unk70 = 0;
|
||||
m_unk84 = 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1004e340 STUB
|
||||
// OFFSET: LEGO1 0x1004e340
|
||||
LegoPhonemePresenter::~LegoPhonemePresenter()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
#ifndef LEGOPHONEMEPRESENTER_H
|
||||
#define LEGOPHONEMEPRESENTER_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "mxflcpresenter.h"
|
||||
#include "mxstring.h"
|
||||
#include "mxtypes.h"
|
||||
|
||||
// VTABLE 0x100d8040
|
||||
// SIZE 0x88
|
||||
@ -20,7 +23,11 @@ class LegoPhonemePresenter : public MxFlcPresenter
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
||||
int m_unk68;
|
||||
int m_unk6c;
|
||||
undefined m_unk70;
|
||||
MxString m_string; // 0x74
|
||||
undefined m_unk84;
|
||||
};
|
||||
|
||||
#endif // LEGOPHONEMEPRESENTER_H
|
||||
|
||||
@ -13,7 +13,7 @@ LegoPlantManager::~LegoPlantManager()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10026e00 STUB
|
||||
MxLong LegoPlantManager::Tickle()
|
||||
MxResult LegoPlantManager::Tickle()
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ class LegoPlantManager : public MxCore
|
||||
LegoPlantManager();
|
||||
virtual ~LegoPlantManager() override; // vtable+0x0
|
||||
|
||||
virtual MxLong Tickle() override; // vtable+0x8
|
||||
virtual MxResult Tickle() override; // vtable+0x8
|
||||
|
||||
// OFFSET: LEGO1 0x10026290
|
||||
inline const char *ClassName() const override // vtable+0xc
|
||||
|
||||
@ -13,7 +13,7 @@ LegoSoundManager::~LegoSoundManager()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1002a3a0 STUB
|
||||
MxLong LegoSoundManager::Tickle()
|
||||
MxResult LegoSoundManager::Tickle()
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
|
||||
@ -10,7 +10,7 @@ class LegoSoundManager : public MxSoundManager
|
||||
public:
|
||||
LegoSoundManager();
|
||||
virtual ~LegoSoundManager() override;
|
||||
virtual MxLong Tickle() override; // vtable+08
|
||||
virtual MxResult Tickle() override; // vtable+08
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef LEGOSTREAM_H
|
||||
#define LEGOSTREAM_H
|
||||
|
||||
#include "compat.h"
|
||||
#include "decomp.h"
|
||||
#include "mxtypes.h"
|
||||
|
||||
@ -70,4 +71,4 @@ class LegoMemoryStream : public LegoStream
|
||||
MxU32 m_offset;
|
||||
};
|
||||
|
||||
#endif // LEGOSTREAM_H
|
||||
#endif // LEGOSTREAM_H
|
||||
|
||||
@ -2,7 +2,9 @@
|
||||
#define LEGOVIDEOMANAGER_H
|
||||
|
||||
#include "mxvideomanager.h"
|
||||
#include "mxdirect3d.h"
|
||||
#include "lego3dmanager.h"
|
||||
#include "decomp.h"
|
||||
|
||||
// VTABLE 0x100d9c88
|
||||
// SIZE 0x590
|
||||
@ -18,13 +20,16 @@ class LegoVideoManager : public MxVideoManager
|
||||
__declspec(dllexport) void MoveCursor(int x, int y);
|
||||
|
||||
inline Lego3DManager *Get3DManager() { return this->m_3dManager; }
|
||||
inline MxDirect3D *GetDirect3D() { return this->m_direct3d; }
|
||||
|
||||
void SetSkyColor(float r, float g, float b);
|
||||
|
||||
int m_unk64;
|
||||
private:
|
||||
undefined4 m_unk64;
|
||||
Lego3DManager *m_3dManager;
|
||||
int m_unk6c;
|
||||
int m_unk70;
|
||||
int *m_unk74;
|
||||
undefined4 m_unk6c;
|
||||
undefined4 m_unk70;
|
||||
MxDirect3D *m_direct3d;
|
||||
};
|
||||
|
||||
#endif // LEGOVIDEOMANAGER_H
|
||||
|
||||
@ -1,20 +1,97 @@
|
||||
#include "mxatomid.h"
|
||||
#include "mxomni.h"
|
||||
|
||||
// OFFSET: LEGO1 0x100acf90
|
||||
MxAtomId::MxAtomId(const char *, LookupMode)
|
||||
MxAtomId::MxAtomId(const char *p_str, LookupMode p_mode)
|
||||
{
|
||||
// TODO
|
||||
if (!MxOmni::GetInstance())
|
||||
return;
|
||||
|
||||
if (!AtomIdCounterSet())
|
||||
return;
|
||||
|
||||
MxAtomIdCounter *counter = GetCounter(p_str, p_mode);
|
||||
m_internal = counter->GetKey()->GetData();
|
||||
counter->Inc();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100acfd0
|
||||
MxAtomId::~MxAtomId()
|
||||
{
|
||||
// TODO
|
||||
Destroy();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100acfe0
|
||||
void MxAtomId::Destroy()
|
||||
{
|
||||
if (!m_internal)
|
||||
return;
|
||||
|
||||
if (!MxOmni::GetInstance())
|
||||
return;
|
||||
|
||||
if (!AtomIdCounterSet())
|
||||
return;
|
||||
|
||||
// The dtor is called on the counter object immediately,
|
||||
// so this syntax should be correct.
|
||||
MxAtomIdCounterSet::iterator it = AtomIdCounterSet()->find(
|
||||
&MxAtomIdCounter(m_internal)
|
||||
);
|
||||
|
||||
MxAtomIdCounter *counter = (MxAtomIdCounter*)(*it);
|
||||
counter->Dec();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ad1c0
|
||||
MxAtomId &MxAtomId::operator=(const MxAtomId &id)
|
||||
MxAtomId &MxAtomId::operator=(const MxAtomId &p_atomId)
|
||||
{
|
||||
// TODO
|
||||
if (m_internal)
|
||||
Destroy();
|
||||
|
||||
if (p_atomId.m_internal && MxOmni::GetInstance() && AtomIdCounterSet()) {
|
||||
MxAtomIdCounter *counter = GetCounter(p_atomId.m_internal, LookupMode_Exact);
|
||||
counter->Inc();
|
||||
}
|
||||
|
||||
m_internal = p_atomId.m_internal;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ad210
|
||||
MxAtomIdCounter* MxAtomId::GetCounter(const char *p_str, LookupMode p_mode)
|
||||
{
|
||||
MxAtomId _unused;
|
||||
MxAtomIdCounter *counter = new MxAtomIdCounter(p_str);
|
||||
|
||||
switch (p_mode) {
|
||||
case LookupMode_LowerCase:
|
||||
case LookupMode_LowerCase2:
|
||||
counter->GetKey()->ToLowerCase();
|
||||
break;
|
||||
case LookupMode_UpperCase:
|
||||
counter->GetKey()->ToUpperCase();
|
||||
break;
|
||||
}
|
||||
|
||||
MxAtomIdCounterSet::iterator it = AtomIdCounterSet()->find(counter);
|
||||
if (it != AtomIdCounterSet()->end()) {
|
||||
// Counter already in the set. Delete temp value and return it.
|
||||
delete counter;
|
||||
counter = *it;
|
||||
} else {
|
||||
// Counter is not in the set. Add it.
|
||||
AtomIdCounterSet()->insert(counter);
|
||||
}
|
||||
|
||||
return counter;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ad7e0
|
||||
void MxAtomId::Clear()
|
||||
{
|
||||
// Reset but do not delete MxAtomId object.
|
||||
Destroy();
|
||||
m_internal = NULL;
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define MXATOMID_H
|
||||
|
||||
#include "mxtypes.h"
|
||||
#include "mxatomidcounter.h"
|
||||
|
||||
enum LookupMode
|
||||
{
|
||||
@ -28,8 +29,15 @@ class MxAtomId
|
||||
return this->m_internal == other.m_internal;
|
||||
}
|
||||
|
||||
void Clear();
|
||||
|
||||
const char *GetInternal() const { return m_internal; }
|
||||
|
||||
private:
|
||||
char *m_internal;
|
||||
MxAtomIdCounter* GetCounter(const char *, LookupMode);
|
||||
void Destroy();
|
||||
|
||||
const char *m_internal;
|
||||
};
|
||||
|
||||
#endif // MXATOMID_H
|
||||
|
||||
18
LEGO1/mxatomidcounter.cpp
Normal file
18
LEGO1/mxatomidcounter.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include "mxatomidcounter.h"
|
||||
#include "decomp.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxAtomIdCounter, 0x14);
|
||||
DECOMP_SIZE_ASSERT(MxAtomIdCounterSet, 0x10);
|
||||
|
||||
// OFFSET: LEGO1 0x100ad7f0
|
||||
void MxAtomIdCounter::Inc()
|
||||
{
|
||||
m_value++;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ad800
|
||||
void MxAtomIdCounter::Dec()
|
||||
{
|
||||
if (m_value)
|
||||
m_value--;
|
||||
}
|
||||
49
LEGO1/mxatomidcounter.h
Normal file
49
LEGO1/mxatomidcounter.h
Normal file
@ -0,0 +1,49 @@
|
||||
#ifndef MXATOMIDCOUNTER_H
|
||||
#define MXATOMIDCOUNTER_H
|
||||
|
||||
#include "mxstring.h"
|
||||
#include "compat.h" // STL
|
||||
|
||||
// Counts the number of existing MxAtomId objects based
|
||||
// on the matching char* string. A <map> seems fit for purpose here:
|
||||
// We have an MxString as a key and MxU16 as the value.
|
||||
// And yet a <set> is the best match. The malloc in MxOmni::Create
|
||||
// for the _Nil node asks for more bytes than a regular node if a <map>
|
||||
// is used, but all nodes are 20 bytes wide with a <set>.
|
||||
// Also: the increment/decrement methods suggest a custom type was used
|
||||
// for the combined key_value_pair, which doesn't seem possible with <map>.
|
||||
|
||||
// SIZE: 0x14 (including padding)
|
||||
class MxAtomIdCounter
|
||||
{
|
||||
public:
|
||||
// always inlined
|
||||
MxAtomIdCounter(const char *p_str)
|
||||
{
|
||||
m_key = p_str;
|
||||
m_value = 0;
|
||||
}
|
||||
|
||||
void Inc();
|
||||
void Dec();
|
||||
inline MxString* GetKey() { return &m_key; };
|
||||
inline MxU16 GetValue() { return m_value; };
|
||||
|
||||
private:
|
||||
MxString m_key;
|
||||
MxU16 m_value;
|
||||
};
|
||||
|
||||
struct MxAtomIdCounterCompare
|
||||
{
|
||||
// OFFSET: LEGO1 0x100ad120
|
||||
int operator()(MxAtomIdCounter* const & p_val0, MxAtomIdCounter* const & p_val1) const
|
||||
{
|
||||
return strcmp(p_val0->GetKey()->GetData(), p_val1->GetKey()->GetData()) > 0;
|
||||
}
|
||||
};
|
||||
|
||||
class MxAtomIdCounterSet : public set<MxAtomIdCounter*, MxAtomIdCounterCompare>
|
||||
{};
|
||||
|
||||
#endif //MXATOMIDCOUNTER_H
|
||||
64
LEGO1/mxaudiomanager.cpp
Normal file
64
LEGO1/mxaudiomanager.cpp
Normal file
@ -0,0 +1,64 @@
|
||||
#include "mxaudiomanager.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxAudioManager, 0x30);
|
||||
|
||||
// GLOBAL: LEGO1 0x10102108
|
||||
MxS32 MxAudioManager::g_unkCount = 0;
|
||||
|
||||
// OFFSET: LEGO1 0x100b8d00
|
||||
MxAudioManager::MxAudioManager()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b8d90
|
||||
MxAudioManager::~MxAudioManager()
|
||||
{
|
||||
LockedReinitialize(TRUE);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b8df0
|
||||
void MxAudioManager::Init()
|
||||
{
|
||||
this->m_unk2c = 100;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b8e00
|
||||
void MxAudioManager::LockedReinitialize(MxBool p_skipDestroy)
|
||||
{
|
||||
this->m_criticalSection.Enter();
|
||||
g_unkCount--;
|
||||
Init();
|
||||
this->m_criticalSection.Leave();
|
||||
|
||||
if (!p_skipDestroy)
|
||||
MxMediaManager::Destroy();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b8e40
|
||||
MxResult MxAudioManager::InitPresenters()
|
||||
{
|
||||
MxResult result = FAILURE;
|
||||
MxBool success = FALSE;
|
||||
|
||||
if (MxMediaManager::InitPresenters() == SUCCESS) {
|
||||
this->m_criticalSection.Enter();
|
||||
success = TRUE;
|
||||
result = SUCCESS;
|
||||
g_unkCount++;
|
||||
}
|
||||
|
||||
if (result)
|
||||
Destroy();
|
||||
|
||||
if (success)
|
||||
this->m_criticalSection.Leave();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b8e90
|
||||
void MxAudioManager::Destroy()
|
||||
{
|
||||
LockedReinitialize(FALSE);
|
||||
}
|
||||
28
LEGO1/mxaudiomanager.h
Normal file
28
LEGO1/mxaudiomanager.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef MXAUDIOMANAGER_H
|
||||
#define MXAUDIOMANAGER_H
|
||||
|
||||
#include "decomp.h"
|
||||
#include "mxmediamanager.h"
|
||||
|
||||
// VTABLE 0x100dc6e0
|
||||
class MxAudioManager : public MxMediaManager
|
||||
{
|
||||
public:
|
||||
MxAudioManager();
|
||||
virtual ~MxAudioManager() override;
|
||||
|
||||
virtual MxResult InitPresenters(); // vtable+14
|
||||
virtual void Destroy(); // vtable+18
|
||||
|
||||
private:
|
||||
void LockedReinitialize(MxBool);
|
||||
|
||||
static MxS32 g_unkCount;
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
|
||||
undefined4 m_unk2c;
|
||||
};
|
||||
|
||||
#endif // MXAUDIOMANAGER_H
|
||||
@ -1,13 +1,31 @@
|
||||
#include "mxbackgroundaudiomanager.h"
|
||||
|
||||
#include "mxomni.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxBackgroundAudioManager, 0x150)
|
||||
|
||||
// OFFSET: LEGO1 0x1007ea90
|
||||
MxBackgroundAudioManager::MxBackgroundAudioManager()
|
||||
{
|
||||
// TODO
|
||||
NotificationManager()->Register(this);
|
||||
m_unka0 = 0;
|
||||
m_unk138 = 0;
|
||||
m_unk13c = 0;
|
||||
m_unk140 = 0;
|
||||
m_unk144 = 0;
|
||||
m_unk148 = 0;
|
||||
m_musicEnabled = FALSE;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1007ec20
|
||||
MxBackgroundAudioManager::~MxBackgroundAudioManager()
|
||||
{
|
||||
// TODO
|
||||
NotificationManager()->Unregister(this);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1007f470
|
||||
void MxBackgroundAudioManager::Stop()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
@ -15,5 +33,17 @@ MxBackgroundAudioManager::~MxBackgroundAudioManager()
|
||||
// OFFSET: LEGO1 0x1007f5f0
|
||||
void MxBackgroundAudioManager::Enable(MxBool p)
|
||||
{
|
||||
// TODO
|
||||
if (this->m_musicEnabled != p) {
|
||||
this->m_musicEnabled = p;
|
||||
if (!p) {
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1007f650
|
||||
void MxBackgroundAudioManager::Init()
|
||||
{
|
||||
this->m_unka0 = 0;
|
||||
this->m_unk13c = 0;
|
||||
}
|
||||
|
||||
@ -2,6 +2,9 @@
|
||||
#define MXBACKGROUNDAUDIOMANAGER_H
|
||||
|
||||
#include "mxcore.h"
|
||||
#include "mxdsaction.h"
|
||||
#include "mxtypes.h"
|
||||
#include "mxnotificationmanager.h"
|
||||
|
||||
// VTABLE 0x100d9fe8
|
||||
// SIZE 0x150
|
||||
@ -25,6 +28,20 @@ class MxBackgroundAudioManager : public MxCore
|
||||
}
|
||||
|
||||
__declspec(dllexport) void Enable(unsigned char p);
|
||||
private:
|
||||
void Stop();
|
||||
void Init();
|
||||
|
||||
MxBool m_musicEnabled; // 0x8
|
||||
MxDSAction m_action1; // 0xc
|
||||
MxS32 m_unka0;
|
||||
MxDSAction m_action2; // 0xa4
|
||||
MxS32 m_unk138;
|
||||
MxS32 m_unk13c;
|
||||
MxS32 m_unk140;
|
||||
MxS32 m_unk144;
|
||||
MxS16 m_unk148;
|
||||
MxAtomId m_unk14c;
|
||||
};
|
||||
|
||||
#endif // MXBACKGROUNDAUDIOMANAGER_H
|
||||
|
||||
@ -1,4 +1,12 @@
|
||||
#include "mxbitmap.h"
|
||||
#include "decomp.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxBITMAPINFO, 1064);
|
||||
|
||||
// The way that the BITMAPFILEHEADER structure ensures the file type is by ensuring it is "BM", which is literally just 0x424d.
|
||||
// Sources: https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmapfileheader, DirectX Complete (1998)
|
||||
// GLOBAL: LEGO1 0x10102184
|
||||
undefined2 g_bitmapSignature = 0x424d;
|
||||
|
||||
// OFFSET: LEGO1 0x100bc980
|
||||
MxBitmap::MxBitmap()
|
||||
@ -7,43 +15,214 @@ MxBitmap::MxBitmap()
|
||||
this->m_bmiHeader = NULL;
|
||||
this->m_paletteData = NULL;
|
||||
this->m_data = NULL;
|
||||
this->m_unk18 = FALSE;
|
||||
this->m_bitDepth = LOWCOLOR;
|
||||
this->m_palette = NULL;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bca10
|
||||
MxBitmap::~MxBitmap()
|
||||
{
|
||||
if (this->m_info != NULL)
|
||||
if (this->m_info)
|
||||
delete m_info;
|
||||
if (this->m_data != NULL)
|
||||
if (this->m_data)
|
||||
delete m_data;
|
||||
if (this->m_palette != NULL)
|
||||
if (this->m_palette)
|
||||
delete m_palette;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bcc40 STUB
|
||||
int MxBitmap::vtable14(int)
|
||||
// OFFSET: LEGO1 0x100bcc40
|
||||
MxResult MxBitmap::ImportBitmap(MxBitmap *p_bitmap)
|
||||
{
|
||||
return 0;
|
||||
MxLong height;
|
||||
MxResult result = FAILURE;
|
||||
|
||||
this->m_info = new MxBITMAPINFO;
|
||||
if(this->m_info) {
|
||||
height = p_bitmap->m_bmiHeader->biHeight;
|
||||
if (height <= 0L) {
|
||||
height = -height;
|
||||
}
|
||||
this->m_data = (LPVOID*) new MxU8[(p_bitmap->m_bmiHeader->biWidth + 3U & -4) * height];
|
||||
if(this->m_data) {
|
||||
memcpy(this->m_info, p_bitmap->m_info, sizeof(MxBITMAPINFO));
|
||||
|
||||
height = p_bitmap->m_bmiHeader->biHeight;
|
||||
if (height <= 0L) {
|
||||
height = -height;
|
||||
}
|
||||
memcpy(this->m_data, p_bitmap->m_data, (p_bitmap->m_bmiHeader->biWidth + 3U & -4) * height);
|
||||
|
||||
result = SUCCESS;
|
||||
this->m_bmiHeader = &this->m_info->bmiHeader;
|
||||
this->m_paletteData = this->m_info->bmiColors;
|
||||
}
|
||||
}
|
||||
if (result != SUCCESS) {
|
||||
if (this->m_info) {
|
||||
delete this->m_info;
|
||||
this->m_info = NULL;
|
||||
}
|
||||
if (this->m_data) {
|
||||
delete this->m_data;
|
||||
this->m_data = NULL;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bcba0 STUB
|
||||
int MxBitmap::vtable18(BITMAPINFOHEADER *p_bmiHeader)
|
||||
// OFFSET: LEGO1 0x100bcba0
|
||||
MxResult MxBitmap::ImportBitmapInfo(MxBITMAPINFO *p_info)
|
||||
{
|
||||
return 0;
|
||||
MxResult result = FAILURE;
|
||||
MxLong width = p_info->bmiHeader.biWidth;
|
||||
MxLong height = p_info->bmiHeader.biHeight;
|
||||
// ((width + 3) & -4) clamps width to nearest 4-byte boundary
|
||||
MxLong size = ((width + 3) & -4) * height;
|
||||
|
||||
this->m_info = new MxBITMAPINFO;
|
||||
if (this->m_info) {
|
||||
this->m_data = (LPVOID*) new MxU8[size];
|
||||
if(this->m_data) {
|
||||
memcpy(this->m_info, p_info, sizeof(MxBITMAPINFO));
|
||||
this->m_bmiHeader = &this->m_info->bmiHeader;
|
||||
this->m_paletteData = this->m_info->bmiColors;
|
||||
result = SUCCESS;
|
||||
}
|
||||
}
|
||||
if (result != SUCCESS) {
|
||||
if (this->m_info) {
|
||||
delete this->m_info;
|
||||
this->m_info = NULL;
|
||||
}
|
||||
if (this->m_data) {
|
||||
delete this->m_data;
|
||||
this->m_data = NULL;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bcaa0 STUB
|
||||
int MxBitmap::vtable1c(int p_width, int p_height, MxPalette *p_palette, int)
|
||||
|
||||
// OFFSET: LEGO1 0x100bd450
|
||||
MxResult MxBitmap::ImportColorsToPalette(RGBQUAD* p_rgbquad, MxPalette* p_palette)
|
||||
{
|
||||
return 0;
|
||||
MxResult ret = FAILURE;
|
||||
PALETTEENTRY entries[256];
|
||||
|
||||
if (p_palette) {
|
||||
if (p_palette->GetEntries(entries))
|
||||
return ret;
|
||||
} else {
|
||||
MxPalette local_pal;
|
||||
if (local_pal.GetEntries(entries))
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 256; i++) {
|
||||
p_rgbquad[i].rgbRed = entries[i].peRed;
|
||||
p_rgbquad[i].rgbGreen = entries[i].peGreen;
|
||||
p_rgbquad[i].rgbBlue = entries[i].peBlue;
|
||||
p_rgbquad[i].rgbReserved = 0;
|
||||
}
|
||||
|
||||
ret = SUCCESS;
|
||||
return ret;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bcd60 STUB
|
||||
// OFFSET: LEGO1 0x100bcaa0
|
||||
MxResult MxBitmap::SetSize(int p_width, int p_height, MxPalette *p_palette, int p_bitDepth)
|
||||
{
|
||||
MxResult ret = FAILURE;
|
||||
MxLong size = ((p_width + 3) & -4) * p_height;
|
||||
|
||||
m_info = new MxBITMAPINFO;
|
||||
if (m_info) {
|
||||
m_data = (LPVOID*) new MxU8[size];
|
||||
if (m_data) {
|
||||
m_bmiHeader = &m_info->bmiHeader;
|
||||
m_paletteData = m_info->bmiColors;
|
||||
memset(&m_info->bmiHeader, 0, sizeof(m_info->bmiHeader));
|
||||
|
||||
m_bmiHeader->biSize = sizeof(*m_bmiHeader); // should be 40 bytes
|
||||
m_bmiHeader->biWidth = p_width;
|
||||
m_bmiHeader->biHeight = p_height;
|
||||
m_bmiHeader->biPlanes = 1;
|
||||
m_bmiHeader->biBitCount = 8;
|
||||
m_bmiHeader->biCompression = 0;
|
||||
m_bmiHeader->biSizeImage = size;
|
||||
|
||||
if (!ImportColorsToPalette(m_paletteData, p_palette)) {
|
||||
if (!SetBitDepth(p_bitDepth)) {
|
||||
ret = SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
if (m_info) {
|
||||
delete m_info;
|
||||
m_info = NULL;
|
||||
}
|
||||
|
||||
if (m_data) {
|
||||
delete[] m_data;
|
||||
m_data = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bcd60
|
||||
MxResult MxBitmap::LoadFile(HANDLE p_handle)
|
||||
{
|
||||
return SUCCESS;
|
||||
BOOL ret;
|
||||
LPVOID* lpBuffer;
|
||||
MxLong height;
|
||||
MxResult result = FAILURE;
|
||||
DWORD bytesRead;
|
||||
BITMAPFILEHEADER hdr;
|
||||
MxLong size;
|
||||
|
||||
ret = ReadFile(p_handle, &hdr, sizeof(hdr), &bytesRead, NULL);
|
||||
if (ret && (hdr.bfType == g_bitmapSignature)) {
|
||||
this->m_info = new MxBITMAPINFO;
|
||||
if(this->m_info) {
|
||||
ret = ReadFile(p_handle, this->m_info, sizeof(MxBITMAPINFO), &bytesRead, NULL);
|
||||
if (ret && ((this->m_info->bmiHeader).biBitCount == 8)) {
|
||||
size = hdr.bfSize - (sizeof(MxBITMAPINFO) + sizeof(BITMAPFILEHEADER));
|
||||
lpBuffer = (LPVOID*) new MxU8[size];
|
||||
this->m_data = lpBuffer;
|
||||
if (lpBuffer) {
|
||||
ret = ReadFile(p_handle, lpBuffer, size, &bytesRead, NULL);
|
||||
if(ret) {
|
||||
this->m_bmiHeader = &this->m_info->bmiHeader;
|
||||
this->m_paletteData = this->m_info->bmiColors;
|
||||
if((this->m_info->bmiHeader).biSizeImage == 0) {
|
||||
height = (this->m_info->bmiHeader).biHeight;
|
||||
if (height <= 0L) {
|
||||
height = -height;
|
||||
}
|
||||
(this->m_info->bmiHeader).biSizeImage = ((this->m_info->bmiHeader).biWidth + 3U & -4) * height;
|
||||
}
|
||||
result = SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (result != SUCCESS) {
|
||||
if (this->m_info) {
|
||||
delete this->m_info;
|
||||
this->m_info = NULL;
|
||||
}
|
||||
if (this->m_data) {
|
||||
delete this->m_data;
|
||||
this->m_data = NULL;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bcd10
|
||||
@ -75,12 +254,12 @@ int MxBitmap::vtable28(int)
|
||||
return -1;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ce70 STUB
|
||||
// OFFSET: LEGO1 0x100bce70 STUB
|
||||
void MxBitmap::vtable2c(int, int, int, int, int, int, int)
|
||||
{
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100d020 STUB
|
||||
// OFFSET: LEGO1 0x100bd020 STUB
|
||||
void MxBitmap::vtable30(int, int, int, int, int, int, int)
|
||||
{
|
||||
}
|
||||
@ -88,42 +267,104 @@ void MxBitmap::vtable30(int, int, int, int, int, int, int)
|
||||
// OFFSET: LEGO1 0x100bd1c0
|
||||
MxPalette *MxBitmap::CreatePalette()
|
||||
{
|
||||
// FIXME: This function needs MxPalette to be completed. Also INFERRING usage of MxBool
|
||||
MxPalette *pal = NULL;
|
||||
MxPalette *ppal;
|
||||
MxBool success = FALSE;
|
||||
MxPalette *palette = NULL;
|
||||
|
||||
if(this->m_unk18 == FALSE) {
|
||||
// ppal = MxPalette::FromBitmapPalette(this->m_paletteData);
|
||||
} else {
|
||||
if(this->m_unk18 != TRUE) {
|
||||
if(!success && pal != NULL) {
|
||||
delete pal;
|
||||
pal = NULL;
|
||||
switch (this->m_bitDepth) {
|
||||
case LOWCOLOR:
|
||||
palette = new MxPalette(this->m_paletteData);
|
||||
if (palette)
|
||||
success = TRUE;
|
||||
break;
|
||||
|
||||
case HIGHCOLOR:
|
||||
palette = this->m_palette->Clone();
|
||||
if (palette)
|
||||
success = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!success && palette) {
|
||||
delete palette;
|
||||
palette = NULL;
|
||||
}
|
||||
|
||||
return palette;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bd280
|
||||
void MxBitmap::ImportPalette(MxPalette* p_palette)
|
||||
{
|
||||
// This is weird but it matches. Maybe m_bmiColorsProvided had more
|
||||
// potential values than just true/false at some point?
|
||||
switch (this->m_bitDepth) {
|
||||
case LOWCOLOR:
|
||||
ImportColorsToPalette(this->m_paletteData, p_palette);
|
||||
break;
|
||||
|
||||
case HIGHCOLOR:
|
||||
if (this->m_palette) {
|
||||
delete this->m_palette;
|
||||
}
|
||||
this->m_palette = p_palette->Clone();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bd2d0
|
||||
MxResult MxBitmap::SetBitDepth(MxBool p_bitDepth)
|
||||
{
|
||||
MxResult ret = FAILURE;
|
||||
MxPalette *pal = NULL;
|
||||
|
||||
if (m_bitDepth == p_bitDepth) {
|
||||
// no change: do nothing.
|
||||
ret = SUCCESS;
|
||||
} else {
|
||||
// TODO: Another switch used for this boolean value? Is it not a bool?
|
||||
switch (p_bitDepth) {
|
||||
case 0:
|
||||
ImportColorsToPalette(m_paletteData, m_palette);
|
||||
if (m_palette)
|
||||
delete m_palette;
|
||||
|
||||
m_palette = NULL;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
pal = NULL;
|
||||
pal = new MxPalette(m_paletteData);
|
||||
if (pal) {
|
||||
m_palette = pal;
|
||||
|
||||
// TODO: what is this? zeroing out top half of palette?
|
||||
MxU16 *buf = (MxU16*)m_paletteData;
|
||||
for (MxU16 i = 0; i < 256; i++) {
|
||||
buf[i] = i;
|
||||
}
|
||||
|
||||
m_bitDepth = p_bitDepth;
|
||||
ret = SUCCESS;
|
||||
}
|
||||
break;
|
||||
}
|
||||
//.pal = MxPalette::Clone(this->m_palette);
|
||||
}
|
||||
if(pal != NULL) {
|
||||
success = TRUE;
|
||||
}
|
||||
|
||||
return pal;
|
||||
// If we were unsuccessful overall but did manage to alloc
|
||||
// the MxPalette, free it.
|
||||
if (ret && pal)
|
||||
delete pal;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bd280 STUB
|
||||
void MxBitmap::vtable38(void*)
|
||||
// OFFSET: LEGO1 0x100bd3e0
|
||||
MxResult MxBitmap::StretchBits(HDC p_hdc, int p_xSrc, int p_ySrc, int p_xDest, int p_yDest, int p_destWidth, int p_destHeight)
|
||||
{
|
||||
}
|
||||
// Compression fix?
|
||||
if ((this->m_bmiHeader->biCompression != 16) && (0 < this->m_bmiHeader->biHeight)) {
|
||||
p_ySrc = (this->m_bmiHeader->biHeight - p_destHeight) - p_ySrc;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bd2d0 STUB
|
||||
int MxBitmap::vtable3c(MxBool)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bd3e0 STUB
|
||||
int MxBitmap::vtable40(HDC p_hdc, int p_xSrc, int p_ySrc, int p_xDest, int p_yDest, int p_destWidth, int p_destHeight)
|
||||
{
|
||||
return 0;
|
||||
return StretchDIBits(p_hdc, p_xDest, p_yDest, p_destWidth, p_destHeight, p_xSrc, p_ySrc, p_destWidth, p_destHeight, this->m_data, (BITMAPINFO*)this->m_info, this->m_bitDepth, SRCCOPY);
|
||||
}
|
||||
@ -7,32 +7,52 @@
|
||||
#include "mxpalette.h"
|
||||
#include "mxtypes.h"
|
||||
|
||||
// The stock BITMAPINFO struct from wingdi.h only makes room for one color
|
||||
// in the palette. It seems like the expectation (if you use the struct)
|
||||
// is to malloc as much as you actually need, and then index into the array
|
||||
// anyway even though its stated size is [1].
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmapinfo
|
||||
// In our case, the size 0x428 is used frequently, which matches
|
||||
// a 40-byte header plus 256 colors, so just use that as our template.
|
||||
|
||||
// SIZE 0x428
|
||||
struct MxBITMAPINFO {
|
||||
BITMAPINFOHEADER bmiHeader;
|
||||
RGBQUAD bmiColors[256];
|
||||
};
|
||||
|
||||
// These values are the bit depth, set in the registry
|
||||
#define LOWCOLOR 0 // 256 color
|
||||
#define HIGHCOLOR 1 // High Color (16-bit)
|
||||
|
||||
class MxBitmap : public MxCore
|
||||
{
|
||||
public:
|
||||
__declspec(dllexport) MxBitmap();
|
||||
__declspec(dllexport) virtual ~MxBitmap(); // vtable+00
|
||||
|
||||
virtual int vtable14(int);
|
||||
virtual int vtable18(BITMAPINFOHEADER *p_bmiHeader);
|
||||
virtual int vtable1c(int p_width, int p_height, MxPalette *p_palette, int);
|
||||
virtual MxResult LoadFile(HANDLE p_handle);
|
||||
virtual MxResult ImportBitmap(MxBitmap *p_bitmap); // vtable+14
|
||||
virtual MxResult ImportBitmapInfo(MxBITMAPINFO *p_info); // vtable+18
|
||||
virtual MxResult SetSize(int p_width, int p_height, MxPalette *p_palette, int); // vtable+1c
|
||||
virtual MxResult LoadFile(HANDLE p_handle); // vtable+20
|
||||
__declspec(dllexport) virtual MxLong Read(const char *p_filename); // vtable+24
|
||||
virtual int vtable28(int);
|
||||
virtual void vtable2c(int, int, int, int, int, int, int);
|
||||
virtual void vtable30(int, int, int, int, int, int, int);
|
||||
__declspec(dllexport) virtual MxPalette *CreatePalette(); // vtable+34
|
||||
virtual void vtable38(void*);
|
||||
virtual int vtable3c(MxBool);
|
||||
virtual int vtable40(HDC p_hdc, int p_xSrc, int p_ySrc, int p_xDest, int p_yDest, int p_destWidth, int p_destHeight);
|
||||
virtual void ImportPalette(MxPalette* p_palette); // vtable+38
|
||||
virtual MxResult SetBitDepth(MxBool); // vtable+3c
|
||||
virtual MxResult StretchBits(HDC p_hdc, int p_xSrc, int p_ySrc, int p_xDest, int p_yDest, int p_destWidth, int p_destHeight); // vtable+40
|
||||
|
||||
private:
|
||||
BITMAPINFO *m_info;
|
||||
BITMAPINFOHEADER *m_bmiHeader;
|
||||
RGBQUAD *m_paletteData;
|
||||
LPVOID *m_data;
|
||||
MxBool m_unk18;
|
||||
MxPalette *m_palette;
|
||||
MxResult ImportColorsToPalette(RGBQUAD*, MxPalette*);
|
||||
|
||||
MxBITMAPINFO *m_info; // 0x8
|
||||
BITMAPINFOHEADER *m_bmiHeader; // 0xc
|
||||
RGBQUAD *m_paletteData; // 0x10
|
||||
LPVOID *m_data; // 0x14
|
||||
MxBool m_bitDepth; // 0x18
|
||||
MxPalette *m_palette; // 0x1c
|
||||
};
|
||||
|
||||
#endif // MXBITMAP_H
|
||||
|
||||
@ -22,7 +22,7 @@ MxLong MxCore::Notify(MxParam &p)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10001f70
|
||||
MxLong MxCore::Tickle()
|
||||
MxResult MxCore::Tickle()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "compat.h"
|
||||
#include "mxtypes.h"
|
||||
|
||||
class MxParam;
|
||||
@ -14,8 +15,8 @@ class MxCore
|
||||
public:
|
||||
__declspec(dllexport) MxCore();
|
||||
__declspec(dllexport) virtual ~MxCore(); // vtable+00
|
||||
__declspec(dllexport) virtual MxLong Notify(MxParam &p); // vtable+04
|
||||
virtual MxLong Tickle(); // vtable+08
|
||||
__declspec(dllexport) virtual MxResult Notify(MxParam &p); // vtable+04
|
||||
virtual MxResult Tickle(); // vtable+08
|
||||
|
||||
// OFFSET: LEGO1 0x100144c0
|
||||
inline virtual const char *ClassName() const // vtable+0c
|
||||
@ -30,8 +31,13 @@ class MxCore
|
||||
return !strcmp(name, MxCore::ClassName());
|
||||
}
|
||||
|
||||
inline MxU32 GetId()
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
|
||||
private:
|
||||
unsigned int m_id;
|
||||
MxU32 m_id;
|
||||
|
||||
};
|
||||
|
||||
|
||||
191
LEGO1/mxdirect3d.cpp
Normal file
191
LEGO1/mxdirect3d.cpp
Normal file
@ -0,0 +1,191 @@
|
||||
#include "mxdirect3d.h"
|
||||
#include <stdio.h> // for vsprintf
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxDirect3D, 0x894);
|
||||
DECOMP_SIZE_ASSERT(MxDeviceModeFinder, 0xe4);
|
||||
DECOMP_SIZE_ASSERT(MxDeviceEnumerate, 0x198);
|
||||
|
||||
// OFFSET: LEGO1 0x1009b0a0
|
||||
MxDirect3D::MxDirect3D()
|
||||
{
|
||||
this->m_pDirect3d = NULL;
|
||||
this->m_pDirect3dDevice = NULL;
|
||||
this->m_unk88c = NULL;
|
||||
this->m_pDeviceModeFinder = NULL;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1009b140
|
||||
MxDirect3D::~MxDirect3D()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1009b1a0
|
||||
BOOL MxDirect3D::Create(
|
||||
HWND hWnd,
|
||||
BOOL fullscreen_1,
|
||||
BOOL surface_fullscreen,
|
||||
BOOL onlySystemMemory,
|
||||
int width,
|
||||
int height,
|
||||
int bpp,
|
||||
const PALETTEENTRY* pPaletteEntries,
|
||||
int paletteEntryCount)
|
||||
{
|
||||
BOOL success = FALSE;
|
||||
|
||||
BOOL ret = MxDirectDraw::Create(hWnd, fullscreen_1, surface_fullscreen,
|
||||
onlySystemMemory, width, height, bpp,
|
||||
pPaletteEntries, paletteEntryCount);
|
||||
|
||||
if (ret && CreateIDirect3D() && D3DSetMode())
|
||||
success = TRUE;
|
||||
|
||||
if (!success)
|
||||
FUN_1009D920();
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1009b210
|
||||
void MxDirect3D::Destroy()
|
||||
{
|
||||
if (this->m_pDirect3dDevice) {
|
||||
this->m_pDirect3dDevice->Release();
|
||||
this->m_pDirect3dDevice = NULL;
|
||||
}
|
||||
|
||||
if (this->m_pDirect3d) {
|
||||
this->m_pDirect3d->Release();
|
||||
this->m_pDirect3d = NULL;
|
||||
}
|
||||
|
||||
if (this->m_pDeviceModeFinder) {
|
||||
delete m_pDeviceModeFinder;
|
||||
this->m_pDeviceModeFinder = NULL;
|
||||
}
|
||||
|
||||
// This should get deleted by MxDirectDraw::Destroy
|
||||
if (m_pCurrentDeviceModesList) {
|
||||
// delete m_pCurrentDeviceModesList; // missing?
|
||||
m_pCurrentDeviceModesList = NULL;
|
||||
}
|
||||
|
||||
MxDirectDraw::Destroy();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1009b290
|
||||
void MxDirect3D::Clear()
|
||||
{
|
||||
if(this->m_pDirect3dDevice) {
|
||||
this->m_pDirect3dDevice->Release();
|
||||
this->m_pDirect3dDevice = NULL;
|
||||
}
|
||||
if(this->m_pDirect3d) {
|
||||
this->m_pDirect3d->Release();
|
||||
this->m_pDirect3d = NULL;
|
||||
}
|
||||
MxDirectDraw::DestroyButNotDirectDraw();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1009b2d0
|
||||
BOOL MxDirect3D::CreateIDirect3D()
|
||||
{
|
||||
MxResult ret = IDirect3D_QueryInterface(m_pDirectDraw,
|
||||
IID_IDirect3D2,
|
||||
(LPVOID*)&m_pDirect3d);
|
||||
|
||||
if (ret) {
|
||||
Error("Creation of IDirect3D failed", ret);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1009b310 STUB
|
||||
BOOL MxDirect3D::D3DSetMode()
|
||||
{
|
||||
// TODO
|
||||
//if (m_pDeviceModeFinder)
|
||||
Error("This device cannot support the current display mode", 0);
|
||||
OutputDebugString("MxDirect3D::D3DSetMode() front lock failed\n");
|
||||
OutputDebugString("MxDirect3D::D3DSetMode() back lock failed\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1009b8b0
|
||||
MxDeviceModeFinder::MxDeviceModeFinder()
|
||||
{
|
||||
memset(this, 0, sizeof(*this));
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1009b8d0
|
||||
MxDeviceModeFinder::~MxDeviceModeFinder()
|
||||
{
|
||||
if (m_deviceInfo) {
|
||||
delete m_deviceInfo;
|
||||
m_deviceInfo = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1009c070 STUB
|
||||
BOOL MxDeviceEnumerate::FUN_1009c070()
|
||||
{
|
||||
// TODO
|
||||
// HRESULT ret = DirectDrawCreate();
|
||||
HRESULT ret = 0;
|
||||
if (ret) {
|
||||
MxDirect3D::BuildErrorString("GetCaps failed: %s\n",
|
||||
EnumerateErrorToString(ret));
|
||||
}
|
||||
//IDirect3D2_EnumDevices
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1009c4c0
|
||||
void MxDirect3D::BuildErrorString(const char *p_format, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buf[512];
|
||||
|
||||
va_start(args, p_format);
|
||||
vsprintf(buf, p_format, args);
|
||||
va_end(args);
|
||||
|
||||
OutputDebugString(buf);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1009c6c0
|
||||
MxResult MxDeviceEnumerate::_DoEnumerate()
|
||||
{
|
||||
// TODO: what does ECX refer to in this context?
|
||||
if (m_unk010_flag)
|
||||
return FAILURE;
|
||||
|
||||
HRESULT ret = DirectDrawEnumerate(EnumerateCallback, this);
|
||||
if (ret) {
|
||||
MxDirect3D::BuildErrorString("DirectDrawEnumerate returned error %s\n",
|
||||
EnumerateErrorToString(ret));
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
m_unk010_flag = TRUE;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1009c710 STUB
|
||||
BOOL FAR PASCAL EnumerateCallback(GUID FAR *, LPSTR, LPSTR, LPVOID)
|
||||
{
|
||||
// TODO
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1009c730 STUB
|
||||
char *MxDeviceEnumerate::EnumerateErrorToString(HRESULT p_error)
|
||||
{
|
||||
// TODO: This is a list of error messages, similar to the function in
|
||||
// MxDirectDraw, except that this one now contains the Direct3D errors.
|
||||
// Probably just copied from a sample file in the dx5 sdk.
|
||||
return "";
|
||||
}
|
||||
78
LEGO1/mxdirect3d.h
Normal file
78
LEGO1/mxdirect3d.h
Normal file
@ -0,0 +1,78 @@
|
||||
#ifndef MXDIRECT3D_H
|
||||
#define MXDIRECT3D_H
|
||||
|
||||
#include "mxdirectdraw.h"
|
||||
#include "mxtypes.h"
|
||||
#include "decomp.h"
|
||||
|
||||
#include <d3d.h>
|
||||
|
||||
// SIZE 0xe4
|
||||
class MxDeviceModeFinder
|
||||
{
|
||||
public:
|
||||
MxDeviceModeFinder();
|
||||
~MxDeviceModeFinder();
|
||||
|
||||
undefined4 m_unknown[56];
|
||||
MxDirectDraw::DeviceModesInfo *m_deviceInfo; // +0xe0
|
||||
};
|
||||
|
||||
// VTABLE 0x100db814 (or 0x100d9cc8?)
|
||||
// SIZE 0x198
|
||||
class MxDeviceEnumerate
|
||||
{
|
||||
public:
|
||||
MxDeviceEnumerate();
|
||||
virtual MxResult _DoEnumerate();
|
||||
BOOL FUN_1009c070();
|
||||
|
||||
char *EnumerateErrorToString(HRESULT p_error);
|
||||
|
||||
undefined4 m_unk004;
|
||||
undefined4 m_unk008;
|
||||
undefined4 m_unk00c;
|
||||
MxBool m_unk010_flag; // +0x10
|
||||
|
||||
undefined4 m_unknown[97];
|
||||
};
|
||||
|
||||
// VTABLE 0x100db800
|
||||
// SIZE 0x894
|
||||
class MxDirect3D : public MxDirectDraw
|
||||
{
|
||||
public:
|
||||
MxDirect3D();
|
||||
|
||||
void Clear();
|
||||
inline MxDeviceModeFinder *GetDeviceModeFinder() { return this->m_pDeviceModeFinder; };
|
||||
|
||||
virtual ~MxDirect3D();
|
||||
virtual BOOL Create(
|
||||
HWND hWnd,
|
||||
BOOL fullscreen_1,
|
||||
BOOL surface_fullscreen,
|
||||
BOOL onlySystemMemory,
|
||||
int width,
|
||||
int height,
|
||||
int bpp,
|
||||
const PALETTEENTRY* pPaletteEntries,
|
||||
int paletteEntryCount);
|
||||
virtual void Destroy();
|
||||
|
||||
BOOL CreateIDirect3D();
|
||||
BOOL D3DSetMode();
|
||||
|
||||
static void BuildErrorString(const char *, ...);
|
||||
|
||||
private:
|
||||
MxDeviceModeFinder *m_pDeviceModeFinder; // +0x880
|
||||
IDirect3D *m_pDirect3d; // +0x884
|
||||
IDirect3DDevice *m_pDirect3dDevice;
|
||||
undefined4 m_unk88c;
|
||||
undefined4 m_unk890;
|
||||
};
|
||||
|
||||
BOOL FAR PASCAL EnumerateCallback(GUID FAR *, LPSTR, LPSTR, LPVOID);
|
||||
|
||||
#endif // MXDIRECT3D_H
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user