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:
shenlei
2026-09-22 20:27:57 +09:00
co-authored by Claude Opus 5
parent 0f2eee0b24
commit fc47582017
98 changed files with 7645 additions and 41 deletions
@@ -0,0 +1,4 @@
#pragma once
// Shim for <d3d8.h>: the D3D8 value types 40250 logic uses as data. Rendering goes through
// platform/, never through these declarations.
#include "../../D3DXMath.h"
@@ -0,0 +1,3 @@
#pragma once
// Shim for <d3d8types.h>; see d3d8.h.
#include "d3d8.h"
@@ -0,0 +1,22 @@
#pragma once
// Shim for <d3dx8.h>: platform-independent D3DX8 math (common/D3DXMath.h); D3DX objects are
// opaque, owned by platform/.
#include "d3d8.h"
struct ID3DXMesh;
typedef ID3DXMesh* LPD3DXMESH;
struct ID3DXMatrixStack;
typedef ID3DXMatrixStack* LPD3DXMATRIXSTACK;
// d3dx8tex.h filter flags
#define D3DX_DEFAULT ((UINT)-1)
#define D3DX_FILTER_NONE (1 << 0)
#define D3DX_FILTER_POINT (2 << 0)
#define D3DX_FILTER_LINEAR (3 << 0)
#define D3DX_FILTER_TRIANGLE (4 << 0)
#define D3DX_FILTER_BOX (5 << 0)
#define D3DX_FILTER_MIRROR_U (1 << 16)
#define D3DX_FILTER_MIRROR_V (2 << 16)
#define D3DX_FILTER_MIRROR_W (4 << 16)
#define D3DX_FILTER_MIRROR (7 << 16)
#define D3DX_FILTER_DITHER (8 << 16)
+26
View File
@@ -0,0 +1,26 @@
#pragma once
// Shim for Miles Sound System <mss.h>: the scalar types and opaque handles 40250's MilesLib
// headers name. Playback goes through platform/, never through these declarations.
#include "../../Win32Types.h"
typedef int32_t S32;
typedef uint32_t U32;
typedef float F32;
typedef int16_t S16;
typedef uint16_t U16;
typedef int8_t S8;
typedef uint8_t U8;
#define AILCALLBACK
#define AILEXPORT
struct _SAMPLE;
struct _STREAM;
struct _DIG_DRIVER;
struct _H3DSAMPLE;
typedef _SAMPLE* HSAMPLE;
typedef _STREAM* HSTREAM;
typedef _DIG_DRIVER* HDIGDRIVER;
typedef void* H3DPOBJECT;
typedef H3DPOBJECT H3DSAMPLE;
typedef U32 HPROVIDER;
@@ -0,0 +1,3 @@
#pragma once
// Shim for <dinput.h> on non-Windows targets; what 40250 logic uses from it is in <windows.h>.
#include "windows.h"
@@ -0,0 +1,3 @@
#pragma once
// Shim for <direct.h> on non-Windows targets; what 40250 logic uses from it is in <windows.h>.
#include "windows.h"
@@ -0,0 +1,3 @@
#pragma once
// Shim for <imagehlp.h> on non-Windows targets; what 40250 logic uses from it is in <windows.h>.
#include "windows.h"
@@ -0,0 +1,8 @@
#pragma once
// Shim for MSVC <malloc.h> on non-Windows targets. Linux/Android ship a <malloc.h> that their
// <stdlib.h> itself includes, so defer to it; macOS has none.
#if __has_include_next(<malloc.h>)
#include_next <malloc.h>
#else
#include <stdlib.h>
#endif
@@ -0,0 +1,3 @@
#pragma once
// Shim for <mmsystem.h> on non-Windows targets; what 40250 logic uses from it is in <windows.h>.
#include "windows.h"
@@ -0,0 +1,3 @@
#pragma once
// Shim for <process.h> on non-Windows targets; what 40250 logic uses from it is in <windows.h>.
#include "windows.h"
@@ -0,0 +1,5 @@
#pragma once
// Shim for <windows.h> on non-Windows targets: the Win32 scalar types and CRT spellings
// 40250 sources use (common/Win32Types.h, common/Win32Crt.h).
#include "../../Win32Types.h"
#include "../../Win32Crt.h"
@@ -0,0 +1,14 @@
#pragma once
// Shim for <winsock.h> on non-Windows targets: the BSD socket types under their Winsock names.
#include "windows.h"
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h>
typedef int SOCKET;
typedef struct sockaddr SOCKADDR;
typedef struct sockaddr_in SOCKADDR_IN;
typedef struct in_addr IN_ADDR;
#define INVALID_SOCKET (-1)
#define SOCKET_ERROR (-1)