port 2V2-c: chrmgr/chr modules + race registration chain
PythonCharacterManagerModule/PythonCharacterModule ported verbatim; the 2V0 chr/chrmgr stubs are gone and initchr/initchrmgr run in 40250 order. The registration chain they need (RaceData/RaceDataFile/RaceManager/ RaceMotionData, GameType, AttributeData/AttributeInstance, TextFileLoader, Util, Camera/CameraProcedure) is ported; CRaceManager is created in PythonBoot. port.login_flow asserts race 0 has its wait motions and no unhandled packet header; port.login_live 8/8 against 192.168.21.203. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
62b6e23bfc
commit
996d793f0c
@@ -154,6 +154,34 @@ D3DXMATRIX* D3DXMatrixInverse(D3DXMATRIX* pOut, FLOAT* pDeterminant, const D3DXM
|
||||
return pOut;
|
||||
}
|
||||
|
||||
FLOAT D3DXMatrixfDeterminant(const D3DXMATRIX* pM)
|
||||
{
|
||||
FLOAT det = 0.0f;
|
||||
D3DXMATRIX unused;
|
||||
D3DXMatrixInverse(&unused, &det, pM);
|
||||
return det;
|
||||
}
|
||||
|
||||
D3DXMATRIX* D3DXMatrixLookAtRH(D3DXMATRIX* pOut, const D3DXVECTOR3* pEye, const D3DXVECTOR3* pAt, const D3DXVECTOR3* pUp)
|
||||
{
|
||||
D3DXVECTOR3 z = *pEye - *pAt;
|
||||
D3DXVec3Normalize(&z, &z);
|
||||
D3DXVECTOR3 x;
|
||||
D3DXVec3Cross(&x, pUp, &z);
|
||||
D3DXVec3Normalize(&x, &x);
|
||||
D3DXVECTOR3 y;
|
||||
D3DXVec3Cross(&y, &z, &x);
|
||||
|
||||
pOut->_11 = x.x; pOut->_12 = y.x; pOut->_13 = z.x; pOut->_14 = 0.0f;
|
||||
pOut->_21 = x.y; pOut->_22 = y.y; pOut->_23 = z.y; pOut->_24 = 0.0f;
|
||||
pOut->_31 = x.z; pOut->_32 = y.z; pOut->_33 = z.z; pOut->_34 = 0.0f;
|
||||
pOut->_41 = -D3DXVec3Dot(&x, pEye);
|
||||
pOut->_42 = -D3DXVec3Dot(&y, pEye);
|
||||
pOut->_43 = -D3DXVec3Dot(&z, pEye);
|
||||
pOut->_44 = 1.0f;
|
||||
return pOut;
|
||||
}
|
||||
|
||||
D3DXMATRIX* D3DXMatrixScaling(D3DXMATRIX* pOut, FLOAT sx, FLOAT sy, FLOAT sz)
|
||||
{
|
||||
D3DXMatrixIdentity(pOut);
|
||||
|
||||
@@ -251,6 +251,8 @@ static_assert(sizeof(D3DXPLANE) == 16 && sizeof(D3DCOLORVALUE) == 16, "D3DX layo
|
||||
inline FLOAT D3DXVec2Length(const D3DXVECTOR2* pV) { return sqrtf(pV->x * pV->x + pV->y * pV->y); }
|
||||
inline FLOAT D3DXVec2LengthSq(const D3DXVECTOR2* pV) { return pV->x * pV->x + pV->y * pV->y; }
|
||||
inline FLOAT D3DXVec2Dot(const D3DXVECTOR2* pV1, const D3DXVECTOR2* pV2) { return pV1->x * pV2->x + pV1->y * pV2->y; }
|
||||
// d3dx8math.inl: the z of the 3D cross product.
|
||||
inline FLOAT D3DXVec2CCW(const D3DXVECTOR2* pV1, const D3DXVECTOR2* pV2) { return pV1->x * pV2->y - pV1->y * pV2->x; }
|
||||
inline D3DXVECTOR2* D3DXVec2Add(D3DXVECTOR2* pOut, const D3DXVECTOR2* pV1, const D3DXVECTOR2* pV2)
|
||||
{
|
||||
pOut->x = pV1->x + pV2->x;
|
||||
@@ -354,6 +356,9 @@ inline BOOL D3DXMatrixIsIdentity(const D3DXMATRIX* pM)
|
||||
D3DXMATRIX* D3DXMatrixMultiply(D3DXMATRIX* pOut, const D3DXMATRIX* pM1, const D3DXMATRIX* pM2);
|
||||
D3DXMATRIX* D3DXMatrixTranspose(D3DXMATRIX* pOut, const D3DXMATRIX* pM);
|
||||
D3DXMATRIX* D3DXMatrixInverse(D3DXMATRIX* pOut, FLOAT* pDeterminant, const D3DXMATRIX* pM);
|
||||
FLOAT D3DXMatrixfDeterminant(const D3DXMATRIX* pM);
|
||||
// Right-handed view matrix: z = normalize(eye - at), x = normalize(up x z), y = z x x.
|
||||
D3DXMATRIX* D3DXMatrixLookAtRH(D3DXMATRIX* pOut, const D3DXVECTOR3* pEye, const D3DXVECTOR3* pAt, const D3DXVECTOR3* pUp);
|
||||
D3DXMATRIX* D3DXMatrixScaling(D3DXMATRIX* pOut, FLOAT sx, FLOAT sy, FLOAT sz);
|
||||
D3DXMATRIX* D3DXMatrixTranslation(D3DXMATRIX* pOut, FLOAT x, FLOAT y, FLOAT z);
|
||||
D3DXMATRIX* D3DXMatrixRotationX(D3DXMATRIX* pOut, FLOAT angle);
|
||||
|
||||
Reference in New Issue
Block a user