port 2A step 2: copy the 40250 header closure into the port mirror
76 closure headers (EterBase, EterLocale, EterPack, EterLib, GameLib, MilesLib, EffectLib, SphereLib, EterImageLib) copied by the new port_copy.py (CP949->UTF-8, LF, include-path case only); platform-class headers go to the mirror path too, as the interface platform/ implements. Six manual `// PORT:` edits (Random, Singleton, Pool, Stl, Utils, FlyTarget). - common/D3D8Types.h: D3D8 value types with SDK values/layout, opaque COM interfaces - common/shim/sdk (d3d8/d3dx8/mss) on every platform, common/shim/win32 off Windows - Win32Types/Win32Crt: HRESULT, GUID, LARGE_INTEGER, LOGFONT/TEXTMETRIC, _atoi64, CRITICAL_SECTION on std::recursive_mutex - header gate prepends each library's StdAfx.h (40250's precompiled header) port_gate: macOS, Android, iOS, Windows (mingw) PASS; Linux BLOCKED (no toolchain). ScriptLib/EterPythonLib/UserInterface wait for 2P (their StdAfx includes Python). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,166 @@
|
||||
#pragma once
|
||||
|
||||
#include <d3d8.h>
|
||||
#include <string>
|
||||
typedef BOOL (*PFNCONFIRMDEVICE) (D3DCAPS8& rkD3DCaps, UINT uBehavior, D3DFORMAT eD3DFmt);
|
||||
|
||||
enum
|
||||
{
|
||||
D3DDEVICETYPE_HAL,
|
||||
D3DDEVICETYPE_REF,
|
||||
D3DDEVICETYPE_NUM,
|
||||
};
|
||||
|
||||
struct D3D_SModeInfo
|
||||
{
|
||||
UINT m_uScrWidth;
|
||||
UINT m_uScrHeight;
|
||||
UINT m_uScrDepthBit;
|
||||
UINT m_dwD3DBehavior;
|
||||
D3DFORMAT m_eD3DFmtPixel;
|
||||
D3DFORMAT m_eD3DFmtDepthStencil;
|
||||
|
||||
VOID GetString(std::string* pstEnumList);
|
||||
};
|
||||
|
||||
class D3D_CAdapterDisplayModeList
|
||||
{
|
||||
public:
|
||||
D3D_CAdapterDisplayModeList() {}
|
||||
~D3D_CAdapterDisplayModeList() {}
|
||||
VOID Build(IDirect3D8& rkD3D, D3DFORMAT eD3DFmtDefault, UINT iAdapter);
|
||||
|
||||
UINT GetDisplayModeNum();
|
||||
UINT GetPixelFormatNum();
|
||||
|
||||
const D3DDISPLAYMODE& GetDisplayModer(UINT iD3DDM);
|
||||
const D3DFORMAT& GetPixelFormatr(UINT iD3DFmt);
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
D3DDISPLAYMODE_MAX = 100,
|
||||
D3DFORMAT_MAX = 20,
|
||||
|
||||
FILTEROUT_LOWRESOLUTION_WIDTH = 640,
|
||||
FILTEROUT_LOWRESOLUTION_HEIGHT = 480,
|
||||
};
|
||||
|
||||
protected:
|
||||
D3DDISPLAYMODE m_akD3DDM[D3DDISPLAYMODE_MAX];
|
||||
D3DFORMAT m_aeD3DFmt[D3DFORMAT_MAX];
|
||||
|
||||
UINT m_uD3DDMNum;
|
||||
UINT m_uD3DFmtNum;
|
||||
|
||||
};
|
||||
|
||||
class D3D_CDeviceInfo
|
||||
{
|
||||
public:
|
||||
D3D_CDeviceInfo() {}
|
||||
~D3D_CDeviceInfo() {}
|
||||
BOOL Build(IDirect3D8& rkD3D, UINT iAdapter, UINT iDevType, D3D_CAdapterDisplayModeList& rkD3DADMList, PFNCONFIRMDEVICE pfnConfirmDevice);
|
||||
BOOL Find(UINT uScrWidth, UINT uScrHeight, UINT uScrDepthBits, BOOL isWindowed, UINT* piD3DModeInfo);
|
||||
|
||||
UINT GetD3DModeInfoNum();
|
||||
|
||||
VOID GetString(std::string* pstEnumList);
|
||||
|
||||
BOOL FindDepthStencilFormat(IDirect3D8& rkD3D, UINT iAdapter, D3DDEVTYPE DeviceType, D3DFORMAT TargetFormat, D3DFORMAT* pDepthStencilFormat);
|
||||
|
||||
D3D_SModeInfo& GetD3DModeInfor(UINT iD3DModeInfo);
|
||||
D3D_SModeInfo* GetD3DModeInfop(UINT iD3DModeInfo);
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
D3DMODEINFO_NUM = 150,
|
||||
};
|
||||
|
||||
|
||||
protected:
|
||||
const TCHAR* m_szDevDesc;
|
||||
|
||||
D3DDEVTYPE m_eD3DDevType;
|
||||
D3DCAPS8 m_kD3DCaps;
|
||||
BOOL m_canDoWindowed;
|
||||
|
||||
UINT m_iCurD3DModeInfo;
|
||||
UINT m_uD3DModeInfoNum;
|
||||
D3D_SModeInfo m_akD3DModeInfo[D3DMODEINFO_NUM];
|
||||
|
||||
|
||||
BOOL m_isWindowed;
|
||||
|
||||
D3DMULTISAMPLE_TYPE m_eD3DMSTWindowed;
|
||||
D3DMULTISAMPLE_TYPE m_eD3DMSTFullscreen;
|
||||
|
||||
|
||||
protected:
|
||||
static const CHAR* msc_aszD3DDevDesc[D3DDEVICETYPE_NUM];
|
||||
static const D3DDEVTYPE msc_aeD3DDevType[D3DDEVICETYPE_NUM];
|
||||
};
|
||||
|
||||
class D3D_CAdapterInfo
|
||||
{
|
||||
public:
|
||||
D3D_CAdapterInfo() {}
|
||||
~D3D_CAdapterInfo() {}
|
||||
BOOL Find(UINT uScrWidth, UINT uScrHeight, UINT uScrDepthBits, BOOL isWindowed, UINT* piD3DModeInfo, UINT* piD3DDevInfo);
|
||||
|
||||
BOOL Build(IDirect3D8& rkD3D, UINT iAdapter, PFNCONFIRMDEVICE pfnConfirmDevice);
|
||||
VOID GetString(std::string* pstEnumList);
|
||||
|
||||
D3DADAPTER_IDENTIFIER8& GetIdentifier()
|
||||
{
|
||||
return m_kD3DAdapterIdentifier;
|
||||
}
|
||||
|
||||
D3DDISPLAYMODE& GetDesktopD3DDisplayModer();
|
||||
D3DDISPLAYMODE* GetDesktopD3DDisplayModep();
|
||||
|
||||
D3D_CDeviceInfo* GetD3DDeviceInfop(UINT iD3DDevInfo);
|
||||
D3D_SModeInfo* GetD3DModeInfop(UINT iD3DDevInfo, UINT iD3DModeInfo);
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
D3DDEVICEINFO_NUM = 5,
|
||||
};
|
||||
|
||||
|
||||
protected:
|
||||
D3DADAPTER_IDENTIFIER8 m_kD3DAdapterIdentifier;
|
||||
D3DDISPLAYMODE m_kD3DDMDesktop;
|
||||
|
||||
UINT m_iCurD3DDevInfo;
|
||||
UINT m_uD3DDevInfoNum;
|
||||
D3D_CDeviceInfo m_akD3DDevInfo[D3DDEVICEINFO_NUM];
|
||||
|
||||
};
|
||||
|
||||
class D3D_CDisplayModeAutoDetector
|
||||
{
|
||||
public:
|
||||
D3D_CDisplayModeAutoDetector();
|
||||
~D3D_CDisplayModeAutoDetector();
|
||||
|
||||
BOOL Find(UINT uScrWidth, UINT uScrHeight, UINT uScrDepthBits, BOOL isWindowed, UINT* piD3DModeInfo, UINT* piD3DDevInfo, UINT* piD3DAdapterInfo);
|
||||
BOOL Build(IDirect3D8& rkD3D, PFNCONFIRMDEVICE pfnConfirmDevice);
|
||||
|
||||
D3D_CAdapterInfo* GetD3DAdapterInfop(UINT iD3DAdapterInfo);
|
||||
D3D_SModeInfo* GetD3DModeInfop(UINT iD3DAdapterInfo, UINT iD3DDevInfo, UINT iD3DModeInfo);
|
||||
|
||||
VOID GetString(std::string* pstEnumList);
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
D3DADAPTERINFO_NUM = 10,
|
||||
};
|
||||
|
||||
protected:
|
||||
D3D_CAdapterInfo m_akD3DAdapterInfo[D3DADAPTERINFO_NUM];
|
||||
UINT m_uD3DAdapterInfoCount;
|
||||
};
|
||||
Reference in New Issue
Block a user