layout: restructure into src/ tests/ android/ scripts/ tools/

- extension/src/{port,platform,codepage} -> src/; native_render -> src/host
  (+ dxt, shaders/); libgr2 -> src/gr2; extension/third_party -> third_party
- extension/tests -> tests/port, libgr2/tests -> tests/gr2
- android-native -> android (build.sh, push-client.sh moved in)
- script -> scripts; tools/40250 -> tools/server; oracle -> tools/granny-oracle;
  perf tools -> tools/perf
- all build trees under build/ (native, release, android, port-gate)
- xrender:: CMake aliases -> mt::; port-map ledger impl paths rewritten

No code changes. ctest 15/15, port_gate macos+android PASS, port_map check 0 errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-29 19:08:19 +09:00
co-authored by Claude Opus 5.5
parent 70710477cf
commit a46093104c
2817 changed files with 13728 additions and 13744 deletions
@@ -0,0 +1,87 @@
#pragma once
#include "EffectElementBaseInstance.h"
#include "ParticleInstance.h"
#include "ParticleProperty.h"
#include "../EterLib/GrpScreen.h"
#include "../EterLib/StateManager.h"
#include "../EterLib/GrpImageInstance.h"
#include "EmitterProperty.h"
class CParticleSystemData; // PORT: MSVC makes the friend declarations in the included headers visible; ISO C++ needs this
class CParticleSystemInstance : public CEffectElementBaseInstance
{
public:
static void DestroySystem();
static CParticleSystemInstance* New();
static void Delete(CParticleSystemInstance* pkData);
static CDynamicPool<CParticleSystemInstance> ms_kPool;
public:
template <typename T>
inline void ForEachParticleRendering(T & FunObj)
{
DWORD dwFrameIndex;
for(dwFrameIndex=0; dwFrameIndex<m_kVct_pkImgInst.size(); dwFrameIndex++)
{
STATEMANAGER.SetTexture(0, m_kVct_pkImgInst[dwFrameIndex]->GetTextureReference().GetD3DTexture());
TParticleInstanceList::iterator itor = m_ParticleInstanceListVector[dwFrameIndex].begin();
for (; itor != m_ParticleInstanceListVector[dwFrameIndex].end(); ++itor)
{
if (!InFrustum(*itor))
return;
FunObj(*itor);
}
}
}
CParticleSystemInstance();
virtual ~CParticleSystemInstance();
void OnSetDataPointer(CEffectElementBase * pElement);
void CreateParticles(float fElapsedTime);
inline bool InFrustum(CParticleInstance * pInstance)
{
if (m_pParticleProperty->m_bAttachFlag)
return CScreen::GetFrustum().ViewVolumeTest(Vector3d(
pInstance->m_v3Position.x + mc_pmatLocal->_41,
pInstance->m_v3Position.y + mc_pmatLocal->_42,
pInstance->m_v3Position.z + mc_pmatLocal->_43
),pInstance->GetRadiusApproximation())!=VS_OUTSIDE;
else
return CScreen::GetFrustum().ViewVolumeTest(Vector3d(pInstance->m_v3Position.x,pInstance->m_v3Position.y,pInstance->m_v3Position.z),pInstance->GetRadiusApproximation())!=VS_OUTSIDE;
}
DWORD GetEmissionCount();
protected:
void OnInitialize();
void OnDestroy();
bool OnUpdate(float fElapsedTime);
void OnRender();
protected:
float m_fEmissionResidue;
DWORD m_dwCurrentEmissionCount;
int m_iLoopCount;
typedef std::list<CParticleInstance*> TParticleInstanceList;
typedef std::vector<TParticleInstanceList> TParticleInstanceListVector;
TParticleInstanceListVector m_ParticleInstanceListVector;
typedef std::vector<CGraphicImageInstance*> TImageInstanceVector;
TImageInstanceVector m_kVct_pkImgInst;
CParticleSystemData * m_pData;
CParticleProperty * m_pParticleProperty;
CEmitterProperty * m_pEmitterProperty;
};