diff --git a/Include/amstream.h b/Include/amstream.h new file mode 100644 index 0000000..30f9b70 --- /dev/null +++ b/Include/amstream.h @@ -0,0 +1,2296 @@ + + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0366 */ +/* Compiler settings for amstream.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext, robust + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __amstream_h__ +#define __amstream_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IDirectShowStream_FWD_DEFINED__ +#define __IDirectShowStream_FWD_DEFINED__ +typedef interface IDirectShowStream IDirectShowStream; +#endif /* __IDirectShowStream_FWD_DEFINED__ */ + + +#ifndef __IAMMultiMediaStream_FWD_DEFINED__ +#define __IAMMultiMediaStream_FWD_DEFINED__ +typedef interface IAMMultiMediaStream IAMMultiMediaStream; +#endif /* __IAMMultiMediaStream_FWD_DEFINED__ */ + + +#ifndef __IAMMediaStream_FWD_DEFINED__ +#define __IAMMediaStream_FWD_DEFINED__ +typedef interface IAMMediaStream IAMMediaStream; +#endif /* __IAMMediaStream_FWD_DEFINED__ */ + + +#ifndef __IMediaStreamFilter_FWD_DEFINED__ +#define __IMediaStreamFilter_FWD_DEFINED__ +typedef interface IMediaStreamFilter IMediaStreamFilter; +#endif /* __IMediaStreamFilter_FWD_DEFINED__ */ + + +#ifndef __IDirectDrawMediaSampleAllocator_FWD_DEFINED__ +#define __IDirectDrawMediaSampleAllocator_FWD_DEFINED__ +typedef interface IDirectDrawMediaSampleAllocator IDirectDrawMediaSampleAllocator; +#endif /* __IDirectDrawMediaSampleAllocator_FWD_DEFINED__ */ + + +#ifndef __IDirectDrawMediaSample_FWD_DEFINED__ +#define __IDirectDrawMediaSample_FWD_DEFINED__ +typedef interface IDirectDrawMediaSample IDirectDrawMediaSample; +#endif /* __IDirectDrawMediaSample_FWD_DEFINED__ */ + + +#ifndef __IAMMediaTypeStream_FWD_DEFINED__ +#define __IAMMediaTypeStream_FWD_DEFINED__ +typedef interface IAMMediaTypeStream IAMMediaTypeStream; +#endif /* __IAMMediaTypeStream_FWD_DEFINED__ */ + + +#ifndef __IAMMediaTypeSample_FWD_DEFINED__ +#define __IAMMediaTypeSample_FWD_DEFINED__ +typedef interface IAMMediaTypeSample IAMMediaTypeSample; +#endif /* __IAMMediaTypeSample_FWD_DEFINED__ */ + + +#ifndef __AMMultiMediaStream_FWD_DEFINED__ +#define __AMMultiMediaStream_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class AMMultiMediaStream AMMultiMediaStream; +#else +typedef struct AMMultiMediaStream AMMultiMediaStream; +#endif /* __cplusplus */ + +#endif /* __AMMultiMediaStream_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "unknwn.h" +#include "mmstream.h" +#include "strmif.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +/* interface __MIDL_itf_amstream_0000 */ +/* [local] */ + +#include +#include +#include +#include +#include + + + + + + + + +enum __MIDL___MIDL_itf_amstream_0000_0001 + { AMMSF_NOGRAPHTHREAD = 0x1 + } ; + +enum __MIDL___MIDL_itf_amstream_0000_0002 + { AMMSF_ADDDEFAULTRENDERER = 0x1, + AMMSF_CREATEPEER = 0x2, + AMMSF_STOPIFNOSAMPLES = 0x4, + AMMSF_NOSTALL = 0x8 + } ; + +enum __MIDL___MIDL_itf_amstream_0000_0003 + { AMMSF_RENDERTYPEMASK = 0x3, + AMMSF_RENDERTOEXISTING = 0, + AMMSF_RENDERALLSTREAMS = 0x1, + AMMSF_NORENDER = 0x2, + AMMSF_NOCLOCK = 0x4, + AMMSF_RUN = 0x8 + } ; +typedef /* [public][public][public][public][public][v1_enum] */ +enum __MIDL___MIDL_itf_amstream_0000_0004 + { Disabled = 0, + ReadData = 1, + RenderData = 2 + } OUTPUT_STATE; + + + +extern RPC_IF_HANDLE __MIDL_itf_amstream_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_amstream_0000_v0_0_s_ifspec; + +#ifndef __IDirectShowStream_INTERFACE_DEFINED__ +#define __IDirectShowStream_INTERFACE_DEFINED__ + +/* interface IDirectShowStream */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_IDirectShowStream; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("7DB01C96-C0C3-11d0-8FF1-00C04FD9189D") + IDirectShowStream : public IDispatch + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_FileName( + /* [retval][out] */ BSTR *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_FileName( + /* [in] */ BSTR newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Video( + /* [retval][out] */ OUTPUT_STATE *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Video( + /* [in] */ OUTPUT_STATE newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Audio( + /* [retval][out] */ OUTPUT_STATE *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Audio( + /* [in] */ OUTPUT_STATE newVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDirectShowStreamVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDirectShowStream * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDirectShowStream * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDirectShowStream * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IDirectShowStream * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IDirectShowStream * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IDirectShowStream * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IDirectShowStream * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FileName )( + IDirectShowStream * This, + /* [retval][out] */ BSTR *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_FileName )( + IDirectShowStream * This, + /* [in] */ BSTR newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Video )( + IDirectShowStream * This, + /* [retval][out] */ OUTPUT_STATE *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Video )( + IDirectShowStream * This, + /* [in] */ OUTPUT_STATE newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Audio )( + IDirectShowStream * This, + /* [retval][out] */ OUTPUT_STATE *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Audio )( + IDirectShowStream * This, + /* [in] */ OUTPUT_STATE newVal); + + END_INTERFACE + } IDirectShowStreamVtbl; + + interface IDirectShowStream + { + CONST_VTBL struct IDirectShowStreamVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDirectShowStream_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDirectShowStream_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDirectShowStream_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDirectShowStream_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IDirectShowStream_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IDirectShowStream_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IDirectShowStream_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IDirectShowStream_get_FileName(This,pVal) \ + (This)->lpVtbl -> get_FileName(This,pVal) + +#define IDirectShowStream_put_FileName(This,newVal) \ + (This)->lpVtbl -> put_FileName(This,newVal) + +#define IDirectShowStream_get_Video(This,pVal) \ + (This)->lpVtbl -> get_Video(This,pVal) + +#define IDirectShowStream_put_Video(This,newVal) \ + (This)->lpVtbl -> put_Video(This,newVal) + +#define IDirectShowStream_get_Audio(This,pVal) \ + (This)->lpVtbl -> get_Audio(This,pVal) + +#define IDirectShowStream_put_Audio(This,newVal) \ + (This)->lpVtbl -> put_Audio(This,newVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDirectShowStream_get_FileName_Proxy( + IDirectShowStream * This, + /* [retval][out] */ BSTR *pVal); + + +void __RPC_STUB IDirectShowStream_get_FileName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDirectShowStream_put_FileName_Proxy( + IDirectShowStream * This, + /* [in] */ BSTR newVal); + + +void __RPC_STUB IDirectShowStream_put_FileName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDirectShowStream_get_Video_Proxy( + IDirectShowStream * This, + /* [retval][out] */ OUTPUT_STATE *pVal); + + +void __RPC_STUB IDirectShowStream_get_Video_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDirectShowStream_put_Video_Proxy( + IDirectShowStream * This, + /* [in] */ OUTPUT_STATE newVal); + + +void __RPC_STUB IDirectShowStream_put_Video_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDirectShowStream_get_Audio_Proxy( + IDirectShowStream * This, + /* [retval][out] */ OUTPUT_STATE *pVal); + + +void __RPC_STUB IDirectShowStream_get_Audio_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDirectShowStream_put_Audio_Proxy( + IDirectShowStream * This, + /* [in] */ OUTPUT_STATE newVal); + + +void __RPC_STUB IDirectShowStream_put_Audio_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDirectShowStream_INTERFACE_DEFINED__ */ + + +#ifndef __IAMMultiMediaStream_INTERFACE_DEFINED__ +#define __IAMMultiMediaStream_INTERFACE_DEFINED__ + +/* interface IAMMultiMediaStream */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMMultiMediaStream; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("BEBE595C-9A6F-11d0-8FDE-00C04FD9189D") + IAMMultiMediaStream : public IMultiMediaStream + { + public: + virtual HRESULT STDMETHODCALLTYPE Initialize( + /* [in] */ STREAM_TYPE StreamType, + /* [in] */ DWORD dwFlags, + /* [in] */ IGraphBuilder *pFilterGraph) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFilterGraph( + /* [out] */ IGraphBuilder **ppGraphBuilder) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFilter( + /* [out] */ IMediaStreamFilter **ppFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddMediaStream( + /* [in] */ IUnknown *pStreamObject, + /* [in] */ const MSPID *PurposeId, + /* [in] */ DWORD dwFlags, + /* [out] */ IMediaStream **ppNewStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE OpenFile( + /* [in] */ LPCWSTR pszFileName, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE OpenMoniker( + /* [in] */ IBindCtx *pCtx, + /* [in] */ IMoniker *pMoniker, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE Render( + /* [in] */ DWORD dwFlags) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMMultiMediaStreamVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMMultiMediaStream * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMMultiMediaStream * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMMultiMediaStream * This); + + HRESULT ( STDMETHODCALLTYPE *GetInformation )( + IAMMultiMediaStream * This, + /* [out] */ DWORD *pdwFlags, + /* [out] */ STREAM_TYPE *pStreamType); + + HRESULT ( STDMETHODCALLTYPE *GetMediaStream )( + IAMMultiMediaStream * This, + /* [in] */ REFMSPID idPurpose, + /* [out] */ IMediaStream **ppMediaStream); + + HRESULT ( STDMETHODCALLTYPE *EnumMediaStreams )( + IAMMultiMediaStream * This, + /* [in] */ long Index, + /* [out] */ IMediaStream **ppMediaStream); + + HRESULT ( STDMETHODCALLTYPE *GetState )( + IAMMultiMediaStream * This, + /* [out] */ STREAM_STATE *pCurrentState); + + HRESULT ( STDMETHODCALLTYPE *SetState )( + IAMMultiMediaStream * This, + /* [in] */ STREAM_STATE NewState); + + HRESULT ( STDMETHODCALLTYPE *GetTime )( + IAMMultiMediaStream * This, + /* [out] */ STREAM_TIME *pCurrentTime); + + HRESULT ( STDMETHODCALLTYPE *GetDuration )( + IAMMultiMediaStream * This, + /* [out] */ STREAM_TIME *pDuration); + + HRESULT ( STDMETHODCALLTYPE *Seek )( + IAMMultiMediaStream * This, + /* [in] */ STREAM_TIME SeekTime); + + HRESULT ( STDMETHODCALLTYPE *GetEndOfStreamEventHandle )( + IAMMultiMediaStream * This, + /* [out] */ HANDLE *phEOS); + + HRESULT ( STDMETHODCALLTYPE *Initialize )( + IAMMultiMediaStream * This, + /* [in] */ STREAM_TYPE StreamType, + /* [in] */ DWORD dwFlags, + /* [in] */ IGraphBuilder *pFilterGraph); + + HRESULT ( STDMETHODCALLTYPE *GetFilterGraph )( + IAMMultiMediaStream * This, + /* [out] */ IGraphBuilder **ppGraphBuilder); + + HRESULT ( STDMETHODCALLTYPE *GetFilter )( + IAMMultiMediaStream * This, + /* [out] */ IMediaStreamFilter **ppFilter); + + HRESULT ( STDMETHODCALLTYPE *AddMediaStream )( + IAMMultiMediaStream * This, + /* [in] */ IUnknown *pStreamObject, + /* [in] */ const MSPID *PurposeId, + /* [in] */ DWORD dwFlags, + /* [out] */ IMediaStream **ppNewStream); + + HRESULT ( STDMETHODCALLTYPE *OpenFile )( + IAMMultiMediaStream * This, + /* [in] */ LPCWSTR pszFileName, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *OpenMoniker )( + IAMMultiMediaStream * This, + /* [in] */ IBindCtx *pCtx, + /* [in] */ IMoniker *pMoniker, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *Render )( + IAMMultiMediaStream * This, + /* [in] */ DWORD dwFlags); + + END_INTERFACE + } IAMMultiMediaStreamVtbl; + + interface IAMMultiMediaStream + { + CONST_VTBL struct IAMMultiMediaStreamVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMMultiMediaStream_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMMultiMediaStream_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMMultiMediaStream_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMMultiMediaStream_GetInformation(This,pdwFlags,pStreamType) \ + (This)->lpVtbl -> GetInformation(This,pdwFlags,pStreamType) + +#define IAMMultiMediaStream_GetMediaStream(This,idPurpose,ppMediaStream) \ + (This)->lpVtbl -> GetMediaStream(This,idPurpose,ppMediaStream) + +#define IAMMultiMediaStream_EnumMediaStreams(This,Index,ppMediaStream) \ + (This)->lpVtbl -> EnumMediaStreams(This,Index,ppMediaStream) + +#define IAMMultiMediaStream_GetState(This,pCurrentState) \ + (This)->lpVtbl -> GetState(This,pCurrentState) + +#define IAMMultiMediaStream_SetState(This,NewState) \ + (This)->lpVtbl -> SetState(This,NewState) + +#define IAMMultiMediaStream_GetTime(This,pCurrentTime) \ + (This)->lpVtbl -> GetTime(This,pCurrentTime) + +#define IAMMultiMediaStream_GetDuration(This,pDuration) \ + (This)->lpVtbl -> GetDuration(This,pDuration) + +#define IAMMultiMediaStream_Seek(This,SeekTime) \ + (This)->lpVtbl -> Seek(This,SeekTime) + +#define IAMMultiMediaStream_GetEndOfStreamEventHandle(This,phEOS) \ + (This)->lpVtbl -> GetEndOfStreamEventHandle(This,phEOS) + + +#define IAMMultiMediaStream_Initialize(This,StreamType,dwFlags,pFilterGraph) \ + (This)->lpVtbl -> Initialize(This,StreamType,dwFlags,pFilterGraph) + +#define IAMMultiMediaStream_GetFilterGraph(This,ppGraphBuilder) \ + (This)->lpVtbl -> GetFilterGraph(This,ppGraphBuilder) + +#define IAMMultiMediaStream_GetFilter(This,ppFilter) \ + (This)->lpVtbl -> GetFilter(This,ppFilter) + +#define IAMMultiMediaStream_AddMediaStream(This,pStreamObject,PurposeId,dwFlags,ppNewStream) \ + (This)->lpVtbl -> AddMediaStream(This,pStreamObject,PurposeId,dwFlags,ppNewStream) + +#define IAMMultiMediaStream_OpenFile(This,pszFileName,dwFlags) \ + (This)->lpVtbl -> OpenFile(This,pszFileName,dwFlags) + +#define IAMMultiMediaStream_OpenMoniker(This,pCtx,pMoniker,dwFlags) \ + (This)->lpVtbl -> OpenMoniker(This,pCtx,pMoniker,dwFlags) + +#define IAMMultiMediaStream_Render(This,dwFlags) \ + (This)->lpVtbl -> Render(This,dwFlags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMMultiMediaStream_Initialize_Proxy( + IAMMultiMediaStream * This, + /* [in] */ STREAM_TYPE StreamType, + /* [in] */ DWORD dwFlags, + /* [in] */ IGraphBuilder *pFilterGraph); + + +void __RPC_STUB IAMMultiMediaStream_Initialize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMultiMediaStream_GetFilterGraph_Proxy( + IAMMultiMediaStream * This, + /* [out] */ IGraphBuilder **ppGraphBuilder); + + +void __RPC_STUB IAMMultiMediaStream_GetFilterGraph_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMultiMediaStream_GetFilter_Proxy( + IAMMultiMediaStream * This, + /* [out] */ IMediaStreamFilter **ppFilter); + + +void __RPC_STUB IAMMultiMediaStream_GetFilter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMultiMediaStream_AddMediaStream_Proxy( + IAMMultiMediaStream * This, + /* [in] */ IUnknown *pStreamObject, + /* [in] */ const MSPID *PurposeId, + /* [in] */ DWORD dwFlags, + /* [out] */ IMediaStream **ppNewStream); + + +void __RPC_STUB IAMMultiMediaStream_AddMediaStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMultiMediaStream_OpenFile_Proxy( + IAMMultiMediaStream * This, + /* [in] */ LPCWSTR pszFileName, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IAMMultiMediaStream_OpenFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMultiMediaStream_OpenMoniker_Proxy( + IAMMultiMediaStream * This, + /* [in] */ IBindCtx *pCtx, + /* [in] */ IMoniker *pMoniker, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IAMMultiMediaStream_OpenMoniker_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMultiMediaStream_Render_Proxy( + IAMMultiMediaStream * This, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IAMMultiMediaStream_Render_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMMultiMediaStream_INTERFACE_DEFINED__ */ + + +#ifndef __IAMMediaStream_INTERFACE_DEFINED__ +#define __IAMMediaStream_INTERFACE_DEFINED__ + +/* interface IAMMediaStream */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMMediaStream; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("BEBE595D-9A6F-11d0-8FDE-00C04FD9189D") + IAMMediaStream : public IMediaStream + { + public: + virtual HRESULT STDMETHODCALLTYPE Initialize( + /* [in] */ IUnknown *pSourceObject, + /* [in] */ DWORD dwFlags, + /* [in] */ REFMSPID PurposeId, + /* [in] */ const STREAM_TYPE StreamType) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetState( + /* [in] */ FILTER_STATE State) = 0; + + virtual HRESULT STDMETHODCALLTYPE JoinAMMultiMediaStream( + /* [in] */ IAMMultiMediaStream *pAMMultiMediaStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE JoinFilter( + /* [in] */ IMediaStreamFilter *pMediaStreamFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE JoinFilterGraph( + /* [in] */ IFilterGraph *pFilterGraph) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMMediaStreamVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMMediaStream * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMMediaStream * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMMediaStream * This); + + HRESULT ( STDMETHODCALLTYPE *GetMultiMediaStream )( + IAMMediaStream * This, + /* [out] */ IMultiMediaStream **ppMultiMediaStream); + + HRESULT ( STDMETHODCALLTYPE *GetInformation )( + IAMMediaStream * This, + /* [out] */ MSPID *pPurposeId, + /* [out] */ STREAM_TYPE *pType); + + HRESULT ( STDMETHODCALLTYPE *SetSameFormat )( + IAMMediaStream * This, + /* [in] */ IMediaStream *pStreamThatHasDesiredFormat, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *AllocateSample )( + IAMMediaStream * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IStreamSample **ppSample); + + HRESULT ( STDMETHODCALLTYPE *CreateSharedSample )( + IAMMediaStream * This, + /* [in] */ IStreamSample *pExistingSample, + /* [in] */ DWORD dwFlags, + /* [out] */ IStreamSample **ppNewSample); + + HRESULT ( STDMETHODCALLTYPE *SendEndOfStream )( + IAMMediaStream * This, + DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *Initialize )( + IAMMediaStream * This, + /* [in] */ IUnknown *pSourceObject, + /* [in] */ DWORD dwFlags, + /* [in] */ REFMSPID PurposeId, + /* [in] */ const STREAM_TYPE StreamType); + + HRESULT ( STDMETHODCALLTYPE *SetState )( + IAMMediaStream * This, + /* [in] */ FILTER_STATE State); + + HRESULT ( STDMETHODCALLTYPE *JoinAMMultiMediaStream )( + IAMMediaStream * This, + /* [in] */ IAMMultiMediaStream *pAMMultiMediaStream); + + HRESULT ( STDMETHODCALLTYPE *JoinFilter )( + IAMMediaStream * This, + /* [in] */ IMediaStreamFilter *pMediaStreamFilter); + + HRESULT ( STDMETHODCALLTYPE *JoinFilterGraph )( + IAMMediaStream * This, + /* [in] */ IFilterGraph *pFilterGraph); + + END_INTERFACE + } IAMMediaStreamVtbl; + + interface IAMMediaStream + { + CONST_VTBL struct IAMMediaStreamVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMMediaStream_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMMediaStream_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMMediaStream_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMMediaStream_GetMultiMediaStream(This,ppMultiMediaStream) \ + (This)->lpVtbl -> GetMultiMediaStream(This,ppMultiMediaStream) + +#define IAMMediaStream_GetInformation(This,pPurposeId,pType) \ + (This)->lpVtbl -> GetInformation(This,pPurposeId,pType) + +#define IAMMediaStream_SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) \ + (This)->lpVtbl -> SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) + +#define IAMMediaStream_AllocateSample(This,dwFlags,ppSample) \ + (This)->lpVtbl -> AllocateSample(This,dwFlags,ppSample) + +#define IAMMediaStream_CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) \ + (This)->lpVtbl -> CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) + +#define IAMMediaStream_SendEndOfStream(This,dwFlags) \ + (This)->lpVtbl -> SendEndOfStream(This,dwFlags) + + +#define IAMMediaStream_Initialize(This,pSourceObject,dwFlags,PurposeId,StreamType) \ + (This)->lpVtbl -> Initialize(This,pSourceObject,dwFlags,PurposeId,StreamType) + +#define IAMMediaStream_SetState(This,State) \ + (This)->lpVtbl -> SetState(This,State) + +#define IAMMediaStream_JoinAMMultiMediaStream(This,pAMMultiMediaStream) \ + (This)->lpVtbl -> JoinAMMultiMediaStream(This,pAMMultiMediaStream) + +#define IAMMediaStream_JoinFilter(This,pMediaStreamFilter) \ + (This)->lpVtbl -> JoinFilter(This,pMediaStreamFilter) + +#define IAMMediaStream_JoinFilterGraph(This,pFilterGraph) \ + (This)->lpVtbl -> JoinFilterGraph(This,pFilterGraph) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMMediaStream_Initialize_Proxy( + IAMMediaStream * This, + /* [in] */ IUnknown *pSourceObject, + /* [in] */ DWORD dwFlags, + /* [in] */ REFMSPID PurposeId, + /* [in] */ const STREAM_TYPE StreamType); + + +void __RPC_STUB IAMMediaStream_Initialize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaStream_SetState_Proxy( + IAMMediaStream * This, + /* [in] */ FILTER_STATE State); + + +void __RPC_STUB IAMMediaStream_SetState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaStream_JoinAMMultiMediaStream_Proxy( + IAMMediaStream * This, + /* [in] */ IAMMultiMediaStream *pAMMultiMediaStream); + + +void __RPC_STUB IAMMediaStream_JoinAMMultiMediaStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaStream_JoinFilter_Proxy( + IAMMediaStream * This, + /* [in] */ IMediaStreamFilter *pMediaStreamFilter); + + +void __RPC_STUB IAMMediaStream_JoinFilter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaStream_JoinFilterGraph_Proxy( + IAMMediaStream * This, + /* [in] */ IFilterGraph *pFilterGraph); + + +void __RPC_STUB IAMMediaStream_JoinFilterGraph_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMMediaStream_INTERFACE_DEFINED__ */ + + +#ifndef __IMediaStreamFilter_INTERFACE_DEFINED__ +#define __IMediaStreamFilter_INTERFACE_DEFINED__ + +/* interface IMediaStreamFilter */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IMediaStreamFilter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("BEBE595E-9A6F-11d0-8FDE-00C04FD9189D") + IMediaStreamFilter : public IBaseFilter + { + public: + virtual HRESULT STDMETHODCALLTYPE AddMediaStream( + /* [in] */ IAMMediaStream *pAMMediaStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMediaStream( + /* [in] */ REFMSPID idPurpose, + /* [out] */ IMediaStream **ppMediaStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumMediaStreams( + /* [in] */ long Index, + /* [out] */ IMediaStream **ppMediaStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE SupportSeeking( + /* [in] */ BOOL bRenderer) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReferenceTimeToStreamTime( + /* [out][in] */ REFERENCE_TIME *pTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentStreamTime( + /* [out] */ REFERENCE_TIME *pCurrentStreamTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE WaitUntil( + /* [in] */ REFERENCE_TIME WaitStreamTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE Flush( + /* [in] */ BOOL bCancelEOS) = 0; + + virtual HRESULT STDMETHODCALLTYPE EndOfStream( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaStreamFilterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaStreamFilter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaStreamFilter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaStreamFilter * This); + + HRESULT ( STDMETHODCALLTYPE *GetClassID )( + IMediaStreamFilter * This, + /* [out] */ CLSID *pClassID); + + HRESULT ( STDMETHODCALLTYPE *Stop )( + IMediaStreamFilter * This); + + HRESULT ( STDMETHODCALLTYPE *Pause )( + IMediaStreamFilter * This); + + HRESULT ( STDMETHODCALLTYPE *Run )( + IMediaStreamFilter * This, + REFERENCE_TIME tStart); + + HRESULT ( STDMETHODCALLTYPE *GetState )( + IMediaStreamFilter * This, + /* [in] */ DWORD dwMilliSecsTimeout, + /* [out] */ FILTER_STATE *State); + + HRESULT ( STDMETHODCALLTYPE *SetSyncSource )( + IMediaStreamFilter * This, + /* [in] */ IReferenceClock *pClock); + + HRESULT ( STDMETHODCALLTYPE *GetSyncSource )( + IMediaStreamFilter * This, + /* [out] */ IReferenceClock **pClock); + + HRESULT ( STDMETHODCALLTYPE *EnumPins )( + IMediaStreamFilter * This, + /* [out] */ IEnumPins **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *FindPin )( + IMediaStreamFilter * This, + /* [string][in] */ LPCWSTR Id, + /* [out] */ IPin **ppPin); + + HRESULT ( STDMETHODCALLTYPE *QueryFilterInfo )( + IMediaStreamFilter * This, + /* [out] */ FILTER_INFO *pInfo); + + HRESULT ( STDMETHODCALLTYPE *JoinFilterGraph )( + IMediaStreamFilter * This, + /* [in] */ IFilterGraph *pGraph, + /* [string][in] */ LPCWSTR pName); + + HRESULT ( STDMETHODCALLTYPE *QueryVendorInfo )( + IMediaStreamFilter * This, + /* [string][out] */ LPWSTR *pVendorInfo); + + HRESULT ( STDMETHODCALLTYPE *AddMediaStream )( + IMediaStreamFilter * This, + /* [in] */ IAMMediaStream *pAMMediaStream); + + HRESULT ( STDMETHODCALLTYPE *GetMediaStream )( + IMediaStreamFilter * This, + /* [in] */ REFMSPID idPurpose, + /* [out] */ IMediaStream **ppMediaStream); + + HRESULT ( STDMETHODCALLTYPE *EnumMediaStreams )( + IMediaStreamFilter * This, + /* [in] */ long Index, + /* [out] */ IMediaStream **ppMediaStream); + + HRESULT ( STDMETHODCALLTYPE *SupportSeeking )( + IMediaStreamFilter * This, + /* [in] */ BOOL bRenderer); + + HRESULT ( STDMETHODCALLTYPE *ReferenceTimeToStreamTime )( + IMediaStreamFilter * This, + /* [out][in] */ REFERENCE_TIME *pTime); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentStreamTime )( + IMediaStreamFilter * This, + /* [out] */ REFERENCE_TIME *pCurrentStreamTime); + + HRESULT ( STDMETHODCALLTYPE *WaitUntil )( + IMediaStreamFilter * This, + /* [in] */ REFERENCE_TIME WaitStreamTime); + + HRESULT ( STDMETHODCALLTYPE *Flush )( + IMediaStreamFilter * This, + /* [in] */ BOOL bCancelEOS); + + HRESULT ( STDMETHODCALLTYPE *EndOfStream )( + IMediaStreamFilter * This); + + END_INTERFACE + } IMediaStreamFilterVtbl; + + interface IMediaStreamFilter + { + CONST_VTBL struct IMediaStreamFilterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaStreamFilter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaStreamFilter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaStreamFilter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaStreamFilter_GetClassID(This,pClassID) \ + (This)->lpVtbl -> GetClassID(This,pClassID) + + +#define IMediaStreamFilter_Stop(This) \ + (This)->lpVtbl -> Stop(This) + +#define IMediaStreamFilter_Pause(This) \ + (This)->lpVtbl -> Pause(This) + +#define IMediaStreamFilter_Run(This,tStart) \ + (This)->lpVtbl -> Run(This,tStart) + +#define IMediaStreamFilter_GetState(This,dwMilliSecsTimeout,State) \ + (This)->lpVtbl -> GetState(This,dwMilliSecsTimeout,State) + +#define IMediaStreamFilter_SetSyncSource(This,pClock) \ + (This)->lpVtbl -> SetSyncSource(This,pClock) + +#define IMediaStreamFilter_GetSyncSource(This,pClock) \ + (This)->lpVtbl -> GetSyncSource(This,pClock) + + +#define IMediaStreamFilter_EnumPins(This,ppEnum) \ + (This)->lpVtbl -> EnumPins(This,ppEnum) + +#define IMediaStreamFilter_FindPin(This,Id,ppPin) \ + (This)->lpVtbl -> FindPin(This,Id,ppPin) + +#define IMediaStreamFilter_QueryFilterInfo(This,pInfo) \ + (This)->lpVtbl -> QueryFilterInfo(This,pInfo) + +#define IMediaStreamFilter_JoinFilterGraph(This,pGraph,pName) \ + (This)->lpVtbl -> JoinFilterGraph(This,pGraph,pName) + +#define IMediaStreamFilter_QueryVendorInfo(This,pVendorInfo) \ + (This)->lpVtbl -> QueryVendorInfo(This,pVendorInfo) + + +#define IMediaStreamFilter_AddMediaStream(This,pAMMediaStream) \ + (This)->lpVtbl -> AddMediaStream(This,pAMMediaStream) + +#define IMediaStreamFilter_GetMediaStream(This,idPurpose,ppMediaStream) \ + (This)->lpVtbl -> GetMediaStream(This,idPurpose,ppMediaStream) + +#define IMediaStreamFilter_EnumMediaStreams(This,Index,ppMediaStream) \ + (This)->lpVtbl -> EnumMediaStreams(This,Index,ppMediaStream) + +#define IMediaStreamFilter_SupportSeeking(This,bRenderer) \ + (This)->lpVtbl -> SupportSeeking(This,bRenderer) + +#define IMediaStreamFilter_ReferenceTimeToStreamTime(This,pTime) \ + (This)->lpVtbl -> ReferenceTimeToStreamTime(This,pTime) + +#define IMediaStreamFilter_GetCurrentStreamTime(This,pCurrentStreamTime) \ + (This)->lpVtbl -> GetCurrentStreamTime(This,pCurrentStreamTime) + +#define IMediaStreamFilter_WaitUntil(This,WaitStreamTime) \ + (This)->lpVtbl -> WaitUntil(This,WaitStreamTime) + +#define IMediaStreamFilter_Flush(This,bCancelEOS) \ + (This)->lpVtbl -> Flush(This,bCancelEOS) + +#define IMediaStreamFilter_EndOfStream(This) \ + (This)->lpVtbl -> EndOfStream(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMediaStreamFilter_AddMediaStream_Proxy( + IMediaStreamFilter * This, + /* [in] */ IAMMediaStream *pAMMediaStream); + + +void __RPC_STUB IMediaStreamFilter_AddMediaStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStreamFilter_GetMediaStream_Proxy( + IMediaStreamFilter * This, + /* [in] */ REFMSPID idPurpose, + /* [out] */ IMediaStream **ppMediaStream); + + +void __RPC_STUB IMediaStreamFilter_GetMediaStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStreamFilter_EnumMediaStreams_Proxy( + IMediaStreamFilter * This, + /* [in] */ long Index, + /* [out] */ IMediaStream **ppMediaStream); + + +void __RPC_STUB IMediaStreamFilter_EnumMediaStreams_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStreamFilter_SupportSeeking_Proxy( + IMediaStreamFilter * This, + /* [in] */ BOOL bRenderer); + + +void __RPC_STUB IMediaStreamFilter_SupportSeeking_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStreamFilter_ReferenceTimeToStreamTime_Proxy( + IMediaStreamFilter * This, + /* [out][in] */ REFERENCE_TIME *pTime); + + +void __RPC_STUB IMediaStreamFilter_ReferenceTimeToStreamTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStreamFilter_GetCurrentStreamTime_Proxy( + IMediaStreamFilter * This, + /* [out] */ REFERENCE_TIME *pCurrentStreamTime); + + +void __RPC_STUB IMediaStreamFilter_GetCurrentStreamTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStreamFilter_WaitUntil_Proxy( + IMediaStreamFilter * This, + /* [in] */ REFERENCE_TIME WaitStreamTime); + + +void __RPC_STUB IMediaStreamFilter_WaitUntil_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStreamFilter_Flush_Proxy( + IMediaStreamFilter * This, + /* [in] */ BOOL bCancelEOS); + + +void __RPC_STUB IMediaStreamFilter_Flush_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStreamFilter_EndOfStream_Proxy( + IMediaStreamFilter * This); + + +void __RPC_STUB IMediaStreamFilter_EndOfStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaStreamFilter_INTERFACE_DEFINED__ */ + + +#ifndef __IDirectDrawMediaSampleAllocator_INTERFACE_DEFINED__ +#define __IDirectDrawMediaSampleAllocator_INTERFACE_DEFINED__ + +/* interface IDirectDrawMediaSampleAllocator */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IDirectDrawMediaSampleAllocator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("AB6B4AFC-F6E4-11d0-900D-00C04FD9189D") + IDirectDrawMediaSampleAllocator : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDirectDraw( + IDirectDraw **ppDirectDraw) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDirectDrawMediaSampleAllocatorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDirectDrawMediaSampleAllocator * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDirectDrawMediaSampleAllocator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDirectDrawMediaSampleAllocator * This); + + HRESULT ( STDMETHODCALLTYPE *GetDirectDraw )( + IDirectDrawMediaSampleAllocator * This, + IDirectDraw **ppDirectDraw); + + END_INTERFACE + } IDirectDrawMediaSampleAllocatorVtbl; + + interface IDirectDrawMediaSampleAllocator + { + CONST_VTBL struct IDirectDrawMediaSampleAllocatorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDirectDrawMediaSampleAllocator_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDirectDrawMediaSampleAllocator_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDirectDrawMediaSampleAllocator_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDirectDrawMediaSampleAllocator_GetDirectDraw(This,ppDirectDraw) \ + (This)->lpVtbl -> GetDirectDraw(This,ppDirectDraw) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDirectDrawMediaSampleAllocator_GetDirectDraw_Proxy( + IDirectDrawMediaSampleAllocator * This, + IDirectDraw **ppDirectDraw); + + +void __RPC_STUB IDirectDrawMediaSampleAllocator_GetDirectDraw_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDirectDrawMediaSampleAllocator_INTERFACE_DEFINED__ */ + + +#ifndef __IDirectDrawMediaSample_INTERFACE_DEFINED__ +#define __IDirectDrawMediaSample_INTERFACE_DEFINED__ + +/* interface IDirectDrawMediaSample */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IDirectDrawMediaSample; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("AB6B4AFE-F6E4-11d0-900D-00C04FD9189D") + IDirectDrawMediaSample : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetSurfaceAndReleaseLock( + /* [out] */ IDirectDrawSurface **ppDirectDrawSurface, + /* [out] */ RECT *pRect) = 0; + + virtual HRESULT STDMETHODCALLTYPE LockMediaSamplePointer( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDirectDrawMediaSampleVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDirectDrawMediaSample * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDirectDrawMediaSample * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDirectDrawMediaSample * This); + + HRESULT ( STDMETHODCALLTYPE *GetSurfaceAndReleaseLock )( + IDirectDrawMediaSample * This, + /* [out] */ IDirectDrawSurface **ppDirectDrawSurface, + /* [out] */ RECT *pRect); + + HRESULT ( STDMETHODCALLTYPE *LockMediaSamplePointer )( + IDirectDrawMediaSample * This); + + END_INTERFACE + } IDirectDrawMediaSampleVtbl; + + interface IDirectDrawMediaSample + { + CONST_VTBL struct IDirectDrawMediaSampleVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDirectDrawMediaSample_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDirectDrawMediaSample_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDirectDrawMediaSample_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDirectDrawMediaSample_GetSurfaceAndReleaseLock(This,ppDirectDrawSurface,pRect) \ + (This)->lpVtbl -> GetSurfaceAndReleaseLock(This,ppDirectDrawSurface,pRect) + +#define IDirectDrawMediaSample_LockMediaSamplePointer(This) \ + (This)->lpVtbl -> LockMediaSamplePointer(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDirectDrawMediaSample_GetSurfaceAndReleaseLock_Proxy( + IDirectDrawMediaSample * This, + /* [out] */ IDirectDrawSurface **ppDirectDrawSurface, + /* [out] */ RECT *pRect); + + +void __RPC_STUB IDirectDrawMediaSample_GetSurfaceAndReleaseLock_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDirectDrawMediaSample_LockMediaSamplePointer_Proxy( + IDirectDrawMediaSample * This); + + +void __RPC_STUB IDirectDrawMediaSample_LockMediaSamplePointer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDirectDrawMediaSample_INTERFACE_DEFINED__ */ + + +#ifndef __IAMMediaTypeStream_INTERFACE_DEFINED__ +#define __IAMMediaTypeStream_INTERFACE_DEFINED__ + +/* interface IAMMediaTypeStream */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IAMMediaTypeStream; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("AB6B4AFA-F6E4-11d0-900D-00C04FD9189D") + IAMMediaTypeStream : public IMediaStream + { + public: + virtual HRESULT STDMETHODCALLTYPE GetFormat( + /* [out] */ AM_MEDIA_TYPE *pMediaType, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFormat( + /* [in] */ AM_MEDIA_TYPE *pMediaType, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSample( + /* [in] */ long lSampleSize, + /* [in] */ BYTE *pbBuffer, + /* [in] */ DWORD dwFlags, + /* [in] */ IUnknown *pUnkOuter, + /* [out] */ IAMMediaTypeSample **ppAMMediaTypeSample) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStreamAllocatorRequirements( + /* [out] */ ALLOCATOR_PROPERTIES *pProps) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetStreamAllocatorRequirements( + /* [in] */ ALLOCATOR_PROPERTIES *pProps) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMMediaTypeStreamVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMMediaTypeStream * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMMediaTypeStream * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMMediaTypeStream * This); + + HRESULT ( STDMETHODCALLTYPE *GetMultiMediaStream )( + IAMMediaTypeStream * This, + /* [out] */ IMultiMediaStream **ppMultiMediaStream); + + HRESULT ( STDMETHODCALLTYPE *GetInformation )( + IAMMediaTypeStream * This, + /* [out] */ MSPID *pPurposeId, + /* [out] */ STREAM_TYPE *pType); + + HRESULT ( STDMETHODCALLTYPE *SetSameFormat )( + IAMMediaTypeStream * This, + /* [in] */ IMediaStream *pStreamThatHasDesiredFormat, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *AllocateSample )( + IAMMediaTypeStream * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IStreamSample **ppSample); + + HRESULT ( STDMETHODCALLTYPE *CreateSharedSample )( + IAMMediaTypeStream * This, + /* [in] */ IStreamSample *pExistingSample, + /* [in] */ DWORD dwFlags, + /* [out] */ IStreamSample **ppNewSample); + + HRESULT ( STDMETHODCALLTYPE *SendEndOfStream )( + IAMMediaTypeStream * This, + DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *GetFormat )( + IAMMediaTypeStream * This, + /* [out] */ AM_MEDIA_TYPE *pMediaType, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *SetFormat )( + IAMMediaTypeStream * This, + /* [in] */ AM_MEDIA_TYPE *pMediaType, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *CreateSample )( + IAMMediaTypeStream * This, + /* [in] */ long lSampleSize, + /* [in] */ BYTE *pbBuffer, + /* [in] */ DWORD dwFlags, + /* [in] */ IUnknown *pUnkOuter, + /* [out] */ IAMMediaTypeSample **ppAMMediaTypeSample); + + HRESULT ( STDMETHODCALLTYPE *GetStreamAllocatorRequirements )( + IAMMediaTypeStream * This, + /* [out] */ ALLOCATOR_PROPERTIES *pProps); + + HRESULT ( STDMETHODCALLTYPE *SetStreamAllocatorRequirements )( + IAMMediaTypeStream * This, + /* [in] */ ALLOCATOR_PROPERTIES *pProps); + + END_INTERFACE + } IAMMediaTypeStreamVtbl; + + interface IAMMediaTypeStream + { + CONST_VTBL struct IAMMediaTypeStreamVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMMediaTypeStream_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMMediaTypeStream_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMMediaTypeStream_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMMediaTypeStream_GetMultiMediaStream(This,ppMultiMediaStream) \ + (This)->lpVtbl -> GetMultiMediaStream(This,ppMultiMediaStream) + +#define IAMMediaTypeStream_GetInformation(This,pPurposeId,pType) \ + (This)->lpVtbl -> GetInformation(This,pPurposeId,pType) + +#define IAMMediaTypeStream_SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) \ + (This)->lpVtbl -> SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) + +#define IAMMediaTypeStream_AllocateSample(This,dwFlags,ppSample) \ + (This)->lpVtbl -> AllocateSample(This,dwFlags,ppSample) + +#define IAMMediaTypeStream_CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) \ + (This)->lpVtbl -> CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) + +#define IAMMediaTypeStream_SendEndOfStream(This,dwFlags) \ + (This)->lpVtbl -> SendEndOfStream(This,dwFlags) + + +#define IAMMediaTypeStream_GetFormat(This,pMediaType,dwFlags) \ + (This)->lpVtbl -> GetFormat(This,pMediaType,dwFlags) + +#define IAMMediaTypeStream_SetFormat(This,pMediaType,dwFlags) \ + (This)->lpVtbl -> SetFormat(This,pMediaType,dwFlags) + +#define IAMMediaTypeStream_CreateSample(This,lSampleSize,pbBuffer,dwFlags,pUnkOuter,ppAMMediaTypeSample) \ + (This)->lpVtbl -> CreateSample(This,lSampleSize,pbBuffer,dwFlags,pUnkOuter,ppAMMediaTypeSample) + +#define IAMMediaTypeStream_GetStreamAllocatorRequirements(This,pProps) \ + (This)->lpVtbl -> GetStreamAllocatorRequirements(This,pProps) + +#define IAMMediaTypeStream_SetStreamAllocatorRequirements(This,pProps) \ + (This)->lpVtbl -> SetStreamAllocatorRequirements(This,pProps) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeStream_GetFormat_Proxy( + IAMMediaTypeStream * This, + /* [out] */ AM_MEDIA_TYPE *pMediaType, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IAMMediaTypeStream_GetFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeStream_SetFormat_Proxy( + IAMMediaTypeStream * This, + /* [in] */ AM_MEDIA_TYPE *pMediaType, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IAMMediaTypeStream_SetFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeStream_CreateSample_Proxy( + IAMMediaTypeStream * This, + /* [in] */ long lSampleSize, + /* [in] */ BYTE *pbBuffer, + /* [in] */ DWORD dwFlags, + /* [in] */ IUnknown *pUnkOuter, + /* [out] */ IAMMediaTypeSample **ppAMMediaTypeSample); + + +void __RPC_STUB IAMMediaTypeStream_CreateSample_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeStream_GetStreamAllocatorRequirements_Proxy( + IAMMediaTypeStream * This, + /* [out] */ ALLOCATOR_PROPERTIES *pProps); + + +void __RPC_STUB IAMMediaTypeStream_GetStreamAllocatorRequirements_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeStream_SetStreamAllocatorRequirements_Proxy( + IAMMediaTypeStream * This, + /* [in] */ ALLOCATOR_PROPERTIES *pProps); + + +void __RPC_STUB IAMMediaTypeStream_SetStreamAllocatorRequirements_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMMediaTypeStream_INTERFACE_DEFINED__ */ + + +#ifndef __IAMMediaTypeSample_INTERFACE_DEFINED__ +#define __IAMMediaTypeSample_INTERFACE_DEFINED__ + +/* interface IAMMediaTypeSample */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IAMMediaTypeSample; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("AB6B4AFB-F6E4-11d0-900D-00C04FD9189D") + IAMMediaTypeSample : public IStreamSample + { + public: + virtual HRESULT STDMETHODCALLTYPE SetPointer( + /* [in] */ BYTE *pBuffer, + /* [in] */ long lSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPointer( + /* [out] */ BYTE **ppBuffer) = 0; + + virtual long STDMETHODCALLTYPE GetSize( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTime( + /* [out] */ REFERENCE_TIME *pTimeStart, + /* [out] */ REFERENCE_TIME *pTimeEnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetTime( + /* [in] */ REFERENCE_TIME *pTimeStart, + /* [in] */ REFERENCE_TIME *pTimeEnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsSyncPoint( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSyncPoint( + BOOL bIsSyncPoint) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsPreroll( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPreroll( + BOOL bIsPreroll) = 0; + + virtual long STDMETHODCALLTYPE GetActualDataLength( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetActualDataLength( + long __MIDL_0020) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMediaType( + AM_MEDIA_TYPE **ppMediaType) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMediaType( + AM_MEDIA_TYPE *pMediaType) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsDiscontinuity( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDiscontinuity( + BOOL bDiscontinuity) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMediaTime( + /* [out] */ LONGLONG *pTimeStart, + /* [out] */ LONGLONG *pTimeEnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMediaTime( + /* [in] */ LONGLONG *pTimeStart, + /* [in] */ LONGLONG *pTimeEnd) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMMediaTypeSampleVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMMediaTypeSample * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMMediaTypeSample * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMMediaTypeSample * This); + + HRESULT ( STDMETHODCALLTYPE *GetMediaStream )( + IAMMediaTypeSample * This, + /* [in] */ IMediaStream **ppMediaStream); + + HRESULT ( STDMETHODCALLTYPE *GetSampleTimes )( + IAMMediaTypeSample * This, + /* [out] */ STREAM_TIME *pStartTime, + /* [out] */ STREAM_TIME *pEndTime, + /* [out] */ STREAM_TIME *pCurrentTime); + + HRESULT ( STDMETHODCALLTYPE *SetSampleTimes )( + IAMMediaTypeSample * This, + /* [in] */ const STREAM_TIME *pStartTime, + /* [in] */ const STREAM_TIME *pEndTime); + + HRESULT ( STDMETHODCALLTYPE *Update )( + IAMMediaTypeSample * This, + /* [in] */ DWORD dwFlags, + /* [in] */ HANDLE hEvent, + /* [in] */ PAPCFUNC pfnAPC, + /* [in] */ DWORD_PTR dwAPCData); + + HRESULT ( STDMETHODCALLTYPE *CompletionStatus )( + IAMMediaTypeSample * This, + /* [in] */ DWORD dwFlags, + /* [in] */ DWORD dwMilliseconds); + + HRESULT ( STDMETHODCALLTYPE *SetPointer )( + IAMMediaTypeSample * This, + /* [in] */ BYTE *pBuffer, + /* [in] */ long lSize); + + HRESULT ( STDMETHODCALLTYPE *GetPointer )( + IAMMediaTypeSample * This, + /* [out] */ BYTE **ppBuffer); + + long ( STDMETHODCALLTYPE *GetSize )( + IAMMediaTypeSample * This); + + HRESULT ( STDMETHODCALLTYPE *GetTime )( + IAMMediaTypeSample * This, + /* [out] */ REFERENCE_TIME *pTimeStart, + /* [out] */ REFERENCE_TIME *pTimeEnd); + + HRESULT ( STDMETHODCALLTYPE *SetTime )( + IAMMediaTypeSample * This, + /* [in] */ REFERENCE_TIME *pTimeStart, + /* [in] */ REFERENCE_TIME *pTimeEnd); + + HRESULT ( STDMETHODCALLTYPE *IsSyncPoint )( + IAMMediaTypeSample * This); + + HRESULT ( STDMETHODCALLTYPE *SetSyncPoint )( + IAMMediaTypeSample * This, + BOOL bIsSyncPoint); + + HRESULT ( STDMETHODCALLTYPE *IsPreroll )( + IAMMediaTypeSample * This); + + HRESULT ( STDMETHODCALLTYPE *SetPreroll )( + IAMMediaTypeSample * This, + BOOL bIsPreroll); + + long ( STDMETHODCALLTYPE *GetActualDataLength )( + IAMMediaTypeSample * This); + + HRESULT ( STDMETHODCALLTYPE *SetActualDataLength )( + IAMMediaTypeSample * This, + long __MIDL_0020); + + HRESULT ( STDMETHODCALLTYPE *GetMediaType )( + IAMMediaTypeSample * This, + AM_MEDIA_TYPE **ppMediaType); + + HRESULT ( STDMETHODCALLTYPE *SetMediaType )( + IAMMediaTypeSample * This, + AM_MEDIA_TYPE *pMediaType); + + HRESULT ( STDMETHODCALLTYPE *IsDiscontinuity )( + IAMMediaTypeSample * This); + + HRESULT ( STDMETHODCALLTYPE *SetDiscontinuity )( + IAMMediaTypeSample * This, + BOOL bDiscontinuity); + + HRESULT ( STDMETHODCALLTYPE *GetMediaTime )( + IAMMediaTypeSample * This, + /* [out] */ LONGLONG *pTimeStart, + /* [out] */ LONGLONG *pTimeEnd); + + HRESULT ( STDMETHODCALLTYPE *SetMediaTime )( + IAMMediaTypeSample * This, + /* [in] */ LONGLONG *pTimeStart, + /* [in] */ LONGLONG *pTimeEnd); + + END_INTERFACE + } IAMMediaTypeSampleVtbl; + + interface IAMMediaTypeSample + { + CONST_VTBL struct IAMMediaTypeSampleVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMMediaTypeSample_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMMediaTypeSample_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMMediaTypeSample_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMMediaTypeSample_GetMediaStream(This,ppMediaStream) \ + (This)->lpVtbl -> GetMediaStream(This,ppMediaStream) + +#define IAMMediaTypeSample_GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime) \ + (This)->lpVtbl -> GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime) + +#define IAMMediaTypeSample_SetSampleTimes(This,pStartTime,pEndTime) \ + (This)->lpVtbl -> SetSampleTimes(This,pStartTime,pEndTime) + +#define IAMMediaTypeSample_Update(This,dwFlags,hEvent,pfnAPC,dwAPCData) \ + (This)->lpVtbl -> Update(This,dwFlags,hEvent,pfnAPC,dwAPCData) + +#define IAMMediaTypeSample_CompletionStatus(This,dwFlags,dwMilliseconds) \ + (This)->lpVtbl -> CompletionStatus(This,dwFlags,dwMilliseconds) + + +#define IAMMediaTypeSample_SetPointer(This,pBuffer,lSize) \ + (This)->lpVtbl -> SetPointer(This,pBuffer,lSize) + +#define IAMMediaTypeSample_GetPointer(This,ppBuffer) \ + (This)->lpVtbl -> GetPointer(This,ppBuffer) + +#define IAMMediaTypeSample_GetSize(This) \ + (This)->lpVtbl -> GetSize(This) + +#define IAMMediaTypeSample_GetTime(This,pTimeStart,pTimeEnd) \ + (This)->lpVtbl -> GetTime(This,pTimeStart,pTimeEnd) + +#define IAMMediaTypeSample_SetTime(This,pTimeStart,pTimeEnd) \ + (This)->lpVtbl -> SetTime(This,pTimeStart,pTimeEnd) + +#define IAMMediaTypeSample_IsSyncPoint(This) \ + (This)->lpVtbl -> IsSyncPoint(This) + +#define IAMMediaTypeSample_SetSyncPoint(This,bIsSyncPoint) \ + (This)->lpVtbl -> SetSyncPoint(This,bIsSyncPoint) + +#define IAMMediaTypeSample_IsPreroll(This) \ + (This)->lpVtbl -> IsPreroll(This) + +#define IAMMediaTypeSample_SetPreroll(This,bIsPreroll) \ + (This)->lpVtbl -> SetPreroll(This,bIsPreroll) + +#define IAMMediaTypeSample_GetActualDataLength(This) \ + (This)->lpVtbl -> GetActualDataLength(This) + +#define IAMMediaTypeSample_SetActualDataLength(This,__MIDL_0020) \ + (This)->lpVtbl -> SetActualDataLength(This,__MIDL_0020) + +#define IAMMediaTypeSample_GetMediaType(This,ppMediaType) \ + (This)->lpVtbl -> GetMediaType(This,ppMediaType) + +#define IAMMediaTypeSample_SetMediaType(This,pMediaType) \ + (This)->lpVtbl -> SetMediaType(This,pMediaType) + +#define IAMMediaTypeSample_IsDiscontinuity(This) \ + (This)->lpVtbl -> IsDiscontinuity(This) + +#define IAMMediaTypeSample_SetDiscontinuity(This,bDiscontinuity) \ + (This)->lpVtbl -> SetDiscontinuity(This,bDiscontinuity) + +#define IAMMediaTypeSample_GetMediaTime(This,pTimeStart,pTimeEnd) \ + (This)->lpVtbl -> GetMediaTime(This,pTimeStart,pTimeEnd) + +#define IAMMediaTypeSample_SetMediaTime(This,pTimeStart,pTimeEnd) \ + (This)->lpVtbl -> SetMediaTime(This,pTimeStart,pTimeEnd) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_SetPointer_Proxy( + IAMMediaTypeSample * This, + /* [in] */ BYTE *pBuffer, + /* [in] */ long lSize); + + +void __RPC_STUB IAMMediaTypeSample_SetPointer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_GetPointer_Proxy( + IAMMediaTypeSample * This, + /* [out] */ BYTE **ppBuffer); + + +void __RPC_STUB IAMMediaTypeSample_GetPointer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +long STDMETHODCALLTYPE IAMMediaTypeSample_GetSize_Proxy( + IAMMediaTypeSample * This); + + +void __RPC_STUB IAMMediaTypeSample_GetSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_GetTime_Proxy( + IAMMediaTypeSample * This, + /* [out] */ REFERENCE_TIME *pTimeStart, + /* [out] */ REFERENCE_TIME *pTimeEnd); + + +void __RPC_STUB IAMMediaTypeSample_GetTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_SetTime_Proxy( + IAMMediaTypeSample * This, + /* [in] */ REFERENCE_TIME *pTimeStart, + /* [in] */ REFERENCE_TIME *pTimeEnd); + + +void __RPC_STUB IAMMediaTypeSample_SetTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_IsSyncPoint_Proxy( + IAMMediaTypeSample * This); + + +void __RPC_STUB IAMMediaTypeSample_IsSyncPoint_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_SetSyncPoint_Proxy( + IAMMediaTypeSample * This, + BOOL bIsSyncPoint); + + +void __RPC_STUB IAMMediaTypeSample_SetSyncPoint_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_IsPreroll_Proxy( + IAMMediaTypeSample * This); + + +void __RPC_STUB IAMMediaTypeSample_IsPreroll_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_SetPreroll_Proxy( + IAMMediaTypeSample * This, + BOOL bIsPreroll); + + +void __RPC_STUB IAMMediaTypeSample_SetPreroll_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +long STDMETHODCALLTYPE IAMMediaTypeSample_GetActualDataLength_Proxy( + IAMMediaTypeSample * This); + + +void __RPC_STUB IAMMediaTypeSample_GetActualDataLength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_SetActualDataLength_Proxy( + IAMMediaTypeSample * This, + long __MIDL_0020); + + +void __RPC_STUB IAMMediaTypeSample_SetActualDataLength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_GetMediaType_Proxy( + IAMMediaTypeSample * This, + AM_MEDIA_TYPE **ppMediaType); + + +void __RPC_STUB IAMMediaTypeSample_GetMediaType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_SetMediaType_Proxy( + IAMMediaTypeSample * This, + AM_MEDIA_TYPE *pMediaType); + + +void __RPC_STUB IAMMediaTypeSample_SetMediaType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_IsDiscontinuity_Proxy( + IAMMediaTypeSample * This); + + +void __RPC_STUB IAMMediaTypeSample_IsDiscontinuity_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_SetDiscontinuity_Proxy( + IAMMediaTypeSample * This, + BOOL bDiscontinuity); + + +void __RPC_STUB IAMMediaTypeSample_SetDiscontinuity_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_GetMediaTime_Proxy( + IAMMediaTypeSample * This, + /* [out] */ LONGLONG *pTimeStart, + /* [out] */ LONGLONG *pTimeEnd); + + +void __RPC_STUB IAMMediaTypeSample_GetMediaTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_SetMediaTime_Proxy( + IAMMediaTypeSample * This, + /* [in] */ LONGLONG *pTimeStart, + /* [in] */ LONGLONG *pTimeEnd); + + +void __RPC_STUB IAMMediaTypeSample_SetMediaTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMMediaTypeSample_INTERFACE_DEFINED__ */ + + + +#ifndef __DirectShowStreamLib_LIBRARY_DEFINED__ +#define __DirectShowStreamLib_LIBRARY_DEFINED__ + +/* library DirectShowStreamLib */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_DirectShowStreamLib; + +EXTERN_C const CLSID CLSID_AMMultiMediaStream; + +#ifdef __cplusplus + +class DECLSPEC_UUID("49c47ce5-9ba4-11d0-8212-00c04fc32c45") +AMMultiMediaStream; +#endif +#endif /* __DirectShowStreamLib_LIBRARY_DEFINED__ */ + +/* interface __MIDL_itf_amstream_0428 */ +/* [local] */ + +#ifndef __cplusplus +EXTERN_C const CLSID CLSID_AMMultiMediaStream; +#endif +DEFINE_GUID(CLSID_AMDirectDrawStream, /* 49c47ce4-9ba4-11d0-8212-00c04fc32c45 */ +0x49c47ce4, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45); +DEFINE_GUID(CLSID_AMAudioStream, /* 8496e040-af4c-11d0-8212-00c04fc32c45 */ +0x8496e040, 0xaf4c, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45); +DEFINE_GUID(CLSID_AMAudioData, /* f2468580-af8a-11d0-8212-00c04fc32c45 */ +0xf2468580, 0xaf8a, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45); +DEFINE_GUID(CLSID_AMMediaTypeStream, /* CF0F2F7C-F7BF-11d0-900D-00C04FD9189D */ +0xcf0f2f7c, 0xf7bf, 0x11d0, 0x90, 0xd, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d); + + +extern RPC_IF_HANDLE __MIDL_itf_amstream_0428_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_amstream_0428_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER BSTR_UserSize( unsigned long *, unsigned long , BSTR * ); +unsigned char * __RPC_USER BSTR_UserMarshal( unsigned long *, unsigned char *, BSTR * ); +unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); +void __RPC_USER BSTR_UserFree( unsigned long *, BSTR * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/Include/dxwnd.h b/Include/dxwnd.h index 788f1b7..9c9655b 100644 --- a/Include/dxwnd.h +++ b/Include/dxwnd.h @@ -116,6 +116,7 @@ #define NOALPHACHANNEL 0x00000001 // By default, create surfaces with no DDPF_ALPHAPIXELS capability #define SUPPRESSCHILD 0x00000002 // suppress child process generation (CreateProcessA, ...?) #define FIXREFCOUNTER 0x00000004 // fixes the reference counter for the main directdraw session (the one connected to primary surfaces) +#define SHOWTIMESTRETCH 0x00000008 // Shows time stretching multiplier on screen overlay // logging Tflags DWORD: #define OUTTRACE 0x00000001 // enables tracing to dxwnd.log in general diff --git a/build/dxwnd.1.ini b/build/dxwnd.1.ini deleted file mode 100644 index ca2a645..0000000 --- a/build/dxwnd.1.ini +++ /dev/null @@ -1,5848 +0,0 @@ -[target] -title0=007 NightFire -path0=D:\Games\007_NightFire\Bond.exe -module0= -opengllib0= -ver0=0 -coord0=0 -flag0=134217730 -flagg0=134348800 -flagh0=20 -flagi0=0 -tflag0=0 -initx0=0 -inity0=0 -minx0=0 -miny0=0 -maxx0=0 -maxy0=0 -posx0=50 -posy0=50 -sizx0=800 -sizy0=600 -maxfps0=0 -initts0=0 -title1=1602 A.D. -path1=C:\Games\1602 A.D\1602.exe -module1= -opengllib1= -ver1=0 -coord1=0 -flag1=679608354 -flagg1=0 -flagh1=0 -flagi1=0 -tflag1=0 -initx1=0 -inity1=0 -minx1=0 -miny1=0 -maxx1=0 -maxy1=0 -posx1=50 -posy1=50 -sizx1=800 -sizy1=600 -maxfps1=0 -initts1=-8 -title2=688I Hunter Killer -path2=D:\Games\688\688I_HK.EXE -module2= -opengllib2= -ver2=0 -coord2=0 -flag2=1744830626 -flagg2=135266304 -flagh2=20 -flagi2=0 -tflag2=3 -initx2=0 -inity2=0 -minx2=0 -miny2=0 -maxx2=0 -maxy2=0 -posx2=50 -posy2=50 -sizx2=0 -sizy2=0 -maxfps2=0 -initts2=0 -title3=7th Legion -path3=D:\Games\7th_Legion\LEGION.EXE -module3= -opengllib3= -ver3=0 -coord3=0 -flag3=402669607 -flagg3=539056144 -flagh3=0 -flagi3=0 -tflag3=64 -initx3=0 -inity3=0 -minx3=0 -miny3=0 -maxx3=0 -maxy3=0 -posx3=50 -posy3=50 -sizx3=800 -sizy3=600 -maxfps3=40 -initts3=-7 -title4=A10 Cuba -path4=D:\Games\A10\A10Cuba.exe -module4= -opengllib4= -ver4=0 -coord4=1 -flag4=162 -flagg4=1074003984 -flagh4=48 -flagi4=0 -tflag4=0 -initx4=0 -inity4=0 -minx4=0 -miny4=0 -maxx4=0 -maxy4=0 -posx4=50 -posy4=50 -sizx4=800 -sizy4=600 -maxfps4=0 -initts4=-7 -title5=Achtung Spitfire -path5=D:\Games\Achtung Spitfire\ASP95.EXE -module5= -opengllib5= -ver5=0 -coord5=0 -flag5=536870946 -flagg5=0 -flagh5=16 -flagi5=0 -tflag5=70 -initx5=0 -inity5=0 -minx5=0 -miny5=0 -maxx5=0 -maxy5=0 -posx5=50 -posy5=50 -sizx5=800 -sizy5=600 -maxfps5=0 -initts5=0 -title6=Actua Soccer 3 -path6=D:\Games\ActuaSoccer3\Soccer3.exe -module6= -opengllib6= -ver6=0 -coord6=0 -flag6=671088674 -flagg6=256 -flagh6=0 -flagi6=0 -tflag6=262 -initx6=0 -inity6=0 -minx6=0 -miny6=0 -maxx6=0 -maxy6=0 -posx6=50 -posy6=50 -sizx6=800 -sizy6=600 -maxfps6=0 -initts6=0 -title7=AfterLife -path7=d:\Games\ALIFE\ALIFE.EXE -module7= -opengllib7= -ver7=1 -coord7=0 -flag7=142606370 -flagg7=1048736 -flagh7=16 -flagi7=0 -tflag7=0 -initx7=0 -inity7=0 -minx7=0 -miny7=0 -maxx7=0 -maxy7=0 -posx7=50 -posy7=50 -sizx7=800 -sizy7=600 -maxfps7=0 -initts7=0 -title8=Age of Empires -path8=D:\Games\Age of Empires\EMPIRES.EXE -module8= -opengllib8= -ver8=0 -coord8=0 -flag8=402655267 -flagg8=69632 -flagh8=16 -flagi8=0 -tflag8=3 -initx8=0 -inity8=0 -minx8=0 -miny8=0 -maxx8=0 -maxy8=0 -posx8=50 -posy8=50 -sizx8=800 -sizy8=600 -maxfps8=10 -initts8=0 -title9=Age of Empires 2 -path9=D:\Games\Age of Empires 2\empires2.exe -module9= -opengllib9= -ver9=0 -coord9=1 -flag9=134217762 -flagg9=1073762320 -flagh9=48 -flagi9=0 -tflag9=0 -initx9=0 -inity9=0 -minx9=0 -miny9=0 -maxx9=0 -maxy9=0 -posx9=50 -posy9=50 -sizx9=800 -sizy9=600 -maxfps9=40 -initts9=0 -title10=Age of Empires III -path10=D:\Games\Age of Empires III\age3.exe -module10= -opengllib10= -ver10=0 -coord10=1 -flag10=-1342169053 -flagg10=1243611136 -flagh10=56 -flagi10=0 -tflag10=2 -initx10=0 -inity10=0 -minx10=0 -miny10=0 -maxx10=0 -maxy10=0 -posx10=50 -posy10=50 -sizx10=800 -sizy10=600 -maxfps10=0 -initts10=0 -title11=Age of Empires the Rise of Rome -path11=D:\Games\Age of Empires\EMPIRESX.EXE -module11= -opengllib11= -ver11=0 -coord11=0 -flag11=134217762 -flagg11=1073823744 -flagh11=16 -flagi11=0 -tflag11=0 -initx11=0 -inity11=0 -minx11=0 -miny11=0 -maxx11=0 -maxy11=0 -posx11=50 -posy11=50 -sizx11=800 -sizy11=600 -maxfps11=0 -initts11=0 -title12=Age of Wonders -path12=D:\Games\Age of Wonders\AoW.exe -module12= -opengllib12= -ver12=7 -coord12=0 -flag12=268435458 -flagg12=1048576 -flagh12=20 -flagi12=0 -tflag12=259 -initx12=0 -inity12=0 -minx12=0 -miny12=0 -maxx12=0 -maxy12=0 -posx12=50 -posy12=50 -sizx12=800 -sizy12=600 -maxfps12=0 -initts12=0 -title13=Airline Tycoon Evolution -path13=D:\Games\Airline.Tycoon.Evolution\AT.EXE -module13= -opengllib13= -ver13=0 -coord13=0 -flag13=1493172257 -flagg13=1048576 -flagh13=148 -flagi13=0 -tflag13=323 -initx13=0 -inity13=0 -minx13=0 -miny13=0 -maxx13=0 -maxy13=0 -posx13=50 -posy13=50 -sizx13=800 -sizy13=600 -maxfps13=0 -initts13=0 -title14=Alien Cabal 95 -path14=D:\Games\Alien_cabal\ACabal95.exe -module14= -opengllib14= -ver14=0 -coord14=0 -flag14=67108896 -flagg14=0 -flagh14=16 -flagi14=0 -tflag14=0 -initx14=0 -inity14=0 -minx14=0 -miny14=0 -maxx14=0 -maxy14=0 -posx14=0 -posy14=0 -sizx14=800 -sizy14=600 -maxfps14=0 -initts14=0 -title15=Alien vs. Predator -path15=C:\Games\Alien vs Predator\AvP.exe -module15= -opengllib15= -ver15=0 -coord15=0 -flag15=8224 -flagg15=0 -flagh15=0 -flagi15=0 -tflag15=130 -initx15=0 -inity15=0 -minx15=0 -miny15=0 -maxx15=0 -maxy15=0 -posx15=50 -posy15=50 -sizx15=800 -sizy15=600 -maxfps15=0 -initts15=0 -title16=Aliens Nations Demo -path16=C:\Games\aademo\Bin\AA.exe -module16= -opengllib16= -ver16=0 -coord16=0 -flag16=134217762 -flagg16=0 -flagh16=0 -flagi16=0 -tflag16=0 -initx16=0 -inity16=0 -minx16=0 -miny16=0 -maxx16=0 -maxy16=0 -posx16=0 -posy16=0 -sizx16=800 -sizy16=600 -maxfps16=0 -initts16=0 -title17=America -path17=D:\Games\America\america.exe -module17= -opengllib17= -ver17=0 -coord17=0 -flag17=134234150 -flagg17=16 -flagh17=20 -flagi17=0 -tflag17=0 -initx17=0 -inity17=0 -minx17=0 -miny17=0 -maxx17=0 -maxy17=0 -posx17=50 -posy17=50 -sizx17=800 -sizy17=600 -maxfps17=0 -initts17=0 -title18=American McGee's Alice Demo -path18=D:\Games\American McGee's Alice Demo\alice.exe -module18= -opengllib18= -ver18=10 -coord18=0 -flag18=268435458 -flagg18=131072 -flagh18=16 -flagi18=0 -tflag18=0 -initx18=0 -inity18=0 -minx18=0 -miny18=0 -maxx18=0 -maxy18=0 -posx18=50 -posy18=50 -sizx18=800 -sizy18=600 -maxfps18=0 -initts18=0 -title19=Ancient Conquest -path19=D:\Games\Ancient Conquest\ANCIENT.EXE -module19= -opengllib19= -ver19=0 -coord19=0 -flag19=142606370 -flagg19=1048576 -flagh19=16 -flagi19=0 -tflag19=258 -initx19=0 -inity19=0 -minx19=0 -miny19=0 -maxx19=0 -maxy19=0 -posx19=50 -posy19=50 -sizx19=800 -sizy19=600 -maxfps19=0 -initts19=0 -title20=Ancient Evil -path20=C:\Games\Ancient Evil\RPG.EXE -module20=DDW16.DLL -opengllib20= -ver20=1 -coord20=0 -flag20=-2013249497 -flagg20=0 -flagh20=0 -flagi20=0 -tflag20=2 -initx20=0 -inity20=0 -minx20=0 -miny20=0 -maxx20=0 -maxy20=0 -posx20=50 -posy20=50 -sizx20=800 -sizy20=600 -maxfps20=0 -initts20=0 -title21=Ancient Evil Demo -path21=C:\Games\Ancient Evil Curse of the Snake Cult\aecsc-demo.exe -module21= -opengllib21= -ver21=1 -coord21=0 -flag21=134242336 -flagg21=0 -flagh21=0 -flagi21=0 -tflag21=0 -initx21=0 -inity21=0 -minx21=0 -miny21=0 -maxx21=0 -maxy21=0 -posx21=50 -posy21=50 -sizx21=800 -sizy21=600 -maxfps21=0 -initts21=0 -title22=Armymen -path22=C:\Games\armymen\Armymen.exe -module22= -opengllib22= -ver22=0 -coord22=0 -flag22=134218274 -flagg22=1 -flagh22=0 -flagi22=0 -tflag22=0 -initx22=0 -inity22=0 -minx22=0 -miny22=0 -maxx22=0 -maxy22=0 -posx22=50 -posy22=50 -sizx22=800 -sizy22=600 -maxfps22=0 -initts22=0 -title23=ArmyMen 2 -path23=C:\Games\army2\ArmyMen2.exe -module23= -opengllib23= -ver23=0 -coord23=0 -flag23=402653730 -flagg23=0 -flagh23=0 -flagi23=0 -tflag23=0 -initx23=0 -inity23=0 -minx23=0 -miny23=0 -maxx23=0 -maxy23=0 -posx23=50 -posy23=50 -sizx23=800 -sizy23=600 -maxfps23=0 -initts23=0 -title24=Atomic Bomberman -path24=C:\Games\Atomic Bomberman\BM95.EXE -module24= -opengllib24= -ver24=0 -coord24=0 -flag24=2 -flagg24=0 -flagh24=0 -flagi24=0 -tflag24=0 -initx24=0 -inity24=0 -minx24=0 -miny24=0 -maxx24=0 -maxy24=0 -posx24=50 -posy24=50 -sizx24=800 -sizy24=600 -maxfps24=0 -initts24=0 -title25=Axis & Allies Iron Blitz Edition -path25=C:\Games\Axis & Allies Iron Blitz Edition\Axis & Allies\AxisAllies.exe -module25= -opengllib25= -ver25=0 -coord25=0 -flag25=-2147483614 -flagg25=0 -flagh25=0 -flagi25=0 -tflag25=0 -initx25=0 -inity25=0 -minx25=0 -miny25=0 -maxx25=0 -maxy25=0 -posx25=50 -posy25=50 -sizx25=800 -sizy25=600 -maxfps25=0 -initts25=0 -title26=Baldies -path26=C:\Games\Baldies for Win95\baldies.exe -module26= -opengllib26= -ver26=0 -coord26=0 -flag26=537010210 -flagg26=0 -flagh26=0 -flagi26=0 -tflag26=0 -initx26=0 -inity26=0 -minx26=0 -miny26=0 -maxx26=0 -maxy26=0 -posx26=50 -posy26=50 -sizx26=800 -sizy26=600 -maxfps26=0 -initts26=0 -title27=Battle Arena Toshinden 2 -path27=D:\Games\Battle Arena Toshinden 2\T2.EXE -module27= -opengllib27= -ver27=0 -coord27=0 -flag27=134217761 -flagg27=134217808 -flagh27=16 -flagi27=0 -tflag27=2 -initx27=0 -inity27=0 -minx27=0 -miny27=0 -maxx27=0 -maxy27=0 -posx27=50 -posy27=50 -sizx27=800 -sizy27=600 -maxfps27=0 -initts27=0 -title28=Battle Commander -path28=D:\Games\Battle Commander\bcommand.exe -module28= -opengllib28= -ver28=0 -coord28=0 -flag28=134217794 -flagg28=0 -flagh28=0 -flagi28=0 -tflag28=2 -initx28=0 -inity28=0 -minx28=0 -miny28=0 -maxx28=0 -maxy28=0 -posx28=50 -posy28=50 -sizx28=800 -sizy28=600 -maxfps28=0 -initts28=0 -title29=Beasts & Bumpkins -path29=C:\Games\Beasts and Bumpkins\BEASTS.EXE -module29= -opengllib29= -ver29=0 -coord29=0 -flag29=2105890 -flagg29=0 -flagh29=0 -flagi29=0 -tflag29=2 -initx29=0 -inity29=0 -minx29=0 -miny29=0 -maxx29=0 -maxy29=0 -posx29=50 -posy29=50 -sizx29=800 -sizy29=600 -maxfps29=0 -initts29=0 -title30=Beats of Rage -path30=C:\Games\BOR\BeatsOfRage.exe -module30= -opengllib30= -ver30=0 -coord30=0 -flag30=537002018 -flagg30=0 -flagh30=0 -flagi30=0 -tflag30=0 -initx30=0 -inity30=0 -minx30=0 -miny30=0 -maxx30=0 -maxy30=0 -posx30=50 -posy30=50 -sizx30=800 -sizy30=600 -maxfps30=0 -initts30=0 -title31=Beyond Divinity -path31=D:\Games\Beyond Divinity\Div.exe -module31= -opengllib31= -ver31=0 -coord31=0 -flag31=134217728 -flagg31=671088640 -flagh31=61 -flagi31=0 -tflag31=3 -initx31=0 -inity31=0 -minx31=0 -miny31=0 -maxx31=0 -maxy31=0 -posx31=50 -posy31=50 -sizx31=0 -sizy31=0 -maxfps31=0 -initts31=0 -title32=Beyond Good & Evil Demo -path32=C:\Games\Beyond Good & Evil\BGE.exe -module32= -opengllib32= -ver32=0 -coord32=0 -flag32=0 -flagg32=0 -flagh32=0 -flagi32=0 -tflag32=0 -initx32=0 -inity32=0 -minx32=0 -miny32=0 -maxx32=0 -maxy32=0 -posx32=50 -posy32=50 -sizx32=800 -sizy32=600 -maxfps32=0 -initts32=0 -title33=Black & White -path33=D:\Games\Black & White\runblack.exe -module33= -opengllib33= -ver33=0 -coord33=0 -flag33=0 -flagg33=134217728 -flagh33=29 -flagi33=0 -tflag33=0 -initx33=0 -inity33=0 -minx33=0 -miny33=0 -maxx33=0 -maxy33=0 -posx33=50 -posy33=50 -sizx33=800 -sizy33=600 -maxfps33=0 -initts33=0 -title34=Black Moon Lune Noire -path34=C:\Games\Black Moon\Lune noire\Engine.exe -module34= -opengllib34= -ver34=0 -coord34=0 -flag34=262179 -flagg34=0 -flagh34=0 -flagi34=0 -tflag34=0 -initx34=0 -inity34=0 -minx34=0 -miny34=0 -maxx34=0 -maxy34=0 -posx34=50 -posy34=50 -sizx34=800 -sizy34=600 -maxfps34=0 -initts34=0 -title35=Black Thorn -path35=D:\Games\BlackThorn\BlackThorn.exe -module35= -opengllib35= -ver35=0 -coord35=0 -flag35=0 -flagg35=134217984 -flagh35=48 -flagi35=0 -tflag35=66 -initx35=0 -inity35=0 -minx35=0 -miny35=0 -maxx35=0 -maxy35=0 -posx35=50 -posy35=50 -sizx35=800 -sizy35=600 -maxfps35=0 -initts35=0 -title36=Blood Omen Legacy of Kain -path36=C:\Games\Blood Omen\KAIN.EXE -module36= -opengllib36= -ver36=0 -coord36=0 -flag36=49190 -flagg36=0 -flagh36=0 -flagi36=0 -tflag36=0 -initx36=0 -inity36=0 -minx36=0 -miny36=0 -maxx36=0 -maxy36=0 -posx36=50 -posy36=50 -sizx36=800 -sizy36=600 -maxfps36=0 -initts36=0 -title37=Bonkheads -path37=C:\Games\Bonkheads\Bonkheads.exe -module37= -opengllib37= -ver37=0 -coord37=0 -flag37=262690 -flagg37=16 -flagh37=0 -flagi37=0 -tflag37=78 -initx37=0 -inity37=0 -minx37=0 -miny37=0 -maxx37=0 -maxy37=0 -posx37=50 -posy37=50 -sizx37=800 -sizy37=600 -maxfps37=0 -initts37=0 -title38=Bubble Bobble 2 -path38=C:\Games\bubble2\BOBO2.EXE -module38= -opengllib38= -ver38=0 -coord38=0 -flag38=34 -flagg38=0 -flagh38=0 -flagi38=0 -tflag38=0 -initx38=0 -inity38=0 -minx38=0 -miny38=0 -maxx38=0 -maxy38=0 -posx38=50 -posy38=50 -sizx38=800 -sizy38=600 -maxfps38=0 -initts38=0 -title39=Bug! -path39=C:\Games\Bug\BUG!.EXE -module39= -opengllib39= -ver39=0 -coord39=0 -flag39=134225954 -flagg39=32 -flagh39=0 -flagi39=0 -tflag39=2 -initx39=0 -inity39=0 -minx39=0 -miny39=0 -maxx39=0 -maxy39=0 -posx39=0 -posy39=0 -sizx39=800 -sizy39=600 -maxfps39=0 -initts39=0 -title40=BW2Demo.exe -path40=D:\Games\Black & White 2 Demo\BW2Demo.exe -module40= -opengllib40= -ver40=0 -coord40=0 -flag40=0 -flagg40=134217728 -flagh40=221 -flagi40=0 -tflag40=0 -initx40=0 -inity40=0 -minx40=0 -miny40=0 -maxx40=0 -maxy40=0 -posx40=50 -posy40=50 -sizx40=800 -sizy40=600 -maxfps40=0 -initts40=0 -title41=Caesar III -path41=C:\Games\Caesar III\c3.exe -module41= -opengllib41= -ver41=0 -coord41=0 -flag41=-2147475422 -flagg41=0 -flagh41=0 -flagi41=0 -tflag41=0 -initx41=0 -inity41=0 -minx41=0 -miny41=0 -maxx41=0 -maxy41=0 -posx41=50 -posy41=50 -sizx41=800 -sizy41=600 -maxfps41=0 -initts41=0 -title42=Championship Manager 99-00 -path42=C:\Games\CM9900\cm9900.exe -module42= -opengllib42= -ver42=0 -coord42=0 -flag42=10306 -flagg42=0 -flagh42=0 -flagi42=0 -tflag42=0 -initx42=0 -inity42=0 -minx42=0 -miny42=0 -maxx42=0 -maxy42=0 -posx42=50 -posy42=50 -sizx42=800 -sizy42=600 -maxfps42=0 -initts42=0 -title43=Chariots of War -path43=D:\Games\Chariots of War\CoW.exe -module43= -opengllib43= -ver43=0 -coord43=0 -flag43=134217730 -flagg43=134217728 -flagh43=28 -flagi43=0 -tflag43=0 -initx43=0 -inity43=0 -minx43=0 -miny43=0 -maxx43=0 -maxy43=0 -posx43=50 -posy43=50 -sizx43=800 -sizy43=600 -maxfps43=0 -initts43=0 -title44=Civilization Call to Power -path44=C:\Games\civctp\Civilization_Call_To_Power\ctp_program\ctp\civctp.exe -module44= -opengllib44= -ver44=0 -coord44=0 -flag44=545267746 -flagg44=0 -flagh44=0 -flagi44=0 -tflag44=0 -initx44=0 -inity44=0 -minx44=0 -miny44=0 -maxx44=0 -maxy44=0 -posx44=50 -posy44=50 -sizx44=800 -sizy44=600 -maxfps44=0 -initts44=0 -title45=Claw -path45=C:\Games\claw\clawexe.exe -module45= -opengllib45= -ver45=0 -coord45=0 -flag45=24610 -flagg45=0 -flagh45=0 -flagi45=0 -tflag45=0 -initx45=0 -inity45=0 -minx45=0 -miny45=0 -maxx45=0 -maxy45=0 -posx45=50 -posy45=50 -sizx45=800 -sizy45=600 -maxfps45=0 -initts45=0 -title46=Commando's Behind Enemy Lines Demo -path46=C:\Games\Commando's Behind Enemy Lines Demo\COMANDOS\Comandos.exe -module46= -opengllib46= -ver46=0 -coord46=0 -flag46=1744838944 -flagg46=0 -flagh46=0 -flagi46=0 -tflag46=64 -initx46=0 -inity46=0 -minx46=0 -miny46=0 -maxx46=0 -maxy46=0 -posx46=50 -posy46=50 -sizx46=800 -sizy46=600 -maxfps46=0 -initts46=0 -title47=Commandos II: Men of Courage -path47=D:\Games\Commandos II\comm2.exe -module47= -opengllib47= -ver47=7 -coord47=0 -flag47=2013276256 -flagg47=0 -flagh47=20 -flagi47=0 -tflag47=0 -initx47=0 -inity47=0 -minx47=0 -miny47=0 -maxx47=0 -maxy47=0 -posx47=50 -posy47=50 -sizx47=800 -sizy47=600 -maxfps47=0 -initts47=0 -title48=Crazy Taxy -path48=C:\Games\Crazy_Taxi\Crazy Taxi PC Version\crazy_taxi_pc.exe -module48= -opengllib48= -ver48=8 -coord48=0 -flag48=536870945 -flagg48=0 -flagh48=0 -flagi48=0 -tflag48=0 -initx48=0 -inity48=0 -minx48=0 -miny48=0 -maxx48=0 -maxy48=0 -posx48=50 -posy48=50 -sizx48=800 -sizy48=600 -maxfps48=0 -initts48=0 -title49=Crush! Deluxe -path49=C:\Games\Crush! Deluxe\CRUSHD.EXE -module49= -opengllib49= -ver49=0 -coord49=0 -flag49=134492706 -flagg49=0 -flagh49=0 -flagi49=0 -tflag49=0 -initx49=0 -inity49=0 -minx49=0 -miny49=0 -maxx49=0 -maxy49=0 -posx49=50 -posy49=50 -sizx49=800 -sizy49=600 -maxfps49=0 -initts49=0 -title50=Cybermercs -path50=C:\Games\cybermercs\cybermercs.exe -module50= -opengllib50= -ver50=0 -coord50=0 -flag50=134234146 -flagg50=16 -flagh50=0 -flagi50=0 -tflag50=0 -initx50=0 -inity50=0 -minx50=0 -miny50=0 -maxx50=0 -maxy50=0 -posx50=50 -posy50=50 -sizx50=800 -sizy50=600 -maxfps50=0 -initts50=0 -title51=Daikatana -path51=D:\Games\Daikatana\daikatana.exe -module51= -opengllib51= -ver51=12 -coord51=0 -flag51=269492738 -flagg51=537002497 -flagh51=20 -flagi51=0 -tflag51=2 -initx51=0 -inity51=0 -minx51=0 -miny51=0 -maxx51=0 -maxy51=0 -posx51=50 -posy51=50 -sizx51=800 -sizy51=600 -maxfps51=0 -initts51=0 -title52=Darius Gaiden -path52=C:\Games\Darius_gaiden\DARIUS.EXE -module52= -opengllib52= -ver52=0 -coord52=0 -flag52=536870946 -flagg52=0 -flagh52=0 -flagi52=0 -tflag52=0 -initx52=0 -inity52=0 -minx52=0 -miny52=0 -maxx52=0 -maxy52=0 -posx52=50 -posy52=50 -sizx52=800 -sizy52=600 -maxfps52=0 -initts52=0 -title53=Dark Colony the Council Wars -path53=C:\Games\darkcolony_council\dc\DC16.EXE -module53= -opengllib53= -ver53=0 -coord53=0 -flag53=268435462 -flagg53=0 -flagh53=0 -flagi53=0 -tflag53=0 -initx53=0 -inity53=0 -minx53=0 -miny53=0 -maxx53=0 -maxy53=0 -posx53=50 -posy53=50 -sizx53=800 -sizy53=600 -maxfps53=0 -initts53=0 -title54=Darkstone -path54=C:\Games\darkstone\Darkstone.exe -module54= -opengllib54= -ver54=0 -coord54=0 -flag54=134234148 -flagg54=0 -flagh54=0 -flagi54=0 -tflag54=0 -initx54=0 -inity54=0 -minx54=0 -miny54=0 -maxx54=0 -maxy54=0 -posx54=50 -posy54=50 -sizx54=800 -sizy54=600 -maxfps54=0 -initts54=0 -title55=Dave Mirra Freestyle BMX Demo -path55=C:\Games\Dave Mirra Freestyle BMX\NgBMXDemo.exe -module55= -opengllib55= -ver55=0 -coord55=0 -flag55=8224 -flagg55=0 -flagh55=0 -flagi55=0 -tflag55=0 -initx55=0 -inity55=0 -minx55=0 -miny55=0 -maxx55=0 -maxy55=0 -posx55=50 -posy55=50 -sizx55=800 -sizy55=600 -maxfps55=0 -initts55=0 -title56=Daytona USA Deluxe -path56=C:\Games\Daytona USA Deluxe\DAYTONA USA Deluxe.exe -module56= -opengllib56= -ver56=0 -coord56=0 -flag56=402661410 -flagg56=0 -flagh56=0 -flagi56=0 -tflag56=0 -initx56=0 -inity56=0 -minx56=0 -miny56=0 -maxx56=0 -maxy56=0 -posx56=50 -posy56=50 -sizx56=800 -sizy56=600 -maxfps56=0 -initts56=0 -title57=Deadlock 2 -path57=C:\Games\deadlock2\DEADLOCK.EXE -module57= -opengllib57= -ver57=0 -coord57=0 -flag57=-2012995550 -flagg57=0 -flagh57=0 -flagi57=0 -tflag57=0 -initx57=0 -inity57=0 -minx57=0 -miny57=0 -maxx57=0 -maxy57=0 -posx57=50 -posy57=50 -sizx57=800 -sizy57=600 -maxfps57=0 -initts57=0 -title58=Deeper Dungeons 95 -path58=C:\Games\Keeper95\Deeper95.exe -module58= -opengllib58= -ver58=0 -coord58=0 -flag58=268460070 -flagg58=0 -flagh58=0 -flagi58=0 -tflag58=0 -initx58=0 -inity58=0 -minx58=0 -miny58=0 -maxx58=0 -maxy58=0 -posx58=50 -posy58=50 -sizx58=800 -sizy58=600 -maxfps58=0 -initts58=0 -title59=Delta Force -path59=C:\Games\Delta Force\Df.exe -module59= -opengllib59= -ver59=0 -coord59=0 -flag59=34 -flagg59=0 -flagh59=0 -flagi59=0 -tflag59=0 -initx59=0 -inity59=0 -minx59=0 -miny59=0 -maxx59=0 -maxy59=0 -posx59=50 -posy59=50 -sizx59=800 -sizy59=600 -maxfps59=0 -initts59=0 -title60=Dementia -path60=C:\Games\dementia\program\CRUX.EXE -h -module60= -opengllib60= -ver60=0 -coord60=0 -flag60=536887330 -flagg60=0 -flagh60=0 -flagi60=0 -tflag60=2 -initx60=0 -inity60=0 -minx60=0 -miny60=0 -maxx60=0 -maxy60=0 -posx60=50 -posy60=50 -sizx60=800 -sizy60=600 -maxfps60=0 -initts60=0 -title61=Dethkarz -path61=D:\Games\DethKarz\Dethkarz.exe -module61= -opengllib61= -ver61=0 -coord61=0 -flag61=0 -flagg61=0 -flagh61=16 -flagi61=0 -tflag61=3 -initx61=0 -inity61=0 -minx61=0 -miny61=0 -maxx61=0 -maxy61=0 -posx61=50 -posy61=50 -sizx61=800 -sizy61=600 -maxfps61=0 -initts61=0 -title62=Devil Inside -path62=C:\Games\Devil Inside\Devil.exe -module62= -opengllib62= -ver62=0 -coord62=0 -flag62=32 -flagg62=0 -flagh62=0 -flagi62=0 -tflag62=0 -initx62=0 -inity62=0 -minx62=0 -miny62=0 -maxx62=0 -maxy62=0 -posx62=50 -posy62=50 -sizx62=800 -sizy62=600 -maxfps62=0 -initts62=0 -title63=Diablo -path63=D:\Games\Diablo\Diablo.exe -module63= -opengllib63= -ver63=1 -coord63=0 -flag63=138690594 -flagg63=1108344848 -flagh63=20 -flagi63=0 -tflag63=3 -initx63=0 -inity63=0 -minx63=0 -miny63=0 -maxx63=0 -maxy63=0 -posx63=50 -posy63=50 -sizx63=800 -sizy63=600 -maxfps63=0 -initts63=0 -title64=Dink Smallwood (BAD) -path64=C:\Games\Dink SmallWood\Dink.exe -module64= -opengllib64= -ver64=0 -coord64=0 -flag64=546 -flagg64=0 -flagh64=0 -flagi64=0 -tflag64=258 -initx64=0 -inity64=0 -minx64=0 -miny64=0 -maxx64=0 -maxy64=0 -posx64=50 -posy64=50 -sizx64=800 -sizy64=600 -maxfps64=0 -initts64=0 -title65=Doom 64 Absolution -path65=D:\Games\Doom 64 - Absolution (Win32 Port)\Bin\Absolution.exe -module65= -opengllib65= -ver65=8 -coord65=0 -flag65=134217728 -flagg65=86016 -flagh65=20 -flagi65=0 -tflag65=2 -initx65=0 -inity65=0 -minx65=0 -miny65=0 -maxx65=0 -maxy65=0 -posx65=50 -posy65=50 -sizx65=800 -sizy65=600 -maxfps65=100 -initts65=-5 -title66=Doom 95 -path66=D:\Games\Doom95\DOOM95.EXE -module66= -opengllib66= -ver66=0 -coord66=0 -flag66=134217762 -flagg66=2113536 -flagh66=16 -flagi66=0 -tflag66=258 -initx66=0 -inity66=0 -minx66=0 -miny66=0 -maxx66=0 -maxy66=0 -posx66=50 -posy66=50 -sizx66=800 -sizy66=600 -maxfps66=20 -initts66=-9 -title67=Drakan -path67=C:\Games\Drakan\drakan.exe -module67= -opengllib67= -ver67=0 -coord67=0 -flag67=536887328 -flagg67=0 -flagh67=0 -flagi67=0 -tflag67=0 -initx67=0 -inity67=0 -minx67=0 -miny67=0 -maxx67=0 -maxy67=0 -posx67=50 -posy67=50 -sizx67=800 -sizy67=600 -maxfps67=0 -initts67=0 -title68=Dream Aquarium -path68=D:\Program Files\Dream Aquarium\Dream_Aquarium.scr -module68= -opengllib68= -ver68=9 -coord68=0 -flag68=679477249 -flagg68=303104 -flagh68=0 -flagi68=0 -tflag68=256 -initx68=0 -inity68=0 -minx68=0 -miny68=0 -maxx68=0 -maxy68=0 -posx68=50 -posy68=50 -sizx68=800 -sizy68=600 -maxfps68=500 -initts68=0 -title69=Dungeon Keeper 2 GOG release -path69=D:\Games\Dungeon Keeper 2 GOG release\DKII.EXE -module69= -opengllib69= -ver69=0 -coord69=0 -flag69=134217762 -flagg69=4276224 -flagh69=0 -flagi69=0 -tflag69=6 -initx69=0 -inity69=0 -minx69=0 -miny69=0 -maxx69=0 -maxy69=0 -posx69=50 -posy69=50 -sizx69=800 -sizy69=600 -maxfps69=0 -initts69=0 -title70=Dungeon Keeper 95 -path70=D:\Games\Keeper95\KEEPER95.EXE -module70= -opengllib70= -ver70=0 -coord70=0 -flag70=134299686 -flagg70=0 -flagh70=16 -flagi70=0 -tflag70=0 -initx70=0 -inity70=0 -minx70=0 -miny70=0 -maxx70=0 -maxy70=0 -posx70=50 -posy70=50 -sizx70=800 -sizy70=600 -maxfps70=0 -initts70=0 -title71=Dungeon Keeper D3D -path71=D:\Games\Keeper95\keepd3d.exe -module71= -opengllib71= -ver71=0 -coord71=0 -flag71=134217762 -flagg71=134217728 -flagh71=17 -flagi71=0 -tflag71=259 -initx71=0 -inity71=0 -minx71=0 -miny71=0 -maxx71=0 -maxy71=0 -posx71=50 -posy71=50 -sizx71=800 -sizy71=600 -maxfps71=0 -initts71=0 -title72=Dungeon Keeper II -path72=D:\Games\Dungeon Keeper 2\DKII.exe -module72= -opengllib72= -ver72=0 -coord72=0 -flag72=34 -flagg72=574619648 -flagh72=20 -flagi72=0 -tflag72=263 -initx72=0 -inity72=0 -minx72=0 -miny72=0 -maxx72=0 -maxy72=0 -posx72=150 -posy72=50 -sizx72=800 -sizy72=600 -maxfps72=0 -initts72=0 -title73=Emergency Fighters for life -path73=D:\Games\Emergency\EMERGY.EXE -module73= -opengllib73= -ver73=0 -coord73=0 -flag73=402718947 -flagg73=65554 -flagh73=20 -flagi73=0 -tflag73=3 -initx73=0 -inity73=0 -minx73=0 -miny73=0 -maxx73=0 -maxy73=0 -posx73=50 -posy73=50 -sizx73=800 -sizy73=600 -maxfps73=0 -initts73=0 -title74=Enemy Infestation -path74=C:\Games\Enemy Infestation (1998)\Ei.exe -module74= -opengllib74= -ver74=0 -coord74=0 -flag74=38 -flagg74=0 -flagh74=0 -flagi74=0 -tflag74=0 -initx74=0 -inity74=0 -minx74=0 -miny74=0 -maxx74=0 -maxy74=0 -posx74=50 -posy74=50 -sizx74=800 -sizy74=600 -maxfps74=0 -initts74=0 -title75=Evany La chiave per mondi sconosciuti -path75=D:\Games\Evany La chiave per mondi sconosciuti\Evany.exe -module75= -opengllib75= -ver75=0 -coord75=0 -flag75=134348864 -flagg75=0 -flagh75=277 -flagi75=0 -tflag75=0 -initx75=0 -inity75=0 -minx75=0 -miny75=0 -maxx75=0 -maxy75=0 -posx75=50 -posy75=50 -sizx75=800 -sizy75=600 -maxfps75=0 -initts75=0 -title76=Evil Genius -path76=D:\Games\Evil Genius\ReleaseExe\EvilGenius_Cracked.exe -module76= -opengllib76= -ver76=9 -coord76=0 -flag76=2053 -flagg76=80 -flagh76=0 -flagi76=0 -tflag76=0 -initx76=0 -inity76=0 -minx76=0 -miny76=0 -maxx76=0 -maxy76=0 -posx76=50 -posy76=50 -sizx76=800 -sizy76=600 -maxfps76=0 -initts76=0 -title77=Expendable -path77=C:\Games\eXpendable\go.exe -nocputest -module77= -opengllib77= -ver77=0 -coord77=0 -flag77=402653280 -flagg77=1 -flagh77=0 -flagi77=0 -tflag77=2 -initx77=0 -inity77=0 -minx77=0 -miny77=0 -maxx77=0 -maxy77=0 -posx77=50 -posy77=50 -sizx77=800 -sizy77=600 -maxfps77=0 -initts77=0 -title78=Fallen Heaven -path78=D:\Games\Fallen haven\Exe\FALLEN.EXE -module78=MFC42.dll MSVCRT.DLL mciavi32.dll -opengllib78= -ver78=1 -coord78=0 -flag78=135004674 -flagg78=1049120 -flagh78=0 -flagi78=0 -tflag78=258 -initx78=0 -inity78=0 -minx78=0 -miny78=0 -maxx78=0 -maxy78=0 -posx78=50 -posy78=50 -sizx78=800 -sizy78=600 -maxfps78=0 -initts78=0 -title79=Fallen Heaven (BAD) -path79=C:\Games\falhaven\Exe\FALLEN.EXE -module79= -opengllib79= -ver79=0 -coord79=0 -flag79=679485962 -flagg79=32 -flagh79=0 -flagi79=0 -tflag79=0 -initx79=0 -inity79=0 -minx79=0 -miny79=0 -maxx79=0 -maxy79=0 -posx79=0 -posy79=0 -sizx79=800 -sizy79=600 -maxfps79=0 -initts79=0 -title80=Fallout -path80=D:\Games\Fallout\FALLOUTW.EXE -module80= -opengllib80= -ver80=0 -coord80=0 -flag80=134217734 -flagg80=16 -flagh80=16 -flagi80=0 -tflag80=0 -initx80=0 -inity80=0 -minx80=0 -miny80=0 -maxx80=0 -maxy80=0 -posx80=50 -posy80=50 -sizx80=800 -sizy80=600 -maxfps80=0 -initts80=0 -title81=Fighting Force -path81=D:\Games\Fighting Force\FFORCE.EXE -module81= -opengllib81= -ver81=0 -coord81=0 -flag81=134217730 -flagg81=134217728 -flagh81=477 -flagi81=0 -tflag81=0 -initx81=0 -inity81=0 -minx81=0 -miny81=0 -maxx81=0 -maxy81=0 -posx81=50 -posy81=50 -sizx81=800 -sizy81=600 -maxfps81=0 -initts81=0 -title82=FreakOut -path82=C:\Games\Freak Out - Extreme Freeride\FreakOut.exe -module82= -opengllib82= -ver82=9 -coord82=0 -flag82=0 -flagg82=0 -flagh82=0 -flagi82=0 -tflag82=2 -initx82=0 -inity82=0 -minx82=0 -miny82=0 -maxx82=0 -maxy82=0 -posx82=50 -posy82=50 -sizx82=800 -sizy82=600 -maxfps82=0 -initts82=0 -title83=Funtracks -path83=C:\Games\Funtracks\Fun_win.exe -module83= -opengllib83= -ver83=1 -coord83=0 -flag83=2 -flagg83=0 -flagh83=0 -flagi83=0 -tflag83=258 -initx83=0 -inity83=0 -minx83=0 -miny83=0 -maxx83=0 -maxy83=0 -posx83=50 -posy83=50 -sizx83=800 -sizy83=600 -maxfps83=0 -initts83=0 -title84=Galapagos -path84=C:\Games\Galapagos\GALA.EXE -module84= -opengllib84= -ver84=0 -coord84=0 -flag84=134217760 -flagg84=0 -flagh84=0 -flagi84=0 -tflag84=0 -initx84=0 -inity84=0 -minx84=0 -miny84=0 -maxx84=0 -maxy84=0 -posx84=50 -posy84=50 -sizx84=800 -sizy84=600 -maxfps84=0 -initts84=0 -title85=Gangsters -path85=D:\Games\Gangsters\gangsters.exe -module85= -opengllib85= -ver85=0 -coord85=0 -flag85=134217730 -flagg85=135266304 -flagh85=16 -flagi85=0 -tflag85=0 -initx85=0 -inity85=0 -minx85=0 -miny85=0 -maxx85=0 -maxy85=0 -posx85=50 -posy85=50 -sizx85=800 -sizy85=600 -maxfps85=0 -initts85=0 -title86=Garshasp -path86=D:\Games\Garshasp\distro\Garshasp.exe -module86= -opengllib86= -ver86=0 -coord86=0 -flag86=402653184 -flagg86=134217728 -flagh86=477 -flagi86=0 -tflag86=0 -initx86=0 -inity86=0 -minx86=0 -miny86=0 -maxx86=0 -maxy86=0 -posx86=50 -posy86=50 -sizx86=800 -sizy86=600 -maxfps86=0 -initts86=0 -title87=GeneRally -path87=C:\Games\generally105\GeneRally.exe -module87= -opengllib87= -ver87=0 -coord87=0 -flag87=34 -flagg87=0 -flagh87=0 -flagi87=0 -tflag87=0 -initx87=0 -inity87=0 -minx87=0 -miny87=0 -maxx87=0 -maxy87=0 -posx87=50 -posy87=50 -sizx87=800 -sizy87=600 -maxfps87=0 -initts87=0 -title88=Get Medieval -path88=C:\Games\Get Medieval\MEDIEVAL.EXE -module88= -opengllib88= -ver88=0 -coord88=0 -flag88=34 -flagg88=2 -flagh88=0 -flagi88=0 -tflag88=0 -initx88=0 -inity88=0 -minx88=0 -miny88=0 -maxx88=0 -maxy88=0 -posx88=0 -posy88=0 -sizx88=800 -sizy88=600 -maxfps88=0 -initts88=0 -title89=Gift -path89=C:\Games\Gift\Gift.exe -module89= -opengllib89= -ver89=0 -coord89=0 -flag89=4196384 -flagg89=0 -flagh89=0 -flagi89=0 -tflag89=34 -initx89=0 -inity89=0 -minx89=0 -miny89=0 -maxx89=0 -maxy89=0 -posx89=0 -posy89=0 -sizx89=0 -sizy89=0 -maxfps89=0 -initts89=0 -title90=glsample.exe -path90=D:\DxWnd\code examples\glsample\Debug\glsample.exe -module90= -opengllib90= -ver90=0 -coord90=0 -flag90=0 -flagg90=134348800 -flagh90=0 -flagi90=0 -tflag90=2 -initx90=0 -inity90=0 -minx90=0 -miny90=0 -maxx90=0 -maxy90=0 -posx90=0 -posy90=0 -sizx90=800 -sizy90=600 -maxfps90=0 -initts90=0 -title91=Golden Age of Racing -path91=C:\Games\Golden Age of Racing\GAOR.exe -module91= -opengllib91= -ver91=0 -coord91=0 -flag91=34 -flagg91=0 -flagh91=0 -flagi91=0 -tflag91=0 -initx91=0 -inity91=0 -minx91=0 -miny91=0 -maxx91=0 -maxy91=0 -posx91=50 -posy91=50 -sizx91=800 -sizy91=600 -maxfps91=0 -initts91=0 -title92=Gp500 for Win2K -path92=C:\Games\gp500\gp500_win2k.exe -module92= -opengllib92= -ver92=1 -coord92=0 -flag92=545677860 -flagg92=0 -flagh92=0 -flagi92=0 -tflag92=2 -initx92=0 -inity92=0 -minx92=0 -miny92=0 -maxx92=0 -maxy92=0 -posx92=50 -posy92=50 -sizx92=800 -sizy92=600 -maxfps92=0 -initts92=0 -title93=G-Police -path93=C:\Games\gpolice\GPOLICE.EXE -module93= -opengllib93= -ver93=0 -coord93=0 -flag93=67125286 -flagg93=0 -flagh93=0 -flagi93=0 -tflag93=2 -initx93=0 -inity93=0 -minx93=0 -miny93=0 -maxx93=0 -maxy93=0 -posx93=50 -posy93=50 -sizx93=800 -sizy93=600 -maxfps93=0 -initts93=0 -title94=Grand Prix Legends -path94=D:\Games\Grand Prix Legends\gpl\gpl.exe -module94= -opengllib94= -ver94=0 -coord94=0 -flag94=-2013233117 -flagg94=0 -flagh94=20 -flagi94=0 -tflag94=3 -initx94=0 -inity94=0 -minx94=0 -miny94=0 -maxx94=0 -maxy94=0 -posx94=50 -posy94=50 -sizx94=800 -sizy94=600 -maxfps94=0 -initts94=0 -title95=Grand Prix Legends MAX -path95=D:\Games\Grand Prix Legends MAX\gpl.exe -module95= -opengllib95= -ver95=7 -coord95=0 -flag95=537001986 -flagg95=134217729 -flagh95=0 -flagi95=0 -tflag95=2 -initx95=0 -inity95=0 -minx95=0 -miny95=0 -maxx95=0 -maxy95=0 -posx95=50 -posy95=50 -sizx95=800 -sizy95=600 -maxfps95=0 -initts95=0 -title96=Grand Prix World -path96=D:\Games\Grand Prix World\gpwxp2.exe -module96= -opengllib96= -ver96=0 -coord96=0 -flag96=2097314 -flagg96=134217856 -flagh96=80 -flagi96=0 -tflag96=35 -initx96=0 -inity96=0 -minx96=0 -miny96=0 -maxx96=0 -maxy96=0 -posx96=50 -posy96=50 -sizx96=800 -sizy96=600 -maxfps96=0 -initts96=0 -title97=Grand Theft Auto 2 -path97=D:\Games\GTA2\gta2.exe -module97=binkw32 d3ddll -opengllib97= -ver97=0 -coord97=0 -flag97=671096866 -flagg97=1048576 -flagh97=0 -flagi97=0 -tflag97=2 -initx97=0 -inity97=0 -minx97=0 -miny97=0 -maxx97=0 -maxy97=0 -posx97=50 -posy97=50 -sizx97=400 -sizy97=300 -maxfps97=0 -initts97=0 -title98=Grand Touring -path98=D:\Games\Grand Touring\gt.exe -module98= -opengllib98= -ver98=0 -coord98=0 -flag98=16390 -flagg98=134283264 -flagh98=16 -flagi98=0 -tflag98=275 -initx98=0 -inity98=0 -minx98=0 -miny98=0 -maxx98=0 -maxy98=0 -posx98=50 -posy98=50 -sizx98=800 -sizy98=600 -maxfps98=0 -initts98=8 -title99=Grim Fandango Demo -path99=C:\Games\GrimWebDemo\grimdemo.exe -module99= -opengllib99= -ver99=0 -coord99=0 -flag99=34 -flagg99=0 -flagh99=0 -flagi99=0 -tflag99=258 -initx99=0 -inity99=0 -minx99=0 -miny99=0 -maxx99=0 -maxy99=0 -posx99=50 -posy99=50 -sizx99=800 -sizy99=600 -maxfps99=0 -initts99=0 -title100=Gruntz -path100=D:\Games\gruntz\GRUNTZ.EXE -module100= -opengllib100= -ver100=0 -coord100=0 -flag100=34 -flagg100=134217728 -flagh100=16 -flagi100=0 -tflag100=0 -initx100=0 -inity100=0 -minx100=0 -miny100=0 -maxx100=0 -maxy100=0 -posx100=50 -posy100=50 -sizx100=800 -sizy100=600 -maxfps100=0 -initts100=0 -title101=GTA 3 -path101=D:\Games\GTA3\gta3.exe -module101= -opengllib101= -ver101=0 -coord101=0 -flag101=134234150 -flagg101=1207975952 -flagh101=176 -flagi101=0 -tflag101=2 -initx101=0 -inity101=0 -minx101=0 -miny101=0 -maxx101=0 -maxy101=0 -posx101=50 -posy101=50 -sizx101=800 -sizy101=600 -maxfps101=0 -initts101=0 -title102=Gunman Chronicles -path102=D:\Games\Gunman\gunman.exe -module102= -opengllib102= -ver102=0 -coord102=0 -flag102=0 -flagg102=-2013134848 -flagh102=0 -flagi102=0 -tflag102=0 -initx102=0 -inity102=0 -minx102=0 -miny102=0 -maxx102=0 -maxy102=0 -posx102=0 -posy102=0 -sizx102=400 -sizy102=300 -maxfps102=0 -initts102=0 -title103=Half-Life Blue-Shift (d3d) -path103=D:\Games\Half-Life Blue-Shift\bshift.exe -module103= -opengllib103= -ver103=7 -coord103=0 -flag103=1207959554 -flagg103=513 -flagh103=0 -flagi103=0 -tflag103=258 -initx103=0 -inity103=0 -minx103=0 -miny103=0 -maxx103=0 -maxy103=0 -posx103=50 -posy103=50 -sizx103=800 -sizy103=600 -maxfps103=0 -initts103=0 -title104=Half-Life Uplink Demo -path104=D:\Games\Half-Life Uplink\hldemo.exe -module104= -opengllib104= -ver104=1 -coord104=0 -flag104=1073741826 -flagg104=16384 -flagh104=0 -flagi104=0 -tflag104=2 -initx104=0 -inity104=0 -minx104=0 -miny104=0 -maxx104=0 -maxy104=0 -posx104=50 -posy104=50 -sizx104=640 -sizy104=480 -maxfps104=0 -initts104=0 -title105=Halo Combat Evolved -path105=D:\Games\Halo Combat Evolved\halo.exe -module105= -opengllib105= -ver105=9 -coord105=0 -flag105=570425377 -flagg105=-2147483648 -flagh105=0 -flagi105=0 -tflag105=478 -initx105=0 -inity105=0 -minx105=0 -miny105=0 -maxx105=0 -maxy105=0 -posx105=50 -posy105=50 -sizx105=800 -sizy105=600 -maxfps105=0 -initts105=0 -title106=Heart of Darkness -path106=d:\Games\Heart of Darkness\HODWin32.exe -module106= -opengllib106= -ver106=0 -coord106=0 -flag106=8226 -flagg106=2179072 -flagh106=16 -flagi106=0 -tflag106=0 -initx106=0 -inity106=0 -minx106=0 -miny106=0 -maxx106=0 -maxy106=0 -posx106=50 -posy106=50 -sizx106=800 -sizy106=600 -maxfps106=0 -initts106=4 -title107=Heavy Metal - FAKK2 Demo -path107=D:\Games\Heavy Metal - FAKK2 Demo\fakk2.exe -module107= -opengllib107= -ver107=0 -coord107=0 -flag107=4 -flagg107=134348800 -flagh107=284 -flagi107=0 -tflag107=0 -initx107=0 -inity107=0 -minx107=0 -miny107=0 -maxx107=0 -maxy107=0 -posx107=50 -posy107=50 -sizx107=800 -sizy107=600 -maxfps107=0 -initts107=0 -title108=Heavy Metal FAKK 2 -path108=C:\Games\Heavy Metal - FAKK2\fakk2.exe -module108= -opengllib108= -ver108=0 -coord108=0 -flag108=33554464 -flagg108=64 -flagh108=0 -flagi108=0 -tflag108=2 -initx108=0 -inity108=0 -minx108=0 -miny108=0 -maxx108=0 -maxy108=0 -posx108=50 -posy108=50 -sizx108=800 -sizy108=600 -maxfps108=0 -initts108=0 -title109=HellCopter -path109=C:\Games\hellcop\HCopter.exe -module109= -opengllib109= -ver109=0 -coord109=0 -flag109=-2013249500 -flagg109=256 -flagh109=0 -flagi109=0 -tflag109=0 -initx109=0 -inity109=0 -minx109=0 -miny109=0 -maxx109=0 -maxy109=0 -posx109=50 -posy109=50 -sizx109=800 -sizy109=600 -maxfps109=0 -initts109=0 -title110=Heretic 2 -path110=D:\Games\Heretic 2\Heretic2.exe -module110= -opengllib110= -ver110=0 -coord110=0 -flag110=0 -flagg110=134348800 -flagh110=29 -flagi110=0 -tflag110=258 -initx110=0 -inity110=0 -minx110=0 -miny110=0 -maxx110=0 -maxy110=0 -posx110=50 -posy110=50 -sizx110=800 -sizy110=600 -maxfps110=0 -initts110=0 -title111=Heroes of Might & Magic III Demo -path111=C:\Games\Heroes III Demo\h3demo.exe -module111= -opengllib111= -ver111=1 -coord111=0 -flag111=134234146 -flagg111=0 -flagh111=0 -flagi111=0 -tflag111=2 -initx111=0 -inity111=0 -minx111=0 -miny111=0 -maxx111=0 -maxy111=0 -posx111=50 -posy111=50 -sizx111=800 -sizy111=600 -maxfps111=0 -initts111=0 -title112=Hexen II (opengl) -path112=D:\Games\Hexen II\glh2.exe -module112= -opengllib112= -ver112=10 -coord112=1 -flag112=3 -flagg112=213009 -flagh112=16 -flagi112=0 -tflag112=386 -initx112=0 -inity112=0 -minx112=0 -miny112=0 -maxx112=0 -maxy112=0 -posx112=50 -posy112=50 -sizx112=800 -sizy112=600 -maxfps112=50 -initts112=8 -title113=Hexen II (software) -path113=D:\Games\Hexen II\h2.exe -module113= -opengllib113= -ver113=0 -coord113=0 -flag113=671088642 -flagg113=1130496 -flagh113=16 -flagi113=0 -tflag113=0 -initx113=0 -inity113=0 -minx113=0 -miny113=0 -maxx113=0 -maxy113=0 -posx113=50 -posy113=50 -sizx113=800 -sizy113=600 -maxfps113=0 -initts113=8 -title114=Hitman - Codename 47 -path114=D:\Games\Hitman - Codename 47\Hitman.Exe -module114= -opengllib114= -ver114=0 -coord114=0 -flag114=134217728 -flagg114=671088640 -flagh114=28 -flagi114=0 -tflag114=3 -initx114=0 -inity114=0 -minx114=0 -miny114=0 -maxx114=0 -maxy114=0 -posx114=50 -posy114=50 -sizx114=800 -sizy114=600 -maxfps114=0 -initts114=0 -title115=Homeworld 2 -path115=D:\Games\Homeworld2\Bin\Release\Homeworld2.exe -module115= -opengllib115= -ver115=0 -coord115=0 -flag115=671088642 -flagg115=134217728 -flagh115=477 -flagi115=0 -tflag115=0 -initx115=0 -inity115=0 -minx115=0 -miny115=0 -maxx115=0 -maxy115=0 -posx115=50 -posy115=50 -sizx115=800 -sizy115=600 -maxfps115=0 -initts115=0 -title116=hover -path116=C:\Games\hover\hoverX.exe -module116= -opengllib116= -ver116=0 -coord116=0 -flag116=8224 -flagg116=0 -flagh116=0 -flagi116=0 -tflag116=0 -initx116=0 -inity116=0 -minx116=0 -miny116=0 -maxx116=0 -maxy116=0 -posx116=50 -posy116=50 -sizx116=800 -sizy116=600 -maxfps116=0 -initts116=0 -title117=Hyperblade -path117=D:\Games\Hyperblade\HYPERX.EXE -module117= -opengllib117= -ver117=0 -coord117=0 -flag117=134217891 -flagg117=3231762 -flagh117=16 -flagi117=0 -tflag117=2 -initx117=0 -inity117=0 -minx117=0 -miny117=0 -maxx117=0 -maxy117=0 -posx117=50 -posy117=50 -sizx117=800 -sizy117=600 -maxfps117=25 -initts117=1 -title118=Idinaloq -path118=C:\Games\idina101\idinaloq.exe -module118= -opengllib118= -ver118=0 -coord118=0 -flag118=32 -flagg118=0 -flagh118=0 -flagi118=0 -tflag118=0 -initx118=0 -inity118=0 -minx118=0 -miny118=0 -maxx118=0 -maxy118=0 -posx118=50 -posy118=50 -sizx118=800 -sizy118=600 -maxfps118=0 -initts118=0 -title119=Immanis -path119=C:\Games\Immanis CD release\immanis.exe -module119= -opengllib119= -ver119=0 -coord119=0 -flag119=24611 -flagg119=0 -flagh119=0 -flagi119=0 -tflag119=0 -initx119=0 -inity119=0 -minx119=0 -miny119=0 -maxx119=0 -maxy119=0 -posx119=50 -posy119=50 -sizx119=800 -sizy119=600 -maxfps119=0 -initts119=0 -title120=Immanis (v2) -path120=C:\Games\Immanis CD release\immanis_v2.exe -module120= -opengllib120= -ver120=0 -coord120=0 -flag120=268460067 -flagg120=0 -flagh120=0 -flagi120=0 -tflag120=0 -initx120=0 -inity120=0 -minx120=0 -miny120=0 -maxx120=0 -maxy120=0 -posx120=50 -posy120=50 -sizx120=800 -sizy120=600 -maxfps120=0 -initts120=0 -title121=In the Hunt -path121=C:\Games\In The Hunt\e8.exe -module121= -opengllib121= -ver121=0 -coord121=0 -flag121=2 -flagg121=0 -flagh121=0 -flagi121=0 -tflag121=0 -initx121=0 -inity121=0 -minx121=0 -miny121=0 -maxx121=0 -maxy121=0 -posx121=50 -posy121=50 -sizx121=800 -sizy121=600 -maxfps121=0 -initts121=0 -title122=Incoming Forces -path122=D:\Games\Incoming Forces\forces.exe -module122= -opengllib122= -ver122=8 -coord122=0 -flag122=134217760 -flagg122=0 -flagh122=0 -flagi122=0 -tflag122=2 -initx122=0 -inity122=0 -minx122=0 -miny122=0 -maxx122=0 -maxy122=0 -posx122=50 -posy122=50 -sizx122=800 -sizy122=600 -maxfps122=0 -initts122=0 -title123=International Superstar Soccer 3 -path123=C:\Games\ISS_3\iss3.exe -module123= -opengllib123= -ver123=8 -coord123=0 -flag123=545267715 -flagg123=0 -flagh123=0 -flagi123=0 -tflag123=0 -initx123=0 -inity123=0 -minx123=0 -miny123=0 -maxx123=0 -maxy123=0 -posx123=50 -posy123=50 -sizx123=800 -sizy123=600 -maxfps123=0 -initts123=0 -title124=Jacked -path124=D:\Games\Jacked\Jacked.exe -module124=winmm -opengllib124= -ver124=9 -coord124=0 -flag124=537010208 -flagg124=196608 -flagh124=0 -flagi124=0 -tflag124=258 -initx124=0 -inity124=0 -minx124=0 -miny124=0 -maxx124=0 -maxy124=0 -posx124=50 -posy124=50 -sizx124=800 -sizy124=600 -maxfps124=100 -initts124=3 -title125=Jedi Knight II Jedi Outcast -path125=D:\Games\Jedi Knight II Jedi Outcast\GameData\jk2sp.exe -module125= -opengllib125= -ver125=0 -coord125=0 -flag125=2 -flagg125=1180161 -flagh125=16 -flagi125=0 -tflag125=2 -initx125=0 -inity125=0 -minx125=0 -miny125=0 -maxx125=0 -maxy125=0 -posx125=50 -posy125=50 -sizx125=800 -sizy125=600 -maxfps125=0 -initts125=0 -title126=Jet Moto -path126=M:\JETMOTO.EXE -module126= -opengllib126= -ver126=0 -coord126=0 -flag126=139298 -flagg126=0 -flagh126=0 -flagi126=0 -tflag126=0 -initx126=0 -inity126=0 -minx126=0 -miny126=0 -maxx126=0 -maxy126=0 -posx126=50 -posy126=50 -sizx126=800 -sizy126=600 -maxfps126=0 -initts126=0 -title127=Kiss Psyco Cyrcus -path127=C:\Games\Psycho\client.exe -module127=d3d.ren -opengllib127= -ver127=7 -coord127=0 -flag127=537018404 -flagg127=0 -flagh127=0 -flagi127=0 -tflag127=0 -initx127=0 -inity127=0 -minx127=0 -miny127=0 -maxx127=0 -maxy127=0 -posx127=50 -posy127=50 -sizx127=800 -sizy127=600 -maxfps127=0 -initts127=0 -title128=Kohan II Kings of War -path128=D:\Games\Kohan II Kings of War\k2.exe -module128= -opengllib128= -ver128=0 -coord128=0 -flag128=134217728 -flagg128=134217728 -flagh128=-842150435 -flagi128=-842150451 -tflag128=0 -initx128=0 -inity128=0 -minx128=0 -miny128=0 -maxx128=0 -maxy128=0 -posx128=50 -posy128=50 -sizx128=800 -sizy128=600 -maxfps128=0 -initts128=0 -title129=Koplio -path129=D:\Games\Koplio\KOPLIO.exe -module129= -opengllib129= -ver129=1 -coord129=0 -flag129=545390720 -flagg129=134217729 -flagh129=20 -flagi129=0 -tflag129=3 -initx129=0 -inity129=0 -minx129=0 -miny129=0 -maxx129=0 -maxy129=0 -posx129=50 -posy129=50 -sizx129=800 -sizy129=600 -maxfps129=0 -initts129=0 -title130=Krazy Ivan -path130=C:\Games\Krazy Ivan\KRAZY.EXE -module130= -opengllib130= -ver130=0 -coord130=0 -flag130=536870914 -flagg130=0 -flagh130=0 -flagi130=0 -tflag130=0 -initx130=0 -inity130=0 -minx130=0 -miny130=0 -maxx130=0 -maxy130=0 -posx130=50 -posy130=50 -sizx130=800 -sizy130=600 -maxfps130=0 -initts130=0 -title131=Last Bronx -path131=C:\Games\Last_Bronx\LB.EXE -module131= -opengllib131= -ver131=0 -coord131=0 -flag131=40994 -flagg131=0 -flagh131=0 -flagi131=0 -tflag131=64 -initx131=0 -inity131=0 -minx131=0 -miny131=0 -maxx131=0 -maxy131=0 -posx131=50 -posy131=50 -sizx131=800 -sizy131=600 -maxfps131=0 -initts131=0 -title132=Lionheart -path132=C:\Games\Lionheart Demo\Lionheart.exe -module132= -opengllib132= -ver132=0 -coord132=0 -flag132=-2147483612 -flagg132=0 -flagh132=0 -flagi132=0 -tflag132=0 -initx132=0 -inity132=0 -minx132=0 -miny132=0 -maxx132=0 -maxy132=0 -posx132=50 -posy132=50 -sizx132=800 -sizy132=600 -maxfps132=0 -initts132=0 -title133=lithtech.exe -path133=D:\Games\NOLF Technology Demo\lithtech.exe -module133= -opengllib133= -ver133=7 -coord133=0 -flag133=0 -flagg133=512 -flagh133=0 -flagi133=0 -tflag133=258 -initx133=0 -inity133=0 -minx133=0 -miny133=0 -maxx133=0 -maxy133=0 -posx133=50 -posy133=50 -sizx133=800 -sizy133=600 -maxfps133=0 -initts133=0 -title134=Lords of the Realm 2 -path134=D:\Games\L2SIEGE\LORDS2.EXE -module134= -opengllib134= -ver134=0 -coord134=0 -flag134=38 -flagg134=65536 -flagh134=16 -flagi134=0 -tflag134=8 -initx134=0 -inity134=0 -minx134=0 -miny134=0 -maxx134=0 -maxy134=0 -posx134=50 -posy134=50 -sizx134=800 -sizy134=600 -maxfps134=0 -initts134=0 -title135=M.A.X. 2 -path135=C:\Games\MAX 2\MAX_2\MAX2\MAX2.EXE -module135= -opengllib135= -ver135=0 -coord135=0 -flag135=34 -flagg135=0 -flagh135=0 -flagi135=0 -tflag135=0 -initx135=0 -inity135=0 -minx135=0 -miny135=0 -maxx135=0 -maxy135=0 -posx135=50 -posy135=50 -sizx135=800 -sizy135=600 -maxfps135=0 -initts135=0 -title136=M1 Tank Platoon 2 -path136=C:\Games\M1 Tank Platoon 2\M1TP2.exe -module136= -opengllib136= -ver136=8 -coord136=0 -flag136=34 -flagg136=0 -flagh136=0 -flagi136=0 -tflag136=0 -initx136=0 -inity136=0 -minx136=0 -miny136=0 -maxx136=0 -maxy136=0 -posx136=50 -posy136=50 -sizx136=800 -sizy136=600 -maxfps136=0 -initts136=0 -title137=Mario Worlds (stripped PE) -path137=C:\Games\Mario Worlds\Mario Worlds.exe -module137= -opengllib137= -ver137=1 -coord137=0 -flag137=2 -flagg137=1 -flagh137=0 -flagi137=0 -tflag137=386 -initx137=0 -inity137=0 -minx137=0 -miny137=0 -maxx137=0 -maxy137=0 -posx137=50 -posy137=50 -sizx137=800 -sizy137=600 -maxfps137=0 -initts137=0 -title138=Masters of Orion 2 -path138=C:\Games\Orion2\Orion95.exe -module138= -opengllib138= -ver138=0 -coord138=0 -flag138=34 -flagg138=0 -flagh138=0 -flagi138=0 -tflag138=0 -initx138=0 -inity138=0 -minx138=0 -miny138=0 -maxx138=0 -maxy138=0 -posx138=50 -posy138=50 -sizx138=800 -sizy138=600 -maxfps138=0 -initts138=0 -title139=Microsoft Flight Simulator 98 -path139=C:\Games\Flight Simulator 98\FLTSIM98.EXE -module139= -opengllib139= -ver139=0 -coord139=0 -flag139=288 -flagg139=0 -flagh139=0 -flagi139=0 -tflag139=0 -initx139=0 -inity139=0 -minx139=0 -miny139=0 -maxx139=0 -maxy139=0 -posx139=50 -posy139=50 -sizx139=800 -sizy139=600 -maxfps139=0 -initts139=0 -title140=Microsoft Midtown Madness -path140=C:\Games\Midtown Madness\midtown.exe -module140= -opengllib140= -ver140=0 -coord140=0 -flag140=8192 -flagg140=0 -flagh140=0 -flagi140=0 -tflag140=2 -initx140=0 -inity140=0 -minx140=0 -miny140=0 -maxx140=0 -maxy140=0 -posx140=50 -posy140=50 -sizx140=800 -sizy140=600 -maxfps140=0 -initts140=0 -title141=Microsoft Midtown Madness Trial (BAD) -path141=C:\Games\Midtown Madness Trial\midtrial.exe -module141= -opengllib141= -ver141=0 -coord141=0 -flag141=2 -flagg141=0 -flagh141=0 -flagi141=0 -tflag141=0 -initx141=0 -inity141=0 -minx141=0 -miny141=0 -maxx141=0 -maxy141=0 -posx141=0 -posy141=0 -sizx141=800 -sizy141=600 -maxfps141=0 -initts141=0 -title142=Microsoft Motocross Madness 2 (BAD!!) -path142=C:\Games\Motocross Madness 2\MCM2.cracked.EXE -module142= -opengllib142= -ver142=7 -coord142=0 -flag142=201326664 -flagg142=1 -flagh142=0 -flagi142=0 -tflag142=82 -initx142=0 -inity142=0 -minx142=0 -miny142=0 -maxx142=0 -maxy142=0 -posx142=50 -posy142=50 -sizx142=800 -sizy142=600 -maxfps142=0 -initts142=0 -title143=Microsoft Motocross Madness Trial (BAD) -path143=C:\Games\Motocross Madness Trial\mcm.exe -module143= -opengllib143= -ver143=1 -coord143=0 -flag143=134225952 -flagg143=0 -flagh143=0 -flagi143=0 -tflag143=130 -initx143=0 -inity143=0 -minx143=0 -miny143=0 -maxx143=0 -maxy143=0 -posx143=50 -posy143=50 -sizx143=0 -sizy143=0 -maxfps143=0 -initts143=0 -title144=Mission Force Cyberstorm (BAD ?) -path144=C:\Games\SIERRA\CSTORM\CSTORM.EXE -module144= -opengllib144= -ver144=0 -coord144=0 -flag144=33562658 -flagg144=0 -flagh144=0 -flagi144=0 -tflag144=0 -initx144=0 -inity144=0 -minx144=0 -miny144=0 -maxx144=0 -maxy144=0 -posx144=50 -posy144=50 -sizx144=0 -sizy144=0 -maxfps144=0 -initts144=0 -title145=Monopoly 3D -path145=C:\Games\Monopoly (Edition 3D)\Monopoly.exe -module145= -opengllib145= -ver145=0 -coord145=0 -flag145=134244388 -flagg145=0 -flagh145=0 -flagi145=0 -tflag145=2 -initx145=0 -inity145=0 -minx145=0 -miny145=0 -maxx145=0 -maxy145=0 -posx145=50 -posy145=50 -sizx145=800 -sizy145=600 -maxfps145=0 -initts145=0 -title146=Monster Truck Madness 2 -path146=C:\Games\Monster Truck Madness 2\Monster.EXE -module146= -opengllib146= -ver146=1 -coord146=0 -flag146=34 -flagg146=1 -flagh146=0 -flagi146=0 -tflag146=0 -initx146=0 -inity146=0 -minx146=0 -miny146=0 -maxx146=0 -maxy146=0 -posx146=50 -posy146=50 -sizx146=800 -sizy146=600 -maxfps146=0 -initts146=0 -title147=Moto Racer Demo -path147=D:\Games\Moto Racer Demo\PlayDemo.exe -module147= -opengllib147= -ver147=0 -coord147=0 -flag147=167903267 -flagg147=192 -flagh147=16 -flagi147=0 -tflag147=14 -initx147=0 -inity147=0 -minx147=0 -miny147=0 -maxx147=0 -maxy147=0 -posx147=50 -posy147=50 -sizx147=800 -sizy147=600 -maxfps147=0 -initts147=0 -title148=MTV Music Generator -path148=D:\games\MTV Music Generator\mtvmusic.exe -module148= -opengllib148= -ver148=0 -coord148=0 -flag148=136314914 -flagg148=1209008128 -flagh148=797 -flagi148=0 -tflag148=3 -initx148=0 -inity148=0 -minx148=0 -miny148=0 -maxx148=0 -maxy148=0 -posx148=50 -posy148=50 -sizx148=800 -sizy148=600 -maxfps148=0 -initts148=0 -title149=Necrodrome -path149=C:\Games\Necrodome\NECRO95.EXE -module149= -opengllib149= -ver149=0 -coord149=0 -flag149=268435495 -flagg149=256 -flagh149=16 -flagi149=0 -tflag149=0 -initx149=0 -inity149=0 -minx149=0 -miny149=0 -maxx149=0 -maxy149=0 -posx149=50 -posy149=50 -sizx149=800 -sizy149=600 -maxfps149=0 -initts149=0 -title150=Need For Speed - Porsche 2000 -path150=C:\Games\Need For Speed - Porsche 2000\Porsche.exe -module150= -opengllib150= -ver150=7 -coord150=0 -flag150=0 -flagg150=0 -flagh150=0 -flagi150=0 -tflag150=258 -initx150=0 -inity150=0 -minx150=0 -miny150=0 -maxx150=0 -maxy150=0 -posx150=50 -posy150=50 -sizx150=800 -sizy150=600 -maxfps150=0 -initts150=0 -title151=Need For Speed Underground -path151=D:\Games\Need For Speed Underground\speed.exe -module151= -opengllib151= -ver151=0 -coord151=0 -flag151=671088674 -flagg151=1815101441 -flagh151=60 -flagi151=0 -tflag151=322 -initx151=0 -inity151=0 -minx151=0 -miny151=0 -maxx151=0 -maxy151=0 -posx151=50 -posy151=50 -sizx151=800 -sizy151=600 -maxfps151=0 -initts151=6 -title152=Need for Speed Underground 2 -path152=D:\Games\Need for Speed Underground 2\SPEED2.EXE -module152= -opengllib152= -ver152=0 -coord152=0 -flag152=671105026 -flagg152=136331264 -flagh152=61 -flagi152=0 -tflag152=6 -initx152=0 -inity152=0 -minx152=0 -miny152=0 -maxx152=0 -maxy152=0 -posx152=50 -posy152=50 -sizx152=800 -sizy152=600 -maxfps152=0 -initts152=0 -title153=Need For Speed Underground Demo -path153=D:\Games\Need For Speed Underground Demo\speeddemo.exe -module153= -opengllib153= -ver153=9 -coord153=0 -flag153=0 -flagg153=673202192 -flagh153=61 -flagi153=0 -tflag153=2 -initx153=0 -inity153=0 -minx153=0 -miny153=0 -maxx153=0 -maxy153=0 -posx153=50 -posy153=50 -sizx153=800 -sizy153=600 -maxfps153=0 -initts153=0 -title154=Netstorm Islands at War -path154=C:\Games\Netstorm\Netstorm.exe -module154= -opengllib154= -ver154=0 -coord154=0 -flag154=2 -flagg154=0 -flagh154=0 -flagi154=0 -tflag154=0 -initx154=0 -inity154=0 -minx154=0 -miny154=0 -maxx154=0 -maxy154=0 -posx154=50 -posy154=50 -sizx154=800 -sizy154=600 -maxfps154=0 -initts154=0 -title155=Nightmare Ned -path155=D:\Games\Ned\NITENED.EXE -module155= -opengllib155= -ver155=0 -coord155=0 -flag155=537395202 -flagg155=135266305 -flagh155=0 -flagi155=0 -tflag155=0 -initx155=0 -inity155=0 -minx155=0 -miny155=0 -maxx155=0 -maxy155=0 -posx155=0 -posy155=0 -sizx155=800 -sizy155=600 -maxfps155=0 -initts155=0 -title156=Nocturne -path156=D:\Games\Nocturne\nocturne.exe -module156= -opengllib156= -ver156=0 -coord156=0 -flag156=134217730 -flagg156=402653264 -flagh156=144 -flagi156=0 -tflag156=3 -initx156=0 -inity156=0 -minx156=0 -miny156=0 -maxx156=0 -maxy156=0 -posx156=50 -posy156=50 -sizx156=800 -sizy156=600 -maxfps156=0 -initts156=0 -title157=Nox -path157=d:\Games\Nox\Game.exe -module157= -opengllib157= -ver157=0 -coord157=0 -flag157=939540515 -flagg157=0 -flagh157=0 -flagi157=0 -tflag157=386 -initx157=0 -inity157=0 -minx157=0 -miny157=0 -maxx157=0 -maxy157=0 -posx157=50 -posy157=50 -sizx157=800 -sizy157=600 -maxfps157=0 -initts157=0 -title158=Pacific General -path158=C:\Games\Pacific General\PACGEN.EXE -module158= -opengllib158= -ver158=0 -coord158=0 -flag158=8226 -flagg158=0 -flagh158=0 -flagi158=0 -tflag158=2 -initx158=0 -inity158=0 -minx158=0 -miny158=0 -maxx158=0 -maxy158=0 -posx158=50 -posy158=50 -sizx158=800 -sizy158=600 -maxfps158=0 -initts158=0 -title159=Pandemonium 2 -path159=D:\Games\Pandemonium 2\pandy.exe -module159= -opengllib159= -ver159=0 -coord159=0 -flag159=201326594 -flagg159=1 -flagh159=20 -flagi159=0 -tflag159=0 -initx159=0 -inity159=0 -minx159=0 -miny159=0 -maxx159=0 -maxy159=0 -posx159=50 -posy159=50 -sizx159=800 -sizy159=600 -maxfps159=0 -initts159=0 -title160=Pharaoh -path160=D:\Games\Pharaoh\Pharaoh.exe -module160= -opengllib160= -ver160=0 -coord160=0 -flag160=1207959586 -flagg160=1048576 -flagh160=16 -flagi160=0 -tflag160=3 -initx160=0 -inity160=0 -minx160=0 -miny160=0 -maxx160=0 -maxy160=0 -posx160=50 -posy160=50 -sizx160=800 -sizy160=600 -maxfps160=0 -initts160=0 -title161=Postal -path161=D:\Games\Postal\POSTAL.EXE -module161= -opengllib161= -ver161=1 -coord161=0 -flag161=671352835 -flagg161=1114112 -flagh161=20 -flagi161=0 -tflag161=0 -initx161=0 -inity161=0 -minx161=0 -miny161=0 -maxx161=0 -maxy161=0 -posx161=50 -posy161=50 -sizx161=800 -sizy161=600 -maxfps161=0 -initts161=-3 -title162=Premier Manager 98 -path162=D:\Games\Premier Manager 98\MANAGER.EXE -module162= -opengllib162= -ver162=0 -coord162=0 -flag162=671088674 -flagg162=1207959552 -flagh162=16 -flagi162=0 -tflag162=0 -initx162=0 -inity162=0 -minx162=0 -miny162=0 -maxx162=0 -maxy162=0 -posx162=50 -posy162=50 -sizx162=800 -sizy162=600 -maxfps162=0 -initts162=0 -title163=Project Nomads Demo (BAD) -path163=C:\Games\Project Nomads Demo\bin\win32\nomads.exe -module163= -opengllib163= -ver163=8 -coord163=0 -flag163=-1476394912 -flagg163=256 -flagh163=0 -flagi163=0 -tflag163=258 -initx163=0 -inity163=0 -minx163=0 -miny163=0 -maxx163=0 -maxy163=0 -posx163=50 -posy163=50 -sizx163=800 -sizy163=600 -maxfps163=0 -initts163=0 -title164=Puzzle Bubble -path164=C:\Games\Puzzle Bubble\PB.EXE -module164= -opengllib164= -ver164=0 -coord164=0 -flag164=34 -flagg164=0 -flagh164=0 -flagi164=0 -tflag164=0 -initx164=0 -inity164=0 -minx164=0 -miny164=0 -maxx164=0 -maxy164=0 -posx164=50 -posy164=50 -sizx164=800 -sizy164=600 -maxfps164=0 -initts164=0 -title165=Quake 2 -path165=D:\Games\QUAKE2\quake2.exe -module165= -opengllib165= -ver165=10 -coord165=0 -flag165=671089154 -flagg165=671220289 -flagh165=16 -flagi165=0 -tflag165=258 -initx165=0 -inity165=0 -minx165=0 -miny165=0 -maxx165=0 -maxy165=0 -posx165=50 -posy165=50 -sizx165=800 -sizy165=600 -maxfps165=0 -initts165=0 -title166=Quake 3 Arena -path166=D:\Games\Q3A\quake3.exe -module166= -opengllib166= -ver166=0 -coord166=0 -flag166=536870914 -flagg166=1180161 -flagh166=16 -flagi166=0 -tflag166=3 -initx166=0 -inity166=0 -minx166=0 -miny166=0 -maxx166=0 -maxy166=0 -posx166=50 -posy166=50 -sizx166=800 -sizy166=600 -maxfps166=0 -initts166=0 -title167=Raiden II -path167=C:\Games\Raiden II\Raiden II\RAIDENII.EXE -module167= -opengllib167= -ver167=0 -coord167=0 -flag167=34 -flagg167=0 -flagh167=0 -flagi167=0 -tflag167=0 -initx167=0 -inity167=0 -minx167=0 -miny167=0 -maxx167=0 -maxy167=0 -posx167=50 -posy167=50 -sizx167=800 -sizy167=600 -maxfps167=0 -initts167=0 -title168=Railroad Tycoon II -path168=C:\Games\Railroad.Tycoon.II\RT2.EXE -module168= -opengllib168= -ver168=1 -coord168=0 -flag168=134225954 -flagg168=0 -flagh168=0 -flagi168=0 -tflag168=0 -initx168=0 -inity168=0 -minx168=0 -miny168=0 -maxx168=0 -maxy168=0 -posx168=50 -posy168=50 -sizx168=800 -sizy168=600 -maxfps168=0 -initts168=0 -title169=Rally Championship 2000 -path169=C:\Games\Rally Championship 2000\RAL.EXE -module169= -opengllib169= -ver169=0 -coord169=0 -flag169=67108864 -flagg169=0 -flagh169=0 -flagi169=0 -tflag169=2 -initx169=0 -inity169=0 -minx169=0 -miny169=0 -maxx169=0 -maxy169=0 -posx169=50 -posy169=50 -sizx169=800 -sizy169=600 -maxfps169=0 -initts169=0 -title170=Rebel Moon Rising -path170=C:\Games\Rebel Moon Rising\Rmr.exe -module170= -opengllib170= -ver170=0 -coord170=0 -flag170=0 -flagg170=0 -flagh170=0 -flagi170=0 -tflag170=0 -initx170=0 -inity170=0 -minx170=0 -miny170=0 -maxx170=0 -maxy170=0 -posx170=50 -posy170=50 -sizx170=800 -sizy170=600 -maxfps170=0 -initts170=0 -title171=Redline - Gang Warfare 2066 -path171=C:\Games\Redline - Gang Warfare 2066\redline.exe -module171= -opengllib171= -ver171=0 -coord171=0 -flag171=32 -flagg171=0 -flagh171=0 -flagi171=0 -tflag171=386 -initx171=0 -inity171=0 -minx171=0 -miny171=0 -maxx171=0 -maxy171=0 -posx171=50 -posy171=50 -sizx171=800 -sizy171=600 -maxfps171=0 -initts171=0 -title172=Resident Evil -path172=D:\Games\Resident Evil\residentevil.patched.exe -module172= -opengllib172= -ver172=1 -coord172=0 -flag172=134217827 -flagg172=128 -flagh172=16 -flagi172=0 -tflag172=2 -initx172=0 -inity172=0 -minx172=0 -miny172=0 -maxx172=0 -maxy172=0 -posx172=50 -posy172=50 -sizx172=800 -sizy172=600 -maxfps172=0 -initts172=0 -title173=Resurrection -path173=D:\Games\Resurrection Il Ritorno del Drago Nero\Resurrection.exe -module173= -opengllib173= -ver173=7 -coord173=0 -flag173=136314882 -flagg173=134217728 -flagh173=29 -flagi173=0 -tflag173=3 -initx173=0 -inity173=0 -minx173=0 -miny173=0 -maxx173=0 -maxy173=0 -posx173=50 -posy173=50 -sizx173=800 -sizy173=600 -maxfps173=0 -initts173=0 -title174=Return to Castle Wolfenstein -path174=D:\Games\Return to Castle Wolfenstein (2001)\Return to Castle Wolfenstein\WolfSP.exe -module174= -opengllib174= -ver174=0 -coord174=0 -flag174=134234114 -flagg174=-2147270656 -flagh174=0 -flagi174=0 -tflag174=256 -initx174=0 -inity174=0 -minx174=0 -miny174=0 -maxx174=0 -maxy174=0 -posx174=50 -posy174=50 -sizx174=800 -sizy174=600 -maxfps174=50 -initts174=-4 -title175=Re-Volt -path175=C:\Games\Re-Volt\REVOLT.EXE -module175= -opengllib175= -ver175=0 -coord175=0 -flag175=134217792 -flagg175=0 -flagh175=0 -flagi175=0 -tflag175=0 -initx175=0 -inity175=0 -minx175=0 -miny175=0 -maxx175=0 -maxy175=0 -posx175=50 -posy175=50 -sizx175=800 -sizy175=600 -maxfps175=0 -initts175=0 -title176=Road Rash -path176=D:\Games\Road Rash\ROADRASH\ROADRASH.EXE -module176= -opengllib176= -ver176=0 -coord176=0 -flag176=134217730 -flagg176=0 -flagh176=0 -flagi176=0 -tflag176=386 -initx176=0 -inity176=0 -minx176=0 -miny176=0 -maxx176=0 -maxy176=0 -posx176=50 -posy176=50 -sizx176=800 -sizy176=600 -maxfps176=0 -initts176=0 -title177=Road Rash Demo -path177=D:\Games\RoadRash DEMO\DEMORASH.EXE -module177= -opengllib177= -ver177=0 -coord177=0 -flag177=134218242 -flagg177=0 -flagh177=0 -flagi177=0 -tflag177=258 -initx177=0 -inity177=0 -minx177=0 -miny177=0 -maxx177=0 -maxy177=0 -posx177=50 -posy177=50 -sizx177=800 -sizy177=600 -maxfps177=0 -initts177=0 -title178=Rogue Spear (BAD) -path178=D:\Games\Rogue Spear\RogueSpear.exe -module178= -opengllib178= -ver178=1 -coord178=0 -flag178=134234116 -flagg178=134217984 -flagh178=20 -flagi178=0 -tflag178=2 -initx178=0 -inity178=0 -minx178=0 -miny178=0 -maxx178=0 -maxy178=0 -posx178=50 -posy178=50 -sizx178=800 -sizy178=600 -maxfps178=0 -initts178=0 -title179=Rollcage -path179=D:\Games\Rollcage\Direct3D\Rollcage.exe -module179= -opengllib179= -ver179=0 -coord179=1 -flag179=520093712 -flagg179=135331840 -flagh179=20 -flagi179=0 -tflag179=3 -initx179=0 -inity179=0 -minx179=0 -miny179=0 -maxx179=0 -maxy179=0 -posx179=50 -posy179=50 -sizx179=800 -sizy179=600 -maxfps179=0 -initts179=0 -title180=RollerCoaster Tycoon 2 Mini Game -path180=C:\Games\RollerCoaster Tycoon 2 Mini Game\rct2.exe -module180= -opengllib180= -ver180=1 -coord180=0 -flag180=536870946 -flagg180=0 -flagh180=0 -flagi180=0 -tflag180=0 -initx180=0 -inity180=0 -minx180=0 -miny180=0 -maxx180=0 -maxy180=0 -posx180=0 -posy180=0 -sizx180=800 -sizy180=600 -maxfps180=0 -initts180=0 -title181=Sega Rally 2 Championship -path181=C:\Games\Sega Rally 2 Championship\SEGA RALLY 2.exe -module181= -opengllib181= -ver181=1 -coord181=0 -flag181=268435488 -flagg181=2 -flagh181=0 -flagi181=0 -tflag181=0 -initx181=0 -inity181=0 -minx181=0 -miny181=0 -maxx181=0 -maxy181=0 -posx181=0 -posy181=0 -sizx181=800 -sizy181=600 -maxfps181=0 -initts181=0 -title182=Sentinel Returns -path182=D:\Games\Sentinel Returns\Sentinel.exe -module182= -opengllib182= -ver182=1 -coord182=0 -flag182=3 -flagg182=-2147483648 -flagh182=0 -flagi182=0 -tflag182=0 -initx182=0 -inity182=0 -minx182=0 -miny182=0 -maxx182=0 -maxy182=0 -posx182=50 -posy182=50 -sizx182=800 -sizy182=600 -maxfps182=0 -initts182=0 -title183=Shadow Master (TBD) -path183=C:\Games\Shadow Master\rmg.exe -module183= -opengllib183= -ver183=1 -coord183=0 -flag183=32 -flagg183=256 -flagh183=0 -flagi183=0 -tflag183=450 -initx183=0 -inity183=0 -minx183=0 -miny183=0 -maxx183=0 -maxy183=0 -posx183=50 -posy183=50 -sizx183=800 -sizy183=600 -maxfps183=0 -initts183=0 -title184=Sid Meier's SimGolf Demo -path184=C:\Games\Sid Meier's SimGolf Demo\golf.exe -module184=jgl.dll -opengllib184= -ver184=0 -coord184=0 -flag184=33554434 -flagg184=0 -flagh184=0 -flagi184=0 -tflag184=2 -initx184=0 -inity184=0 -minx184=0 -miny184=0 -maxx184=0 -maxy184=0 -posx184=50 -posy184=50 -sizx184=800 -sizy184=600 -maxfps184=0 -initts184=0 -title185=Silent Storm Demo -path185=D:\Games\Silent Storm Demo\SilentStormDemo.exe -module185= -opengllib185= -ver185=0 -coord185=0 -flag185=536870913 -flagg185=-2013265664 -flagh185=0 -flagi185=0 -tflag185=2 -initx185=0 -inity185=0 -minx185=0 -miny185=0 -maxx185=0 -maxy185=0 -posx185=50 -posy185=50 -sizx185=800 -sizy185=600 -maxfps185=0 -initts185=0 -title186=Sin, Wages of (sw renderer) -path186=D:\Games\sin\sin.exe -module186= -opengllib186= -ver186=10 -coord186=0 -flag186=402670082 -flagg186=131585 -flagh186=20 -flagi186=0 -tflag186=386 -initx186=0 -inity186=0 -minx186=0 -miny186=0 -maxx186=0 -maxy186=0 -posx186=50 -posy186=50 -sizx186=800 -sizy186=600 -maxfps186=0 -initts186=0 -title187=SleepWalker -path187=C:\Games\SleepWalker\Sleepy.exe -module187= -opengllib187= -ver187=0 -coord187=0 -flag187=301989954 -flagg187=0 -flagh187=0 -flagi187=0 -tflag187=198 -initx187=0 -inity187=0 -minx187=0 -miny187=0 -maxx187=0 -maxy187=0 -posx187=50 -posy187=50 -sizx187=800 -sizy187=600 -maxfps187=0 -initts187=0 -title188=SnowBoard Racer -path188=C:\Games\Snowboard Racer\SnowBoard.exe -module188= -opengllib188= -ver188=0 -coord188=0 -flag188=268443681 -flagg188=0 -flagh188=0 -flagi188=0 -tflag188=0 -initx188=0 -inity188=0 -minx188=0 -miny188=0 -maxx188=0 -maxy188=0 -posx188=50 -posy188=50 -sizx188=800 -sizy188=600 -maxfps188=0 -initts188=0 -title189=Solaris (~BAD) -path189=c:\Games\Solaris\solaris.exe -module189= -opengllib189= -ver189=7 -coord189=0 -flag189=973078627 -flagg189=1 -flagh189=0 -flagi189=0 -tflag189=2 -initx189=0 -inity189=0 -minx189=0 -miny189=0 -maxx189=0 -maxy189=0 -posx189=50 -posy189=50 -sizx189=800 -sizy189=600 -maxfps189=0 -initts189=0 -title190=Soldiers at War -path190=D:\Games\Soldiers at War\SAW_Game.exe -module190= -opengllib190= -ver190=0 -coord190=0 -flag190=671359010 -flagg190=64 -flagh190=0 -flagi190=0 -tflag190=0 -initx190=0 -inity190=0 -minx190=0 -miny190=0 -maxx190=0 -maxy190=0 -posx190=50 -posy190=50 -sizx190=640 -sizy190=480 -maxfps190=0 -initts190=0 -title191=Sonic 3 -path191=C:\Games\Sonic 3 + Sonic et Knuckles\Sonic 3\SONIC3K.EXE -module191= -opengllib191= -ver191=1 -coord191=0 -flag191=546 -flagg191=0 -flagh191=0 -flagi191=0 -tflag191=0 -initx191=0 -inity191=0 -minx191=0 -miny191=0 -maxx191=0 -maxy191=0 -posx191=50 -posy191=50 -sizx191=800 -sizy191=600 -maxfps191=0 -initts191=0 -title192=Sonic 3D Blast -path192=C:\Games\Sonic3D\pcsonic.exe -module192= -opengllib192= -ver192=0 -coord192=0 -flag192=134217762 -flagg192=0 -flagh192=0 -flagi192=0 -tflag192=0 -initx192=0 -inity192=0 -minx192=0 -miny192=0 -maxx192=0 -maxy192=0 -posx192=50 -posy192=50 -sizx192=800 -sizy192=600 -maxfps192=0 -initts192=0 -title193=Sonic R -path193=C:\Games\SonicR\sonicr.exe -module193= -opengllib193= -ver193=0 -coord193=0 -flag193=8288 -flagg193=0 -flagh193=0 -flagi193=0 -tflag193=0 -initx193=0 -inity193=0 -minx193=0 -miny193=0 -maxx193=0 -maxy193=0 -posx193=50 -posy193=50 -sizx193=800 -sizy193=600 -maxfps193=0 -initts193=0 -title194=Soulbringer -path194=C:\Games\SoulBringer\SoulbringeVCnoeax.exe -module194= -opengllib194= -ver194=0 -coord194=0 -flag194=143024174 -flagg194=0 -flagh194=0 -flagi194=0 -tflag194=0 -initx194=0 -inity194=0 -minx194=0 -miny194=0 -maxx194=0 -maxy194=0 -posx194=50 -posy194=50 -sizx194=800 -sizy194=600 -maxfps194=0 -initts194=0 -title195=Speedboat Attack (BAD) -path195=C:\Games\Speedboat Attack\SBOAT.EXE -module195= -opengllib195= -ver195=0 -coord195=0 -flag195=541073954 -flagg195=0 -flagh195=0 -flagi195=0 -tflag195=2 -initx195=0 -inity195=0 -minx195=0 -miny195=0 -maxx195=0 -maxy195=0 -posx195=50 -posy195=50 -sizx195=800 -sizy195=600 -maxfps195=0 -initts195=0 -title196=Star trek Klingon Honor Guard -path196=D:\Games\Star trek Klingon Honor Guard\System\Khg.exe -module196=OGIDrv.dll -opengllib196= -ver196=10 -coord196=0 -flag196=0 -flagg196=537002497 -flagh196=16 -flagi196=0 -tflag196=386 -initx196=0 -inity196=0 -minx196=0 -miny196=0 -maxx196=0 -maxy196=0 -posx196=50 -posy196=50 -sizx196=800 -sizy196=600 -maxfps196=0 -initts196=0 -title197=Star Wars Episode 1 Racer -path197=C:\Games\sw racer\SWEP1RCR.EXE -module197= -opengllib197= -ver197=0 -coord197=0 -flag197=142606368 -flagg197=0 -flagh197=0 -flagi197=0 -tflag197=0 -initx197=0 -inity197=0 -minx197=0 -miny197=0 -maxx197=0 -maxy197=0 -posx197=50 -posy197=50 -sizx197=800 -sizy197=600 -maxfps197=0 -initts197=0 -title198=Star Wars Jedi Knight Jedi Academy -path198=D:\Games\Star_Wars_Jedi_Knight_Jedi_Academy\GameData\jasp.exe -module198= -opengllib198= -ver198=0 -coord198=0 -flag198=2 -flagg198=196608 -flagh198=20 -flagi198=0 -tflag198=2 -initx198=0 -inity198=0 -minx198=0 -miny198=0 -maxx198=0 -maxy198=0 -posx198=50 -posy198=50 -sizx198=800 -sizy198=600 -maxfps198=0 -initts198=0 -title199=Star Wars: Jedi Knight -path199=C:\Games\Jedi Knight\Jedi Knight\JK.EXE -module199= -opengllib199= -ver199=0 -coord199=0 -flag199=8226 -flagg199=0 -flagh199=0 -flagi199=0 -tflag199=0 -initx199=0 -inity199=0 -minx199=0 -miny199=0 -maxx199=0 -maxy199=0 -posx199=50 -posy199=50 -sizx199=800 -sizy199=600 -maxfps199=0 -initts199=0 -title200=Star Wars: the Gungan Frontier -path200=C:\Games\sw the gungan frontier\Gungan Frontier.exe -module200= -opengllib200= -ver200=1 -coord200=0 -flag200=402915362 -flagg200=512 -flagh200=0 -flagi200=0 -tflag200=0 -initx200=0 -inity200=0 -minx200=0 -miny200=0 -maxx200=0 -maxy200=0 -posx200=0 -posy200=0 -sizx200=800 -sizy200=600 -maxfps200=0 -initts200=0 -title201=Starcraft -path201=D:\Games\Starcraft\StarCraft.exe -module201= -opengllib201= -ver201=0 -coord201=1 -flag201=134234115 -flagg201=2179088 -flagh201=48 -flagi201=0 -tflag201=258 -initx201=0 -inity201=0 -minx201=0 -miny201=0 -maxx201=0 -maxy201=0 -posx201=50 -posy201=50 -sizx201=800 -sizy201=600 -maxfps201=0 -initts201=0 -title202=Starship Troopers -path202=C:\Games\Starship Troopers - Terran Ascendancy\stta\StarshipTroopers.exe -module202= -opengllib202= -ver202=1 -coord202=0 -flag202=32 -flagg202=0 -flagh202=0 -flagi202=0 -tflag202=0 -initx202=0 -inity202=0 -minx202=0 -miny202=0 -maxx202=0 -maxy202=0 -posx202=50 -posy202=50 -sizx202=800 -sizy202=600 -maxfps202=0 -initts202=0 -title203=Starshot Space Circus -path203=D:\SpaceCircus.exe -module203= -opengllib203= -ver203=0 -coord203=0 -flag203=66 -flagg203=0 -flagh203=0 -flagi203=0 -tflag203=0 -initx203=0 -inity203=0 -minx203=0 -miny203=0 -maxx203=0 -maxy203=0 -posx203=50 -posy203=50 -sizx203=800 -sizy203=600 -maxfps203=0 -initts203=0 -title204=Stronghold Demo -path204=C:\Games\Firefly Studios' Stronghold - Demo\Stronghold Demo.exe -module204= -opengllib204= -ver204=0 -coord204=0 -flag204=98 -flagg204=0 -flagh204=0 -flagi204=0 -tflag204=0 -initx204=0 -inity204=0 -minx204=0 -miny204=0 -maxx204=0 -maxy204=0 -posx204=50 -posy204=50 -sizx204=800 -sizy204=600 -maxfps204=0 -initts204=0 -title205=Sub Culture -path205=C:\Games\Sub Culture\sc.exe -module205= -opengllib205= -ver205=0 -coord205=0 -flag205=66 -flagg205=256 -flagh205=0 -flagi205=0 -tflag205=10 -initx205=50 -inity205=50 -minx205=50 -miny205=50 -maxx205=800 -maxy205=600 -posx205=50 -posy205=50 -sizx205=800 -sizy205=600 -maxfps205=0 -initts205=0 -title206=Superbike 2001 -path206=C:\Games\Superbike 2001\Sbk2001.exe -module206= -opengllib206= -ver206=1 -coord206=0 -flag206=536887332 -flagg206=0 -flagh206=0 -flagi206=0 -tflag206=0 -initx206=0 -inity206=0 -minx206=0 -miny206=0 -maxx206=0 -maxy206=0 -posx206=50 -posy206=50 -sizx206=800 -sizy206=600 -maxfps206=0 -initts206=0 -title207=Syberia 2 Demo -path207=C:\Games\Syberia 2 Demo\Syberia2Demo.exe -module207= -opengllib207= -ver207=8 -coord207=0 -flag207=536887332 -flagg207=0 -flagh207=0 -flagi207=0 -tflag207=0 -initx207=0 -inity207=0 -minx207=0 -miny207=0 -maxx207=0 -maxy207=0 -posx207=50 -posy207=50 -sizx207=800 -sizy207=600 -maxfps207=0 -initts207=0 -title208=Syberia Demo -path208=C:\Games\SyberiaDemo\SyberiaDemo.exe -module208= -opengllib208= -ver208=1 -coord208=0 -flag208=536887332 -flagg208=0 -flagh208=0 -flagi208=0 -tflag208=0 -initx208=0 -inity208=0 -minx208=0 -miny208=0 -maxx208=0 -maxy208=0 -posx208=50 -posy208=50 -sizx208=800 -sizy208=600 -maxfps208=0 -initts208=0 -title209=System Shock 2 (BAD!!!) -path209=C:\Games\Sys Shock II\Shock2.exe -module209= -opengllib209= -ver209=1 -coord209=0 -flag209=0 -flagg209=64 -flagh209=0 -flagi209=0 -tflag209=0 -initx209=0 -inity209=0 -minx209=0 -miny209=0 -maxx209=0 -maxy209=0 -posx209=50 -posy209=50 -sizx209=800 -sizy209=600 -maxfps209=0 -initts209=0 -title210=Take no Prisoners -path210=D:\Games\Take no Prisoners\TNP.EXE -module210= -opengllib210= -ver210=0 -coord210=0 -flag210=134217730 -flagg210=16777248 -flagh210=20 -flagi210=0 -tflag210=0 -initx210=0 -inity210=0 -minx210=0 -miny210=0 -maxx210=0 -maxy210=0 -posx210=50 -posy210=50 -sizx210=800 -sizy210=600 -maxfps210=0 -initts210=0 -title211=Test Drive 4 -path211=D:\Games\Test Drive 4\td4.EXE -module211= -opengllib211= -ver211=0 -coord211=0 -flag211=-2013265885 -flagg211=-2147418110 -flagh211=20 -flagi211=0 -tflag211=0 -initx211=0 -inity211=0 -minx211=0 -miny211=0 -maxx211=0 -maxy211=0 -posx211=50 -posy211=50 -sizx211=800 -sizy211=600 -maxfps211=0 -initts211=-8 -title212=Test Drive 5 (D3D) -path212=D:\Games\Test Drive 5\TD5_D3D.exe -module212= -opengllib212= -ver212=0 -coord212=0 -flag212=671088640 -flagg212=0 -flagh212=20 -flagi212=0 -tflag212=258 -initx212=0 -inity212=0 -minx212=0 -miny212=0 -maxx212=0 -maxy212=0 -posx212=50 -posy212=50 -sizx212=800 -sizy212=600 -maxfps212=0 -initts212=0 -title213=The Nations Demo -path213=C:\Games\The Nations Demo\bin\Game.exe -module213= -opengllib213= -ver213=1 -coord213=0 -flag213=402661920 -flagg213=256 -flagh213=0 -flagi213=0 -tflag213=0 -initx213=0 -inity213=0 -minx213=0 -miny213=0 -maxx213=0 -maxy213=0 -posx213=50 -posy213=50 -sizx213=800 -sizy213=600 -maxfps213=0 -initts213=0 -title214=The Sims -path214=D:\Games\sims\Sims.exe -module214= -opengllib214= -ver214=0 -coord214=0 -flag214=134225952 -flagg214=65536 -flagh214=16 -flagi214=0 -tflag214=3 -initx214=0 -inity214=0 -minx214=0 -miny214=0 -maxx214=0 -maxy214=0 -posx214=50 -posy214=50 -sizx214=800 -sizy214=600 -maxfps214=0 -initts214=0 -title215=Thief the Dark Project (FRE) -path215=C:\Games\thief\game\thieffixed.exe -module215= -opengllib215= -ver215=1 -coord215=0 -flag215=16390 -flagg215=0 -flagh215=0 -flagi215=0 -tflag215=0 -initx215=0 -inity215=0 -minx215=0 -miny215=0 -maxx215=0 -maxy215=0 -posx215=50 -posy215=50 -sizx215=800 -sizy215=600 -maxfps215=0 -initts215=0 -title216=TinTin: Prisoners of the Sun -path216=C:\Games\tintin\TINTINW.EXE -module216= -opengllib216= -ver216=0 -coord216=0 -flag216=34 -flagg216=0 -flagh216=0 -flagi216=0 -tflag216=2 -initx216=0 -inity216=0 -minx216=0 -miny216=0 -maxx216=0 -maxy216=0 -posx216=50 -posy216=50 -sizx216=800 -sizy216=600 -maxfps216=0 -initts216=0 -title217=Tintoy (BAD gfx) -path217=C:\Games\Tintoy\Tintoy.exe -module217= -opengllib217= -ver217=0 -coord217=0 -flag217=546 -flagg217=256 -flagh217=0 -flagi217=0 -tflag217=258 -initx217=0 -inity217=0 -minx217=0 -miny217=0 -maxx217=0 -maxy217=0 -posx217=50 -posy217=50 -sizx217=800 -sizy217=600 -maxfps217=0 -initts217=0 -title218=Tomb Raider - Anniversary -path218=C:\Games\Tomb Raider - Anniversary\tra.exe -module218= -opengllib218= -ver218=9 -coord218=0 -flag218=0 -flagg218=256 -flagh218=0 -flagi218=0 -tflag218=2 -initx218=0 -inity218=0 -minx218=0 -miny218=0 -maxx218=0 -maxy218=0 -posx218=50 -posy218=50 -sizx218=800 -sizy218=600 -maxfps218=0 -initts218=8 -title219=Tomb Raider 2 the Golden Mask -path219=D:\Games\TR2 Golden Mask\T2GOLD.EXE -module219= -opengllib219= -ver219=0 -coord219=0 -flag219=704643106 -flagg219=554713088 -flagh219=20 -flagi219=0 -tflag219=0 -initx219=0 -inity219=0 -minx219=0 -miny219=0 -maxx219=0 -maxy219=0 -posx219=50 -posy219=50 -sizx219=800 -sizy219=600 -maxfps219=0 -initts219=8 -title220=Tomb Raider 3 Demo -path220=C:\Games\Tomb Raider 3 - The Lost Artifact Demo\tr3gold.exe -module220= -opengllib220= -ver220=1 -coord220=0 -flag220=369098848 -flagg220=0 -flagh220=0 -flagi220=0 -tflag220=258 -initx220=0 -inity220=0 -minx220=0 -miny220=0 -maxx220=0 -maxy220=0 -posx220=50 -posy220=50 -sizx220=800 -sizy220=600 -maxfps220=0 -initts220=0 -title221=Tomb Raider 4 Demo -path221=C:\Games\Tomb Raider 4 - The Last Revelation (Demo)\tomb4.patched.exe -module221= -opengllib221= -ver221=0 -coord221=0 -flag221=234881056 -flagg221=16 -flagh221=0 -flagi221=0 -tflag221=258 -initx221=0 -inity221=0 -minx221=0 -miny221=0 -maxx221=0 -maxy221=0 -posx221=50 -posy221=50 -sizx221=800 -sizy221=600 -maxfps221=0 -initts221=0 -title222=Total Annihilation Kingdoms -path222=D:\Games\Total Annihilation Kingdoms\Kingdoms.exe -module222= -opengllib222= -ver222=0 -coord222=0 -flag222=134234146 -flagg222=1073741840 -flagh222=16 -flagi222=0 -tflag222=0 -initx222=0 -inity222=0 -minx222=0 -miny222=0 -maxx222=0 -maxy222=0 -posx222=50 -posy222=50 -sizx222=800 -sizy222=600 -maxfps222=0 -initts222=0 -title223=Total Soccer 2000 -path223=D:\Games\Total Soccer 2000\Total Soccer 2000\SOCCERdx.EXE -module223= -opengllib223= -ver223=1 -coord223=0 -flag223=167772226 -flagg223=1069056 -flagh223=20 -flagi223=0 -tflag223=0 -initx223=0 -inity223=0 -minx223=0 -miny223=0 -maxx223=0 -maxy223=0 -posx223=50 -posy223=50 -sizx223=800 -sizy223=600 -maxfps223=200 -initts223=0 -title224=Ultim@te Race Pro -path224=C:\Games\Ultim@te race pro\Ultim@te Race Pro.exe -module224= -opengllib224= -ver224=0 -coord224=0 -flag224=570425440 -flagg224=256 -flagh224=0 -flagi224=0 -tflag224=0 -initx224=0 -inity224=0 -minx224=0 -miny224=0 -maxx224=0 -maxy224=0 -posx224=50 -posy224=50 -sizx224=800 -sizy224=600 -maxfps224=0 -initts224=0 -title225=Uprising - Join or Die -path225=D:\Games\Uprising\uprising.exe -module225= -opengllib225= -ver225=0 -coord225=0 -flag225=-2013265882 -flagg225=18 -flagh225=16 -flagi225=0 -tflag225=0 -initx225=0 -inity225=0 -minx225=0 -miny225=0 -maxx225=0 -maxy225=0 -posx225=50 -posy225=50 -sizx225=800 -sizy225=600 -maxfps225=0 -initts225=0 -title226=Urban Assault -path226=D:\Games\Urban Assault\UA.EXE -module226= -opengllib226= -ver226=0 -coord226=0 -flag226=671236130 -flagg226=256 -flagh226=16 -flagi226=0 -tflag226=258 -initx226=0 -inity226=0 -minx226=0 -miny226=0 -maxx226=0 -maxy226=0 -posx226=50 -posy226=50 -sizx226=800 -sizy226=600 -maxfps226=0 -initts226=0 -title227=Urban Assault CD -path227=D:\Games\Urban Assault CD\UA.EXE -module227= -opengllib227= -ver227=0 -coord227=0 -flag227=671236130 -flagg227=33024 -flagh227=0 -flagi227=0 -tflag227=258 -initx227=0 -inity227=0 -minx227=0 -miny227=0 -maxx227=0 -maxy227=0 -posx227=50 -posy227=50 -sizx227=800 -sizy227=600 -maxfps227=0 -initts227=0 -title228=wa[cracked].exe -path228=D:\Games\Worms 2 Armageddon\wa[cracked].exe -module228= -opengllib228= -ver228=0 -coord228=0 -flag228=134217730 -flagg228=171966464 -flagh228=16 -flagi228=0 -tflag228=0 -initx228=0 -inity228=0 -minx228=0 -miny228=0 -maxx228=0 -maxy228=0 -posx228=50 -posy228=50 -sizx228=800 -sizy228=600 -maxfps228=0 -initts228=0 -title229=Warcraft 2 Battlenet Edition -path229=D:\Games\Warcraft 2\Warcraft II BNE.exe -module229= -opengllib229= -ver229=0 -coord229=0 -flag229=268452003 -flagg229=16 -flagh229=16 -flagi229=0 -tflag229=258 -initx229=0 -inity229=0 -minx229=0 -miny229=0 -maxx229=0 -maxy229=0 -posx229=50 -posy229=50 -sizx229=800 -sizy229=600 -maxfps229=40 -initts229=0 -title230=Wargames (demo) -path230=D:\Games\Wargames\wargames.exe -module230= -opengllib230= -ver230=0 -coord230=0 -flag230=268435618 -flagg230=1207959552 -flagh230=20 -flagi230=0 -tflag230=3 -initx230=0 -inity230=0 -minx230=0 -miny230=0 -maxx230=0 -maxy230=0 -posx230=50 -posy230=50 -sizx230=800 -sizy230=600 -maxfps230=0 -initts230=0 -title231=Warhammer 40K Final Liberation -path231=D:\Games\Warhammer 40K Final Liberation\EPIC40K.EXE -module231= -opengllib231= -ver231=1 -coord231=0 -flag231=134479874 -flagg231=135266304 -flagh231=31 -flagi231=0 -tflag231=0 -initx231=0 -inity231=0 -minx231=0 -miny231=0 -maxx231=0 -maxy231=0 -posx231=50 -posy231=50 -sizx231=800 -sizy231=600 -maxfps231=0 -initts231=0 -title232=WarHammer Rites of War -path232=C:\Games\Rites of War\RoW.exe -module232= -opengllib232= -ver232=0 -coord232=0 -flag232=134217760 -flagg232=128 -flagh232=0 -flagi232=0 -tflag232=0 -initx232=0 -inity232=0 -minx232=0 -miny232=0 -maxx232=0 -maxy232=0 -posx232=50 -posy232=50 -sizx232=800 -sizy232=600 -maxfps232=0 -initts232=0 -title233=Warlords 3 -path233=D:\Games\WARLORDS3\Darklord.exe -module233= -opengllib233= -ver233=0 -coord233=0 -flag233=-2147483102 -flagg233=268435488 -flagh233=532 -flagi233=0 -tflag233=259 -initx233=0 -inity233=0 -minx233=0 -miny233=0 -maxx233=0 -maxy233=0 -posx233=50 -posy233=50 -sizx233=0 -sizy233=0 -maxfps233=0 -initts233=0 -title234=WarTorn -path234=C:\Games\WarTorn\W.exe -module234= -opengllib234= -ver234=0 -coord234=0 -flag234=32 -flagg234=0 -flagh234=0 -flagi234=0 -tflag234=0 -initx234=0 -inity234=0 -minx234=0 -miny234=0 -maxx234=0 -maxy234=0 -posx234=50 -posy234=50 -sizx234=800 -sizy234=600 -maxfps234=0 -initts234=0 -title235=WarWind -path235=C:\Games\WarWind\WW.EXE -module235= -opengllib235= -ver235=0 -coord235=0 -flag235=16418 -flagg235=81936 -flagh235=0 -flagi235=0 -tflag235=0 -initx235=0 -inity235=0 -minx235=0 -miny235=0 -maxx235=0 -maxy235=0 -posx235=50 -posy235=50 -sizx235=800 -sizy235=600 -maxfps235=0 -initts235=0 -title236=Worms Armageddon Demo (BAD!!!) -path236=C:\Games\Worms Armageddon Demo\WaDemo.exe -module236= -opengllib236= -ver236=1 -coord236=0 -flag236=939524099 -flagg236=8 -flagh236=0 -flagi236=0 -tflag236=2 -initx236=0 -inity236=0 -minx236=0 -miny236=0 -maxx236=0 -maxy236=0 -posx236=0 -posy236=0 -sizx236=0 -sizy236=0 -maxfps236=0 -initts236=0 -title237=Worms World Party -path237=D:\Games\Worms World Party\wwp.exe -module237= -opengllib237= -ver237=1 -coord237=0 -flag237=8388610 -flagg237=0 -flagh237=0 -flagi237=0 -tflag237=0 -initx237=0 -inity237=0 -minx237=0 -miny237=0 -maxx237=0 -maxy237=0 -posx237=50 -posy237=50 -sizx237=800 -sizy237=600 -maxfps237=0 -initts237=0 -title238=Worms World Party Demo (BAD) -path238=C:\Games\WWP Demo\wwp.exe -module238=MFC42.DLL ltkrn10N.dll -opengllib238= -ver238=1 -coord238=0 -flag238=406847491 -flagg238=8 -flagh238=0 -flagi238=0 -tflag238=2 -initx238=0 -inity238=0 -minx238=0 -miny238=0 -maxx238=0 -maxy238=0 -posx238=0 -posy238=0 -sizx238=0 -sizy238=0 -maxfps238=0 -initts238=0 -title239=X-Com Enforcer -path239=C:\Games\X-Com Enforcer\System\xcom.exe -module239= -opengllib239= -ver239=1 -coord239=0 -flag239=32 -flagg239=0 -flagh239=0 -flagi239=0 -tflag239=0 -initx239=0 -inity239=0 -minx239=0 -miny239=0 -maxx239=0 -maxy239=0 -posx239=0 -posy239=0 -sizx239=800 -sizy239=600 -maxfps239=0 -initts239=0 -title240=X-Com Interceptor -path240=C:\Games\X-Com_Interceptor\X-COM Interceptor\Interceptor.exe -module240= -opengllib240= -ver240=0 -coord240=0 -flag240=16418 -flagg240=0 -flagh240=0 -flagi240=0 -tflag240=0 -initx240=0 -inity240=0 -minx240=0 -miny240=0 -maxx240=0 -maxy240=0 -posx240=50 -posy240=50 -sizx240=800 -sizy240=600 -maxfps240=0 -initts240=0 -title241=Z Steel Soldiers -path241=C:\Games\ZSteelSoldiers\Bin\z2.exe -module241= -opengllib241= -ver241=8 -coord241=0 -flag241=805462020 -flagg241=0 -flagh241=0 -flagi241=0 -tflag241=0 -initx241=0 -inity241=0 -minx241=0 -miny241=0 -maxx241=0 -maxy241=0 -posx241=50 -posy241=50 -sizx241=800 -sizy241=600 -maxfps241=0 -initts241=0 -title242=Zax Alien Hunter -path242=C:\Games\ZaxDemo\Zax.exe -module242= -opengllib242= -ver242=0 -coord242=0 -flag242=-1476386784 -flagg242=0 -flagh242=0 -flagi242=0 -tflag242=0 -initx242=0 -inity242=0 -minx242=0 -miny242=0 -maxx242=0 -maxy242=0 -posx242=50 -posy242=50 -sizx242=800 -sizy242=600 -maxfps242=0 -initts242=0 -title243=Zero Critical (BAD) -path243=C:\Games\zero_critical_-_satin_rift\ZEROCR.EXE -module243= -opengllib243= -ver243=0 -coord243=0 -flag243=679477858 -flagg243=8 -flagh243=0 -flagi243=0 -tflag243=0 -initx243=0 -inity243=0 -minx243=0 -miny243=0 -maxx243=0 -maxy243=0 -posx243=0 -posy243=0 -sizx243=800 -sizy243=600 -maxfps243=0 -initts243=0 -title244=Zero Population Count -path244=C:\Games\ZPC\ZPC.EXE -module244= -opengllib244= -ver244=0 -coord244=0 -flag244=1073741859 -flagg244=0 -flagh244=0 -flagi244=0 -tflag244=0 -initx244=0 -inity244=0 -minx244=0 -miny244=0 -maxx244=0 -maxy244=0 -posx244=0 -posy244=0 -sizx244=800 -sizy244=600 -maxfps244=0 -initts244=0 -title245=Zero Zone -path245=D:\ZZone\ZeroZone.exe -module245= -opengllib245= -ver245=0 -coord245=0 -flag245=34 -flagg245=0 -flagh245=0 -flagi245=0 -tflag245=0 -initx245=0 -inity245=0 -minx245=0 -miny245=0 -maxx245=0 -maxy245=0 -posx245=50 -posy245=50 -sizx245=800 -sizy245=600 -maxfps245=0 -initts245=0 -title246=Zeus Poseidon -path246=C:\Games\Zeus-Poseidon\Zeus.exe -module246= -opengllib246= -ver246=0 -coord246=0 -flag246=34 -flagg246=0 -flagh246=0 -flagi246=0 -tflag246=0 -initx246=0 -inity246=0 -minx246=0 -miny246=0 -maxx246=0 -maxy246=0 -posx246=50 -posy246=50 -sizx246=800 -sizy246=600 -maxfps246=0 -initts246=0 -title247=Zoo Tycoon -path247=C:\Games\Zoo Tycoon\zoo.exe -module247= -opengllib247= -ver247=0 -coord247=0 -flag247=-2013265886 -flagg247=0 -flagh247=0 -flagi247=0 -tflag247=0 -initx247=0 -inity247=0 -minx247=0 -miny247=0 -maxx247=0 -maxy247=0 -posx247=50 -posy247=50 -sizx247=800 -sizy247=600 -maxfps247=0 -initts247=0 -title248=Mortal Kombat 4 -path248=D:\Games\mk4\Mortal Kombat 4.exe -module248= -opengllib248= -ver248=0 -coord248=0 -flag248=536879107 -flagg248=135266308 -flagh248=276 -flagi248=0 -tflag248=3 -initx248=0 -inity248=0 -minx248=0 -miny248=0 -maxx248=0 -maxy248=0 -posx248=50 -posy248=50 -sizx248=800 -sizy248=600 -maxfps248=0 -initts248=0 -title249=Railroad Tycoon II -path249=D:\Games\Railroad.Tycoon.II\RT2.EXE -module249= -opengllib249= -ver249=0 -coord249=0 -flag249=2080 -flagg249=143654912 -flagh249=16 -flagi249=0 -tflag249=0 -initx249=0 -inity249=0 -minx249=0 -miny249=0 -maxx249=0 -maxy249=0 -posx249=50 -posy249=50 -sizx249=800 -sizy249=600 -maxfps249=0 -initts249=0 -title250=Space Hack -path250=D:\Games\Space Hack\main.exe -module250= -opengllib250= -ver250=0 -coord250=0 -flag250=134234144 -flagg250=134217728 -flagh250=20 -flagi250=0 -tflag250=3 -initx250=0 -inity250=0 -minx250=0 -miny250=0 -maxx250=0 -maxy250=0 -posx250=50 -posy250=50 -sizx250=800 -sizy250=600 -maxfps250=0 -initts250=0 -title251=Abomination - The Nemesis Project Demo -path251=D:\Games\Abomination - The Nemesis Project Demo\Abomb.exe -module251= -opengllib251= -ver251=0 -coord251=0 -flag251=134217826 -flagg251=134217728 -flagh251=20 -flagi251=0 -tflag251=64 -initx251=0 -inity251=0 -minx251=0 -miny251=0 -maxx251=0 -maxy251=0 -posx251=50 -posy251=50 -sizx251=800 -sizy251=600 -maxfps251=0 -initts251=0 -title252=Alien Nations DEMO -path252=D:\Games\Amazon & Aliens DEMO\Bin\AA.exe -module252= -opengllib252= -ver252=0 -coord252=0 -flag252=1207959654 -flagg252=135266306 -flagh252=20 -flagi252=0 -tflag252=259 -initx252=0 -inity252=0 -minx252=0 -miny252=0 -maxx252=0 -maxy252=0 -posx252=50 -posy252=50 -sizx252=800 -sizy252=600 -maxfps252=0 -initts252=0 -title253=Duckman -path253=D:\Games\duckman\DUCKMAN.EXE -module253= -opengllib253= -ver253=0 -coord253=0 -flag253=402653186 -flagg253=201326592 -flagh253=20 -flagi253=0 -tflag253=259 -initx253=0 -inity253=0 -minx253=0 -miny253=0 -maxx253=0 -maxy253=0 -posx253=50 -posy253=50 -sizx253=800 -sizy253=600 -maxfps253=0 -initts253=0 -[window] -posx=928 -posy=224 -sizx=320 -sizy=455 diff --git a/build/dxwnd.2.ini b/build/dxwnd.2.ini deleted file mode 100644 index 2ff451e..0000000 --- a/build/dxwnd.2.ini +++ /dev/null @@ -1,1133 +0,0 @@ -[target] -title0=101 Airborne Invasion -path0=D:\Games\101air\101.exe -module0= -opengllib0= -ver0=0 -coord0=0 -flag0=134217762 -flagg0=134217728 -flagh0=20 -flagi0=0 -tflag0=64 -initx0=0 -inity0=0 -minx0=0 -miny0=0 -maxx0=0 -maxy0=0 -posx0=50 -posy0=50 -sizx0=800 -sizy0=600 -maxfps0=0 -initts0=0 -title1=688I Hunter Killer -path1=D:\Games\688\688I_HK.EXE -module1= -opengllib1= -ver1=0 -coord1=0 -flag1=-937950686 -flagg1=134217728 -flagh1=32788 -flagi1=0 -tflag1=3 -initx1=0 -inity1=0 -minx1=0 -miny1=0 -maxx1=0 -maxy1=0 -posx1=50 -posy1=50 -sizx1=1200 -sizy1=900 -maxfps1=0 -initts1=0 -title2=Abomination the Nemesis Project -path2=D:\Games\Abomination\Abomb.exe -module2= -opengllib2= -ver2=0 -coord2=0 -flag2=134217762 -flagg2=134217728 -flagh2=20 -flagi2=0 -tflag2=67 -initx2=0 -inity2=0 -minx2=0 -miny2=0 -maxx2=0 -maxy2=0 -posx2=50 -posy2=50 -sizx2=800 -sizy2=600 -maxfps2=0 -initts2=0 -title3=Balls of Steel -path3=D:\Games\Balls of Steel\bos.exe -module3=duke.ddp mutation.ddp -opengllib3= -ver3=0 -coord3=0 -flag3=167772192 -flagg3=202375169 -flagh3=20 -flagi3=0 -tflag3=263 -initx3=0 -inity3=0 -minx3=0 -miny3=0 -maxx3=0 -maxy3=0 -posx3=50 -posy3=50 -sizx3=800 -sizy3=600 -maxfps3=0 -initts3=0 -title4=Barrage -path4=D:\Games\Barrage\SRC\BARRAGE.EXE -module4= -opengllib4= -ver4=0 -coord4=0 -flag4=142606368 -flagg4=134217728 -flagh4=8212 -flagi4=0 -tflag4=7 -initx4=0 -inity4=0 -minx4=0 -miny4=0 -maxx4=0 -maxy4=0 -posx4=50 -posy4=50 -sizx4=800 -sizy4=600 -maxfps4=0 -initts4=0 -title5=Carnivores -path5=D:\Games\Carnivores\HUNTSOFT.EXE -module5= -opengllib5= -ver5=0 -coord5=0 -flag5=671088674 -flagg5=135266304 -flagh5=20 -flagi5=0 -tflag5=64 -initx5=0 -inity5=0 -minx5=0 -miny5=0 -maxx5=0 -maxy5=0 -posx5=50 -posy5=50 -sizx5=800 -sizy5=600 -maxfps5=0 -initts5=0 -title6=Crazy Frog Racer -path6=D:\Games\CrazyFrog\CRAZY.EXE -module6= -opengllib6= -ver6=8 -coord6=0 -flag6=134217762 -flagg6=134217729 -flagh6=20 -flagi6=0 -tflag6=64 -initx6=0 -inity6=0 -minx6=0 -miny6=0 -maxx6=0 -maxy6=0 -posx6=50 -posy6=50 -sizx6=800 -sizy6=600 -maxfps6=0 -initts6=0 -title7=Crazy Taxy -path7=D:\Games\Crazy_Taxi\Crazy Taxi PC Version\crazy_taxi_pc.exe -module7= -opengllib7= -ver7=0 -coord7=0 -flag7=671219744 -flagg7=134217728 -flagh7=20 -flagi7=0 -tflag7=66 -initx7=0 -inity7=0 -minx7=0 -miny7=0 -maxx7=0 -maxy7=0 -posx7=50 -posy7=50 -sizx7=800 -sizy7=600 -maxfps7=0 -initts7=0 -title8=Dark Angael -path8=D:\Games\Dark Angael\GAME.EXE -module8= -opengllib8= -ver8=0 -coord8=0 -flag8=134217762 -flagg8=134217728 -flagh8=20 -flagi8=0 -tflag8=0 -initx8=0 -inity8=0 -minx8=0 -miny8=0 -maxx8=0 -maxy8=0 -posx8=50 -posy8=50 -sizx8=800 -sizy8=600 -maxfps8=0 -initts8=0 -title9=Dark Colony -path9=D:\Games\Dark Colony\DCOLONY\DC.EXE -module9= -opengllib9= -ver9=0 -coord9=0 -flag9=134217762 -flagg9=134217728 -flagh9=20 -flagi9=0 -tflag9=0 -initx9=0 -inity9=0 -minx9=0 -miny9=0 -maxx9=0 -maxy9=0 -posx9=50 -posy9=50 -sizx9=800 -sizy9=600 -maxfps9=0 -initts9=0 -title10=Dark Judgement -path10=D:\Games\Dark Judgement\Dark Judgement.EXE -module10= -opengllib10= -ver10=0 -coord10=0 -flag10=134217826 -flagg10=134217728 -flagh10=20 -flagi10=0 -tflag10=3 -initx10=0 -inity10=0 -minx10=0 -miny10=0 -maxx10=0 -maxy10=0 -posx10=50 -posy10=50 -sizx10=800 -sizy10=600 -maxfps10=0 -initts10=0 -title11=Dark Vengeance -path11=D:\Games\dark_vengeance\dv.exe -module11= -opengllib11= -ver11=0 -coord11=0 -flag11=142606386 -flagg11=134217728 -flagh11=8212 -flagi11=0 -tflag11=3 -initx11=0 -inity11=0 -minx11=0 -miny11=0 -maxx11=800 -maxy11=600 -posx11=50 -posy11=50 -sizx11=800 -sizy11=600 -maxfps11=0 -initts11=0 -title12=Descent 3 -path12=D:\Games\Descent_3\Descent 3.exe -module12= -opengllib12= -ver12=0 -coord12=0 -flag12=134217760 -flagg12=134348801 -flagh12=4 -flagi12=0 -tflag12=0 -initx12=0 -inity12=0 -minx12=0 -miny12=0 -maxx12=0 -maxy12=0 -posx12=50 -posy12=50 -sizx12=800 -sizy12=600 -maxfps12=0 -initts12=0 -title13=Descent 3 main -path13=D:\Games\Descent_3\main.exe -module13= -opengllib13= -ver13=0 -coord13=0 -flag13=771891234 -flagg13=201457664 -flagh13=8212 -flagi13=0 -tflag13=3 -initx13=0 -inity13=0 -minx13=0 -miny13=0 -maxx13=0 -maxy13=0 -posx13=50 -posy13=50 -sizx13=800 -sizy13=600 -maxfps13=0 -initts13=0 -title14=Duckman -path14=D:\Games\duckman\DUCKMAN.EXE -module14= -opengllib14= -ver14=0 -coord14=0 -flag14=402653218 -flagg14=134217728 -flagh14=1044 -flagi14=0 -tflag14=259 -initx14=0 -inity14=0 -minx14=0 -miny14=0 -maxx14=0 -maxy14=0 -posx14=50 -posy14=50 -sizx14=800 -sizy14=600 -maxfps14=0 -initts14=0 -title15=Dweep -path15=D:\Games\dweep\Dweep.exe -module15= -opengllib15= -ver15=0 -coord15=0 -flag15=134234146 -flagg15=134283264 -flagh15=20 -flagi15=0 -tflag15=0 -initx15=0 -inity15=0 -minx15=0 -miny15=0 -maxx15=0 -maxy15=0 -posx15=50 -posy15=50 -sizx15=800 -sizy15=600 -maxfps15=0 -initts15=2 -title16=Eliminator -path16=D:\Games\eliminat\Eliminator.exe -module16= -opengllib16= -ver16=0 -coord16=0 -flag16=134217760 -flagg16=134217728 -flagh16=1044 -flagi16=0 -tflag16=3 -initx16=0 -inity16=0 -minx16=0 -miny16=0 -maxx16=0 -maxy16=0 -posx16=800 -posy16=600 -sizx16=400 -sizy16=300 -maxfps16=0 -initts16=0 -title17=EMPIRES.EXE -path17=D:\Games\Age of Empires\EMPIRES.EXE -module17= -opengllib17= -ver17=0 -coord17=0 -flag17=134217762 -flagg17=134217728 -flagh17=20 -flagi17=0 -tflag17=64 -initx17=0 -inity17=0 -minx17=0 -miny17=0 -maxx17=0 -maxy17=0 -posx17=50 -posy17=50 -sizx17=800 -sizy17=600 -maxfps17=0 -initts17=0 -title18=EPIC40K.EXE -path18=D:\Games\war_hammer_final_liberation\EPIC40K.EXE -module18= -opengllib18= -ver18=0 -coord18=0 -flag18=134217762 -flagg18=135266304 -flagh18=20 -flagi18=0 -tflag18=3 -initx18=0 -inity18=0 -minx18=0 -miny18=0 -maxx18=0 -maxy18=0 -posx18=50 -posy18=50 -sizx18=800 -sizy18=600 -maxfps18=0 -initts18=0 -title19=Fable - The Lost Chapters -path19=D:\Games\Fable - The Lost Chapters\Fable.exe -module19= -opengllib19= -ver19=9 -coord19=1 -flag19=134217760 -flagg19=201457672 -flagh19=20 -flagi19=0 -tflag19=258 -initx19=0 -inity19=0 -minx19=0 -miny19=0 -maxx19=0 -maxy19=0 -posx19=50 -posy19=50 -sizx19=800 -sizy19=600 -maxfps19=0 -initts19=0 -title20=Fighting Forces -path20=D:\Games\Fighting Forces\FFORCE.EXE -module20= -opengllib20= -ver20=0 -coord20=0 -flag20=134217760 -flagg20=671088640 -flagh20=3092 -flagi20=0 -tflag20=514 -initx20=0 -inity20=0 -minx20=0 -miny20=0 -maxx20=0 -maxy20=0 -posx20=50 -posy20=50 -sizx20=800 -sizy20=600 -maxfps20=0 -initts20=0 -title21=Final Fighter -path21=D:\Games\Final Fighter\FinalFighter.exe -module21= -opengllib21= -ver21=0 -coord21=0 -flag21=939524128 -flagg21=135266305 -flagh21=4 -flagi21=0 -tflag21=512 -initx21=0 -inity21=0 -minx21=0 -miny21=0 -maxx21=0 -maxy21=0 -posx21=50 -posy21=50 -sizx21=800 -sizy21=600 -maxfps21=0 -initts21=0 -title22=Final Odyssey -path22=D:\Games\Final odyssey\FinalOdy.exe -module22= -opengllib22= -ver22=0 -coord22=0 -flag22=134217760 -flagg22=134217728 -flagh22=4 -flagi22=0 -tflag22=64 -initx22=0 -inity22=0 -minx22=0 -miny22=0 -maxx22=0 -maxy22=0 -posx22=50 -posy22=50 -sizx22=800 -sizy22=600 -maxfps22=0 -initts22=0 -title23=Gangsters 2 -path23=D:\Games\Gangsters 2\Gangsters2.exe -module23= -opengllib23= -ver23=0 -coord23=0 -flag23=134217762 -flagg23=134217728 -flagh23=20 -flagi23=0 -tflag23=2 -initx23=0 -inity23=0 -minx23=0 -miny23=0 -maxx23=0 -maxy23=0 -posx23=50 -posy23=50 -sizx23=800 -sizy23=600 -maxfps23=0 -initts23=0 -title24=Gex -path24=D:\Games\gex\GEX.EXE -module24= -opengllib24= -ver24=0 -coord24=0 -flag24=134217761 -flagg24=134217728 -flagh24=20 -flagi24=0 -tflag24=66 -initx24=0 -inity24=0 -minx24=0 -miny24=0 -maxx24=0 -maxy24=0 -posx24=50 -posy24=50 -sizx24=800 -sizy24=600 -maxfps24=0 -initts24=0 -title25=Hard Truck - Road to Victory -path25=C:\Hard Truck\HTruck.exe -module25= -opengllib25= -ver25=0 -coord25=0 -flag25=134217760 -flagg25=134217728 -flagh25=2068 -flagi25=0 -tflag25=0 -initx25=0 -inity25=0 -minx25=0 -miny25=0 -maxx25=0 -maxy25=0 -posx25=50 -posy25=50 -sizx25=800 -sizy25=600 -maxfps25=0 -initts25=0 -title26=Hellcopter -path26=D:\Games\Hellcopter\HCopter.exe -module26= -opengllib26= -ver26=0 -coord26=0 -flag26=134217760 -flagg26=134217728 -flagh26=1044 -flagi26=0 -tflag26=512 -initx26=0 -inity26=0 -minx26=0 -miny26=0 -maxx26=0 -maxy26=0 -posx26=50 -posy26=50 -sizx26=800 -sizy26=600 -maxfps26=0 -initts26=0 -title27=Heroes of Might & Magic 2 Gold -path27=D:\Games\heroes2gold\HEROES2W.EXE -module27= -opengllib27= -ver27=0 -coord27=0 -flag27=134217730 -flagg27=143654912 -flagh27=20 -flagi27=0 -tflag27=770 -initx27=0 -inity27=0 -minx27=0 -miny27=0 -maxx27=0 -maxy27=0 -posx27=50 -posy27=50 -sizx27=800 -sizy27=600 -maxfps27=0 -initts27=0 -title28=Hooligans Storm over Europe -path28=D:\Games\Hooligans\Hooligans.exe -module28= -opengllib28= -ver28=0 -coord28=0 -flag28=134742048 -flagg28=202375168 -flagh28=20 -flagi28=0 -tflag28=259 -initx28=0 -inity28=0 -minx28=0 -miny28=0 -maxx28=0 -maxy28=0 -posx28=50 -posy28=50 -sizx28=800 -sizy28=600 -maxfps28=0 -initts28=0 -title29=Imperialism -path29=D:\Games\Imperialism\Imperialism.exe -module29= -opengllib29= -ver29=0 -coord29=0 -flag29=679485474 -flagg29=134217728 -flagh29=32788 -flagi29=0 -tflag29=3 -initx29=0 -inity29=0 -minx29=0 -miny29=0 -maxx29=0 -maxy29=0 -posx29=50 -posy29=50 -sizx29=1200 -sizy29=900 -maxfps29=0 -initts29=0 -title30=Mechwarrior 3 -path30=D:\Games\Mechwarrior 3 (full)\Mech3.exe -module30= -opengllib30= -ver30=0 -coord30=0 -flag30=671096866 -flagg30=134217728 -flagh30=20 -flagi30=0 -tflag30=0 -initx30=0 -inity30=0 -minx30=0 -miny30=0 -maxx30=0 -maxy30=0 -posx30=50 -posy30=50 -sizx30=800 -sizy30=600 -maxfps30=0 -initts30=0 -title31=Raiden II -path31=D:\Games\raiden2\RAIDENII.EXE -module31= -opengllib31= -ver31=0 -coord31=1 -flag31=134217762 -flagg31=134217728 -flagh31=20 -flagi31=0 -tflag31=0 -initx31=0 -inity31=0 -minx31=0 -miny31=0 -maxx31=0 -maxy31=0 -posx31=50 -posy31=50 -sizx31=800 -sizy31=600 -maxfps31=0 -initts31=0 -title32=Rapanui -path32=D:\Games\Rapanui\Rapanui.exe -module32= -opengllib32= -ver32=0 -coord32=0 -flag32=134217762 -flagg32=134217728 -flagh32=20 -flagi32=0 -tflag32=0 -initx32=0 -inity32=0 -minx32=0 -miny32=0 -maxx32=0 -maxy32=0 -posx32=50 -posy32=50 -sizx32=800 -sizy32=600 -maxfps32=0 -initts32=0 -title33=Silent Hunter II (shell) -path33=D:\Games\Silent Hunter II\Shell\Shell.exe -module33= -opengllib33= -ver33=0 -coord33=0 -flag33=402653221 -flagg33=135266304 -flagh33=20 -flagi33=0 -tflag33=3 -initx33=0 -inity33=0 -minx33=0 -miny33=0 -maxx33=800 -maxy33=600 -posx33=50 -posy33=50 -sizx33=800 -sizy33=600 -maxfps33=0 -initts33=0 -title34=Silent Hunter II (sim) -path34=D:\Games\Silent Hunter II\Sim\Sim.exe -module34= -opengllib34= -ver34=0 -coord34=0 -flag34=134217780 -flagg34=134217728 -flagh34=20 -flagi34=0 -tflag34=0 -initx34=400 -inity34=300 -minx34=0 -miny34=0 -maxx34=800 -maxy34=600 -posx34=50 -posy34=50 -sizx34=800 -sizy34=600 -maxfps34=0 -initts34=0 -title35=The Sims -path35=D:\Games\sims\Sims.exe -module35= -opengllib35= -ver35=0 -coord35=0 -flag35=679616546 -flagg35=134217728 -flagh35=84 -flagi35=0 -tflag35=67 -initx35=0 -inity35=0 -minx35=0 -miny35=0 -maxx35=0 -maxy35=0 -posx35=50 -posy35=50 -sizx35=800 -sizy35=600 -maxfps35=0 -initts35=0 -title36=Tomb Raider - The Last Revelation -path36=D:\Games\Tomb Raider - The Last Revelation\tomb4.exe -module36= -opengllib36= -ver36=0 -coord36=0 -flag36=134217826 -flagg36=134217728 -flagh36=20 -flagi36=0 -tflag36=3 -initx36=0 -inity36=0 -minx36=0 -miny36=0 -maxx36=0 -maxy36=0 -posx36=50 -posy36=50 -sizx36=800 -sizy36=600 -maxfps36=0 -initts36=0 -title37=TOMB2.EXE -path37=D:\Games\Tomb Raider 2\TOMB2.EXE -module37= -opengllib37= -ver37=0 -coord37=0 -flag37=134217760 -flagg37=201326592 -flagh37=2068 -flagi37=0 -tflag37=0 -initx37=0 -inity37=0 -minx37=0 -miny37=0 -maxx37=0 -maxy37=0 -posx37=50 -posy37=50 -sizx37=800 -sizy37=600 -maxfps37=0 -initts37=0 -title38=wa.exe -path38=D:\Games\worms_arma\Worms_2_Armageddon\wa.exe -module38= -opengllib38= -ver38=0 -coord38=0 -flag38=713031712 -flagg38=142606336 -flagh38=20 -flagi38=0 -tflag38=3 -initx38=0 -inity38=0 -minx38=0 -miny38=0 -maxx38=0 -maxy38=0 -posx38=50 -posy38=50 -sizx38=800 -sizy38=600 -maxfps38=0 -initts38=0 -title39=Western Front -path39=D:\Games\Western Front\wf.exe -module39= -opengllib39= -ver39=0 -coord39=0 -flag39=679477282 -flagg39=135266304 -flagh39=16404 -flagi39=0 -tflag39=0 -initx39=0 -inity39=0 -minx39=0 -miny39=0 -maxx39=0 -maxy39=0 -posx39=50 -posy39=50 -sizx39=800 -sizy39=600 -maxfps39=0 -initts39=0 -title40=G-Nome -path40=D:\Games\G-Nome\G-NOME.EXE -module40= -opengllib40= -ver40=0 -coord40=0 -flag40=-1433399262 -flagg40=201326592 -flagh40=33300 -flagi40=0 -tflag40=3 -initx40=0 -inity40=0 -minx40=0 -miny40=0 -maxx40=0 -maxy40=0 -posx40=250 -posy40=250 -sizx40=800 -sizy40=600 -maxfps40=0 -initts40=0 -title41=GeneRally -path41=D:\Games\generally105\GeneRally.exe -module41= -opengllib41= -ver41=7 -coord41=0 -flag41=134234146 -flagg41=135266305 -flagh41=20 -flagi41=0 -tflag41=0 -initx41=0 -inity41=0 -minx41=0 -miny41=0 -maxx41=0 -maxy41=0 -posx41=50 -posy41=50 -sizx41=800 -sizy41=600 -maxfps41=0 -initts41=0 -title42=Warlords 3 -path42=D:\Games\Warlords3\Darklord.exe -module42= -opengllib42= -ver42=0 -coord42=0 -flag42=-2013249502 -flagg42=135266304 -flagh42=20 -flagi42=0 -tflag42=0 -initx42=0 -inity42=0 -minx42=0 -miny42=0 -maxx42=0 -maxy42=0 -posx42=50 -posy42=50 -sizx42=800 -sizy42=600 -maxfps42=0 -initts42=0 -title43=Tachyon The Fringe -path43=D:\Games\TachyonTheFringe\space.exe -module43= -opengllib43= -ver43=0 -coord43=0 -flag43=151011364 -flagg43=134217728 -flagh43=20 -flagi43=0 -tflag43=3 -initx43=0 -inity43=0 -minx43=0 -miny43=0 -maxx43=0 -maxy43=0 -posx43=50 -posy43=50 -sizx43=800 -sizy43=600 -maxfps43=0 -initts43=0 -title44=Tanktics -path44=D:\Games\Tanktics\tanktics.exe -module44= -opengllib44= -ver44=0 -coord44=1 -flag44=671088674 -flagg44=134217728 -flagh44=20 -flagi44=0 -tflag44=259 -initx44=0 -inity44=0 -minx44=0 -miny44=0 -maxx44=0 -maxy44=0 -posx44=50 -posy44=50 -sizx44=800 -sizy44=600 -maxfps44=0 -initts44=0 -title45=Nightmare Ned -path45=D:\Games\Ned\NITENED.EXE -module45= -opengllib45= -ver45=0 -coord45=0 -flag45=134217762 -flagg45=134217728 -flagh45=20 -flagi45=0 -tflag45=3 -initx45=0 -inity45=0 -minx45=0 -miny45=0 -maxx45=0 -maxy45=0 -posx45=50 -posy45=50 -sizx45=800 -sizy45=600 -maxfps45=0 -initts45=0 -title46=Imperialism II -path46=D:\Games\imperialism_2\imperialism II.exe -module46= -opengllib46= -ver46=0 -coord46=0 -flag46=142614562 -flagg46=470810688 -flagh46=20 -flagi46=0 -tflag46=67 -initx46=0 -inity46=0 -minx46=0 -miny46=0 -maxx46=0 -maxy46=0 -posx46=50 -posy46=50 -sizx46=800 -sizy46=600 -maxfps46=0 -initts46=0 -title47=age3.exe -path47=D:\Games\Age of Empires III\age3.exe -module47= -opengllib47= -ver47=0 -coord47=0 -flag47=-394125278 -flagg47=134217728 -flagh47=20 -flagi47=0 -tflag47=64 -initx47=0 -inity47=0 -minx47=0 -miny47=0 -maxx47=0 -maxy47=0 -posx47=50 -posy47=50 -sizx47=800 -sizy47=600 -maxfps47=0 -initts47=0 -title48=road.exe -path48=D:\Games\Vangers\road.exe -module48= -opengllib48= -ver48=1 -coord48=0 -flag48=134217762 -flagg48=134217728 -flagh48=20 -flagi48=0 -tflag48=323 -initx48=0 -inity48=0 -minx48=0 -miny48=0 -maxx48=0 -maxy48=0 -posx48=50 -posy48=50 -sizx48=800 -sizy48=600 -maxfps48=0 -initts48=0 -[window] -posx=1435 -posy=210 -sizx=320 -sizy=420 diff --git a/build/dxwnd.3.ini b/build/dxwnd.3.ini deleted file mode 100644 index 00c9d6c..0000000 --- a/build/dxwnd.3.ini +++ /dev/null @@ -1,167 +0,0 @@ -[window] -posx=1452 -posy=365 -sizx=320 -sizy=514 -[target] -title0=Rayman 2 Demo -path0=D:\Games\Rayman2Demo\Rayman2Demo.exe -module0= -opengllib0= -ver0=1 -coord0=0 -flag0=402653217 -flagg0=1210056704 -flagh0=2097172 -flagi0=0 -tflag0=64 -initx0=0 -inity0=0 -minx0=0 -miny0=0 -maxx0=0 -maxy0=0 -posx0=50 -posy0=50 -sizx0=800 -sizy0=600 -maxfps0=0 -initts0=0 -title1=Mirror's Edge -path1=D:\Games\Mirror's Edge\Binaries\MirrorsEdge.exe -module1= -opengllib1= -ver1=0 -coord1=0 -flag1=-2013265882 -flagg1=1207959552 -flagh1=2097172 -flagi1=0 -tflag1=5 -initx1=0 -inity1=0 -minx1=0 -miny1=0 -maxx1=0 -maxy1=0 -posx1=50 -posy1=50 -sizx1=800 -sizy1=600 -maxfps1=0 -initts1=6 -title2=LastHalfWin.exe -path2=D:\Games\Last Half Of Darkness\LastHalfWin.exe -module2= -opengllib2= -ver2=1 -coord2=0 -flag2=134217760 -flagg2=1207959552 -flagh2=4 -flagi2=0 -tflag2=512 -initx2=0 -inity2=0 -minx2=0 -miny2=0 -maxx2=0 -maxy2=0 -posx2=50 -posy2=50 -sizx2=800 -sizy2=600 -maxfps2=0 -initts2=0 -title3=DOOM95.EXE -path3=D:\Games\Doom95i\DOOM95.EXE -module3= -opengllib3= -ver3=0 -coord3=0 -flag3=134217762 -flagg3=1207959552 -flagh3=20 -flagi3=0 -tflag3=512 -initx3=0 -inity3=0 -minx3=0 -miny3=0 -maxx3=0 -maxy3=0 -posx3=50 -posy3=50 -sizx3=800 -sizy3=600 -maxfps3=0 -initts3=0 -title4=CNC3.exe -path4=D:\Games\Command & Conquer 3\CNC3.exe -module4= -opengllib4= -ver4=9 -coord4=0 -flag4=134217762 -flagg4=1207959552 -flagh4=20 -flagi4=0 -tflag4=512 -initx4=0 -inity4=0 -minx4=0 -miny4=0 -maxx4=0 -maxy4=0 -posx4=50 -posy4=50 -sizx4=800 -sizy4=600 -maxfps4=0 -initts4=0 -title5=Div.exe -path5=D:\Games\Beyond Divinity\Div.exe -module5= -opengllib5= -ver5=0 -coord5=0 -flag5=134217762 -flagg5=1207959552 -flagh5=20 -flagi5=0 -tflag5=512 -initx5=0 -inity5=0 -minx5=0 -miny5=0 -maxx5=0 -maxy5=0 -posx5=50 -posy5=50 -sizx5=800 -sizy5=600 -maxfps5=0 -initts5=0 -title6=martian gothic.exe -path6=D:\Games\Martian Gothic\martian gothic.exe -module6= -opengllib6= -ver6=7 -coord6=0 -flag6=201326626 -flagg6=1208090624 -flagh6=276 -flagi6=0 -tflag6=263 -initx6=0 -inity6=0 -minx6=0 -miny6=0 -maxx6=0 -maxy6=0 -posx6=50 -posy6=50 -sizx6=800 -sizy6=600 -maxfps6=0 -initts6=0 diff --git a/build/dxwnd.dll b/build/dxwnd.dll index c932b2e..82a5525 100644 --- a/build/dxwnd.dll +++ b/build/dxwnd.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5c0d2dcaecf0148f5d3ef79ca65a40148ad4b38921a6705d6dcd736f66a71c74 -size 425984 +oid sha256:cf9c7d5fd45f8f880656efab5c5db5ef3a0a8e74942d2b2418bf5a49f8fab39b +size 426496 diff --git a/build/dxwnd.dll.release b/build/dxwnd.dll.release deleted file mode 100644 index ac21189..0000000 Binary files a/build/dxwnd.dll.release and /dev/null differ diff --git a/build/dxwnd.exe b/build/dxwnd.exe index 6dcb275..ba10d1d 100644 --- a/build/dxwnd.exe +++ b/build/dxwnd.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bfed2b8cff2d31bff7391b371e2913378ac855e390fe9dbd2c1c6384eef71963 -size 532480 +oid sha256:97bc60a26fa1ffe141ac022b2baadea04bef5c3b2d9072c19d606d61261266bc +size 532992 diff --git a/build/dxwnd.ini b/build/dxwnd.ini index e8f8d27..b3f5bec 100644 --- a/build/dxwnd.ini +++ b/build/dxwnd.ini @@ -22,16 +22,16 @@ sizx0=800 sizy0=600 maxfps0=0 initts0=0 -title1=Dungeon Keeper 2 (GOG) -path1=D:\Games\Dungeon Keeper 2 (GOG)\DKII.EXE +title1=Duckman +path1=D:\Games\Duckman\DUCKMAN.EXE module1= opengllib1= ver1=0 coord1=0 -flag1=136331298 -flagg1=1241513984 +flag1=134217762 +flagg1=1209008128 flagh1=20 -flagi1=0 +flagi1=4 tflag1=259 initx1=0 inity1=0 @@ -45,16 +45,16 @@ sizx1=800 sizy1=600 maxfps1=0 initts1=0 -title2=Heroes of Might and Magic IV -path2=D:\Games\Heroes of Might and Magic IV\heroes4.exe +title2=Dungeon Keeper 2 (GOG) +path2=D:\Games\Dungeon Keeper 2 (GOG)\DKII.EXE module2= opengllib2= ver2=0 -coord2=2 -flag2=671350818 -flagg2=1207959568 -flagh2=-2147418092 -flagi2=1 +coord2=0 +flag2=136331298 +flagg2=1241513984 +flagh2=20 +flagi2=0 tflag2=259 initx2=0 inity2=0 @@ -68,17 +68,17 @@ sizx2=800 sizy2=600 maxfps2=0 initts2=0 -title3=Motocross Madness (DEMO) -path3=D:\Games\Motocross Madness Trial\mcm.exe +title3=Empire Earth +path3=D:\Games\Empire Earth\Empire Earth.exe module3= opengllib3= ver3=0 coord3=0 -flag3=134217760 -flagg3=1207959552 -flagh3=20 +flag3=687866016 +flagg3=201326848 +flagh3=65620 flagi3=0 -tflag3=0 +tflag3=263 initx3=0 inity3=0 minx3=0 @@ -91,17 +91,17 @@ sizx3=800 sizy3=600 maxfps3=0 initts3=0 -title4=Project Nomads (DEMO) -path4=D:\Games\Project Nomads Demo\bin\win32\nomads.exe +title4=Grand Prix World +path4=D:\Games\Grand Prix World\gpw.exe module4= opengllib4= -ver4=8 +ver4=0 coord4=0 -flag4=-1476394974 -flagg4=1207959808 -flagh4=4 -flagi4=0 -tflag4=274 +flag4=134217762 +flagg4=1207959680 +flagh4=84 +flagi4=4 +tflag4=0 initx4=0 inity4=0 minx4=0 @@ -114,17 +114,17 @@ sizx4=800 sizy4=600 maxfps4=0 initts4=0 -title5=Shadows of the Empire (DEMO) -path5=D:\Games\Shadows of the Empire\shadows.exe +title5=Hearts of Iron 2 +path5=D:\Games\Hearts of Iron 2\HoI2.exe module5= opengllib5= ver5=0 coord5=2 -flag5=134479906 +flag5=939526179 flagg5=1207959568 -flagh5=33554452 -flagi5=0 -tflag5=274 +flagh5=32788 +flagi5=2 +tflag5=2 initx5=0 inity5=0 minx5=0 @@ -137,17 +137,17 @@ sizx5=800 sizy5=600 maxfps5=0 initts5=0 -title6=Tomb Raider 4 (DEMO) -path6=D:\Games\Tomb Raider - The Last Revelation (Demo)\tomb4.exe +title6=Heroes of Might and Magic IV +path6=D:\Games\Heroes of Might and Magic IV\heroes4.exe module6= opengllib6= -ver6=7 -coord6=0 -flag6=134217760 -flagg6=1207959552 -flagh6=20 -flagi6=0 -tflag6=258 +ver6=0 +coord6=2 +flag6=671350818 +flagg6=1207959568 +flagh6=-2147418092 +flagi6=1 +tflag6=259 initx6=0 inity6=0 minx6=0 @@ -160,13 +160,13 @@ sizx6=800 sizy6=600 maxfps6=0 initts6=0 -title7=Tomb Raider II -path7=D:\Games\Tomb Raider II\Tomb2.exe +title7=Motocross Madness (DEMO) +path7=D:\Games\Motocross Madness Trial\mcm.exe module7= opengllib7= ver7=0 coord7=0 -flag7=671088674 +flag7=134217760 flagg7=1207959552 flagh7=20 flagi7=0 @@ -183,17 +183,17 @@ sizx7=800 sizy7=600 maxfps7=0 initts7=0 -title8=Tomb Raider II Gold (DEMO) -path8=D:\Games\Tomb Raider II Gold (Demo)\Tomb2.exe +title8=Praetorians +path8=D:\games\Praetorians\Praetorians.exe module8= opengllib8= ver8=0 -coord8=2 -flag8=671088674 -flagg8=1224736784 +coord8=0 +flag8=134217760 +flagg8=1207959552 flagh8=20 -flagi8=0 -tflag8=258 +flagi8=4 +tflag8=3 initx8=0 inity8=0 minx8=0 @@ -206,17 +206,17 @@ sizx8=800 sizy8=600 maxfps8=0 initts8=0 -title9=Tomb Raider III -path9=D:\Games\Tomb Raider III\tomb3.exe +title9=Project Nomads (DEMO) +path9=D:\Games\Project Nomads Demo\bin\win32\nomads.exe module9= opengllib9= -ver9=0 -coord9=2 -flag9=134217760 -flagg9=1241514000 -flagh9=20 +ver9=8 +coord9=0 +flag9=-1476394974 +flagg9=1207959808 +flagh9=4 flagi9=0 -tflag9=322 +tflag9=274 initx9=0 inity9=0 minx9=0 @@ -229,17 +229,17 @@ sizx9=800 sizy9=600 maxfps9=0 initts9=0 -title10=Virtua Fighter 2 (DEMO) -path10=D:\Games\vf2_demo\VF2DEMO.EXE +title10=Rayman 2 Demo +path10=D:\Games\Rayman2Demo\Rayman2Demo.exe module10= opengllib10= -ver10=0 +ver10=7 coord10=0 -flag10=939524131 -flagg10=1207959664 -flagh10=20 +flag10=402653219 +flagg10=1208025088 +flagh10=2097172 flagi10=0 -tflag10=1 +tflag10=259 initx10=0 inity10=0 minx10=0 @@ -251,18 +251,18 @@ posy10=50 sizx10=800 sizy10=600 maxfps10=0 -initts10=0 -title11=Virtua Fighter PC -path11=D:\Games\vfpc\VFPC.EXE +initts10=4 +title11=Shadows of the Empire (DEMO) +path11=D:\Games\Shadows of the Empire\shadows.exe module11= opengllib11= ver11=0 -coord11=0 -flag11=402915362 -flagg11=1224736784 -flagh11=33562644 +coord11=2 +flag11=134479906 +flagg11=1207959568 +flagh11=33554452 flagi11=0 -tflag11=3 +tflag11=274 initx11=0 inity11=0 minx11=0 @@ -275,17 +275,17 @@ sizx11=800 sizy11=600 maxfps11=0 initts11=0 -title12=Wargasm -path12=D:\Games\Wargasm\tank.exe +title12=StarCraft +path12=D:\Games\Starcraft\StarCraft.exe module12= opengllib12= ver12=0 -coord12=2 -flag12=687865888 -flagg12=1207959568 -flagh12=65556 -flagi12=0 -tflag12=2 +coord12=0 +flag12=134217762 +flagg12=134283264 +flagh12=20 +flagi12=8 +tflag12=64 initx12=0 inity12=0 minx12=0 @@ -298,15 +298,15 @@ sizx12=800 sizy12=600 maxfps12=0 initts12=0 -title13=Warlords Battlecry II (DEMO) -path13=D:\Games\Warlords Battlecry II Demo\Battlecry II Demo.exe +title13=Tomb Raider 4 (DEMO) +path13=D:\Games\Tomb Raider - The Last Revelation (Demo)\tomb4.exe module13= opengllib13= -ver13=0 -coord13=2 -flag13=134217762 -flagg13=1207959568 -flagh13=22 +ver13=7 +coord13=0 +flag13=134217760 +flagg13=1207959552 +flagh13=20 flagi13=0 tflag13=258 initx13=0 @@ -321,17 +321,17 @@ sizx13=800 sizy13=600 maxfps13=0 initts13=0 -title14=Zax the Alien Hunter (DEMO) -path14=D:\Games\ZaxDemo\Zax.exe +title14=Tomb Raider II +path14=D:\Games\Tomb Raider II\Tomb2.exe module14= opengllib14= ver14=0 -coord14=2 -flag14=-2011168734 -flagg14=1209008144 +coord14=0 +flag14=671088674 +flagg14=1207959552 flagh14=20 flagi14=0 -tflag14=258 +tflag14=0 initx14=0 inity14=0 minx14=0 @@ -344,17 +344,17 @@ sizx14=800 sizy14=600 maxfps14=0 initts14=0 -title15=Hearts of Iron 2 -path15=D:\Games\Hearts of Iron 2\HoI2.exe +title15=Tomb Raider II Gold (DEMO) +path15=D:\Games\Tomb Raider II Gold (Demo)\Tomb2.exe module15= opengllib15= ver15=0 coord15=2 -flag15=939526179 -flagg15=1207959568 -flagh15=32788 -flagi15=2 -tflag15=2 +flag15=671088674 +flagg15=1224736784 +flagh15=20 +flagi15=0 +tflag15=258 initx15=0 inity15=0 minx15=0 @@ -367,17 +367,17 @@ sizx15=800 sizy15=600 maxfps15=0 initts15=0 -title16=Rayman 2 Demo -path16=D:\Games\Rayman2Demo\Rayman2Demo.exe +title16=Tomb Raider III +path16=D:\Games\Tomb Raider III\tomb3.exe module16= opengllib16= -ver16=7 -coord16=0 -flag16=402653219 -flagg16=1208025088 -flagh16=2097172 +ver16=0 +coord16=2 +flag16=134217760 +flagg16=1241514000 +flagh16=20 flagi16=0 -tflag16=259 +tflag16=322 initx16=0 inity16=0 minx16=0 @@ -389,18 +389,18 @@ posy16=50 sizx16=800 sizy16=600 maxfps16=0 -initts16=4 -title17=Empire Earth -path17=D:\Games\Empire Earth\Empire Earth.exe +initts16=0 +title17=Virtua Fighter 2 (DEMO) +path17=D:\Games\vf2_demo\VF2DEMO.EXE module17= opengllib17= ver17=0 coord17=0 -flag17=671105057 -flagg17=134217744 -flagh17=84 +flag17=939524131 +flagg17=1207959664 +flagh17=20 flagi17=0 -tflag17=3 +tflag17=1 initx17=0 inity17=0 minx17=0 @@ -413,8 +413,238 @@ sizx17=800 sizy17=600 maxfps17=0 initts17=0 +title18=Virtua Fighter PC +path18=D:\Games\Virtua Fighter\VFPC.EXE +module18= +opengllib18= +ver18=0 +coord18=0 +flag18=402653218 +flagg18=1224736784 +flagh18=33562644 +flagi18=0 +tflag18=291 +initx18=0 +inity18=0 +minx18=0 +miny18=0 +maxx18=0 +maxy18=0 +posx18=50 +posy18=50 +sizx18=800 +sizy18=600 +maxfps18=0 +initts18=0 +title19=Warcraft 2 Battlenet Ed +path19=D:\Games\Warcraft 2 Battlenet Ed\Warcraft II BNE.exe +module19= +opengllib19= +ver19=0 +coord19=0 +flag19=134217762 +flagg19=1210122240 +flagh19=148 +flagi19=12 +tflag19=0 +initx19=0 +inity19=0 +minx19=0 +miny19=0 +maxx19=0 +maxy19=0 +posx19=50 +posy19=50 +sizx19=800 +sizy19=600 +maxfps19=0 +initts19=0 +title20=Wargasm +path20=D:\Games\Wargasm\tank.exe +module20= +opengllib20= +ver20=0 +coord20=2 +flag20=687865888 +flagg20=1207959568 +flagh20=65556 +flagi20=0 +tflag20=2 +initx20=0 +inity20=0 +minx20=0 +miny20=0 +maxx20=0 +maxy20=0 +posx20=50 +posy20=50 +sizx20=800 +sizy20=600 +maxfps20=0 +initts20=0 +title21=Warlords Battlecry II (DEMO) +path21=D:\Games\Warlords Battlecry II Demo\Battlecry II Demo.exe +module21= +opengllib21= +ver21=0 +coord21=2 +flag21=134217762 +flagg21=1207959568 +flagh21=22 +flagi21=0 +tflag21=258 +initx21=0 +inity21=0 +minx21=0 +miny21=0 +maxx21=0 +maxy21=0 +posx21=50 +posy21=50 +sizx21=800 +sizy21=600 +maxfps21=0 +initts21=0 +title22=Whiteout +path22=D:\Games\Whiteout\Whiteout.exe +module22= +opengllib22= +ver22=0 +coord22=0 +flag22=402653216 +flagg22=1207959552 +flagh22=20 +flagi22=0 +tflag22=64 +initx22=0 +inity22=0 +minx22=0 +miny22=0 +maxx22=0 +maxy22=0 +posx22=50 +posy22=50 +sizx22=640 +sizy22=480 +maxfps22=0 +initts22=0 +title23=Wildfire +path23=D:\Games\Wildfire\Wildfire.exe +module23= +opengllib23= +ver23=0 +coord23=0 +flag23=-1476392958 +flagg23=1210122240 +flagh23=20 +flagi23=12 +tflag23=0 +initx23=0 +inity23=0 +minx23=0 +miny23=0 +maxx23=0 +maxy23=0 +posx23=50 +posy23=50 +sizx23=800 +sizy23=600 +maxfps23=0 +initts23=0 +title24=Worms Pinball +path24=D:\Games\Worms Pinball\WPIB.exe +module24= +opengllib24= +ver24=0 +coord24=2 +flag24=679477282 +flagg24=1744830480 +flagh24=20 +flagi24=4 +tflag24=259 +initx24=0 +inity24=0 +minx24=0 +miny24=0 +maxx24=0 +maxy24=0 +posx24=50 +posy24=50 +sizx24=800 +sizy24=600 +maxfps24=0 +initts24=0 +title25=Zanzarah +path25=D:\Games\Zanzarah\System\zanthp.exe +module25= +opengllib25= +ver25=0 +coord25=0 +flag25=679477280 +flagg25=1207959552 +flagh25=20 +flagi25=0 +tflag25=0 +initx25=0 +inity25=0 +minx25=0 +miny25=0 +maxx25=0 +maxy25=0 +posx25=50 +posy25=50 +sizx25=800 +sizy25=600 +maxfps25=0 +initts25=0 +title26=Zax the Alien Hunter (DEMO) +path26=D:\Games\ZaxDemo\Zax.exe +module26= +opengllib26= +ver26=0 +coord26=2 +flag26=-2011168734 +flagg26=1209008144 +flagh26=20 +flagi26=0 +tflag26=258 +initx26=0 +inity26=0 +minx26=0 +miny26=0 +maxx26=0 +maxy26=0 +posx26=50 +posy26=50 +sizx26=800 +sizy26=600 +maxfps26=0 +initts26=0 +title27=ZPC Zero Population Count +path27=D:\Games\ZPC\ZPC.EXE +module27= +opengllib27= +ver27=0 +coord27=0 +flag27=134217762 +flagg27=1207959552 +flagh27=20 +flagi27=4 +tflag27=0 +initx27=0 +inity27=0 +minx27=0 +miny27=0 +maxx27=0 +maxy27=0 +posx27=50 +posy27=50 +sizx27=800 +sizy27=600 +maxfps27=0 +initts27=0 [window] -posx=1152 -posy=191 +posx=1177 +posy=268 sizx=497 sizy=410 diff --git a/build/exports/007 NightFire.dxw b/build/exports/007 NightFire.dxw new file mode 100644 index 0000000..1fde1e2 --- /dev/null +++ b/build/exports/007 NightFire.dxw @@ -0,0 +1,24 @@ +[target] +title0=007 NightFire +path0=D:\Games\007_NightFire\Bond.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134234146 +flagg0=134217728 +flagh0=65556 +flagi0=0 +tflag0=67 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/101 The Airborne Invasion of Normandy.dxw b/build/exports/101 The Airborne Invasion of Normandy.dxw new file mode 100644 index 0000000..71bb96f --- /dev/null +++ b/build/exports/101 The Airborne Invasion of Normandy.dxw @@ -0,0 +1,24 @@ +[target] +title0=101 The Airborne Invasion of Normandy +path0=D:\Games\101air\101.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134234146 +flagg0=134217728 +flagh0=20 +flagi0=0 +tflag0=192 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Age of Empires III.dxw b/build/exports/Age of Empires III.dxw new file mode 100644 index 0000000..c1efb73 --- /dev/null +++ b/build/exports/Age of Empires III.dxw @@ -0,0 +1,24 @@ +[target] +title0=Age of Empires III +path0=D:\Games\Age of Empires III\age3.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=-394125278 +flagg0=134217728 +flagh0=20 +flagi0=0 +tflag0=3 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Akuma Demon Spawn - Lamentation Sword.dxw b/build/exports/Akuma Demon Spawn - Lamentation Sword.dxw new file mode 100644 index 0000000..d73692c --- /dev/null +++ b/build/exports/Akuma Demon Spawn - Lamentation Sword.dxw @@ -0,0 +1,24 @@ +[target] +title0=Akuma Demon Spawn - Lamentation Sword +path0=D:\Games\Akuma Demon Spawn - Lamentation Sword (1999)\Akuma\Akuma.EXE +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134234146 +flagg0=134217728 +flagh0=20 +flagi0=0 +tflag0=64 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Ancient Evil demo.dxw b/build/exports/Ancient Evil demo.dxw new file mode 100644 index 0000000..c6ad005 --- /dev/null +++ b/build/exports/Ancient Evil demo.dxw @@ -0,0 +1,24 @@ +[target] +title0=Ancient Evil demo +path0=D:\Games\AECSC\aecsc-demo.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=150994976 +flagg0=1207959552 +flagh0=25165844 +flagi0=0 +tflag0=259 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Army Men RTS.dxw b/build/exports/Army Men RTS.dxw new file mode 100644 index 0000000..163d2cf --- /dev/null +++ b/build/exports/Army Men RTS.dxw @@ -0,0 +1,24 @@ +[target] +title0=Army Men RTS +path0=D:\Games\Army Men RTS\amrts.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=671088676 +flagg0=1207959552 +flagh0=20 +flagi0=0 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Attack of the Saucerman.dxw b/build/exports/Attack of the Saucerman.dxw new file mode 100644 index 0000000..fd88a78 --- /dev/null +++ b/build/exports/Attack of the Saucerman.dxw @@ -0,0 +1,24 @@ +[target] +title0=Attack of the Saucerman +path0=D:\Games\Attack of the Saucerman\attack of the saucerman.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134217730 +flagg0=134217728 +flagh0=20 +flagi0=0 +tflag0=192 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/Empire Earth (16BPP).dxw b/build/exports/Beyond Divinity.dxw similarity index 61% rename from build/Empire Earth (16BPP).dxw rename to build/exports/Beyond Divinity.dxw index 943088d..ee7c05a 100644 --- a/build/Empire Earth (16BPP).dxw +++ b/build/exports/Beyond Divinity.dxw @@ -1,13 +1,13 @@ [target] -title0=Empire Earth -path0=D:\Games\Empire Earth\Empire Earth.exe +title0=Beyond Divinity +path0=D:\Games\Beyond Divinity\Div.exe module0= opengllib0= ver0=0 coord0=0 -flag0=671105057 -flagg0=134217744 -flagh0=84 +flag0=134234144 +flagg0=134217728 +flagh0=61 flagi0=0 tflag0=3 initx0=0 diff --git a/build/exports/Chariots of War.dxw b/build/exports/Chariots of War.dxw new file mode 100644 index 0000000..c2ac89f --- /dev/null +++ b/build/exports/Chariots of War.dxw @@ -0,0 +1,24 @@ +[target] +title0=Chariots of War +path0=D:\Games\Chariots of War\CoW.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134217762 +flagg0=1744830464 +flagh0=20 +flagi0=2 +tflag0=3 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Daikatana.dxw b/build/exports/Daikatana.dxw new file mode 100644 index 0000000..ff305de --- /dev/null +++ b/build/exports/Daikatana.dxw @@ -0,0 +1,24 @@ +[target] +title0=Daikatana +path0=D:\Games\Daikatana\daikatana.exe +module0= +opengllib0= +ver0=12 +coord0=0 +flag0=269492738 +flagg0=537002497 +flagh0=20 +flagi0=0 +tflag0=2 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Devastation.dxw b/build/exports/Devastation.dxw new file mode 100644 index 0000000..d42a274 --- /dev/null +++ b/build/exports/Devastation.dxw @@ -0,0 +1,24 @@ +[target] +title0=Devastation +path0=D:\Games\Devastation\System\Devastation.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134217762 +flagg0=1207959552 +flagh0=16 +flagi0=0 +tflag0=67 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Diablo.dxw b/build/exports/Diablo.dxw new file mode 100644 index 0000000..63c7691 --- /dev/null +++ b/build/exports/Diablo.dxw @@ -0,0 +1,24 @@ +[target] +title0=Diablo +path0=D:\Games\Diablo\Diablo.exe +module0= +opengllib0= +ver0=1 +coord0=0 +flag0=138428450 +flagg0=1108344848 +flagh0=20 +flagi0=0 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=640 +sizy0=480 +maxfps0=0 +initts0=0 diff --git a/build/exports/Doom Shareware for Windows 95.dxw b/build/exports/Doom Shareware for Windows 95.dxw new file mode 100644 index 0000000..e29750c --- /dev/null +++ b/build/exports/Doom Shareware for Windows 95.dxw @@ -0,0 +1,24 @@ +[target] +title0=Doom Shareware for Windows 95 +path0=D:\Games\Doom Shareware for Windows 95\Doom95.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134217762 +flagg0=134217728 +flagh0=20 +flagi0=0 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Dungeon Keeper II.dxw b/build/exports/Dungeon Keeper II.dxw new file mode 100644 index 0000000..3b5d517 --- /dev/null +++ b/build/exports/Dungeon Keeper II.dxw @@ -0,0 +1,24 @@ +[target] +title0=Dungeon Keeper II +path0=D:\Games\Dungeon Keeper 2\DKII.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=16418 +flagg0=574619648 +flagh0=20 +flagi0=0 +tflag0=263 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=150 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Dungeon Lords MMXII.dxw b/build/exports/Dungeon Lords MMXII.dxw new file mode 100644 index 0000000..bc4f6f5 --- /dev/null +++ b/build/exports/Dungeon Lords MMXII.dxw @@ -0,0 +1,24 @@ +[target] +title0=Dungeon Lords MMXII +path0=D:\Games\Dungeon Lords MMXII\dlords2012.exe +module0= +opengllib0= +ver0=0 +coord0=2 +flag0=-2013265886 +flagg0=1207959552 +flagh0=20 +flagi0=0 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/Empire Earth.dxw b/build/exports/Empire Earth.dxw similarity index 100% rename from build/Empire Earth.dxw rename to build/exports/Empire Earth.dxw diff --git a/build/exports/GTA 3.dxw b/build/exports/GTA 3.dxw new file mode 100644 index 0000000..c7e4c44 --- /dev/null +++ b/build/exports/GTA 3.dxw @@ -0,0 +1,24 @@ +[target] +title0=GTA 3 +path0=D:\Games\GTA3\gta3.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134234150 +flagg0=1207975952 +flagh0=176 +flagi0=0 +tflag0=2 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Grand Prix Legends.dxw b/build/exports/Grand Prix Legends.dxw new file mode 100644 index 0000000..999ae13 Binary files /dev/null and b/build/exports/Grand Prix Legends.dxw differ diff --git a/build/exports/Grand Prix World.dxw b/build/exports/Grand Prix World.dxw new file mode 100644 index 0000000..4b5efa6 --- /dev/null +++ b/build/exports/Grand Prix World.dxw @@ -0,0 +1,24 @@ +[target] +title0=Grand Prix World +path0=D:\Games\Grand Prix World\gpwxp2.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134283430 +flagg0=134217856 +flagh0=29 +flagi0=0 +tflag0=3 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Hamsterball.dxw b/build/exports/Hamsterball.dxw new file mode 100644 index 0000000..e4bdc3e --- /dev/null +++ b/build/exports/Hamsterball.dxw @@ -0,0 +1,24 @@ +[target] +title0=Hamsterball +path0=D:\Games\Hamsterball\Hamsterball.exe +module0= +opengllib0= +ver0=8 +coord0=0 +flag0=134217762 +flagg0=1207959552 +flagh0=20 +flagi0=0 +tflag0=323 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Heroes of Might and Magic IV.dxw b/build/exports/Heroes of Might and Magic IV.dxw new file mode 100644 index 0000000..cf7cd79 --- /dev/null +++ b/build/exports/Heroes of Might and Magic IV.dxw @@ -0,0 +1,24 @@ +[target] +title0=Heroes of Might and Magic IV +path0=D:\Games\Heroes of Might and Magic IV\heroes4i.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134283298 +flagg0=1211121728 +flagh0=65556 +flagi0=0 +tflag0=3 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Homeworld 2.dxw b/build/exports/Homeworld 2.dxw new file mode 100644 index 0000000..9aa9229 --- /dev/null +++ b/build/exports/Homeworld 2.dxw @@ -0,0 +1,24 @@ +[target] +title0=Homeworld 2 +path0=D:\Games\Homeworld2\Bin\Release\Homeworld2.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=671088642 +flagg0=134217728 +flagh0=477 +flagi0=0 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Jet Moto.dxw b/build/exports/Jet Moto.dxw new file mode 100644 index 0000000..37378ff --- /dev/null +++ b/build/exports/Jet Moto.dxw @@ -0,0 +1,24 @@ +[target] +title0=Jet Moto +path0=D:\Games\Jet_Moto\JETMOTO.EXE +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=671088674 +flagg0=1207959568 +flagh0=20 +flagi0=0 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/JetMoto.dxw b/build/exports/JetMoto.dxw new file mode 100644 index 0000000..65069a9 --- /dev/null +++ b/build/exports/JetMoto.dxw @@ -0,0 +1,24 @@ +[target] +title0=JetMoto +path0=D:\Games\Jet_Moto\JETMOTO.EXE +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=671088674 +flagg0=1207959552 +flagh0=20 +flagi0=0 +tflag0=64 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Kiss Psycho Circus.dxw b/build/exports/Kiss Psycho Circus.dxw new file mode 100644 index 0000000..79f48c5 --- /dev/null +++ b/build/exports/Kiss Psycho Circus.dxw @@ -0,0 +1,24 @@ +[target] +title0=Kiss Psycho Circus +path0=D:\Games\Kiss\client.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134217760 +flagg0=1207959552 +flagh0=20 +flagi0=0 +tflag0=67 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/L'Elefante a Strisce.dxw b/build/exports/L'Elefante a Strisce.dxw new file mode 100644 index 0000000..f119aca --- /dev/null +++ b/build/exports/L'Elefante a Strisce.dxw @@ -0,0 +1,24 @@ +[target] +title0=L'Elefante a Strisce +path0=D:\Games\L'Elefante a Strisce\Pilots1I.EXE +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134217762 +flagg0=134217728 +flagh0=20 +flagi0=0 +tflag0=64 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Land of the Dead.dxw b/build/exports/Land of the Dead.dxw new file mode 100644 index 0000000..517fb28 --- /dev/null +++ b/build/exports/Land of the Dead.dxw @@ -0,0 +1,24 @@ +[target] +title0=Land of the Dead +path0=D:\Games\Land of the Dead\System\LOTD.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134217766 +flagg0=1207959552 +flagh0=20 +flagi0=0 +tflag0=64 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Last Bronx.dxw b/build/exports/Last Bronx.dxw new file mode 100644 index 0000000..3415a45 --- /dev/null +++ b/build/exports/Last Bronx.dxw @@ -0,0 +1,24 @@ +[target] +title0=Last Bronx +path0=D:\Games\Last_Bronx\LB.EXE +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134217762 +flagg0=1207959552 +flagh0=20 +flagi0=0 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Mageslayer.dxw b/build/exports/Mageslayer.dxw new file mode 100644 index 0000000..4732846 --- /dev/null +++ b/build/exports/Mageslayer.dxw @@ -0,0 +1,24 @@ +[target] +title0=Mageslayer +path0=D:\Games\MAGE\MAGESLAY.EXE +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134234146 +flagg0=134217760 +flagh0=20 +flagi0=0 +tflag0=64 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Magic & Mayhem.dxw b/build/exports/Magic & Mayhem.dxw new file mode 100644 index 0000000..8e8066e --- /dev/null +++ b/build/exports/Magic & Mayhem.dxw @@ -0,0 +1,24 @@ +[target] +title0=Magic & Mayhem +path0=D:\Games\Magic_&_Mayhem\Chaos.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=138428450 +flagg0=1275068416 +flagh0=8388628 +flagi0=0 +tflag0=259 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Mirror's Edge.dxw b/build/exports/Mirror's Edge.dxw new file mode 100644 index 0000000..07855d2 --- /dev/null +++ b/build/exports/Mirror's Edge.dxw @@ -0,0 +1,24 @@ +[target] +title0=Mirror's Edge +path0=D:\Games\Mirror's Edge\Binaries\MirrorsEdge.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=-2013265882 +flagg0=1207959552 +flagh0=2097172 +flagi0=0 +tflag0=15 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=6 diff --git a/build/exports/Praetorians.dxw b/build/exports/Praetorians.dxw new file mode 100644 index 0000000..a07422a --- /dev/null +++ b/build/exports/Praetorians.dxw @@ -0,0 +1,24 @@ +[target] +title0=Praetorians +path0=D:\Games\Praetorians\Praetorians.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134217760 +flagg0=1207959552 +flagh0=20 +flagi0=0 +tflag0=259 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Premier Manager 98.dxw b/build/exports/Premier Manager 98.dxw new file mode 100644 index 0000000..202d582 --- /dev/null +++ b/build/exports/Premier Manager 98.dxw @@ -0,0 +1,24 @@ +[target] +title0=Premier Manager 98 +path0=D:\Games\Premier Manager 98\MANAGER.EXE +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=671088674 +flagg0=1207959552 +flagh0=16 +flagi0=0 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Primitive Wars.dxw b/build/exports/Primitive Wars.dxw new file mode 100644 index 0000000..9cc72eb --- /dev/null +++ b/build/exports/Primitive Wars.dxw @@ -0,0 +1,24 @@ +[target] +title0=Primitive Wars +path0=D:\Games\Primitive Wars\Pw.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=402653218 +flagg0=1207959552 +flagh0=20 +flagi0=0 +tflag0=64 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Railroad Tycoon II.dxw b/build/exports/Railroad Tycoon II.dxw new file mode 100644 index 0000000..c3cb149 --- /dev/null +++ b/build/exports/Railroad Tycoon II.dxw @@ -0,0 +1,24 @@ +[target] +title0=Railroad Tycoon II +path0=D:\Games\Railroad.Tycoon.II\RT2.EXE +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=2082 +flagg0=143654912 +flagh0=16 +flagi0=0 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/Rayman 2 (GOG).dxw b/build/exports/Rayman 2 (GOG).dxw similarity index 100% rename from build/Rayman 2 (GOG).dxw rename to build/exports/Rayman 2 (GOG).dxw diff --git a/build/Rayman 2 Demo.dxw b/build/exports/Rayman 2 Demo.dxw similarity index 100% rename from build/Rayman 2 Demo.dxw rename to build/exports/Rayman 2 Demo.dxw diff --git a/build/exports/Sid Meiers SimGolf CLASS.dxw b/build/exports/Sid Meiers SimGolf CLASS.dxw new file mode 100644 index 0000000..14604d1 --- /dev/null +++ b/build/exports/Sid Meiers SimGolf CLASS.dxw @@ -0,0 +1,24 @@ +[target] +title0=Sid Meiers SimGolf CLASS +path0=D:\Games\Sid.Meiers.SimGolf-CLASS\golf.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=402653218 +flagg0=1745879040 +flagh0=65556 +flagi0=0 +tflag0=3 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Slam Tilt.dxw b/build/exports/Slam Tilt.dxw new file mode 100644 index 0000000..84c7057 --- /dev/null +++ b/build/exports/Slam Tilt.dxw @@ -0,0 +1,24 @@ +[target] +title0=Slam Tilt +path0=D:\Games\SlamTilt\slamtilt.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=671088674 +flagg0=1207959554 +flagh0=20 +flagi0=0 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Space Rangers.dxw b/build/exports/Space Rangers.dxw new file mode 100644 index 0000000..adba567 --- /dev/null +++ b/build/exports/Space Rangers.dxw @@ -0,0 +1,24 @@ +[target] +title0=Space Rangers +path0=D:\Games\Space Rangers\Rangers.exe +module0= +opengllib0= +ver0=1 +coord0=0 +flag0=134234146 +flagg0=1207959552 +flagh0=20 +flagi0=0 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Star Wars Phantom Menace.dxw b/build/exports/Star Wars Phantom Menace.dxw new file mode 100644 index 0000000..50ff637 --- /dev/null +++ b/build/exports/Star Wars Phantom Menace.dxw @@ -0,0 +1,24 @@ +[target] +title0=Star Wars Phantom Menace +path0=D:\Games\Star Wars Phantom Menace\WMAIN.EXE +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=939524129 +flagg0=1207959552 +flagh0=20 +flagi0=0 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Star Wars Shadow of the Empire (DEMO).dxw b/build/exports/Star Wars Shadow of the Empire (DEMO).dxw new file mode 100644 index 0000000..e50772d --- /dev/null +++ b/build/exports/Star Wars Shadow of the Empire (DEMO).dxw @@ -0,0 +1,24 @@ +[target] +title0=Star Wars Shadow of the Empire (DEMO) +path0=D:\Games\shadowsdemo\shadows.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134217762 +flagg0=1208483844 +flagh0=25165844 +flagi0=0 +tflag0=275 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Star Wars Shadow of the Empire.dxw b/build/exports/Star Wars Shadow of the Empire.dxw new file mode 100644 index 0000000..0ca1af9 --- /dev/null +++ b/build/exports/Star Wars Shadow of the Empire.dxw @@ -0,0 +1,24 @@ +[target] +title0=Star Wars Shadow of the Empire +path0=D:\Games\Star Wars Shadow of the Empire\game\SDATA\SHADOWS.EXE +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134217762 +flagg0=1476919296 +flagh0=25166364 +flagi0=0 +tflag0=274 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/StarCraft.dxw b/build/exports/StarCraft.dxw new file mode 100644 index 0000000..ec3c771 --- /dev/null +++ b/build/exports/StarCraft.dxw @@ -0,0 +1,24 @@ +[target] +title0=StarCraft +path0=D:\Games\Starcraft\StarCraft.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134217762 +flagg0=136314880 +flagh0=20 +flagi0=0 +tflag0=64 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Talis Gear.dxw b/build/exports/Talis Gear.dxw new file mode 100644 index 0000000..bc14a14 --- /dev/null +++ b/build/exports/Talis Gear.dxw @@ -0,0 +1,24 @@ +[target] +title0=Talis Gear +path0=D:\Games\TailsGear078\DT_MAIN.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134217760 +flagg0=1207959552 +flagh0=20 +flagi0=0 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Theseus.dxw b/build/exports/Theseus.dxw new file mode 100644 index 0000000..076b5e3 --- /dev/null +++ b/build/exports/Theseus.dxw @@ -0,0 +1,24 @@ +[target] +title0=Theseus +path0=D:\Games\theseus\Theseus.exe +module0= +opengllib0= +ver0=8 +coord0=0 +flag0=134217730 +flagg0=1207959552 +flagh0=20 +flagi0=0 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Tomb Raider III (HW acceleration).dxw b/build/exports/Tomb Raider III (HW acceleration).dxw new file mode 100644 index 0000000..28de0c8 --- /dev/null +++ b/build/exports/Tomb Raider III (HW acceleration).dxw @@ -0,0 +1,26 @@ +[target] +title0=Tomb Raider III (HW acceleration) +path0=D:\Games\Tomb Raider III\tomb3.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134217760 +flagg0=1241513984 +flagh0=25165844 +flagi0=0 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 + +; remember to set HW accelerated mode and turn ZBUFFER option off in game setup panel \ No newline at end of file diff --git a/build/exports/Tomb Raider III (SW emulation).dxw b/build/exports/Tomb Raider III (SW emulation).dxw new file mode 100644 index 0000000..6e36eee --- /dev/null +++ b/build/exports/Tomb Raider III (SW emulation).dxw @@ -0,0 +1,26 @@ +[target] +title0=Tomb Raider III (SW emulation) +path0=D:\Games\Tomb Raider III\tomb3.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134217762 +flagg0=1241513984 +flagh0=25165844 +flagi0=0 +tflag0=323 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 + +; remember to set SW emulated mode in game setup panel diff --git a/build/exports/Total Annihilation Kingdoms.dxw b/build/exports/Total Annihilation Kingdoms.dxw new file mode 100644 index 0000000..bf596e7 --- /dev/null +++ b/build/exports/Total Annihilation Kingdoms.dxw @@ -0,0 +1,24 @@ +[target] +title0=Total Annihilation Kingdoms +path0=D:\Games\Total Annihilation Kingdoms\Kingdoms.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134234146 +flagg0=1073741840 +flagh0=16 +flagi0=0 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Vangers.dxw b/build/exports/Vangers.dxw new file mode 100644 index 0000000..d7459f7 --- /dev/null +++ b/build/exports/Vangers.dxw @@ -0,0 +1,24 @@ +[target] +title0=Vangers +path0=D:\Games\Vangers\road.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=402653219 +flagg0=671088640 +flagh0=20 +flagi0=0 +tflag0=67 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Warcraft 2 Battlenet Ed.dxw b/build/exports/Warcraft 2 Battlenet Ed.dxw new file mode 100644 index 0000000..4cc9791 --- /dev/null +++ b/build/exports/Warcraft 2 Battlenet Ed.dxw @@ -0,0 +1,24 @@ +[target] +title0=Warcraft 2 Battlenet Ed +path0=D:\Games\Warcraft 2 Battlenet Ed\Warcraft II BNE.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134217762 +flagg0=1207959552 +flagh0=20 +flagi0=4 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Wargames.dxw b/build/exports/Wargames.dxw new file mode 100644 index 0000000..0ea1bb9 --- /dev/null +++ b/build/exports/Wargames.dxw @@ -0,0 +1,24 @@ +[target] +title0=Wargames (demo) +path0=D:\Games\Wargames\wargames.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=268435618 +flagg0=1207959552 +flagh0=20 +flagi0=0 +tflag0=3 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/Warlords 3.dxw b/build/exports/Warlords 3.dxw new file mode 100644 index 0000000..ed24623 --- /dev/null +++ b/build/exports/Warlords 3.dxw @@ -0,0 +1,24 @@ +[target] +title0=Warlords 3 +path0=D:\Games\WARLORDS3\Darklord.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=-2147483102 +flagg0=269484064 +flagh0=532 +flagi0=0 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=0 +sizy0=0 +maxfps0=0 +initts0=0 diff --git a/build/exports/Whiteout.dxw b/build/exports/Whiteout.dxw new file mode 100644 index 0000000..69c375f --- /dev/null +++ b/build/exports/Whiteout.dxw @@ -0,0 +1,24 @@ +[target] +title0=Whiteout +path0=D:\Games\Whiteout\Whiteout.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=402653216 +flagg0=1207959552 +flagh0=20 +flagi0=0 +tflag0=64 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=640 +sizy0=480 +maxfps0=0 +initts0=0 diff --git a/build/exports/Wildfire.dxw b/build/exports/Wildfire.dxw new file mode 100644 index 0000000..8844c18 --- /dev/null +++ b/build/exports/Wildfire.dxw @@ -0,0 +1,24 @@ +[target] +title0=Wildfire +path0=D:\Games\Wildfire\Wildfire.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=-1476392958 +flagg0=1207959552 +flagh0=20 +flagi0=4 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/ZPC Zero Population Count.dxw b/build/exports/ZPC Zero Population Count.dxw new file mode 100644 index 0000000..21ecbf3 --- /dev/null +++ b/build/exports/ZPC Zero Population Count.dxw @@ -0,0 +1,24 @@ +[target] +title0=ZPC Zero Population Count +path0=D:\Games\ZPC\ZPC.EXE +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=134217762 +flagg0=1207959552 +flagh0=20 +flagi0=4 +tflag0=0 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/exports/deadrising2otr1.dxw b/build/exports/deadrising2otr1.dxw new file mode 100644 index 0000000..11f51ac --- /dev/null +++ b/build/exports/deadrising2otr1.dxw @@ -0,0 +1,24 @@ +[target] +title0=deadrising2otr.exe +path0=C:\Program Files (x86)\Capcom\Dead Rising 2 Off The Record\deadrising2otr.exe +module0= +opengllib0= +ver0=0 +coord0=0 +flag0=0 +flagg0=134217728 +flagh0=16 +flagi0=0 +tflag0=3 +initx0=0 +inity0=0 +minx0=0 +miny0=0 +maxx0=0 +maxy0=0 +posx0=50 +posy0=50 +sizx0=800 +sizy0=600 +maxfps0=0 +initts0=0 diff --git a/build/issues.txt b/build/issues.txt index b6fa262..bc5aa3c 100644 --- a/build/issues.txt +++ b/build/issues.txt @@ -1 +1,3 @@ Ancient Evil: working both in emulated / direct mode, but in emulated mode the cursor is not visible. +Whiteout: handling of IMultiMediaStream COM interface for intro movie +window handling for ddraw8 games - see WildFire with keep aspect ratio & client area diff --git a/build/readme-relnotes.txt b/build/readme-relnotes.txt index f7824c8..6e3a2dd 100644 --- a/build/readme-relnotes.txt +++ b/build/readme-relnotes.txt @@ -293,4 +293,18 @@ Several changes for Empire Earth: fix: restore 16BPP color mode after directdraw session termination fix: recovered window destruction fix: proper handling of MIPMAP and LOCALVIDMEM surfaces -fix: revised color management, now when the program terminates the desktop is restored to the previous color depth +fix: color depth handling - now when the program terminates the desktop is brought to the original color depth + +v2.02.45 +Improved debug logging for all palette operations +fixed a bugged log causing the crash of Empire Earth in debug mode +added show time stretching flag - preliminary version. Some code cleaning as well. +change in automatic screen refresh - should make the "palette update don't blit" flag obsolete..... +added a static definition for the default system palette +added interception for CoCreateInstance following cases: + case 0xe436ebb3: Module="quartz"; Class="CLSID_FilterGraph"; + case 0x4fd2a832: Module="ddrawex"; Class="CLSID_DirectDrawEx"; + case 0x49c47ce5: Module="amstream"; Class="CLSID_AMMultiMediaStream"; +preliminary (proxed) interception for "GetActiveWindow" and "GetForegroundWindow" + + \ No newline at end of file diff --git a/dll/ddproxy.cpp b/dll/ddproxy.cpp index f5405b3..7c24b63 100644 --- a/dll/ddproxy.cpp +++ b/dll/ddproxy.cpp @@ -696,15 +696,8 @@ HRESULT WINAPI extCreatePaletteProxy(LPDIRECTDRAW lpdd, DWORD dwflags, LPPALETTE HRESULT res; OutTraceP("CreatePalette(D): PROXED lpdd=%x dwFlags=%x(%s)\n", lpdd, dwflags, ExplainCreatePaletteFlags(dwflags)); - if(IsDebug && (dwflags & DDPCAPS_8BIT)){ - int idx; - OutTrace("CreatePalette: "); - for(idx=0; idx<256; idx++) OutTrace("(%02x.%02x.%02x)", - lpddpa[idx].peRed, - lpddpa[idx].peGreen, - lpddpa[idx].peBlue ); - OutTrace("\n"); - } + if(IsDebug && (dwflags & DDPCAPS_8BIT)) dxw.DumpPalette(256, lpddpa); + res = (*pCreatePalette)(lpdd, dwflags, lpddpa, lplpddp, pu); if (res) { OutTraceP("CreatePalette(D): ERROR res=%x(%s)\n", res, ExplainDDError(res)); @@ -1155,8 +1148,9 @@ HRESULT WINAPI extGetCapsPProxy(LPDIRECTDRAWPALETTE lpddp, LPDWORD w) HRESULT WINAPI extGetEntriesProxy(LPDIRECTDRAWPALETTE lpddp, DWORD dwflags, DWORD dwstart, DWORD dwcount, LPPALETTEENTRY lpentries) { HRESULT res; - OutTraceP("GetEntries(P): PROXED lpddp=%x flags=%x start=%x, count=%d\n", lpddp, dwflags, dwstart, dwcount); + OutTraceP("GetEntries(P): PROXED lpddp=%x flags=%x start=%d, count=%d\n", lpddp, dwflags, dwstart, dwcount); res=(*pGetEntries)(lpddp, dwflags, dwstart, dwcount, lpentries); + if(IsDebug && !res) dxw.DumpPalette(dwcount, &lpentries[dwstart]); if (res) OutTraceP("GetEntries(P): ERROR res=%x(%s)\n", res, ExplainDDError(res)); return res; } @@ -1164,7 +1158,8 @@ HRESULT WINAPI extGetEntriesProxy(LPDIRECTDRAWPALETTE lpddp, DWORD dwflags, DWOR HRESULT WINAPI extSetEntriesProxy(LPDIRECTDRAWPALETTE lpddp, DWORD dwflags, DWORD dwstart, DWORD dwcount, LPPALETTEENTRY lpentries) { HRESULT res; - OutTraceP("SetEntries(P): PROXED lpddp=%x flags=%x start=%x, count=%d\n", lpddp, dwflags, dwstart, dwcount); + OutTraceP("SetEntries(P): PROXED lpddp=%x flags=%x start=%d, count=%d\n", lpddp, dwflags, dwstart, dwcount); + if(IsDebug) dxw.DumpPalette(dwcount, &lpentries[dwstart]); res=(*pSetEntries)(lpddp, dwflags, dwstart, dwcount, lpentries); if (res) OutTraceP("SetEntries(P): ERROR res=%x(%s)\n", res, ExplainDDError(res)); return res; @@ -2057,12 +2052,7 @@ UINT WINAPI extGetSystemPaletteEntriesProxy(HDC hdc, UINT iStartIndex, UINT nEnt ret=(*pGDIGetSystemPaletteEntries)(hdc, iStartIndex, nEntries, lppe); OutTrace("GDI.GetSystemPaletteEntries: PROXED hdc=%x start=%d num=%d ret=%d\n", hdc, iStartIndex, nEntries, ret); - if(ret && IsDebug){ - UINT idx; - OutTraceD("PaletteEntries[%x]= ", nEntries); - for(idx=iStartIndex; idx +#include +#include "dxwnd.h" +#include "dxhook.h" +#include "ddrawi.h" +#include "dxwcore.hpp" +#include "stdio.h" +#include "hddraw.h" +#include "ddproxy.h" +#include "dxhelper.h" +#include "syslibs.h" + + +// DirectDraw API +HRESULT WINAPI extDirectDrawCreate(GUID FAR *, LPDIRECTDRAW FAR *, IUnknown FAR *); +HRESULT WINAPI extDirectDrawCreateEx(GUID FAR *, LPDIRECTDRAW FAR *, REFIID, IUnknown FAR *); +HRESULT WINAPI extDirectDrawEnumerate(LPDDENUMCALLBACK, LPVOID); +HRESULT WINAPI extDirectDrawEnumerateEx(LPDDENUMCALLBACKEX, LPVOID, DWORD); + +// DirectDraw +HRESULT WINAPI extQueryInterfaceD(void *, REFIID, LPVOID *); +ULONG WINAPI extReleaseD(LPDIRECTDRAW); + /*** IDirectDraw methods ***/ +HRESULT WINAPI extCreateClipper(LPDIRECTDRAW, DWORD, LPDIRECTDRAWCLIPPER FAR* , IUnknown FAR*); +HRESULT WINAPI extCreatePalette(LPDIRECTDRAW, DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE *, IUnknown *); +HRESULT WINAPI extCreateSurface1(LPDIRECTDRAW, DDSURFACEDESC *, LPDIRECTDRAWSURFACE *, void *); +HRESULT WINAPI extCreateSurface2(LPDIRECTDRAW, DDSURFACEDESC *, LPDIRECTDRAWSURFACE *, void *); +HRESULT WINAPI extCreateSurface4(LPDIRECTDRAW, DDSURFACEDESC2 *, LPDIRECTDRAWSURFACE *, void *); +HRESULT WINAPI extCreateSurface7(LPDIRECTDRAW, DDSURFACEDESC2 *, LPDIRECTDRAWSURFACE *, void *); +HRESULT WINAPI extDuplicateSurface(LPDIRECTDRAW, LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE *); +HRESULT WINAPI extFlipToGDISurface(LPDIRECTDRAW); +HRESULT WINAPI extGetDisplayMode(LPDIRECTDRAW, LPDDSURFACEDESC); +HRESULT WINAPI extGetGDISurface(LPDIRECTDRAW, LPDIRECTDRAWSURFACE *); +HRESULT WINAPI extEnumDisplayModes1(LPDIRECTDRAW, DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK); +HRESULT WINAPI extEnumDisplayModes4(LPDIRECTDRAW, DWORD, LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2); +HRESULT WINAPI extInitialize(LPDIRECTDRAW, FAR GUID *); +HRESULT WINAPI extSetCooperativeLevel(void *, HWND, DWORD); +HRESULT WINAPI extSetDisplayMode1(LPDIRECTDRAW, DWORD, DWORD, DWORD); +HRESULT WINAPI extSetDisplayMode2(LPDIRECTDRAW, DWORD, DWORD, DWORD, DWORD, DWORD); +HRESULT WINAPI extWaitForVerticalBlank(LPDIRECTDRAW, DWORD, HANDLE); + /*** Added in the V4 Interface ***/ +HRESULT WINAPI extTestCooperativeLevel(LPDIRECTDRAW); +// STDMETHOD(StartModeTest)(THIS_ LPSIZE, DWORD, DWORD ) PURE; +// STDMETHOD(EvaluateMode)(THIS_ DWORD, DWORD * ) PURE; +HRESULT WINAPI extGetCapsD(LPDIRECTDRAW, LPDDCAPS, LPDDCAPS); + + +// DirectDrawSurface +HRESULT WINAPI extQueryInterfaceS(void *, REFIID, LPVOID *); +HRESULT WINAPI extReleaseS(LPDIRECTDRAWSURFACE); + + /*** IDirectDrawSurface methods ***/ +HRESULT WINAPI extAddAttachedSurface(LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE); +HRESULT WINAPI extBlt(LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, LPRECT, DWORD, LPDDBLTFX); +HRESULT WINAPI extBltFast(LPDIRECTDRAWSURFACE, DWORD, DWORD, LPDIRECTDRAWSURFACE, LPRECT, DWORD); +HRESULT WINAPI extDeleteAttachedSurface(LPDIRECTDRAWSURFACE, DWORD, LPDIRECTDRAWSURFACE); +HRESULT WINAPI extEnumAttachedSurfaces(LPDIRECTDRAWSURFACE, LPVOID, LPDDENUMSURFACESCALLBACK); +HRESULT WINAPI extFlip(LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE, DWORD); +HRESULT WINAPI extGetAttachedSurface1(LPDIRECTDRAWSURFACE, DDSCAPS *, LPDIRECTDRAWSURFACE *); +HRESULT WINAPI extGetAttachedSurface3(LPDIRECTDRAWSURFACE, DDSCAPS *, LPDIRECTDRAWSURFACE *); +HRESULT WINAPI extGetAttachedSurface4(LPDIRECTDRAWSURFACE, DDSCAPS *, LPDIRECTDRAWSURFACE *); +HRESULT WINAPI extGetAttachedSurface7(LPDIRECTDRAWSURFACE, DDSCAPS *, LPDIRECTDRAWSURFACE *); +HRESULT WINAPI extGetCaps1S(LPDIRECTDRAWSURFACE, LPDDSCAPS); +HRESULT WINAPI extGetCaps2S(LPDIRECTDRAWSURFACE, LPDDSCAPS); +HRESULT WINAPI extGetCaps3S(LPDIRECTDRAWSURFACE, LPDDSCAPS); +HRESULT WINAPI extGetCaps4S(LPDIRECTDRAWSURFACE, LPDDSCAPS2); +HRESULT WINAPI extGetCaps7S(LPDIRECTDRAWSURFACE, LPDDSCAPS2); +HRESULT WINAPI extGetColorKey(LPDIRECTDRAWSURFACE, DWORD, LPDDCOLORKEY); +HRESULT WINAPI extGetDC(LPDIRECTDRAWSURFACE, HDC FAR *); +HRESULT WINAPI extGetPalette(LPDIRECTDRAWSURFACE, LPDIRECTDRAWPALETTE *); +HRESULT WINAPI extGetPixelFormat(LPDIRECTDRAWSURFACE, LPDDPIXELFORMAT); +HRESULT WINAPI extGetSurfaceDesc1(LPDIRECTDRAWSURFACE lpdds, LPDDSURFACEDESC lpddsd); +HRESULT WINAPI extGetSurfaceDesc2(LPDIRECTDRAWSURFACE2 lpdds, LPDDSURFACEDESC2 lpddsd); +HRESULT WINAPI extGetSurfaceDesc7(LPDIRECTDRAWSURFACE2 lpdds, LPDDSURFACEDESC2 lpddsd); +// STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC2) PURE; +HRESULT WINAPI extLock(LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, DWORD, HANDLE); +HRESULT WINAPI extLockDir(LPDIRECTDRAWSURFACE, LPRECT, LPDIRECTDRAWSURFACE, DWORD, HANDLE); +HRESULT WINAPI extReleaseDC(LPDIRECTDRAWSURFACE, HDC); +HRESULT WINAPI extSetClipper(LPDIRECTDRAWSURFACE, LPDIRECTDRAWCLIPPER); +HRESULT WINAPI extSetColorKey(LPDIRECTDRAWSURFACE, DWORD, LPDDCOLORKEY); +HRESULT WINAPI extSetPalette(LPDIRECTDRAWSURFACE, LPDIRECTDRAWPALETTE); +HRESULT WINAPI extUnlock4(LPDIRECTDRAWSURFACE, LPRECT); +HRESULT WINAPI extUnlock1(LPDIRECTDRAWSURFACE, LPVOID); +HRESULT WINAPI extUnlockDir4(LPDIRECTDRAWSURFACE, LPRECT); +HRESULT WINAPI extUnlockDir1(LPDIRECTDRAWSURFACE, LPVOID); + +HRESULT WINAPI extCreateSurface(int, CreateSurface_Type, LPDIRECTDRAW, DDSURFACEDESC2 *, LPDIRECTDRAWSURFACE *, void *); + +// DirectDrawClipper +HRESULT WINAPI extReleaseC(LPDIRECTDRAWCLIPPER); + +// DirectDrawPalette +HRESULT WINAPI extReleaseP(LPDIRECTDRAWPALETTE); +// STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE; +HRESULT WINAPI extSetEntries(LPDIRECTDRAWPALETTE, DWORD, DWORD, DWORD, LPPALETTEENTRY); + +// GammaRamp +HRESULT WINAPI extDDSetGammaRamp(LPDIRECTDRAWSURFACE, DWORD, LPDDGAMMARAMP); +HRESULT WINAPI extDDGetGammaRamp(LPDIRECTDRAWSURFACE, DWORD, LPDDGAMMARAMP); + + +HDC WINAPI extGDIGetDC(HWND); +HDC WINAPI extGDIGetWindowDC(HWND); +int WINAPI extGDIReleaseDC(HWND, HDC); + +/* DirectDraw APIs */ +DirectDrawCreate_Type pDirectDrawCreate = NULL; +DirectDrawCreateEx_Type pDirectDrawCreateEx = NULL; +DirectDrawEnumerate_Type pDirectDrawEnumerate = NULL; +DirectDrawEnumerateEx_Type pDirectDrawEnumerateEx = NULL; + +/* DirectDraw hook pointers */ +QueryInterface_Type pQueryInterfaceD; +AddRefD_Type pAddRefD; +ReleaseD_Type pReleaseD; +Compact_Type pCompact; +CreateClipper_Type pCreateClipper=NULL; +CreatePalette_Type pCreatePalette; +CreateSurface1_Type pCreateSurface1; +CreateSurface1_Type pCreateSurface2; +CreateSurface1_Type pCreateSurface3; +CreateSurface2_Type pCreateSurface4; +CreateSurface2_Type pCreateSurface7; +DuplicateSurface_Type pDuplicateSurface; +EnumDisplayModes1_Type pEnumDisplayModes1; +EnumDisplayModes4_Type pEnumDisplayModes4; +EnumSurfaces1_Type pEnumSurfaces1; +EnumSurfaces4_Type pEnumSurfaces4; +FlipToGDISurface_Type pFlipToGDISurface; +GetCapsD_Type pGetCapsD; +GetDisplayMode_Type pGetDisplayMode; +GetFourCCCodes_Type pGetFourCCCodes; +GetGDISurface_Type pGetGDISurface; +GetMonitorFrequency_Type pGetMonitorFrequency; +GetScanLine_Type pGetScanLine; +GetVerticalBlankStatus_Type pGetVerticalBlankStatus; +Initialize_Type pInitialize; +RestoreDisplayMode_Type pRestoreDisplayMode; +SetCooperativeLevel_Type pSetCooperativeLevel; +SetDisplayMode1_Type pSetDisplayMode1; +SetDisplayMode2_Type pSetDisplayMode2; +WaitForVerticalBlank_Type pWaitForVerticalBlank; +GetSurfaceFromDC_Type pGetSurfaceFromDC; +GetAvailableVidMem_Type pGetAvailableVidMem; +RestoreAllSurfaces_Type pRestoreAllSurfaces; +TestCooperativeLevel_Type pTestCooperativeLevel; +GetDeviceIdentifier_Type pGetDeviceIdentifier; + +/* DirectDrawSurface hook pointers */ +QueryInterface_Type pQueryInterfaceS; +AddRefS_Type pAddRefS; +ReleaseS_Type pReleaseS; +AddAttachedSurface_Type pAddAttachedSurface; +AddOverlayDirtyRect_Type pAddOverlayDirtyRect; +Blt_Type pBlt; +BltBatch_Type pBltBatch; +BltFast_Type pBltFast; +DeleteAttachedSurface_Type pDeleteAttachedSurface; +EnumAttachedSurfaces_Type pEnumAttachedSurfaces; +EnumOverlayZOrders_Type pEnumOverlayZOrders; +Flip_Type pFlip; +GetAttachedSurface_Type pGetAttachedSurface1; +GetAttachedSurface_Type pGetAttachedSurface3; +GetAttachedSurface_Type pGetAttachedSurface4; +GetAttachedSurface_Type pGetAttachedSurface7; +GetBltStatus_Type pGetBltStatus; +GetCapsS_Type pGetCaps1S; +GetCapsS_Type pGetCaps2S; +GetCapsS_Type pGetCaps3S; +GetCaps2S_Type pGetCaps4S; +GetCaps2S_Type pGetCaps7S; +GetClipper_Type pGetClipper; +GetColorKey_Type pGetColorKey; +GetDC_Type pGetDC; +GetFlipStatus_Type pGetFlipStatus; +GetOverlayPosition_Type pGetOverlayPosition; +GetPalette_Type pGetPalette; +GetPixelFormat_Type pGetPixelFormat; +GetSurfaceDesc_Type pGetSurfaceDesc1; +GetSurfaceDesc2_Type pGetSurfaceDesc4; +GetSurfaceDesc2_Type pGetSurfaceDesc7; +//Initialize +IsLost_Type pIsLost; +Lock_Type pLock; +ReleaseDC_Type pReleaseDC; +Restore_Type pRestore; +SetClipper_Type pSetClipper; +SetColorKey_Type pSetColorKey; +SetOverlayPosition_Type pSetOverlayPosition; +SetPalette_Type pSetPalette; +Unlock1_Type pUnlock1; +Unlock4_Type pUnlock4; +UpdateOverlay_Type pUpdateOverlay; +UpdateOverlayDisplay_Type pUpdateOverlayDisplay; +UpdateOverlayZOrder_Type pUpdateOverlayZOrder; + +/* DirectDrawClipper hook pointers */ +QueryInterface_Type pQueryInterfaceC; +AddRefC_Type pAddRefC; +ReleaseC_Type pReleaseC; +GetClipList_Type pGetClipList; +GetHWnd_Type pGetHWnd; +InitializeC_Type pInitializeC; +IsClipListChanged_Type pIsClipListChanged; +SetClipList_Type pSetClipList; +SetHWnd_Type pSetHWnd; + +/* DirectDrawPalette hook pointers */ +QueryInterfaceP_Type pQueryInterfaceP; +AddRefP_Type pAddRefP; +ReleaseP_Type pReleaseP; + /*** IDirectDrawPalette methods ***/ +GetCapsP_Type pGetCapsP; +GetEntries_Type pGetEntries; +// STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE; +SetEntries_Type pSetEntries; + +// GammaRamp +GammaRamp_Type pDDGetGammaRamp; +GammaRamp_Type pDDSetGammaRamp; + +// ddraw global variables, constants & so on + +#define MAXBACKBUFFERS 4 + +LPDIRECTDRAWSURFACE lpDDSEmu_Prim=NULL; +LPDIRECTDRAWSURFACE lpDDSEmu_Back=NULL; +LPDIRECTDRAWSURFACE lpDDSBack=NULL; +LPDIRECTDRAWSURFACE lpDDZBuffer=NULL; +LPDIRECTDRAWSURFACE lpDDTexture=NULL; +// v2.1.87: lpPrimaryDD is the DIRECTDRAW object to which the primary surface and all +// the service objects (emulated backbuffer, emulater primary, ....) are attached. +LPDIRECTDRAW lpPrimaryDD=NULL; +LPDIRECTDRAW lpBackBufferDD=NULL; +int iBakBufferVersion; +LPDIRECTDRAWPALETTE lpDDP=NULL; + +// v2.02.37: globals to store requested main surface capabilities +DDSURFACEDESC2 DDSD_Prim; +DDSURFACEDESC2 DDSD_Back; +DDSURFACEDESC2 DDSD_ZBuffer; + +DWORD DDZBufferCaps; +DWORD PaletteEntries[256]; +DWORD *Palette16BPP = NULL; +void *EmuScreenBuffer = NULL; // to implement pitch bug fix +DWORD rPitch = 0; +LPVOID rSurface = NULL; +static void SetPixFmt(LPDDSURFACEDESC2); +static void GetPixFmt(LPDDSURFACEDESC2); + +static HookEntry_Type ddHooks[]={ + {"DirectDrawCreate", (FARPROC)NULL, (FARPROC *)&pDirectDrawCreate, (FARPROC)extDirectDrawCreate}, + {"DirectDrawCreateEx", (FARPROC)NULL, (FARPROC *)&pDirectDrawCreateEx, (FARPROC)extDirectDrawCreateEx}, + {"DirectDrawEnumerateA", (FARPROC)NULL, (FARPROC *)&pDirectDrawEnumerate, (FARPROC)extDirectDrawEnumerate}, + {"DirectDrawEnumerateExA", (FARPROC)NULL, (FARPROC *)&pDirectDrawEnumerateEx, (FARPROC)extDirectDrawEnumerateEx}, + //{"DirectDrawEnumerateW", (FARPROC)NULL, (FARPROC *)&pDirectDrawEnumerateW, (FARPROC)extDirectDrawCreate}, + //{"DirectDrawEnumerateExW", (FARPROC)NULL, (FARPROC *)&pDirectDrawEnumerateExW, (FARPROC)extDirectDrawCreate}, + {0, NULL, 0, 0} // terminator +}; + +FARPROC Remap_ddraw_ProcAddress(LPCSTR proc, HMODULE hModule) +{ + FARPROC addr; + if (addr=RemapLibrary(proc, hModule, ddHooks)) return addr; + return NULL; +} + +/* ------------------------------------------------------------------------------ */ +// auxiliary (static) functions +/* ------------------------------------------------------------------------------ */ + +static void Stopper(char *s, int line) +{ + char sMsg[81]; + sprintf(sMsg,"break: \"%s\"", s); + MessageBox(0, sMsg, "break", MB_OK | MB_ICONEXCLAMATION); +} + +//#define STOPPER_TEST // comment out to eliminate +#ifdef STOPPER_TEST +#define STOPPER(s) Stopper(s, __LINE__) +#else +#define STOPPER(s) +#endif + +static char *sFourCC(DWORD fcc) +{ + static char sRet[5]; + char c; + int i; + char *t=&sRet[0]; + for(i=0; i<4; i++){ + c = fcc & (0xFF); + *t++ = isprint(c) ? c : '.'; + c = c >> 8; + } + *t = 0; + return sRet; +} + +static char *DumpPixelFormat(LPDDSURFACEDESC2 lpddsd) +{ + static char sBuf[512]; + char sItem[256]; + DWORD flags=lpddsd->ddpfPixelFormat.dwFlags; + sprintf(sBuf, " PixelFormat size=%d flags=%x(%s) BPP=%d", + lpddsd->dwSize, flags, ExplainPixelFormatFlags(flags), lpddsd->ddpfPixelFormat.dwRGBBitCount); + if (flags & DDPF_RGB) { + if (flags & DDPF_ALPHAPIXELS) { + sprintf(sItem, " RGBA=(%x,%x,%x,%x)", + lpddsd->ddpfPixelFormat.dwRBitMask, + lpddsd->ddpfPixelFormat.dwGBitMask, + lpddsd->ddpfPixelFormat.dwBBitMask, + lpddsd->ddpfPixelFormat.dwRGBAlphaBitMask); + } + else { + sprintf(sItem, " RGB=(%x,%x,%x)", + lpddsd->ddpfPixelFormat.dwRBitMask, + lpddsd->ddpfPixelFormat.dwGBitMask, + lpddsd->ddpfPixelFormat.dwBBitMask); + } + strcat(sBuf, sItem); + } + if (flags & DDPF_YUV) { + sprintf(sItem, " YUVA=(%x,%x,%x,%x)", + lpddsd->ddpfPixelFormat.dwYBitMask, + lpddsd->ddpfPixelFormat.dwUBitMask, + lpddsd->ddpfPixelFormat.dwVBitMask, + lpddsd->ddpfPixelFormat.dwYUVAlphaBitMask); + strcat(sBuf, sItem); + } + if (flags & DDPF_ZBUFFER) { + sprintf(sItem, " SdZSbL=(%x,%x,%x,%x)", + lpddsd->ddpfPixelFormat.dwStencilBitDepth, + lpddsd->ddpfPixelFormat.dwZBitMask, + lpddsd->ddpfPixelFormat.dwStencilBitMask, + lpddsd->ddpfPixelFormat.dwLuminanceAlphaBitMask); + strcat(sBuf, sItem); + } + if (flags & DDPF_ALPHA) { + sprintf(sItem, " LBdBlZ=(%x,%x,%x,%x)", + lpddsd->ddpfPixelFormat.dwLuminanceBitMask, + lpddsd->ddpfPixelFormat.dwBumpDvBitMask, + lpddsd->ddpfPixelFormat.dwBumpLuminanceBitMask, + lpddsd->ddpfPixelFormat.dwRGBZBitMask); + strcat(sBuf, sItem); + } + if (flags & DDPF_LUMINANCE) { + sprintf(sItem, " BMbMF=(%x,%x,%x,%x)", + lpddsd->ddpfPixelFormat.dwBumpDuBitMask, + lpddsd->ddpfPixelFormat.MultiSampleCaps.wBltMSTypes, + lpddsd->ddpfPixelFormat.MultiSampleCaps.wFlipMSTypes, + lpddsd->ddpfPixelFormat.dwYUVZBitMask); + strcat(sBuf, sItem); + } + if (flags & DDPF_BUMPDUDV) { + sprintf(sItem, " O=(%x)", + lpddsd->ddpfPixelFormat.dwOperations); + strcat(sBuf, sItem); + } + if (flags & DDPF_FOURCC) { + sprintf(sItem, " FourCC=%x(%s)", + lpddsd->ddpfPixelFormat.dwFourCC, sFourCC(lpddsd->ddpfPixelFormat.dwFourCC)); + strcat(sBuf, sItem); + } + return sBuf; +} + +static void LogSurfaceAttributes(LPDDSURFACEDESC lpddsd, char *label, int line) +{ + if(!IsTraceD) return; + OutTrace("SurfaceDesc: %s Flags=%x(%s)", + label, + lpddsd->dwFlags, ExplainFlags(lpddsd->dwFlags)); + if (lpddsd->dwFlags & DDSD_BACKBUFFERCOUNT) OutTrace(" BackBufferCount=%d", lpddsd->dwBackBufferCount); + if (lpddsd->dwFlags & DDSD_WIDTH) OutTrace(" Width=%d", lpddsd->dwWidth); + if (lpddsd->dwFlags & DDSD_HEIGHT) OutTrace(" Height=%d", lpddsd->dwHeight); + if (lpddsd->dwFlags & DDSD_PITCH) OutTrace(" Pitch=%d", lpddsd->lPitch); + if (lpddsd->dwFlags & DDSD_MIPMAPCOUNT) OutTrace(" MipMapCount=%d", lpddsd->dwMipMapCount); + if (lpddsd->dwFlags & DDSD_CAPS) { + OutTrace(" Caps=%x(%s)", lpddsd->ddsCaps.dwCaps, ExplainDDSCaps(lpddsd->ddsCaps.dwCaps)); + if(lpddsd->dwSize==sizeof(DDSURFACEDESC2)){ + LPDDSURFACEDESC2 lpddsd2=(LPDDSURFACEDESC2)lpddsd; + OutTrace(" Caps2=%x(%s)", lpddsd2->ddsCaps.dwCaps2, ExplainDDSCaps2(lpddsd2->ddsCaps.dwCaps2)); + OutTrace(" Caps3=%x(%s)", lpddsd2->ddsCaps.dwCaps3, ExplainDDSCaps3(lpddsd2->ddsCaps.dwCaps3)); + } + } + if (lpddsd->dwFlags & DDSD_CKDESTBLT ) OutTrace(" CKDestBlt=(%x,%x)", lpddsd->ddckCKDestBlt.dwColorSpaceLowValue, lpddsd->ddckCKDestBlt.dwColorSpaceHighValue); + if (lpddsd->dwFlags & DDSD_CKDESTOVERLAY ) OutTrace(" CKDestOverlay=(%x,%x)", lpddsd->ddckCKDestOverlay.dwColorSpaceLowValue, lpddsd->ddckCKDestOverlay.dwColorSpaceHighValue); + if (lpddsd->dwFlags & DDSD_CKSRCBLT ) OutTrace(" CKSrcBlt=(%x,%x)", lpddsd->ddckCKSrcBlt.dwColorSpaceLowValue, lpddsd->ddckCKSrcBlt.dwColorSpaceHighValue); + if (lpddsd->dwFlags & DDSD_CKSRCOVERLAY ) OutTrace(" CKSrcOverlay=(%x,%x)", lpddsd->ddckCKSrcOverlay.dwColorSpaceLowValue, lpddsd->ddckCKSrcOverlay.dwColorSpaceHighValue); + if (lpddsd->dwFlags & DDSD_PIXELFORMAT ) OutTrace("%s", DumpPixelFormat((LPDDSURFACEDESC2)lpddsd)); + if (lpddsd->dwFlags & DDSD_LPSURFACE) OutTrace(" Surface=%x", lpddsd->lpSurface); + OutTrace("\n"); +} + +static void DumpPixFmt(LPDDSURFACEDESC2 lpdds) +{ + OutTraceD("PixelFormat: lpddsd=%x %s\n", DumpPixelFormat(lpdds)); +} + +static void DumpSurfaceAttributes(LPDDSURFACEDESC lpddsd, char *label, int line) +{ + if(!IsDebug) return; + LogSurfaceAttributes(lpddsd, label, line); +} + +static void DescribeSurface(LPDIRECTDRAWSURFACE lpdds, int dxversion, char *label, int line) +{ + DDSURFACEDESC2 ddsd; + HRESULT res; + int dwSize = (dxversion<4)?sizeof(DDSURFACEDESC):sizeof(DDSURFACEDESC2); + memset(&ddsd, 0, dwSize); + ddsd.dwSize = dwSize; + if(dxversion<4){ + if (pGetSurfaceDesc1) + res=(*pGetSurfaceDesc1)(lpdds, (LPDDSURFACEDESC)&ddsd); + else + res=lpdds->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd); + } + else if(dxversion<7){ + if (pGetSurfaceDesc4) + res=(*pGetSurfaceDesc4)((LPDIRECTDRAWSURFACE2)lpdds, (LPDDSURFACEDESC2)&ddsd); + else + res=lpdds->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd); + } + else { + if (pGetSurfaceDesc7) + res=(*pGetSurfaceDesc7)((LPDIRECTDRAWSURFACE2)lpdds, &ddsd); + else + res=lpdds->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd); + } + if(res)return; + OutTrace("Surface %s: ddsd=%x dxversion=%d ", label, lpdds, dxversion); + LogSurfaceAttributes((LPDDSURFACEDESC)&ddsd, label, line); +} + +/* ------------------------------------------------------------------------------ */ +// auxiliary (static) functions for palette handling +/* ------------------------------------------------------------------------------ */ + +BOOL isPaletteUpdated; + +void mySetPalette(int dwstart, int dwcount, LPPALETTEENTRY lpentries) +{ + int i; + extern DXWNDSTATUS *pStatus; + + OutTraceD("mySetPalette DEBUG: BPP=%d GBitMask=%x count=%d\n", + dxw.ActualPixelFormat.dwRGBBitCount, dxw.ActualPixelFormat.dwGBitMask, dwcount); + + if(IsDebug){ + int idx; + OutTraceD("PaletteEntries: start=%d count=%d ", dwstart, dwcount); + for(idx=0; idxPalette[dwstart+idx]= lpentries[idx]; + + if (dxw.dwFlags3 & RGB2YUV){ + int idx; + for(idx=0; idx255) Y=255; + if (U<0) U=0; if(U>255) U=255; + if (V<0) V=0; if(V>255) V=255; + lpentries[dwstart+idx].peRed = (BYTE)Y; + lpentries[dwstart+idx].peGreen = (BYTE)U; + lpentries[dwstart+idx].peBlue = (BYTE)V; + } + } + + if (dxw.dwFlags3 & YUV2RGB){ + int idx; + for(idx=0; idx255) Y=255; + if (U<0) U=0; if(U>255) U=255; + if (V<0) V=0; if(V>255) V=255; + lpentries[dwstart+idx].peRed = (BYTE)Y; + lpentries[dwstart+idx].peGreen = (BYTE)U; + lpentries[dwstart+idx].peBlue = (BYTE)V; + } + } + + // actually, it should be like this: R/G/B = (red * 0.30) + (green * 0.59) + (blue * 0.11) + // (http://www.codeproject.com/Articles/66253/Converting-Colors-to-Gray-Shades) + + if (dxw.dwFlags3 & BLACKWHITE){ + for(i = 0; i < dwcount; i ++){ + DWORD grayscale; + //grayscale = ((DWORD)lpentries[i].peRed + (DWORD)lpentries[i].peGreen + (DWORD)lpentries[i].peBlue) / 3; + grayscale = (((DWORD)lpentries[i].peRed * 30) + ((DWORD)lpentries[i].peGreen * 59) + ((DWORD)lpentries[i].peBlue) * 11) / 100; + lpentries[i].peRed = lpentries[i].peGreen = lpentries[i].peBlue = (BYTE)grayscale; + } + } + + switch (dxw.ActualPixelFormat.dwRGBBitCount){ + case 32: + for(i = 0; i < dwcount; i ++){ + PaletteEntries[i + dwstart] = + (((DWORD)lpentries[i].peRed) << 16) + (((DWORD)lpentries[i].peGreen) << 8) + ((DWORD)lpentries[i].peBlue); + } + break; + case 16: + for(i = 0; i < dwcount; i ++){ + PaletteEntries[i + dwstart] = (dxw.ActualPixelFormat.dwGBitMask == 0x03E0) ? + (((DWORD)lpentries[i].peRed & 0xF8) << 8) + (((DWORD)lpentries[i].peGreen & 0xFC) << 3) + (((DWORD)lpentries[i].peBlue &0xF8) >> 3) + : + (((DWORD)lpentries[i].peRed & 0xF8) << 8) + (((DWORD)lpentries[i].peGreen & 0xF8) << 3) + (((DWORD)lpentries[i].peBlue &0xF8) >> 3); + } + break; + default: + OutTraceD("ASSERT: unsupported Color BPP=%d\n", dxw.ActualPixelFormat.dwRGBBitCount); + break; + } + + isPaletteUpdated = TRUE; +} + +void InitDDScreenParameters(LPDIRECTDRAW lpdd) +{ + HRESULT res; + DDSURFACEDESC ddsd; + ddsd.dwSize=sizeof(DDSURFACEDESC); + if(res=(*pGetDisplayMode)(lpdd, &ddsd)){ + OutTraceE("GetDisplayMode: ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + return; + } + + OutTraceD("InitDDScreenParameters: Actual %s\n", DumpPixelFormat((LPDDSURFACEDESC2)&ddsd)); + dxw.ActualPixelFormat=ddsd.ddpfPixelFormat; + if(dxw.VirtualPixelFormat.dwRGBBitCount==0) dxw.VirtualPixelFormat=ddsd.ddpfPixelFormat; + SetBltTransformations(); + return; +} + +void InitDSScreenParameters(LPDIRECTDRAWSURFACE lpdds) +{ + HRESULT res; + DDPIXELFORMAT p; + DDSURFACEDESC2 ddsd; + p.dwSize=sizeof(DDPIXELFORMAT); + if(res=(*pGetPixelFormat)(lpdds, &p)){ + OutTraceE("GetPixelFormat: ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + return; + } + + ddsd.ddpfPixelFormat = p; + OutTraceD("InitDSScreenParameters: Actual %s\n", DumpPixelFormat(&ddsd)); + dxw.ActualPixelFormat=p; + SetBltTransformations(); + return; +} + +void InitScreenParameters() +{ + DEVMODE CurrDevMode; + static int DoOnce = FALSE; + + if(DoOnce) return; + DoOnce = TRUE; + + // set default VGA mode 800x600 + // should I make it configurable ? (640x480, 800x600, 1024x768) + dxw.SetScreenSize(); // 800 x 600 by default + GetHookInfo()->Height=(short)dxw.GetScreenHeight(); + GetHookInfo()->Width=(short)dxw.GetScreenWidth(); + GetHookInfo()->ColorDepth=0; // unknown + GetHookInfo()->DXVersion=0; // unknown + GetHookInfo()->isLogging=(dxw.dwTFlags & OUTTRACE); + + if(!EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &CurrDevMode)){ + OutTraceE("EnumDisplaySettings: ERROR err=%d at %d\n", GetLastError(), __LINE__); + return; + } + memset(&dxw.ActualPixelFormat, 0, sizeof(DDPIXELFORMAT)); + // initialize to default null values, but dwRGBBitCount + dxw.ActualPixelFormat.dwRGBBitCount=CurrDevMode.dmBitsPerPel; + dxw.VirtualPixelFormat.dwRGBBitCount=CurrDevMode.dmBitsPerPel; // until set differently + OutTraceD("InitScreenParameters: RGBBitCount=%d\n", CurrDevMode.dmBitsPerPel); + SetBltTransformations(); + + return; +} + +void FixPixelFormat(int ColorDepth, DDPIXELFORMAT *pf) +{ + pf->dwFlags = DDPF_RGB; + switch(ColorDepth){ + case 8: + pf->dwFlags |= DDPF_PALETTEINDEXED8; + pf->dwRGBBitCount = 8; + pf->dwRBitMask = 0; + pf->dwGBitMask = 0; + pf->dwBBitMask = 0; + pf->dwRGBAlphaBitMask = 0x0000; + break; + case 16: + pf->dwRGBBitCount = 16; + if (dxw.dwFlags1 & USERGB565){ + pf->dwRBitMask = 0xf800; + pf->dwGBitMask = 0x07e0; + pf->dwBBitMask = 0x001f; + pf->dwRGBAlphaBitMask = 0x0000; + } + else { + if(!(dxw.dwFlags4 & NOALPHACHANNEL)) pf->dwFlags |= DDPF_ALPHAPIXELS; // v2.02.33,40 + pf->dwRBitMask = 0x7c00; + pf->dwGBitMask = 0x03e0; + pf->dwBBitMask = 0x001f; + pf->dwRGBAlphaBitMask = 0x8000; + } + break; + case 24: + pf->dwRGBBitCount = 24; + pf->dwRBitMask = 0x00FF0000; + pf->dwGBitMask = 0x0000FF00; + pf->dwBBitMask = 0x000000FF; + pf->dwRGBAlphaBitMask = 0x00000000; + break; + case 32: + if(!(dxw.dwFlags4 & NOALPHACHANNEL)) pf->dwFlags |= DDPF_ALPHAPIXELS; // v2.02.33 + pf->dwRGBBitCount = 32; + pf->dwRBitMask = 0x00FF0000; + pf->dwGBitMask = 0x0000FF00; + pf->dwBBitMask = 0x000000FF; + pf->dwRGBAlphaBitMask = 0xFF000000; + break; + } +} + +int HookDirectDraw(HMODULE module, int version) +{ + HINSTANCE hinst; + void *tmp; + const GUID dd7 = {0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b}; + + if(dxw.dwFlags2 & SETCOMPATIBILITY){ + typedef HRESULT (WINAPI *SetAppCompatData_Type)(DWORD, DWORD); + SetAppCompatData_Type pSetAppCompatData; + HRESULT res; + + hinst=LoadLibrary("ddraw.dll"); + pSetAppCompatData=(SetAppCompatData_Type)(*pGetProcAddress)(hinst, "SetAppCompatData"); + if(pSetAppCompatData) { + res=(*pSetAppCompatData)(2, 0); + OutTraceD("HookDirectDraw: SetAppCompatData(2,0) ret=%x(%s)\n", res, ExplainDDError(res)); + } + FreeLibrary(hinst); + } + + OutTraceB("HookDirectDraw version=%d\n", version); //GHO + switch(version){ + case 0: // automatic + tmp = HookAPI(module, "ddraw.dll", NULL, "DirectDrawCreate", extDirectDrawCreate); + if(tmp) pDirectDrawCreate = (DirectDrawCreate_Type)tmp; + tmp = HookAPI(module, "ddraw.dll", NULL, "DirectDrawCreateEx", extDirectDrawCreateEx); + if(tmp) pDirectDrawCreateEx = (DirectDrawCreateEx_Type)tmp; + tmp = HookAPI(module, "ddraw.dll", NULL, "DirectDrawEnumerateA", extDirectDrawEnumerate); + if(tmp) pDirectDrawEnumerate = (DirectDrawEnumerate_Type)tmp; + tmp = HookAPI(module, "ddraw.dll", NULL, "DirectDrawEnumerateExA", extDirectDrawEnumerateEx); + if(tmp) pDirectDrawEnumerateEx = (DirectDrawEnumerateEx_Type)tmp; + break; + case 1: + case 2: + case 3: + case 5: + case 6: + hinst = LoadLibrary("ddraw.dll"); + pDirectDrawEnumerate = + (DirectDrawEnumerate_Type)GetProcAddress(hinst, "DirectDrawEnumerateA"); + pDirectDrawCreate = + (DirectDrawCreate_Type)GetProcAddress(hinst, "DirectDrawCreate"); + if(pDirectDrawCreate){ + LPDIRECTDRAW lpdd; + BOOL res; + HookAPI(module, "ddraw.dll", pDirectDrawCreate, "DirectDrawCreate", extDirectDrawCreate); + HookAPI(module, "ddraw.dll", pDirectDrawEnumerate, "DirectDrawEnumerateA", extDirectDrawEnumerate); + res=extDirectDrawCreate(0, &lpdd, 0); + if (res){ + OutTraceE("DirectDrawCreate: ERROR res=%x(%s)\n", res, ExplainDDError(res)); + } + lpdd->Release(); + } + break; + case 7: + hinst = LoadLibrary("ddraw.dll"); + pDirectDrawEnumerate = + (DirectDrawEnumerate_Type)GetProcAddress(hinst, "DirectDrawEnumerateA"); + pDirectDrawEnumerateEx = + (DirectDrawEnumerateEx_Type)GetProcAddress(hinst, "DirectDrawEnumerateExA"); + pDirectDrawCreate = + (DirectDrawCreate_Type)GetProcAddress(hinst, "DirectDrawCreate"); + if(pDirectDrawCreate){ + LPDIRECTDRAW lpdd; + BOOL res; + HookAPI(module, "ddraw.dll", pDirectDrawCreate, "DirectDrawCreate", extDirectDrawCreate); + HookAPI(module, "ddraw.dll", pDirectDrawEnumerate, "DirectDrawEnumerateA", extDirectDrawEnumerate); + HookAPI(module, "ddraw.dll", pDirectDrawEnumerateEx, "DirectDrawEnumerateExA", extDirectDrawEnumerateEx); + res=extDirectDrawCreate(0, &lpdd, 0); + if (res) OutTraceE("DirectDrawCreate: ERROR res=%x(%s)\n", res, ExplainDDError(res)); + lpdd->Release(); + } + pDirectDrawCreateEx = + (DirectDrawCreateEx_Type)GetProcAddress(hinst, "DirectDrawCreateEx"); + if(pDirectDrawCreateEx){ + LPDIRECTDRAW lpdd; + BOOL res; + HookAPI(module, "ddraw.dll", pDirectDrawCreateEx, "DirectDrawCreateEx", extDirectDrawCreateEx); + res=extDirectDrawCreateEx(0, &lpdd, dd7, 0); + if (res) OutTraceE("DirectDrawCreateEx: ERROR res=%x(%s)\n", res, ExplainDDError(res)); + lpdd->Release(); + } + break; + } + + if(pDirectDrawCreate || pDirectDrawCreateEx) return 1; + return 0; +} + +Unlock4_Type pUnlockMethod(LPDIRECTDRAWSURFACE lpdds) +{ + char sMsg[81]; + void * extUnlock; + __try{ // v2.02.31: catch some possible exception (i.e. Abomination in EMULATION mode) + extUnlock=(void *)*(DWORD *)(*(DWORD *)lpdds + 128); + } + __except (EXCEPTION_EXECUTE_HANDLER){ + OutTraceE("Exception at %d\n",__LINE__); + return (Unlock4_Type)pUnlock1; + }; + if(extUnlock==(void *)extUnlock1) return (Unlock4_Type)pUnlock1; + if(extUnlock==(void *)extUnlock4) return (Unlock4_Type)pUnlock4; + if(extUnlock==(void *)extUnlockDir1) return (Unlock4_Type)pUnlock1; + if(extUnlock==(void *)extUnlockDir4) return (Unlock4_Type)pUnlock4; + sprintf_s(sMsg, 80, "pUnlockMethod: pUnlock(%x) can't match %x\n", lpdds, extUnlock); + OutTraceD(sMsg); + if (IsAssertEnabled) MessageBox(0, sMsg, "pUnlockMethod", MB_OK | MB_ICONEXCLAMATION); + if (pUnlock4) return pUnlock4; + return (Unlock4_Type)pUnlock1; +} + +CreateSurface2_Type pCreateSurfaceMethod(LPDIRECTDRAWSURFACE lpdds) +{ + char sMsg[81]; + void * extUnlock; + extUnlock=(void *)*(DWORD *)(*(DWORD *)lpdds + 128); + if(extUnlock==(void *)extUnlock1) return (CreateSurface2_Type)pCreateSurface1; + if(extUnlock==(void *)extUnlock4) return (CreateSurface2_Type)pCreateSurface4; + if(extUnlock==(void *)extUnlockDir1) return (CreateSurface2_Type)pCreateSurface1; + if(extUnlock==(void *)extUnlockDir4) return (CreateSurface2_Type)pCreateSurface4; + sprintf_s(sMsg, 80, "pCreateSurfaceMethod: pUnlock(%x) can't match %x\n", lpdds, extUnlock); + OutTraceD(sMsg); + if (IsAssertEnabled) MessageBox(0, sMsg, "pCreateSurfaceMethod", MB_OK | MB_ICONEXCLAMATION); + if (pCreateSurface4) return pCreateSurface4; + return (CreateSurface2_Type)pCreateSurface1; +} + +int SurfaceDescrSize(LPDIRECTDRAWSURFACE lpdds) +{ + char sMsg[81]; + void * extUnlock; + extUnlock=(void *)*(DWORD *)(*(DWORD *)lpdds + 128); + if(extUnlock==(void *)extUnlock1) return sizeof(DDSURFACEDESC); + if(extUnlock==(void *)extUnlock4) return sizeof(DDSURFACEDESC2); + if(extUnlock==(void *)extUnlockDir1) return sizeof(DDSURFACEDESC); + if(extUnlock==(void *)extUnlockDir4) return sizeof(DDSURFACEDESC2); + sprintf_s(sMsg, 80, "pCreateSurfaceMethod: pUnlock(%x) can't match %x\n", lpdds, extUnlock); + OutTraceD(sMsg); + if (IsAssertEnabled) MessageBox(0, sMsg, "SurfaceDescrSize", MB_OK | MB_ICONEXCLAMATION); + return sizeof(DDSURFACEDESC); +} + +int lpddsHookedVersion(LPDIRECTDRAWSURFACE lpdds) +{ + char sMsg[81]; + void * extGetCaps; + + __try{ + extGetCaps=(void *)*(DWORD *)(*(DWORD *)lpdds + 56); + } + __except (EXCEPTION_EXECUTE_HANDLER){ + extGetCaps=NULL; + }; + if(extGetCaps==(void *)extGetCaps1S) return 1; + if(extGetCaps==(void *)extGetCaps2S) return 2; + if(extGetCaps==(void *)extGetCaps3S) return 3; + if(extGetCaps==(void *)extGetCaps4S) return 4; + if(extGetCaps==(void *)extGetCaps7S) return 7; + sprintf_s(sMsg, 80, "lpddsHookedVersion(%x) can't match %x\n", lpdds, extGetCaps); + OutTraceD(sMsg); + if (IsAssertEnabled) MessageBox(0, sMsg, "lpddsHookedVersion", MB_OK | MB_ICONEXCLAMATION); + return 0; +} + +int lpddHookedVersion(LPDIRECTDRAW lpdd) +{ + char sMsg[81]; + void * extCreateSurface; + + __try{ + extCreateSurface=(void *)*(DWORD *)(*(DWORD *)lpdd + 24); + } + __except (EXCEPTION_EXECUTE_HANDLER){ + extCreateSurface=NULL; + }; + if(extCreateSurface==(void *)extCreateSurface7) return 7; + if(extCreateSurface==(void *)extCreateSurface4) return 4; + if(extCreateSurface==(void *)extCreateSurface2) return 2; + if(extCreateSurface==(void *)extCreateSurface1) return 1; + sprintf_s(sMsg, 80, "lpddHookedVersion(%x) can't match %x\n", lpdd, extCreateSurface); + OutTraceD(sMsg); + if (IsAssertEnabled) MessageBox(0, sMsg, "lpddHookedVersion", MB_OK | MB_ICONEXCLAMATION); + return 0; +} + +/* ------------------------------------------------------------------ */ + +// SetPixFmt: builds a pixel format descriptor when no one is specified, starting from the color depth, the current +// desktop pixel format (when the color depth is the same) or the config flags + +static void SetPixFmt(LPDDSURFACEDESC2 lpdd) +{ + OutTraceD("SetPixFmt: BPP=%d Use565=%d NoAlpha=%d\n", + dxw.VirtualPixelFormat.dwRGBBitCount, + dxw.dwFlags1 & USERGB565 ? 1:0, + dxw.dwFlags4 & NOALPHACHANNEL ? 1:0); + + memset(&lpdd->ddpfPixelFormat,0,sizeof(DDPIXELFORMAT)); + lpdd->ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT); + + switch (dxw.VirtualPixelFormat.dwRGBBitCount) + { + case 8: + case 16: + case 24: + case 32: + FixPixelFormat(dxw.VirtualPixelFormat.dwRGBBitCount, &lpdd->ddpfPixelFormat); + break; + default: + OutTraceE("CreateSurface ERROR: Unsupported resolution ColorBPP=%d\n", dxw.VirtualPixelFormat.dwRGBBitCount); + break; + } + + + // remember current virtual settings + dxw.VirtualPixelFormat=lpdd->ddpfPixelFormat; + OutTraceD("SetPixFmt: %s\n", DumpPixelFormat(lpdd)); +} + +// retrieves the stored pixel format + +static void GetPixFmt(LPDDSURFACEDESC2 lpdd) +{ + lpdd->ddpfPixelFormat = dxw.VirtualPixelFormat; + OutTraceD("GetPixFmt: %s\n", DumpPixelFormat(lpdd)); +} + +/* ------------------------------------------------------------------ */ +// hook query functions that determines the object versioning .... +/* ------------------------------------------------------------------ */ + +int Set_dwSize_From_Surface(LPDIRECTDRAWSURFACE lpdds) +{ + int dxversion; + if (lpdds==NULL || + lpdds==lpDDSEmu_Prim || + lpdds==lpDDSEmu_Back + ) + dxversion=lpddHookedVersion(lpPrimaryDD); // v2.01.87-v2.02.31 fix + else + dxversion=lpddsHookedVersion(lpdds); + + return (dxversion < 4) ? sizeof(DDSURFACEDESC) : sizeof(DDSURFACEDESC2); +} + +int Set_dwSize_From_DDraw(LPDIRECTDRAW lpdd) +{ + return (lpddHookedVersion(lpdd) < 4) ? sizeof(DDSURFACEDESC) : sizeof(DDSURFACEDESC2); +} + +static void HookDDSession(LPDIRECTDRAW *lplpdd, int dxversion) +{ + OutTraceD("Hooking directdraw session dd=%x dxversion=%d thread_id=%x\n", + *lplpdd, dxversion, GetCurrentThreadId()); + + // IDIrectDraw::QueryInterface + SetHook((void *)(**(DWORD **)lplpdd), extQueryInterfaceD, (void **)&pQueryInterfaceD, "QueryInterface(D)"); + // IDIrectDraw::Release + SetHook((void *)(**(DWORD **)lplpdd + 8), extReleaseD, (void **)&pReleaseD, "Release(D)"); + // IDIrectDraw::CreateClipper + SetHook((void *)(**(DWORD **)lplpdd + 16), extCreateClipper, (void **)&pCreateClipper, "CreateClipper(D)"); + // IDIrectDraw::CreatePalette + SetHook((void *)(**(DWORD **)lplpdd + 20), extCreatePalette, (void **)&pCreatePalette, "CreatePalette(D)"); + // IDIrectDraw::CreateSurface + switch(dxversion) { + case 1: + SetHook((void *)(**(DWORD **)lplpdd + 24), extCreateSurface1, (void **)&pCreateSurface1, "CreateSurface(S1)"); + break; + case 2: + SetHook((void *)(**(DWORD **)lplpdd + 24), extCreateSurface2, (void **)&pCreateSurface2, "CreateSurface(S2)"); + break; + case 4: + SetHook((void *)(**(DWORD **)lplpdd + 24), extCreateSurface4, (void **)&pCreateSurface4, "CreateSurface(S4)"); + break; + case 7: + SetHook((void *)(**(DWORD **)lplpdd + 24), extCreateSurface7, (void **)&pCreateSurface7, "CreateSurface(S7)"); + break; + } + // IDIrectDraw::DuplicateSurface + SetHook((void *)(**(DWORD **)lplpdd + 28), extDuplicateSurface, (void **)&pDuplicateSurface, "DuplicateSurface(D)"); + // IDIrectDraw::EnumDisplayModes + switch(dxversion) { + case 1: + case 2: + SetHook((void *)(**(DWORD **)lplpdd + 32), extEnumDisplayModes1, (void **)&pEnumDisplayModes1, "EnumDisplayModes(D1)"); + break; + case 4: + case 7: + SetHook((void *)(**(DWORD **)lplpdd + 32), extEnumDisplayModes4, (void **)&pEnumDisplayModes4, "EnumDisplayModes(D4)"); + break; + } + // IDIrectDraw::FlipToGDISurface + SetHook((void *)(**(DWORD **)lplpdd + 40), extFlipToGDISurface, (void **)&pFlipToGDISurface, "FlipToGDISurface(D)"); + // IDIrectDraw::GetDisplayMode + SetHook((void *)(**(DWORD **)lplpdd + 48), extGetDisplayMode, (void **)&pGetDisplayMode, "GetDisplayMode(D)"); + // IDIrectDraw::GetGDISurface + SetHook((void *)(**(DWORD **)lplpdd + 56), extGetGDISurface, (void **)&pGetGDISurface, "GetGDISurface(D)"); + // IDIrectDraw::Initialize + SetHook((void *)(**(DWORD **)lplpdd + 72), extInitialize, (void **)&pInitialize, "Initialize(D)"); + // IDIrectDraw::SetCooperativeLevel + SetHook((void *)(**(DWORD **)lplpdd + 80), extSetCooperativeLevel, (void **)&pSetCooperativeLevel, "SetCooperativeLevel(D)"); + // IDIrectDraw::SetDisplayMode + if (dxversion > 1) + SetHook((void *)(**(DWORD **)lplpdd + 84), extSetDisplayMode2, (void **)&pSetDisplayMode2, "SetDisplayMode(D2)"); + else + SetHook((void *)(**(DWORD **)lplpdd + 84), extSetDisplayMode1, (void **)&pSetDisplayMode1, "SetDisplayMode(D1)"); + // IDIrectDraw::WaitForVerticalBlank + SetHook((void *)(**(DWORD **)lplpdd + 88), extWaitForVerticalBlank, (void **)&pWaitForVerticalBlank, "WaitForVerticalBlank(D)"); + // IDIrectDraw::TestCooperativeLevel + if (dxversion >= 4) + SetHook((void *)(**(DWORD **)lplpdd + 104), extTestCooperativeLevel, (void **)&pTestCooperativeLevel, "TestCooperativeLevel(D)"); + + if (!(dxw.dwTFlags & OUTPROXYTRACE)) return; + // Just proxed ... + + // IDIrectDraw::AddRef + SetHook((void *)(**(DWORD **)lplpdd + 4), extAddRefDProxy, (void **)&pAddRefD, "AddRef(D)"); + // IDIrectDraw::Compact + SetHook((void *)(**(DWORD **)lplpdd + 12), extCompactProxy, (void **)&pCompact, "Compact(D)"); + // IDIrectDraw::EnumSurfaces + if (dxversion < 4) + SetHook((void *)(**(DWORD **)lplpdd + 36), extEnumSurfacesProxy1, (void **)&pEnumSurfaces1, "EnumSurfaces(D1)"); + else + SetHook((void *)(**(DWORD **)lplpdd + 36), extEnumSurfacesProxy4, (void **)&pEnumSurfaces4, "EnumSurfaces(D4)"); + // IDIrectDraw::GetCaps + SetHook((void *)(**(DWORD **)lplpdd + 44), extGetCapsD, (void **)&pGetCapsD, "GetCaps(D)"); + // IDIrectDraw::GetFourCCCodes + SetHook((void *)(**(DWORD **)lplpdd + 52), extGetFourCCCodesProxy, (void **)&pGetFourCCCodes, "GetFourCCCodes(D)"); + // IDIrectDraw::GetMonitorFrequency + SetHook((void *)(**(DWORD **)lplpdd + 60), extGetMonitorFrequencyProxy, (void **)&pGetMonitorFrequency, "GetMonitorFrequency(D)"); + // IDIrectDraw::GetScanLine + SetHook((void *)(**(DWORD **)lplpdd + 64), extGetScanLineProxy, (void **)&pGetScanLine, "GetScanLine(D)"); + // IDIrectDraw::GetVerticalBlankStatus + SetHook((void *)(**(DWORD **)lplpdd + 68), extGetVerticalBlankStatusProxy, (void **)&pGetVerticalBlankStatus, "GetVerticalBlankStatus(D)"); + // IDIrectDraw::RestoreDisplayMode + SetHook((void *)(**(DWORD **)lplpdd + 76), extRestoreDisplayModeProxy, (void **)&pRestoreDisplayMode, "RestoreDisplayMode(D)"); + // IDIrectDraw::GetAvailableVidMem + if (dxversion >= 2) + SetHook((void *)(**(DWORD **)lplpdd + 92), extGetAvailableVidMemProxy, (void **)&pGetAvailableVidMem, "GetAvailableVidMem(D)"); + if (dxversion >= 4){ + // IDIrectDraw::GetSurfaceFromDC + SetHook((void *)(**(DWORD **)lplpdd + 96), extGetSurfaceFromDCProxy, (void **)&pGetSurfaceFromDC, "GetSurfaceFromDC(D)"); + // IDIrectDraw::RestoreAllSurfaces + SetHook((void *)(**(DWORD **)lplpdd + 100), extRestoreAllSurfacesProxy, (void **)&pRestoreAllSurfaces, "RestoreAllSurfaces(D)"); + // IDIrectDraw::GetDeviceIdentifier + SetHook((void *)(**(DWORD **)lplpdd + 108), extGetDeviceIdentifierProxy, (void **)&pGetDeviceIdentifier, "GetDeviceIdentifier(D)"); + } +} + +static void HookDDClipper(LPDIRECTDRAWCLIPPER FAR* lplpDDClipper) +{ + OutTraceD("Hooking directdraw clipper dd=%x\n", *lplpDDClipper); + + // IDirectDrawClipper::Release + SetHook((void *)(**(DWORD **)lplpDDClipper + 8), extReleaseC, (void **)&pReleaseC, "Release(C)"); + + if (!(dxw.dwTFlags & OUTPROXYTRACE)) return; + // Just proxed ... + + // IDirectDrawClipper::QueryInterface + SetHook((void *)(**(DWORD **)lplpDDClipper), extQueryInterfaceCProxy, (void **)&pQueryInterfaceC, "QueryInterface(C)"); + // IDirectDrawClipper::AddRef + SetHook((void *)(**(DWORD **)lplpDDClipper + 4), extAddRefCProxy, (void **)&pAddRefC, "AddRef(C)"); + // IDirectDrawClipper::GetClipList + SetHook((void *)(**(DWORD **)lplpDDClipper + 12), extGetClipListProxy, (void **)&pGetClipList, "GetClipList(C)"); + // IDirectDrawClipper::GetHWnd + SetHook((void *)(**(DWORD **)lplpDDClipper + 16), extGetHWndProxy, (void **)&pGetHWnd, "GetHWnd(C)"); + // IDirectDrawClipper::Initialize + SetHook((void *)(**(DWORD **)lplpDDClipper + 20), extInitializeCProxy, (void **)&pInitializeC, "Initialize(C)"); + // IDirectDrawClipper::IsClipListChanged + SetHook((void *)(**(DWORD **)lplpDDClipper + 24), extIsClipListChangedProxy, (void **)&pIsClipListChanged, "IsClipListChanged(C)"); + // IDirectDrawClipper::SetClipList + SetHook((void *)(**(DWORD **)lplpDDClipper + 28), extSetClipListProxy, (void **)&pSetClipList, "SetClipList(C)"); + // IDirectDrawClipper::SetHWnd + SetHook((void *)(**(DWORD **)lplpDDClipper + 32), extSetHWndProxy, (void **)&pSetHWnd, "SetHWnd(C)"); + + return; +} + +static void HookDDPalette(LPDIRECTDRAWPALETTE FAR* lplpDDPalette) +{ + OutTraceD("Hooking directdraw palette dd=%x\n", *lplpDDPalette); + + /*** IDirectDrawPalette methods ***/ + // IDirectDrawPalette::Release + SetHook((void *)(**(DWORD **)lplpDDPalette + 8), extReleaseP, (void **)&pReleaseP, "Release(P)"); + // IDirectDrawPalette::SetEntries + SetHook((void *)(**(DWORD **)lplpDDPalette + 24), extSetEntries, (void **)&pSetEntries, "SetEntries(P)"); + + if (!(dxw.dwTFlags & OUTPROXYTRACE)) return; + + // IDirectDrawPalette::QueryInterface + SetHook((void *)(**(DWORD **)lplpDDPalette), extQueryInterfacePProxy, (void **)&pQueryInterfaceP, "QueryInterface(P)"); + // IDirectDrawPalette::AddRef + SetHook((void *)(**(DWORD **)lplpDDPalette + 4), extAddRefPProxy, (void **)&pAddRefP, "AddRef(P)"); + // IDirectDrawPalette::GetCaps + SetHook((void *)(**(DWORD **)lplpDDPalette + 12), extGetCapsPProxy, (void **)&pGetCapsP, "GetCaps(P)"); + // IDirectDrawPalette::GetEntries + SetHook((void *)(**(DWORD **)lplpDDPalette + 16), extGetEntriesProxy, (void **)&pGetEntries, "GetEntries(P)"); + + return; +} + +static void HookDDSurfacePrim(LPDIRECTDRAWSURFACE *lplpdds, int dxversion) +{ + OutTraceD("Hooking surface as primary dds=%x dxversion=%d thread_id=%x\n", + *lplpdds, dxversion, GetCurrentThreadId()); + + // IDirectDrawSurface::Query + SetHook((void *)(**(DWORD **)lplpdds), extQueryInterfaceS, (void **)&pQueryInterfaceS, "QueryInterface(S)"); + // IDirectDrawSurface::Release + SetHook((void *)(**(DWORD **)lplpdds + 8), extReleaseS, (void **)&pReleaseS, "Release(S)"); + // IDirectDrawSurface::AddAttachedSurface + SetHook((void *)(**(DWORD **)lplpdds + 12), extAddAttachedSurface, (void **)&pAddAttachedSurface, "AddAttachedSurface(S)"); + // IDirectDrawSurface::Blt + SetHook((void *)(**(DWORD **)lplpdds + 20), extBlt, (void **)&pBlt, "Blt(S)"); + // IDirectDrawSurface::BltFast + SetHook((void *)(**(DWORD **)lplpdds + 28), extBltFast, (void **)&pBltFast, "BltFast(S)"); + // IDirectDrawSurface::DeleteAttachedSurface + SetHook((void *)(**(DWORD **)lplpdds + 32), extDeleteAttachedSurface, (void **)&pDeleteAttachedSurface, "DeleteAttachedSurface(S)"); + // IDirectDrawSurface::EnumAttachedSurfaces + SetHook((void *)(**(DWORD **)lplpdds + 36), extEnumAttachedSurfaces, (void **)&pEnumAttachedSurfaces, "EnumAttachedSurfaces(S)"); + // IDirectDrawSurface::Flip + SetHook((void *)(**(DWORD **)lplpdds + 44), extFlip, (void **)&pFlip, "Flip(S)"); + // IDirectDrawSurface::GetAttachedSurface + switch(dxversion) { + case 1: + case 2: + SetHook((void *)(**(DWORD **)lplpdds + 48), extGetAttachedSurface1, (void **)&pGetAttachedSurface1, "GetAttachedSurface(S1)"); + break; + case 3: + SetHook((void *)(**(DWORD **)lplpdds + 48), extGetAttachedSurface3, (void **)&pGetAttachedSurface3, "GetAttachedSurface(S3)"); + break; + case 4: + SetHook((void *)(**(DWORD **)lplpdds + 48), extGetAttachedSurface4, (void **)&pGetAttachedSurface4, "GetAttachedSurface(S4)"); + break; + case 7: + SetHook((void *)(**(DWORD **)lplpdds + 48), extGetAttachedSurface7, (void **)&pGetAttachedSurface7, "GetAttachedSurface(S7)"); + break; + } + // IDirectDrawSurface::GetCaps + switch(dxversion) { + case 1: + SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps1S, (void **)&pGetCaps1S, "GetCaps(S1)"); + break; + case 2: + SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps2S, (void **)&pGetCaps2S, "GetCaps(S2)"); + break; + case 3: + SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps3S, (void **)&pGetCaps3S, "GetCaps(S3)"); + break; + case 4: + SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps4S, (void **)&pGetCaps4S, "GetCaps(S4)"); + break; + case 7: + SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps7S, (void **)&pGetCaps7S, "GetCaps(S7)"); + break; + } + // IDirectDrawSurface::GetColorKey + SetHook((void *)(**(DWORD **)lplpdds + 64), extGetColorKey, (void **)&pGetColorKey, "GetColorKey(S)"); + // IDirectDrawSurface::GetPalette + SetHook((void *)(**(DWORD **)lplpdds + 80), extGetPalette, (void **)&pGetPalette, "GetPalette(S)"); + // IDirectDrawSurface::GetPixelFormat + SetHook((void *)(**(DWORD **)lplpdds + 84), extGetPixelFormat, (void **)&pGetPixelFormat, "GetPixelFormat(S)"); + // IDirectDrawSurface::GetSurfaceDesc + switch(dxversion) { + case 1: + case 2: + case 3: + SetHook((void *)(**(DWORD **)lplpdds + 88), extGetSurfaceDesc1, (void **)&pGetSurfaceDesc1, "GetSurfaceDesc(S1)"); + break; + case 4: + SetHook((void *)(**(DWORD **)lplpdds + 88), extGetSurfaceDesc2, (void **)&pGetSurfaceDesc4, "GetSurfaceDesc(S4)"); + break; + case 7: + SetHook((void *)(**(DWORD **)lplpdds + 88), extGetSurfaceDesc7, (void **)&pGetSurfaceDesc7, "GetSurfaceDesc(S7)"); + break; + } + // IDirectDrawSurface::SetClipper + SetHook((void *)(**(DWORD **)lplpdds + 112), extSetClipper, (void **)&pSetClipper, "SetClipper(S)"); + // IDirectDrawSurface::SetColorKey + SetHook((void *)(**(DWORD **)lplpdds + 116), extSetColorKey, (void **)&pSetColorKey, "SetColorKey(S)"); + // IDirectDrawSurface::SetPalette + SetHook((void *)(**(DWORD **)lplpdds + 124), extSetPalette, (void **)&pSetPalette, "SetPalette(S)"); + // IDirectDrawSurface::GetDC + SetHook((void *)(**(DWORD **)lplpdds + 68), extGetDC, (void **)&pGetDC, "GetDC(S)"); + // IDirectDrawSurface::ReleaseDC + SetHook((void *)(**(DWORD **)lplpdds + 104), extReleaseDC, (void **)&pReleaseDC, "ReleaseDC(S)"); + if (dxw.dwFlags1 & (EMULATESURFACE|EMULATEBUFFER)){ + // IDirectDrawSurface::Lock + SetHook((void *)(**(DWORD **)lplpdds + 100), extLock, (void **)&pLock, "Lock(S)"); + // IDirectDrawSurface::Unlock + if (dxversion < 4) + SetHook((void *)(**(DWORD **)lplpdds + 128), extUnlock1, (void **)&pUnlock1, "Unlock(S1)"); + else + SetHook((void *)(**(DWORD **)lplpdds + 128), extUnlock4, (void **)&pUnlock4, "Unlock(S4)"); + } + else { + // IDirectDrawSurface::Lock + SetHook((void *)(**(DWORD **)lplpdds + 100), extLockDir, (void **)&pLock, "Lock(S)"); + // IDirectDrawSurface::Unlock + if (dxversion < 4) + SetHook((void *)(**(DWORD **)lplpdds + 128), extUnlockDir1, (void **)&pUnlock1, "Unlock(S1)"); + else + SetHook((void *)(**(DWORD **)lplpdds + 128), extUnlockDir4, (void **)&pUnlock4, "Unlock(S4)"); + } + + if (!(dxw.dwTFlags & OUTPROXYTRACE)) return; + + // Just proxed ... + + // IDirectDrawSurface::AddRef + SetHook((void *)(**(DWORD **)lplpdds + 4), extAddRefSProxy, (void **)&pAddRefS, "AddRef(S)"); + // IDirectDrawSurface::AddOverlayDirtyRect + SetHook((void *)(**(DWORD **)lplpdds + 16), extAddOverlayDirtyRectProxy, (void **)&pAddOverlayDirtyRect, "AddOverlayDirtyRect(S)"); + // IDirectDrawSurface::BltBatch + SetHook((void *)(**(DWORD **)lplpdds + 24), extBltBatchProxy, (void **)&pBltBatch, "BltBatch(S)"); + // IDirectDrawSurface::EnumOverlayZOrders + SetHook((void *)(**(DWORD **)lplpdds + 40), extEnumOverlayZOrdersProxy, (void **)&pEnumOverlayZOrders, "EnumOverlayZOrders(S)"); + // IDirectDrawSurface::GetBltStatus + SetHook((void *)(**(DWORD **)lplpdds + 52), extGetBltStatusProxy, (void **)&pGetBltStatus, "GetBltStatus(S)"); + // IDirectDrawSurface::GetClipper + SetHook((void *)(**(DWORD **)lplpdds + 60), extGetClipperProxy, (void **)&pGetClipper, "GetClipper(S)"); + // IDirectDrawSurface::GetFlipStatus + SetHook((void *)(**(DWORD **)lplpdds + 72), extGetFlipStatusProxy, (void **)&pGetFlipStatus, "GetFlipStatus(S)"); + // IDirectDrawSurface::GetOverlayPosition + SetHook((void *)(**(DWORD **)lplpdds + 76), extGetOverlayPositionProxy, (void **)&pGetOverlayPosition, "GetOverlayPosition(S)"); + // IDirectDrawSurface::IsLost + SetHook((void *)(**(DWORD **)lplpdds + 96), extIsLostProxy, (void **)&pIsLost, "IsLost(S)"); + // IDirectDrawSurface::Restore + SetHook((void *)(**(DWORD **)lplpdds + 108), extRestoreProxy, (void **)&pRestore, "Restore(S)"); + // IDirectDrawSurface::SetOverlayPosition + SetHook((void *)(**(DWORD **)lplpdds + 120), extSetOverlayPositionProxy, (void **)&pSetOverlayPosition, "SetOverlayPosition(S)"); + // IDirectDrawSurface::UpdateOverlay + SetHook((void *)(**(DWORD **)lplpdds + 132), extUpdateOverlayProxy, (void **)&pUpdateOverlay, "UpdateOverlay(S)"); + // IDirectDrawSurface::UpdateOverlayDisplay + SetHook((void *)(**(DWORD **)lplpdds + 136), extUpdateOverlayDisplayProxy, (void **)&pUpdateOverlayDisplay, "UpdateOverlayDisplay(S)"); + // IDirectDrawSurface::UpdateOverlayZOrder + SetHook((void *)(**(DWORD **)lplpdds + 140), extUpdateOverlayZOrderProxy, (void **)&pUpdateOverlayZOrder, "UpdateOverlayZOrder(S)"); +} + +static void HookDDSurfaceGeneric(LPDIRECTDRAWSURFACE *lplpdds, int dxversion) +{ + OutTraceD("Hooking surface as generic dds=%x dxversion=%d thread_id=%x\n", + *lplpdds, dxversion, GetCurrentThreadId()); + + // IDirectDrawSurface::QueryInterface + SetHook((void *)(**(DWORD **)lplpdds), extQueryInterfaceS, (void **)&pQueryInterfaceS, "QueryInterface(S)"); + // IDirectDrawSurface::Release + SetHook((void *)(**(DWORD **)lplpdds + 8), extReleaseS, (void **)&pReleaseS, "Release(S)"); + // IDirectDrawSurface::AddAttachedSurface + SetHook((void *)(**(DWORD **)lplpdds + 12), extAddAttachedSurface, (void **)&pAddAttachedSurface, "AddAttachedSurface(S)"); + // IDirectDrawSurface::Flip + SetHook((void *)(**(DWORD **)lplpdds + 44), extFlip, (void **)&pFlip, "Flip(S)"); + // IDirectDrawSurface::Blt + SetHook((void *)(**(DWORD **)lplpdds + 20), extBlt, (void **)&pBlt, "Blt(S)"); + // IDirectDrawSurface::BltFast + SetHook((void *)(**(DWORD **)lplpdds + 28), extBltFast, (void **)&pBltFast, "BltFast(S)"); + // IDirectDrawSurface::DeleteAttachedSurface + SetHook((void *)(**(DWORD **)lplpdds + 32), extDeleteAttachedSurface, (void **)&pDeleteAttachedSurface, "DeleteAttachedSurface(S)"); + // IDirectDrawSurface::GetAttachedSurface + switch(dxversion) { + case 1: + case 2: + SetHook((void *)(**(DWORD **)lplpdds + 48), extGetAttachedSurface1, (void **)&pGetAttachedSurface1, "GetAttachedSurface(S1)"); + break; + case 3: + SetHook((void *)(**(DWORD **)lplpdds + 48), extGetAttachedSurface3, (void **)&pGetAttachedSurface3, "GetAttachedSurface(S3)"); + break; + case 4: + SetHook((void *)(**(DWORD **)lplpdds + 48), extGetAttachedSurface4, (void **)&pGetAttachedSurface4, "GetAttachedSurface(S4)"); + break; + case 7: + SetHook((void *)(**(DWORD **)lplpdds + 48), extGetAttachedSurface7, (void **)&pGetAttachedSurface7, "GetAttachedSurface(S7)"); + break; + } + // IDirectDrawSurface::GetCaps + switch(dxversion) { + case 1: + SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps1S, (void **)&pGetCaps1S, "GetCaps(S1)"); + break; + case 2: + SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps2S, (void **)&pGetCaps2S, "GetCaps(S2)"); + break; + case 3: + SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps3S, (void **)&pGetCaps3S, "GetCaps(S3)"); + break; + case 4: + SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps4S, (void **)&pGetCaps4S, "GetCaps(S4)"); + break; + case 7: + SetHook((void *)(**(DWORD **)lplpdds + 56), extGetCaps7S, (void **)&pGetCaps7S, "GetCaps(S7)"); + break; + } + // IDirectDrawSurface::GetDC + SetHook((void *)(**(DWORD **)lplpdds + 68), extGetDC, (void **)&pGetDC, "GetDC(S)"); // IDirectDrawSurface::GetSurfaceDesc + // IDirectDrawSurface::GetSurfaceDesc + if (dxversion < 4) { + SetHook((void *)(**(DWORD **)lplpdds + 88), extGetSurfaceDesc1, (void **)&pGetSurfaceDesc1, "GetSurfaceDesc(S1)"); + } + else { + SetHook((void *)(**(DWORD **)lplpdds + 88), extGetSurfaceDesc2, (void **)&pGetSurfaceDesc4, "GetSurfaceDesc(S4)"); + } + // IDirectDrawSurface::ReleaseDC + SetHook((void *)(**(DWORD **)lplpdds + 104), extReleaseDC, (void **)&pReleaseDC, "ReleaseDC(S)"); + + if (dxw.dwFlags1 & (EMULATESURFACE|EMULATEBUFFER)){ + // IDirectDrawSurface::Lock + SetHook((void *)(**(DWORD **)lplpdds + 100), extLock, (void **)&pLock, "Lock(S)"); + // IDirectDrawSurface::Unlock + if (dxversion < 4) + SetHook((void *)(**(DWORD **)lplpdds + 128), extUnlock1, (void **)&pUnlock1, "Unlock(S1)"); + else + SetHook((void *)(**(DWORD **)lplpdds + 128), extUnlock4, (void **)&pUnlock4, "Unlock(S4)"); + } + else { + // IDirectDrawSurface::Lock + SetHook((void *)(**(DWORD **)lplpdds + 100), extLockDir, (void **)&pLock, "Lock(S)"); + // IDirectDrawSurface::Unlock + if (dxversion < 4) + SetHook((void *)(**(DWORD **)lplpdds + 128), extUnlockDir1, (void **)&pUnlock1, "Unlock(S1)"); + else + SetHook((void *)(**(DWORD **)lplpdds + 128), extUnlockDir4, (void **)&pUnlock4, "Unlock(S4)"); + } + + if (!(dxw.dwTFlags & OUTPROXYTRACE)) return; + + // just proxed .... + + // IDirectDrawSurface::AddRef + SetHook((void *)(**(DWORD **)lplpdds + 4), extAddRefSProxy, (void **)&pAddRefS, "AddRef(S)"); + // IDirectDrawSurface::AddOverlayDirtyRect + SetHook((void *)(**(DWORD **)lplpdds + 16), extAddOverlayDirtyRectProxy, (void **)&pAddOverlayDirtyRect, "AddOverlayDirtyRect(S)"); + // IDirectDrawSurface::BltBatch + SetHook((void *)(**(DWORD **)lplpdds + 24), extBltBatchProxy, (void **)&pBltBatch, "BltBatch(S)"); + // IDirectDrawSurface::EnumAttachedSurfaces + SetHook((void *)(**(DWORD **)lplpdds + 36), extEnumAttachedSurfaces, (void **)&pEnumAttachedSurfaces, "EnumAttachedSurfaces(S)"); + // IDirectDrawSurface::EnumOverlayZOrders + SetHook((void *)(**(DWORD **)lplpdds + 40), extEnumOverlayZOrdersProxy, (void **)&pEnumOverlayZOrders, "EnumOverlayZOrders(S)"); + // IDirectDrawSurface::GetBltStatus + SetHook((void *)(**(DWORD **)lplpdds + 52), extGetBltStatusProxy, (void **)&pGetBltStatus, "GetBltStatus(S)"); + // IDirectDrawSurface::GetClipper + SetHook((void *)(**(DWORD **)lplpdds + 60), extGetClipperProxy, (void **)&pGetClipper, "GetClipper(S)"); + // IDirectDrawSurface::GetFlipStatus + SetHook((void *)(**(DWORD **)lplpdds + 72), extGetFlipStatusProxy, (void **)&pGetFlipStatus, "GetFlipStatus(S)"); + // IDirectDrawSurface::GetOverlayPosition + SetHook((void *)(**(DWORD **)lplpdds + 76), extGetOverlayPositionProxy, (void **)&pGetOverlayPosition, "GetOverlayPosition(S)"); + // IDirectDrawSurface::IsLost + SetHook((void *)(**(DWORD **)lplpdds + 96), extIsLostProxy, (void **)&pIsLost, "IsLost(S)"); + // IDirectDrawSurface::Lock + SetHook((void *)(**(DWORD **)lplpdds + 100), extLock, (void **)&pLock, "Lock(S)"); + // IDirectDrawSurface::Restore + SetHook((void *)(**(DWORD **)lplpdds + 108), extRestoreProxy, (void **)&pRestore, "Restore(S)"); + // IDirectDrawSurface::SetOverlayPosition + SetHook((void *)(**(DWORD **)lplpdds + 120), extSetOverlayPositionProxy, (void **)&pSetOverlayPosition, "SetOverlayPosition(S)"); + // IDirectDrawSurface::Unlock + if (dxversion < 4) + SetHook((void *)(**(DWORD **)lplpdds + 128), extUnlock1, (void **)&pUnlock1, "Unlock(S1)"); + else + SetHook((void *)(**(DWORD **)lplpdds + 128), extUnlock4, (void **)&pUnlock4, "Unlock(S4)"); + // IDirectDrawSurface::UpdateOverlay + SetHook((void *)(**(DWORD **)lplpdds + 132), extUpdateOverlayProxy, (void **)&pUpdateOverlay, "UpdateOverlay(S)"); + // IDirectDrawSurface::UpdateOverlayDisplay + SetHook((void *)(**(DWORD **)lplpdds + 136), extUpdateOverlayDisplayProxy, (void **)&pUpdateOverlayDisplay, "UpdateOverlayDisplay(S)"); + // IDirectDrawSurface::UpdateOverlayZOrder + SetHook((void *)(**(DWORD **)lplpdds + 140), extUpdateOverlayZOrderProxy, (void **)&pUpdateOverlayZOrder, "UpdateOverlayZOrder(S)"); +} + +/* ------------------------------------------------------------------------------ */ +// CleanRect: +// takes care of a corrupted RECT struct where some elements are not valid pointers. +// In this case, the whole RECT * variable is set to NULL, a value that is interpreted +// by directdraw functions as the whole surface area. +/* ------------------------------------------------------------------------------ */ + +static void CleanRect(RECT **lprect, int line) +{ + __try { + // normally unharmful statements + if(*lprect){ + int i; + i=(*lprect)->bottom; + i=(*lprect)->top; + i=(*lprect)->left; + i=(*lprect)->right; + } + } + __except(EXCEPTION_EXECUTE_HANDLER){ + OutTraceE("Rectangle exception caught at %d: invalid RECT\n", __LINE__); + if(IsAssertEnabled) MessageBox(0, "Rectangle exception", "CleanRect", MB_OK | MB_ICONEXCLAMATION); + *lprect=NULL; + } +} + +static void MaskCapsD(LPDDCAPS c1, LPDDCAPS c2) +{ + FILE *capfile; + //char sBuf[80+1]; + char token[20+1]; + DWORD val; + OutTraceD("MaskCaps\n"); + capfile=fopen("dxwnd.cap", "r"); + if(!capfile) return; + while(TRUE){ + if(fscanf(capfile, "%s=%x", token, &val)!=2) break; + if(!strcmp(token, "dwCaps")) c1->dwCaps &= val; + if(!strcmp(token, "dwCaps2")) c1->dwCaps2 &= val; + if(!strcmp(token, "dwCKeyCaps")) c1->dwCKeyCaps &= val; + if(!strcmp(token, "dwFXCaps")) c1->dwFXCaps &= val; + } + OutTraceD("MaskCaps(D-HW): caps=%x(%s) caps2=%x(%s) fxcaps=%x(%s) fxalphacaps=%x(%s) keycaps=%x(%s)\n", + c1->dwCaps, ExplainDDDCaps(c1->dwCaps), + c1->dwCaps2, ExplainDDDCaps2(c1->dwCaps2), + c1->dwFXCaps, ExplainDDFXCaps(c1->dwFXCaps), + c1->dwFXAlphaCaps, ExplainDDFXALPHACaps(c1->dwFXAlphaCaps), + c1->dwCKeyCaps, ExplainDDCKeyCaps(c1->dwCKeyCaps)); + fclose(capfile); +} + +/* ------------------------------------------------------------------------------ */ +// directdraw method hooks +/* ------------------------------------------------------------------------------ */ + +HRESULT WINAPI extGetCapsD(LPDIRECTDRAW lpdd, LPDDCAPS c1, LPDDCAPS c2) +{ + HRESULT res; + OutTraceD("GetCaps(D): PROXED lpdd=%x\n", lpdd); + res=(*pGetCapsD)(lpdd, c1, c2); + if(res) + OutTraceE("GetCaps(D): ERROR res=%x(%s)\n", res, ExplainDDError(res)); + else { + if (c1) OutTraceD("GetCaps(D-HW): caps=%x(%s) caps2=%x(%s) palcaps=%x(%s) fxcaps=%x(%s) fxalphacaps=%x(%s) keycaps=%x(%s)\n", + c1->dwCaps, ExplainDDDCaps(c1->dwCaps), + c1->dwCaps2, ExplainDDDCaps2(c1->dwCaps2), + c1->dwPalCaps, ExplainDDPalCaps(c1->dwPalCaps), + c1->dwFXCaps, ExplainDDFXCaps(c1->dwFXCaps), + c1->dwFXAlphaCaps, ExplainDDFXALPHACaps(c1->dwFXAlphaCaps), + c1->dwCKeyCaps, ExplainDDCKeyCaps(c1->dwCKeyCaps)); + if (c2) OutTraceD("GetCaps(D-SW): caps=%x(%s) caps2=%x(%s) palcaps=%x(%s) fxcaps=%x(%s) fxalphacaps=%x(%s) keycaps=%x(%s)\n", + c2->dwCaps, ExplainDDDCaps(c2->dwCaps), + c2->dwCaps2, ExplainDDDCaps2(c2->dwCaps2), + c2->dwPalCaps, ExplainDDPalCaps(c2->dwPalCaps), + c2->dwFXCaps, ExplainDDFXCaps(c2->dwFXCaps), + c2->dwFXAlphaCaps, ExplainDDFXALPHACaps(c2->dwFXAlphaCaps), + c2->dwCKeyCaps, ExplainDDCKeyCaps(c2->dwCKeyCaps)); + } + + if((dxw.dwFlags3 & FORCESHEL) && c1) { + DDCAPS_DX7 swcaps; // DDCAPS_DX7 because it is the bigger in size + int size; + size=c1->dwSize; + if (!c2) { + memset(&swcaps, 0, sizeof(DDCAPS_DX7)); + swcaps.dwSize=size; + c2=&swcaps; + res=(*pGetCapsD)(lpdd, NULL, c2); + } + //DWORD AlphaCaps; + //AlphaCaps=c1->dwFXAlphaCaps; + memcpy((void *)c1, (void *)c2, size); + //c1->dwFXAlphaCaps=AlphaCaps; + } + + if((dxw.dwFlags3 & CAPMASK) && c1 && c2) MaskCapsD(c1, c2); + + return res; +} + +HRESULT WINAPI extDirectDrawCreate(GUID FAR *lpguid, LPDIRECTDRAW FAR *lplpdd, IUnknown FAR *pu) +{ + HRESULT res; + GUID FAR *lpPrivGuid = lpguid; + + OutTraceD("DirectDrawCreate: guid=%x(%s)\n", lpguid, ExplainGUID(lpguid)); + + if(!pDirectDrawCreate){ // not hooked yet.... + HINSTANCE hinst; + hinst = LoadLibrary("ddraw.dll"); + pDirectDrawCreate = + (DirectDrawCreate_Type)GetProcAddress(hinst, "DirectDrawCreate"); + if(pDirectDrawCreate) + HookAPI(NULL, "ddraw.dll", pDirectDrawCreate, "DirectDrawCreate", extDirectDrawCreate); + else{ + char sMsg[81]; + sprintf_s(sMsg, 80, "DirectDrawCreate hook failed: error=%d\n", GetLastError()); + OutTraceD(sMsg); + if(IsAssertEnabled) MessageBox(0, sMsg, "Hook", MB_OK | MB_ICONEXCLAMATION); + return DDERR_GENERIC; // is there a better one? + } + } + + if((dxw.dwFlags3 & FORCESHEL) && (lpguid==NULL)) lpPrivGuid=(GUID FAR *)DDCREATE_EMULATIONONLY; + + res = (*pDirectDrawCreate)(lpPrivGuid, lplpdd, pu); + if(res) { + OutTraceE("DirectDrawCreate: ERROR res=%x(%s)\n", res, ExplainDDError(res)); + return res; + } + + if(dxw.dwFlags3 & COLORFIX) (*((DDRAWI_DIRECTDRAW_INT **)lplpdd))->lpLcl->dwAppHackFlags |= 0x800; + + dxw.dwDDVersion=1; + char *mode; + switch ((DWORD)lpPrivGuid){ + case 0: mode="NULL"; break; + case DDCREATE_HARDWAREONLY: mode="DDCREATE_HARDWAREONLY"; break; + case DDCREATE_EMULATIONONLY: mode="DDCREATE_EMULATIONONLY"; break; + default: + switch (*(DWORD *)lpguid){ + case 0x6C14DB80: dxw.dwDDVersion=1; mode="IID_IDirectDraw"; break; + case 0xB3A6F3E0: dxw.dwDDVersion=2; mode="IID_IDirectDraw2"; break; + case 0x9c59509a: dxw.dwDDVersion=4; mode="IID_IDirectDraw4"; break; + case 0x15e65ec0: dxw.dwDDVersion=7; mode="IID_IDirectDraw7"; break; + default: mode="unknown"; break; + } + break; + } + OutTraceD("DirectDrawCreate: lpdd=%x guid=%s DDVersion=%d\n", *lplpdd, mode, dxw.dwDDVersion); + + HookDDSession(lplpdd, dxw.dwDDVersion); + + if(IsDebug && (dxw.dwTFlags & OUTPROXYTRACE)){ + DDCAPS DriverCaps, EmulCaps; + memset(&DriverCaps, 0, sizeof(DriverCaps)); + DriverCaps.dwSize=sizeof(DriverCaps); + memset(&EmulCaps, 0, sizeof(EmulCaps)); + EmulCaps.dwSize=sizeof(EmulCaps); + (LPDIRECTDRAW)(*lplpdd)->GetCaps(&DriverCaps, &EmulCaps); + //OutTrace("DirectDrawCreate: drivercaps=%x(%s) emulcaps=%x(%s)\n", DriverCaps.ddsCaps, "???", EmulCaps.ddsCaps, "???"); + } + + return 0; +} + +HRESULT WINAPI extDirectDrawCreateEx(GUID FAR *lpguid, + LPDIRECTDRAW FAR *lplpdd, REFIID iid, IUnknown FAR *pu) +{ + HRESULT res; + GUID FAR *lpPrivGuid = lpguid; + + OutTraceD("DirectDrawCreateEx: guid=%x(%s) refiid=%x\n", lpguid, ExplainGUID(lpguid), iid); + + // v2.1.70: auto-hooking (just in case...) + if(!pDirectDrawCreateEx){ // not hooked yet.... + HINSTANCE hinst; + hinst = LoadLibrary("ddraw.dll"); + if(!hinst){ + OutTraceE("LoadLibrary ERROR err=%d at %d\n", GetLastError(), __LINE__); + } + pDirectDrawCreateEx = + (DirectDrawCreateEx_Type)GetProcAddress(hinst, "DirectDrawCreateEx"); + if(pDirectDrawCreateEx) + HookAPI(NULL, "ddraw.dll", pDirectDrawCreateEx, "DirectDrawCreateEx", extDirectDrawCreateEx); + else{ + char sMsg[81]; + sprintf_s(sMsg, 80, "DirectDrawCreateEx hook failed: error=%d\n", GetLastError()); + OutTraceD(sMsg); + if(IsAssertEnabled) MessageBox(0, sMsg, "Hook", MB_OK | MB_ICONEXCLAMATION); + return DDERR_GENERIC; // is there a better one? + } + } + + if((dxw.dwFlags3 & FORCESHEL) && (lpguid==NULL)) lpPrivGuid=(GUID FAR *)DDCREATE_EMULATIONONLY; + + res = (*pDirectDrawCreateEx)(lpPrivGuid, lplpdd, iid, pu); + if (res){ + OutTraceD("DirectDrawCreateEx: res=%x(%s)\n",res, ExplainDDError(res)); + return res; + } + + if(dxw.dwFlags3 & COLORFIX) (*((DDRAWI_DIRECTDRAW_INT **)lplpdd))->lpLcl->dwAppHackFlags |= 0x800; + + dxw.dwDDVersion=7; + char *mode; + switch ((DWORD)lpPrivGuid){ + case 0: mode="NULL"; break; + case DDCREATE_HARDWAREONLY: mode="DDCREATE_HARDWAREONLY"; break; + case DDCREATE_EMULATIONONLY: mode="DDCREATE_EMULATIONONLY"; break; + default: + switch (*(DWORD *)lpguid){ + case 0x6C14DB80: dxw.dwDDVersion=1; mode="IID_IDirectDraw"; break; + case 0xB3A6F3E0: dxw.dwDDVersion=2; mode="IID_IDirectDraw2"; break; + case 0x9c59509a: dxw.dwDDVersion=4; mode="IID_IDirectDraw4"; break; + case 0x15e65ec0: dxw.dwDDVersion=7; mode="IID_IDirectDraw7"; break; + default: mode="unknown"; break; + } + break; + } + OutTraceD("DirectDrawCreateEx: lpdd=%x guid=%s DDVersion=%d\n", *lplpdd, mode, dxw.dwDDVersion); + + HookDDSession(lplpdd,dxw.dwDDVersion); + + return 0; +} + +HRESULT WINAPI extInitialize(LPDIRECTDRAW lpdd, GUID FAR *lpguid) +{ + HRESULT res; + GUID FAR *lpPrivGuid = lpguid; + + OutTraceD("Initialize: lpdd=%x guid=%x(%s)\n", lpdd, lpguid, ExplainGUID(lpguid)); + + if((dxw.dwFlags3 & FORCESHEL) && (lpguid==NULL)) lpPrivGuid=(GUID FAR *)DDCREATE_EMULATIONONLY; + + res=(*pInitialize)(lpdd, lpPrivGuid); + + if(dxw.dwFlags3 & COLORFIX) (((DDRAWI_DIRECTDRAW_INT *)lpdd))->lpLcl->dwAppHackFlags |= 0x800; + + if(res) OutTraceE("Initialize ERROR: res=%x(%s)\n", res, ExplainDDError(res)); + return res; +} + +HRESULT WINAPI extQueryInterfaceD(void *lpdd, REFIID riid, LPVOID *obp) +{ + HRESULT res; + unsigned int dwLocalDDVersion; + unsigned int dwLocalD3DVersion; + + res = (*pQueryInterfaceD)(lpdd, riid, obp); + OutTraceD("QueryInterface(D): lpdd=%x REFIID=%x(%s) obp=%x ret=%x at %d\n", + lpdd, riid.Data1, ExplainGUID((GUID *)&riid), *obp, res, __LINE__); + + if(res) return res; + + dwLocalDDVersion=0; + dwLocalD3DVersion=0; + switch(riid.Data1){ + case 0x6C14DB80: //DirectDraw1 + dwLocalDDVersion = 1; + break; + case 0xB3A6F3E0: //DirectDraw2 + dwLocalDDVersion = 2; + break; + case 0x9c59509a: //DirectDraw4 + dwLocalDDVersion = 4; + break; + case 0x15e65ec0: //DirectDraw7 + dwLocalDDVersion = 7; + break; + case 0x3BBA0080: //Direct3D + dwLocalD3DVersion = 1; + break; + case 0x6aae1ec1: //Direct3D2 + dwLocalD3DVersion = 5; + break; + case 0xbb223240: //Direct3D3 + dwLocalD3DVersion = 6; + break; + case 0xf5049e77: //Direct3D7 + dwLocalD3DVersion = 7; + break; + } + if (! *obp) { + OutTraceD("QueryInterface(D): Interface for DX version %d not found\n", dwLocalDDVersion); + return(0); + } + if(dwLocalDDVersion) OutTraceD("QueryInterface(D): Got interface for DX version %d\n", dwLocalDDVersion); + if(dwLocalD3DVersion) OutTraceD("QueryInterface(D): Got interface for D3D version %d\n", dwLocalD3DVersion); + + if (dwLocalDDVersion > dxw.dwMaxDDVersion) { + *obp = NULL; + OutTraceD("QueryInterface(D): lpdd=%x REFIID=%x obp=(NULL) ret=%x at %d\n", + lpdd, riid.Data1, res, __LINE__); + return(0); + } + + switch (dwLocalDDVersion){ + case 1: // you never know .... + case 2: + case 4: + // it's not supposed to be written for DDVersion==7, but it works .... + case 7: + dxw.dwDDVersion=dwLocalDDVersion; + HookDDSession((LPDIRECTDRAW *)obp, dxw.dwDDVersion); + break; + } + + extern void HookDirect3DSession(LPDIRECTDRAW *, int); + switch (dwLocalD3DVersion){ + case 1: + case 5: + case 6: + case 7: + HookDirect3DSession((LPDIRECTDRAW *)obp, dwLocalD3DVersion); + break; + } + + OutTraceD("QueryInterface(D): lpdd=%x REFIID=%x obp=%x DDVersion=%d ret=0\n", + lpdd, riid.Data1, *obp, dxw.dwDDVersion); + + return 0; +} + +// some unhandled interfaces in emulation mode: +// REFIID={84e63de0-46aa-11cf-816f-0000c020156e}: IID_IDirect3DHALDevice + +HRESULT WINAPI extQueryInterfaceS(void *lpdds, REFIID riid, LPVOID *obp) +{ + HRESULT res; + BOOL IsPrim; + BOOL IsBack; + BOOL IsGammaRamp; + unsigned int dwLocalDDVersion; + + OutTraceD("QueryInterface(S): lpdds=%x REFIID=%x(%s) obp=%x\n", + lpdds, riid.Data1, ExplainGUID((GUID *)&riid), *obp); + + IsPrim=dxw.IsAPrimarySurface((LPDIRECTDRAWSURFACE)lpdds); + IsBack=dxw.IsABackBufferSurface((LPDIRECTDRAWSURFACE)lpdds); + IsGammaRamp=FALSE; + + dwLocalDDVersion=0; + switch(riid.Data1){ + case 0x6C14DB81: + dwLocalDDVersion = 1; + break; + case 0x57805885: //DDSurface2 - WIP (Dark Reign) + dwLocalDDVersion = 2; + break; + case 0xDA044E00: //DDSurface3 + dwLocalDDVersion = 3; + break; + case 0x0B2B8630: + dwLocalDDVersion = 4; + break; + case 0x06675a80: + dwLocalDDVersion = 7; + break; + case 0x84e63de0: + if (dxw.dwFlags3 & DISABLEHAL){ // IID_IDirect3DHALDevice - Dark Vengeance + // this is odd: this piece of code returns the very same error code returned by the actual + // QueryInterface call, but avoid a memory corruption and makes the game working.... + // there must be something wrong behind it. + OutTraceD("QueryInterface: suppress IID_IDirect3DHALDevice interface res=DDERR_GENERIC\n"); + return DDERR_GENERIC; + } + break; + case 0xA4665C60: // IID_IDirect3DRGBDevice + OutTraceD("QueryInterface: IID_IDirect3DRGBDevice\n"); + break; + case 0xF2086B20: // IID_IDirect3DRampDevice + OutTraceD("QueryInterface: IID_IDirect3DRampDevice\n"); + break; + case 0x881949a1: // IID_IDirect3DMMXDevice + OutTraceD("QueryInterface: IID_IDirect3DMMXDevice\n"); + break; + case 0x4B9F0EE0: + OutTraceD("QueryInterface: IID_IDirectDrawColorControl\n"); + break; + case 0x69C11C3E: + OutTraceD("QueryInterface: IID_IDirectDrawGammaControl\n"); + IsGammaRamp=TRUE; + break; + } + + if (dwLocalDDVersion > dxw.dwMaxDDVersion) { + *obp = NULL; + OutTraceD("QueryInterface(S): DDVersion=%d SUPPRESSED lpdds=%x(%s) REFIID=%x obp=(NULL) ret=0 at %d\n", + dwLocalDDVersion, lpdds, IsPrim?"":"(PRIM)", riid.Data1, __LINE__); + return(0); + } + + res = (*pQueryInterfaceS)(lpdds, riid, obp); + + if(res) // added trace + { + OutTraceD("QueryInterface(S): ERROR lpdds=%x%s REFIID=%x obp=%x ret=%x(%s) at %d\n", + lpdds, IsPrim?"(PRIM)":"", riid.Data1, *obp, res, ExplainDDError(res), __LINE__); + return res; + } + + if (! *obp) { + OutTraceD("QueryInterface(S): Interface for DX version %d not found\n", dwLocalDDVersion); + return(0); + } + + // added trace + OutTraceD("QueryInterface(S): lpdds=%x%s REFIID=%x obp=%x DDVersion=%d ret=0\n", + lpdds, IsPrim?"(PRIM)":"", riid.Data1, *obp, dwLocalDDVersion); + + switch (dwLocalDDVersion){ + case 1: // added for The Sims + case 2: + case 3: + case 4: + case 7: + dxw.dwDDVersion=dwLocalDDVersion; + if(IsPrim){ + OutTraceD("QueryInterface(S): primary=%x new=%x\n", lpdds, *obp); + dxw.MarkPrimarySurface((LPDIRECTDRAWSURFACE)*obp); + HookDDSurfacePrim((LPDIRECTDRAWSURFACE *)obp, dxw.dwDDVersion); + } + else{ + if(IsBack) dxw.MarkBackBufferSurface((LPDIRECTDRAWSURFACE)*obp); + else dxw.MarkRegularSurface((LPDIRECTDRAWSURFACE)*obp); + // v2.02.13: seems that hooking inconditionally gives troubles. What is the proper safe hook condition? + HookDDSurfaceGeneric((LPDIRECTDRAWSURFACE *)obp, dxw.dwDDVersion); + } + break; + } + + if(IsGammaRamp){ + // IDirectDrawGammaControl::GetGammaRamp + SetHook((void *)(**(DWORD **)obp + 12), extDDGetGammaRamp, (void **)&pDDGetGammaRamp, "GetGammaRamp(G)"); + // IDirectDrawGammaControl::SetGammaRamp + SetHook((void *)(**(DWORD **)obp + 16), extDDSetGammaRamp, (void **)&pDDSetGammaRamp, "SetGammaRamp(G)"); + } + + if((lpdds == lpDDSBack) && dwLocalDDVersion) { + // assume that you always use the newer interface version, if available. + if(dwLocalDDVersion > (UINT)iBakBufferVersion){ + OutTraceD("QueryInterface(S): switching backbuffer %x -> %x\n", lpDDSBack, *obp); + lpDDSBack = (LPDIRECTDRAWSURFACE)*obp; + iBakBufferVersion = dwLocalDDVersion; + } + } + + return 0; +} + +HRESULT WINAPI extSetDisplayMode(int version, LPDIRECTDRAW lpdd, + DWORD dwwidth, DWORD dwheight, DWORD dwbpp, DWORD dwrefreshrate, DWORD dwflags) +{ + DDSURFACEDESC2 ddsd; + HRESULT res = 0; + + if(IsTraceD){ + OutTrace("SetDisplayMode: version=%d dwWidth=%i dwHeight=%i dwBPP=%i", + version, dwwidth, dwheight, dwbpp); + if (version==2) OutTrace(" dwRefresh=%i dwFlags=%x\n", dwrefreshrate, dwflags); + else OutTrace("\n"); + } + + dxw.SetScreenSize(dwwidth, dwheight); + GetHookInfo()->Height=(short)dxw.GetScreenHeight(); + GetHookInfo()->Width=(short)dxw.GetScreenWidth(); + AdjustWindowFrame(dxw.GethWnd(), dwwidth, dwheight); + + if(dxw.dwFlags1 & EMULATESURFACE){ + // in EMULATESURFACE mode, let SetPixFmt decide upon the PixelFormat + dxw.VirtualPixelFormat.dwRGBBitCount = dwbpp; + memset(&ddsd, 0, sizeof(ddsd)); + ddsd.dwSize=sizeof(ddsd); + SetPixFmt(&ddsd); + SetBltTransformations(); + OutTraceD("SetDisplayMode: mode=EMULATE %s ret=OK\n", DumpPixelFormat(&ddsd)); + return DD_OK; + } + + OutTraceD("SetDisplayMode: mode=STANDARD BPP=%d\n", dwbpp); + dxw.ActualPixelFormat.dwRGBBitCount = dwbpp; + + ZeroMemory(&ddsd, sizeof(ddsd)); + ddsd.dwSize = Set_dwSize_From_DDraw(lpdd); + ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT | DDSD_REFRESHRATE; + ddsd.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT); + ddsd.ddpfPixelFormat.dwFlags = DDPF_RGB; + + (*pGetDisplayMode)(lpdd, (LPDDSURFACEDESC)&ddsd); + if (version==1) + res = (*pSetDisplayMode1)(lpdd, ddsd.dwWidth, ddsd.dwHeight, dwbpp); + else + res = (*pSetDisplayMode2)(lpdd, ddsd.dwWidth, ddsd.dwHeight, dwbpp, ddsd.dwRefreshRate, 0); + + OutTraceD("SetDisplayMode: fixing colordepth current=%d required=%d size=(%dx%d)\n", + ddsd.ddpfPixelFormat.dwRGBBitCount, dwbpp, ddsd.dwWidth, ddsd.dwHeight); + + return 0; +} + +HRESULT WINAPI extSetDisplayMode2(LPDIRECTDRAW lpdd, + DWORD dwwidth, DWORD dwheight, DWORD dwbpp, DWORD dwrefreshrate, DWORD dwflags) +{ + return extSetDisplayMode(2, lpdd, dwwidth, dwheight, dwbpp, dwrefreshrate, dwflags); +} + +HRESULT WINAPI extSetDisplayMode1(LPDIRECTDRAW lpdd, + DWORD dwwidth, DWORD dwheight, DWORD dwbpp) +{ + return extSetDisplayMode(1, lpdd, dwwidth, dwheight, dwbpp, 0, 0); +} + +HRESULT WINAPI extGetDisplayMode(LPDIRECTDRAW lpdd, LPDDSURFACEDESC lpddsd) +{ + OutTraceD("GetDisplayMode\n"); + + (*pGetDisplayMode)(lpdd, lpddsd); + if(dxw.dwFlags1 & EMULATESURFACE) { + GetPixFmt((LPDDSURFACEDESC2)lpddsd); + if(!lpddsd->ddpfPixelFormat.dwFlags) SetPixFmt((LPDDSURFACEDESC2)lpddsd); + } + lpddsd->dwWidth = dxw.GetScreenWidth(); + lpddsd->dwHeight = dxw.GetScreenHeight(); + + // v2.1.96: fake screen color depth + if(dxw.dwFlags2 & (INIT8BPP|INIT16BPP)){ // v2.02.32 fix + if(dxw.dwFlags2 & INIT8BPP) FixPixelFormat(8, &lpddsd->ddpfPixelFormat); + if(dxw.dwFlags2 & INIT16BPP) FixPixelFormat(16, &lpddsd->ddpfPixelFormat); + OutTraceD("GetDisplayMode: fix RGBBitCount=%d\n", lpddsd->ddpfPixelFormat.dwRGBBitCount); + } + + //OutTraceD("GetDisplayMode: returning WxH=(%dx%d) PixelFormat Flags=%x(%s) RGBBitCount=%d RGBAmask=(%x,%x,%x,%x) Caps=%x(%s)\n", + // lpddsd->dwWidth, lpddsd->dwHeight, + // lpddsd->ddpfPixelFormat.dwFlags, ExplainPixelFormatFlags(lpddsd->ddpfPixelFormat.dwFlags), + // lpddsd->ddpfPixelFormat.dwRGBBitCount, + // lpddsd->ddpfPixelFormat.dwRBitMask, lpddsd->ddpfPixelFormat.dwGBitMask, lpddsd->ddpfPixelFormat.dwBBitMask, + // lpddsd->ddpfPixelFormat.dwRGBAlphaBitMask, + // lpddsd->ddsCaps.dwCaps, ExplainDDSCaps(lpddsd->ddsCaps.dwCaps)); + + OutTraceD("GetDisplayMode: returning size=(%dx%d) %s\n", lpddsd->dwWidth, lpddsd->dwHeight, DumpPixelFormat((LPDDSURFACEDESC2)lpddsd)); + + return 0; +} + +void FixWindowFrame(HWND hwnd) +{ + LONG nOldStyle; + + OutTraceD("FixWindowFrame: hwnd=%x\n", hwnd); + + nOldStyle=(*pGetWindowLong)(hwnd, GWL_STYLE); + if (!nOldStyle){ + OutTraceE("GetWindowLong ERROR %d at %d\n",GetLastError(),__LINE__); + return; + } + + OutTraceD("FixWindowFrame: style=%x(%s)\n",nOldStyle,ExplainStyle(nOldStyle)); + + // fix style + if (!(*pSetWindowLong)(hwnd, GWL_STYLE, WS_OVERLAPPEDWINDOW)){ + OutTraceE("SetWindowLong ERROR %d at %d\n",GetLastError(),__LINE__); + return; + } + // fix exstyle + if (!(*pSetWindowLong)(hwnd, GWL_EXSTYLE, 0)){ + OutTraceE("SetWindowLong ERROR %d at %d\n",GetLastError(),__LINE__); + return; + } + + // ShowWindow retcode means in no way an error code! Better ignore it. + (*pShowWindow)(hwnd, SW_RESTORE); + return; +} + +HRESULT WINAPI extSetCooperativeLevel(void *lpdd, HWND hwnd, DWORD dwflags) +{ + HRESULT res; + + OutTraceD("SetCooperativeLevel: hwnd=%x dwFlags=%x(%s)\n", + hwnd, dwflags,ExplainCoopFlags(dwflags)); + + InitDDScreenParameters((LPDIRECTDRAW)lpdd); + + if (dwflags & DDSCL_FULLSCREEN){ + // v2.01.82 fix: + // WARN: Tomb Raider 4 demo is setting cooperative level against hwnd 0 (desktop) + // so in this case better use the registered hWnd value. Same as GP500, who uses + // the desktop window handle. + // v2.02.31 fix: + // Hooligans - Storm over Europe wants to set cooperative level NORMAL to hwnd 0 + // that is legitimate, but setting against desktop window gives an error code - so + // the zero hwnd redirection had to be moved within the FULLSCREEN if case. + if(dxw.IsRealDesktop(hwnd)){ + OutTraceD("SetCooperativeLevel: desktop hwnd=%x -> %x\n", hwnd, dxw.GethWnd()); + hwnd=dxw.GethWnd(); + } + dxw.SetFullScreen(TRUE); + dwflags &= ~(DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE | DDSCL_ALLOWMODEX); + dwflags |= DDSCL_NORMAL; + res=(*pSetCooperativeLevel)(lpdd, hwnd, dwflags); + AdjustWindowFrame(hwnd, dxw.GetScreenWidth(), dxw.GetScreenHeight()); + if (dxw.dwFlags1 & FIXWINFRAME) FixWindowFrame(hwnd); + } + else{ + RECT client; + (*pGetClientRect)(hwnd, &client); + // v2.02.11: + // Non fullscreen cooperative mode means windowed, unless the window occupies the whole desktop area + dxw.SetFullScreen(client.right==dxw.iSizX && client.bottom==dxw.iSizY); + //dxw.SetFullScreen(FALSE); + res=(*pSetCooperativeLevel)(lpdd, hwnd, dwflags); + } + if(res) + OutTraceE("SetCooperativeLevel: ERROR err=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + + GetHookInfo()->IsFullScreen=dxw.IsFullScreen(); + + // WARN: GP500 was setting cooperative level against the desktop! This can be partially + // intercepted by hooking the GetDesktopWindow() call, but in windowed mode this can't be + // done, so better repeat the check here. + + if ((res==DD_OK) && (hwnd!=NULL)){ + if (hwnd==(*pGetDesktopWindow)()){ + OutTraceE("SetCooperativeLevel: attempt to work on desktop window\n"); + } + else + dxw.SethWnd(hwnd); // save the good one + } + + return res; +} + +#define FIX_FLAGSMASK (DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_PITCH|DDSD_PIXELFORMAT|DDSD_ZBUFFERBITDEPTH|DDSD_TEXTURESTAGE) + +void FixSurfaceCapsAnalytic(LPDDSURFACEDESC2 lpddsd, int dxversion) +{ + switch (lpddsd->dwFlags & FIX_FLAGSMASK){ + //case 0: + // switch (lpddsd->ddsCaps.dwCaps){ + // case 0: + // // Star Force Deluxe + // lpddsd->dwFlags = DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT|DDSD_PIXELFORMAT; + // lpddsd->ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY; + // lpddsd->dwHeight = dxw.GetScreenHeight(); + // lpddsd->dwWidth = dxw.GetScreenWidth(); + // GetPixFmt(lpddsd); + // return; + // break; + // } + // break; + case DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT|DDSD_TEXTURESTAGE: + // Ancient Evil: + // dwFlags: DDSD_CAPS+HEIGHT+WIDTH+PIXELFORMAT+TEXTURESTAGE + // dwCaps1: DDSCAPS_OFFSCREENPLAIN+SYSTEMMEMORY+TEXTURE + // dwCaps2: DDSCAPS2_TEXTUREMANAGE + GetPixFmt(lpddsd); + return; + break; + case DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT|DDSD_ZBUFFERBITDEPTH: + switch (lpddsd->ddsCaps.dwCaps){ + case DDSCAPS_VIDEOMEMORY|DDSCAPS_ZBUFFER: + // Dungeon Keeper II + return; + break; + case DDSCAPS_SYSTEMMEMORY|DDSCAPS_ZBUFFER: + // "Star Wars Shadows of the Empire" through d3d + return; + break; + } + break; + case DDSD_CAPS|DDSD_WIDTH: + switch (lpddsd->ddsCaps.dwCaps){ + case DDSCAPS_SYSTEMMEMORY: + return; + break; + case DDSCAPS_VIDEOMEMORY: + return; + break; + case DDSCAPS_SYSTEMMEMORY|DDSCAPS_RESERVED2: + // Martian Gothic + return; + break; + case DDSCAPS_VIDEOMEMORY|DDSCAPS_RESERVED2: + // Martian Gothic + return; + break; + case DDSCAPS_VIDEOMEMORY|DDSCAPS_WRITEONLY|DDSCAPS_RESERVED2: + // Empire Earth + return; + break; + } + break; + case DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH: + switch (lpddsd->ddsCaps.dwCaps){ + case DDSCAPS_BACKBUFFER|DDSCAPS_SYSTEMMEMORY: + // Vangers + lpddsd->ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY; + return; + break; + case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_3DDEVICE|DDSCAPS_VIDEOMEMORY: + // Bunnies must die + lpddsd->ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN|DDSCAPS_3DDEVICE|DDSCAPS_SYSTEMMEMORY; // NOT WORKING + return; + break; + case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_VIDEOMEMORY: + // Alien Nations, Heroes of Might & Magic IV --- troublesome!!!! + lpddsd->dwFlags = (DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT); + lpddsd->ddsCaps.dwCaps = (DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY); + GetPixFmt(lpddsd); + return; + break; + case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY: + // Cave Story, HoMM3 + lpddsd->dwFlags |= DDSD_PIXELFORMAT; + GetPixFmt(lpddsd); + return; + break; + case DDSCAPS_SYSTEMMEMORY: + // Magic & Mayhem + lpddsd->dwFlags |= DDSD_PIXELFORMAT; + lpddsd->ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN; + GetPixFmt(lpddsd); + return; + break; + case DDSCAPS_OFFSCREENPLAIN: + // Cave Story, Magic & Mayhem + lpddsd->dwFlags |= DDSD_PIXELFORMAT; + lpddsd->ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN; + GetPixFmt(lpddsd); + return; + break; + case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_3DDEVICE: + // Nightmare Ned + lpddsd->dwFlags |= DDSD_PIXELFORMAT; + GetPixFmt(lpddsd); + return; + break; + case DDSCAPS_SYSTEMMEMORY|DDSCAPS_3DDEVICE: + // Actua Soccer 3 + lpddsd->dwFlags |= DDSD_PIXELFORMAT; + GetPixFmt(lpddsd); + return; + break; + case DDSCAPS_VIDEOMEMORY|DDSCAPS_3DDEVICE: + // Actua Soccer 3 + lpddsd->dwFlags |= DDSD_PIXELFORMAT; + lpddsd->ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY|DDSCAPS_3DDEVICE; + GetPixFmt(lpddsd); + return; + break; + case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_3DDEVICE|DDSCAPS_SYSTEMMEMORY: + // Nightmare Ned, The Sims ??? + lpddsd->dwFlags |= DDSD_PIXELFORMAT; + GetPixFmt(lpddsd); + return; + break; + } + break; + case DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_PITCH: + switch (lpddsd->ddsCaps.dwCaps){ + case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY: + // Airline Tycoon Evolution + return; + break; + //case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY|DDSCAPS_3DDEVICE: + // OutTrace("FixSurfaceCaps: ??? (Dungeon Keeper D3D)\n"); + // break; + } + break; + case DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT|DDSD_PIXELFORMAT: + switch (lpddsd->ddsCaps.dwCaps){ + case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_3DDEVICE|DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM: + // Empire Earth + // tbd + // try + lpddsd->ddsCaps.dwCaps = (DDSCAPS_OFFSCREENPLAIN|DDSCAPS_3DDEVICE|DDSCAPS_SYSTEMMEMORY); + // eotry + return; + break; + case DDSCAPS_OFFSCREENPLAIN: + // Submarine titans (8BPP) + lpddsd->ddsCaps.dwCaps = (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); + GetPixFmt(lpddsd); + return; + break; + case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY: + // Duckman, HoM&M4, Beavis & Butthead do U. + // unsetting the Pixel Format may cause the backbuffer to be created with DDPF_ALPHAPIXELS flag on + // and some generic surface with DDPF_ALPHAPIXELS off, so that blitting is unsupported. + // But it seems impossible to get HOMM4 to cope with Beavis & Butthead!!! + if(!(dxw.dwFlags3 & NOPIXELFORMAT)) GetPixFmt(lpddsd); + return; + break; + case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_VIDEOMEMORY: + // Dungeon Keeper II GOG release (intro screen): doesn't like calling GetPixFmt!!! + // it requests a DDPF_FOURCC surface with fourcc="YYYY" that should not be overridden? + // + // need not to be configurable until we get a different case. + // it works both on VIDEOMEMORY or SYSTEMMEMORY. The latter should be more stable. + // v2.02.41: don't alter FOURCC pixel formats + if(lpddsd->ddpfPixelFormat.dwFlags & DDPF_FOURCC) return; + lpddsd->ddsCaps.dwCaps = (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); + return; + break; + case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM: + // Empire Earth + lpddsd->ddsCaps.dwCaps = (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); + return; + break; + case DDSCAPS_COMPLEX|DDSCAPS_TEXTURE|DDSCAPS_MIPMAP: + // Empire Earth: flags = DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT|DDSD_PIXELFORMAT|DDSD_MIPMAPCOUNT + return; + break; + case DDSCAPS_SYSTEMMEMORY|DDSCAPS_ZBUFFER: + // the Sims + return; + break; + case DDSCAPS_SYSTEMMEMORY|DDSCAPS_TEXTURE: + // Wargames Direct3D hw acceleration + // Star Wars Shadows of the Empire in RGB HEL mode + return; + break; + case DDSCAPS_TEXTURE: + // Empire Earth + return; + break; + case DDSCAPS_VIDEOMEMORY|DDSCAPS_ZBUFFER: + // Martian Gothic + lpddsd->ddsCaps.dwCaps = (DDSCAPS_SYSTEMMEMORY|DDSCAPS_ZBUFFER); // working ???? + return; + break; + case DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM|DDSCAPS_ZBUFFER: + // Rayman 2 + lpddsd->ddsCaps.dwCaps = (DDSCAPS_SYSTEMMEMORY|DDSCAPS_ZBUFFER); // working ???? + return; + break; + case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY|DDSCAPS_3DDEVICE: + // Premier Manager 98 + GetPixFmt(lpddsd); + return; + break; + case DDSCAPS_OVERLAY|DDSCAPS_VIDEOMEMORY: // NOT WORKING + // Bunnies must die (not the horny ones!) + lpddsd->ddsCaps.dwCaps = DDSCAPS_OVERLAY|DDSCAPS_SYSTEMMEMORY; + return; + break; + case DDSCAPS_SYSTEMMEMORY: + // Star Force Deluxe + lpddsd->ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY; + // GetPixFmt(lpddsd); + return; + break; + case DDSCAPS_TEXTURE|DDSCAPS_VIDEOMEMORY|DDSCAPS_ALLOCONLOAD: + // Star Wars Shadows of the Empire + // seems to work both with/without GetPixFmt, but doesn't like DDSCAPS_SYSTEMMEMORY textures. + // Setting GetPixFmt makes bad alpha transparencies! + // DDSCAPS_VIDEOMEMORY doesn't work with HEL only! Better switch to DDSCAPS_SYSTEMMEMORY. + if (dxw.dwFlags3 & FORCESHEL) lpddsd->ddsCaps.dwCaps = (DDSCAPS_TEXTURE|DDSCAPS_SYSTEMMEMORY|DDSCAPS_ALLOCONLOAD); + return; + break; + } + break; + case DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT|DDSD_PITCH|DDSD_PIXELFORMAT: + switch (lpddsd->ddsCaps.dwCaps){ + case DDSCAPS_SYSTEMMEMORY: + // Wargames + lpddsd->ddsCaps.dwCaps = (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); + GetPixFmt(lpddsd); + //lpddsd->dwFlags = DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT|DDSD_PITCH; // turn DDSD_PIXELFORMAT off + return; + break; + case DDSCAPS_OFFSCREENPLAIN|DDSCAPS_VIDEOMEMORY: + // A10 Cuba + lpddsd->ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY; // DDSCAPS_OFFSCREENPLAIN|DDSCAPS_VIDEOMEMORY working as well... + return; + break; + } + break; + + } + + if(dxw.dwFlags3 & SURFACEWARN){ + char sMsg[512]; + sprintf(sMsg, "Flags=%x(%s) Caps=%x(%s)", lpddsd->dwFlags, ExplainFlags(lpddsd->dwFlags), lpddsd->ddsCaps.dwCaps, ExplainDDSCaps(lpddsd->ddsCaps.dwCaps)); + MessageBox(0, sMsg, "FixSurfaceCaps unmanaged setting", MB_OK | MB_ICONEXCLAMATION); + } +} + +static void FixSurfaceCaps(LPDDSURFACEDESC2 lpddsd, int dxversion) +{ + // To do: fix Dungeon Keeper II + + // rules of thumb: + // 1) always get rid of DDSCAPS_VIDEOMEMORY & DDSCAPS_LOCALVIDMEM caps + // 2) always add DDSCAPS_SYSTEMMEMORY caps + // 3) DDSCAPS_SYSTEMMEMORY is supported from dxversion 4 + // 4) if DDSD_CAPS is not set, ignore caps + // 5) ignore DDSD_CKSRCBLT, .... + // 6) setting a different pixel format in memory requires DDSCAPS_OFFSCREENPLAIN capability + // 7) DDSD_TEXTURESTAGE surfaces may need to adjust fixel format (....???) + // 8) Generic surfaces are mapped to SYSTEMMEMORY and set to primary surface PixelFormat + // 9) When pixelformat is unspecified, be sure to pick the right one (with or without alphapixels?) + + if(!(lpddsd->dwFlags & DDSD_CAPS)) lpddsd->ddsCaps.dwCaps = 0; + + OutTraceD("FixSurfaceCaps: Flags=%x(%s) Caps=%x(%s)\n", + lpddsd->dwFlags, ExplainFlags(lpddsd->dwFlags), lpddsd->ddsCaps.dwCaps, ExplainDDSCaps(lpddsd->ddsCaps.dwCaps)); + + if(dxw.dwFlags3 & ANALYTICMODE) return FixSurfaceCapsAnalytic(lpddsd, dxversion); + + if((lpddsd->dwFlags & (DDSD_WIDTH|DDSD_HEIGHT)) == DDSD_WIDTH) { + // buffer surface - no changes + return; + } + if((lpddsd->dwFlags & (DDSD_PIXELFORMAT|DDSD_TEXTURESTAGE)) == (DDSD_PIXELFORMAT|DDSD_TEXTURESTAGE)){ + // textures, set proper color depth and make no further changes + GetPixFmt(lpddsd); + return; + } + if((lpddsd->dwFlags & DDSD_CAPS) && (lpddsd->ddsCaps.dwCaps & DDSCAPS_ZBUFFER)) { // z-buffer surface - set to memory + lpddsd->ddsCaps.dwCaps = (DDSCAPS_SYSTEMMEMORY|DDSCAPS_ZBUFFER); + return; + } + if((lpddsd->dwFlags & DDSD_CAPS) && (lpddsd->ddsCaps.dwCaps & DDSCAPS_3DDEVICE)) { // 3DDEVICE: enforce PIXELFORMAT on MEMORY + lpddsd->dwFlags |= DDSD_PIXELFORMAT; + lpddsd->ddsCaps.dwCaps = (DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY|DDSCAPS_3DDEVICE); + GetPixFmt(lpddsd); + return; + } + //// DDSCAPS_ALLOCONLOAD on VIDEOMEMORY can't be done when HAL is disabled - it returns DDERR_NODIRECTDRAWHW error + //if((lpddsd->dwFlags & DDSD_CAPS) && + // ((lpddsd->ddsCaps.dwCaps & (DDSCAPS_TEXTURE|DDSCAPS_ALLOCONLOAD))==(DDSCAPS_TEXTURE|DDSCAPS_ALLOCONLOAD))) { + // if (dxw.dwFlags3 & FORCESHEL) lpddsd->ddsCaps.dwCaps = (DDSCAPS_TEXTURE|DDSCAPS_SYSTEMMEMORY|DDSCAPS_ALLOCONLOAD); + // return; + //} + // DDSCAPS_TEXTURE surfaces must be left untouched, unless you set FORCESHEL: in this case switch VIDEOMEMORY to SYSTEMMEMORY + if((lpddsd->dwFlags & DDSD_CAPS) && (lpddsd->ddsCaps.dwCaps & DDSCAPS_TEXTURE)){ + if (dxw.dwFlags3 & FORCESHEL) { + lpddsd->ddsCaps.dwCaps &= ~DDSCAPS_VIDEOMEMORY; + lpddsd->ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY; + } + // no further changes... + return; + } + + if(lpddsd->dwFlags & DDSD_ZBUFFERBITDEPTH){ + lpddsd->dwFlags &= ~DDSD_PIXELFORMAT; + } + + // v2.02.41: don't alter FOURCC pixel formats + if((lpddsd->dwFlags & DDSD_PIXELFORMAT) && (lpddsd->ddpfPixelFormat.dwFlags & DDPF_FOURCC)) return; + +#if 0 + // v2.02.43: don't alter MIPMAP surfaces + if((lpddsd->dwFlags & DDSD_MIPMAPCOUNT) && (lpddsd->ddsCaps.dwCaps & DDSCAPS_MIPMAP)) { + //GetPixFmt(lpddsd); + return; + } +#endif + +#if 0 + // HoM&M3/4 fix.... + if(((lpddsd->dwFlags & (DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT)) == (DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH)) && + ((lpddsd->ddsCaps.dwCaps & ~(DDSCAPS_SYSTEMMEMORY|DDSCAPS_VIDEOMEMORY) == DDSCAPS_OFFSCREENPLAIN)){ + //lpddsd->ddsCaps.dwCaps = 0; + lpddsd->dwFlags = (DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT); + lpddsd->ddsCaps.dwCaps = (DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY); + GetPixFmt(lpddsd); + return; + } +#endif + // default case: adjust pixel format + OutTraceB("FixSurfaceCaps: suppress DDSCAPS_VIDEOMEMORY case\n"); + lpddsd->dwFlags |= (DDSD_CAPS|DDSD_PIXELFORMAT); + lpddsd->ddsCaps.dwCaps &= ~(DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM); // v2.02.43 + lpddsd->ddsCaps.dwCaps |= (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); + if(!(dxw.dwFlags3 & NOPIXELFORMAT)) GetPixFmt(lpddsd); + return; +} + +static void ClearSurfaceDesc(void *ddsd, int dxversion) +{ + int size; + size = (dxversion < 4) ? sizeof(DDSURFACEDESC) : sizeof(DDSURFACEDESC2); + memset(ddsd, 0, size); // Clean all + ((LPDDSURFACEDESC)ddsd)->dwSize = size; +} + +static HRESULT BuildPrimaryEmu(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateSurface, LPDDSURFACEDESC2 lpddsd, int dxversion, LPDIRECTDRAWSURFACE *lplpdds, void *pu) +{ + DDSURFACEDESC2 ddsd; + HRESULT res; + + // emulated primary surface + memcpy((void *)&ddsd, lpddsd, lpddsd->dwSize); + + // handle the surface attributes before the ddsd.dwFlags gets updated: + // if a surface desc is NOT specified, build one + if(!(ddsd.dwFlags & DDSD_PIXELFORMAT)) SetPixFmt((LPDDSURFACEDESC2)&ddsd); + // then save it + dxw.VirtualPixelFormat = ddsd.ddpfPixelFormat; + + OutTraceD("DDSD_PIXELFORMAT: color=%d flags=%x\n", dxw.VirtualPixelFormat.dwRGBBitCount, dxw.VirtualPixelFormat.dwFlags); + ddsd.dwFlags &= ~(DDSD_BACKBUFFERCOUNT|DDSD_REFRESHRATE); + ddsd.dwFlags |= (DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT|DDSD_PIXELFORMAT); + ddsd.ddsCaps.dwCaps &= ~(DDSCAPS_PRIMARYSURFACE|DDSCAPS_FLIP|DDSCAPS_COMPLEX|DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM); + // DDSCAPS_OFFSCREENPLAIN seems required to support the palette in memory surfaces + ddsd.ddsCaps.dwCaps |= (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); + ddsd.dwWidth = dxw.GetScreenWidth(); + ddsd.dwHeight = dxw.GetScreenHeight(); + + // create Primary surface + DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[Primary]" , __LINE__); + res=(*pCreateSurface)(lpdd, &ddsd, lplpdds, 0); + if(res){ + if (res==DDERR_PRIMARYSURFACEALREADYEXISTS){ + LPDIRECTDRAWSURFACE lpPrim; + OutTraceE("CreateSurface: CreateSurface DDERR_PRIMARYSURFACEALREADYEXISTS workaround\n"); + (*pGetGDISurface)(lpPrimaryDD, &lpPrim); + while ((*pReleaseS)(lpPrim)); + res = (*pCreateSurface)(lpdd, &ddsd, lplpdds, 0); + } + /* fall through */ + if(res){ + OutTraceE("CreateSurface: ERROR on DDSPrim res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + if(res==DDERR_INVALIDPIXELFORMAT) DumpPixFmt(&ddsd); + return res; + } + } + + OutTraceD("CreateSurface: created PRIMARY DDSPrim=%x\n", *lplpdds); + if(IsDebug) DescribeSurface(*lplpdds, dxversion, "DDSPrim", __LINE__); + HookDDSurfacePrim(lplpdds, dxversion); + + if(lpDDSEmu_Prim==NULL){ + ClearSurfaceDesc((void *)&ddsd, dxversion); + ddsd.dwFlags = DDSD_CAPS; + ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; + DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[EmuPrim]" , __LINE__); + + res=(*pCreateSurface)(lpdd, &ddsd, &lpDDSEmu_Prim, 0); + if(res==DDERR_PRIMARYSURFACEALREADYEXISTS){ + OutTraceD("CreateSurface: ASSERT DDSEmu_Prim already exists\n"); + res=(*pGetGDISurface)(lpdd, &lpDDSEmu_Prim); // ok only if the previous surface has the good properties!!! + (*pReleaseS)(lpDDSEmu_Prim); + } + if(res){ + OutTraceE("CreateSurface: ERROR on DDSEmu_Prim res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + if(res==DDERR_INVALIDPIXELFORMAT) DumpPixFmt(&ddsd); + return res; + } + OutTraceD("CreateSurface: created new DDSEmu_Prim=%x\n",lpDDSEmu_Prim); + if(IsDebug) DescribeSurface(lpDDSEmu_Prim, dxversion, "DDSEmu_Prim", __LINE__); + InitDSScreenParameters(lpDDSEmu_Prim); + dxw.MarkRegularSurface(lpDDSEmu_Prim); + // can't hook lpDDSEmu_Prim as generic, since the Flip method is unimplemented for a PRIMARY surface! + // better avoid it or hook just useful methods. + //if (dxw.dwTFlags & OUTPROXYTRACE) HookDDSurfaceGeneric(&lpDDSEmu_Prim, dxw.dwDDVersion); + } + + if(lpDDSEmu_Back==NULL){ + ClearSurfaceDesc((void *)&ddsd, dxversion); + ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; + ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; + ddsd.dwWidth = dxw.GetScreenWidth(); + ddsd.dwHeight = dxw.GetScreenHeight(); + DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[EmuBack]" , __LINE__); + + res=(*pCreateSurface)(lpdd, &ddsd, &lpDDSEmu_Back, 0); + if(res){ + OutTraceE("CreateSurface: CreateSurface ERROR on DDSEmuBack : res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + if(res==DDERR_INVALIDPIXELFORMAT) DumpPixFmt(&ddsd); + return res; + } + OutTraceD("CreateSurface: created new DDSEmu_Back=%x\n", lpDDSEmu_Back); + if(IsDebug) DescribeSurface(lpDDSEmu_Back, dxversion, "DDSEmu_Back", __LINE__); + dxw.MarkRegularSurface(lpDDSEmu_Back); + if (dxw.dwTFlags & OUTPROXYTRACE) HookDDSurfaceGeneric(&lpDDSEmu_Back, dxversion); + } + + return DD_OK; +} + +static HRESULT BuildPrimaryDir(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateSurface, LPDDSURFACEDESC2 lpddsd, int dxversion, LPDIRECTDRAWSURFACE *lplpdds, void *pu) +{ + DDSURFACEDESC2 ddsd; + HRESULT res; + + // genuine primary surface + memcpy((void *)&ddsd, lpddsd, lpddsd->dwSize); + ddsd.dwFlags &= ~(DDSD_WIDTH|DDSD_HEIGHT|DDSD_BACKBUFFERCOUNT|DDSD_REFRESHRATE|DDSD_PIXELFORMAT); + ddsd.ddsCaps.dwCaps &= ~(DDSCAPS_FLIP|DDSCAPS_COMPLEX); + + // create Primary surface + DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[Primary]" , __LINE__); + res=(*pCreateSurface)(lpdd, &ddsd, lplpdds, 0); + if(res){ + if (res==DDERR_PRIMARYSURFACEALREADYEXISTS){ + LPDIRECTDRAWSURFACE lpPrim; + OutTraceE("CreateSurface: CreateSurface DDERR_PRIMARYSURFACEALREADYEXISTS workaround\n"); + (*pGetGDISurface)(lpPrimaryDD, &lpPrim); + while ((*pReleaseS)(lpPrim)); + res = (*pCreateSurface)(lpdd, &ddsd, lplpdds, 0); + } + /* fall through */ + if(res){ + OutTraceE("CreateSurface: ERROR on DDSPrim res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + if(res==DDERR_INVALIDPIXELFORMAT) DumpPixFmt(&ddsd); + return res; + } + } + + OutTraceD("CreateSurface: created PRIMARY DDSPrim=%x\n", *lplpdds); + if(IsDebug) DescribeSurface(*lplpdds, dxversion, "DDSPrim", __LINE__); + + if(dxw.dwFlags1 & EMULATEBUFFER){ + lpDDSEmu_Prim = *lplpdds; + dxw.MarkRegularSurface(lpDDSEmu_Prim); + + ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS; + // warning: can't create zero sized backbuffer surface !!!! + ddsd.dwWidth = dxw.GetScreenWidth(); + ddsd.dwHeight = dxw.GetScreenHeight(); + ddsd.ddsCaps.dwCaps = 0; + if (dxversion >= 4) ddsd.ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN; + DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[Dir FixBuf]" , __LINE__); + res=(*pCreateSurface)(lpdd, &ddsd, lplpdds, 0); + if(res){ + OutTraceE("CreateSurface: ERROR on DDSPrim res=%x(%s) at %d\n",res, ExplainDDError(res), __LINE__); + return res; + } + OutTraceD("CreateSurface: created FIX DDSPrim=%x\n", *lplpdds); + if(IsDebug) DescribeSurface(*lplpdds, dxversion, "DDSPrim(2)", __LINE__); + } + + HookDDSurfacePrim(lplpdds, dxversion); + if(dxw.dwFlags1 & CLIPCURSOR) dxw.SetClipCursor(); + + return DD_OK; +} + +static HRESULT BuildBackBufferEmu(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateSurface, LPDDSURFACEDESC2 lpddsd, int dxversion, LPDIRECTDRAWSURFACE *lplpdds, void *pu) +{ + DDSURFACEDESC2 ddsd; + HRESULT res; + + // create BackBuffer surface + memcpy(&ddsd, lpddsd, lpddsd->dwSize); + ddsd.dwFlags &= ~(DDSD_WIDTH|DDSD_HEIGHT|DDSD_BACKBUFFERCOUNT|DDSD_REFRESHRATE); + ddsd.dwFlags |= (DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT); + ddsd.ddsCaps.dwCaps &= ~(DDSCAPS_BACKBUFFER|DDSCAPS_PRIMARYSURFACE|DDSCAPS_FLIP|DDSCAPS_COMPLEX|DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM); + // DDSCAPS_OFFSCREENPLAIN seems required to support the palette in memory surfaces + ddsd.ddsCaps.dwCaps |= (DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); + ddsd.dwWidth = dxw.GetScreenWidth(); + ddsd.dwHeight = dxw.GetScreenHeight(); + GetPixFmt(&ddsd); + + DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[Backbuf]" , __LINE__); + res=(*pCreateSurface)(lpdd, &ddsd, lplpdds, 0); + if(res) { + OutTraceE("CreateSurface ERROR: res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + if(res==DDERR_INVALIDPIXELFORMAT) DumpPixFmt(&ddsd); + return res; + } + + OutTraceD("CreateSurface: created BACK DDSBack=%x\n", *lplpdds); + if(IsDebug) DescribeSurface(*lplpdds, dxversion, "DDSBack", __LINE__); + HookDDSurfaceGeneric(lplpdds, dxversion); // added !!! + lpBackBufferDD = lpdd; // v2.02.31 + iBakBufferVersion=dxversion; // v2.02.31 + + return DD_OK; +} + +static HRESULT BuildBackBufferDir(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateSurface, LPDDSURFACEDESC2 lpddsd, int dxversion, LPDIRECTDRAWSURFACE *lplpdds, void *pu) +{ + DDSURFACEDESC2 ddsd; + HRESULT res; + + // create BackBuffer surface + // ClearSurfaceDesc((void *)&ddsd, dxversion); + memcpy(&ddsd, lpddsd, lpddsd->dwSize); + ddsd.dwFlags &= ~(DDSD_WIDTH|DDSD_HEIGHT|DDSD_BACKBUFFERCOUNT|DDSD_REFRESHRATE|DDSD_PIXELFORMAT); + ddsd.dwFlags |= (DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH); + ddsd.ddsCaps.dwCaps &= ~(DDSCAPS_PRIMARYSURFACE|DDSCAPS_FLIP|DDSCAPS_COMPLEX); + //ddsd.ddsCaps.dwCaps|=DDSCAPS_SYSTEMMEMORY; + if (dxversion >= 4) ddsd.ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN; + ddsd.dwWidth = dxw.GetScreenWidth(); + ddsd.dwHeight = dxw.GetScreenHeight(); + if (dxw.dwFlags2 & BACKBUFATTACH) { + LPDIRECTDRAWSURFACE lpPrim; + DDSURFACEDESC2 prim; + (*pGetGDISurface)(lpPrimaryDD, &lpPrim); + memset(&prim, 0, sizeof(DDSURFACEDESC2)); + prim.dwSize = (dxversion >= 4) ? sizeof(DDSURFACEDESC2) : sizeof(DDSURFACEDESC); + res=lpPrim->GetSurfaceDesc((DDSURFACEDESC *)&prim); + (*pReleaseS)(lpPrim); + ddsd.dwWidth = prim.dwWidth; + ddsd.dwHeight = prim.dwHeight; + OutTraceD("BMX FIX: res=%x(%s) wxh=(%dx%d)\n", res, ExplainDDError(res),ddsd.dwWidth, ddsd.dwHeight); + } + DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[Backbuf]" , __LINE__); + res=(*pCreateSurface)(lpdd, &ddsd, lplpdds, 0); + if(res) { + if ((dxw.dwFlags1 & SWITCHVIDEOMEMORY) && (res==DDERR_OUTOFVIDEOMEMORY)){ + OutTraceD("CreateSurface: CreateSurface DDERR_OUTOFVIDEOMEMORY ERROR at %d, retry in SYSTEMMEMORY\n", __LINE__); + ddsd.ddsCaps.dwCaps &= ~DDSCAPS_VIDEOMEMORY; // try ... + ddsd.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY; // try ... + res=(*pCreateSurface)(lpdd, &ddsd, lplpdds, 0); + } + if(res){ + OutTraceE("CreateSurface ERROR: res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + return res; + } + } + + OutTraceD("CreateSurface: created BACK DDSBack=%x\n", *lplpdds); + if(IsDebug) DescribeSurface(*lplpdds, dxversion, "DDSBack", __LINE__); + HookDDSurfaceGeneric(lplpdds, dxversion); // added !!! + lpBackBufferDD = lpdd; // v2.02.31 + iBakBufferVersion=dxversion; // v2.02.31 + + return DD_OK; +} + +static HRESULT BuildGenericEmu(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateSurface, LPDDSURFACEDESC2 lpddsd, int dxversion, LPDIRECTDRAWSURFACE *lplpdds, void *pu) +{ + DDSURFACEDESC2 ddsd; + HRESULT res; + + memcpy(&ddsd, lpddsd, lpddsd->dwSize); // Copy over .... + FixSurfaceCaps(&ddsd, dxversion); + + DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[Emu Generic]" , __LINE__); + res=(*pCreateSurface)(lpdd, &ddsd, lplpdds, pu); + if (res) { + OutTraceE("CreateSurface: ERROR on Emu_Generic res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + return res; + } + + OutTraceD("CreateSurface: created Emu_Generic dds=%x\n", *lplpdds); + if(IsDebug) DescribeSurface(*lplpdds, dxversion, "DDSEmu_Generic", __LINE__); + // diagnostic hooks .... + HookDDSurfaceGeneric(lplpdds, dxversion); + + return DD_OK; +} + +static HRESULT BuildGenericDir(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateSurface, LPDDSURFACEDESC2 lpddsd, int dxversion, LPDIRECTDRAWSURFACE *lplpdds, void *pu) +{ + HRESULT res; + + DumpSurfaceAttributes((LPDDSURFACEDESC)lpddsd, "[Dir Generic]" , __LINE__); + + res = (*pCreateSurface)(lpdd, lpddsd, lplpdds, 0); + if(res){ + if ((dxw.dwFlags1 & SWITCHVIDEOMEMORY) && (res==DDERR_OUTOFVIDEOMEMORY)){ + OutTraceD("CreateSurface ERROR: res=%x(%s) at %d, retry\n", res, ExplainDDError(res), __LINE__); + lpddsd->ddsCaps.dwCaps &= ~DDSCAPS_VIDEOMEMORY; + lpddsd->ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY; + res = (*pCreateSurface)(lpdd, lpddsd, lplpdds, 0); + } + if(res){ + OutTraceE("CreateSurface: CreateSurface ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + return res; + } + } + OutTraceD("CreateSurface: created GENERIC surface dds=%x flags=%x(%s) caps=%x(%s)\n", + *lplpdds, lpddsd->dwFlags, ExplainFlags(lpddsd->dwFlags), lpddsd->ddsCaps.dwCaps, ExplainDDSCaps(lpddsd->ddsCaps.dwCaps)); + + // hooks .... + HookDDSurfaceGeneric(lplpdds, dxversion); + + OutTraceD("CreateSurface: created lpdds=%x type=Generic ret=%x\n", *lplpdds, res); + if(IsDebug) DescribeSurface(*lplpdds, dxversion, "Generic", __LINE__); //v2.02.44 bug fix + + return DD_OK; +} + +static HRESULT WINAPI extCreateSurface(int dxversion, CreateSurface_Type pCreateSurface, LPDIRECTDRAW lpdd, DDSURFACEDESC2 *lpddsd, + LPDIRECTDRAWSURFACE *lplpdds, void *pu) +{ + HRESULT res; + DDSURFACEDESC2 ddsd; + LPDIRECTDRAWSURFACE lpDDSPrim; + DWORD CurFlags; + int TargetSize; + typedef HRESULT (*BuildSurface_Type)(LPDIRECTDRAW, CreateSurface_Type, LPDDSURFACEDESC2, int, LPDIRECTDRAWSURFACE *, void *); + BuildSurface_Type BuildPrimary; + BuildSurface_Type BuildBackBuffer; + BuildSurface_Type BuildGeneric; + + if (dxw.dwFlags1 & EMULATESURFACE){ + BuildPrimary = BuildPrimaryEmu; + BuildBackBuffer = BuildBackBufferEmu; + BuildGeneric = BuildGenericEmu; + } + else { + BuildPrimary = BuildPrimaryDir; + BuildBackBuffer = BuildBackBufferDir; + BuildGeneric = BuildGenericDir; + } + + if(IsTraceD){ + OutTrace("CreateSurface: Version=%d lpdd=%x ", dxversion, lpdd); + LogSurfaceAttributes((LPDDSURFACEDESC)lpddsd, "[CreateSurface]", __LINE__); + } + + // check for lpddsd->dwSize value + TargetSize=(dxversion<4)?sizeof(DDSURFACEDESC):sizeof(DDSURFACEDESC2); + if(lpddsd->dwSize != TargetSize){ + char sMsg[81]; + sprintf_s(sMsg,80, "CreateSurface: ASSERT bad dwSize=%d dxversion=%d\n", + lpddsd->dwSize, dxversion); + OutTraceD(sMsg); + if(IsAssertEnabled) MessageBox(0, sMsg, "CreateSurface", MB_OK | MB_ICONEXCLAMATION); + return DDERR_INVALIDPARAMS; + } + + //GHO workaround (needed for WarWind, Rogue Spear): + if (lpddsd->dwFlags && !(lpddsd->dwFlags & 0x1)){ + OutTraceD("CreateSurface: fixing illegal dwFlags value: %x -> %x\n", + lpddsd->dwFlags, lpddsd->dwFlags+1); + lpddsd->dwFlags++; + } + + memcpy(&ddsd, lpddsd, lpddsd->dwSize); // Copy + + // v2.02.38: this is odd: in "Star Force Deluxe" there is no PRIMARY surface, but a surface with + // 0 flags and 0 capabilities serves for this purpose. Is it a side-effect of old ddraw releases? + if((dxversion == 1) && (ddsd.dwFlags == 0)){ // Star Force Deluxe + ddsd.dwFlags = DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH; + ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; + //if(dxw.VirtualPixelFormat.dwRGBBitCount == 8) ddsd.ddsCaps.dwCaps |= DDSCAPS_PALETTE; + } + + // creation of the primary surface.... + if(ddsd.dwFlags & DDSD_CAPS && ddsd.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE){ + GetHookInfo()->Height=(short)dxw.GetScreenHeight(); + GetHookInfo()->Width=(short)dxw.GetScreenWidth(); + GetHookInfo()->ColorDepth=(short)dxw.VirtualPixelFormat.dwRGBBitCount; + GetHookInfo()->DXVersion=dxversion; + lpPrimaryDD = lpdd; // v2.1.87 + memcpy(&DDSD_Prim, lpddsd, sizeof(DDSD_Prim)); // v2.02.37 + + // beware of the different behaviour between older and newer directdraw releases... + if(dxversion >= 4){ + if (lpDDSEmu_Back) while(lpDDSEmu_Back->Release()); + if (lpDDSEmu_Prim) while(lpDDSEmu_Prim->Release()); + if (ddsd.dwFlags & DDSD_BACKBUFFERCOUNT) { // Praetorians !!!! + if (lpDDSBack) while(lpDDSBack->Release()); + lpBackBufferDD = NULL; + } + } + lpDDSEmu_Back=NULL; + lpDDSEmu_Prim=NULL; + + int BBCount=0; // or 1 ?? + if (ddsd.dwFlags & DDSD_BACKBUFFERCOUNT) BBCount=ddsd.dwBackBufferCount; + if ((BBCount > 0) && (iBakBufferVersion < 4)){ + lpDDSBack=NULL; + OutTraceD("CreateSurface: backbuffer cleared - BackBufferCount=%d\n", BBCount); + } + + if (BBCount > MAXBACKBUFFERS){ + char sMsg[81]; + sprintf_s(sMsg, 80, "CreateSurface: BackBufferCount=%d\n", BBCount); + OutTraceD(sMsg); + if (IsAssertEnabled) MessageBox(0, sMsg, "CreateSurface", MB_OK | MB_ICONEXCLAMATION); + // recover ... + BBCount = MAXBACKBUFFERS; + } + + // build emulated primary surface, real primary and backbuffer surfaces + CurFlags=ddsd.dwFlags; + res=BuildPrimary(lpdd, pCreateSurface, lpddsd, dxversion, lplpdds, NULL); + if(res) return res; + lpDDSPrim = *lplpdds; + dxw.MarkPrimarySurface(lpDDSPrim); + + if (BBCount){ + // build emulated backbuffer surface + res=BuildBackBuffer(lpdd, pCreateSurface, lpddsd, dxversion, &lpDDSBack, NULL); + if(res) return res; + dxw.MarkBackBufferSurface(lpDDSBack); + + // V2.1.85/V2.2.34: tricky !!!! + // When a real backbuffer is created, it has a reference to its frontbuffer. + // some games (Monopoly 3D) may depend on this setting - i.e. they could close + // the exceeding references - so this is better be replicated adding an initial + // reference to the zero count. But you don't have to do this if the backbuffer + // is created independently by the primary surface. + lpDDSBack->AddRef(); // should it be repeated BBCount times???? + } + + if(IsTraceD){ + OutTrace("CreateSurface: created DDSPrim=%x DDSBack=%x", lpDDSPrim, lpDDSBack); + if(dxw.dwFlags1 & (EMULATESURFACE|EMULATEBUFFER)) OutTrace(" DDSEmu_Prim=%x", lpDDSEmu_Prim); + if(dxw.dwFlags1 & EMULATESURFACE) OutTrace(" DDSEmu_Back=%x", lpDDSEmu_Back); + OutTrace("\n"); + } + + // rebuild the clipper area + if(dxw.dwFlags1 & CLIPCURSOR) dxw.SetClipCursor(); + return DD_OK; + } + + // a request for a separate (not complex) backbuffer to attach later on, maybe. + if ((ddsd.dwFlags & DDSD_CAPS) && (ddsd.ddsCaps.dwCaps & DDSCAPS_BACKBUFFER)){ + if (lpDDSBack) { + OutTraceD("CreateSurface: returning current DDSBack=%x\n", lpDDSBack); + *lplpdds = lpDDSBack; + return DD_OK; + } + + res=BuildBackBuffer(lpdd, pCreateSurface, lpddsd, dxversion, lplpdds, NULL); + lpDDSBack = *lplpdds; + dxw.MarkBackBufferSurface(lpDDSBack); + return res; + } + + // if nothing else, it's a generic/zbuffer surface + + if(lpddsd->ddsCaps.dwCaps & DDSCAPS_ZBUFFER) { + lpDDZBuffer=*lplpdds; + DDZBufferCaps = lpddsd->ddsCaps.dwCaps; + OutTraceD("CreateSurface: lpDDZBuffer=%x save ZBUFFER caps=%x(%s)\n", lpDDZBuffer, DDZBufferCaps, ExplainDDSCaps(DDZBufferCaps)); + } + + res=BuildGeneric(lpdd, pCreateSurface, lpddsd, dxversion, lplpdds, pu); + if(!res) dxw.MarkRegularSurface(*lplpdds); + + return res; +} + + +HRESULT WINAPI extCreateSurface1(LPDIRECTDRAW lpdd, DDSURFACEDESC *lpddsd, LPDIRECTDRAWSURFACE *lplpdds, void *pu) +{ + return extCreateSurface(1, (CreateSurface_Type)pCreateSurface1, lpdd, (DDSURFACEDESC2 *)lpddsd, lplpdds, pu); +} + +HRESULT WINAPI extCreateSurface2(LPDIRECTDRAW lpdd, DDSURFACEDESC *lpddsd, LPDIRECTDRAWSURFACE *lplpdds, void *pu) +{ + return extCreateSurface(2, (CreateSurface_Type)pCreateSurface2, lpdd, (DDSURFACEDESC2 *)lpddsd, lplpdds, pu); +} + +HRESULT WINAPI extCreateSurface4(LPDIRECTDRAW lpdd, DDSURFACEDESC2 *lpddsd, LPDIRECTDRAWSURFACE *lplpdds, void *pu) +{ + return extCreateSurface(4, (CreateSurface_Type)pCreateSurface4, lpdd, (DDSURFACEDESC2 *)lpddsd, lplpdds, pu); +} + +HRESULT WINAPI extCreateSurface7(LPDIRECTDRAW lpdd, DDSURFACEDESC2 *lpddsd, LPDIRECTDRAWSURFACE *lplpdds, void *pu) +{ + return extCreateSurface(7, (CreateSurface_Type)pCreateSurface7, lpdd, (DDSURFACEDESC2 *)lpddsd, lplpdds, pu); +} + + +HRESULT WINAPI extGetAttachedSurface(int dxversion, GetAttachedSurface_Type pGetAttachedSurface, + LPDIRECTDRAWSURFACE lpdds, LPDDSCAPS lpddsc, LPDIRECTDRAWSURFACE *lplpddas) +{ + HRESULT res; + BOOL IsPrim; + BOOL IsBack; + + IsPrim=dxw.IsAPrimarySurface(lpdds); + IsBack=dxw.IsABackBufferSurface(lpdds); + OutTraceD("GetAttachedSurface(%d): lpdds=%x%s caps=%x(%s)\n", + dxversion, lpdds, (IsPrim?"(PRIM)":(IsBack ? "(BACK)":"")), lpddsc->dwCaps, ExplainDDSCaps(lpddsc->dwCaps)); + +#if 0 + if(lpddsc->dwCaps & DDSCAPS_MIPMAP){ + OutTraceD("GetAttachedSurface: emulate MIPMAP capability\n"); + lpddsc->dwCaps &= ~DDSCAPS_MIPMAP; + } +#endif + + // if not primary, just proxy the method + + // v2.1.81: fix to make "Silver" working: if the primary surface was created with + // backbuffercount == 2, the game expects some more surface to be attached to + // the attached backbuffer. Since there would be no use for it, just return + // the attached backbuffer itself. Makes Silver working, anyway.... + // beware: "Snowboard Racer" fails if you return an attached surface anyhow! There, + // the primary surface was created with back buffer count == 1. + + // this is yet to be proven utility..... + if (IsBack && (lpddsc->dwCaps & DDSCAPS_ZBUFFER) && lpDDZBuffer){ + *lplpddas = lpDDZBuffer; + OutTraceD("GetAttachedSurface(%d): emulating ZBUFFER attach on BACKBUFFER lpddsadd=%x\n", dxversion, *lplpddas); + return 0; + } + + if (IsBack && (DDSD_Prim.dwBackBufferCount > 1)){ + *lplpddas = lpDDSBack; + OutTraceD("GetAttachedSurface(%d): DOUBLEBUFFER attached=%x\n", dxversion, *lplpddas); + return 0; + } + + // on primary surface return the lpDDSBack surface coming from either an explicit + // AddAttachedSurface, or a primary complex surface creation otherwise.... + + if(IsPrim && (lpddsc->dwCaps & (DDSCAPS_BACKBUFFER|DDSCAPS_FLIP))) { // v2.02.42 added DDSCAPS_FLIP for Empire Earth + if (lpDDSBack) { + *lplpddas = lpDDSBack; + OutTraceD("GetAttachedSurface(%d): BACKBUFFER attached=%x\n", dxversion, *lplpddas); + return 0; + } + else { + *lplpddas = NULL; + OutTraceD("GetAttachedSurface(%d): no attached BACKBUFFER\n", dxversion); + return DDERR_NOTFOUND; + } + } + + // proxy the call... + + res=(*pGetAttachedSurface)(lpdds, lpddsc, lplpddas); + if(res) + OutTraceE("GetAttachedSurface(%d): ERROR res=%x(%s) at %d\n", dxversion, res, ExplainDDError(res), __LINE__); + else + OutTraceD("GetAttachedSurface(%d): attached=%x\n", dxversion, *lplpddas); + return res; + +} + +HRESULT WINAPI extGetAttachedSurface1(LPDIRECTDRAWSURFACE lpdds, LPDDSCAPS lpddsc, LPDIRECTDRAWSURFACE *lplpddas) +{ + return extGetAttachedSurface(1, pGetAttachedSurface1, lpdds, lpddsc, lplpddas); +} + +HRESULT WINAPI extGetAttachedSurface3(LPDIRECTDRAWSURFACE lpdds, LPDDSCAPS lpddsc, LPDIRECTDRAWSURFACE *lplpddas) +{ + return extGetAttachedSurface(3, pGetAttachedSurface3, lpdds, lpddsc, lplpddas); +} + +HRESULT WINAPI extGetAttachedSurface4(LPDIRECTDRAWSURFACE lpdds, LPDDSCAPS lpddsc, LPDIRECTDRAWSURFACE *lplpddas) +{ + return extGetAttachedSurface(4, pGetAttachedSurface4, lpdds, lpddsc, lplpddas); +} + +HRESULT WINAPI extGetAttachedSurface7(LPDIRECTDRAWSURFACE lpdds, LPDDSCAPS lpddsc, LPDIRECTDRAWSURFACE *lplpddas) +{ + return extGetAttachedSurface(7, pGetAttachedSurface7, lpdds, lpddsc, lplpddas); +} + +static void BlitError(HRESULT res, LPRECT lps, LPRECT lpd, int line) +{ + OutTraceE("Blt: ERROR %x(%s) at %d", res, ExplainDDError(res), line); + if (res==DDERR_INVALIDRECT){ + if (lps) + OutTraceE(" src=(%d,%d)-(%d,%d)",lps->left, lps->top, lps->right, lps->bottom); + else + OutTraceE(" src=(NULL)"); + if (lpd) + OutTraceE(" dest=(%d,%d)-(%d,%d)",lpd->left, lpd->top, lpd->right, lpd->bottom); + else + OutTraceE(" dest=(NULL)"); + } + OutTraceE("\n"); + return; +} + +static void BlitTrace(char *label, LPRECT lps, LPRECT lpd, int line) +{ + extern HANDLE hTraceMutex; + WaitForSingleObject(hTraceMutex, INFINITE); + OutTrace("Blt: %s", label); + if (lps) + OutTrace(" src=(%d,%d)-(%d,%d)",lps->left, lps->top, lps->right, lps->bottom); + else + OutTrace(" src=(NULL)"); + if (lpd) + OutTrace(" dest=(%d,%d)-(%d,%d)",lpd->left, lpd->top, lpd->right, lpd->bottom); + else + OutTrace(" dest=(NULL)"); + OutTrace(" at %d\n", line); + ReleaseMutex(hTraceMutex); + return; +} + +HRESULT WINAPI sBlt(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect, + LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPDDBLTFX lpddbltfx, BOOL isFlipping) +{ + RECT emurect, destrect; + POINT p = {0, 0}; + HRESULT res; + BOOL ToPrim, FromPrim, ToScreen, FromScreen; + //CkArg arg; + + ToPrim=dxw.IsAPrimarySurface(lpdds); + FromPrim=dxw.IsAPrimarySurface(lpddssrc); + ToScreen=ToPrim && !(dxw.dwFlags1 & EMULATESURFACE); + FromScreen=FromPrim && !(dxw.dwFlags1 & EMULATESURFACE); + + CleanRect(&lpdestrect,__LINE__); + CleanRect(&lpsrcrect,__LINE__); + + // log + if(IsTraceD){ + char sLog[256]; + char sInfo[128]; + sprintf(sLog, "%s: dest=%x%s src=%x%s dwFlags=%x(%s)", + api, lpdds, (ToPrim ? "(PRIM)":""), lpddssrc, (FromPrim ? "(PRIM)":""), dwflags, ExplainBltFlags(dwflags)); + if (lpdestrect) + sprintf(sInfo, " destrect=(%d,%d)-(%d,%d)", lpdestrect->left, lpdestrect->top, lpdestrect->right, lpdestrect->bottom); + else + sprintf(sInfo, " destrect=(NULL)"); + strcat(sLog, sInfo); + if (lpsrcrect) + sprintf(sInfo, " srcrect=(%d,%d)-(%d,%d)", lpsrcrect->left, lpsrcrect->top, lpsrcrect->right, lpsrcrect->bottom); + else + sprintf(sInfo, " srcrect=(NULL)"); + strcat(sLog, sInfo); + if(lpddbltfx){ + if (dwflags & DDBLT_COLORFILL){ + sprintf(sInfo, " ddbltfx.FillColor=%x", lpddbltfx->dwFillColor); + strcat(sLog, sInfo); + } + if (dwflags & DDBLT_KEYDESTOVERRIDE){ + sprintf(sInfo, " ddbltfx.DestColorkey=%x", lpddbltfx->ddckDestColorkey); + strcat(sLog, sInfo); + } + if (dwflags & DDBLT_KEYSRCOVERRIDE){ + sprintf(sInfo, " ddbltfx.SrcColorkey=%x", lpddbltfx->ddckSrcColorkey); + strcat(sLog, sInfo); + } + if (dwflags & DDBLT_ROP){ + sprintf(sInfo, " ddbltfx.ROP=%x", lpddbltfx->dwROP); + strcat(sLog, sInfo); + } + if (dwflags & DDBLT_DEPTHFILL){ + sprintf(sInfo, " ddbltfx.FillDepth=%x", lpddbltfx->dwFillDepth); + strcat(sLog, sInfo); + } + } + strcat(sLog,"\n"); + OutTrace(sLog); + } + + // debug suppressions + if(ToPrim){ + if(isFlipping){ + if(dxw.dwFlags3 & NODDRAWFLIP) return DD_OK; + } + else { + if(dxw.dwFlags3 & NODDRAWBLT) return DD_OK; + } + } + +#ifdef ONEPIXELFIX + if (lpdestrect){ + if ((lpdestrect->top == 0) && (lpdestrect->bottom == dxw.GetScreenHeight() -1)) lpdestrect->bottom = dxw.GetScreenHeight(); + if ((lpdestrect->left == 0) && (lpdestrect->right == dxw.GetScreenWidth() -1)) lpdestrect->right = dxw.GetScreenWidth(); + } + if (lpsrcrect){ + if ((lpsrcrect->top == 0) && (lpsrcrect->bottom == dxw.GetScreenHeight() -1)) lpsrcrect->bottom = dxw.GetScreenHeight(); + if ((lpsrcrect->left == 0) && (lpsrcrect->right == dxw.GetScreenWidth() -1)) lpsrcrect->right = dxw.GetScreenWidth(); + } +#endif + +#define FIXBIGGERRECT 1 +#if FIXBIGGERRECT + if(ToPrim && lpdestrect){ + if((DWORD)lpdestrect->top < 0) lpdestrect->top = 0; + if((DWORD)lpdestrect->left < 0) lpdestrect->left = 0; + if((DWORD)lpdestrect->bottom > dxw.GetScreenHeight()) lpdestrect->bottom = dxw.GetScreenHeight(); + if((DWORD)lpdestrect->right > dxw.GetScreenWidth()) lpdestrect->right = dxw.GetScreenWidth(); + } +#endif + + // blit to non primary surface + + if(!ToPrim){ + //RECT srcrect, winrect; + RECT srcrect; + // make a working copy of srcrect if not NULL + if (lpsrcrect){ + srcrect=*lpsrcrect; + } + // when blitting from a primary surface on screen (that is in non emulated mode), correct offsets + // You should take account also for scaled primary surfaces, but that would be a hard task: + // a reduced primary surface (in not-emulated mode) would bring quality loss!!! + // v2.1.83: BLITFROMBACKBUFFER mode, let you chose to blit from backbuffer, where the surface size + // is fixed no matter how the window/primary surface is scaled. + // In "The Sims" there is no quality loss, but some scrolling artifact. + if(lpsrcrect && FromScreen){ + if(lpDDSBack && (dxw.dwFlags1 & BLITFROMBACKBUFFER)){ + lpddssrc=lpDDSBack; + srcrect=dxw.GetScreenRect(); + } + else{ + srcrect=dxw.MapWindowRect(lpsrcrect); + } + } + + if (IsDebug) BlitTrace("NOPRIM", lpsrcrect, lpdestrect, __LINE__); + res= (*pBlt)(lpdds, lpdestrect, lpddssrc, lpsrcrect ? &srcrect : NULL, dwflags, lpddbltfx); + // Blitting compressed data may work to screen surfaces only. In this case, it may be worth + // trying blitting directly to lpDDSEmu_Prim: it makes DK2 intro movies working. + // Wrong guess!!! The cause was not compression, but simply a pixelformat mismatch. Better + // configure things properly and avoid this branch. + switch(res){ + case DDERR_UNSUPPORTED: + if (dxw.dwFlags1 & EMULATESURFACE){ + RECT targetrect; + if (IsDebug) BlitTrace("UNSUPP", lpsrcrect ? &srcrect : NULL, lpdestrect, __LINE__); + targetrect=*lpdestrect; + dxw.MapWindowRect(&targetrect); + res=(*pBlt)(lpDDSEmu_Prim, &targetrect, lpddssrc, lpsrcrect ? &srcrect : NULL, dwflags, lpddbltfx); + } + break; + case DDERR_SURFACEBUSY: + (*pUnlockMethod(lpdds))(lpdds, NULL); + if (lpddssrc) (*pUnlockMethod(lpddssrc))(lpddssrc, NULL); + if (IsDebug) BlitTrace("BUSY", lpsrcrect ? &srcrect : NULL, lpdestrect, __LINE__); + res=(*pBlt)(lpdds, lpdestrect, lpddssrc, lpsrcrect ? &srcrect : NULL, dwflags|DDBLT_WAIT, lpddbltfx); + break; + default: + break; + } + if (res) BlitError(res, &srcrect, lpdestrect, __LINE__); + if(IsDebug) { + DescribeSurface(lpdds, 0, "[DST]" , __LINE__); + if (lpddssrc) DescribeSurface(lpddssrc, 0, "[SRC]" , __LINE__); // lpddssrc could be NULL!!! + } + if(dxw.dwFlags1 & SUPPRESSDXERRORS) res=0; + return res; + } + + // Blit to primary surface + + if(dxw.HandleFPS()) return DD_OK; + + destrect=dxw.MapWindowRect(lpdestrect); + //OutTrace("DESTRECT=(%d,%d)-(%d,%d)\n", destrect.left, destrect.top, destrect.right, destrect.bottom); + + if(!(dxw.dwFlags1 & (EMULATESURFACE|EMULATEBUFFER))){ + res=0; + // blit only when source and dest surface are different. Should make ScreenRefresh faster. + if (lpdds != lpddssrc) { + if (dxw.dwFlags2 & SHOWFPSOVERLAY) dxw.ShowFPS(lpddssrc); + if (1) dxw.ShowTimeStretching(lpddssrc); + if (IsDebug) BlitTrace("PRIM-NOEMU", lpsrcrect, &destrect, __LINE__); + res= (*pBlt)(lpdds, &destrect, lpddssrc, lpsrcrect, dwflags, lpddbltfx); + } + if(res){ + BlitError(res, lpsrcrect, &destrect, __LINE__); + // Try to handle HDC lock concurrency.... + if(res==DDERR_SURFACEBUSY){ + (*pUnlockMethod(lpdds))(lpdds, NULL); + if (IsDebug) BlitTrace("BUSY", lpsrcrect, &destrect, __LINE__); + res= (*pBlt)(lpdds, &destrect, lpddssrc, lpsrcrect, dwflags, lpddbltfx); + if (res) BlitError(res, lpsrcrect, &destrect, __LINE__); + } + + if(dxw.dwFlags1 & SUPPRESSDXERRORS) res=0; + } + + return res; + } + + // ... else blitting on emulated surface + // Blit/Flip to emulated primary surface + + if(!lpddssrc) { + if (isFlipping){ + // handle the flipping chain ... + lpddssrc=lpDDSBack; + OutTraceD("Flip: setting flip chain to lpdds=%x\n", lpddssrc); + } + } + + if (lpdestrect){ + emurect=*lpdestrect; + } + else{ + // emurect: emulated rect is full surface (dwWidth x dwHeight) + emurect.left = 0; + emurect.top = 0; + emurect.right = dxw.GetScreenWidth(); + emurect.bottom = dxw.GetScreenHeight(); + } + + res=0; + // blit only when source and dest surface are different. Should make ScreenRefresh faster. + if (lpdds != lpddssrc){ + if (IsDebug) BlitTrace("SRC2EMU", &emurect, &destrect, __LINE__); + res=(*pBlt)(lpdds, &emurect, lpddssrc, lpsrcrect, dwflags, lpddbltfx); + } + + if (res) { + BlitError(res, lpsrcrect, &emurect, __LINE__); + DescribeSurface(lpdds, 0, "[DST]" , __LINE__); + if (lpddssrc) DescribeSurface(lpddssrc, 0, "[SRC]" , __LINE__); // lpddssrc could be NULL!!! + /* + Dungeon Keeper II intro movies bug .... + it seems that you can't blit from compressed or different surfaces in memory, + while the operation COULD be supported to video. As a mater of fact, it DOES + work on my PC. + */ + if(res==DDERR_UNSUPPORTED){ + if (dxw.dwFlags2 & SHOWFPSOVERLAY) dxw.ShowFPS(lpddssrc); + if (1) dxw.ShowTimeStretching(lpddssrc); + if (IsDebug) BlitTrace("UNSUPP", &emurect, &destrect, __LINE__); + res=(*pBlt)(lpDDSEmu_Prim, &destrect, lpddssrc, lpsrcrect, dwflags, lpddbltfx); + if (res) BlitError(res, lpsrcrect, &destrect, __LINE__); + } + + // Try to handle HDC lock concurrency.... + if(res==DDERR_SURFACEBUSY){ + res=(*pUnlockMethod(lpddssrc))(lpddssrc, NULL); + if(res) OutTraceE("Unlock ERROR: err=%x(%s)\n", res, ExplainDDError(res)); + if (IsDebug) BlitTrace("BUSY", &emurect, &destrect, __LINE__); + res=(*pBlt)(lpdds, &emurect, lpddssrc, lpsrcrect, dwflags, lpddbltfx); + if (res) BlitError(res, lpsrcrect, &destrect, __LINE__); + } + + if(dxw.dwFlags1 & SUPPRESSDXERRORS) res=0; + return res; + } + + LPDIRECTDRAWSURFACE lpDDSSource; + + if(dxw.dwFlags1 & EMULATESURFACE){ + res=(*pEmuBlt)(lpDDSEmu_Back, &emurect, lpdds, &emurect, DDBLT_WAIT, 0); + if(res==DDERR_SURFACEBUSY){ + (*pUnlockMethod(lpdds))(lpdds, NULL); + (*pUnlockMethod(lpDDSEmu_Back))(lpDDSEmu_Back, NULL); + res=(*pEmuBlt)(lpDDSEmu_Back, &emurect, lpdds, &emurect, DDBLT_WAIT, 0); + } + if(res) { + if(dxw.dwFlags1 & SUPPRESSDXERRORS) res=0; + return res; + } + lpDDSSource = lpDDSEmu_Back; + } + else{ + lpDDSSource = lpdds; + } + + if (dxw.dwFlags2 & SHOWFPSOVERLAY) dxw.ShowFPS(lpDDSSource); + if (1) dxw.ShowTimeStretching(lpDDSSource); + if (IsDebug) BlitTrace("BACK2PRIM", &emurect, &destrect, __LINE__); + res=(*pBlt)(lpDDSEmu_Prim, &destrect, lpDDSSource, &emurect, DDBLT_WAIT, 0); + + if (res) BlitError(res, &emurect, &destrect, __LINE__); + if(dxw.dwFlags1 & SUPPRESSDXERRORS) res=0; + if (IsDebug) OutTrace("%s: done ret=%x at %d\n", api, res, __LINE__); + return res; +} + +HRESULT WINAPI extFlip(LPDIRECTDRAWSURFACE lpdds, LPDIRECTDRAWSURFACE lpddssrc, DWORD dwflags) +{ + BOOL IsPrim; + HRESULT res; + + IsPrim=dxw.IsAPrimarySurface(lpdds); + OutTraceD("Flip: lpdds=%x%s, src=%x, flags=%x(%s)\n", + lpdds, IsPrim?"(PRIM)":"", lpddssrc, dwflags, ExplainFlipFlags(dwflags)); + + if (!IsPrim){ + if(lpddssrc){ + //return 0; + res=(*pFlip)(lpdds, lpddssrc, dwflags); + } + else{ + LPDIRECTDRAWSURFACE lpddsAttached; + DDSCAPS ddsc; + DDSURFACEDESC2 sd; + + sd.dwSize=Set_dwSize_From_Surface(lpdds); + res=lpdds->GetSurfaceDesc((DDSURFACEDESC *)&sd); + if (res) OutTraceD("Flip: GetSurfaceDesc res=%x at %d\n",res, __LINE__); + + // replace these CAPS (good for seven kingdoms II) with same as lpdds surface + //ddsc.dwCaps=DDSCAPS_OFFSCREENPLAIN+DDSCAPS_SYSTEMMEMORY; + ddsc.dwCaps=sd.ddsCaps.dwCaps; + + res=lpdds->GetAttachedSurface(&ddsc, &lpddsAttached); + if(res){ + OutTraceE("Flip: GetAttachedSurface ERROR %x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + return res; + } + res=sBlt("Flip", lpdds, NULL, lpddsAttached, NULL, DDBLT_WAIT, 0, TRUE); + if(res){ + OutTraceE("Flip: Blt ERROR %x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + return res; + } + } + if(res) OutTraceE("Flip: ERROR %x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + return res; + } + + // emulation to primary surface Flip - you can't flip to window surfaces, + // so you have to replace it with Blt operations. + + if((dwflags & DDFLIP_WAIT) || (dxw.dwFlags1 & SAVELOAD)) lpPrimaryDD->WaitForVerticalBlank(DDWAITVB_BLOCKEND , 0); + + if(lpddssrc){ + //res=lpdds->Blt(0, lpddssrc, 0, DDBLT_WAIT, 0); + res=sBlt("Flip", lpdds, NULL, lpddssrc, NULL, DDBLT_WAIT, 0, TRUE); + } + else{ + //v2.02.38: look for a valid BackBuffer surface + if(!lpDDSBack) lpDDSBack=dxw.GetBackBufferSurface(); + if(!lpDDSBack){ + OutTraceE("Flip: no backbuffer\n"); + return DDERR_INVALIDPARAMS; + } + if (dxw.dwFlags2 & BACKBUFATTACH){ + RECT NullArea; + NullArea.left=NullArea.top=0; + NullArea.bottom=dxw.GetScreenHeight(); + NullArea.right=dxw.GetScreenWidth(); + res=sBlt("Flip", lpdds, NULL, lpDDSBack, &NullArea, DDBLT_WAIT, 0, TRUE); + } + else + res=sBlt("Flip", lpdds, NULL, lpDDSBack, NULL, DDBLT_WAIT, 0, TRUE); + } + + if(res) OutTraceE("Flip: Blt ERROR %x(%s)\n", res, ExplainDDError(res)); + return res; +} + +HRESULT WINAPI extBlt(LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect, + LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwflags, LPDDBLTFX lpddbltfx) +{ + if ((dxw.dwFlags2 & FULLRECTBLT) && dxw.IsAPrimarySurface(lpdds)){ + lpsrcrect=NULL; + lpdestrect=NULL; + } + + return sBlt("Blt", lpdds, lpdestrect, lpddssrc, lpsrcrect, dwflags, lpddbltfx, FALSE); +} + +HRESULT WINAPI extBltFast(LPDIRECTDRAWSURFACE lpdds, DWORD dwx, DWORD dwy, + LPDIRECTDRAWSURFACE lpddssrc, LPRECT lpsrcrect, DWORD dwtrans) +{ + // BltFast is supported just on screen surfaces, so it has to be replaced + // by ordinary Blt operation in EMULATESURFACE mode. + // Mind that screen surface doesn't necessarily mean PRIMARY surfaces! + + RECT srcrect, destrect; + DWORD flags = 0; + DDSURFACEDESC2 ddsd; + HRESULT ret; + BOOL ToPrim, FromPrim; + + ToPrim=dxw.IsAPrimarySurface(lpdds); + FromPrim=dxw.IsAPrimarySurface(lpddssrc); + + CleanRect(&lpsrcrect,__LINE__); + + if(IsTraceD){ + OutTrace("BltFast: dest=%x%s src=%x%s dwTrans=%x(%s) (x,y)=(%d,%d) ", + lpdds, ToPrim?"(PRIM)":"", lpddssrc, FromPrim?"(PRIM)":"", dwtrans, ExplainBltFastFlags(dwtrans), dwx, dwy); + if (lpsrcrect) + OutTrace("srcrect=(%d,%d)-(%d,%d)\n", + lpsrcrect->left, lpsrcrect->top, lpsrcrect->right, lpsrcrect->bottom); + else + OutTrace("srcrect=(NULL)\n"); + } + + // consistency check .... + if (lpsrcrect) + if((lpsrcrect->left >= lpsrcrect->right) || (lpsrcrect->top >= lpsrcrect->bottom)) { + OutTraceD("BltFast: ASSERT bad rect at %d\n", __LINE__); + return 0; + } + + if(dwtrans & DDBLTFAST_WAIT) flags = DDBLT_WAIT; + if(dwtrans & DDBLTFAST_DESTCOLORKEY) flags |= DDBLT_KEYDEST; + if(dwtrans & DDBLTFAST_SRCCOLORKEY) flags |= DDBLT_KEYSRC; + + if ((dxw.dwFlags2 & FULLRECTBLT) && ToPrim){ + return sBlt("BltFast", lpdds, NULL, lpddssrc, lpsrcrect, flags, 0, FALSE); + } + + destrect.left = dwx; + destrect.top = dwy; + if(lpsrcrect){ + destrect.right = destrect.left + lpsrcrect->right - lpsrcrect->left; + destrect.bottom = destrect.top + lpsrcrect->bottom - lpsrcrect->top; + // avoid altering pointed values.... + srcrect=*lpsrcrect; + //ret=lpdds->Blt(&destrect, lpddssrc, &srcrect, flags, 0); + ret=sBlt("BltFast", lpdds, &destrect, lpddssrc, &srcrect, flags, 0, FALSE); + } + else{ + // does it EVER goes through here? NULL is not a valid rect value for BltFast call.... + // yes, forced in FULLRECTBLT mode! + ddsd.dwSize=Set_dwSize_From_Surface(lpddssrc); + ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT; + ret=lpddssrc->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd); + if (ret){ + OutTraceE("BltFast: GetSurfaceDesc ERROR %x at %d\n", ret, __LINE__); + return 0; + } + destrect.right = destrect.left + ddsd.dwWidth; + destrect.bottom = destrect.top + ddsd.dwHeight; + ret=sBlt("BltFast", lpdds, &destrect, lpddssrc, NULL, flags, 0, FALSE); + } + + return ret; +} + +HRESULT WINAPI extWaitForVerticalBlank(LPDIRECTDRAW lpdd, DWORD dwflags, HANDLE hevent) +{ + static DWORD time = 0; + static BOOL step = 0; + DWORD tmp; + if(!(dxw.dwFlags1 & SAVELOAD)) return (*pWaitForVerticalBlank)(lpdd, dwflags, hevent); + tmp = (*pGetTickCount)(); + if((time - tmp) > 32) time = tmp; + (*pSleep)(time - tmp); + if(step) time += 16; + else time += 17; + step ^= 1; + return 0; +} + +#define DDPCAPS_INITIALIZE_LEGACY 0x00000008l + +HRESULT WINAPI extCreatePalette(LPDIRECTDRAW lpdd, DWORD dwflags, LPPALETTEENTRY lpddpa, + LPDIRECTDRAWPALETTE *lplpddp, IUnknown *pu) +{ + HRESULT res; + + OutTraceD("CreatePalette: dwFlags=%x(%s)\n", dwflags, ExplainCreatePaletteFlags(dwflags)); + if(IsDebug && (dwflags & DDPCAPS_8BIT)){ + int idx; + OutTrace("CreatePalette: "); + for(idx=0; idx<256; idx++) OutTrace("(%02x.%02x.%02x)", + lpddpa[idx].peRed, + lpddpa[idx].peGreen, + lpddpa[idx].peBlue ); + OutTrace("\n"); + } + + if (dwflags & ~(DDPCAPS_PRIMARYSURFACE|DDPCAPS_8BIT|DDPCAPS_ALLOW256|DDPCAPS_INITIALIZE_LEGACY)) STOPPER("Palette flags"); + + if(dxw.dwFlags1 & EMULATESURFACE) dwflags &= ~DDPCAPS_PRIMARYSURFACE; + res = (*pCreatePalette)(lpdd, dwflags, lpddpa, lplpddp, pu); + if (res) { + OutTraceE("CreatePalette: ERROR res=%x(%s)\n", res, ExplainDDError(res)); + return res; + } + else OutTraceD("CreatePalette: OK lpddp=%x\n", *lplpddp); + + HookDDPalette(lplpddp); + return 0; +} + +HRESULT WINAPI extGetPalette(LPDIRECTDRAWSURFACE lpdds, LPDIRECTDRAWPALETTE *lplpddp) +{ + HRESULT res; + + OutTraceD("GetPalette: lpdds=%x\n", lpdds); + + res=(*pGetPalette)(lpdds, lplpddp); + if (res) OutTraceE("GetPalette: ERROR res=%x(%s)\n", res, ExplainDDError(res)); + else OutTraceD("GetPalette: OK\n"); + return res; +} + +HRESULT WINAPI extSetPalette(LPDIRECTDRAWSURFACE lpdds, LPDIRECTDRAWPALETTE lpddp) +{ + PALETTEENTRY *lpentries; + BOOL isPrim; + HRESULT res; + + isPrim=dxw.IsAPrimarySurface(lpdds); + OutTraceD("SetPalette: lpdds=%x%s lpddp=%x\n", lpdds, isPrim?"(PRIM)":"", lpddp); + + res=(*pSetPalette)(lpdds, lpddp); + res=DD_OK; + if(res)OutTraceE("SetPalette: ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + else OutTraceD("SetPalette: OK\n"); + + if((dxw.dwFlags1 & EMULATESURFACE) && isPrim){ + OutTraceD("SetPalette: register PRIMARY palette lpDDP=%x\n", lpddp); + lpDDP = lpddp; + if(lpddp){ + HRESULT res2; + lpentries = (LPPALETTEENTRY)PaletteEntries; + res2=lpddp->GetEntries(0, 0, 256, lpentries); + if(res2) OutTraceE("SetPalette: GetEntries ERROR res=%x(%s)\n", res2, ExplainDDError(res2)); + mySetPalette(0, 256, lpentries); + } + res=0; + } + + return res; +} + +HRESULT WINAPI extSetEntries(LPDIRECTDRAWPALETTE lpddp, DWORD dwflags, DWORD dwstart, DWORD dwcount, LPPALETTEENTRY lpentries) +{ + HRESULT res; + + OutTraceD("SetEntries: lpddp=%x dwFlags=%x, start=%d, count=%d entries=%x\n", //GHO: added trace infos + lpddp, dwflags, dwstart, dwcount, lpentries); + + res = (*pSetEntries)(lpddp, dwflags, dwstart, dwcount, lpentries); + if(res) OutTraceE("SetEntries: ERROR res=%x(%s)\n", res, ExplainDDError(res)); + else OutTraceD("SetEntries: OK\n"); + + if((dxw.dwFlags1 & EMULATESURFACE) && (lpDDP == lpddp)){ + OutTraceD("SetEntries: update PRIMARY palette lpDDP=%x\n", lpddp); + if ((dwstart + dwcount > 256) || (dwstart<0)){ + dwcount=256; + dwstart=0; + OutTraceD("SetEntries: ASSERT start+count > 256\n"); + } + + mySetPalette(dwstart, dwcount, lpentries); + + // GHO: needed for fixed rect and variable palette animations, + // e.g. dungeon keeper loading screen, Warcraft II splash, ... + // GHO: but refreshing cause flickering when GDI was used without updating the primary surface + // e.g. Tomb Raider 2 intro titles, Virtua Fighter PC, ... + if ((dxw.dwFlags1 & EMULATESURFACE) && !(dxw.dwFlags2 & NOPALETTEUPDATE)) dxw.ScreenRefresh(); + } + return res; +} + +HRESULT WINAPI extSetClipper(LPDIRECTDRAWSURFACE lpdds, LPDIRECTDRAWCLIPPER lpddc) +{ + HRESULT res; + BOOL isPrim; + isPrim=dxw.IsAPrimarySurface(lpdds); + OutTraceD("SetClipper: lpdds=%x%s lpddc=%x\n", lpdds, isPrim?"(PRIM)":"", lpddc); + + // v2.1.84: SUPPRESSCLIPPING flag - improves "Monopoly Edition 3D" where continuous + // clipping ON & OFF affects blitting on primary surface. + if(dxw.dwFlags1 & SUPPRESSCLIPPING) return 0; + + if(dxw.dwFlags1 & (EMULATESURFACE|EMULATEBUFFER)){ + if ((isPrim && lpDDSEmu_Prim) || + ((lpdds == lpDDSBack) && lpDDSEmu_Back)){ + OutTraceD("SetClipper: skip primary/backbuffer lpdds=%x\n", lpdds); + res=0; + } + else + res=(*pSetClipper)(lpdds, lpddc); + } + else + res=(*pSetClipper)(lpdds, lpddc); + + if (res) + OutTraceE("SetClipper: ERROR res=%x(%s)\n", res, ExplainDDError(res)); + return res; +} + +HRESULT WINAPI extLock(LPDIRECTDRAWSURFACE lpdds, LPRECT lprect, LPDIRECTDRAWSURFACE lpdds2, DWORD flags, HANDLE hEvent) +{ + HRESULT res; + BOOL IsPrim; + + IsPrim=dxw.IsAPrimarySurface(lpdds); + CleanRect(&lprect, __LINE__); + + if(IsTraceD){ + OutTrace("Lock: lpdds=%x%s flags=%x(%s) lpdds2=%x", + lpdds, (IsPrim ? "(PRIM)":""), flags, ExplainLockFlags(flags), lpdds2); + if (lprect) + OutTrace(" rect=(%d,%d)-(%d,%d)\n", lprect->left, lprect->top, lprect->right, lprect->bottom); + else + OutTrace(" rect=(NULL)\n"); + } + + res=(*pLock)(lpdds, lprect, lpdds2, flags, hEvent); + if(res==DDERR_SURFACEBUSY){ // v70: fix for "Ancient Evil" + (*pUnlockMethod(lpdds))(lpdds, NULL); + res = (*pLock)(lpdds, lprect, lpdds2, flags, hEvent); + OutTraceD("Lock RETRY: ret=%x(%s)\n", res, ExplainDDError(res)); + } + if(res) OutTraceE("Lock ERROR: ret=%x(%s)\n", res, ExplainDDError(res)); + DumpSurfaceAttributes((LPDDSURFACEDESC)lpdds2, "[Locked]" , __LINE__); + if(dxw.dwFlags1 & SUPPRESSDXERRORS) res=DD_OK; + + // shouldn't happen.... if hooked to non primary surface, just call regular method. + // it happens in "Deadlock 2" backbuffer surface!!! + return res; +} + +LPDIRECTDRAWSURFACE2 lpDDSBuffer = NULL; + +HRESULT WINAPI extLockDir(LPDIRECTDRAWSURFACE lpdds, LPRECT lprect, LPDIRECTDRAWSURFACE lpdds2, DWORD flags, HANDLE hEvent) +{ + HRESULT res, res2; + static RECT client; + POINT upleft={0,0}; + LPDIRECTDRAWSURFACE lpDDSPrim; + + // this hooker operates on + // Beware!!! for strange reason, the function gets hooked to ANY surface, also non primary ones!!! + // to find out whether it is the primary or not, using lpdds==lpPrimaryDD->GetGDISurface(&lpDDSPrim); + + if(IsTraceD){ + OutTrace("Lock: lpdds=%x flags=%x(%s) lpdds2=%x", + lpdds, flags, ExplainLockFlags(flags), lpdds2); + if (lprect) + OutTrace(" rect=(%d,%d)-(%d,%d)\n", lprect->left, lprect->top, lprect->right, lprect->bottom); + else + OutTrace(" rect=(NULL)\n"); + } + + // V2.02.43: Empire Earth does some test Lock operations apparently before the primary surface is created + if(lpPrimaryDD){ + lpDDSPrim=0; + res2=(*pGetGDISurface)(lpPrimaryDD, &lpDDSPrim); + if(res2) + OutTraceE("Lock: GetGDISurface ERROR res=%x(%s) at %d\n", res2, ExplainDDError(res2), __LINE__); + else + (*pReleaseS)(lpDDSPrim); + if(lpdds==lpDDSPrim){ + if(dxw.dwFlags1 & LOCKEDSURFACE){ + DDSURFACEDESC2 ddsd; + DDBLTFX fx; + memset(&ddsd, 0, sizeof(ddsd)); + //ddsd.dwSize=SurfaceDescrSize(lpdds); + ddsd.dwSize=sizeof(DDSURFACEDESC); + ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS; + ddsd.dwWidth = dxw.GetScreenWidth(); + ddsd.dwHeight = dxw.GetScreenHeight(); + ddsd.ddsCaps.dwCaps = 0; + //if (SurfaceDescrSize(lpdds)==sizeof(DDSURFACEDESC2)) ddsd.ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN; + DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[Dir FixBuf]" , __LINE__); + res=(*pCreateSurface1)(lpPrimaryDD, (DDSURFACEDESC *)&ddsd, (LPDIRECTDRAWSURFACE *)&lpDDSBuffer, 0); + if(res){ + OutTraceE("CreateSurface: ERROR on DDSBuffer res=%x(%s) at %d\n",res, ExplainDDError(res), __LINE__); + return res; + } + memset(&fx, 0, sizeof(fx)); + fx.dwSize=sizeof(DDBLTFX); + fx.dwFillColor=0; + res=(*pBlt)((LPDIRECTDRAWSURFACE)lpDDSBuffer, NULL, NULL, NULL, DDBLT_WAIT|DDBLT_COLORFILL, &fx); + if(res){ + OutTraceE("Blt: ERROR on DDSBuffer res=%x(%s) at %d\n",res, ExplainDDError(res), __LINE__); + } + lpdds=(LPDIRECTDRAWSURFACE)lpDDSBuffer; + } + else{ + // since it can't scale, at least the updated rect is centered into the window. + (*pGetClientRect)(dxw.GethWnd(), &client); + (*pClientToScreen)(dxw.GethWnd(), &upleft); + if (!lprect) lprect=&client; + OffsetRect(lprect, + upleft.x+(client.right-dxw.GetScreenWidth())/2, + upleft.y+(client.bottom-dxw.GetScreenHeight())/2); + OutTraceD("Lock: NULL rect remapped to (%d,%d)-(%d,%d)\n", + lprect->left, lprect->top, lprect->right, lprect->bottom); + } + } + } + + res=(*pLock)(lpdds, lprect, lpdds2, flags, hEvent); + + if(res) OutTraceE("Lock ERROR: ret=%x(%s)\n", res, ExplainDDError(res)); + DumpSurfaceAttributes((LPDDSURFACEDESC)lpdds2, "[Locked]" , __LINE__); + if(dxw.dwFlags1 & SUPPRESSDXERRORS) res=DD_OK; + + return res; +} + +HRESULT WINAPI extUnlock(int dxversion, Unlock4_Type pUnlock, LPDIRECTDRAWSURFACE lpdds, LPRECT lprect) +{ + HRESULT res; + //RECT screen, rect; + BOOL IsPrim; + + IsPrim=dxw.IsAPrimarySurface(lpdds); + + if ((dxversion == 4) && lprect) CleanRect(&lprect,__LINE__); + + if(IsTraceD){ + OutTrace("Unlock: lpdds=%x%s ", lpdds, (IsPrim ? "(PRIM)":"")); + if (dxversion == 4){ + if (lprect){ + OutTrace("rect=(%d,%d)-(%d,%d)\n", lprect->left, lprect->top, lprect->right, lprect->bottom); + } + else + OutTrace("rect=(NULL)\n"); + } + else + OutTrace("lpvoid=%x\n", lprect); + } + + res=(*pUnlock)(lpdds, lprect); + if (res) OutTraceE("Unlock ERROR res=%x(%s) at %d\n",res, ExplainDDError(res), __LINE__); + if (IsPrim && res==DD_OK) sBlt("Unlock", lpdds, NULL, lpdds, NULL, NULL, 0, FALSE); + if(dxw.dwFlags1 & SUPPRESSDXERRORS) res=0; + return res; +} + +HRESULT WINAPI extUnlock4(LPDIRECTDRAWSURFACE lpdds, LPRECT lprect) +{ + return extUnlock(4, pUnlock4, lpdds, lprect); +} + +HRESULT WINAPI extUnlock1(LPDIRECTDRAWSURFACE lpdds, LPVOID lpvoid) +{ + return extUnlock(1, (Unlock4_Type)pUnlock1, lpdds, (LPRECT)lpvoid); +} + +HRESULT WINAPI extUnlockDir(int dxversion, Unlock4_Type pUnlock, LPDIRECTDRAWSURFACE lpdds, LPRECT lprect) +{ + HRESULT res; + //RECT screen, rect; + BOOL IsPrim; + LPDIRECTDRAWSURFACE lpDDSPrim; + + IsPrim=dxw.IsAPrimarySurface(lpdds); + + if ((dxversion >= 4) && lprect) CleanRect(&lprect,__LINE__); + + if(IsTraceD){ + OutTrace("Unlock: lpdds=%x%s ", lpdds, (IsPrim ? "(PRIM)":"")); + if (dxversion == 4){ + if (lprect){ + OutTrace("rect=(%d,%d)-(%d,%d)\n", lprect->left, lprect->top, lprect->right, lprect->bottom); + } + else + OutTrace("rect=(NULL)\n"); + } + else + OutTrace("lpvoid=%x\n", lprect); + } + + if(dxw.dwFlags1 & LOCKEDSURFACE){ + (*pGetGDISurface)(lpPrimaryDD, &lpDDSPrim); + if(lpdds==lpDDSPrim){ + RECT client; + POINT upleft={0,0}; + (*pGetClientRect)(dxw.GethWnd(), &client); + (*pClientToScreen)(dxw.GethWnd(), &upleft); + if (!lprect) lprect=&client; + OffsetRect(lprect, upleft.x, upleft.y); + res=(*pUnlock)((LPDIRECTDRAWSURFACE)lpDDSBuffer, lprect); + (*pBlt)(lpdds, lprect, (LPDIRECTDRAWSURFACE)lpDDSBuffer, NULL, DDBLT_WAIT, 0); + if(lpDDSBuffer) (*pReleaseS)((LPDIRECTDRAWSURFACE)lpDDSBuffer); + lpDDSBuffer = NULL; + } + (*pReleaseS)(lpDDSPrim); // to leave a correct refcount + } + + res=(*pUnlock)(lpdds, lprect); + if (res) OutTraceE("Unlock ERROR res=%x(%s) at %d\n",res, ExplainDDError(res), __LINE__); + if (IsPrim && res==DD_OK) sBlt("Unlock", lpdds, NULL, lpdds, NULL, NULL, 0, FALSE); + if(dxw.dwFlags1 & SUPPRESSDXERRORS) res=0; + return res; +} + +HRESULT WINAPI extUnlockDir4(LPDIRECTDRAWSURFACE lpdds, LPRECT lprect) +{ + return extUnlockDir(4, pUnlock4, lpdds, lprect); +} + +HRESULT WINAPI extUnlockDir1(LPDIRECTDRAWSURFACE lpdds, LPVOID lpvoid) +{ + return extUnlockDir(1, (Unlock4_Type)pUnlock1, lpdds, (LPRECT)lpvoid); +} + +/* to do: instead of calling GDI GetDC, try to map GetDC with Lock and +ReleaseDC with Unlock, returning the surface memory ptr (???) as HDC +and avoiding the consistency check performed by surface::GetDC (why +should it bother if the screen is 32BPP and the surface is not??? */ + +HRESULT WINAPI extGetDC(LPDIRECTDRAWSURFACE lpdds, HDC FAR *pHDC) +{ + HRESULT res; + BOOL IsPrim; + + IsPrim=dxw.IsAPrimarySurface(lpdds); + OutTraceD("GetDC: lpdss=%x%s\n",lpdds, IsPrim?"(PRIM)":""); + res=(*pGetDC)(lpdds, pHDC); + + if (res==DDERR_CANTCREATEDC && + (dxw.dwFlags1 & EMULATESURFACE) && + dxw.VirtualPixelFormat.dwRGBBitCount==8) { + // for 8BPP palettized surfaces, connect them to either the ddraw emulated palette or the GDI emulated palette + OutTraceD("GetDC: adding 8BPP palette to surface lpdds=%x\n", lpdds); + if(lpDDP==NULL){ + // should link here to the GDI palette? See Hyperblade.... + dxw.palNumEntries=256; + res=(*pCreatePalette)(lpPrimaryDD, DDPCAPS_ALLOW256|DDPCAPS_8BIT|DDPCAPS_INITIALIZE, dxw.palPalEntry, &lpDDP, NULL); + if (res) { + OutTraceE("GetDC: CreatePalette ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + return res; + } + } + res=(*pSetPalette)(lpdds, lpDDP); + if (res) { + OutTraceE("GetDC: SetPalette ERROR res=%x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + return res; + } + // retry .... + res=(*pGetDC)(lpdds, pHDC); + } + + OutTraceD("GetDC: res=%x hdc=%x\n",res, *pHDC); + return res; +} + +HRESULT WINAPI extReleaseDC(LPDIRECTDRAWSURFACE lpdds, HDC FAR hdc) +{ + HRESULT res; + BOOL IsPrim; + + IsPrim=dxw.IsAPrimarySurface(lpdds); + OutTraceD("ReleaseDC: lpdss=%x%s hdc=%x\n",lpdds, IsPrim?"(PRIM)":"", hdc); + res=(*pReleaseDC)(lpdds,hdc); + if((IsPrim) && (dxw.dwFlags1 & EMULATESURFACE)) sBlt("ReleaseDC", lpdds, NULL, lpdds, NULL, 0, NULL, FALSE); + if (res) OutTraceE("ReleaseDC: ERROR res=%x(%s)\n", res, ExplainDDError(res)); + + return res; +} + + +HRESULT WINAPI extFlipToGDISurface(LPDIRECTDRAW lpdd) +{ + //HRESULT res; + + OutTraceD("FlipToGDISurface: lpdd=%x\n", lpdd); + // to revise: so far, it seems the best thing to do is NOTHING, just return 0. + //res=(*pFlipToGDISurface)(lpdd); + //if (res) OutTraceE("FlipToGDISurface: ERROR res=%x(%s), skipping\n", res, ExplainDDError(res)); + // pretend you flipped anyway.... + return 0; +} + +HRESULT WINAPI extGetGDISurface(LPDIRECTDRAW lpdd, LPDIRECTDRAWSURFACE *w) +{ + int res; + + // v2.02.31: + // in EMULATED mode, should not return the actual ddraw primary surface, but the virtual one. + if(dxw.dwFlags1 & EMULATESURFACE){ + *w=dxw.GetPrimarySurface(); + return DD_OK; + } + + res=(*pGetGDISurface)(lpdd, w); + if (res) { + OutTraceE("GetGDISurface: ERROR lpdd=%x res=%x(%s)\n", lpdd, res, ExplainDDError(res)); + } + else { + OutTraceD("GetGDISurface: PROXED lpdd=%x w=%x\n", lpdd, *w); + } + + return res; +} + +// debug function to dump all video modes queried by the DirectDrav::EnumDisplayModes method + +HRESULT WINAPI EnumModesCallbackDumper(LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext) +{ + OutTrace("EnumModesCallback:\n"); + OutTrace("\tdwSize=%d\n", lpDDSurfaceDesc->dwSize); + OutTrace("\tdwFlags=%x(%s)\n", lpDDSurfaceDesc->dwFlags, ExplainFlags(lpDDSurfaceDesc->dwFlags)); + OutTrace("\tdwHeight x dwWidth=(%d,%d)\n", lpDDSurfaceDesc->dwHeight, lpDDSurfaceDesc->dwWidth); + OutTrace("\tlPitch=%d\n", lpDDSurfaceDesc->lPitch); + OutTrace("\tdwBackBufferCount=%d\n", lpDDSurfaceDesc->dwBackBufferCount); + OutTrace("\tdwRefreshRate=%d\n", lpDDSurfaceDesc->dwRefreshRate); + OutTrace("\tlpSurface=%x\n", lpDDSurfaceDesc->lpSurface); + OutTrace("\tddpfPixelFormat %s\n", DumpPixelFormat((LPDDSURFACEDESC2)lpDDSurfaceDesc)); + return DDENUMRET_OK; +} + +typedef HRESULT (WINAPI *EnumModesCallback_Type)(LPDDSURFACEDESC, LPVOID); +typedef struct {LPVOID lpContext; EnumModesCallback_Type lpCallback; } NewContext_Type; + +HRESULT WINAPI myEnumModesFilter(LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext) +{ + if (IsDebug) EnumModesCallbackDumper(lpDDSurfaceDesc, NULL); + + if (dxw.dwFlags1 & PREVENTMAXIMIZE){ + // if PREVENTMAXIMIZE is set, don't let the caller know about forbidden screen settings. + if((lpDDSurfaceDesc->dwHeight > dxw.GetScreenHeight()) || + (lpDDSurfaceDesc->dwWidth > dxw.GetScreenWidth())){ + OutTraceD("EnumDisplayModes: skipping screen size=(%d,%d)\n", lpDDSurfaceDesc->dwHeight, lpDDSurfaceDesc->dwWidth); + return DDENUMRET_OK; + } + } + + // tricky part: in 16BPP color depth let the callback believe that the pixel encoding + // is actually the one implemented in the emulation routines. + // should it fix also the other color depths? + + switch(lpDDSurfaceDesc->ddpfPixelFormat.dwRGBBitCount){ + case 8: + case 16: + case 24: + case 32: + FixPixelFormat(lpDDSurfaceDesc->ddpfPixelFormat.dwRGBBitCount, &lpDDSurfaceDesc->ddpfPixelFormat); + return (*((NewContext_Type *)lpContext)->lpCallback)(lpDDSurfaceDesc, ((NewContext_Type *)lpContext)->lpContext); + break; + } + return DDENUMRET_OK; +} + +HRESULT WINAPI extEnumDisplayModes(EnumDisplayModes1_Type pEnumDisplayModes, LPDIRECTDRAW lpdd, DWORD dwflags, LPDDSURFACEDESC lpddsd, LPVOID lpContext, LPDDENUMMODESCALLBACK cb) +{ + HRESULT res; + OutTraceD("EnumDisplayModes(D): lpdd=%x flags=%x lpddsd=%x callback=%x\n", lpdd, dwflags, lpddsd, cb); + + // note: extEnumDisplayModes serves both the EnumDisplayModes and EnumDisplayModes2 interfaces: + // they differ for the lpddsd argument that should point to either DDSURFACEDESC or DDSURFACEDESC2 + // structures, but unification is possible if the lpddsd->dwSize is properly set and is left untouched. + + if(dxw.dwFlags1 & EMULATESURFACE){ +#if 0 + struct {int w; int h;}SupportedRes[5]= {(320,240),(640,480),(800,600),(1024,1200),(0,0)}; + int SupportedDepths[5]={8,16,24,32,0}; + int ResIdx, DepthIdx, ColorDepth; + DDSURFACEDESC2 EmuDesc; + + //if (1) res=(*pEnumDisplayModes)(lpdd, dwflags, lpddsd, lpContext, EnumModesCallbackDumper); + + EmuDesc.dwRefreshRate = 0; + EmuDesc.ddpfPixelFormat.dwFlags = DDPF_RGB; + if (lpddsd) EmuDesc.dwSize=lpddsd->dwSize; // sizeof either DDSURFACEDESC or DDSURFACEDESC2 !!! + else EmuDesc.dwSize = sizeof(DDSURFACEDESC2); + EmuDesc.dwFlags=DDSD_PIXELFORMAT|DDSD_REFRESHRATE|DDSD_WIDTH|DDSD_HEIGHT|DDSD_PITCH; + for (ResIdx=0; ResIdx<4; ResIdx++){ + EmuDesc.dwHeight=SupportedRes[ResIdx].h; + EmuDesc.dwWidth=SupportedRes[ResIdx].w; + EmuDesc.ddpfPixelFormat.dwSize=sizeof(DDPIXELFORMAT); + EmuDesc.ddpfPixelFormat.dwFlags=DDPF_RGB; + for (DepthIdx=0; DepthIdx<4; DepthIdx++) { + ColorDepth=SupportedDepths[DepthIdx]; + EmuDesc.ddpfPixelFormat.dwRGBBitCount=ColorDepth; + EmuDesc.lPitch=(ColorDepth/8) * SupportedRes[ResIdx].w; + switch (SupportedDepths[DepthIdx]){ + case 8: + EmuDesc.ddpfPixelFormat.dwFlags = DDPF_RGB | DDPF_PALETTEINDEXED8; + break; + case 16: + if (dxw.dwFlags1 & USERGB565){ + EmuDesc.ddpfPixelFormat.dwRBitMask = 0xf800; // Grim Fandango + EmuDesc.ddpfPixelFormat.dwGBitMask = 0x07e0; + EmuDesc.ddpfPixelFormat.dwBBitMask = 0x001f; + EmuDesc.ddpfPixelFormat.dwRGBAlphaBitMask = 0x0000; + } + else { + EmuDesc.ddpfPixelFormat.dwRBitMask = 0x7c00; + EmuDesc.ddpfPixelFormat.dwGBitMask = 0x03e0; + EmuDesc.ddpfPixelFormat.dwBBitMask = 0x001f; + EmuDesc.ddpfPixelFormat.dwRGBAlphaBitMask = 0x8000; + } + break; + case 24: + EmuDesc.ddpfPixelFormat.dwRBitMask = 0x00FF0000; + EmuDesc.ddpfPixelFormat.dwGBitMask = 0x0000FF00; + EmuDesc.ddpfPixelFormat.dwBBitMask = 0x000000FF; + EmuDesc.ddpfPixelFormat.dwRGBAlphaBitMask = 0x00000000; + break; + case 32: + EmuDesc.ddpfPixelFormat.dwRBitMask = 0x00FF0000; + EmuDesc.ddpfPixelFormat.dwGBitMask = 0x0000FF00; + EmuDesc.ddpfPixelFormat.dwBBitMask = 0x000000FF; + EmuDesc.ddpfPixelFormat.dwRGBAlphaBitMask = 0xFF000000; + break; + } + res=(*cb)((LPDDSURFACEDESC)&EmuDesc, lpContext); + if(res==DDENUMRET_CANCEL) break; + } + if(res==DDENUMRET_CANCEL) break; + } + OutTraceD("EnumDisplayModes(D): cycled to res=%d size=(%d,%d)\n", + SupportedDepths[DepthIdx], SupportedRes[ResIdx].w, SupportedRes[ResIdx].h); +#else + NewContext_Type NewContext; + NewContext.lpContext=lpContext; + NewContext.lpCallback=cb; + + res=(*pEnumDisplayModes)(lpdd, dwflags, lpddsd, &NewContext, myEnumModesFilter); +#endif + } + else{ + // proxy the call + res=(*pEnumDisplayModes)(lpdd, dwflags, lpddsd, lpContext, cb); + } + if(res) OutTraceD("EnumDisplayModes(D): ERROR res=%x(%s)\n", res, ExplainDDError(res)); + return res; +} + +HRESULT WINAPI extEnumDisplayModes1(LPDIRECTDRAW lpdd, DWORD dwflags, LPDDSURFACEDESC lpddsd, LPVOID lpContext, LPDDENUMMODESCALLBACK cb) +{ + return extEnumDisplayModes(pEnumDisplayModes1, lpdd, dwflags, lpddsd, lpContext, cb); +} + +HRESULT WINAPI extEnumDisplayModes4(LPDIRECTDRAW lpdd, DWORD dwflags, LPDDSURFACEDESC2 lpddsd, LPVOID lpContext, LPDDENUMMODESCALLBACK2 cb) +{ + return extEnumDisplayModes((EnumDisplayModes1_Type)pEnumDisplayModes4, lpdd, dwflags, (LPDDSURFACEDESC)lpddsd, lpContext, (LPDDENUMMODESCALLBACK)cb); +} + +HRESULT WINAPI extDuplicateSurface(LPDIRECTDRAW lpdd, LPDIRECTDRAWSURFACE s, LPDIRECTDRAWSURFACE *sp) +{ + int res; + res=(*pDuplicateSurface)(lpdd, s, sp); + if (res) + OutTraceE("DuplicateSurface: ERROR dds=%x res=%x(%s)\n", s, res, ExplainDDError(res)); + else + OutTraceD("DuplicateSurface: dds=%x pdds=%x\n", s, *sp); + return res; +} + +HRESULT WINAPI extGetPixelFormat(LPDIRECTDRAWSURFACE lpdds, LPDDPIXELFORMAT p) +{ + DWORD res; + BOOL IsPrim; + + IsPrim=dxw.IsAPrimarySurface(lpdds); + OutTraceD("GetPixelFormat: lpdds=%x%s\n", lpdds, IsPrim?"(PRIM)":""); + res=(*pGetPixelFormat)(lpdds, p); + if(res){ + OutTraceE("GetPixelFormat: ERROR res=%x(%s)\n", res, ExplainDDError(res)); + } + else{ + OutTraceD("GetPixelFormat: Flags=%x(%s) FourCC=%x BitCount=%d RGBA=(%x,%x,%x,%x)\n", + p->dwFlags, ExplainPixelFormatFlags(p->dwFlags), p->dwFourCC, p->dwRGBBitCount, + p->dwRBitMask, p->dwGBitMask, p->dwBBitMask, p->dwRGBAlphaBitMask ); + } + + if ((dxw.dwFlags1 & EMULATESURFACE) && IsPrim){ + p->dwFlags = dxw.VirtualPixelFormat.dwFlags; + p->dwRGBBitCount= dxw.VirtualPixelFormat.dwRGBBitCount; + p->dwRBitMask = dxw.VirtualPixelFormat.dwRBitMask; + p->dwGBitMask = dxw.VirtualPixelFormat.dwGBitMask; + p->dwBBitMask = dxw.VirtualPixelFormat.dwBBitMask; + p->dwRGBAlphaBitMask = dxw.VirtualPixelFormat.dwRGBAlphaBitMask; + OutTraceD("GetPixelFormat: EMULATED BitCount=%d RGBA=(%x,%x,%x,%x)\n", + p->dwRGBBitCount, p->dwRBitMask, p->dwGBitMask, p->dwBBitMask, p->dwRGBAlphaBitMask ); + } + + return res; +} + +#if 0 +static HRESULT WINAPI RestoreAll(LPDIRECTDRAWSURFACE7 lpDDSurface, LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext) +{ + HRESULT res; + //res=lpDDSurface->Restore(); + res=(*pRestore)((LPDIRECTDRAWSURFACE)lpDDSurface); + OutTraceB("TestCooperativeLevel: Restore lpdds=%x res=%x(%s)\n", lpDDSurface, res, ExplainDDError(res)); + (*pReleaseS)((LPDIRECTDRAWSURFACE)lpDDSurface); + if(res) return DDENUMRET_CANCEL; + return DDENUMRET_OK; +} +#endif + +HRESULT WINAPI extTestCooperativeLevel(LPDIRECTDRAW lpdd) +{ + HRESULT res; + res=(*pTestCooperativeLevel)(lpdd); + OutTraceB("TestCooperativeLevel: lpdd=%x res=%x(%s)\n", lpdd, res, ExplainDDError(res)); + if(res==DDERR_WRONGMODE) { +#if 0 + (*pEnumSurfaces4)(lpdd, DDENUMSURFACES_DOESEXIST|DDENUMSURFACES_ALL, NULL, NULL, (LPDDENUMSURFACESCALLBACK2)RestoreAll); + //lpDDSEmu_Prim->Restore(); + //res=(*pEnumSurfaces4)(lpdd, dwflags, lpddsd, lpContext, cb); +#else + res=((LPDIRECTDRAW7)lpdd)->RestoreAllSurfaces(); + if(res) OutTraceE("TestCooperativeLevel: RestoreAllSurfaces ERROR res=%x(%s)\n", res, ExplainDDError(res)); +#endif + } + if(dxw.dwFlags1 & SUPPRESSDXERRORS) return DD_OK; + return res; +} + +HRESULT WINAPI extReleaseS(LPDIRECTDRAWSURFACE lpdds) +{ + HRESULT res; + BOOL IsPrim; + BOOL IsBack; + + IsPrim=dxw.IsAPrimarySurface(lpdds); + IsBack=dxw.IsABackBufferSurface(lpdds); + + res = (*pReleaseS)(lpdds); + + OutTraceD("Release(S): lpdds=%x%s refcount=%d\n", lpdds, IsPrim?"(PRIM)":(IsBack?"(BACK)":""), res); + if (res==0) { // common precondition + // when releasing primary surface, erase clipping region + if(IsPrim && (dxw.dwFlags1 & CLIPCURSOR)) dxw.EraseClipCursor(); + if (dxw.dwFlags1 & EMULATESURFACE) { + if(lpdds==lpDDSEmu_Prim) { + OutTraceD("Release(S): Clearing lpDDSEmu_Prim pointer\n"); + lpDDSEmu_Prim=NULL; + } + if(lpdds==lpDDSEmu_Back) { + OutTraceD("Release(S): Clearing lpDDSEmu_Back pointer\n"); + lpDDSEmu_Back=NULL; + } + if(lpdds==dxw.lpDDSPrimHDC) { + OutTraceD("Release(S): Clearing lpDDSPrimHDC pointer\n"); + dxw.ResetPrimarySurface(); + } + } + if(lpdds==lpDDSBack) { // v2.02.38 + OutTraceD("Release(S): Clearing lpDDSBack pointer\n"); + lpDDSBack = NULL; + } + } + return res; +} + +HRESULT WINAPI extSetColorKey(LPDIRECTDRAWSURFACE lpdds, DWORD flags, LPDDCOLORKEY lpDDColorKey) +{ + HRESULT res; + BOOL IsPrim; + IsPrim=dxw.IsAPrimarySurface(lpdds); + if(IsTraceD){ + OutTrace("SetColorKey: lpdds=%x%s flags=%x(%s) ", + lpdds, (IsPrim ? "(PRIM)" : ""), flags, ExplainColorKeyFlag(flags)); + if (lpDDColorKey) + OutTrace("colors=(L:%x,H:%x)\n",lpDDColorKey->dwColorSpaceLowValue, lpDDColorKey->dwColorSpaceHighValue); + else + OutTrace("colors=(NULL)\n"); + } + + res=(*pSetColorKey)(lpdds, flags, lpDDColorKey); + if(res) OutTraceE("SetColorKey: ERROR flags=%x lpdds=%x res=%x(%s)\n", + flags, lpdds, res, ExplainDDError(res)); + return res; +} + +HRESULT WINAPI extGetColorKey(LPDIRECTDRAWSURFACE lpdds, DWORD flags, LPDDCOLORKEY lpDDColorKey) +{ + HRESULT res; + BOOL IsPrim; + IsPrim=dxw.IsAPrimarySurface(lpdds); + OutTraceD("GetColorKey(S): lpdds=%x%s flags=%x(%s)\n", + lpdds, (IsPrim ? "(PRIM)" : ""), flags, ExplainColorKeyFlag(flags)); + res=(*pGetColorKey)(lpdds, flags, lpDDColorKey); + if(res) + OutTraceE("GetColorKey: ERROR lpdds=%x flags=%x res=%x(%s)\n", lpdds, flags, res, ExplainDDError(res)); + else + OutTraceD("GetColorKey: colors=(L:%x,H:%x)\n", + lpdds, lpDDColorKey->dwColorSpaceLowValue, lpDDColorKey->dwColorSpaceHighValue); + return res; +} + +HRESULT WINAPI extEnumAttachedSurfaces(LPDIRECTDRAWSURFACE lpdds, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) +{ + HRESULT res; + BOOL IsPrim; + + IsPrim=dxw.IsAPrimarySurface(lpdds); + + OutTraceD("EnumAttachedSurfaces: lpdds=%x%s Context=%x Callback=%x\n", + lpdds, (IsPrim ? "(PRIM)":""), lpContext, lpEnumSurfacesCallback); + + if (IsPrim){ + // A Primary surface has not backbuffer attached surfaces actually, + // so don't rely on ddraw and call the callback function directly. + // Needed to make Nox working. + DDSURFACEDESC2 ddsd; + // first, call hooked function + res=(*pEnumAttachedSurfaces)(lpdds, lpContext, lpEnumSurfacesCallback); + if (res) + OutTraceE("EnumAttachedSurfaces: ERROR %x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + if(lpDDSBack){ + ddsd.dwSize=Set_dwSize_From_Surface(lpDDSBack); + res=lpDDSBack->GetSurfaceDesc((LPDDSURFACEDESC)&ddsd); + if(res){ + OutTraceE("EnumAttachedSurfaces: GetSurfaceDesc ERROR %x(%s)\n", + res, ExplainDDError(res)); + return res; + } + res=(lpEnumSurfacesCallback)(lpDDSBack, (LPDDSURFACEDESC)&ddsd, lpContext); + OutTraceD("EnumSurfacesCallback: on DDSBack res=%x(%s)\n", res, ExplainDDError(res)); + } + res=0; // for Black Dahlia + } + else { + res=(*pEnumAttachedSurfaces)(lpdds, lpContext, lpEnumSurfacesCallback); + if (res) + OutTraceE("EnumAttachedSurfaces: ERROR %x(%s) at %d\n", res, ExplainDDError(res), __LINE__); + } + return res; +} + +HRESULT WINAPI extAddAttachedSurface(LPDIRECTDRAWSURFACE lpdds, LPDIRECTDRAWSURFACE lpddsadd) +{ + HRESULT res; + BOOL IsPrim; + + // You can add backbuffers to primary surfaces to join the flipping chain, but you can't do that + // to an emulated primary surface, and you receive a DDERR_CANNOTATTACHSURFACE error code. + // In that case, it's worth to try to emulate the attach, and since the Flip method is emulated, + // just remember this for further handling in the Flip operation. + // But beware: this holds to BACKBUFFER surfaces only, and NOT for attached ZBUFFERS or similar! + + IsPrim=dxw.IsAPrimarySurface(lpdds); + OutTraceD("AddAttachedSurface: lpdds=%x%s lpddsadd=%x\n", lpdds, IsPrim?"(PRIM)":"", lpddsadd); + //if(!lpddsadd) return DDERR_CANNOTATTACHSURFACE; // to avoid a crash... + res=(*pAddAttachedSurface)(lpdds, lpddsadd); + if (res) { + HRESULT sdres; + DDSURFACEDESC2 sd; + sd.dwSize=Set_dwSize_From_Surface(lpddsadd); + sdres=lpddsadd->GetSurfaceDesc((DDSURFACEDESC *)&sd); + if (sdres) + OutTraceE("AddAttachedSurface: GetSurfaceDesc ERROR res=%x at %d\n", sdres, __LINE__); + else + OutTraceD("AddAttachedSurface: GetSurfaceDesc dwCaps=%x(%s)\n", + sd.ddsCaps.dwCaps, ExplainDDSCaps(sd.ddsCaps.dwCaps)); + if (IsPrim){ + if (sd.ddsCaps.dwCaps & DDSCAPS_BACKBUFFER) + if ((dxw.dwFlags1 & EMULATESURFACE) && (res==DDERR_CANNOTATTACHSURFACE) || + (res==DDERR_NOEXCLUSIVEMODE)) + OutTraceD("AddAttachedSurface: emulating BACKBUFFER attach on PRIMARY\n"); + lpDDSBack=lpddsadd; + if (pAddRefS) (*pAddRefS)(lpdds); + res=DD_OK; + } + else if (lpdds == lpDDSBack) { + // v2.02.13: emulate ZBUFFER attach to backbuffer: do nothing and return OK + // this trick makes at least "Nocturne" work also in emulated mode when hardware acceleration + // is set in the game "Options" menu. + if (sd.ddsCaps.dwCaps & DDSCAPS_ZBUFFER) // DDSCAPS_BACKBUFFER for double buffering ??? + if ((dxw.dwFlags1 & EMULATESURFACE) && (res==DDERR_CANNOTATTACHSURFACE)){ + OutTraceD("AddAttachedSurface: emulating ZBUFFER attach on BACKBUFFER\n"); + if (pAddRefS) (*pAddRefS)(lpdds); + res=DD_OK; + } + } + } + if (res) OutTraceE("AddAttachedSurface: ERROR %x(%s)\n", res, ExplainDDError(res)); + return res; +} + +HRESULT WINAPI extDeleteAttachedSurface(LPDIRECTDRAWSURFACE lpdds, DWORD dwflags, LPDIRECTDRAWSURFACE lpddsdel) +{ + HRESULT res; + OutTraceD("DeleteAttachedSurface: lpdds=%x flags=%x lpddsdel=%x\n", lpdds, dwflags, lpddsdel); + res=(*pDeleteAttachedSurface)(lpdds, dwflags, lpddsdel); + if(res) OutTraceE("DeleteAttachedSurface: ERROR %x(%s)\n", res, ExplainDDError(res)); + if (res && (lpddsdel==lpDDSBack)){ + OutTraceD("DeleteAttachedSurface: emulating surface detach lpdds=%x\n", lpddsdel); + lpDDSBack->Release(); // GHO TRY + lpDDSBack=NULL; + res=0; + } + return res; +} + +HRESULT WINAPI cbDump(LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext) +{ + OutTraceD("EnumDisplayModes: CALLBACK lpdds=%x Context=%x Caps=%x(%s)\n", + lpDDSurfaceDesc, lpContext, + lpDDSurfaceDesc->ddsCaps.dwCaps, ExplainDDSCaps(lpDDSurfaceDesc->ddsCaps.dwCaps)); + return 1; +} + +HRESULT WINAPI extGetCapsS(int dxInterface, GetCapsS_Type pGetCapsS, LPDIRECTDRAWSURFACE lpdds, LPDDSCAPS caps) +{ + HRESULT res; + BOOL IsPrim, IsBack, IsFixed; + IsPrim=dxw.IsAPrimarySurface(lpdds); + IsBack=dxw.IsABackBufferSurface(lpdds); + IsFixed=FALSE; + OutTraceD("GetCaps(S%d): lpdds=%x%s, lpcaps=%x\n", dxInterface, lpdds, IsPrim?"(PRIM)":"", caps); + res=(*pGetCapsS)(lpdds, caps); + if(res) + OutTraceE("GetCaps(S%d): ERROR %x(%s)\n", dxInterface, res, ExplainDDError(res)); + else + OutTraceD("GetCaps(S%d): lpdds=%x caps=%x(%s)\n", dxInterface, lpdds, caps->dwCaps, ExplainDDSCaps(caps->dwCaps)); + + if (IsPrim) { + OutTraceD("GetCaps(S%d): fixing PRIMARY surface\n", dxInterface); + IsFixed=TRUE; + caps->dwCaps |= DDSD_Prim.ddsCaps.dwCaps; + caps->dwCaps |= DDSCAPS_PRIMARYSURFACE|DDSCAPS_FLIP|DDSCAPS_FRONTBUFFER|DDSCAPS_VIDEOMEMORY|DDSCAPS_VISIBLE; // primary surfaces must be this way + caps->dwCaps &= ~(DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); // primary surfaces can't be this way + } + + if (IsBack) { + OutTraceD("GetCaps(S%d): fixing BACKBUFFER surface\n", dxInterface); + IsFixed=TRUE; + caps->dwCaps |= (DDSCAPS_BACKBUFFER|DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM); // you never know.... + caps->dwCaps &= ~(DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); // backbuffer surfaces can't be this way + } + + if ((caps->dwCaps & DDSCAPS_ZBUFFER) || (lpdds == lpDDZBuffer)){ + OutTraceD("GetCaps(S%d): fixing ZBUFFER surface\n", dxInterface); + IsFixed=TRUE; + if (DDZBufferCaps & DDSCAPS_SYSTEMMEMORY){ + caps->dwCaps |= (DDSCAPS_ZBUFFER|DDSCAPS_SYSTEMMEMORY); + caps->dwCaps &= ~(DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM); + } + else { + caps->dwCaps |= (DDSCAPS_ZBUFFER|DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM); + caps->dwCaps &= ~DDSCAPS_SYSTEMMEMORY; + } + } + + if(IsFixed) OutTraceD("GetCaps(S%d): lpdds=%x FIXED caps=%x(%s)\n", dxInterface, lpdds, caps->dwCaps, ExplainDDSCaps(caps->dwCaps)); + return res; +} + +HRESULT WINAPI extGetCaps1S(LPDIRECTDRAWSURFACE lpdds, LPDDSCAPS caps) +{ + return extGetCapsS(1, pGetCaps1S, lpdds, caps); +} +HRESULT WINAPI extGetCaps2S(LPDIRECTDRAWSURFACE lpdds, LPDDSCAPS caps) +{ + return extGetCapsS(2, pGetCaps2S, lpdds, caps); +} +HRESULT WINAPI extGetCaps3S(LPDIRECTDRAWSURFACE lpdds, LPDDSCAPS caps) +{ + return extGetCapsS(3, pGetCaps3S, lpdds, caps); +} +HRESULT WINAPI extGetCaps4S(LPDIRECTDRAWSURFACE lpdds, LPDDSCAPS2 caps) +{ + return extGetCapsS(4, (GetCapsS_Type)pGetCaps4S, lpdds, (LPDDSCAPS)caps); +} +HRESULT WINAPI extGetCaps7S(LPDIRECTDRAWSURFACE lpdds, LPDDSCAPS2 caps) +{ + return extGetCapsS(7, (GetCapsS_Type)pGetCaps7S, lpdds, (LPDDSCAPS)caps); +} + +ULONG WINAPI extReleaseD(LPDIRECTDRAW lpdd) +{ + ULONG ActualRef; + LONG VirtualRef; + int dxversion; + + dxversion=lpddHookedVersion(lpdd); // must be called BEFORE releasing the session!! + OutTraceD("Release(D): lpdd=%x dxversion=%d\n", lpdd, dxversion); + + ActualRef=(*pReleaseD)(lpdd); + VirtualRef=(LONG)ActualRef; + OutTraceD("Release(D): lpdd=%x service_lpdd=%x ref=%d\n", lpdd, lpPrimaryDD, ActualRef); + + if (lpdd == lpPrimaryDD) { // v2.1.87: fix for Dungeon Keeper II + if(dxw.dwFlags4 & FIXREFCOUNTER){ + // v2.02.41: fix the ref counter to sumulate the unwindowed original situation + --VirtualRef; // why ???? + if(lpDDSBack) --VirtualRef; + if(dxw.dwFlags1 & EMULATESURFACE){ + if(lpDDSEmu_Prim) --VirtualRef; + if(lpDDSEmu_Back) --VirtualRef; + } + if(VirtualRef<0) VirtualRef=0; + OutTraceD("Release(D): fixed ref counter %d->%d\n", ActualRef, VirtualRef); + } + if((dxversion<4) && (ActualRef==0)){ + // directdraw old versions automatically free all linked objects when the parent session is closed. + OutTraceD("Release(D): RefCount=0 - service object RESET condition\n"); + lpDDSEmu_Prim=NULL; + lpDDSEmu_Back=NULL; + lpDDP=NULL; + lpPrimaryDD=NULL; // v2.02.31 + if(lpBackBufferDD==lpdd){ + lpBackBufferDD=NULL; + lpDDSBack=NULL; // beware: Silent Hunter II seems to require the backbuffer .... + } + } + } + + // when lpdd session is closed (ref==0) the system restores the default color depth + // so if FORCE16BPP is set, dxwnd must restore the 16BPP value + //extern void SwitchTo16BPP(); + //if((ActualRef==0) && (dxw.dwFlags3 & FORCE16BPP)) SwitchTo16BPP(); + + OutTraceD("Release(D): lpdd=%x ref=%x\n", lpdd, VirtualRef); + return (ULONG)VirtualRef; +} + +HRESULT WINAPI extCreateClipper(LPDIRECTDRAW lpdd, DWORD dwflags, + LPDIRECTDRAWCLIPPER FAR* lplpDDClipper, IUnknown FAR* pUnkOuter) +{ + HRESULT res; + OutTraceD("CreateClipper: lpdd=%x flags=%x\n", lpdd, dwflags); + res=(*pCreateClipper)(lpdd, dwflags, lplpDDClipper, pUnkOuter); + if(res) { + OutTraceE("CreateClipper: ERROR res=%x(%s)\n", lpdd, res, ExplainDDError(res)); + return res; + } + HookDDClipper(lplpDDClipper); + return res; +} + +HRESULT WINAPI extReleaseC(LPDIRECTDRAWCLIPPER lpddClip) +{ + ULONG ref; + + ref = (*pReleaseC)(lpddClip); + + OutTraceD("Release(C): PROXED lpddClip=%x ref=%x\n", lpddClip, ref); + return ref; +} + +HRESULT WINAPI extGetSurfaceDesc(GetSurfaceDesc_Type pGetSurfaceDesc, LPDIRECTDRAWSURFACE lpdds, LPDDSURFACEDESC lpddsd) +{ + HRESULT res; + BOOL IsPrim, IsBack, IsFixed; + IsPrim=dxw.IsAPrimarySurface(lpdds); + IsBack=dxw.IsABackBufferSurface(lpdds); + IsFixed=FALSE; + + if (!pGetSurfaceDesc) { + OutTraceE("GetSurfaceDesc: ERROR no hooked function\n"); + return DDERR_INVALIDPARAMS; + } + + res=(*pGetSurfaceDesc)(lpdds, lpddsd); + OutTraceD("GetSurfaceDesc: %slpdds=%x%s res=%x(%s)\n", + res?"ERROR ":"", lpdds, IsPrim?"(PRIM)":(IsBack?"(BACK)":""), res, ExplainDDError(res)); + if(res) { + OutTraceE("GetSurfaceDesc: ERROR err=%d(%s) at %d\n", res, ExplainDDError(res), __LINE__); + return res; + } + + LogSurfaceAttributes(lpddsd, "GetSurfaceDesc", __LINE__); + + if (IsPrim) { + OutTraceD("GetSurfaceDesc: fixing PRIMARY surface\n"); + IsFixed=TRUE; + if (dxw.dwFlags1 & EMULATESURFACE) lpddsd->ddpfPixelFormat = dxw.VirtualPixelFormat; + lpddsd->ddsCaps.dwCaps |= DDSD_Prim.ddsCaps.dwCaps; + lpddsd->ddsCaps.dwCaps |= (DDSCAPS_PRIMARYSURFACE|DDSCAPS_FLIP|DDSCAPS_FRONTBUFFER|DDSCAPS_VIDEOMEMORY|DDSCAPS_VISIBLE); // primary surfaces must be this way + lpddsd->ddsCaps.dwCaps &= ~(DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); // primary surfaces can't be this way + lpddsd->dwBackBufferCount=DDSD_Prim.dwBackBufferCount; + lpddsd->dwHeight=dxw.GetScreenHeight(); + lpddsd->dwWidth=dxw.GetScreenWidth(); + } + + if (IsBack) { + OutTraceD("GetSurfaceDesc: fixing BACKBUFFER surface\n"); + IsFixed=TRUE; + lpddsd->ddsCaps.dwCaps |= (DDSCAPS_BACKBUFFER|DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM); // you never know.... + lpddsd->ddsCaps.dwCaps &= ~(DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN); // primary surfaces can't be this way + } + + if (lpddsd->ddsCaps.dwCaps & DDSCAPS_ZBUFFER) { + OutTraceD("GetSurfaceDesc: fixing ZBUFFER surface\n"); + IsFixed=TRUE; + if (DDZBufferCaps & DDSCAPS_SYSTEMMEMORY){ + lpddsd->ddsCaps.dwCaps |= (DDSCAPS_ZBUFFER|DDSCAPS_SYSTEMMEMORY); + lpddsd->ddsCaps.dwCaps &= ~(DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM); + } + else { + lpddsd->ddsCaps.dwCaps |= (DDSCAPS_ZBUFFER|DDSCAPS_VIDEOMEMORY|DDSCAPS_LOCALVIDMEM); + lpddsd->ddsCaps.dwCaps &= ~DDSCAPS_SYSTEMMEMORY; + } + } + +#ifdef EXPERIMENTAL_1 + if(1) { + IsFixed=TRUE; + if(lpddsd->ddsCaps.dwCaps & DDSCAPS_BACKBUFFER){ + lpddsd->dwSize = sizeof(DDSURFACEDESC2); + lpddsd->ddsCaps.dwCaps |= DDSCAPS_RESERVED2; + ((LPDDSURFACEDESC2)lpddsd)->ddsCaps.dwCaps2 = DDSCAPS2_RESERVED2; + ((LPDDSURFACEDESC2)lpddsd)->ddsCaps.dwCaps3 = 0; + } + else + if(lpddsd->ddsCaps.dwCaps & DDSCAPS_BACKBUFFER){ + } + else { + lpddsd->ddsCaps.dwCaps |= DDSCAPS_RESERVED2; + ((LPDDSURFACEDESC2)lpddsd)->ddsCaps.dwCaps2 |= DDSCAPS2_RESERVED2; + } + } +#endif + + if(IsFixed) LogSurfaceAttributes(lpddsd, "GetSurfaceDesc [FIXED]", __LINE__); + + return DD_OK; +} + +// Beware: despite the surface version, some game (The Sims!!!) intentionally uses a different dwSize, so that +// you shouldn't reset the value + +HRESULT WINAPI extGetSurfaceDesc1(LPDIRECTDRAWSURFACE lpdds, LPDDSURFACEDESC lpddsd) +{ + if (!lpddsd->dwSize) lpddsd->dwSize = sizeof(DDSURFACEDESC); // enforce correct dwSize value + switch(lpddsd->dwSize){ + case sizeof(DDSURFACEDESC): + if (pGetSurfaceDesc1) return extGetSurfaceDesc(pGetSurfaceDesc1, lpdds, lpddsd); + /**/ if (pGetSurfaceDesc4) return extGetSurfaceDesc((GetSurfaceDesc_Type)pGetSurfaceDesc4, (LPDIRECTDRAWSURFACE)lpdds, (LPDDSURFACEDESC)lpddsd); + break; + case sizeof(DDSURFACEDESC2): + if (pGetSurfaceDesc4) return extGetSurfaceDesc((GetSurfaceDesc_Type)pGetSurfaceDesc4, (LPDIRECTDRAWSURFACE)lpdds, (LPDDSURFACEDESC)lpddsd); + break; + default: + OutTraceD("GetSurfaceDesc: ASSERT - bad dwSize=%d lpdds=%x at %d\n", lpddsd->dwSize, lpdds, __LINE__); + return DDERR_INVALIDOBJECT; + break; + } + OutTraceD("GetSurfaceDesc: ASSERT - missing hook lpdds=%x dwSize=%d(%s) at %d\n", + lpdds, lpddsd->dwSize, lpddsd->dwSize==sizeof(DDSURFACEDESC)?"DDSURFACEDESC":"DDSURFACEDESC2", __LINE__); + return DDERR_INVALIDOBJECT; +} + +HRESULT WINAPI extGetSurfaceDesc2(LPDIRECTDRAWSURFACE2 lpdds, LPDDSURFACEDESC2 lpddsd) +{ + if (!lpddsd->dwSize) lpddsd->dwSize = sizeof(DDSURFACEDESC2); // enforce correct dwSize value + switch(lpddsd->dwSize){ + case sizeof(DDSURFACEDESC): + if (pGetSurfaceDesc1) return extGetSurfaceDesc(pGetSurfaceDesc1, (LPDIRECTDRAWSURFACE)lpdds, (LPDDSURFACEDESC)lpddsd); + break; + case sizeof(DDSURFACEDESC2): + if (pGetSurfaceDesc4) return extGetSurfaceDesc((GetSurfaceDesc_Type)pGetSurfaceDesc4, (LPDIRECTDRAWSURFACE)lpdds, (LPDDSURFACEDESC)lpddsd); + break; + default: + OutTraceD("GetSurfaceDesc: ASSERT - bad dwSize=%d lpdds=%x at %d\n", lpddsd->dwSize, lpdds, __LINE__); + return DDERR_INVALIDOBJECT; + } + OutTraceD("GetSurfaceDesc: ASSERT - missing hook lpdds=%x dwSize=%d(%s) at %d\n", + lpdds, lpddsd->dwSize, lpddsd->dwSize==sizeof(DDSURFACEDESC)?"DDSURFACEDESC":"DDSURFACEDESC2", __LINE__); + return DDERR_INVALIDOBJECT; +} + +HRESULT WINAPI extGetSurfaceDesc7(LPDIRECTDRAWSURFACE2 lpdds, LPDDSURFACEDESC2 lpddsd) +{ + if (!lpddsd->dwSize) lpddsd->dwSize = sizeof(DDSURFACEDESC2); // enforce correct dwSize value + switch(lpddsd->dwSize){ + case sizeof(DDSURFACEDESC): + if (pGetSurfaceDesc1) return extGetSurfaceDesc(pGetSurfaceDesc1, (LPDIRECTDRAWSURFACE)lpdds, (LPDDSURFACEDESC)lpddsd); + break; + case sizeof(DDSURFACEDESC2): + if (pGetSurfaceDesc7) return extGetSurfaceDesc((GetSurfaceDesc_Type)pGetSurfaceDesc7, (LPDIRECTDRAWSURFACE)lpdds, (LPDDSURFACEDESC)lpddsd); + break; + default: + OutTraceD("GetSurfaceDesc: ASSERT - bad dwSize=%d lpdds=%x at %d\n", lpddsd->dwSize, lpdds, __LINE__); + return DDERR_INVALIDOBJECT; + } + OutTraceD("GetSurfaceDesc: ASSERT - missing hook lpdds=%x dwSize=%d(%s) at %d\n", + lpdds, lpddsd->dwSize, lpddsd->dwSize==sizeof(DDSURFACEDESC)?"DDSURFACEDESC":"DDSURFACEDESC2", __LINE__); + return DDERR_INVALIDOBJECT; +} + +HRESULT WINAPI extReleaseP(LPDIRECTDRAWPALETTE lpddPalette) +{ + ULONG ref; + + ref = (*pReleaseP)(lpddPalette); + + OutTraceD("Release(P): lpddPalette=%x ref=%x\n", lpddPalette, ref); + if(lpddPalette==lpDDP && ref==0){ + OutTraceD("Release(P): clearing lpDDP=%x->NULL\n", lpDDP); + lpDDP=NULL; + } + return ref; +} + +BOOL WINAPI DDEnumerateCallbackFilter(GUID *lpGuid, LPSTR lpDriverDescription, LPSTR lpDriverName, LPVOID lpContext) +{ + BOOL res; + typedef struct {LPDDENUMCALLBACK lpCallback; LPVOID lpContext;} Context_Type; + Context_Type *p=(Context_Type *)lpContext; + OutTraceD("DDEnumerateCallback: guid=%x DriverDescription=\"%s\" DriverName=\"%s\" Context=%x\n", + lpGuid, lpDriverDescription, lpDriverName, p->lpContext); + if((lpGuid==NULL) || !(dxw.dwFlags2 & HIDEMULTIMONITOR)) res=(*p->lpCallback)(lpGuid, lpDriverDescription, lpDriverName, p->lpContext); + if((lpGuid==NULL) && (dxw.dwFlags2 & HIDEMULTIMONITOR)) res=FALSE; + OutTraceD("DDEnumerateCallback: res=%x(%s)\n", res, res?"continue":"break"); + return res; +} + +BOOL WINAPI DDEnumerateCallbackExFilter(GUID *lpGuid, LPSTR lpDriverDescription, LPSTR lpDriverName, LPVOID lpContext, HMONITOR hm) +{ + BOOL res; + typedef struct {LPDDENUMCALLBACKEX lpCallback; LPVOID lpContext;} Context_Type; + Context_Type *p=(Context_Type *)lpContext; + OutTraceD("DDEnumerateCallbackEx: guid=%x DriverDescription=\"%s\" DriverName=\"%s\" Context=%x hm=%x\n", + lpGuid, lpDriverDescription, lpDriverName, lpContext, hm); + res=TRUE; + if((lpGuid==NULL) || !(dxw.dwFlags2 & HIDEMULTIMONITOR)) res=(*p->lpCallback)(lpGuid, lpDriverDescription, lpDriverName, p->lpContext, hm); + if((lpGuid==NULL) && (dxw.dwFlags2 & HIDEMULTIMONITOR)) res=FALSE; + OutTraceD("DDEnumerateCallbackEx: res=%x(%s)\n", res, res?"continue":"break"); + return res; +} + +HRESULT WINAPI extDirectDrawEnumerate(LPDDENUMCALLBACK lpCallback, LPVOID lpContext) +{ + HRESULT ret; + OutTraceD("DirectDrawEnumerate: lpCallback=%x lpContext=%x\n", lpCallback, lpContext); + if((dxw.dwFlags2 & HIDEMULTIMONITOR) || (dxw.dwTFlags & OUTDEBUG)){ + struct {LPDDENUMCALLBACK lpCallback; LPVOID lpContext;} myContext; + myContext.lpCallback=lpCallback; + myContext.lpContext=lpContext; + ret=(*pDirectDrawEnumerate)(DDEnumerateCallbackFilter, (LPVOID)&myContext); + } + else + ret=(*pDirectDrawEnumerate)(lpCallback, lpContext); + if(ret) OutTraceE("DirectDrawEnumerate: ERROR res=%x(%s)\n", ret, ExplainDDError(ret)); + return ret; +} + +HRESULT WINAPI extDirectDrawEnumerateEx(LPDDENUMCALLBACKEX lpCallback, LPVOID lpContext, DWORD dwFlags) +{ + HRESULT ret; + OutTraceP("DirectDrawEnumerateEx: lpCallback=%x lpContext=%x Flags=%x(%s)\n", + lpCallback, lpContext, dxw.dwFlags1, ExplainDDEnumerateFlags(dwFlags)); + if((dxw.dwFlags2 & HIDEMULTIMONITOR) || (dxw.dwTFlags & OUTDEBUG)){ + struct {LPDDENUMCALLBACKEX lpCallback; LPVOID lpContext;} myContext; + myContext.lpCallback=lpCallback; + myContext.lpContext=lpContext; + ret=(*pDirectDrawEnumerateEx)(DDEnumerateCallbackExFilter, (LPVOID)&myContext, dwFlags); + } + else + ret=(*pDirectDrawEnumerateEx)(lpCallback, lpContext, dwFlags); + if(ret) OutTraceD("DirectDrawEnumerateEx: ERROR res=%x(%s)\n", ret, ExplainDDError(ret)); + return ret; +} + +HRESULT WINAPI extDDGetGammaRamp(LPDIRECTDRAWSURFACE lpdds, DWORD dwFlags, LPDDGAMMARAMP lpgr) +{ + HRESULT ret; + OutTraceD("GetGammaRamp: dds=%x dwFlags=%x\n", lpdds, dwFlags); + ret=(*pDDGetGammaRamp)(lpdds, dwFlags, lpgr); + if(ret) OutTraceE("GetGammaRamp: ERROR res=%x(%s)\n", ret, ExplainDDError(ret)); + else OutTraceD("GetGammaRamp: RGB=(%x,%x,%x)\n", lpgr->red, lpgr->green, lpgr->blue); + return ret; +} + + HRESULT WINAPI extDDSetGammaRamp(LPDIRECTDRAWSURFACE lpdds, DWORD dwFlags, LPDDGAMMARAMP lpgr) +{ + HRESULT ret; + OutTraceD("GetGammaRamp: dds=%x dwFlags=%x RGB=(%x,%x,%x)\n", lpdds, dwFlags, lpgr->red, lpgr->green, lpgr->blue); + if (dxw.dwFlags2 & DISABLEGAMMARAMP) return DD_OK; + ret=(*pDDSetGammaRamp)(lpdds, dwFlags, lpgr); + if(ret) OutTraceE("GetGammaRamp: ERROR res=%x(%s)\n", ret, ExplainDDError(ret)); + return ret; +} diff --git a/dll/ddraw.cpp b/dll/ddraw.cpp index c370583..7c279c1 100644 --- a/dll/ddraw.cpp +++ b/dll/ddraw.cpp @@ -445,93 +445,51 @@ void mySetPalette(int dwstart, int dwcount, LPPALETTEENTRY lpentries) int i; extern DXWNDSTATUS *pStatus; - OutTraceD("mySetPalette DEBUG: BPP=%d GBitMask=%x count=%d\n", - dxw.ActualPixelFormat.dwRGBBitCount, dxw.ActualPixelFormat.dwGBitMask, dwcount); - - if(IsDebug){ - int idx; - OutTraceD("PaletteEntries: start=%d count=%d ", dwstart, dwcount); - for(idx=0; idxPalette[dwstart+idx]= lpentries[idx]; - if (dxw.dwFlags3 & RGB2YUV){ - int idx; - for(idx=0; idx255) Y=255; - if (U<0) U=0; if(U>255) U=255; - if (V<0) V=0; if(V>255) V=255; - lpentries[dwstart+idx].peRed = (BYTE)Y; - lpentries[dwstart+idx].peGreen = (BYTE)U; - lpentries[dwstart+idx].peBlue = (BYTE)V; - } - } +#if 0 + typedef struct { + WORD palVersion; + WORD palNumEntries; + PALETTEENTRY palPalEntry[256]; + } LOGPALETTE256; + LOGPALETTE256 GDIPalette; + HPALETTE pal; + GDIPalette.palNumEntries=256; + GDIPalette.palVersion=0; + memcpy(GDIPalette.palPalEntry, lpentries, 256*sizeof(PALETTEENTRY)); + pal=CreatePalette((LOGPALETTE *)&GDIPalette); + SelectPalette(GetDC(dxw.GethWnd()), pal, 0); + RealizePalette(GetDC(dxw.GethWnd())); +#endif - if (dxw.dwFlags3 & YUV2RGB){ - int idx; - for(idx=0; idx255) Y=255; - if (U<0) U=0; if(U>255) U=255; - if (V<0) V=0; if(V>255) V=255; - lpentries[dwstart+idx].peRed = (BYTE)Y; - lpentries[dwstart+idx].peGreen = (BYTE)U; - lpentries[dwstart+idx].peBlue = (BYTE)V; - } - } - - // actually, it should be like this: R/G/B = (red * 0.30) + (green * 0.59) + (blue * 0.11) - // (http://www.codeproject.com/Articles/66253/Converting-Colors-to-Gray-Shades) - - if (dxw.dwFlags3 & BLACKWHITE){ - for(i = 0; i < dwcount; i ++){ + for(i = 0; i < dwcount; i ++){ + PALETTEENTRY PalColor; + PalColor = lpentries[i]; + if (dxw.dwFlags3 & BLACKWHITE){ + // (http://www.codeproject.com/Articles/66253/Converting-Colors-to-Gray-Shades): + // gray = (red * 0.30) + (green * 0.59) + (blue * 0.11) DWORD grayscale; //grayscale = ((DWORD)lpentries[i].peRed + (DWORD)lpentries[i].peGreen + (DWORD)lpentries[i].peBlue) / 3; - grayscale = (((DWORD)lpentries[i].peRed * 30) + ((DWORD)lpentries[i].peGreen * 59) + ((DWORD)lpentries[i].peBlue) * 11) / 100; - lpentries[i].peRed = lpentries[i].peGreen = lpentries[i].peBlue = (BYTE)grayscale; + grayscale = (((DWORD)PalColor.peRed * 30) + ((DWORD)PalColor.peGreen * 59) + ((DWORD)PalColor.peBlue) * 11) / 100; + PalColor.peRed = PalColor.peGreen = PalColor.peBlue = (BYTE)grayscale; } - } - - switch (dxw.ActualPixelFormat.dwRGBBitCount){ - case 32: - for(i = 0; i < dwcount; i ++){ + switch (dxw.ActualPixelFormat.dwRGBBitCount){ + case 32: PaletteEntries[i + dwstart] = - (((DWORD)lpentries[i].peRed) << 16) + (((DWORD)lpentries[i].peGreen) << 8) + ((DWORD)lpentries[i].peBlue); - } - break; - case 16: - for(i = 0; i < dwcount; i ++){ + (((DWORD)PalColor.peRed) << 16) + (((DWORD)PalColor.peGreen) << 8) + ((DWORD)PalColor.peBlue); + break; + case 16: PaletteEntries[i + dwstart] = (dxw.ActualPixelFormat.dwGBitMask == 0x03E0) ? - (((DWORD)lpentries[i].peRed & 0xF8) << 8) + (((DWORD)lpentries[i].peGreen & 0xFC) << 3) + (((DWORD)lpentries[i].peBlue &0xF8) >> 3) + (((DWORD)PalColor.peRed & 0xF8) << 8) + (((DWORD)PalColor.peGreen & 0xFC) << 3) + (((DWORD)PalColor.peBlue &0xF8) >> 3) : - (((DWORD)lpentries[i].peRed & 0xF8) << 8) + (((DWORD)lpentries[i].peGreen & 0xF8) << 3) + (((DWORD)lpentries[i].peBlue &0xF8) >> 3); + (((DWORD)PalColor.peRed & 0xF8) << 8) + (((DWORD)PalColor.peGreen & 0xF8) << 3) + (((DWORD)PalColor.peBlue &0xF8) >> 3); + break; + default: + OutTraceD("ASSERT: unsupported Color BPP=%d\n", dxw.ActualPixelFormat.dwRGBBitCount); + break; } - break; - default: - OutTraceD("ASSERT: unsupported Color BPP=%d\n", dxw.ActualPixelFormat.dwRGBBitCount); - break; } isPaletteUpdated = TRUE; @@ -567,7 +525,7 @@ void InitDSScreenParameters(LPDIRECTDRAWSURFACE lpdds) ddsd.ddpfPixelFormat = p; OutTraceD("InitDSScreenParameters: Actual %s\n", DumpPixelFormat(&ddsd)); - dxw.ActualPixelFormat=p; + dxw.ActualPixelFormat = p; SetBltTransformations(); return; } @@ -2586,7 +2544,7 @@ static HRESULT BuildGenericDir(LPDIRECTDRAW lpdd, CreateSurface_Type pCreateSurf HookDDSurfaceGeneric(lplpdds, dxversion); OutTraceD("CreateSurface: created lpdds=%x type=Generic ret=%x\n", *lplpdds, res); - if(IsDebug) DescribeSurface(lpDDSBack, dxversion, "Generic", __LINE__); + if(IsDebug) DescribeSurface(*lplpdds, dxversion, "Generic", __LINE__); //v2.02.44 bug fix return DD_OK; } @@ -3053,6 +3011,7 @@ HRESULT WINAPI sBlt(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect, // blit only when source and dest surface are different. Should make ScreenRefresh faster. if (lpdds != lpddssrc) { if (dxw.dwFlags2 & SHOWFPSOVERLAY) dxw.ShowFPS(lpddssrc); + if (dxw.dwFlags4 & SHOWTIMESTRETCH) dxw.ShowTimeStretching(lpddssrc); if (IsDebug) BlitTrace("PRIM-NOEMU", lpsrcrect, &destrect, __LINE__); res= (*pBlt)(lpdds, &destrect, lpddssrc, lpsrcrect, dwflags, lpddbltfx); } @@ -3113,6 +3072,7 @@ HRESULT WINAPI sBlt(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect, */ if(res==DDERR_UNSUPPORTED){ if (dxw.dwFlags2 & SHOWFPSOVERLAY) dxw.ShowFPS(lpddssrc); + if (dxw.dwFlags4 & SHOWTIMESTRETCH) dxw.ShowTimeStretching(lpddssrc); if (IsDebug) BlitTrace("UNSUPP", &emurect, &destrect, __LINE__); res=(*pBlt)(lpDDSEmu_Prim, &destrect, lpddssrc, lpsrcrect, dwflags, lpddbltfx); if (res) BlitError(res, lpsrcrect, &destrect, __LINE__); @@ -3151,6 +3111,7 @@ HRESULT WINAPI sBlt(char *api, LPDIRECTDRAWSURFACE lpdds, LPRECT lpdestrect, } if (dxw.dwFlags2 & SHOWFPSOVERLAY) dxw.ShowFPS(lpDDSSource); + if (dxw.dwFlags4 & SHOWTIMESTRETCH) dxw.ShowTimeStretching(lpDDSSource); if (IsDebug) BlitTrace("BACK2PRIM", &emurect, &destrect, __LINE__); res=(*pBlt)(lpDDSEmu_Prim, &destrect, lpDDSSource, &emurect, DDBLT_WAIT, 0); @@ -3338,15 +3299,7 @@ HRESULT WINAPI extCreatePalette(LPDIRECTDRAW lpdd, DWORD dwflags, LPPALETTEENTRY HRESULT res; OutTraceD("CreatePalette: dwFlags=%x(%s)\n", dwflags, ExplainCreatePaletteFlags(dwflags)); - if(IsDebug && (dwflags & DDPCAPS_8BIT)){ - int idx; - OutTrace("CreatePalette: "); - for(idx=0; idx<256; idx++) OutTrace("(%02x.%02x.%02x)", - lpddpa[idx].peRed, - lpddpa[idx].peGreen, - lpddpa[idx].peBlue ); - OutTrace("\n"); - } + if(IsDebug && (dwflags & DDPCAPS_8BIT)) dxw.DumpPalette(256, lpddpa); if (dwflags & ~(DDPCAPS_PRIMARYSURFACE|DDPCAPS_8BIT|DDPCAPS_ALLOW256|DDPCAPS_INITIALIZE_LEGACY)) STOPPER("Palette flags"); @@ -3396,7 +3349,7 @@ HRESULT WINAPI extSetPalette(LPDIRECTDRAWSURFACE lpdds, LPDIRECTDRAWPALETTE lpdd lpentries = (LPPALETTEENTRY)PaletteEntries; res2=lpddp->GetEntries(0, 0, 256, lpentries); if(res2) OutTraceE("SetPalette: GetEntries ERROR res=%x(%s)\n", res2, ExplainDDError(res2)); - mySetPalette(0, 256, lpentries); + //mySetPalette(0, 256, lpentries); } res=0; } @@ -3410,6 +3363,7 @@ HRESULT WINAPI extSetEntries(LPDIRECTDRAWPALETTE lpddp, DWORD dwflags, DWORD dws OutTraceD("SetEntries: lpddp=%x dwFlags=%x, start=%d, count=%d entries=%x\n", //GHO: added trace infos lpddp, dwflags, dwstart, dwcount, lpentries); + if(IsDebug) dxw.DumpPalette(dwcount, &lpentries[dwstart]); res = (*pSetEntries)(lpddp, dwflags, dwstart, dwcount, lpentries); if(res) OutTraceE("SetEntries: ERROR res=%x(%s)\n", res, ExplainDDError(res)); @@ -3523,46 +3477,46 @@ HRESULT WINAPI extLockDir(LPDIRECTDRAWSURFACE lpdds, LPRECT lprect, LPDIRECTDRAW if(res2) OutTraceE("Lock: GetGDISurface ERROR res=%x(%s) at %d\n", res2, ExplainDDError(res2), __LINE__); else - (*pReleaseS)(lpDDSPrim); - if(lpdds==lpDDSPrim){ - if(dxw.dwFlags1 & LOCKEDSURFACE){ - DDSURFACEDESC2 ddsd; - DDBLTFX fx; - memset(&ddsd, 0, sizeof(ddsd)); - //ddsd.dwSize=SurfaceDescrSize(lpdds); - ddsd.dwSize=sizeof(DDSURFACEDESC); - ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS; - ddsd.dwWidth = dxw.GetScreenWidth(); - ddsd.dwHeight = dxw.GetScreenHeight(); - ddsd.ddsCaps.dwCaps = 0; - //if (SurfaceDescrSize(lpdds)==sizeof(DDSURFACEDESC2)) ddsd.ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN; - DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[Dir FixBuf]" , __LINE__); - res=(*pCreateSurface1)(lpPrimaryDD, (DDSURFACEDESC *)&ddsd, (LPDIRECTDRAWSURFACE *)&lpDDSBuffer, 0); - if(res){ - OutTraceE("CreateSurface: ERROR on DDSBuffer res=%x(%s) at %d\n",res, ExplainDDError(res), __LINE__); - return res; + (*pReleaseS)(lpDDSPrim); + if(lpdds==lpDDSPrim){ + if(dxw.dwFlags1 & LOCKEDSURFACE){ + DDSURFACEDESC2 ddsd; + DDBLTFX fx; + memset(&ddsd, 0, sizeof(ddsd)); + //ddsd.dwSize=SurfaceDescrSize(lpdds); + ddsd.dwSize=sizeof(DDSURFACEDESC); + ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS; + ddsd.dwWidth = dxw.GetScreenWidth(); + ddsd.dwHeight = dxw.GetScreenHeight(); + ddsd.ddsCaps.dwCaps = 0; + //if (SurfaceDescrSize(lpdds)==sizeof(DDSURFACEDESC2)) ddsd.ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN; + DumpSurfaceAttributes((LPDDSURFACEDESC)&ddsd, "[Dir FixBuf]" , __LINE__); + res=(*pCreateSurface1)(lpPrimaryDD, (DDSURFACEDESC *)&ddsd, (LPDIRECTDRAWSURFACE *)&lpDDSBuffer, 0); + if(res){ + OutTraceE("CreateSurface: ERROR on DDSBuffer res=%x(%s) at %d\n",res, ExplainDDError(res), __LINE__); + return res; + } + memset(&fx, 0, sizeof(fx)); + fx.dwSize=sizeof(DDBLTFX); + fx.dwFillColor=0; + res=(*pBlt)((LPDIRECTDRAWSURFACE)lpDDSBuffer, NULL, NULL, NULL, DDBLT_WAIT|DDBLT_COLORFILL, &fx); + if(res){ + OutTraceE("Blt: ERROR on DDSBuffer res=%x(%s) at %d\n",res, ExplainDDError(res), __LINE__); + } + lpdds=(LPDIRECTDRAWSURFACE)lpDDSBuffer; } - memset(&fx, 0, sizeof(fx)); - fx.dwSize=sizeof(DDBLTFX); - fx.dwFillColor=0; - res=(*pBlt)((LPDIRECTDRAWSURFACE)lpDDSBuffer, NULL, NULL, NULL, DDBLT_WAIT|DDBLT_COLORFILL, &fx); - if(res){ - OutTraceE("Blt: ERROR on DDSBuffer res=%x(%s) at %d\n",res, ExplainDDError(res), __LINE__); + else{ + // since it can't scale, at least the updated rect is centered into the window. + (*pGetClientRect)(dxw.GethWnd(), &client); + (*pClientToScreen)(dxw.GethWnd(), &upleft); + if (!lprect) lprect=&client; + OffsetRect(lprect, + upleft.x+(client.right-dxw.GetScreenWidth())/2, + upleft.y+(client.bottom-dxw.GetScreenHeight())/2); + OutTraceD("Lock: NULL rect remapped to (%d,%d)-(%d,%d)\n", + lprect->left, lprect->top, lprect->right, lprect->bottom); } - lpdds=(LPDIRECTDRAWSURFACE)lpDDSBuffer; } - else{ - // since it can't scale, at least the updated rect is centered into the window. - (*pGetClientRect)(dxw.GethWnd(), &client); - (*pClientToScreen)(dxw.GethWnd(), &upleft); - if (!lprect) lprect=&client; - OffsetRect(lprect, - upleft.x+(client.right-dxw.GetScreenWidth())/2, - upleft.y+(client.bottom-dxw.GetScreenHeight())/2); - OutTraceD("Lock: NULL rect remapped to (%d,%d)-(%d,%d)\n", - lprect->left, lprect->top, lprect->right, lprect->bottom); - } - } } res=(*pLock)(lpdds, lprect, lpdds2, flags, hEvent); diff --git a/dll/dxhook.cpp b/dll/dxhook.cpp index ce4737e..9780100 100644 --- a/dll/dxhook.cpp +++ b/dll/dxhook.cpp @@ -65,7 +65,7 @@ static char *Flag3Names[32]={ }; static char *Flag4Names[32]={ - "NOALPHACHANNEL", "SUPPRESSCHILD", "", "", + "NOALPHACHANNEL", "SUPPRESSCHILD", "FIXREFCOUNTER", "SHOWTIMESTRETCH", "", "", "", "", "", "", "", "", "", "", "", "", diff --git a/dll/dxwcore.cpp b/dll/dxwcore.cpp index 416be65..c699789 100644 --- a/dll/dxwcore.cpp +++ b/dll/dxwcore.cpp @@ -678,6 +678,14 @@ POINT dxwCore::SubCoordinates(POINT p1, POINT p2) return ps; } +void dxwCore::DumpPalette(DWORD dwcount, LPPALETTEENTRY lpentries) +{ + for(DWORD idx=0; idxShowFPS(GetDC(hWnd)); } +void dxwCore::ShowFPS(LPDIRECTDRAWSURFACE lpdds) +{ + HDC hdc; // the working dc + if (FAILED(lpdds->GetDC(&hdc))) return; + this->ShowFPS(hdc); + lpdds->ReleaseDC(hdc); +} + void dxwCore::ShowFPS(HDC xdc) { char sBuf[81]; @@ -942,34 +959,56 @@ void dxwCore::ShowFPS(HDC xdc) TextOut(xdc, x, y, sBuf, strlen(sBuf)); } -void dxwCore::ShowFPS(LPDIRECTDRAWSURFACE lpdds) +void dxwCore::ShowTimeStretching() +{ + HDC hdc; + hdc=GetDC(hWnd); + if(hdc)this->ShowTimeStretching(hdc); +} + +void dxwCore::ShowTimeStretching(LPDIRECTDRAWSURFACE lpdds) +{ + HDC hdc; // the working dc + __try { + if (FAILED(lpdds->GetDC(&hdc))) return; + } + __except(EXCEPTION_EXECUTE_HANDLER){ + return; + } + if(hdc)this->ShowTimeStretching(hdc); + lpdds->ReleaseDC(hdc); +} + +void dxwCore::ShowTimeStretching(HDC xdc) { - HDC xdc; // the working dc char sBuf[81]; static DWORD dwTimer = 0; static int corner = 0; static int x, y; static DWORD color; + static int LastTimeShift = 1000; // any initial number different from -8 .. +8 if((*pGetTickCount)()-dwTimer > 4000){ + RECT rect; + if(LastTimeShift==TimeShift) return; // after a while, stop the show dwTimer = (*pGetTickCount)(); + LastTimeShift=TimeShift; corner = dwTimer % 4; - color=0xFF0000; // blue + color=0x0000FF; // red + (*pGetClientRect)(hWnd, &rect); switch (corner) { case 0: x=10; y=10; break; - case 1: x=dwScreenWidth-60; y=10; break; - case 2: x=dwScreenWidth-60; y=dwScreenHeight-20; break; - case 3: x=10; y=dwScreenHeight-20; break; + case 1: x=rect.right-60; y=10; break; + case 2: x=rect.right-60; y=rect.bottom-20; break; + case 3: x=10; y=rect.bottom-20; break; } - } + } - if (FAILED(lpdds->GetDC(&xdc))) return; SetTextColor(xdc,color); //SetBkMode(xdc, TRANSPARENT); SetBkMode(xdc, OPAQUE); - sprintf_s(sBuf, 80, "FPS: %d", GetHookInfo()->FPSCount); + sprintf_s(sBuf, 80, "Time %s", dxw.GetTSCaption()); TextOut(xdc, x, y, sBuf, strlen(sBuf)); - lpdds->ReleaseDC(xdc); } char *dxwCore::GetTSCaption(int shift) @@ -983,6 +1022,7 @@ char *dxwCore::GetTSCaption(int shift) if (shift<(-8) || shift>(+8)) return "???"; return sTSCaption[shift+8]; } + char *dxwCore::GetTSCaption(void) { return GetTSCaption(TimeShift); diff --git a/dll/dxwcore.hpp b/dll/dxwcore.hpp index eee6084..8e4da08 100644 --- a/dll/dxwcore.hpp +++ b/dll/dxwcore.hpp @@ -66,8 +66,11 @@ public: // methods DWORD StretchTime(DWORD); DWORD StretchCounter(DWORD); void ShowFPS(LPDIRECTDRAWSURFACE); + void ShowTimeStretching(LPDIRECTDRAWSURFACE); void ShowFPS(void); + void ShowTimeStretching(void); void ShowFPS(HDC); + void ShowTimeStretching(HDC); char *GetTSCaption(int); char *GetTSCaption(void); void DoSlow(int); @@ -81,6 +84,7 @@ public: // methods BOOL IsVirtual(HDC); void ResetEmulatedDC(); int VirtualOffsetX, VirtualOffsetY; + void DumpPalette(DWORD, LPPALETTEENTRY); public: // simple data variables DDPIXELFORMAT ActualPixelFormat; diff --git a/dll/dxwnd.cpp b/dll/dxwnd.cpp index 7569c1c..6253cd2 100644 --- a/dll/dxwnd.cpp +++ b/dll/dxwnd.cpp @@ -24,7 +24,7 @@ along with this program. If not, see . #include "dxwnd.h" #include "dxwcore.hpp" -#define VERSION "2.02.43" +#define VERSION "2.02.44" #define DDTHREADLOCK 1 diff --git a/dll/dxwnd.vs2008.suo b/dll/dxwnd.vs2008.suo index 83be3f3..aa89a03 100644 Binary files a/dll/dxwnd.vs2008.suo and b/dll/dxwnd.vs2008.suo differ diff --git a/dll/gdi32.cpp b/dll/gdi32.cpp index 310c5f9..97b7e26 100644 --- a/dll/gdi32.cpp +++ b/dll/gdi32.cpp @@ -14,7 +14,7 @@ static void Stopper(char *s, int line) MessageBox(0, sMsg, "break", MB_OK | MB_ICONEXCLAMATION); } -#define STOPPER_TEST // comment out to eliminate +//#define STOPPER_TEST // comment out to eliminate #ifdef STOPPER_TEST #define STOPPER(s) Stopper(s, __LINE__) #else @@ -512,7 +512,7 @@ HPALETTE WINAPI extSelectPalette(HDC hdc, HPALETTE hpal, BOOL bForceBackground) BOOL WINAPI extAnimatePalette(HPALETTE hpal, UINT iStartIndex, UINT cEntries, const PALETTEENTRY *ppe) { // Invoked by "Pharaoh's Ascent 1.4" - //STOPPER("AnimatePalette"); + STOPPER("AnimatePalette"); return TRUE; } @@ -525,14 +525,9 @@ UINT WINAPI extRealizePalette(HDC hdc) if((OBJ_DC == GetObjectType(hdc)) && (dxw.dwFlags1 & EMULATESURFACE)){ PALETTEENTRY PalEntries[256]; UINT nEntries; - nEntries=GetPaletteEntries(hDesktopPalette, 0, 255, PalEntries); + nEntries=GetPaletteEntries(hDesktopPalette, 0, 256, PalEntries); mySetPalette(0, nEntries, PalEntries); - if(IsDebug){ - UINT idx; - OutTraceD("PaletteEntries[%x]= ", nEntries); - for(idx=0; idx<256; idx++) OutTraceD("(%02x.%02x.%02x)", PalEntries[idx].peRed, PalEntries[idx].peGreen, PalEntries[idx].peBlue); - OutTraceD("\n"); - } + if(IsDebug) dxw.DumpPalette(nEntries, PalEntries); ret=DD_OK; } else @@ -546,6 +541,73 @@ UINT WINAPI extRealizePalette(HDC hdc) // returns 0. "Mission Force Cyberstorm" is one of these. Returning the same // value as nEntries, even though lppe is untouched, fixes the problem. +static PALETTEENTRY dp[256]={ // default palette, captured on my PC with video mode set to 8BPP + {0x00,0x00,0x00,0x00},{0x80,0x00,0x00,0x00},{0x00,0x80,0x00,0x00},{0x80,0x80,0x00,0x00}, + {0x00,0x00,0x80,0x00},{0x80,0x00,0x80,0x00},{0x00,0x80,0x80,0x00},{0xc0,0xc0,0xc0,0x00}, + {0xa0,0xa0,0xa0,0x00},{0xf0,0xf0,0xf0,0x00},{0xc0,0xdc,0xc0,0x00},{0xa6,0xca,0xf0,0x00}, + {0x04,0x04,0x04,0x00},{0x08,0x08,0x08,0x00},{0x0c,0x0c,0x0c,0x00},{0x11,0x11,0x11,0x00}, + {0x16,0x16,0x16,0x00},{0x1c,0x1c,0x1c,0x00},{0x22,0x22,0x22,0x00},{0x29,0x29,0x29,0x00}, + {0x55,0x55,0x55,0x00},{0x4d,0x4d,0x4d,0x00},{0x42,0x42,0x42,0x00},{0x39,0x39,0x39,0x00}, + {0xff,0x7c,0x80,0x00},{0xff,0x50,0x50,0x00},{0xd6,0x00,0x93,0x00},{0xcc,0xec,0xff,0x00}, + {0xef,0xd6,0xc6,0x00},{0xe7,0xe7,0xd6,0x00},{0xad,0xa9,0x90,0x00},{0x33,0x00,0x00,0x00}, + {0x66,0x00,0x00,0x00},{0x99,0x00,0x00,0x00},{0xcc,0x00,0x00,0x00},{0x00,0x33,0x00,0x00}, + {0x33,0x33,0x00,0x00},{0x66,0x33,0x00,0x00},{0x99,0x33,0x00,0x00},{0xcc,0x33,0x00,0x00}, + {0xff,0x33,0x00,0x00},{0x00,0x66,0x00,0x00},{0x33,0x66,0x00,0x00},{0x66,0x66,0x00,0x00}, + {0x99,0x66,0x00,0x00},{0xcc,0x66,0x00,0x00},{0xff,0x66,0x00,0x00},{0x00,0x99,0x00,0x00}, + {0x33,0x99,0x00,0x00},{0x66,0x99,0x00,0x00},{0x99,0x99,0x00,0x00},{0xcc,0x99,0x00,0x00}, + {0xff,0x99,0x00,0x00},{0x00,0xcc,0x00,0x00},{0x33,0xcc,0x00,0x00},{0x66,0xcc,0x00,0x00}, + {0x99,0xcc,0x00,0x00},{0xcc,0xcc,0x00,0x00},{0xff,0xcc,0x00,0x00},{0x66,0xff,0x00,0x00}, + {0x99,0xff,0x00,0x00},{0xcc,0xff,0x00,0x00},{0x00,0x00,0x33,0x00},{0x33,0x00,0x33,0x00}, + {0x66,0x00,0x33,0x00},{0x99,0x00,0x33,0x00},{0xcc,0x00,0x33,0x00},{0xff,0x00,0x33,0x00}, + {0x00,0x33,0x33,0x00},{0x33,0x33,0x33,0x00},{0x66,0x33,0x33,0x00},{0x99,0x33,0x33,0x00}, + {0xcc,0x33,0x33,0x00},{0xff,0x33,0x33,0x00},{0x00,0x66,0x33,0x00},{0x33,0x66,0x33,0x00}, + {0x66,0x66,0x33,0x00},{0x99,0x66,0x33,0x00},{0xcc,0x66,0x33,0x00},{0xff,0x66,0x33,0x00}, + {0x00,0x99,0x33,0x00},{0x33,0x99,0x33,0x00},{0x66,0x99,0x33,0x00},{0x99,0x99,0x33,0x00}, + {0xcc,0x99,0x33,0x00},{0xff,0x99,0x33,0x00},{0x00,0xcc,0x33,0x00},{0x33,0xcc,0x33,0x00}, + {0x66,0xcc,0x33,0x00},{0x99,0xcc,0x33,0x00},{0xcc,0xcc,0x33,0x00},{0xff,0xcc,0x33,0x00}, + {0x33,0xff,0x33,0x00},{0x66,0xff,0x33,0x00},{0x99,0xff,0x33,0x00},{0xcc,0xff,0x33,0x00}, + {0xff,0xff,0x33,0x00},{0x00,0x00,0x66,0x00},{0x33,0x00,0x66,0x00},{0x66,0x00,0x66,0x00}, + {0x99,0x00,0x66,0x00},{0xcc,0x00,0x66,0x00},{0xff,0x00,0x66,0x00},{0x00,0x33,0x66,0x00}, + {0x33,0x33,0x66,0x00},{0x66,0x33,0x66,0x00},{0x99,0x33,0x66,0x00},{0xcc,0x33,0x66,0x00}, + {0xff,0x33,0x66,0x00},{0x00,0x66,0x66,0x00},{0x33,0x66,0x66,0x00},{0x66,0x66,0x66,0x00}, + {0x99,0x66,0x66,0x00},{0xcc,0x66,0x66,0x00},{0x00,0x99,0x66,0x00},{0x33,0x99,0x66,0x00}, + {0x66,0x99,0x66,0x00},{0x99,0x99,0x66,0x00},{0xcc,0x99,0x66,0x00},{0xff,0x99,0x66,0x00}, + {0x00,0xcc,0x66,0x00},{0x33,0xcc,0x66,0x00},{0x99,0xcc,0x66,0x00},{0xcc,0xcc,0x66,0x00}, + {0xff,0xcc,0x66,0x00},{0x00,0xff,0x66,0x00},{0x33,0xff,0x66,0x00},{0x99,0xff,0x66,0x00}, + {0xcc,0xff,0x66,0x00},{0xff,0x00,0xcc,0x00},{0xcc,0x00,0xff,0x00},{0x00,0x99,0x99,0x00}, + {0x99,0x33,0x99,0x00},{0x99,0x00,0x99,0x00},{0xcc,0x00,0x99,0x00},{0x00,0x00,0x99,0x00}, + {0x33,0x33,0x99,0x00},{0x66,0x00,0x99,0x00},{0xcc,0x33,0x99,0x00},{0xff,0x00,0x99,0x00}, + {0x00,0x66,0x99,0x00},{0x33,0x66,0x99,0x00},{0x66,0x33,0x99,0x00},{0x99,0x66,0x99,0x00}, + {0xcc,0x66,0x99,0x00},{0xff,0x33,0x99,0x00},{0x33,0x99,0x99,0x00},{0x66,0x99,0x99,0x00}, + {0x99,0x99,0x99,0x00},{0xcc,0x99,0x99,0x00},{0xff,0x99,0x99,0x00},{0x00,0xcc,0x99,0x00}, + {0x33,0xcc,0x99,0x00},{0x66,0xcc,0x66,0x00},{0x99,0xcc,0x99,0x00},{0xcc,0xcc,0x99,0x00}, + {0xff,0xcc,0x99,0x00},{0x00,0xff,0x99,0x00},{0x33,0xff,0x99,0x00},{0x66,0xcc,0x99,0x00}, + {0x99,0xff,0x99,0x00},{0xcc,0xff,0x99,0x00},{0xff,0xff,0x99,0x00},{0x00,0x00,0xcc,0x00}, + {0x33,0x00,0x99,0x00},{0x66,0x00,0xcc,0x00},{0x99,0x00,0xcc,0x00},{0xcc,0x00,0xcc,0x00}, + {0x00,0x33,0x99,0x00},{0x33,0x33,0xcc,0x00},{0x66,0x33,0xcc,0x00},{0x99,0x33,0xcc,0x00}, + {0xcc,0x33,0xcc,0x00},{0xff,0x33,0xcc,0x00},{0x00,0x66,0xcc,0x00},{0x33,0x66,0xcc,0x00}, + {0x66,0x66,0x99,0x00},{0x99,0x66,0xcc,0x00},{0xcc,0x66,0xcc,0x00},{0xff,0x66,0x99,0x00}, + {0x00,0x99,0xcc,0x00},{0x33,0x99,0xcc,0x00},{0x66,0x99,0xcc,0x00},{0x99,0x99,0xcc,0x00}, + {0xcc,0x99,0xcc,0x00},{0xff,0x99,0xcc,0x00},{0x00,0xcc,0xcc,0x00},{0x33,0xcc,0xcc,0x00}, + {0x66,0xcc,0xcc,0x00},{0x99,0xcc,0xcc,0x00},{0xcc,0xcc,0xcc,0x00},{0xff,0xcc,0xcc,0x00}, + {0x00,0xff,0xcc,0x00},{0x33,0xff,0xcc,0x00},{0x66,0xff,0x99,0x00},{0x99,0xff,0xcc,0x00}, + {0xcc,0xff,0xcc,0x00},{0xff,0xff,0xcc,0x00},{0x33,0x00,0xcc,0x00},{0x66,0x00,0xff,0x00}, + {0x99,0x00,0xff,0x00},{0x00,0x33,0xcc,0x00},{0x33,0x33,0xff,0x00},{0x66,0x33,0xff,0x00}, + {0x99,0x33,0xff,0x00},{0xcc,0x33,0xff,0x00},{0xff,0x33,0xff,0x00},{0x00,0x66,0xff,0x00}, + {0x33,0x66,0xff,0x00},{0x66,0x66,0xcc,0x00},{0x99,0x66,0xff,0x00},{0xcc,0x66,0xff,0x00}, + {0xff,0x66,0xcc,0x00},{0x00,0x99,0xff,0x00},{0x33,0x99,0xff,0x00},{0x66,0x99,0xff,0x00}, + {0x99,0x99,0xff,0x00},{0xcc,0x99,0xff,0x00},{0xff,0x99,0xff,0x00},{0x00,0xcc,0xff,0x00}, + {0x33,0xcc,0xff,0x00},{0x66,0xcc,0xff,0x00},{0x99,0xcc,0xff,0x00},{0xcc,0xcc,0xff,0x00}, + {0xff,0xcc,0xff,0x00},{0x33,0xff,0xff,0x00},{0x66,0xff,0xcc,0x00},{0x99,0xff,0xff,0x00}, + {0xcc,0xff,0xff,0x00},{0xff,0x66,0x66,0x00},{0x66,0xff,0x66,0x00},{0xff,0xff,0x66,0x00}, + {0x66,0x66,0xff,0x00},{0xff,0x66,0xff,0x00},{0x66,0xff,0xff,0x00},{0xa5,0x00,0x21,0x00}, + {0x5f,0x5f,0x5f,0x00},{0x77,0x77,0x77,0x00},{0x86,0x86,0x86,0x00},{0x96,0x96,0x96,0x00}, + {0xcb,0xcb,0xcb,0x00},{0xb2,0xb2,0xb2,0x00},{0xd7,0xd7,0xd7,0x00},{0xdd,0xdd,0xdd,0x00}, + {0xe3,0xe3,0xe3,0x00},{0xea,0xea,0xea,0x00},{0xff,0xfb,0xf0,0x00},{0xa0,0xa0,0xa4,0x00}, + {0x80,0x80,0x80,0x00},{0xff,0x00,0x00,0x00},{0x00,0xff,0x00,0x00},{0xff,0xff,0x00,0x00}, + {0x00,0x00,0xff,0x00},{0xff,0x00,0xff,0x00},{0x00,0xff,0xff,0x00},{0xff,0xff,0xff,0x00} +}; + UINT WINAPI extGetSystemPaletteEntries(HDC hdc, UINT iStartIndex, UINT nEntries, LPPALETTEENTRY lppe) { int ret; @@ -554,20 +616,12 @@ UINT WINAPI extGetSystemPaletteEntries(HDC hdc, UINT iStartIndex, UINT nEntries, ret=(*pGDIGetSystemPaletteEntries)(hdc, iStartIndex, nEntries, lppe); OutTraceD("GetSystemPaletteEntries: ret=%d\n", ret); if((ret == 0) && (dxw.dwFlags1 & EMULATESURFACE)) { - // this seems to build a more reasonable system palette .... - HPALETTE hpal; - hpal=CreateHalftonePalette(NULL); - ret = GetPaletteEntries(hpal, iStartIndex, nEntries, lppe); - //ret = nEntries; - OutTraceD("GetSystemPaletteEntries: fixing with halftone ret=%d\n", ret); - if(IsDebug){ - UINT idx; - OutTraceD("PaletteEntries[%x]= ", nEntries); - for(idx=0; idxm_SkipFPS); DDX_Check(pDX, IDC_SHOWFPS, cTarget->m_ShowFPS); DDX_Check(pDX, IDC_SHOWFPSOVERLAY, cTarget->m_ShowFPSOverlay); + DDX_Check(pDX, IDC_SHOWTIMESTRETCH, cTarget->m_ShowTimeStretch); DDX_Check(pDX, IDC_TIMESTRETCH, cTarget->m_TimeStretch); DDX_Text(pDX, IDC_MAXFPS, cTarget->m_MaxFPS); DDX_LBIndex(pDX, IDC_LISTTS, cTarget->m_InitTS); diff --git a/host/TargetDlg.cpp b/host/TargetDlg.cpp index 77c88fb..8bea190 100644 --- a/host/TargetDlg.cpp +++ b/host/TargetDlg.cpp @@ -109,6 +109,7 @@ CTargetDlg::CTargetDlg(CWnd* pParent /*=NULL*/) m_SkipFPS = FALSE; m_ShowFPS = FALSE; m_ShowFPSOverlay = FALSE; + m_ShowTimeStretch = FALSE; m_TimeStretch = FALSE; m_HookOpenGL = FALSE; m_ForceHookOpenGL = FALSE; diff --git a/host/TargetDlg.h b/host/TargetDlg.h index c61e7ad..2b8dbed 100644 --- a/host/TargetDlg.h +++ b/host/TargetDlg.h @@ -99,6 +99,7 @@ public: BOOL m_LimitFPS; BOOL m_ShowFPS; BOOL m_ShowFPSOverlay; + BOOL m_ShowTimeStretch; BOOL m_TimeStretch; BOOL m_HookOpenGL; BOOL m_ForceHookOpenGL; diff --git a/host/dxwndhost.aps b/host/dxwndhost.aps index 4682a05..513f1d1 100644 Binary files a/host/dxwndhost.aps and b/host/dxwndhost.aps differ diff --git a/host/dxwndhost.rc b/host/dxwndhost.rc index bbeb139..b2d2d5d 100644 --- a/host/dxwndhost.rc +++ b/host/dxwndhost.rc @@ -377,11 +377,12 @@ BEGIN LTEXT "delay (msec)",IDC_STATIC,52,25,50,9 GROUPBOX "Frame per Second",IDC_STATIC,7,7,140,78 CONTROL "Show FPS on title",IDC_SHOWFPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,60,84,10 - CONTROL "Time Stretch - initial:",IDC_TIMESTRETCH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,123,87,10 + CONTROL "Time Stretch - initial:",IDC_TIMESTRETCH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,122,87,10 CONTROL "Show FPS overlay",IDC_SHOWFPSOVERLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,72,84,10 EDITTEXT IDC_MAXFPS,104,23,31,14,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT - LISTBOX IDC_LISTTS,104,102,31,55,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Time Stretching",IDC_STATIC,7,94,139,70 + LISTBOX IDC_LISTTS,104,104,31,55,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Time Stretching",IDC_STATIC,7,94,139,71 + CONTROL "Show time stretch",IDC_SHOWTIMESTRETCH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,134,84,10 END IDD_TAB_WINDOW DIALOGEX 0, 0, 300, 240 diff --git a/host/dxwndhost.vs2008.suo b/host/dxwndhost.vs2008.suo index 38e2f75..7bb535e 100644 Binary files a/host/dxwndhost.vs2008.suo and b/host/dxwndhost.vs2008.suo differ diff --git a/host/dxwndhostView.cpp b/host/dxwndhostView.cpp index ffe9ef3..6ce1967 100644 --- a/host/dxwndhostView.cpp +++ b/host/dxwndhostView.cpp @@ -213,6 +213,7 @@ static void SetTargetFromDlg(TARGETMAP *t, CTargetDlg *dlg) if(dlg->m_SkipFPS) t->flags2 |= SKIPFPS; if(dlg->m_ShowFPS) t->flags2 |= SHOWFPS; if(dlg->m_ShowFPSOverlay) t->flags2 |= SHOWFPSOVERLAY; + if(dlg->m_ShowTimeStretch) t->flags4 |= SHOWTIMESTRETCH; if(dlg->m_TimeStretch) t->flags2 |= TIMESTRETCH; if(dlg->m_HookOpenGL) t->flags2 |= HOOKOPENGL; if(dlg->m_ForceHookOpenGL) t->flags3 |= FORCEHOOKOPENGL; @@ -351,6 +352,7 @@ static void SetDlgFromTarget(TARGETMAP *t, CTargetDlg *dlg) dlg->m_SkipFPS = t->flags2 & SKIPFPS ? 1 : 0; dlg->m_ShowFPS = t->flags2 & SHOWFPS ? 1 : 0; dlg->m_ShowFPSOverlay = t->flags2 & SHOWFPSOVERLAY ? 1 : 0; + dlg->m_ShowTimeStretch = t->flags4 & SHOWTIMESTRETCH ? 1 : 0; dlg->m_TimeStretch = t->flags2 & TIMESTRETCH ? 1 : 0; dlg->m_HookOpenGL = t->flags2 & HOOKOPENGL ? 1 : 0; dlg->m_ForceHookOpenGL = t->flags3 & FORCEHOOKOPENGL ? 1 : 0;